Skip to content

Clarify that chunks={} in .open_dataset reproduces the default behavior of deprecated .open_zarr #7293

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

Closed
jbusecke opened this issue Nov 16, 2022 · 1 comment · Fixed by #7438

Comments

@jbusecke
Copy link
Contributor

What is your issue?

I was wondering if we could add some language to the docstring of xr.open_dataset regarding the chunk kwarg to make the transition for folks who have used a lot of xr.open_zarr in the past.

the current text is:

chunks (int, dict, 'auto' or None, optional) – If chunks is provided, it is used to load the new dataset into dask arrays. chunks=-1 loads the dataset with dask using a single chunk for all arrays. chunks={} loads the dataset with dask using engine preferred chunks if exposed by the backend, otherwise with a single chunk for all arrays. chunks='auto' will use dask auto chunking taking into account the engine preferred chunks. See dask chunking for more details.

I found that for opening large zarr stores, setting chunks={} reproduces the behavior of xr.open_zarr()? If this is true I think it would be great to include something like

chunks={} loads the dataset with dask using engine preferred chunks if exposed by the backend, otherwise with a single chunk for all arrays. In order to reproduce the default behavior of xr.open_zarr(...) use `xr.open_dataset(..., engine='zarr', chunks={})

to make this clear for users who have been using xr.open_zarr in the past.

@jbusecke jbusecke added the needs triage Issue that has not been reviewed by xarray team member label Nov 16, 2022
@headtr1ck headtr1ck added contrib-good-first-issue topic-documentation and removed needs triage Issue that has not been reviewed by xarray team member labels Nov 16, 2022
@dcherian
Copy link
Contributor

Thanks Julius. PR welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants