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

SET_DTBT using wrong face area #660

Open
herrwang0 opened this issue May 30, 2024 · 1 comment
Open

SET_DTBT using wrong face area #660

herrwang0 opened this issue May 30, 2024 · 1 comment

Comments

@herrwang0
Copy link

herrwang0 commented May 30, 2024

Background

Subroutine set_dtbt() is used to estimate barotropic time step size. The subroutine is called in

In the subroutine, there are currently three options in calculating/estimating face area

  1. With optional input argument BT_cont
  2. With optional input argument eta, passing to subroutine find_face_areas()
  3. With optional input argument add_SSH, passing to subroutine find_face_areas()

And all of them seem to have an issue.

Issues

1. BT_cont

For reasons unknown, BT_cont option is never used in this subroutine.

2. eta

Instead, eta is used in recalculating dtbt. The problem is that eta is almost never used because of this buggy block (NONLINEAR_BT_CONTINUITY is by default False and not used with USE_BT_CONT_TYPE):

if (use_BT_cont) then
call BT_cont_to_face_areas(BT_cont, Datu, Datv, G, US, MS, halo=0)
elseif (CS%Nonlinear_continuity .and. present(eta)) then
call find_face_areas(Datu, Datv, G, GV, US, CS, MS, 0, eta=eta)
else
call find_face_areas(Datu, Datv, G, GV, US, CS, MS, 0, add_max=add_SSH)
endif

3. add_SSH

The bug in the if-block above effectively let the model use zero sea surface height (add_SSH is zero by default) to calculate face area, which may underestimate gravity wave speed.

Moreover, without eta, subroutine find_face_areas() will use (Z_ref-bathymetry) to estimate thickness. This does not apply to cases like the Great Lakes, where 1) Within the domain, the reference height is spatially varying 2) portions of the water bodies are above the sea level reference height . (and runtime parameter SSH_EXTRA, which is currently only used to estimate an upper bound of eta during initialization would not help.)

Solutions

  1. Use BT_cont when possible
  2. Fix the if-block bug related to eta
  3. *Make Z_ref a 2D field, rather than a scalar. I put an asterisk because the scalar should be fine for most cases, even with spatially varying reference heights. But I wonder if something weird may come up with OBCs...

The fixes may make the model slower with shorter dtbt.

@herrwang0 herrwang0 changed the title SET_DTBT is underestimating gravity wave speed SET_DTBT using wrong face area May 30, 2024
@Hallberg-NOAA
Copy link
Member

After looking through the logic of when dtbt is being used and reset, I think that we can safely add the option to use BT_cont in the call to set_dtbt() inside of step_MOM_dyn_split_RK2, because the inconsistently value that is set in barotropic_init() is never actually used when set_dtbt() is called from step_MOM_dyn_split_RK2. Doing so should go a long way toward addressing this issue.

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

No branches or pull requests

2 participants