Replies: 1 comment
-
The data actually has So changing to
Alternative way fs = fsspec.filesystem("reference", fo=d)
z = zarr.open(fs.get_mapper())
z.time[:] # original float value
z.time[:] += 3 # edit as required
fs.references["time/0"] # sets value as bytes
fs.save_json("out.json") # encodes as base64 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've generated a dict of references for a NetCDF file, and I'd like to modify an encoded time value in the dict.
I generated the dict thusly:
which encodes the time value 112748.0 as
I want to specify the time value as 112751.0 (e.g. 3 hours later in this case), but I'm struggling with how to encode a floating point number the same way kerchunk is currently doing it.
As a test, I tried to replace the time value 112748.0 with the same value, expecting to get the same encoding.
returns
Clearly my string does not match the string kerchunk generated.
What am I doing wrong?
Note: I determined the time value was 112748.0 by running this code:
which produces:
Beta Was this translation helpful? Give feedback.
All reactions