-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fix 139 #140
Fix 139 #140
Conversation
A simple combination of the original encoding and output encoding does not work: https://github.com/observingClouds/xbitinfo/actions/runs/3170048268/jobs/5162370558#step:8:790 |
The easiest fix for now would be to copy all |
@aaronspring what do you think of this fix? I'm basically calling some xarray backend function for netCDF4 and zarr that ensure that unsupported encodings are dropped before calling the respective library. As a consequence we can just merge the original encoding with xbitinfo/xbitinfo/save_compressed.py Line 50 in 4865978
It's not nice to call a backend function, however this is meant to be only a temporary solution until pydata/xarray#7129 and pydata/xarray#7127 are fixed. |
I like it. Does this mean that to_compressed_netcdf only works for netcdf4? Should we make it work also for other engines or would we need to rework xr.to_netcdf? |
Good point @aaronspring . I think it should also work with other engines, but might drop a few extra encodings that are not allowed for the |
I decided to make |
this is a temporary restiction to ensure only correct encoding for the output is used. Related: pydata/xarray#7127
2b28eee
to
453d259
Compare
fixes #139