-
-
Notifications
You must be signed in to change notification settings - Fork 329
Unable to open zarr group created using xarray without consolidated metadata. #2984
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
Comments
Is |
Apologies, should have been clearer on this! It's a HTTP url (e.g., "https://noc-msm-o.s3-ext.jc.rl.ac.uk/test/eorca1"). The workaround I mentioned uses an S3 url with the above endpoint url specified in |
Opening a Zarr group over http will never work without consolidated metadata because the http protocol does not have the concept of directory listing (like S3 does). This is not a bug. (However, we could consider delivering a more useful error message rather than just returning an empty group.) |
Thanks for the clarification @rabernat, that's a complete oversight on my part! |
Is that still blocked on earth-mover/icechunk#743? |
Sadly, the issue is still ongoing. I've followed up several times with JASMIN, but adding support for conditional put operations still remains with the vendor. Thanks again for all your help on this - I'm hoping we'll get there soon! |
Zarr version
v3.0.6
Numcodecs version
v0.15.1
Python Version
3.12.7
Operating System
Linux
Installation
using pip into a virtual environment
Description
Following xarray issue #10209:
After successfully creating a zarr v3 store without consolidated metadata in an s3 compatible object store, using the
zarr.open_group(url, mode='r', zarr_format=3, use_consolidated=False)
returns an empty group. This error propagates into the xarray library, meaning that usingxr.open_zarr(url, zarr_format=3, consolidated=False)
with a read-only access s3 url returns an empty dataset due to callingzarr.open_group()
internally.My current work-around is to pass
storage_options
as follows:Note, this error does not occur when creating a zarr v3 store with consolidated metadata (although I'm conscious this is no longer included in the zarr v3 spec) by passing
consolidated=None
to xarray's.to_zarr()
function. In this case, our end-users can simply access the group as a Dataset usingxr.open_zarr(url, zarr_format=3, consolidated=True)
as expected.Thanks in advance for your help!
Steps to reproduce
Create a zarr v3 store without consolidated metadata using xarray [v2025.3.1]:
Open the zarr group created at
url
(in our case this allows public read-only access) using zarr or equivalently usingxr.open_zarr()
:Returns:
()
Additional output
No response
The text was updated successfully, but these errors were encountered: