Skip to content

Commit

Permalink
Merge pull request #7 from alperaltuntas/pr1491_fixes
Browse files Browse the repository at this point in the history
Pr1491 fixes
  • Loading branch information
gustavo-marques authored Sep 2, 2021
2 parents 91ab1e5 + 5f8c446 commit dc6f129
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 12 deletions.
15 changes: 11 additions & 4 deletions src/parameterizations/vertical/MOM_CVMix_KPP.F90
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,14 @@ logical function KPP_init(paramFile, G, GV, US, diag, Time, CS, passive, Waves)
"Unrecognized KPP_LT_K_SHAPE option: "//trim(string))
end select
call get_param(paramFile, mdl, "KPP_LT_K_METHOD", string , &
'Method to enhance mixing coefficient in KPP. '// &
'Method to enhance mixing coefficient in KPP. '// &
'Valid options are: \n'// &
'\t CONSTANT = Constant value (KPP_K_ENH_FAC) \n'// &
'\t VR12 = Function of Langmuir number based on VR12\n'// &
'\t RW16 = Function of Langmuir number based on RW16', &
'\t (Van Roekel et al. 2012)\n'// &
'\t (Li et al. 2016, OM) \n'// &
'\t RW16 = Function of Langmuir number based on RW16\n'// &
'\t (Reichl et al., 2016, JPO)', &
default='CONSTANT')
select case ( trim(string))
case ("CONSTANT")
Expand Down Expand Up @@ -443,12 +446,16 @@ logical function KPP_init(paramFile, G, GV, US, diag, Time, CS, passive, Waves)
'in Bulk Richardson Number.', units="", Default=.false.)
if (CS%LT_Vt2_Enhancement) then
call get_param(paramFile, mdl, "KPP_LT_VT2_METHOD",string , &
'Method to enhance Vt2 in KPP. '// &
'Method to enhance Vt2 in KPP. '// &
'Valid options are: \n'// &
'\t CONSTANT = Constant value (KPP_VT2_ENH_FAC) \n'// &
'\t VR12 = Function of Langmuir number based on VR12\n'// &
'\t (Van Roekel et al., 2012) \n'// &
'\t (Li et al. 2016, OM) \n'// &
'\t RW16 = Function of Langmuir number based on RW16\n'// &
'\t LF17 = Function of Langmuir number based on LF17', &
'\t (Reichl et al., 2016, JPO) \n'// &
'\t LF17 = Function of Langmuir number based on LF17\n'// &
'\t (Li and Fox-Kemper, 2017, JPO)', &
default='CONSTANT')
select case ( trim(string))
case ("CONSTANT")
Expand Down
32 changes: 24 additions & 8 deletions src/parameterizations/vertical/MOM_diabatic_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -628,11 +628,19 @@ subroutine diabatic_ALE_legacy(u, v, h, tv, Hml, fluxes, visc, ADp, CDp, dt, Tim
CS%KPP_buoy_flux, CS%KPP_temp_flux, CS%KPP_salt_flux)
! The KPP scheme calculates boundary layer diffusivities and non-local transport.

call KPP_compute_BLD(CS%KPP_CSp, G, GV, US, h, tv%T, tv%S, u, v, tv, &
fluxes%ustar, CS%KPP_buoy_flux, Waves=Waves)
if ( associated(fluxes%lamult) ) then
call KPP_compute_BLD(CS%KPP_CSp, G, GV, US, h, tv%T, tv%S, u, v, tv, &
fluxes%ustar, CS%KPP_buoy_flux, Waves=Waves, lamult=fluxes%lamult)

call KPP_calculate(CS%KPP_CSp, G, GV, US, h, fluxes%ustar, CS%KPP_buoy_flux, Kd_heat, &
Kd_salt, visc%Kv_shear, CS%KPP_NLTheat, CS%KPP_NLTscalar, Waves=Waves)
call KPP_calculate(CS%KPP_CSp, G, GV, US, h, fluxes%ustar, CS%KPP_buoy_flux, Kd_heat, &
Kd_salt, visc%Kv_shear, CS%KPP_NLTheat, CS%KPP_NLTscalar, Waves=Waves, lamult=fluxes%lamult)
else
call KPP_compute_BLD(CS%KPP_CSp, G, GV, US, h, tv%T, tv%S, u, v, tv, &
fluxes%ustar, CS%KPP_buoy_flux, Waves=Waves)

call KPP_calculate(CS%KPP_CSp, G, GV, US, h, fluxes%ustar, CS%KPP_buoy_flux, Kd_heat, &
Kd_salt, visc%Kv_shear, CS%KPP_NLTheat, CS%KPP_NLTscalar, Waves=Waves)
endif

if (associated(Hml)) then
call KPP_get_BLD(CS%KPP_CSp, Hml(:,:), G, US)
Expand Down Expand Up @@ -1802,11 +1810,19 @@ subroutine layered_diabatic(u, v, h, tv, Hml, fluxes, visc, ADp, CDp, dt, Time_e
enddo ; enddo ; enddo
endif

call KPP_compute_BLD(CS%KPP_CSp, G, GV, US, h, tv%T, tv%S, u, v, tv, &
fluxes%ustar, CS%KPP_buoy_flux, Waves=Waves)
if ( associated(fluxes%lamult) ) then
call KPP_compute_BLD(CS%KPP_CSp, G, GV, US, h, tv%T, tv%S, u, v, tv, &
fluxes%ustar, CS%KPP_buoy_flux, Waves=Waves, lamult=fluxes%lamult)

call KPP_calculate(CS%KPP_CSp, G, GV, US, h, fluxes%ustar, CS%KPP_buoy_flux, Kd_heat, &
Kd_salt, visc%Kv_shear, CS%KPP_NLTheat, CS%KPP_NLTscalar, Waves=Waves, lamult=fluxes%lamult)
else
call KPP_compute_BLD(CS%KPP_CSp, G, GV, US, h, tv%T, tv%S, u, v, tv, &
fluxes%ustar, CS%KPP_buoy_flux, Waves=Waves)

call KPP_calculate(CS%KPP_CSp, G, GV, US, h, fluxes%ustar, CS%KPP_buoy_flux, Kd_heat, &
Kd_salt, visc%Kv_shear, CS%KPP_NLTheat, CS%KPP_NLTscalar, Waves=Waves)
call KPP_calculate(CS%KPP_CSp, G, GV, US, h, fluxes%ustar, CS%KPP_buoy_flux, Kd_heat, &
Kd_salt, visc%Kv_shear, CS%KPP_NLTheat, CS%KPP_NLTscalar, Waves=Waves)
endif

if (associated(Hml)) then
call KPP_get_BLD(CS%KPP_CSp, Hml(:,:), G, US)
Expand Down

0 comments on commit dc6f129

Please sign in to comment.