-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Pass on on-disk chunk sizes as preferred chunk sizes to the xarray backend #678
Conversation
Lines 896 to 929 in 33c0059
|
Indeed! my objective here is to return the LazilyIndexedOuterArrays to xarray directly when the data is requested through the xarray backend to let xarray deal with the chunking and create dask arrays itself. |
Anything else I can do to get this PR ready to merge? |
Mind adding a note in |
Done in 1808857 |
@mraspaud, the only thing left to do in this PR is to remove the changes in the |
Done. Sorry for the delay, I was on holidays... |
Co-authored-by: Alan D. Snow <[email protected]>
6770d67
to
b544127
Compare
This looks good from my perspective, Any other changes you would like to add before merging? |
Nothing more from my side, thanks for all the support! |
Thanks @mraspaud 👍 |
This PR proposes a removes the (unused)
chunks
andcache
argument from theopen_dataset
plugin function and sends values toopen_rasterio
to get a result inline with what xarray expects. Moreover, thepreferred_chunks
encoding attribute is populated for xarray to be able to do optimized automated chunking.The fact that
chunks
andcache
are ignored by xarray is documented in the example here: https://docs.xarray.dev/en/stable/internals/how-to-add-new-backend.html#backendentrypoint-subclassingAnd the recommended usage of
preferred_chunks
is documented here: https://docs.xarray.dev/en/stable/internals/how-to-add-new-backend.html#preferred-chunk-sizesFinally, I wasn't really sure how/where to put the tests, what do you recommend?
docs/history.rst
for all changes anddocs/rioxarray.rst
for new API