From f1e905d6fe54a528b6475fb6c8599f5081cbdc22 Mon Sep 17 00:00:00 2001 From: Yury Vikhliaev Date: Fri, 5 Jun 2020 10:43:07 -0400 Subject: [PATCH] This commit adds export of mixed layer depth, which is needed by MOM plug. --- src/mom5/ocean_core/ocean_model.F90 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/mom5/ocean_core/ocean_model.F90 b/src/mom5/ocean_core/ocean_model.F90 index 2beec83bfe..1e42c1a35e 100644 --- a/src/mom5/ocean_core/ocean_model.F90 +++ b/src/mom5/ocean_core/ocean_model.F90 @@ -589,6 +589,7 @@ module ocean_model_mod public mom4_set_swheat_fr public mom4_get_pointers_to_variables public mom4_get_streamfunction + public mom4_get_mld public mom4_ghost_prognostics public ocean_model_data_get @@ -3434,6 +3435,26 @@ function mom4_get_streamfunction() result(psi) end function mom4_get_streamfunction + +function mom4_get_mld() result(mld) + + use ocean_tracer_diag_mod + + real :: mld(isc:iec,jsc:jec) + real :: fld(isd:ied,jsd:jed) + integer :: tau + + tau = time%taup1 + call calc_mixed_layer_depth(Thickness, & + T_prog(index_salt)%field(isd:ied,jsd:jed,:,tau), & + T_prog(index_temp)%field(isd:ied,jsd:jed,:,tau), & + Dens%rho(isd:ied,jsd:jed,:,tau), & + Dens%pressure_at_depth(isd:ied,jsd:jed,:), & + fld(isd:ied,jsd:jed), .true.) + mld=fld(isc:iec, jsc:jec) + +end function mom4_get_mld + subroutine ocean_public_type_chksum(id, timestep, ocn) character(len=*), intent(in) :: id