Reputation: 21961
As per "ValueError: chunksize cannot exceed dimension size" when trying to write xarray to netcdf, setting engine to scipy should fix this error. However, this does not play with zlib=True in the encodings. How do I still zip the netCDF, currently I get this error with scipy engine:
*** ValueError: unexpected encoding for scipy backend: ['zlib']
Upvotes: 0
Views: 244
Reputation: 9593
SciPy's netCDF reader/writer only supports the netCDF3 format, which does not support in-file compression (a netCDF4 feature). To use zlib=True
you'll need to write netCDF files using either engine='netcdf4'
or engine='h5netcdf'
.
Upvotes: 1