openradar / xradar

A tool to work in weather radar data in xarray
https://docs.openradarscience.org/projects/xradar
MIT License
97 stars 17 forks source link

ENH: make copy before overwriting, add compression in to_odim #95

Closed kmuehlbauer closed 1 year ago

kmuehlbauer commented 1 year ago

This fixes an issue when writing to_odim if the underlying data array's write flag wasn't set. It also adds the capability to add compression/compression_opts kwargs in the call to to_odim.

The latter makes it very easy and convenient to use the zoo of compressors available to hdf5. Please refer to http://www.silx.org/doc/hdf5plugin/latest/index.html for usage examples.

codecov[bot] commented 1 year ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@a0a419f). Click here to learn what that means. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #95   +/-   ##
=======================================
  Coverage        ?   88.17%           
=======================================
  Files           ?       19           
  Lines           ?     3289           
  Branches        ?        0           
=======================================
  Hits            ?     2900           
  Misses          ?      389           
  Partials        ?        0           
Flag Coverage Δ
unittests 88.17% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
xradar/io/export/odim.py 96.55% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.