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
Drop default compression in CF Writer #2390
Conversation
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.
Can't say I'm happy with the amount of version checks needed but that's not your/our fault. Too bad it isn't easier.
Thanks for fixing this up. I had a couple comments, but otherwise looks pretty good.
Codecov Report
@@ Coverage Diff @@
## main #2390 +/- ##
==========================================
+ Coverage 94.71% 94.73% +0.02%
==========================================
Files 329 329
Lines 48739 48790 +51
==========================================
+ Hits 46161 46223 +62
+ Misses 2578 2567 -11
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
LGTM
Drop default compression in CF Writer and delegate this to the user (via encoding keyword argument or dataset attribute). This closes #2244. Also, update documentation to use the new
compression
keyword instead ofzlib
, which closes #2386 .I played around a bit with different combinations of backend versions (netCDF4, libnetcdf, xarray) and noticed that the keyword choice also depends on the underlying libnetcdf. If
libnetcdf<4.9.0
onlyzlib
works andcompression
is silently ignored. This is the case in our CI environment whereeccodes
currently requireslibnetcdf-4.8
.In order to make users aware of that, I added a little section in the documentation and issued a user warning if the backend versions don't match.
Waiting for #2391 to fix flake8 errors.