Skip to content

Commit

Permalink
Add OBLD into MCT cap
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo-marques committed Sep 7, 2018
1 parent 1ced255 commit 4050617
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion config_src/mct_driver/MOM_ocean_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ module MOM_ocean_model
frazil =>NULL(), & !< Accumulated heating (in Joules/m^2) from frazil
!! formation in the ocean.
melt_potential => NULL(), & !< Accumulated heat used to melt sea ice (in W/m^2)
area => NULL() !< cell area of the ocean surface, in m2.
area => NULL(), & !< cell area of the ocean surface, in m2.
OBLD => NULL() !< Ocean boundary layer depth, in m.
type(coupler_2d_bc_type) :: fields !< A structure that may contain an
!! array of named tracer-related fields.
integer :: avg_kount !< Used for accumulating averages of this type.
Expand Down Expand Up @@ -732,6 +733,7 @@ subroutine initialize_ocean_public_type(input_domain, Ocean_sfc, diag, maskmap,
Ocean_sfc%v_surf (isc:iec,jsc:jec), &
Ocean_sfc%sea_lev(isc:iec,jsc:jec), &
Ocean_sfc%area (isc:iec,jsc:jec), &
Ocean_sfc%OBLD (isc:iec,jsc:jec), &
Ocean_sfc%melt_potential(isc:iec,jsc:jec), &
Ocean_sfc%frazil (isc:iec,jsc:jec))

Expand All @@ -742,6 +744,7 @@ subroutine initialize_ocean_public_type(input_domain, Ocean_sfc, diag, maskmap,
Ocean_sfc%sea_lev = 0.0 ! time averaged thickness of top model grid cell (m) plus patm/rho0/grav
Ocean_sfc%frazil = 0.0 ! time accumulated frazil (J/m^2) passed to ice model
Ocean_sfc%melt_potential = 0.0 ! time accumulated melt potential (J/m^2) passed to ice model
Ocean_sfc%OBLD = 0.0 ! ocean boundary layer depth, in m
Ocean_sfc%area = 0.0
Ocean_sfc%axes = diag%axesT1%handles !diag axes to be used by coupler tracer flux diagnostics

Expand Down Expand Up @@ -812,6 +815,8 @@ subroutine convert_state_to_ocean_type(state, Ocean_sfc, G, patm, press_to_z)
Ocean_sfc%frazil(i,j) = state%frazil(i+i0,j+j0)
if (allocated(state%melt_potential)) &
Ocean_sfc%melt_potential(i,j) = state%melt_potential(i+i0,j+j0)
if (allocated(state%Hml)) &
Ocean_sfc%OBLD(i,j) = state%Hml(i+i0,j+j0)
enddo ; enddo

if (Ocean_sfc%stagger == AGRID) then
Expand Down Expand Up @@ -1036,6 +1041,7 @@ subroutine ocean_public_type_chksum(id, timestep, ocn)
write(outunit,100) 'ocean%v_surf ',mpp_chksum(ocn%v_surf )
write(outunit,100) 'ocean%sea_lev ',mpp_chksum(ocn%sea_lev)
write(outunit,100) 'ocean%frazil ',mpp_chksum(ocn%frazil )
write(outunit,100) 'ocean%OBLD ',mpp_chksum(ocn%OBLD )
write(outunit,100) 'ocean%melt_potential ',mpp_chksum(ocn%melt_potential)

call coupler_type_write_chksums(ocn%fields, outunit, 'ocean%')
Expand Down
1 change: 1 addition & 0 deletions config_src/mct_driver/ocn_cap_methods.F90
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ subroutine ocn_export(ind, ocn_public, grid, o2x, dt_int, ncouple_per_day)
o2x(ind%o2x_So_s, n) = ocn_public%s_surf(ig,jg) * grid%mask2dT(i,j)
o2x(ind%o2x_So_u, n) = ocn_public%u_surf(ig,jg) * grid%mask2dT(i,j)
o2x(ind%o2x_So_v, n) = ocn_public%v_surf(ig,jg) * grid%mask2dT(i,j)
o2x(ind%o2x_So_bldepth, n) = ocn_public%OBLD(ig,jg) * grid%mask2dT(i,j)
! ocean melt and freeze potential (o2x_Fioo_q), W m-2
if (ocn_public%frazil(ig,jg) > 0.0) then
! Frazil: change from J/m^2 to W/m^2
Expand Down

0 comments on commit 4050617

Please sign in to comment.