Skip to content

How to ignore non-existing dims given in chunks? #3633

@willirath

Description

@willirath

Is there a way of over-specifying chunks upon opening a dataset without throwing an error?

Currently, giving chunk sizes along dimensions that are not present in the dataset fails with a ValueError:

da = xr.DataArray(np.arange(10), dims=("x", ), name="example_data")
da.to_dataset().to_netcdf("example.nc")
ds = xr.open_dataset("example.nc", chunks={"x": 5, "y": 1})

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions