Skip to content

Commit

Permalink
To reflect recent reorganization of coupler, moved calve_ice_shelf_be…
Browse files Browse the repository at this point in the history
…rgs code to from coupler_main.F90 to full_coupler_mod.F90
  • Loading branch information
alex-huth committed Aug 21, 2024
1 parent 78f99ab commit 7c82e91
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 15 deletions.
23 changes: 12 additions & 11 deletions full/coupler_main.F90
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,14 @@
!! the slow sea-ice processes are on the same PEs as the fast sea-ice.</td>
!! </tr>
!! <tr>
!! <td>calve_ice_shelf_bergs</td>
!! <td>logical</td>
!! <td>.FALSE.</td>
!! <td> If true, the ice sheet flux through a fixed ice-shelf front is
!! converted to icebergs, rather than initializing icebergs from frozen
!! freshwater discharge.</td>
!! </tr>
!! <tr>
!! <td>restart_interval</td>
!! <td>integer, dimension(6)</td>
!! <td>(/0,0,0,0,0,0/)</td>
Expand Down Expand Up @@ -450,12 +458,8 @@ program coupler_main
if (concurrent_ice) then
!> This call occurs all ice PEs.
call coupler_exchange_fast_to_slow_ice(Ice, coupler_clocks)
!> call fms_mpp_set_current_pelist(Ice%pelist) is called if(.not.Ice%shared_slow_fast_PEs)
if (Ice%slow_ice_pe .and. calve_ice_shelf_bergs) then
call fms_mpp_clock_begin(coupler_clocks%update_ice_model_slow_fast)
call unpack_ocean_ice_boundary_calved_shelf_bergs(Ice, Ocean_ice_boundary)
call fms_mpp_clock_end(coupler_clocks%update_ice_model_slow_fast)
endif
if (Ice%slow_ice_pe .and. calve_ice_shelf_bergs) &
call coupler_unpack_ocean_ice_boundary_calved_ice_shelf_bergs(Ice, Ocean_ice_boundary, coupler_clocks)
endif

if (Ice%fast_ice_pe) call coupler_set_ice_surface_fields(Ice, coupler_clocks)
Expand Down Expand Up @@ -615,11 +619,8 @@ program coupler_main
!> This could be a point where the model is serialized; This calls on all ice PEs
if (.not.concurrent_ice) then
call coupler_exchange_fast_to_slow_ice(Ice, coupler_clocks, set_ice_current_pelist=.True.)
if (Ice%slow_ice_pe .and. calve_ice_shelf_bergs) then
call fms_mpp_clock_begin(coupler_clocks%update_ice_model_slow_fast)
call unpack_ocean_ice_boundary_calved_shelf_bergs(Ice, Ocean_ice_boundary)
call fms_mpp_clock_end(coupler_clocks%update_ice_model_slow_fast)
endif
if (Ice%slow_ice_pe .and. calve_ice_shelf_bergs) &
call coupler_unpack_ocean_ice_boundary_calved_ice_shelf_bergs(Ice, Ocean_ice_boundary, coupler_clocks)
endif
!> slow-ice model
!! This call occurs on whichever PEs handle the slow ice processess.
Expand Down
24 changes: 21 additions & 3 deletions full/full_coupler_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ module full_coupler_mod
public :: update_slow_ice_and_ocean
public :: send_ice_mask_sic
public :: flux_ice_to_ocean_finish, flux_ice_to_ocean_stocks, flux_ocean_from_ice_stocks
public :: unpack_ocean_ice_boundary_calved_shelf_bergs

public :: atmos_model_restart, land_model_restart, ice_model_restart, ocean_model_restart

Expand Down Expand Up @@ -130,6 +129,7 @@ module full_coupler_mod

public :: coupler_update_land_model_slow, coupler_flux_land_to_ice
public :: coupler_unpack_land_ice_boundary, coupler_flux_ice_to_ocean
public :: coupler_unpack_ocean_ice_boundary_calved_ice_shelf_bergs
public :: coupler_update_ice_model_slow_and_stocks, coupler_update_ocean_model

public :: coupler_clock_type, coupler_components_type, coupler_chksum_type
Expand Down Expand Up @@ -221,8 +221,9 @@ module full_coupler_mod
logical, public :: do_debug=.FALSE.!< If .TRUE. print additional debugging messages.
integer, public :: check_stocks = 0 !< -1: never 0: at end of run only n>0: every n coupled steps
logical, public :: use_hyper_thread = .false.
logical, public :: calve_ice_shelf_bergs = .false. !< If true, flux through a static ice front is converted
!!to point bergs
logical, public :: calve_ice_shelf_bergs = .false. !< If true, the ice sheet flux through a fixed ice-shelf front is
!! converted to icebergs, rather than initializing icebergs from
!! frozen freshwater discharge

namelist /coupler_nml/ current_date, calendar, force_date_from_namelist, &
months, days, hours, minutes, seconds, dt_cpld, dt_atmos, &
Expand Down Expand Up @@ -2311,6 +2312,23 @@ subroutine coupler_unpack_land_ice_boundary(Ice, Land_ice_boundary, coupler_cloc

end subroutine coupler_unpack_land_ice_boundary

!> This subroutine calls unpack_ocean_ice_boundary_calved_shelf_bergs
subroutine coupler_unpack_ocean_ice_boundary_calved_ice_shelf_bergs(Ice, Ocean_ice_boundary, coupler_clocks)

implicit none
type(ice_data_type), intent(inout) :: Ice !< Ice
type(ocean_ice_boundary_type), intent(inout) :: Ocean_ice_boundary !< Ocean_ice_boundary
type(coupler_clock_type), intent(inout) :: coupler_clocks !< coupler_clocks

call fms_mpp_set_current_pelist(Ice%slow_pelist)
call fms_mpp_clock_begin(coupler_clocks%update_ice_model_slow_slow)

call unpack_ocean_ice_boundary_calved_shelf_bergs(Ice, Ocean_ice_boundary)

call fms_mpp_clock_end(coupler_clocks%update_ice_model_slow_slow)

end subroutine coupler_unpack_ocean_ice_boundary_calved_ice_shelf_bergs

!> This subroutine calls update_ice_model_slow and flux_ice_to_ocean_stocks
subroutine coupler_update_ice_model_slow_and_stocks(Ice, coupler_clocks)

Expand Down
2 changes: 1 addition & 1 deletion full/ice_ocean_flux_exchange.F90
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ end subroutine flux_ice_to_ocean_finish
!! v_surf = meridional ocean current/ice motion (m/s)
!! v_surf = meridional ocean current/ice motion (m/s)
!! sea_lev = sea level used to drive ice accelerations (m)
!! calving = ice-sheet calving flux to ocean (kg m-2 s-1)
!! calving = ice-sheet calving flux to ocean (kg/m2/s)
!! calving_hflx = heat flux associated with ice-sheet calving (W/m2)
!! </pre>
!!
Expand Down

0 comments on commit 7c82e91

Please sign in to comment.