Skip to content

Commit

Permalink
Merge pull request #1253 from sanAkel/dev/gfdl
Browse files Browse the repository at this point in the history
Additions from GMAO (2): Add hooks to get melt_potential and OBLD
  • Loading branch information
marshallward authored Nov 24, 2020
2 parents 131f0e3 + a0b94f3 commit be00c67
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion config_src/coupled_driver/ocean_model_MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ module ocean_model_mod
!! i.e. dzt(1) + eta_t + patm/rho0/grav [m]
frazil =>NULL(), & !< Accumulated heating [J m-2] from frazil
!! formation in the ocean.
melt_potential => NULL(), & !< Instantaneous heat used to melt sea ice [J m-2].
OBLD => NULL(), & !< Ocean boundary layer depth [m].
area => NULL() !< cell area of the ocean surface [m2].
type(coupler_2d_bc_type) :: fields !< A structure that may contain named
!! arrays of tracer-related surface fields.
Expand Down Expand Up @@ -794,6 +796,8 @@ 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%melt_potential(isc:iec,jsc:jec), &
Ocean_sfc%OBLD (isc:iec,jsc:jec), &
Ocean_sfc%frazil (isc:iec,jsc:jec))

Ocean_sfc%t_surf(:,:) = 0.0 ! time averaged sst (Kelvin) passed to atmosphere/ice model
Expand All @@ -802,6 +806,8 @@ subroutine initialize_ocean_public_type(input_domain, Ocean_sfc, diag, maskmap,
Ocean_sfc%v_surf(:,:) = 0.0 ! time averaged v-current (m/sec) passed to atmosphere/ice models
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 (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 @@ -887,6 +893,18 @@ subroutine convert_state_to_ocean_type(sfc_state, Ocean_sfc, G, US, patm, press_
enddo ; enddo
endif

if (allocated(sfc_state%melt_potential)) then
do j=jsc_bnd,jec_bnd ; do i=isc_bnd,iec_bnd
Ocean_sfc%melt_potential(i,j) = US%Q_to_J_kg*US%RZ_to_kg_m2 * sfc_state%melt_potential(i+i0,j+j0)
enddo ; enddo
endif

if (allocated(sfc_state%Hml)) then
do j=jsc_bnd,jec_bnd ; do i=isc_bnd,iec_bnd
Ocean_sfc%OBLD(i,j) = US%Z_to_m * sfc_state%Hml(i+i0,j+j0)
enddo ; enddo
endif

if (Ocean_sfc%stagger == AGRID) then
do j=jsc_bnd,jec_bnd ; do i=isc_bnd,iec_bnd
Ocean_sfc%u_surf(i,j) = G%mask2dT(i+i0,j+j0) * US%L_T_to_m_s * &
Expand Down Expand Up @@ -1064,6 +1082,10 @@ subroutine ocean_model_data2D_get(OS, Ocean, name, array2D, isc, jsc)
array2D(isc:,jsc:) = Ocean%sea_lev(isc:,jsc:)
case('frazil')
array2D(isc:,jsc:) = Ocean%frazil(isc:,jsc:)
case('melt_pot')
array2D(isc:,jsc:) = Ocean%melt_potential(isc:,jsc:)
case('obld')
array2D(isc:,jsc:) = Ocean%OBLD(isc:,jsc:)
case default
call MOM_error(FATAL,'get_ocean_grid_data2D: unknown argument name='//name)
end select
Expand Down Expand Up @@ -1109,7 +1131,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%melt_potential ',mpp_chksum(ocn%melt_potential)
call coupler_type_write_chksums(ocn%fields, outunit, 'ocean%')
100 FORMAT(" CHECKSUM::",A20," = ",Z20)

Expand Down

0 comments on commit be00c67

Please sign in to comment.