Closed zndr27 closed 11 months ago
Hi @zndr27, thanks for raising this issue.
It should be possible to create a zarr store directly using zarr-python, make sure it has a dimension name containing "meta", save it, and open it also using zarr directly. I suspect that if you try that you might find that this is a bug in zarr rather than in xarray.
It would be really helpful if you could try doing that, and either raise an issue on the zarr issue tracker if the bug still exists, or comment again here to say that you still think the problem is with xarray's code.
What happened?
Currently I'm working with xarray for MRSI analysis. I have been using xarray datasets with one the dimensions labeled as "metabolite." Previously I have been able to save and load the data to zarr with no issues using xr.Dataset.to_zarr and xr.open_zarr.
Currently I'm getting an issue where I get an error raised by zarr that complains about this dimension starting with "meta." I think this may be due to a new version of zarr. I have copied the error below.
When I changed the dimension name (i.e. the zarr subfolder and .zmetadata file) from "metabolite" to something that doesn't start with "meta" then I can load the data properly.
Someone may need to modify the xr.Dataset.to_zarr and xr.open_zarr functions in case an xarray user decides to create a dimension that starts with "meta" and wants to save their dataset to zarr.
Please let me know if you need to send any additional info.
What did you expect to happen?
I expected to load an xarray dataset saved by xr.Dataset.to_zarr() using xr.open_zarr(). However, zarr through an error because one of the dimensions (metabolite) started with "meta".
Minimal Complete Verifiable Example
No response
MVCE confirmation
Relevant log output
Anything else we need to know?
No response
Environment