pySTEPS / pysteps

Python framework for short-term ensemble prediction systems.
https://pysteps.github.io/
BSD 3-Clause "New" or "Revised" License
441 stars 160 forks source link

Add compression and documentation options to netCDF exporter #352

Closed RubenImhoff closed 4 months ago

RubenImhoff commented 4 months ago

Improvement to netCDF exporter to add optional arguments scale, offset, fill_value and datatype for reduced storage possibilities. In addition, some kwargs are add to make it possible to add documentation or explanatory strings to the netCDF file.

RubenImhoff commented 4 months ago

The failed tests seem to be unrelated to the changes in this PR. It is related to opencv, it seems, does something go wrong with the installation of that in some of the python versions?

dnerini commented 4 months ago

@RubenImhoff just to understand, did you fork this from master or from #351 ?

RubenImhoff commented 4 months ago

This PR is forked from master, indeed (independent from #351)

dnerini commented 4 months ago

it should be fixed on master now, can you merge master into this branch @RubenImhoff to see if now tests pass?

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 83.33%. Comparing base (bdfa575) to head (bc93143).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #352 +/- ## ======================================= Coverage 83.32% 83.33% ======================================= Files 161 161 Lines 12363 12370 +7 ======================================= + Hits 10302 10309 +7 Misses 2061 2061 ``` | [Flag](https://app.codecov.io/gh/pySTEPS/pysteps/pull/352/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pySTEPS) | Coverage Δ | | |---|---|---| | [unit_tests](https://app.codecov.io/gh/pySTEPS/pysteps/pull/352/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pySTEPS) | `83.33% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pySTEPS#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

RubenImhoff commented 4 months ago

Thanks, Daniele! I also added some tests, but couldn't find a way to assert if the passed new arguments also end up in the netCDF. If you know a way, let me know, otherwise this should be good as is.