Fix incorrect limiter in FULL_DEPTH_KHTR_MIN implementation#318
Merged
alperaltuntas merged 1 commit intoOct 31, 2024
Merged
Conversation
The initial implementation of FULL_DEPTH_KHTR_MIN was incorrect. CS%KhTr_min [L2 T-1] was used to limit Coef_y/Coef_x [L2 or H L2] and this was wrong. 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)
alperaltuntas
approved these changes
Oct 31, 2024
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.
The initial implementation of
FULL_DEPTH_KHTR_MINwas 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_momtests.