Skip to content

Commit 9924a19

Browse files
Passing shelf_sfc_mass_flux to ice shelf (#818)
* Commit for coupling of land to ocean adot * Remove unused ice sheet enabled flag * add adot to Shelf restart * Register sfc mass flux outside of initialize fluxes * Gfdl cryo merge (#3) * Removed second registration of sfc_mass_flux with register_diag_field. * Registered sfc_mass_flux to runs with static and dynamic ice sheets. * This commit removed the second registration of 'sfc_mass_flux' in 'register_diag_field()' * Testing shelf_sfc_mass_flux restart. * The earlier removed 'register_diag_field()' for 'mass_flux' has been added back and 'register_restart_field()' of 'fluxes_in%shelf_sfc_mass_flux' is moved before 'restore_state()' * Corrected the line length error. * Added back 'CS%id_mass_flux = register_diag_field()' --------- Co-authored-by: NJSchlegel <nschlegel@gmail.com>
1 parent 3b3fb5e commit 9924a19

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

config_src/drivers/FMS_cap/MOM_surface_forcing_gfdl.F90

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ module MOM_surface_forcing_gfdl
201201
!! ice-shelves, expressed as a coefficient
202202
!! for divergence damping, as determined
203203
!! outside of the ocean model [m3 s-1]
204+
real, pointer, dimension(:,:) :: shelf_sfc_mass_flux =>NULL() !< mass flux to surface of ice sheet [kg m-2 s-1]
204205
integer :: xtype !< The type of the exchange - REGRID, REDIST or DIRECT
205206
type(coupler_2d_bc_type) :: fluxes !< A structure that may contain an array of named fields
206207
!! used for passive tracer fluxes.
@@ -464,6 +465,10 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
464465
call check_mask_val_consistency(IOB%calving(i-i0,j-j0), G%mask2dT(i,j), i, j, 'calving', G)
465466
endif
466467

468+
if (associated(IOB%shelf_sfc_mass_flux)) then
469+
fluxes%shelf_sfc_mass_flux(i,j) = kg_m2_s_conversion * IOB%shelf_sfc_mass_flux(i-i0,j-j0)
470+
endif
471+
467472
if (associated(IOB%ustar_berg)) then
468473
fluxes%ustar_berg(i,j) = US%m_to_Z*US%T_to_s * IOB%ustar_berg(i-i0,j-j0) * G%mask2dT(i,j)
469474
if (CS%check_no_land_fluxes) &
@@ -1795,6 +1800,10 @@ subroutine ice_ocn_bnd_type_chksum(id, timestep, iobt)
17951800
chks = field_chksum( iobt%runoff ) ; if (root) write(outunit,100) 'iobt%runoff ', chks
17961801
chks = field_chksum( iobt%calving ) ; if (root) write(outunit,100) 'iobt%calving ', chks
17971802
chks = field_chksum( iobt%p ) ; if (root) write(outunit,100) 'iobt%p ', chks
1803+
if (associated(iobt%shelf_sfc_mass_flux)) then
1804+
chks = field_chksum( iobt%shelf_sfc_mass_flux ) ; if (root) write(outunit,100) 'iobt%shelf_sfc_mass_flux ',&
1805+
chks
1806+
endif
17981807
if (associated(iobt%ustar_berg)) then
17991808
chks = field_chksum( iobt%ustar_berg ) ; if (root) write(outunit,100) 'iobt%ustar_berg ', chks
18001809
endif

src/ice_shelf/MOM_ice_shelf.F90

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,8 @@ subroutine shelf_calc_flux(sfc_state_in, fluxes_in, Time, time_step_in, CS)
856856
if (CS%id_h_shelf > 0) call post_data(CS%id_h_shelf, ISS%h_shelf, CS%diag)
857857
if (CS%id_dhdt_shelf > 0) call post_data(CS%id_dhdt_shelf, ISS%dhdt_shelf, CS%diag)
858858
if (CS%id_h_mask > 0) call post_data(CS%id_h_mask,ISS%hmask,CS%diag)
859-
call process_and_post_scalar_data(CS, vaf0, vaf0_A, vaf0_G, Itime_step, dh_adott, dh_bdott)
859+
if (CS%active_shelf_dynamics) &
860+
call process_and_post_scalar_data(CS, vaf0, vaf0_A, vaf0_G, Itime_step, dh_adott, dh_bdott)
860861
call disable_averaging(CS%diag)
861862

862863
call cpu_clock_end(id_clock_shelf)
@@ -1875,7 +1876,12 @@ subroutine initialize_ice_shelf(param_file, ocn_grid, Time, CS, diag, Time_init,
18751876

18761877
CS%restart_output_dir = dirs%restart_output_dir
18771878

1878-
1879+
if (present(fluxes_in)) then
1880+
call initialize_ice_shelf_fluxes(CS, ocn_grid, US, fluxes_in)
1881+
call register_restart_field(fluxes_in%shelf_sfc_mass_flux, "sfc_mass_flux", .true., CS%restart_CSp, &
1882+
"ice shelf surface mass flux deposition from atmosphere", &
1883+
'kg m-2 s-1', conversion=US%RZ_T_to_kg_m2s)
1884+
endif
18791885

18801886
if (new_sim .and. (.not. (CS%override_shelf_movement .and. CS%mass_from_file))) then
18811887
! This model is initialized internally or from a file.
@@ -1998,11 +2004,12 @@ subroutine initialize_ice_shelf(param_file, ocn_grid, Time, CS, diag, Time_init,
19982004
if (CS%active_shelf_dynamics) then
19992005
CS%id_h_mask = register_diag_field('ice_shelf_model', 'h_mask', CS%diag%axesT1, CS%Time, &
20002006
'ice shelf thickness mask', 'none', conversion=1.0)
2001-
CS%id_shelf_sfc_mass_flux = register_diag_field('ice_shelf_model', 'sfc_mass_flux', CS%diag%axesT1, CS%Time, &
2002-
'ice shelf surface mass flux deposition from atmosphere', &
2003-
'kg m-2 s-1', conversion=US%RZ_T_to_kg_m2s)
20042007
endif
20052008

2009+
CS%id_shelf_sfc_mass_flux = register_diag_field('ice_shelf_model', 'sfc_mass_flux', CS%diag%axesT1, CS%Time, &
2010+
'ice shelf surface mass flux deposition from atmosphere', &
2011+
'kg m-2 s-1', conversion=US%RZ_T_to_kg_m2s)
2012+
20062013
! Scalars (area integrated over all ice sheets)
20072014
CS%id_vaf = register_scalar_field('ice_shelf_model', 'int_vaf', CS%diag%axesT1, CS%Time, &
20082015
'Area integrated ice sheet volume above floatation', 'm3', conversion=US%Z_to_m*US%L_to_m**2)
@@ -2178,7 +2185,6 @@ subroutine initialize_ice_shelf(param_file, ocn_grid, Time, CS, diag, Time_init,
21782185

21792186
call MOM_IS_diag_mediator_close_registration(CS%diag)
21802187

2181-
if (present(fluxes_in)) call initialize_ice_shelf_fluxes(CS, ocn_grid, US, fluxes_in)
21822188
if (present(forces_in)) call initialize_ice_shelf_forces(CS, ocn_grid, US, forces_in)
21832189

21842190
end subroutine initialize_ice_shelf
@@ -2351,8 +2357,8 @@ subroutine initialize_shelf_mass(G, param_file, CS, ISS, new_sim)
23512357

23522358
end subroutine initialize_shelf_mass
23532359
!> This subroutine applies net accumulation/ablation at the top surface to the dynamic ice shelf.
2354-
!>>acc_rate[m-s]=surf_mass_flux/density_ice is ablation/accumulation rate
2355-
!>>positive for accumulation negative for ablation
2360+
!! acc_rate[m-s]=surf_mass_flux/density_ice is ablation/accumulation rate
2361+
!! positive for accumulation negative for ablation
23562362
subroutine change_thickness_using_precip(CS, ISS, G, US, fluxes, time_step, Time)
23572363
type(ice_shelf_CS), intent(in) :: CS !< A pointer to the ice shelf control structure
23582364
type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure.

0 commit comments

Comments
 (0)