Allow for option tolerance for SSTs and seaice fractions #823
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.
Runs by @acollow using the CERES SSTs and ice fractions were triggering the protections against FR being less-than-zero or more-than-one.
Further tests confirmed this and by using wide prints it was found that the files seem to have values juuuuust bigger than one:
My guess is these are due to how the files were made/processed values like this snuck in. The "right" thing to do is reprocess the files (in my opinion), but that is a lot of work and if someone has used them, well, we'd change the answers perhaps.
So, in consultation with @sanAkel, this PR adds the ability to "loosen" the restrictions on ice fraction. A new setting,
STRICT_ICE_FRACTION
is added which defaults to.TRUE.
which mirrors the current handling. If you are above 1 or below 0, error out.But, if you set that to
.FALSE.
then it allows for tolerance,ICE_FRACTION_TOLERANCE
which in this PR is defaulted to 0.01. Then any values the code sees from 0.0-TOL to 0.0 are set to 0.0, and anything from 1.0 to 1.0+TOL are set to 1.0.Note that unless you trigger this bug, this is zero-diff.