Skip to content

Commit

Permalink
Pass Hml, from ePBL or KPP, via a call to diabatic
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo-marques committed Sep 24, 2018
1 parent 4050617 commit 6ccd94c
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/parameterizations/vertical/MOM_diabatic_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ module MOM_diabatic_driver
logical :: use_energetic_PBL !< If true, use the implicit energetics planetary
!! boundary layer scheme to determine the diffusivity
!! in the surface boundary layer.
logical :: use_KPP !< If true, use CVMix/KPP boundary layer scheme to determine the
!! OBLD and the diffusivities within this layer.
logical :: use_kappa_shear !< If true, use the kappa_shear module to find the
!! shear-driven diapycnal diffusivity.
logical :: use_CVMix_shear !< If true, use the CVMix module to find the
Expand Down Expand Up @@ -266,7 +268,7 @@ subroutine diabatic(u, v, h, tv, Hml, fluxes, visc, ADp, CDp, dt, Time_end, &
real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(inout) :: h !< thickness (m for Bouss / kg/m2 for non-Bouss)
type(thermo_var_ptrs), intent(inout) :: tv !< points to thermodynamic fields
!! unused have NULL ptrs
real, dimension(:,:), pointer :: Hml !< active mixed layer depth
real, dimension(:,:), pointer :: Hml !< mixed layer depth, m
type(forcing), intent(inout) :: fluxes !< points to forcing fields
!! unused fields have NULL ptrs
type(vertvisc_type), intent(inout) :: visc !< vertical viscosities, BBL properies, and
Expand Down Expand Up @@ -736,11 +738,11 @@ subroutine diabatic(u, v, h, tv, Hml, fluxes, visc, ADp, CDp, dt, Time_end, &
call energetic_PBL(h, u_h, v_h, tv, fluxes, dt, Kd_ePBL, G, GV, &
CS%energetic_PBL_CSp, dSV_dT, dSV_dS, cTKE, SkinBuoyFlux, waves=waves)

! If visc%MLD exists, copy the ePBL's MLD into it
if (associated(visc%MLD)) then
call energetic_PBL_get_MLD(CS%energetic_PBL_CSp, visc%MLD, G)
call pass_var(visc%MLD, G%domain, halo=1)
Hml(:,:) = visc%MLD(:,:)
if (associated(Hml)) then
call energetic_PBL_get_MLD(CS%energetic_PBL_CSp, Hml(:,:), G)
call pass_var(Hml, G%domain, halo=1)
! If visc%MLD exists, copy KPP's BLD into it
if (associated(visc%MLD)) visc%MLD(:,:) = Hml(:,:)
endif

! Augment the diffusivities and viscosity due to those diagnosed in energetic_PBL.
Expand Down Expand Up @@ -2815,7 +2817,10 @@ subroutine diabatic_driver_init(Time, G, GV, param_file, useALEalgorithm, diag,
call get_param(param_file, mod, "DOUBLE_DIFFUSION", differentialDiffusion, &
"If true, apply parameterization of double-diffusion.", &
default=.false. )

call get_param(param_file, mod, "USE_KPP", CS%use_KPP, &
"If true, turns on the [CVMix] KPP scheme of Large et al., 1994,\n"// &
"to calculate diffusivities and non-local transport in the OBL.", &
default=.false., do_not_log=.true.)
CS%use_CVMix_ddiff = CVMix_ddiff_is_used(param_file)

if (CS%use_CVMix_ddiff .and. differentialDiffusion) then
Expand Down

0 comments on commit 6ccd94c

Please sign in to comment.