-
-
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
'open_mfdataset' zarr zip timestamp issue #7354
Comments
@peterdudfield - have you tried this workflow with the latest version of xarray ( |
Yea the same bug appeared. So this appears at |
I took a minute to look into this and think I understand what is going on. First, a little debugging: for name in [files[0], files[1], path]:
print(name)
ds = xr.open_zarr(name, decode_cf=False)
print(' > time.attrs', ds.time.attrs)
print(' > time.encoding', ds.time.encoding)
A few things that I noticed:
One quick solution here is that you could add del dataset['time'].encoding['units'] to the line right after your |
After thinking about this for a bit longer, I think we should be strongly considering dropping source encoding for datasets generated by Other relevant issues: |
Thanks @jhamman for looking into this. I'll try your suggestions |
What happened?
We have been collecting Satellite data and we save each image as one
{time}.zarr.zip
file.We then collate the images using
xr.open_mfdataset
and same them tolarge.zarr.zip
file.When loading this file the timestamps are all the same.
This bug did not appear in
2022.3.0
but it did in2022.6.0
I tried to keep this as minimum as possible, but its a bit of a long example. Hopefully the comments help.
Sorry if this has already been reported, but I could not find it in the
issue
listWhat did you expect to happen?
Expected the time stamps to reflect the data that went in
Minimal Complete Verifiable Example
MVCE confirmation
Relevant log output
Anything else we need to know?
No response
Environment
INSTALLED VERSIONS
commit: None
python: 3.8.2 (default, Jun 8 2021, 11:59:35)
[Clang 12.0.5 (clang-1205.0.22.11)]
python-bits: 64
OS: Darwin
OS-release: 20.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: None
LOCALE: ('en_GB', 'UTF-8')
libhdf5: 1.12.1
libnetcdf: 4.7.4
xarray: 2022.6.0
pandas: 1.4.2
numpy: 1.22.0
scipy: 1.7.3
netCDF4: 1.5.8
pydap: None
h5netcdf: 0.13.1
h5py: 3.6.0
Nio: None
zarr: 2.10.3
cftime: 1.6.0
nc_time_axis: None
PseudoNetCDF: None
rasterio: 1.2.10
cfgrib: 0.9.9.1
iris: None
bottleneck: 1.3.4
dask: 2022.01.0
distributed: None
matplotlib: 3.5.1
cartopy: None
seaborn: None
numbagg: None
fsspec: 2022.11.0
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 57.0.0
pip: 21.1.2
conda: None
pytest: 6.2.5
IPython: 8.0.1
sphinx: None
The text was updated successfully, but these errors were encountered: