From e3d84c036e6708ac73a7d64a26f6722083987f4c Mon Sep 17 00:00:00 2001 From: Robert Hallberg Date: Mon, 8 Jun 2020 18:03:14 -0400 Subject: [PATCH] *Corrected two bugs impacting .testing test cases Corrected the velocities that are used in the call to set_viscous_ML with SPLIT=False and USE_RK2=True. This call had used the partially updated predictor velocities, which included other accelerations but not viscosity and which was missing a halo update, so it would not reproduce between symmetric and non-symmetric modes or across PE counts. This combination of parameters is not used in the MOM6-examples test suite, but it does change answers in some of the test cases in .testing. Also removed CORRECT_DENSITY=False from tc4/MOM_input, so that this test will not fail after this parameter is obsoleted. All answers and output in the MOM6-examples test suite are bitwise identical, but there are deliberate changes in the answers in the .testing test cases. --- .testing/tc4/MOM_input | 3 --- src/core/MOM_dynamics_unsplit_RK2.F90 | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.testing/tc4/MOM_input b/.testing/tc4/MOM_input index 2b08e9bccb..4c17e6f70a 100644 --- a/.testing/tc4/MOM_input +++ b/.testing/tc4/MOM_input @@ -320,9 +320,6 @@ DTBT = 10.0 ! [s or nondim] default = -0.98 ! Parameterization of enhanced mixing due to convection via CVMix ! === module MOM_entrain_diffusive === -CORRECT_DENSITY = False ! [Boolean] default = True - ! If true, and USE_EOS is true, the layer densities are restored toward their - ! target values by the diapycnal mixing, as described in Hallberg (MWR, 2000). ! === module MOM_set_diffusivity === BBL_EFFIC = 0.0 ! [nondim] default = 0.2 diff --git a/src/core/MOM_dynamics_unsplit_RK2.F90 b/src/core/MOM_dynamics_unsplit_RK2.F90 index e3ec48ff58..d6a4f9a274 100644 --- a/src/core/MOM_dynamics_unsplit_RK2.F90 +++ b/src/core/MOM_dynamics_unsplit_RK2.F90 @@ -340,7 +340,7 @@ subroutine step_MOM_dyn_unsplit_RK2(u_in, v_in, h_in, tv, visc, Time_local, dt, call cpu_clock_begin(id_clock_vertvisc) call enable_averages(dt, Time_local, CS%diag) dt_visc = dt_pred ; if (CS%use_correct_dt_visc) dt_visc = dt - call set_viscous_ML(up, vp, h_av, tv, forces, visc, dt_visc, G, GV, US, CS%set_visc_CSp) + call set_viscous_ML(u_in, v_in, h_av, tv, forces, visc, dt_visc, G, GV, US, CS%set_visc_CSp) call disable_averaging(CS%diag) call vertvisc_coef(up, vp, h_av, forces, visc, dt_pred, G, GV, US, CS%vertvisc_CSp, CS%OBC)