From 94031154684d593306513e9ec492e945c717589f Mon Sep 17 00:00:00 2001 From: Malte Jansen Date: Thu, 4 Oct 2018 19:57:50 -0500 Subject: [PATCH 1/2] Bug fix to compute Rd_dx whenever MEKE is used The default config of MEKE uses Rd_dx to compute barotropic and bottom energy fractions. If Rd_dx not computed here, it will be set to zero in MEKE and as a result gamma_b=gamma_t=1. --- src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 b/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 index ecc586d025..b9325733e5 100644 --- a/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 +++ b/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 @@ -804,6 +804,7 @@ subroutine VarMix_init(Time, G, param_file, diag, CS) CS%calculate_cg1 = CS%calculate_cg1 .or. use_FGNV_streamfn call get_param(param_file, mdl, "USE_MEKE", use_MEKE, & default=.false., do_not_log=.true.) + CS%calculate_Rd_dx = CS%calculate_Rd_dx .or. use_MEKE CS%calculate_Eady_growth_rate = CS%calculate_Eady_growth_rate .or. use_MEKE call get_param(param_file, mdl, "KHTR_PASSIVITY_COEFF", KhTr_passivity_coeff, & default=0., do_not_log=.true.) From 76f80bc95afb8aeda225435f579fa54267cb4182 Mon Sep 17 00:00:00 2001 From: Alistair Adcroft Date: Fri, 5 Oct 2018 09:13:13 -0400 Subject: [PATCH 2/2] Removed trailing white space --- src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 b/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 index b9325733e5..4f7126b4bd 100644 --- a/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 +++ b/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 @@ -804,7 +804,7 @@ subroutine VarMix_init(Time, G, param_file, diag, CS) CS%calculate_cg1 = CS%calculate_cg1 .or. use_FGNV_streamfn call get_param(param_file, mdl, "USE_MEKE", use_MEKE, & default=.false., do_not_log=.true.) - CS%calculate_Rd_dx = CS%calculate_Rd_dx .or. use_MEKE + CS%calculate_Rd_dx = CS%calculate_Rd_dx .or. use_MEKE CS%calculate_Eady_growth_rate = CS%calculate_Eady_growth_rate .or. use_MEKE call get_param(param_file, mdl, "KHTR_PASSIVITY_COEFF", KhTr_passivity_coeff, & default=0., do_not_log=.true.)