Fix incorrect limiter in FULL_DEPTH_KHTR_MIN implementation #318
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.
The initial implementation of
FULL_DEPTH_KHTR_MIN
was incorrect, as revealed by the CESM dimensional consistency tests.KhTr_min
[L2 T-1] was used to limitCoef_y
/Coef_x
[L2 or H L2]. Here is the (wrong) example at v-points:Coef_y = max(Coef_y, KhTr_min)
This patch fixes this bug by introducing a local limiting value for Coef_x and Coef_y,
Coef_min
[L2 or H L2]:Coef_min = I_numitts * dt * (KhTr_min*(dx_Cv*IdyCv))
The correct limit is then:
Coef_y = max(Coef_y, Coef_min)
Thanks to @alperaltuntas and @iangrooms for helping to find and correct this bug.
Fixes #302
Passing
pr_mom
tests.