Skip to content

Zarr scalars aren't not correctly handled #3108

@mannreis

Description

@mannreis

As an example here's some python code that writes a xarray dataset into netcdf and zarr (version 2):

import xarray as xr
ds = xr.Dataset({'var':123456789})
ds.to_netcdf('xr.nc')
ds.to_zarr('xr.zarr')

In netcdf the scalar is well interpreted:

$ ncdump  xr.nc 
netcdf xr {
variables:
        int var ;
data:

 var = 123456789 ;
}

In zarr the scalar variable is suppressed:

$ ncdump  -L 0 file://${PWD}/xr.zarr#mode=zarr,file
WARN: Empty shape for variable var suppressed
netcdf xr {
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions