[ ] This PR addresses an already opened issue (for bug fixes / features)
This PR fixes #xyz
[x] (If applicable) Documentation has been added / updated (for bug fixes / features).
[x] (If applicable) Tests have been added.
[x] This PR does not seem to break the templates.
[x] HISTORY.rst has been updated (with summary of main changes).
[x] Link to issue (:issue:number) and pull request (:pull:number) has been added.
What kind of change does this PR introduce?
New func xs.io.round_bits to round a floating point variable up to a number of bits, allowing for a much better compression afterwards.
New "bitround" arg to save_to_zarr and save_to_netcdf, allowing to combine the bit rounding and the saving. The argument can take many forms for more flexibility.
Does this PR introduce a breaking change?
No.
Other information:
Default keepbits value is guessed from the variable name, with a default of 12 (0.0122% of rel error). Better guesses should be given in xs.io.KEEPBITS, but I have none for now.
Pull Request Checklist:
number
) and pull request (:pull:number
) has been added.What kind of change does this PR introduce?
xs.io.round_bits
to round a floating point variable up to a number of bits, allowing for a much better compression afterwards.save_to_zarr
andsave_to_netcdf
, allowing to combine the bit rounding and the saving. The argument can take many forms for more flexibility.Does this PR introduce a breaking change?
No.
Other information:
Default keepbits value is guessed from the variable name, with a default of 12 (0.0122% of rel error). Better guesses should be given in
xs.io.KEEPBITS
, but I have none for now.