Skip to content

Commit

Permalink
update all calls of KPP_compute_BLD and KPP_calculate to support the …
Browse files Browse the repository at this point in the history
…passage of lamult enhancement factor
  • Loading branch information
alperaltuntas committed Sep 2, 2021
1 parent 11c550f commit 5f8c446
Showing 1 changed file with 24 additions and 8 deletions.
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 @@ -624,11 +624,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 @@ -1771,11 +1779,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 5f8c446

Please sign in to comment.