-
I want to look up 8760 times for a single lat/lon combo in less than a second from a 43.82 GB file of wind data containing:
The best time we achieved for a single-year look-up was 16 seconds for both u100 and v100 wind speed at 100m vectors. We want to have a sub-second look-up for the whole year as such file read will need to happen on every user request in our API.
Output:
Any help would be really appreciated. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
What does it look like if you remove dask from the equation using
|
Beta Was this translation helpful? Give feedback.
-
Your data is chunked with Zarr into blocks of size To enable efficient queries of your data, you will need to "rechunk" it so you can query data a single location with less waste, e.g., by chunking along latitude and longitude. You can do this with |
Beta Was this translation helpful? Give feedback.
Your data is chunked with Zarr into blocks of size
(50, 721, 1440)
, which means that every request data for the entire world. This means every look up loads the full 42 GB of data, stored in several hundred files!To enable efficient queries of your data, you will need to "rechunk" it so you can query data a single location with less waste, e.g., by chunking along latitude and longitude. You can do this with
.chunk()
and writing a new Zarr file in xarray, or with a tool like Rechunker.