Initializes shelf model data, parameters and diagnostics.
1084 type(param_file_type),
intent(in) :: param_file
1085 type(ocean_grid_type),
pointer :: ocn_grid
1086 type(time_type),
intent(inout) :: time
1087 type(ice_shelf_cs),
pointer :: cs
1088 type(diag_ctrl),
target,
intent(in) :: diag
1089 type(forcing),
optional,
intent(inout) :: fluxes
1091 type(mech_forcing),
optional,
intent(inout) :: forces
1092 type(time_type),
optional,
intent(in) :: time_in
1093 logical,
optional,
intent(in) :: solo_ice_sheet_in
1096 type(ocean_grid_type),
pointer :: g => null(), og => null()
1097 type(unit_scale_type),
pointer :: us => null()
1099 type(ice_shelf_state),
pointer :: iss => null()
1101 type(directories) :: dirs
1102 type(dyn_horgrid_type),
pointer :: dg => null()
1109 real :: meltrate_conversion
1110 real :: dz_ocean_min_float
1112 real :: cdrag, drag_bg_vel
1113 logical :: new_sim, save_ic, var_force
1115 # include "version_variable.h" 1116 character(len=200) :: config
1117 character(len=200) :: ic_file,filename,inputdir
1118 character(len=40) :: mdl =
"MOM_ice_shelf" 1119 integer :: i, j, is, ie, js, je, isd, ied, jsd, jed, isdq, iedq, jsdq, jedq
1120 integer :: wd_halos(2)
1121 logical :: read_tideamp, shelf_mass_is_dynamic, debug
1122 character(len=240) :: tideamp_file
1124 real :: col_thick_melt_thresh
1126 if (
associated(cs))
then 1127 call mom_error(fatal,
"MOM_ice_shelf.F90, initialize_ice_shelf: "// &
1128 "called with an associated control structure.")
1136 call get_mom_input(dirs=dirs)
1139 call unit_scaling_init(param_file, cs%US)
1143 call mom_domains_init(cs%grid%domain, param_file, min_halo=wd_halos, symmetric=grid_sym_)
1146 call mom_grid_init(cs%grid, param_file, cs%US)
1148 call create_dyn_horgrid(dg, cs%grid%HI)
1149 call clone_mom_domain(cs%grid%Domain, dg%Domain)
1151 call set_grid_metrics(dg, param_file, cs%US)
1155 if (
associated(ocn_grid))
then ; cs%ocn_grid => ocn_grid
1156 else ; cs%ocn_grid => cs%grid ;
endif 1163 if (is_root_pe())
then 1164 write(0,*)
'OG: ', og%isd, og%isc, og%iec, og%ied, og%jsd, og%jsc, og%jsd, og%jed
1165 write(0,*)
'IG: ', g%isd, g%isc, g%iec, g%ied, g%jsd, g%jsc, g%jsd, g%jed
1172 cs%solo_ice_sheet = .false.
1173 if (
present(solo_ice_sheet_in)) cs%solo_ice_sheet = solo_ice_sheet_in
1175 if (
present(time_in)) time = time_in
1177 is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec
1178 isd = g%isd ; jsd = g%jsd ; ied = g%ied ; jed = g%jed
1179 isdq = g%IsdB ; iedq = g%IedB ; jsdq = g%JsdB ; jedq = g%JedB
1181 cs%override_shelf_movement = .false. ; cs%active_shelf_dynamics = .false.
1183 call log_version(param_file, mdl, version,
"")
1184 call get_param(param_file, mdl,
"DEBUG", debug, default=.false.)
1185 call get_param(param_file, mdl,
"DEBUG_IS", cs%debug, &
1186 "If true, write verbose debugging messages for the ice shelf.", &
1188 call get_param(param_file, mdl,
"DYNAMIC_SHELF_MASS", shelf_mass_is_dynamic, &
1189 "If true, the ice sheet mass can evolve with time.", &
1191 if (shelf_mass_is_dynamic)
then 1192 call get_param(param_file, mdl,
"OVERRIDE_SHELF_MOVEMENT", cs%override_shelf_movement, &
1193 "If true, user provided code specifies the ice-shelf "//&
1194 "movement instead of the dynamic ice model.", default=.false.)
1195 cs%active_shelf_dynamics = .not.cs%override_shelf_movement
1196 call get_param(param_file, mdl,
"GROUNDING_LINE_INTERPOLATE", cs%GL_regularize, &
1197 "If true, regularize the floatation condition at the "//&
1198 "grounding line as in Goldberg Holland Schoof 2009.", default=.false.)
1199 call get_param(param_file, mdl,
"GROUNDING_LINE_COUPLE", cs%GL_couple, &
1200 "If true, let the floatation condition be determined by "//&
1201 "ocean column thickness. This means that update_OD_ffrac "//&
1202 "will be called. GL_REGULARIZE and GL_COUPLE are exclusive.", &
1203 default=.false., do_not_log=cs%GL_regularize)
1204 if (cs%GL_regularize) cs%GL_couple = .false.
1207 call get_param(param_file, mdl,
"SHELF_THERMO", cs%isthermo, &
1208 "If true, use a thermodynamically interactive ice shelf.", &
1210 call get_param(param_file, mdl,
"LATENT_HEAT_FUSION", cs%Lat_fusion, &
1211 "The latent heat of fusion.", units=
"J/kg", default=hlf, scale=us%J_kg_to_Q)
1212 call get_param(param_file, mdl,
"SHELF_THREE_EQN", cs%threeeq, &
1213 "If true, use the three equation expression of "//&
1214 "consistency to calculate the fluxes at the ice-ocean "//&
1215 "interface.", default=.true.)
1216 call get_param(param_file, mdl,
"SHELF_INSULATOR", cs%insulator, &
1217 "If true, the ice shelf is a perfect insulatior "//&
1218 "(no conduction).", default=.false.)
1219 call get_param(param_file, mdl,
"MELTING_CUTOFF_DEPTH", cs%cutoff_depth, &
1220 "Depth above which the melt is set to zero (it must be >= 0) "//&
1221 "Default value won't affect the solution.", units=
"m", default=0.0, scale=us%m_to_Z)
1222 if (cs%cutoff_depth < 0.) &
1223 call mom_error(warning,
"Initialize_ice_shelf: MELTING_CUTOFF_DEPTH must be >= 0.")
1225 call get_param(param_file, mdl,
"CONST_SEA_LEVEL", cs%constant_sea_level, &
1226 "If true, apply evaporative, heat and salt fluxes in "//&
1227 "the sponge region. This will avoid a large increase "//&
1228 "in sea level. This option is needed for some of the "//&
1229 "ISOMIP+ experiments (Ocean3 and Ocean4). "//&
1230 "IMPORTANT: it is not currently possible to do "//&
1231 "prefect restarts using this flag.", default=.false.)
1232 call get_param(param_file, mdl,
"MIN_OCEAN_FLOAT_THICK", dz_ocean_min_float, &
1233 "The minimum ocean thickness above which the ice shelf is considered to be "//&
1234 "floating when CONST_SEA_LEVEL = True.", &
1235 default=0.1, units=
"m", scale=us%m_to_Z, do_not_log=.not.cs%constant_sea_level)
1237 call get_param(param_file, mdl,
"ISOMIP_S_SUR_SPONGE", cs%S0, &
1238 "Surface salinity in the restoring region.", &
1239 default=33.8, units=
'ppt', do_not_log=.true.)
1241 call get_param(param_file, mdl,
"ISOMIP_T_SUR_SPONGE", cs%T0, &
1242 "Surface temperature in the restoring region.", &
1243 default=-1.9, units=
'degC', do_not_log=.true.)
1245 call get_param(param_file, mdl,
"SHELF_3EQ_GAMMA", cs%const_gamma, &
1246 "If true, user specifies a constant nondimensional heat-transfer coefficient "//&
1247 "(GAMMA_T_3EQ), from which the default salt-transfer coefficient is set "//&
1248 "as GAMMA_T_3EQ/35. This is used with SHELF_THREE_EQN.", default=.false.)
1249 if (cs%threeeq)
then 1250 call get_param(param_file, mdl,
"SHELF_S_ROOT", cs%find_salt_root, &
1251 "If SHELF_S_ROOT = True, salinity at the ice/ocean interface (Sbdry) "//&
1252 "is computed from a quadratic equation. Otherwise, the previous "//&
1253 "interactive method to estimate Sbdry is used.", default=.false.)
1255 call get_param(param_file, mdl,
"SHELF_2EQ_GAMMA_T", cs%gamma_t, &
1256 "If SHELF_THREE_EQN is false, this the fixed turbulent "//&
1257 "exchange velocity at the ice-ocean interface.", &
1258 units=
"m s-1", scale=us%m_to_Z*us%T_to_s, fail_if_missing=.true.)
1260 if (cs%const_gamma .or. cs%find_salt_root)
then 1261 call get_param(param_file, mdl,
"SHELF_3EQ_GAMMA_T", cs%Gamma_T_3EQ, &
1262 "Nondimensional heat-transfer coefficient.", &
1263 units=
"nondim", default=2.2e-2)
1264 call get_param(param_file, mdl,
"SHELF_3EQ_GAMMA_S", cs%Gamma_S_3EQ, &
1265 "Nondimensional salt-transfer coefficient.", &
1266 default=cs%Gamma_T_3EQ/35.0, units=
"nondim")
1269 call get_param(param_file, mdl,
"ICE_SHELF_MASS_FROM_FILE", &
1270 cs%mass_from_file,
"Read the mass of the "//&
1271 "ice shelf (every time step) from a file.", default=.false.)
1273 if (cs%find_salt_root)
then 1274 call get_param(param_file, mdl,
"TFREEZE_S0_P0", cs%TFr_0_0, &
1275 "this is the freezing potential temperature at "//&
1276 "S=0, P=0.", units=
"degC", default=0.0, do_not_log=.true.)
1277 call get_param(param_file, mdl,
"DTFREEZE_DS", cs%dTFr_dS, &
1278 "this is the derivative of the freezing potential temperature with salinity.", &
1279 units=
"degC psu-1", default=-0.054, do_not_log=.true.)
1280 call get_param(param_file, mdl,
"DTFREEZE_DP", cs%dTFr_dp, &
1281 "this is the derivative of the freezing potential temperature with pressure.", &
1282 units=
"degC Pa-1", default=0.0, scale=us%RL2_T2_to_Pa, do_not_log=.true.)
1285 call get_param(param_file, mdl,
"G_EARTH", cs%g_Earth, &
1286 "The gravitational acceleration of the Earth.", &
1287 units=
"m s-2", default = 9.80, scale=us%m_s_to_L_T**2*us%Z_to_m)
1288 call get_param(param_file, mdl,
"C_P", cs%Cp, &
1289 "The heat capacity of sea water, approximated as a constant. "//&
1290 "The default value is from the TEOS-10 definition of conservative temperature.", &
1291 units=
"J kg-1 K-1", default=3991.86795711963, scale=us%J_kg_to_Q)
1292 call get_param(param_file, mdl,
"RHO_0", cs%Rho_ocn, &
1293 "The mean ocean density used with BOUSSINESQ true to "//&
1294 "calculate accelerations and the mass for conservation "//&
1295 "properties, or with BOUSSINSEQ false to convert some "//&
1296 "parameters from vertical units of m to kg m-2.", &
1297 units=
"kg m-3", default=1035.0, scale=us%kg_m3_to_R)
1298 call get_param(param_file, mdl,
"C_P_ICE", cs%Cp_ice, &
1299 "The heat capacity of ice.", units=
"J kg-1 K-1", scale=us%J_kg_to_Q, &
1301 if (cs%constant_sea_level) cs%min_ocean_mass_float = dz_ocean_min_float*cs%Rho_ocn
1303 call get_param(param_file, mdl,
"ICE_SHELF_FLUX_FACTOR", cs%flux_factor, &
1304 "Non-dimensional factor applied to shelf thermodynamic "//&
1305 "fluxes.", units=
"none", default=1.0)
1307 call get_param(param_file, mdl,
"KV_ICE", cs%kv_ice, &
1308 "The viscosity of the ice.", &
1309 units=
"m2 s-1", default=1.0e10, scale=us%Z_to_L**2*us%m_to_L**2*us%T_to_s)
1310 call get_param(param_file, mdl,
"KV_MOLECULAR", cs%kv_molec, &
1311 "The molecular kinimatic viscosity of sea water at the "//&
1312 "freezing temperature.", units=
"m2 s-1", default=1.95e-6, scale=us%m2_s_to_Z2_T)
1313 call get_param(param_file, mdl,
"ICE_SHELF_SALINITY", cs%Salin_ice, &
1314 "The salinity of the ice inside the ice shelf.", units=
"psu", &
1316 call get_param(param_file, mdl,
"ICE_SHELF_TEMPERATURE", cs%Temp_ice, &
1317 "The temperature at the center of the ice shelf.", &
1318 units =
"degC", default=-15.0)
1319 call get_param(param_file, mdl,
"KD_SALT_MOLECULAR", cs%kd_molec_salt, &
1320 "The molecular diffusivity of salt in sea water at the "//&
1321 "freezing point.", units=
"m2 s-1", default=8.02e-10, scale=us%m2_s_to_Z2_T)
1322 call get_param(param_file, mdl,
"KD_TEMP_MOLECULAR", cs%kd_molec_temp, &
1323 "The molecular diffusivity of heat in sea water at the "//&
1324 "freezing point.", units=
"m2 s-1", default=1.41e-7, scale=us%m2_s_to_Z2_T)
1325 call get_param(param_file, mdl,
"DT_FORCING", cs%time_step, &
1326 "The time step for changing forcing, coupling with other "//&
1327 "components, or potentially writing certain diagnostics. "//&
1328 "The default value is given by DT.", units=
"s", default=0.0)
1330 call get_param(param_file, mdl,
"COL_THICK_MELT_THRESHOLD", col_thick_melt_thresh, &
1331 "The minimum ocean column thickness where melting is allowed.", &
1332 units=
"m", scale=us%m_to_Z, default=0.0)
1333 cs%col_mass_melt_threshold = cs%Rho_ocn * col_thick_melt_thresh
1335 call get_param(param_file, mdl,
"READ_TIDEAMP", read_tideamp, &
1336 "If true, read a file (given by TIDEAMP_FILE) containing "//&
1337 "the tidal amplitude with INT_TIDE_DISSIPATION.", default=.false.)
1339 call safe_alloc_ptr(cs%utide,isd,ied,jsd,jed) ; cs%utide(:,:) = 0.0
1341 if (read_tideamp)
then 1342 call get_param(param_file, mdl,
"TIDEAMP_FILE", tideamp_file, &
1343 "The path to the file containing the spatially varying "//&
1344 "tidal amplitudes.", &
1345 default=
"tideamp.nc")
1346 call get_param(param_file, mdl,
"INPUTDIR", inputdir, default=
".")
1347 inputdir = slasher(inputdir)
1348 tideamp_file = trim(inputdir) // trim(tideamp_file)
1349 call mom_read_data(tideamp_file,
'tideamp', cs%utide, g%domain, timelevel=1, scale=us%m_s_to_L_T)
1351 call get_param(param_file, mdl,
"UTIDE", utide, &
1352 "The constant tidal amplitude used with INT_TIDE_DISSIPATION.", &
1353 units=
"m s-1", default=0.0 , scale=us%m_s_to_L_T)
1354 cs%utide(:,:) = utide
1357 call eos_init(param_file, cs%eqn_of_state)
1361 if (cs%active_shelf_dynamics)
then 1363 call get_param(param_file, mdl,
"DENSITY_ICE", cs%density_ice, &
1364 "A typical density of ice.", units=
"kg m-3", default=917.0, scale=us%kg_m3_to_R)
1366 call get_param(param_file, mdl,
"INPUT_FLUX_ICE_SHELF", cs%input_flux, &
1367 "volume flux at upstream boundary", units=
"m2 s-1", default=0.)
1368 call get_param(param_file, mdl,
"INPUT_THICK_ICE_SHELF", cs%input_thickness, &
1369 "flux thickness at upstream boundary", units=
"m", default=1000.)
1372 call get_param(param_file, mdl,
"DENSITY_ICE", cs%density_ice, &
1373 "A typical density of ice.", units=
"kg m-3", default=900.0, scale=us%kg_m3_to_R)
1375 call get_param(param_file, mdl,
"MIN_THICKNESS_SIMPLE_CALVE", &
1376 cs%min_thickness_simple_calve, &
1377 "Min thickness rule for the very simple calving law",&
1378 units=
"m", default=0.0, scale=us%m_to_Z)
1380 call get_param(param_file, mdl,
"USTAR_SHELF_BG", cs%ustar_bg, &
1381 "The minimum value of ustar under ice shelves.", &
1382 units=
"m s-1", default=0.0, scale=us%m_to_Z*us%T_to_s)
1383 call get_param(param_file, mdl,
"CDRAG_SHELF", cdrag, &
1384 "CDRAG is the drag coefficient relating the magnitude of "//&
1385 "the velocity field to the surface stress.", units=
"nondim", &
1388 if (cs%ustar_bg <= 0.0)
then 1389 call get_param(param_file, mdl,
"DRAG_BG_VEL_SHELF", drag_bg_vel, &
1390 "DRAG_BG_VEL is either the assumed bottom velocity (with "//&
1391 "LINEAR_DRAG) or an unresolved velocity that is "//&
1392 "combined with the resolved velocity to estimate the "//&
1393 "velocity magnitude.", units=
"m s-1", default=0.0, scale=us%m_to_Z*us%T_to_s)
1394 if (cs%cdrag*drag_bg_vel > 0.0) cs%ustar_bg = sqrt(cs%cdrag)*drag_bg_vel
1398 call ice_shelf_state_init(cs%ISS, cs%grid)
1402 if (.not. cs%solo_ice_sheet)
then 1403 call mom_mesg(
"MOM_ice_shelf.F90, initialize_ice_shelf: allocating fluxes.")
1407 if (
present(fluxes)) &
1408 call allocate_forcing_type(cs%ocn_grid, fluxes, ustar=.true., shelf=.true., &
1409 press=.true., water=cs%isthermo, heat=cs%isthermo)
1410 if (
present(forces)) &
1411 call allocate_mech_forcing(cs%ocn_grid, forces, ustar=.true., shelf=.true., press=.true.)
1413 call mom_mesg(
"MOM_ice_shelf.F90, initialize_ice_shelf: allocating fluxes in solo mode.")
1414 if (
present(fluxes)) &
1415 call allocate_forcing_type(g, fluxes, ustar=.true., shelf=.true., press=.true.)
1416 if (
present(forces)) &
1417 call allocate_mech_forcing(g, forces, ustar=.true., shelf=.true., press=.true.)
1421 call mom_initialize_topography(dg%bathyT, g%max_depth, dg, param_file)
1422 call rescale_dyn_horgrid_bathymetry(dg, us%Z_to_m)
1425 call mom_initialize_rotation(dg%CoriolisBu, dg, param_file, us)
1427 call copy_dyngrid_to_mom_grid(dg, cs%grid, us)
1429 call destroy_dyn_horgrid(dg)
1432 call restart_init(param_file, cs%restart_CSp,
"Shelf.res")
1433 call register_restart_field(iss%mass_shelf,
"shelf_mass", .true., cs%restart_CSp, &
1434 "Ice shelf mass",
"kg m-2")
1435 call register_restart_field(iss%area_shelf_h,
"shelf_area", .true., cs%restart_CSp, &
1436 "Ice shelf area in cell",
"m2")
1437 call register_restart_field(iss%h_shelf,
"h_shelf", .true., cs%restart_CSp, &
1438 "ice sheet/shelf thickness",
"m")
1439 call register_restart_field(us%m_to_Z_restart,
"m_to_Z", .false., cs%restart_CSp, &
1440 "Height unit conversion factor",
"Z meter-1")
1441 call register_restart_field(us%m_to_L_restart,
"m_to_L", .false., cs%restart_CSp, &
1442 "Length unit conversion factor",
"L meter-1")
1443 call register_restart_field(us%kg_m3_to_R_restart,
"kg_m3_to_R", .false., cs%restart_CSp, &
1444 "Density unit conversion factor",
"R m3 kg-1")
1445 if (cs%active_shelf_dynamics)
then 1446 call register_restart_field(iss%hmask,
"h_mask", .true., cs%restart_CSp, &
1447 "ice sheet/shelf thickness mask" ,
"none")
1450 if (cs%active_shelf_dynamics)
then 1452 call register_ice_shelf_dyn_restarts(g, param_file, cs%dCS, cs%restart_CSp)
1461 cs%restart_output_dir = dirs%restart_output_dir
1464 if ((dirs%input_filename(1:1) ==
'n') .and. &
1465 (len_trim(dirs%input_filename) == 1)) new_sim = .true.
1467 if (cs%override_shelf_movement .and. cs%mass_from_file)
then 1470 call initialize_shelf_mass(g, param_file, cs, iss)
1474 call initialize_ice_thickness(iss%h_shelf, iss%area_shelf_h, iss%hmask, g, us, param_file)
1477 do j=g%jsd,g%jed ;
do i=g%isd,g%ied
1478 if ((iss%hmask(i,j) == 1) .or. (iss%hmask(i,j) == 2))
then 1479 iss%mass_shelf(i,j) = iss%h_shelf(i,j)*cs%density_ice
1483 if (cs%min_thickness_simple_calve > 0.0) &
1484 call ice_shelf_min_thickness_calve(g, iss%h_shelf, iss%area_shelf_h, iss%hmask, &
1485 cs%min_thickness_simple_calve)
1489 if (cs%active_shelf_dynamics)
then 1499 if (new_sim .and. (.not. (cs%override_shelf_movement .and. cs%mass_from_file)))
then 1502 call initialize_ice_thickness(iss%h_shelf, iss%area_shelf_h, iss%hmask, g, us, param_file)
1505 do j=g%jsd,g%jed ;
do i=g%isd,g%ied
1506 if ((iss%hmask(i,j) == 1) .or. (iss%hmask(i,j) == 2))
then 1507 iss%mass_shelf(i,j) = iss%h_shelf(i,j)*cs%density_ice
1512 elseif (.not.new_sim)
then 1514 call mom_mesg(
"MOM_ice_shelf.F90, initialize_ice_shelf: Restoring ice shelf from file.")
1515 call restore_state(dirs%input_filename, dirs%restart_input_dir, time, &
1518 if ((us%m_to_Z_restart /= 0.0) .and. (us%m_to_Z_restart /= us%m_to_Z))
then 1519 z_rescale = us%m_to_Z / us%m_to_Z_restart
1520 do j=g%jsc,g%jec ;
do i=g%isc,g%iec
1521 iss%h_shelf(i,j) = z_rescale * iss%h_shelf(i,j)
1525 if ((us%m_to_Z_restart*us%kg_m3_to_R_restart /= 0.0) .and. &
1526 (us%m_to_Z*us%kg_m3_to_R /= us%m_to_Z_restart * us%kg_m3_to_R_restart))
then 1527 rz_rescale = us%m_to_Z*us%kg_m3_to_R / (us%m_to_Z_restart * us%kg_m3_to_R_restart)
1528 do j=g%jsc,g%jec ;
do i=g%isc,g%iec
1529 iss%mass_shelf(i,j) = rz_rescale * iss%mass_shelf(i,j)
1533 if ((us%m_to_L_restart /= 0.0) .and. (us%m_to_L_restart /= us%m_to_L))
then 1534 l_rescale = us%m_to_L / us%m_to_L_restart
1535 do j=g%jsc,g%jec ;
do i=g%isc,g%iec
1536 iss%area_shelf_h(i,j) = l_rescale**2 * iss%area_shelf_h(i,j)
1544 call cpu_clock_begin(id_clock_pass)
1545 call pass_var(iss%area_shelf_h, g%domain)
1546 call pass_var(iss%h_shelf, g%domain)
1547 call pass_var(iss%mass_shelf, g%domain)
1548 call pass_var(iss%hmask, g%domain)
1549 call pass_var(g%bathyT, g%domain)
1550 call cpu_clock_end(id_clock_pass)
1552 do j=jsd,jed ;
do i=isd,ied
1553 if (iss%area_shelf_h(i,j) > g%areaT(i,j))
then 1554 call mom_error(warning,
"Initialize_ice_shelf: area_shelf_h exceeds G%areaT.")
1555 iss%area_shelf_h(i,j) = g%areaT(i,j)
1558 if (
present(fluxes))
then ;
do j=jsd,jed ;
do i=isd,ied
1559 if (g%areaT(i,j) > 0.0) fluxes%frac_shelf_h(i,j) = iss%area_shelf_h(i,j) / g%areaT(i,j)
1560 enddo ;
enddo ;
endif 1563 call hchksum(fluxes%frac_shelf_h,
"IS init: frac_shelf_h", g%HI, haloshift=0)
1566 if (
present(forces)) &
1567 call add_shelf_forces(g, us, cs, forces, do_shelf_area=.not.cs%solo_ice_sheet)
1569 if (
present(fluxes))
call add_shelf_pressure(g, us, cs, fluxes)
1571 if (cs%active_shelf_dynamics .and. .not.cs%isthermo)
then 1572 iss%water_flux(:,:) = 0.0
1575 if (shelf_mass_is_dynamic) &
1576 call initialize_ice_shelf_dyn(param_file, time, iss, cs%dCS, g, us, diag, new_sim, solo_ice_sheet_in)
1578 call fix_restart_unit_scaling(us)
1580 call get_param(param_file, mdl,
"SAVE_INITIAL_CONDS", save_ic, &
1581 "If true, save the ice shelf initial conditions.", &
1583 if (save_ic)
call get_param(param_file, mdl,
"SHELF_IC_OUTPUT_FILE", ic_file,&
1584 "The name-root of the output file for the ice shelf "//&
1585 "initial conditions.", default=
"MOM_Shelf_IC")
1587 if (save_ic .and. .not.((dirs%input_filename(1:1) ==
'r') .and. &
1588 (len_trim(dirs%input_filename) == 1)))
then 1589 call save_restart(dirs%output_directory, cs%Time, g, &
1590 cs%restart_CSp, filename=ic_file)
1594 cs%id_area_shelf_h = register_diag_field(
'ocean_model',
'area_shelf_h', cs%diag%axesT1, cs%Time, &
1595 'Ice Shelf Area in cell',
'meter-2', conversion=us%L_to_m**2)
1596 cs%id_shelf_mass = register_diag_field(
'ocean_model',
'shelf_mass', cs%diag%axesT1, cs%Time, &
1597 'mass of shelf',
'kg/m^2', conversion=us%RZ_to_kg_m2)
1598 cs%id_h_shelf = register_diag_field(
'ocean_model',
'h_shelf', cs%diag%axesT1, cs%Time, &
1599 'ice shelf thickness',
'm', conversion=us%Z_to_m)
1600 cs%id_mass_flux = register_diag_field(
'ocean_model',
'mass_flux', cs%diag%axesT1,&
1601 cs%Time,
'Total mass flux of freshwater across the ice-ocean interface.', &
1602 'kg/s', conversion=us%RZ_T_to_kg_m2s*us%L_to_m**2)
1604 if (cs%const_gamma)
then 1605 meltrate_conversion = 86400.0*365.0*us%Z_to_m*us%s_to_T / (1000.0*us%kg_m3_to_R)
1607 meltrate_conversion = 86400.0*365.0*us%Z_to_m*us%s_to_T / cs%density_ice
1609 cs%id_melt = register_diag_field(
'ocean_model',
'melt', cs%diag%axesT1, cs%Time, &
1610 'Ice Shelf Melt Rate',
'm yr-1', conversion= meltrate_conversion)
1611 cs%id_thermal_driving = register_diag_field(
'ocean_model',
'thermal_driving', cs%diag%axesT1, cs%Time, &
1612 'pot. temp. in the boundary layer minus freezing pot. temp. at the ice-ocean interface.',
'Celsius')
1613 cs%id_haline_driving = register_diag_field(
'ocean_model',
'haline_driving', cs%diag%axesT1, cs%Time, &
1614 'salinity in the boundary layer minus salinity at the ice-ocean interface.',
'psu')
1615 cs%id_Sbdry = register_diag_field(
'ocean_model',
'sbdry', cs%diag%axesT1, cs%Time, &
1616 'salinity at the ice-ocean interface.',
'psu')
1617 cs%id_u_ml = register_diag_field(
'ocean_model',
'u_ml', cs%diag%axesCu1, cs%Time, &
1618 'Eastward vel. in the boundary layer (used to compute ustar)',
'm s-1', conversion=us%L_T_to_m_s)
1619 cs%id_v_ml = register_diag_field(
'ocean_model',
'v_ml', cs%diag%axesCv1, cs%Time, &
1620 'Northward vel. in the boundary layer (used to compute ustar)',
'm s-1', conversion=us%L_T_to_m_s)
1621 cs%id_exch_vel_s = register_diag_field(
'ocean_model',
'exch_vel_s', cs%diag%axesT1, cs%Time, &
1622 'Sub-shelf salinity exchange velocity',
'm s-1', conversion=us%Z_to_m*us%s_to_T)
1623 cs%id_exch_vel_t = register_diag_field(
'ocean_model',
'exch_vel_t', cs%diag%axesT1, cs%Time, &
1624 'Sub-shelf thermal exchange velocity',
'm s-1' , conversion=us%Z_to_m*us%s_to_T)
1625 cs%id_tfreeze = register_diag_field(
'ocean_model',
'tfreeze', cs%diag%axesT1, cs%Time, &
1626 'In Situ Freezing point at ice shelf interface',
'degC')
1627 cs%id_tfl_shelf = register_diag_field(
'ocean_model',
'tflux_shelf', cs%diag%axesT1, cs%Time, &
1628 'Heat conduction into ice shelf',
'W m-2', conversion=-us%QRZ_T_to_W_m2)
1629 cs%id_ustar_shelf = register_diag_field(
'ocean_model',
'ustar_shelf', cs%diag%axesT1, cs%Time, &
1630 'Fric vel under shelf',
'm/s', conversion=us%Z_to_m*us%s_to_T)
1631 if (cs%active_shelf_dynamics)
then 1632 cs%id_h_mask = register_diag_field(
'ocean_model',
'h_mask', cs%diag%axesT1, cs%Time, &
1633 'ice shelf thickness mask',
'none')
1636 id_clock_shelf = cpu_clock_id(
'Ice shelf', grain=clock_component)
1637 id_clock_pass = cpu_clock_id(
' Ice shelf halo updates', grain=clock_routine)