-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when rechunking from Zarr store #4380
Comments
No. I run into this frequently and it is annoying. @rabernat do you remember why you chose to keep |
I'm not sure but ... It seems to be a bug this error. There is a check on the final chunk that it seems to have the wrong direction in the inequality. xarray/xarray/backends/zarr.py Lines 141 to 173 in ac23461
the aims of these checks, as described in the comment, is to avoid to have multiple dask chunks in one zarr chunk. According to this logic this inequality at line 163: xarray/xarray/backends/zarr.py Line 163 in ac23461
if dchunks[-1] < zchunk , but this last one seems to me that it is always verified.
|
The
Maybe this interface is a little bit confusing. Concerning the different chunking per variable, I link here this related issue: |
Running into the same issue, when I:
I get the chunk size mismatch error which I solve by manually overwriting the I didn't realize the |
I think we can fold this into #6323 |
My assumption for this is that it should be possible to:
However I see this behavior instead:
Full trace
Overwriting chunks on
open_zarr
withoverwrite_encoded_chunks=True
works but I don't want that because it requires providing a uniform chunk size for all variables. This workaround seems to be fine though:Does
encoding['chunks']
serve any purpose after you've loaded a zarr store and all the variables are defined as dask arrays? In other words, Is there any harm in deleting it from all dask variables if I want those variables to write back out to zarr using the dask chunk definitions instead?Environment:
Output of xr.show_versions()
INSTALLED VERSIONS ------------------ commit: None python: 3.7.6 | packaged by conda-forge | (default, Jun 1 2020, 18:57:50) [GCC 7.5.0] python-bits: 64 OS: Linux OS-release: 5.4.0-42-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.10.6 libnetcdf: Nonexarray: 0.16.0
pandas: 1.0.5
numpy: 1.19.0
scipy: 1.5.1
netCDF4: None
pydap: None
h5netcdf: None
h5py: 2.10.0
Nio: None
zarr: 2.4.0
cftime: None
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: None
dask: 2.21.0
distributed: 2.21.0
matplotlib: 3.3.0
cartopy: None
seaborn: 0.10.1
numbagg: None
pint: None
setuptools: 47.3.1.post20200616
pip: 20.1.1
conda: 4.8.2
pytest: 5.4.3
IPython: 7.15.0
sphinx: 3.2.1
The text was updated successfully, but these errors were encountered: