Skip to content
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

Inlined CF time variables fail round tripping when compressed. #280

Open
sharkinsspatial opened this issue Oct 29, 2024 · 0 comments
Open

Comments

@sharkinsspatial
Copy link
Collaborator

I initially noted this issue in #87 but after a bit of investigation I realized it is affecting the basic kerchunk based HDF reader in main as well.

The problem

When a CF time encoded variable is written to an HDF file with compression (zlib in this case) and then opened via open_virtual_dataset with decode_times=True and serialized to kerchunk something is happening within the encoding process for "inlining" the CF time encoded variable that causes round trip comparisons to fail. This can be reproduced using this failing test 68f4426.

Cause?

I've poked around at this a bit but I'm not sure at which stage this problem is being introduced. Is something going awry with CFDateTimCoder with compressed data? Or is there a stray attr which is causing xarray to incorrectly decode the inlined byte data 🤔 . Hopefully someone with a bit more xarray-fu might have insights here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant