Skip to content

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

Closed

Description

@jhamman

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

Activity

  1. added
    needs triageIssue that has not been reviewed by xarray team member
    on Jan 31, 2023
  2. added
    needs triageIssue that has not been reviewed by xarray team member
    and removed
    needs triageIssue that has not been reviewed by xarray team member
    on Jan 31, 2023
  3. added
    topic-zarrRelated to zarr storage library
    and removed
    needs triageIssue that has not been reviewed by xarray team member
    on Jan 31, 2023
  4. keewis commented on Dec 12, 2023

    @keewis
    Collaborator

    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.

  5. jhamman commented on Dec 12, 2023

    @jhamman
    MemberAuthor

    👍 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions