Skip to content

Commit

Permalink
minor text changes; uncomment runoff heat flux terms; required
Browse files Browse the repository at this point in the history
change made in feature/runoff_names branch of NEMS
  • Loading branch information
DeniseWorthen committed Nov 17, 2019
1 parent 419a021 commit 64be85f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 29 deletions.
16 changes: 7 additions & 9 deletions config_src/nuopc_driver/mom_cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -708,8 +708,8 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
Ice_ocean_boundary% seaice_melt (isc:iec,jsc:jec), &
Ice_ocean_boundary% mi (isc:iec,jsc:jec), &
Ice_ocean_boundary% p (isc:iec,jsc:jec), &
!Ice_ocean_boundary% lrunoff_hflx (isc:iec,jsc:jec), &
!Ice_ocean_boundary% frunoff_hflx (isc:iec,jsc:jec), &
Ice_ocean_boundary% lrunoff_hflx (isc:iec,jsc:jec), &
Ice_ocean_boundary% frunoff_hflx (isc:iec,jsc:jec), &
Ice_ocean_boundary% lrunoff (isc:iec,jsc:jec), &
Ice_ocean_boundary% frunoff (isc:iec,jsc:jec))

Expand All @@ -729,8 +729,8 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
Ice_ocean_boundary%seaice_melt_heat= 0.0
Ice_ocean_boundary%mi = 0.0
Ice_ocean_boundary%p = 0.0
!Ice_ocean_boundary%lrunoff_hflx = 0.0
!Ice_ocean_boundary%frunoff_hflx = 0.0
Ice_ocean_boundary%lrunoff_hflx = 0.0
Ice_ocean_boundary%frunoff_hflx = 0.0
Ice_ocean_boundary%lrunoff = 0.0
Ice_ocean_boundary%frunoff = 0.0

Expand Down Expand Up @@ -776,9 +776,9 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
call fld_list_add(fldsToOcn_num, fldsToOcn, "Foxx_rofi" , "will provide") !-> ice runoff
call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_fresh_water_to_ocean_rate", "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "net_heat_flx_to_ocn" , "will provide")

!call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_runoff_heat_flx" , "will provide")
!call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_calving_heat_flx" , "will provide")
!Requires nuopc dictionary change
call fld_list_add(fldsToOcn_num, fldsToOcn, "liquid_runoff_heat_flx" , "will provide")
call fld_list_add(fldsToOcn_num, fldsToOcn, "frozen_runoff_heat_flx" , "will provide")

!--------- export fields -------------
call fld_list_add(fldsFrOcn_num, fldsFrOcn, "ocean_mask" , "will provide")
Expand Down Expand Up @@ -1715,8 +1715,6 @@ subroutine ModelAdvance(gcomp, rc)
file=__FILE__)) &
return ! bail out

call ice_ocn_bnd_from_data(Ice_ocean_boundary, Time, Time_step_coupled) ! for runoff

!---------------
! Update MOM6
!---------------
Expand Down
28 changes: 14 additions & 14 deletions config_src/nuopc_driver/mom_cap_methods.F90
Original file line number Diff line number Diff line change
Expand Up @@ -238,22 +238,22 @@ subroutine mom_import(ocean_public, ocean_grid, importState, ice_ocean_boundary,
return ! bail out

! heat content of lrunoff
!ice_ocean_boundary%lrunoff_hflx(:,:) = 0._ESMF_KIND_R8
!call state_getimport(importState, 'liquid_runoff_heat_flx', &
! isc, iec, jsc, jec, ice_ocean_boundary%lrunoff_hflx, rc=rc)
!if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
! line=__LINE__, &
! file=__FILE__)) &
! return ! bail out
ice_ocean_boundary%lrunoff_hflx(:,:) = 0._ESMF_KIND_R8
call state_getimport(importState, 'liquid_runoff_heat_flx', &
isc, iec, jsc, jec, ice_ocean_boundary%lrunoff_hflx, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
return ! bail out

! heat content of frunoff
!ice_ocean_boundary%frunoff_hflx(:,:) = 0._ESMF_KIND_R8
!call state_getimport(importState, 'frozen_runoff_heat_flx', &
! isc, iec, jsc, jec, ice_ocean_boundary%frunoff_hflx, rc=rc)
!if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
! line=__LINE__, &
! file=__FILE__)) &
! return ! bail out
ice_ocean_boundary%frunoff_hflx(:,:) = 0._ESMF_KIND_R8
call state_getimport(importState, 'frozen_runoff_heat_flx', &
isc, iec, jsc, jec, ice_ocean_boundary%frunoff_hflx, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
return ! bail out

!----
! salt flux from ice
Expand Down
12 changes: 6 additions & 6 deletions config_src/nuopc_driver/mom_surface_forcing_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ module MOM_surface_forcing_nuopc
real, pointer, dimension(:,:) :: ustar_berg =>NULL() !< frictional velocity beneath icebergs [m/s]
real, pointer, dimension(:,:) :: area_berg =>NULL() !< area covered by icebergs[m2/m2]
real, pointer, dimension(:,:) :: mass_berg =>NULL() !< mass of icebergs(kg/m2)
!real, pointer, dimension(:,:) :: lrunoff_hflx =>NULL() !< heat content of liquid runoff [W/m2]
!real, pointer, dimension(:,:) :: frunoff_hflx =>NULL() !< heat content of frozen runoff [W/m2]
real, pointer, dimension(:,:) :: lrunoff_hflx =>NULL() !< heat content of liquid runoff [W/m2]
real, pointer, dimension(:,:) :: frunoff_hflx =>NULL() !< heat content of frozen runoff [W/m2]
real, pointer, dimension(:,:) :: p =>NULL() !< pressure of overlying ice and atmosphere
!< on ocean surface [Pa]
real, pointer, dimension(:,:) :: mi =>NULL() !< mass of ice [kg/m2]
Expand Down Expand Up @@ -413,7 +413,7 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, G, US, CS, &
! Check that liquid runoff has a place to go
if (CS%liquid_runoff_from_data .and. .not. associated(IOB%lrunoff)) then
call MOM_error(FATAL, "liquid runoff is being added via data_override but "// &
"there is no associated runoff in the IOB%")
"there is no associated runoff in the IOB")
return
end if

Expand Down Expand Up @@ -475,9 +475,9 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, G, US, CS, &
fluxes%latent(i,j) = fluxes%latent(i,j) + IOB%fprec(i-i0,j-j0)*CS%latent_heat_fusion
fluxes%latent_fprec_diag(i,j) = G%mask2dT(i,j) * IOB%fprec(i-i0,j-j0)*CS%latent_heat_fusion
endif
if (associated(IOB%calving)) then
fluxes%latent(i,j) = fluxes%latent(i,j) + IOB%calving(i-i0,j-j0)*CS%latent_heat_fusion
fluxes%latent_frunoff_diag(i,j) = G%mask2dT(i,j) * IOB%calving(i-i0,j-j0)*CS%latent_heat_fusion
if (associated(IOB%frunoff)) then
fluxes%latent(i,j) = fluxes%latent(i,j) + IOB%frunoff(i-i0,j-j0)*CS%latent_heat_fusion
fluxes%latent_frunoff_diag(i,j) = G%mask2dT(i,j) * IOB%frunoff(i-i0,j-j0)*CS%latent_heat_fusion
endif
if (associated(IOB%q_flux)) then
fluxes%latent(i,j) = fluxes%latent(i,j) + IOB%q_flux(i-i0,j-j0)*CS%latent_heat_vapor
Expand Down

0 comments on commit 64be85f

Please sign in to comment.