ioos / ioos_qc

:ballot_box_with_check: :ocean: IOOS QARTOD and other Quality Control tests implemented in Python
https://ioos.github.io/ioos_qc/
Apache License 2.0
46 stars 27 forks source link

Climatology updates: bugfixes, add fspan parameter #28

Closed sgfoote closed 4 years ago

sgfoote commented 4 years ago

Replace zipn.any() call with zinp.count() when checking for non-masked depth inputs because zinp.any() will give a false negative for an array where all (non-masked) depths are zero.

Make the checks on the time and depth ranges include the minimum of each members configured range. Previously the maximum was included (<=) but the minimum was excluded (>). To be consistent with the handling of vspan, include both endpoints. (The QARTOD manuals indicate the endpoints are included for vspan.)

Add a fspan parameter to the configuration. Most of the relevant QARTOD manuals specify a climatology test that does not have a fail span, but the Ocean Optics Data QARTOD manual specifies a climatology test with both a valid span and a fail span. To handle this case, the climatology code should support an optional fail span (fspan).

jessicaaustin commented 4 years ago

Thanks Seth! Will review this week.

jessicaaustin commented 4 years ago

I checked and this does not seem to affect the climatology results in QartodPerformanceTest

jessicaaustin commented 4 years ago

This looks good to me. The bug fixes and and fspan addition are straightforward, and you wrote tests to cover everything. Overall great submission. Thank you!

I'll give @kwilcox some more time to review if he wants, otherwise I'll merge EOD friday.