Skip to content

Commit

Permalink
Merge pull request #14 from GEOS-ESM/feature/yury/get_mld
Browse files Browse the repository at this point in the history
This commit adds export of mixed layer depth, which is needed by MOM …
  • Loading branch information
Yury Vikhliaev authored Jun 5, 2020
2 parents a14d1ce + f1e905d commit d02b914
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/mom5/ocean_core/ocean_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -3449,6 +3450,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
Expand Down

0 comments on commit d02b914

Please sign in to comment.