Skip to content

Chunking Warning in xarray: Understanding and Optimizing Performance #8795

Answered by keewis
rjavierch asked this question in Q&A
Discussion options

You must be logged in to vote

not quite: the chunk size tells you the size of the chunks, not the number of chunks along that dimension. In this case, your dataset appears to store the data row by row. Thus, instead of somewhat rectangular chunks, it appears you have a single chunk along x and many 1-sized chunks along y.

With the code you posted, you'll load 5000 of these on-disk chunks into memory on a worker, then split them into 9 smaller chunks along x (which is what the warning recommended). For that to work properly, however, you need to specify chunks={} in the open_dataset call, which will give you the chunksize on disk.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@rjavierch
Comment options

@keewis
Comment options

Answer selected by rjavierch
@rjavierch
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants