-
Notifications
You must be signed in to change notification settings - Fork 0
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
implement zarr3 support for grib #4
Conversation
kerchunk/combine.py
Outdated
@@ -491,9 +494,9 @@ def second_pass(self): | |||
if f"{v}/.zgroup" in fns: | |||
# recurse into groups - copy meta, add to dirs to process and don't look | |||
# for references in this dir | |||
self.out[f"{v}/.zgroup"] = m[f"{v}/.zgroup"] | |||
self.out[f"{v}/.zgroup"] = m.fs.cat(f"{v}/.zgroup") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think that this works with zarr 2
kerchunk/combine.py
Outdated
@@ -443,8 +446,8 @@ def store_coords(self): | |||
logger.debug("Written coordinates") | |||
for fn in [".zgroup", ".zattrs"]: | |||
# top-level group attributes from first input | |||
if fn in m: | |||
self.out[fn] = ujson.dumps(ujson.loads(m[fn])) | |||
if m.fs.exists(fn): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ask the zarr store or dict if this exists rather than hitting the fielsystem directly so it is compatible with zarr python 2
Im going to merge this in and then spec out what needs to be done from there back on the main v3 branch i was working on |
This PR updates serialization logic for zarr3 support, updates relevant API usage in grib2.py and combine.py, and updates tests accordingly.
xarray-datatree
tests have been skipped for now, but a followup PR should re-implement the related behaviors around the new version of xarray which includesxarray.Datatree