Skip to content

Commit 090254e

Browse files
brandon.reichladcroft
authored andcommitted
Replace hard-coded parameter Rrho0 with runtime parameter Max_Rrho_salt_fingers
- Double diffusion code was updated to include runtime parameter for maximum density ratio, but it was never implemented in the actual calculation of the double diffusion diffusivities. It is now used in the calculation and Rrho0 is removed from the code. - The default value of Max_Rrho_salt_fingers is changed from 2.55 to 1.9 to avoid changing behavior from the old code. However, it should be updated to 2.55 and noted that it will change answers for any run with double diffusion enabled through MOM6. It does not affect the behavior of double diffusion enabled through CVMix.
1 parent dbb3601 commit 090254e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/parameterizations/vertical/MOM_set_diffusivity.F90

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,7 @@ end subroutine find_N2
12031203

12041204
!> This subroutine sets the additional diffusivities of temperature and
12051205
!! salinity due to double diffusion, using the same functional form as is
1206-
!! used in MOM4.1, and taken from an NCAR technical note (REF?) that updates
1206+
!! used in MOM4.1, and taken from the appendix of Danabasoglu et al. (2006), which updates
12071207
!! what was in Large et al. (1994). All the coefficients here should probably
12081208
!! be made run-time variables rather than hard-coded constants.
12091209
!!
@@ -1246,8 +1246,6 @@ subroutine double_diffusion(tv, h, T_f, S_f, j, G, GV, US, CS, Kd_T_dd, Kd_S_dd)
12461246
real :: Kd_dd ! The dominant double diffusive diffusivity [H Z T-1 ~> m2 s-1 or kg m-1 s-1]
12471247
real :: prandtl ! flux ratio for diffusive convection regime [nondim]
12481248

1249-
real, parameter :: Rrho0 = 1.9 ! limit for double-diffusive density ratio [nondim]
1250-
12511249
integer, dimension(2) :: EOSdom ! The i-computational domain for the equation of state
12521250
integer :: i, k, is, ie, nz
12531251
is = G%isc ; ie = G%iec ; nz = GV%ke
@@ -1273,8 +1271,8 @@ subroutine double_diffusion(tv, h, T_f, S_f, j, G, GV, US, CS, Kd_T_dd, Kd_S_dd)
12731271
beta_dS = dRho_dS(i) * (S_f(i,j,k-1) - S_f(i,j,k))
12741272

12751273
if ((alpha_dT > beta_dS) .and. (beta_dS > 0.0)) then ! salt finger case
1276-
Rrho = min(alpha_dT / beta_dS, Rrho0)
1277-
diff_dd = 1.0 - ((RRho-1.0)/(RRho0-1.0))
1274+
Rrho = min(alpha_dT / beta_dS, CS%Max_Rrho_salt_fingers)
1275+
diff_dd = 1.0 - ((RRho-1.0)/(CS%Max_Rrho_salt_fingers-1.0))
12781276
Kd_dd = CS%Max_salt_diff_salt_fingers * diff_dd*diff_dd*diff_dd
12791277
Kd_T_dd(i,K) = 0.7 * Kd_dd
12801278
Kd_S_dd(i,K) = Kd_dd
@@ -2541,7 +2539,7 @@ subroutine set_diffusivity_init(Time, G, GV, US, param_file, diag, CS, int_tide_
25412539
if (CS%double_diffusion) then
25422540
call get_param(param_file, mdl, "MAX_RRHO_SALT_FINGERS", CS%Max_Rrho_salt_fingers, &
25432541
"Maximum density ratio for salt fingering regime.", &
2544-
default=2.55, units="nondim")
2542+
default=1.9, units="nondim")
25452543
call get_param(param_file, mdl, "MAX_SALT_DIFF_SALT_FINGERS", CS%Max_salt_diff_salt_fingers, &
25462544
"Maximum salt diffusivity for salt fingering regime.", &
25472545
default=1.e-4, units="m2 s-1", scale=GV%m2_s_to_HZ_T)

0 commit comments

Comments
 (0)