Skip to content

Commit

Permalink
Merge 65bb92e into c1358f2
Browse files Browse the repository at this point in the history
  • Loading branch information
MJHarrison-GFDL authored Jan 18, 2022
2 parents c1358f2 + 65bb92e commit 588dbf5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/core/MOM_forcing_type.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3007,10 +3007,13 @@ subroutine allocate_forcing_by_group(G, fluxes, water, heat, ustar, press, &

call myAlloc(fluxes%p_surf,isd,ied,jsd,jed, press)

call myAlloc(fluxes%frac_shelf_h,isd,ied,jsd,jed, shelf)
call myAlloc(fluxes%ustar_shelf,isd,ied,jsd,jed, shelf)
call myAlloc(fluxes%iceshelf_melt,isd,ied,jsd,jed, shelf)
call myAlloc(fluxes%shelf_sfc_mass_flux,isd,ied,jsd,jed, shelf_sfc_acc)
! These fields should only be allocated if ice shelf is enabled.
if (present(shelf)) then; if (shelf) then
call myAlloc(fluxes%frac_shelf_h,isd,ied,jsd,jed, shelf)
call myAlloc(fluxes%ustar_shelf,isd,ied,jsd,jed, shelf)
call myAlloc(fluxes%iceshelf_melt,isd,ied,jsd,jed, shelf)
if (shelf_sfc_acc) call myAlloc(fluxes%shelf_sfc_mass_flux,isd,ied,jsd,jed, shelf_sfc_acc)
endif; endif

!These fields should only on allocated when iceberg area is being passed through the coupler.
call myAlloc(fluxes%ustar_berg,isd,ied,jsd,jed, iceberg)
Expand Down
4 changes: 4 additions & 0 deletions src/ice_shelf/MOM_ice_shelf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module MOM_ice_shelf
use MOM_cpu_clock, only : cpu_clock_id, cpu_clock_begin, cpu_clock_end
use MOM_cpu_clock, only : CLOCK_COMPONENT, CLOCK_ROUTINE
use MOM_coms, only : num_PEs
use MOM_data_override, only : data_override
use MOM_diag_mediator, only : MOM_diag_ctrl=>diag_ctrl
use MOM_IS_diag_mediator, only : post_data=>post_IS_data
use MOM_IS_diag_mediator, only : register_diag_field=>register_MOM_IS_diag_field, safe_alloc_ptr
Expand Down Expand Up @@ -322,6 +323,9 @@ subroutine shelf_calc_flux(sfc_state_in, fluxes_in, Time, time_step, CS)
G => CS%grid ; US => CS%US
ISS => CS%ISS

if (CS%active_shelf_dynamics) &
call data_override(G%Domain, 'shelf_sfc_mass_flux', fluxes_in%shelf_sfc_mass_flux, CS%Time, scale=US%kg_m3_to_R*US%m_to_Z)

if (CS%rotate_index) then
allocate(sfc_state)
call rotate_surface_state(sfc_state_in, CS%Grid_in, sfc_state, CS%Grid, CS%turns)
Expand Down

0 comments on commit 588dbf5

Please sign in to comment.