dataset encodings 'source' and 'original_shape' are not dropped in zarr
backend
#7129
Closed
4 tasks done
Labels
What happened?
When opening a dataset, like one from the tutorial, and writing it as zarr file, an error is raised due to encodings that are invalid for the
zarr
driver, when the encoding is given into_zarr
. In this particular case, the encodingssource
andoriginal_shape
are added by xarray itself, so that I expect that it can handle these encodings without raising an error.What did you expect to happen?
I expect that the encodings
source
andoriginal_shape
being dropped similar to thenetCDF4
backend.Minimal Complete Verifiable Example
MVCE confirmation
Relevant log output
Anything else we need to know?
The respective lines in the netCDF4 backend are:
xarray/xarray/backends/netCDF4_.py
Line 235 in 13c52b2
and
xarray/xarray/backends/netCDF4_.py
Lines 272 to 274 in 13c52b2
Environment
xarray: 2022.9.0
pandas: 1.5.0
numpy: 1.23.3
scipy: None
netCDF4: 1.6.1
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: 2.13.2
cftime: 1.6.2
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: None
dask: None
distributed: None
matplotlib: None
cartopy: None
seaborn: None
numbagg: None
fsspec: None
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 65.4.1
pip: 22.2.2
conda: None
pytest: None
IPython: 8.3.0
sphinx: None
The text was updated successfully, but these errors were encountered: