You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deprecate open_zarr in favor of open_dataset(..., engine='zarr') #7495
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.
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.
Reacted by Tom Nicholas, Joe Hamman and Maximilian Roos
Activity
keewis commentedon Dec 12, 2023
To get back to this, I believe we should at least harmonize the meaning of the
chunksparameter for both functions:open_zarrcurrently translates"auto"to{}if a chunk manager is available, orNoneotherwise, then forwards everything toopen_dataset.open_datasetdeals withNoneseparately, but passes"auto"anddictvalues on todask(with several translation layers in between), which means thatopen_dataset(..., chunks="auto")is not the same asopen_zarr(..., chunks="auto").I believe we should aim to move the special-casing of
"auto"toopen_datasetwhile choosing a string that does not conflict with thechunksparameter fordask'srechunk.jhamman commentedon Dec 12, 2023
👍 I have also come around to keeping
open_zarr.Your plan around the chunks parameter seems quite reasonable.