Skip to content

to_netcdf fails for engine=h5netcdf when using dask-backed arrays #1571

@jcmgray

Description

@jcmgray

When using dask-backed datasets/arrays it does not seem possible to use the 'h5netcdf' engine to write to disk:

import xarray as xr
ds = xr.Dataset({'a': ('x', [1, 2])}, {'x': [3, 4]}).chunk()
ds.to_netcdf("test.h5", engine='h5netcdf')

results in the error:

...

h5py/h5a.pyx in h5py.h5a.open()

KeyError: "Can't open attribute (can't locate attribute: 'dask')"

Not sure if this is a xarray or h5netcdf issue - or some inherent limitation in which case apologies!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions