metoppv / improver

IMPROVER is a library of algorithms for meteorological post-processing.
http://improver.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
101 stars 84 forks source link

Bias correction fix #1969

Closed benowen-bom closed 7 months ago

benowen-bom commented 8 months ago

Addresses #1968.

This PR updates the way masks are inherited from the forecast and truth cubes to the forecast_error. Rather than happening implicitly (as is currently the case), the propagation of masks is now performed explicitly.

Unit and acceptance tests were also updated to considered masked data (for both forecast and truth) to ensure the masks are passed on as expected.

The updated acceptance test data is included in https://github.com/metoppv/improver_test_data/pull/36.

Testing:

codecov[bot] commented 8 months ago

Codecov Report

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

Comparison is base (3eee0a9) 98.40% compared to head (1b5c73c) 98.40%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1969 +/- ## ======================================= Coverage 98.40% 98.40% ======================================= Files 124 124 Lines 12028 12030 +2 ======================================= + Hits 11836 11838 +2 Misses 192 192 ```

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

benowen-bom commented 7 months ago

Thanks @benowen-bom this addresses #1968. The addition of tests checking for masked arrays vs non-masked arrays is good. I have checked that the acceptance tests pass locally. I understand that @bomRob has run a suite on a workstation to check that the results are as expected.

Thanks @dmentipl for the review!