Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing shelf_sfc_mass_flux to ice shelf #818

Open
wants to merge 14 commits into
base: dev/gfdl
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions config_src/drivers/FMS_cap/MOM_surface_forcing_gfdl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ module MOM_surface_forcing_gfdl
!! ice-shelves, expressed as a coefficient
!! for divergence damping, as determined
!! outside of the ocean model [m3 s-1]
real, pointer, dimension(:,:) :: shelf_sfc_mass_flux =>NULL() !< mass flux to surface of ice sheet [kg m-2 s-1]
integer :: xtype !< The type of the exchange - REGRID, REDIST or DIRECT
type(coupler_2d_bc_type) :: fluxes !< A structure that may contain an array of named fields
!! used for passive tracer fluxes.
Expand Down Expand Up @@ -464,6 +465,10 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
call check_mask_val_consistency(IOB%calving(i-i0,j-j0), G%mask2dT(i,j), i, j, 'calving', G)
endif

if (associated(IOB%shelf_sfc_mass_flux)) then
fluxes%shelf_sfc_mass_flux(i,j) = kg_m2_s_conversion * IOB%shelf_sfc_mass_flux(i-i0,j-j0)
endif

if (associated(IOB%ustar_berg)) then
fluxes%ustar_berg(i,j) = US%m_to_Z*US%T_to_s * IOB%ustar_berg(i-i0,j-j0) * G%mask2dT(i,j)
if (CS%check_no_land_fluxes) &
Expand Down Expand Up @@ -1795,6 +1800,10 @@ subroutine ice_ocn_bnd_type_chksum(id, timestep, iobt)
chks = field_chksum( iobt%runoff ) ; if (root) write(outunit,100) 'iobt%runoff ', chks
chks = field_chksum( iobt%calving ) ; if (root) write(outunit,100) 'iobt%calving ', chks
chks = field_chksum( iobt%p ) ; if (root) write(outunit,100) 'iobt%p ', chks
if (associated(iobt%shelf_sfc_mass_flux)) then
chks = field_chksum( iobt%shelf_sfc_mass_flux ) ; if (root) write(outunit,100) 'iobt%shelf_sfc_mass_flux ',&
chks
endif
if (associated(iobt%ustar_berg)) then
chks = field_chksum( iobt%ustar_berg ) ; if (root) write(outunit,100) 'iobt%ustar_berg ', chks
endif
Expand Down
17 changes: 10 additions & 7 deletions src/ice_shelf/MOM_ice_shelf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1962,9 +1962,6 @@ subroutine initialize_ice_shelf(param_file, ocn_grid, Time, CS, diag, Time_init,
'ice shelf thickness', 'm', conversion=US%Z_to_m)
CS%id_dhdt_shelf = register_diag_field('ice_shelf_model', 'dhdt_shelf', CS%diag%axesT1, CS%Time, &
'change in ice shelf thickness over time', 'm s-1', conversion=US%Z_to_m*US%s_to_T)
CS%id_mass_flux = register_diag_field('ice_shelf_model', 'mass_flux', CS%diag%axesT1,&
CS%Time, 'Total mass flux of freshwater across the ice-ocean interface.', &
'kg/s', conversion=US%RZ_T_to_kg_m2s*US%L_to_m**2)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the removal of the CS%id_mass_flux = register_diag_field() call intentional? If so, the corresponding post_data(CS%id_mass_flux, ...) call on line 849 should also be removed, and a comment explaining why should be added to the description of the commit.

if (CS%const_gamma) then ! use ISOMIP+ eq. with rho_fw = 1000. kg m-3
meltrate_conversion = 86400.0*365.0*US%Z_to_m*US%s_to_T / (1000.0*US%kg_m3_to_R)
Expand Down Expand Up @@ -1998,11 +1995,12 @@ subroutine initialize_ice_shelf(param_file, ocn_grid, Time, CS, diag, Time_init,
if (CS%active_shelf_dynamics) then
CS%id_h_mask = register_diag_field('ice_shelf_model', 'h_mask', CS%diag%axesT1, CS%Time, &
'ice shelf thickness mask', 'none', conversion=1.0)
CS%id_shelf_sfc_mass_flux = register_diag_field('ice_shelf_model', 'sfc_mass_flux', CS%diag%axesT1, CS%Time, &
'ice shelf surface mass flux deposition from atmosphere', &
'kg m-2 s-1', conversion=US%RZ_T_to_kg_m2s)
endif

CS%id_shelf_sfc_mass_flux = register_diag_field('ice_shelf_model', 'sfc_mass_flux', CS%diag%axesT1, CS%Time, &
'ice shelf surface mass flux deposition from atmosphere', &
'kg m-2 s-1', conversion=US%RZ_T_to_kg_m2s)

! Scalars (area integrated over all ice sheets)
CS%id_vaf = register_scalar_field('ice_shelf_model', 'int_vaf', CS%diag%axesT1, CS%Time, &
'Area integrated ice sheet volume above floatation', 'm3', conversion=US%Z_to_m*US%L_to_m**2)
Expand Down Expand Up @@ -2178,7 +2176,12 @@ subroutine initialize_ice_shelf(param_file, ocn_grid, Time, CS, diag, Time_init,

call MOM_IS_diag_mediator_close_registration(CS%diag)

if (present(fluxes_in)) call initialize_ice_shelf_fluxes(CS, ocn_grid, US, fluxes_in)
if (present(fluxes_in)) then
call initialize_ice_shelf_fluxes(CS, ocn_grid, US, fluxes_in)
call register_restart_field(fluxes_in%shelf_sfc_mass_flux, "sfc_mass_flux", .true., CS%restart_CSp, &
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This restart registration is occurring after the call to restore_state() on about line 1900, so fluxes_in%shelf_sfc_mass_flux will not be read from the restart file. Please consider moving this restart registration call earlier in the routine so that it occurs before the call to restore_state(). Also, it might be worthwhile to verify that the restart writes and reads are both working as intended for this new variable, if this has not already been done.

"ice shelf surface mass flux deposition from atmosphere", &
'kg m-2 s-1', conversion=US%RZ_T_to_kg_m2s)
endif
if (present(forces_in)) call initialize_ice_shelf_forces(CS, ocn_grid, US, forces_in)

end subroutine initialize_ice_shelf
Expand Down