Skip to content

Fix incorrect limiter in FULL_DEPTH_KHTR_MIN implementation#318

Merged
alperaltuntas merged 1 commit into
NCAR:dev/ncarfrom
gustavo-marques:fix_FULL_DEPTH_KHTR_MIN
Oct 31, 2024
Merged

Fix incorrect limiter in FULL_DEPTH_KHTR_MIN implementation#318
alperaltuntas merged 1 commit into
NCAR:dev/ncarfrom
gustavo-marques:fix_FULL_DEPTH_KHTR_MIN

Conversation

@gustavo-marques
Copy link
Copy Markdown
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
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