Skip to content

Commit 665c760

Browse files
herrwang0Hallberg-NOAA
authored andcommitted
Flip the order of acceleration and velocity chksum
In MOM_dynamics_split_RK2, now accleration chksum is printed before velocity with debug on, so that we could know which accleration term is responsible for a NaN in velocity.
1 parent e8f5fa6 commit 665c760

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

src/core/MOM_dynamics_split_RK2.F90

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -707,13 +707,13 @@ subroutine step_MOM_dyn_split_RK2(u_inst, v_inst, h, tv, visc, Time_local, dt, f
707707
call cpu_clock_end(id_clock_mom_update)
708708

709709
if (CS%debug) then
710+
call MOM_accel_chksum("Predictor accel", CS%CAu_pred, CS%CAv_pred, CS%PFu, CS%PFv, &
711+
CS%diffu, CS%diffv, G, GV, US, CS%pbce, CS%u_accel_bt, CS%v_accel_bt, symmetric=sym)
710712
call uvchksum("Predictor 1 [uv]", up, vp, G%HI, haloshift=0, symmetric=sym, unscale=US%L_T_to_m_s)
711713
call hchksum(h, "Predictor 1 h", G%HI, haloshift=1, unscale=GV%H_to_MKS)
712714
call uvchksum("Predictor 1 [uv]h", uh, vh, G%HI,haloshift=2, &
713715
symmetric=sym, unscale=GV%H_to_MKS*US%L_to_m**2*US%s_to_T)
714-
! call MOM_state_chksum("Predictor 1", up, vp, h, uh, vh, G, GV, US, haloshift=1)
715-
call MOM_accel_chksum("Predictor accel", CS%CAu_pred, CS%CAv_pred, CS%PFu, CS%PFv, &
716-
CS%diffu, CS%diffv, G, GV, US, CS%pbce, CS%u_accel_bt, CS%v_accel_bt, symmetric=sym)
716+
! call MOM_state_chksum("Predictor 1", up, vp, h, uh, vh, G, GV, US, haloshift=1)
717717
call MOM_state_chksum("Predictor 1 init", u_inst, v_inst, h, uh, vh, G, GV, US, haloshift=1, &
718718
symmetric=sym)
719719
if (debug_redundant) then
@@ -976,14 +976,15 @@ subroutine step_MOM_dyn_split_RK2(u_inst, v_inst, h, tv, visc, Time_local, dt, f
976976
call cpu_clock_end(id_clock_mom_update)
977977

978978
if (CS%debug) then
979+
call MOM_accel_chksum("Corrector accel", CS%CAu, CS%CAv, CS%PFu, CS%PFv, &
980+
CS%diffu, CS%diffv, G, GV, US, CS%pbce, CS%u_accel_bt, CS%v_accel_bt, &
981+
symmetric=sym)
979982
call uvchksum("Corrector 1 [uv]", u_inst, v_inst, G%HI, haloshift=0, symmetric=sym, unscale=US%L_T_to_m_s)
980983
call hchksum(h, "Corrector 1 h", G%HI, haloshift=1, unscale=GV%H_to_MKS)
981984
call uvchksum("Corrector 1 [uv]h", uh, vh, G%HI, haloshift=2, &
982985
symmetric=sym, unscale=GV%H_to_MKS*US%L_to_m**2*US%s_to_T)
983-
! call MOM_state_chksum("Corrector 1", u_inst, v_inst, h, uh, vh, G, GV, US, haloshift=1)
984-
call MOM_accel_chksum("Corrector accel", CS%CAu, CS%CAv, CS%PFu, CS%PFv, &
985-
CS%diffu, CS%diffv, G, GV, US, CS%pbce, CS%u_accel_bt, CS%v_accel_bt, &
986-
symmetric=sym)
986+
! call MOM_state_chksum("Corrector 1", u_inst, v_inst, h, uh, vh, G, GV, US, haloshift=1)
987+
987988
endif
988989

989990
! u <- u + dt d/dz visc d/dz u

0 commit comments

Comments
 (0)