Closed QLmount-snow closed 3 weeks ago
Thanks for opening your first issue here at xarray! Be sure to follow the issue template! If you have an idea for a solution, we would really welcome a Pull Request with proposed changes. See the Contributing Guide for more. It may take us a while to respond here, but we really value your contribution. Contributors like you help make xarray better. Thank you!
If your zarr store has two arrays in the same group that have the same dimension name but different lengths along that dimension, then you cannot read that group with Xarray unfortunately. This is because zarr 's data model is slightly more general than Xarray 's data model.
If your zarr store has two arrays in the same group that have the same dimension name but different lengths along that dimension, then you cannot read that group with Xarray unfortunately. This is because zarr 's data model is slightly more general than Xarray 's data model.
@TomNicholas Thank for your answer, I try it by dropping other variables. But I think if there is a select-variables parameter in the function to do this, it will be much useful.
What is your issue?
Here is my test code:
the zarr tree like this: / ├── APCP_surface (121, 257, 257) float32 ├── APTMP_2maboveground (122, 257, 257) float32 ├── DPT_2maboveground (122, 257, 257) float32 ├── DSWRF_surface (121, 257, 257) float32 ├── GUST_surface (122, 257, 257) float32 ├── HGT_1000mb (123, 257, 257) float32 ├── HGT_500mb (123, 257, 257) float32 ├── HGT_600mb (123, 257, 257) float32 ├── HGT_700mb (123, 257, 257) float32 ...... ├── latitude (257,) float64 ├── longitude (257,) float64 └── time (123,) float64 And I got an error from ds = xr.open_zarr(d): .... ValueError: conflicting sizes for dimension 'time': length 122 on 'APTMP_2maboveground' and length 121 on {'time': 'APCP_surface', 'latitude': 'APCP_surface', 'longitude': 'APCP_surface'} Then I don't kown how to read the zarr with such a structure (not the same dim length). Please tell me how to read the zarr into xarray.