Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect limiter in FULL_DEPTH_KHTR_MIN implementation #318

Merged

Conversation

gustavo-marques
Copy link
Collaborator

@gustavo-marques gustavo-marques commented Oct 25, 2024

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 limit Coef_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.

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)
@gustavo-marques gustavo-marques marked this pull request as draft October 25, 2024 13:38
@gustavo-marques gustavo-marques marked this pull request as ready for review October 27, 2024 17:17
@alperaltuntas alperaltuntas merged commit c9dab57 into NCAR:dev/ncar Oct 31, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MOM_interface PR #190 Broke Dimensional Consistency test
2 participants