Skip to content

Commit

Permalink
+Add 2 runtime params for ice shelf temperatures
Browse files Browse the repository at this point in the history
  Added the new runtime parameters INFLOW_SHELF_TEMPERATURE and
MISSING_SHELF_TEMPERATURE to the ice_shelf_dynamics module to replace hard coded
ice shelf temperatures.  By default, all answers are bitwise identical, but
there are new entries in some MOM_parameter_doc files for cases that use the
ice shelf code with DYNAMIC_SHELF_MASS.
  • Loading branch information
Hallberg-NOAA committed Dec 20, 2022
1 parent dda6d45 commit 9ffa1bb
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions src/ice_shelf/MOM_ice_shelf_dynamics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ module MOM_ice_shelf_dynamics
logical :: moving_shelf_front !< Specify whether to advance shelf front (and calve).
logical :: calve_to_mask !< If true, calve off the ice shelf when it passes the edge of a mask.
real :: min_thickness_simple_calve !< min. ice shelf thickness criteria for calving [Z ~> m].

real :: T_shelf_missing !< An ice shelf temperature to use where there is no ice shelf [degC ~> C]
real :: cg_tolerance !< The tolerance in the CG solver, relative to initial residual, that
!! determines when to stop the conjugate gradient iterations [nondim].
real :: nonlinear_tolerance !< The fractional nonlinear tolerance, relative to the initial error,
Expand Down Expand Up @@ -234,6 +234,8 @@ subroutine register_ice_shelf_dyn_restarts(G, US, param_file, CS, restart_CS)
type(ice_shelf_dyn_CS), pointer :: CS !< A pointer to the ice shelf dynamics control structure
type(MOM_restart_CS), intent(inout) :: restart_CS !< MOM restart control struct

! Local variables
real :: T_shelf_missing ! An ice shelf temperature to use where there is no ice shelf [degC ~> C]
logical :: shelf_mass_is_dynamic, override_shelf_movement, active_shelf_dynamics
character(len=40) :: mdl = "MOM_ice_shelf_dyn" ! This module's name.
integer :: isd, ied, jsd, jed, IsdB, IedB, JsdB, JedB
Expand All @@ -260,9 +262,12 @@ subroutine register_ice_shelf_dyn_restarts(G, US, param_file, CS, restart_CS)
endif

if (active_shelf_dynamics) then
call get_param(param_file, mdl, "MISSING_SHELF_TEMPERATURE", T_shelf_missing, &
"An ice shelf temperature to use where there is no ice shelf.",&
units="degC", default=-10.0, scale=US%degC_to_C, do_not_log=.true.)
allocate( CS%u_shelf(IsdB:IedB,JsdB:JedB), source=0.0 )
allocate( CS%v_shelf(IsdB:IedB,JsdB:JedB), source=0.0 )
allocate( CS%t_shelf(isd:ied,jsd:jed), source=-10.0*US%degC_to_C ) ! [C ~> degC]
allocate( CS%t_shelf(isd:ied,jsd:jed), source=T_shelf_missing ) ! [C ~> degC]
allocate( CS%ice_visc(isd:ied,jsd:jed), source=0.0 )
allocate( CS%AGlen_visc(isd:ied,jsd:jed), source=2.261e-25 ) ! [Pa-3 s-1]
allocate( CS%basal_traction(isd:ied,jsd:jed), source=0.0 ) ! [R L2 T-2 ~> Pa]
Expand Down Expand Up @@ -329,6 +334,8 @@ subroutine initialize_ice_shelf_dyn(param_file, Time, ISS, CS, G, US, diag, new_
! a restart file to the internal representation in this run.
real :: vel_rescale ! A rescaling factor for horizontal velocities from the representation
! in a restart file to the internal representation in this run.
real :: T_shelf_bdry ! A default ice shelf temperature to use for ice flowing
! in through open boundaries [C ~> degC]
!This include declares and sets the variable "version".
# include "version_variable.h"
character(len=200) :: IC_file,filename,inputdir
Expand Down Expand Up @@ -438,7 +445,13 @@ subroutine initialize_ice_shelf_dyn(param_file, Time, ISS, CS, G, US, diag, new_
"if CONSTANT a constant value (for debugging).", &
default="MODEL")

call get_param(param_file, mdl, "INFLOW_SHELF_TEMPERATURE", T_shelf_bdry, &
"A default ice shelf temperature to use for ice flowing in through "//&
"open boundaries.", units="degC", default=-15.0, scale=US%degC_to_C)
endif
call get_param(param_file, mdl, "MISSING_SHELF_TEMPERATURE", CS%T_shelf_missing, &
"An ice shelf temperature to use where there is no ice shelf.",&
units="degC", default=-10.0, scale=US%degC_to_C)
call get_param(param_file, mdl, "MIN_THICKNESS_SIMPLE_CALVE", CS%min_thickness_simple_calve, &
"Min thickness rule for the VERY simple calving law",&
units="m", default=0.0, scale=US%m_to_Z)
Expand All @@ -447,7 +460,7 @@ subroutine initialize_ice_shelf_dyn(param_file, Time, ISS, CS, G, US, diag, new_
! previously allocated for registration for restarts.

if (active_shelf_dynamics) then
allocate( CS%t_bdry_val(isd:ied,jsd:jed), source=-15.0*US%degC_to_C) ! [C ~> degC]
allocate( CS%t_bdry_val(isd:ied,jsd:jed), source=T_shelf_bdry) ! [C ~> degC]
allocate( CS%thickness_bdry_val(isd:ied,jsd:jed), source=0.0)
allocate( CS%u_face_mask(Isdq:Iedq,Jsdq:Jedq), source=0.0)
allocate( CS%v_face_mask(Isdq:Iedq,Jsdq:Jedq), source=0.0)
Expand Down Expand Up @@ -3223,7 +3236,7 @@ subroutine ice_shelf_temp(CS, ISS, G, US, time_step, melt_rate, Time)
if (ISS%h_shelf(i,j) > 0.0) then
CS%t_shelf(i,j) = th_after_vflux(i,j) / ISS%h_shelf(i,j)
else
CS%t_shelf(i,j) = -10.0*US%degC_to_C
CS%t_shelf(i,j) = CS%T_shelf_missing
endif
! endif

Expand All @@ -3234,11 +3247,11 @@ subroutine ice_shelf_temp(CS, ISS, G, US, time_step, melt_rate, Time)
else
! the ice is about to melt away in this case set thickness, area, and mask to zero
! NOTE: not mass conservative, should maybe scale salt & heat flux for this cell
CS%t_shelf(i,j) = -10.0*US%degC_to_C
CS%t_shelf(i,j) = CS%T_shelf_missing
CS%tmask(i,j) = 0.0
endif
elseif (ISS%hmask(i,j) == 0) then
CS%t_shelf(i,j) = -10.0*US%degC_to_C
CS%t_shelf(i,j) = CS%T_shelf_missing
elseif ((ISS%hmask(i,j) == 3) .or. (ISS%hmask(i,j) == -2)) then
CS%t_shelf(i,j) = CS%t_bdry_val(i,j)
endif
Expand Down

0 comments on commit 9ffa1bb

Please sign in to comment.