Skip to content
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

Deprecate open_zarr in favor of open_dataset(..., engine='zarr') #7495

Open
jhamman opened this issue Jan 31, 2023 · 2 comments · May be fixed by #7496
Open

Deprecate open_zarr in favor of open_dataset(..., engine='zarr') #7495

jhamman opened this issue Jan 31, 2023 · 2 comments · May be fixed by #7496
Labels
topic-backends topic-zarr Related to zarr storage library

Comments

@jhamman
Copy link
Member

jhamman commented Jan 31, 2023

What is your issue?

We have discussed many time deprecating xarray.open_zarr in favor of xarray.open_dataset(..., engine='zarr'). This issue tracks that process and is a place for us to discuss any issues that may arise as a result of the change.

xref: #2812, #7293

@jhamman jhamman added the needs triage Issue that has not been reviewed by xarray team member label Jan 31, 2023
@dcherian dcherian added topic-backends needs triage Issue that has not been reviewed by xarray team member and removed needs triage Issue that has not been reviewed by xarray team member labels Jan 31, 2023
@jhamman jhamman linked a pull request Jan 31, 2023 that will close this issue
4 tasks
@TomNicholas TomNicholas added topic-zarr Related to zarr storage library and removed needs triage Issue that has not been reviewed by xarray team member labels Jan 31, 2023
@keewis
Copy link
Collaborator

keewis commented Dec 12, 2023

To get back to this, I believe we should at least harmonize the meaning of the chunks parameter for both functions: open_zarr currently translates "auto" to {} if a chunk manager is available, or None otherwise, then forwards everything to open_dataset. open_dataset deals with None separately, but passes "auto" and dict values on to dask (with several translation layers in between), which means that open_dataset(..., chunks="auto") is not the same as open_zarr(..., chunks="auto").

I believe we should aim to move the special-casing of "auto" to open_dataset while choosing a string that does not conflict with the chunks parameter for dask's rechunk.

@jhamman
Copy link
Member Author

jhamman commented Dec 12, 2023

👍 I have also come around to keeping open_zarr.

Your plan around the chunks parameter seems quite reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-backends topic-zarr Related to zarr storage library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants