-
Notifications
You must be signed in to change notification settings - Fork 54
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
[Draft - WIP] Updates to Zarr V3 #788
base: main
Are you sure you want to change the base?
Conversation
WIP note: @keewis and I pushed on this. We're close, but currently blocked by: |
it looks like I've tried using pangeo-forge-recipes/tests/conftest.py Lines 526 to 528 in 76e2a5b
becomes: fs = fsspec.filesystem("file", auto_mkdir=True)
async_fs = AsyncFileSystemWrapper(fs)
...
FSSpecTarget(async_fs, path) Edit: looks like setting
|
Went down the exact same rabbit hole! |
I'm pretty close now, I think: only this weird encoding issue left (see the last edit to #788 (comment)) Edit: as far as I can tell, this comes from somewhere within |
I can reproduce the weird encoding with: import xarray as xr
import zarr
import fsspec
import numpy as np
from fsspec.implementations.asyn_wrapper import AsyncFileSystemWrapper
fs = fsspec.filesystem("file", auto_mkdir=True)
async_fs = AsyncFileSystemWrapper(fs)
ds = xr.Dataset(
coords={"lon": ("lon", [0.0, 1.1], {}, {"_FillValue": np.float64(np.nan)})}
)
store = zarr.storage.FsspecStore(fs=async_fs, path="store.zarr", read_only=False)
ds.to_zarr(store, mode="w", compute=False, encoding={}, consolidated=False)
zgroup = zarr.open_group(store)
print(dict(zgroup["lon"].attrs)) there's also a lot of warnings similar to:
So the question is: how is |
it looks like the the source of the encoding value is
|
Branch to update pangeo-forge-recipes to Zarr v3.
zarr.storage.FSStore
->zarr.storage.FSSpecStore
)cc @keewis