Gate zonal_anomaly on the coverage of its own answer - #121
Merged
Conversation
A band mean is undefined as soon as one face in the band is missing, and every
face in that band then comes back NaN -- including faces that carried a value.
Measured on a 90-face regional mesh, one missing value per latitude band
emptied all 90 faces while 85 of them held data, and the result was
outcome: complete, status: complete, no warning codes, and stats of
{min: null, max: null, mean: null, std: null}. The partial case was quieter:
30 faces with data, 18 anomalies returned, 12 measurable faces dropped, and
finite min/max/mean/std computed from the survivors.
The bin coverage added for calculate_zonal_mean does not apply here, because
zonal_anomaly returns a per-face field and there are no bins in it to count.
Results now carry anomaly_coverage, zero coverage fails
anomaly_coverage_nonzero and returns no number, and the partial code fires on
faces that lost an anomaly rather than on faces that never had data -- so an
ordinary land-masked field does not warn on every call. The repair names the
missing values rather than lat_spec when faces did carry data, since no choice
of bands can avoid a gap that is in every band.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A band mean is undefined as soon as one face in the band is missing, so every face in that band comes back NaN including faces that carried a value; measured on a 90-face mesh, one gap per latitude band emptied all 90 faces while 85 held data, and the result was
outcome: completewith no warning andstatsof all nulls. Results now carryanomaly_coverage, zero coverage refuses with no number, andANOMALY_COVERAGE_PARTIALfires on faces that lost an anomaly rather than on faces that never had data, so a land-masked field does not warn on every call. 17 new tests; full suite 821 passed, 18 skipped; pre-commit green.