Skip to content

Commit

Permalink
Merge branch 'mvertens/nuopc_cmeps_dev' into dev/nuopc_cmeps
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariana Vertenstein committed Jan 1, 2019
2 parents 4bdd6a4 + a3ab66e commit 93a6a8f
Show file tree
Hide file tree
Showing 4 changed files with 1,151 additions and 1,059 deletions.
28 changes: 9 additions & 19 deletions config_src/nuopc_driver/MOM_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ module MOM_surface_forcing
use mpp_mod, only : mpp_chksum
use time_interp_external_mod, only : init_external_field, time_interp_external
use time_interp_external_mod, only : time_interp_external_init
use mom_cap_share

implicit none ; private

Expand Down Expand Up @@ -196,12 +197,6 @@ module MOM_surface_forcing

integer :: id_clock_forcing

#ifdef CESMCOUPLED
logical :: cesm_coupled = .true.
#else
logical :: cesm_coupled = .false.
#endif

!=======================================================================
contains
!=======================================================================
Expand Down Expand Up @@ -445,18 +440,12 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, G, CS, &
! ice runoff flux
if (associated(fluxes%frunoff)) &
fluxes%frunoff(i,j) = G%mask2dT(i,j) * IOB%rofi_flux(i-i0,j-j0)

! GMM, cime does not not have an equivalent for heat_content_lrunoff and
! heat_content_frunoff. I am seeting these to zero for now.
if (associated(IOB%runoff_hflx)) &
fluxes%heat_content_lrunoff(i,j) = 0.0 * G%mask2dT(i,j)

if (associated(IOB%calving_hflx)) &
fluxes%heat_content_frunoff(i,j) = 0.0 * G%mask2dT(i,j)
else
if (associated(IOB%runoff)) &
fluxes%lrunoff(i,j) = IOB%runoff(i-i0,j-j0) * G%mask2dT(i,j)
end if

if (.not. cesm_coupled) then
if (associated(IOB%calving)) &
fluxes%frunoff(i,j) = IOB%calving(i-i0,j-j0) * G%mask2dT(i,j)

Expand All @@ -469,13 +458,14 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, G, CS, &
if (associated(IOB%mass_berg)) &
fluxes%mass_berg(i,j) = IOB%mass_berg(i-i0,j-j0) * G%mask2dT(i,j)

if (associated(IOB%runoff_hflx)) &
fluxes%heat_content_lrunoff(i,j) = IOB%runoff_hflx(i-i0,j-j0) * G%mask2dT(i,j)

if (associated(IOB%calving_hflx)) &
fluxes%heat_content_frunoff(i,j) = IOB%calving_hflx(i-i0,j-j0) * G%mask2dT(i,j)
end if

if (associated(IOB%runoff_hflx)) &
fluxes%heat_content_lrunoff(i,j) = IOB%runoff_hflx(i-i0,j-j0) * G%mask2dT(i,j)

if (associated(IOB%calving_hflx)) &
fluxes%heat_content_frunoff(i,j) = IOB%calving_hflx(i-i0,j-j0) * G%mask2dT(i,j)

if (associated(IOB%lw_flux)) &
fluxes%LW(i,j) = IOB%lw_flux(i-i0,j-j0) * G%mask2dT(i,j)

Expand Down
Loading

0 comments on commit 93a6a8f

Please sign in to comment.