Loosen tolerance on near-zero truncation of h2osoi_ice and h2osoi_liq #1980
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.
Description of changes
In UpdateState_TopLayerFluxes, there is a somewhat arbitrary epsilon used to determine if h2osoi_ice and h2osoi_liq are close enough to zero that they should be truncated to zero. If the state remains negative after this truncation, we deem this to be a problem. It seems that this tolerance is occasionally exceeded, leading runs to abort. Since this tolerance is somewhat arbitrary, we will loosen it by an order of magnitude.
Note that, although the issue was only reported for h2osoi_ice, I am changing the tolerance for both liq and ice so they remain consistent.
Specific notes
Contributors other than yourself, if any: @olyson
CTSM Issues Fixed (include github issue #):
Resolves #1979
Are answers expected to change (and if so in what way)?
Yes, possible small answer changes due to the possibility that slightly non-zero states are now truncated to exactly zero.
Any User Interface Changes (namelist or namelist defaults changes)? No
Testing performed, if any: None yet