Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3460,25 +3460,6 @@ subroutine extract_surface_state(CS, sfc_state_in)
enddo ! end of j loop
endif ! melt_potential

if (allocated(sfc_state%salt_deficit) .and. associated(CS%tv%salt_deficit)) then
!$OMP parallel do default(shared)
do j=js,je ; do i=is,ie
! Convert from gSalt to kgSalt
sfc_state%salt_deficit(i,j) = 0.001 * US%S_to_ppt*CS%tv%salt_deficit(i,j)
enddo ; enddo
endif
if (allocated(sfc_state%TempxPmE) .and. associated(CS%tv%TempxPmE)) then
!$OMP parallel do default(shared)
do j=js,je ; do i=is,ie
sfc_state%TempxPmE(i,j) = US%C_to_degC*CS%tv%TempxPmE(i,j)
enddo ; enddo
endif
if (allocated(sfc_state%internal_heat) .and. associated(CS%tv%internal_heat)) then
!$OMP parallel do default(shared)
do j=js,je ; do i=is,ie
sfc_state%internal_heat(i,j) = US%C_to_degC*CS%tv%internal_heat(i,j)
enddo ; enddo
endif
if (allocated(sfc_state%taux_shelf) .and. associated(CS%visc%taux_shelf)) then
!$OMP parallel do default(shared)
do j=js,je ; do I=is-1,ie
Expand Down
2 changes: 0 additions & 2 deletions src/core/MOM_checksum_packages.F90
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ subroutine MOM_surface_chksum(mesg, sfc_state, G, US, haloshift, symmetric)
if (allocated(sfc_state%u) .and. allocated(sfc_state%v)) &
call uvchksum(mesg//" SSU", sfc_state%u, sfc_state%v, G%HI, haloshift=hs, symmetric=sym, &
scale=US%L_T_to_m_s)
! if (allocated(sfc_state%salt_deficit)) &
! call hchksum(sfc_state%salt_deficit, mesg//" salt deficit", G%HI, haloshift=hs, scale=US%RZ_to_kg_m2)
if (allocated(sfc_state%frazil)) call hchksum(sfc_state%frazil, mesg//" frazil", G%HI, &
haloshift=hs, scale=US%Q_to_J_kg*US%RZ_to_kg_m2)

Expand Down
48 changes: 16 additions & 32 deletions src/core/MOM_forcing_type.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2642,26 +2642,14 @@ subroutine forcing_diagnostics(fluxes_in, sfc_state, G_in, US, time_end, diag, h
if (associated(fluxes%SW)) res(i,j) = res(i,j) + fluxes%sw(i,j)
if (associated(fluxes%seaice_melt_heat)) res(i,j) = res(i,j) + fluxes%seaice_melt_heat(i,j)
if (allocated(sfc_state%frazil)) res(i,j) = res(i,j) + sfc_state%frazil(i,j) * I_dt
!if (associated(sfc_state%TempXpme)) then
! res(i,j) = res(i,j) + sfc_state%TempXpme(i,j) * fluxes%C_p * I_dt
!else
if (associated(fluxes%heat_content_lrunoff)) &
res(i,j) = res(i,j) + fluxes%heat_content_lrunoff(i,j)
if (associated(fluxes%heat_content_frunoff)) &
res(i,j) = res(i,j) + fluxes%heat_content_frunoff(i,j)
if (associated(fluxes%heat_content_lprec)) &
res(i,j) = res(i,j) + fluxes%heat_content_lprec(i,j)
if (associated(fluxes%heat_content_fprec)) &
res(i,j) = res(i,j) + fluxes%heat_content_fprec(i,j)
if (associated(fluxes%heat_content_icemelt)) &
res(i,j) = res(i,j) + fluxes%heat_content_icemelt(i,j)
if (associated(fluxes%heat_content_vprec)) &
res(i,j) = res(i,j) + fluxes%heat_content_vprec(i,j)
if (associated(fluxes%heat_content_cond)) &
res(i,j) = res(i,j) + fluxes%heat_content_cond(i,j)
if (associated(fluxes%heat_content_massout)) &
res(i,j) = res(i,j) + fluxes%heat_content_massout(i,j)
!endif
if (associated(fluxes%heat_content_lrunoff)) res(i,j) = res(i,j) + fluxes%heat_content_lrunoff(i,j)
if (associated(fluxes%heat_content_frunoff)) res(i,j) = res(i,j) + fluxes%heat_content_frunoff(i,j)
if (associated(fluxes%heat_content_lprec)) res(i,j) = res(i,j) + fluxes%heat_content_lprec(i,j)
if (associated(fluxes%heat_content_fprec)) res(i,j) = res(i,j) + fluxes%heat_content_fprec(i,j)
if (associated(fluxes%heat_content_icemelt)) res(i,j) = res(i,j) + fluxes%heat_content_icemelt(i,j)
if (associated(fluxes%heat_content_vprec)) res(i,j) = res(i,j) + fluxes%heat_content_vprec(i,j)
if (associated(fluxes%heat_content_cond)) res(i,j) = res(i,j) + fluxes%heat_content_cond(i,j)
if (associated(fluxes%heat_content_massout)) res(i,j) = res(i,j) + fluxes%heat_content_massout(i,j)
if (associated(fluxes%heat_added)) res(i,j) = res(i,j) + fluxes%heat_added(i,j)
enddo ; enddo
if (handles%id_net_heat_surface > 0) call post_data(handles%id_net_heat_surface, res, diag)
Expand All @@ -2679,18 +2667,14 @@ subroutine forcing_diagnostics(fluxes_in, sfc_state, G_in, US, time_end, diag, h
if (handles%id_heat_content_surfwater > 0 .or. handles%id_total_heat_content_surfwater > 0) then
do j=js,je ; do i=is,ie
res(i,j) = 0.0
! if (associated(sfc_state%TempXpme)) then
! res(i,j) = res(i,j) + sfc_state%TempXpme(i,j) * fluxes%C_p * I_dt
! else
if (associated(fluxes%heat_content_lrunoff)) res(i,j) = res(i,j) + fluxes%heat_content_lrunoff(i,j)
if (associated(fluxes%heat_content_frunoff)) res(i,j) = res(i,j) + fluxes%heat_content_frunoff(i,j)
if (associated(fluxes%heat_content_lprec)) res(i,j) = res(i,j) + fluxes%heat_content_lprec(i,j)
if (associated(fluxes%heat_content_icemelt)) res(i,j) = res(i,j) + fluxes%heat_content_icemelt(i,j)
if (associated(fluxes%heat_content_fprec)) res(i,j) = res(i,j) + fluxes%heat_content_fprec(i,j)
if (associated(fluxes%heat_content_vprec)) res(i,j) = res(i,j) + fluxes%heat_content_vprec(i,j)
if (associated(fluxes%heat_content_cond)) res(i,j) = res(i,j) + fluxes%heat_content_cond(i,j)
if (associated(fluxes%heat_content_massout)) res(i,j) = res(i,j) + fluxes%heat_content_massout(i,j)
! endif
if (associated(fluxes%heat_content_lrunoff)) res(i,j) = res(i,j) + fluxes%heat_content_lrunoff(i,j)
if (associated(fluxes%heat_content_frunoff)) res(i,j) = res(i,j) + fluxes%heat_content_frunoff(i,j)
if (associated(fluxes%heat_content_lprec)) res(i,j) = res(i,j) + fluxes%heat_content_lprec(i,j)
if (associated(fluxes%heat_content_icemelt)) res(i,j) = res(i,j) + fluxes%heat_content_icemelt(i,j)
if (associated(fluxes%heat_content_fprec)) res(i,j) = res(i,j) + fluxes%heat_content_fprec(i,j)
if (associated(fluxes%heat_content_vprec)) res(i,j) = res(i,j) + fluxes%heat_content_vprec(i,j)
if (associated(fluxes%heat_content_cond)) res(i,j) = res(i,j) + fluxes%heat_content_cond(i,j)
if (associated(fluxes%heat_content_massout)) res(i,j) = res(i,j) + fluxes%heat_content_massout(i,j)
enddo ; enddo
if (handles%id_heat_content_surfwater > 0) call post_data(handles%id_heat_content_surfwater, res, diag)
if (handles%id_total_heat_content_surfwater > 0) then
Expand Down
14 changes: 1 addition & 13 deletions src/core/MOM_variables.F90
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,7 @@ module MOM_variables
ocean_heat, & !< The total heat content of the ocean in [degC R Z ~> degC kg m-2].
ocean_salt, & !< The total salt content of the ocean in [kgSalt kg-1 R Z ~> kgSalt m-2].
taux_shelf, & !< The zonal stresses on the ocean under shelves [R L Z T-2 ~> Pa].
tauy_shelf, & !< The meridional stresses on the ocean under shelves [R L Z T-2 ~> Pa].
TempxPmE, & !< The net inflow of water into the ocean times the temperature at which this
!! inflow occurs during the call to step_MOM [degC R Z ~> degC kg m-2].
salt_deficit, & !< The salt needed to maintain the ocean column above a minimum
!! salinity over the call to step_MOM [kgSalt kg-1 R Z ~> kgSalt m-2].
internal_heat !< Any internal or geothermal heat sources that are applied to the ocean
!! integrated over the call to step_MOM [degC R Z ~> degC kg m-2].
tauy_shelf !< The meridional stresses on the ocean under shelves [R L Z T-2 ~> Pa].
logical :: T_is_conT = .false. !< If true, the temperature variable SST is actually the
!! conservative temperature in [degC].
logical :: S_is_absS = .false. !< If true, the salinity variable SSS is actually the
Expand Down Expand Up @@ -394,9 +388,6 @@ subroutine allocate_surface_state(sfc_state, G, use_temperature, do_integrals, &
if (use_temp) then
allocate(sfc_state%ocean_heat(isd:ied,jsd:jed), source=0.0)
allocate(sfc_state%ocean_salt(isd:ied,jsd:jed), source=0.0)
allocate(sfc_state%TempxPmE(isd:ied,jsd:jed), source=0.0)
allocate(sfc_state%salt_deficit(isd:ied,jsd:jed), source=0.0)
allocate(sfc_state%internal_heat(isd:ied,jsd:jed), source=0.0)
endif
endif

Expand Down Expand Up @@ -430,7 +421,6 @@ subroutine deallocate_surface_state(sfc_state)
if (allocated(sfc_state%ocean_mass)) deallocate(sfc_state%ocean_mass)
if (allocated(sfc_state%ocean_heat)) deallocate(sfc_state%ocean_heat)
if (allocated(sfc_state%ocean_salt)) deallocate(sfc_state%ocean_salt)
if (allocated(sfc_state%salt_deficit)) deallocate(sfc_state%salt_deficit)
if (allocated(sfc_state%sfc_cfc11)) deallocate(sfc_state%sfc_cfc11)
if (allocated(sfc_state%sfc_cfc12)) deallocate(sfc_state%sfc_cfc12)
call coupler_type_destructor(sfc_state%tr_fields)
Expand Down Expand Up @@ -488,8 +478,6 @@ subroutine rotate_surface_state(sfc_state_in, sfc_state, G, turns)
call rotate_array(sfc_state_in%ocean_heat, turns, sfc_state%ocean_heat)
call rotate_array(sfc_state_in%ocean_salt, turns, sfc_state%ocean_salt)
call rotate_array(sfc_state_in%SSS, turns, sfc_state%SSS)
call rotate_array(sfc_state_in%salt_deficit, turns, sfc_state%salt_deficit)
call rotate_array(sfc_state_in%internal_heat, turns, sfc_state%internal_heat)
endif
endif

Expand Down