Skip to content

Commit df46be4

Browse files
Hydrostatic initialization in ice cavities (NOAA-EMC#41)
* Hydrostatic initialization in ice cavities - Iteratively solve for the initial ice shelf displacement in cavities by calculating the pressure at the current displacement depth using the unperturbed profile. - This change should obsolete TRIM_IC_FOR_PSURF and DEPRESS_INITIAL_SURFACE for ice shelf applications and should work for arbitrary equations of state. - Existing implementations (e.g. ISOMIP) should turn off the above options in order to exercise this feature. - This code change should not impact non ice-shelf configurations or those with either of the above two options. * Addresses a number of issues identified in code review. * add appropriate intent to ice_shelf_query * fix unit scaling comments Co-authored-by: Marshall Ward <marshall.ward@noaa.gov>
1 parent 2d32631 commit df46be4

File tree

3 files changed

+164
-39
lines changed

3 files changed

+164
-39
lines changed

src/core/MOM.F90

+18-8
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,8 @@ module MOM
283283
type(time_type) :: dtbt_reset_interval !< A time_time representation of dtbt_reset_period.
284284
type(time_type) :: dtbt_reset_time !< The next time DTBT should be calculated.
285285
real, dimension(:,:), pointer :: frac_shelf_h => NULL() !< fraction of total area occupied
286-
!! by ice shelf [nondim]
286+
!! by ice shelf [nondim]
287+
real, dimension(:,:), pointer :: mass_shelf => NULL() !< Mass of ice shelf [R Z ~> kg m-2]
287288
real, dimension(:,:,:), pointer :: &
288289
h_pre_dyn => NULL(), & !< The thickness before the transports [H ~> m or kg m-2].
289290
T_pre_dyn => NULL(), & !< Temperature before the transports [degC].
@@ -1748,9 +1749,12 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &
17481749
real, allocatable :: v_in(:,:,:) ! Initial meridional velocities [L T-1 ~> m s-1]
17491750
real, allocatable :: h_in(:,:,:) ! Initial layer thicknesses [H ~> m or kg m-2]
17501751
real, allocatable, target :: frac_shelf_in(:,:) ! Initial fraction of the total cell area occupied
1751-
! by an ice shelf [nondim]
1752+
! by an ice shelf [nondim]
1753+
real, allocatable, target :: mass_shelf_in(:,:) ! Initial mass of ice shelf contained within a grid cell
1754+
! [R Z ~> kg m-2]
17521755
real, allocatable, target :: T_in(:,:,:) ! Initial temperatures [degC]
17531756
real, allocatable, target :: S_in(:,:,:) ! Initial salinities [ppt]
1757+
17541758
type(ocean_OBC_type), pointer :: OBC_in => NULL()
17551759
type(sponge_CS), pointer :: sponge_in_CSp => NULL()
17561760
type(ALE_sponge_CS), pointer :: ALE_sponge_in_CSp => NULL()
@@ -2523,14 +2527,17 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &
25232527
! for legacy reasons. The actual ice shelf diag CS is internal to the ice shelf
25242528
call initialize_ice_shelf(param_file, G_in, Time, ice_shelf_CSp, diag_ptr)
25252529
allocate(frac_shelf_in(G_in%isd:G_in%ied, G_in%jsd:G_in%jed), source=0.0)
2530+
allocate(mass_shelf_in(G_in%isd:G_in%ied, G_in%jsd:G_in%jed), source=0.0)
25262531
allocate(CS%frac_shelf_h(isd:ied, jsd:jed), source=0.0)
2527-
call ice_shelf_query(ice_shelf_CSp,G,CS%frac_shelf_h)
2532+
allocate(CS%mass_shelf(isd:ied, jsd:jed), source=0.0)
2533+
call ice_shelf_query(ice_shelf_CSp,G,CS%frac_shelf_h, CS%mass_shelf)
25282534
! MOM_initialize_state is using the unrotated metric
25292535
call rotate_array(CS%frac_shelf_h, -turns, frac_shelf_in)
2536+
call rotate_array(CS%mass_shelf, -turns, mass_shelf_in)
25302537
call MOM_initialize_state(u_in, v_in, h_in, CS%tv, Time, G_in, GV, US, &
25312538
param_file, dirs, restart_CSp, CS%ALE_CSp, CS%tracer_Reg, &
25322539
sponge_in_CSp, ALE_sponge_in_CSp, oda_incupd_in_CSp, OBC_in, Time_in, &
2533-
frac_shelf_h=frac_shelf_in)
2540+
frac_shelf_h=frac_shelf_in, mass_shelf = mass_shelf_in)
25342541
else
25352542
call MOM_initialize_state(u_in, v_in, h_in, CS%tv, Time, G_in, GV, US, &
25362543
param_file, dirs, restart_CSp, CS%ALE_CSp, CS%tracer_Reg, &
@@ -2574,16 +2581,17 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &
25742581
deallocate(S_in)
25752582
endif
25762583
if (use_ice_shelf) &
2577-
deallocate(frac_shelf_in)
2584+
deallocate(frac_shelf_in,mass_shelf_in)
25782585
else
25792586
if (use_ice_shelf) then
25802587
call initialize_ice_shelf(param_file, G, Time, ice_shelf_CSp, diag_ptr)
25812588
allocate(CS%frac_shelf_h(isd:ied, jsd:jed), source=0.0)
2582-
call ice_shelf_query(ice_shelf_CSp,G,CS%frac_shelf_h)
2589+
allocate(CS%mass_shelf(isd:ied, jsd:jed), source=0.0)
2590+
call ice_shelf_query(ice_shelf_CSp,G,CS%frac_shelf_h, CS%mass_shelf)
25832591
call MOM_initialize_state(CS%u, CS%v, CS%h, CS%tv, Time, G, GV, US, &
25842592
param_file, dirs, restart_CSp, CS%ALE_CSp, CS%tracer_Reg, &
25852593
CS%sponge_CSp, CS%ALE_sponge_CSp,CS%oda_incupd_CSp, CS%OBC, Time_in, &
2586-
frac_shelf_h=CS%frac_shelf_h)
2594+
frac_shelf_h=CS%frac_shelf_h, mass_shelf=CS%mass_shelf)
25872595
else
25882596
call MOM_initialize_state(CS%u, CS%v, CS%h, CS%tv, Time, G, GV, US, &
25892597
param_file, dirs, restart_CSp, CS%ALE_CSp, CS%tracer_Reg, &
@@ -2598,8 +2606,10 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &
25982606
endif
25992607
endif
26002608

2601-
if (use_ice_shelf .and. CS%debug) &
2609+
if (use_ice_shelf .and. CS%debug) then
26022610
call hchksum(CS%frac_shelf_h, "MOM:frac_shelf_h", G%HI, haloshift=0)
2611+
call hchksum(CS%mass_shelf, "MOM:mass_shelf", G%HI, haloshift=0,scale=US%RZ_to_kg_m2)
2612+
endif
26032613

26042614
call cpu_clock_end(id_clock_MOM_init)
26052615
call callTree_waypoint("returned from MOM_initialize_state() (initialize_MOM)")

src/ice_shelf/MOM_ice_shelf.F90

+11-3
Original file line numberDiff line numberDiff line change
@@ -2032,11 +2032,12 @@ subroutine update_shelf_mass(G, US, CS, ISS, Time)
20322032
end subroutine update_shelf_mass
20332033

20342034
!> Save the ice shelf restart file
2035-
subroutine ice_shelf_query(CS, G, frac_shelf_h)
2035+
subroutine ice_shelf_query(CS, G, frac_shelf_h, mass_shelf)
20362036
type(ice_shelf_CS), pointer :: CS !< ice shelf control structure
20372037
type(ocean_grid_type), intent(in) :: G !< A pointer to an ocean grid control structure.
2038-
real, optional, dimension(SZI_(G),SZJ_(G)) :: frac_shelf_h !<
2039-
!< Ice shelf area fraction [nodim].
2038+
real, optional, dimension(SZI_(G),SZJ_(G)), intent(out) :: frac_shelf_h !< Ice shelf area fraction [nodim].
2039+
real, optional, dimension(SZI_(G),SZJ_(G)), intent(out) :: mass_shelf !<Ice shelf mass [R Z -> kg m-2]
2040+
20402041

20412042
integer :: i, j
20422043

@@ -2047,6 +2048,13 @@ subroutine ice_shelf_query(CS, G, frac_shelf_h)
20472048
enddo ; enddo
20482049
endif
20492050

2051+
if (present(mass_shelf)) then
2052+
do j=G%jsd,G%jed ; do i=G%isd,G%ied
2053+
mass_shelf(i,j) = 0.0
2054+
if (G%areaT(i,j)>0.) mass_shelf(i,j) = CS%ISS%mass_shelf(i,j)
2055+
enddo ; enddo
2056+
endif
2057+
20502058
end subroutine ice_shelf_query
20512059

20522060
!> Save the ice shelf restart file

src/initialization/MOM_state_initialization.F90

+135-28
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ module MOM_state_initialization
117117
!! conditions or by reading them from a restart (or saves) file.
118118
subroutine MOM_initialize_state(u, v, h, tv, Time, G, GV, US, PF, dirs, &
119119
restart_CS, ALE_CSp, tracer_Reg, sponge_CSp, &
120-
ALE_sponge_CSp, oda_incupd_CSp, OBC, Time_in, frac_shelf_h)
120+
ALE_sponge_CSp, oda_incupd_CSp, OBC, Time_in, frac_shelf_h, mass_shelf)
121121
type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure.
122122
type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure.
123123
type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
@@ -147,6 +147,9 @@ subroutine MOM_initialize_state(u, v, h, tv, Time, G, GV, US, PF, dirs, &
147147
real, dimension(SZI_(G),SZJ_(G)), &
148148
optional, intent(in) :: frac_shelf_h !< The fraction of the grid cell covered
149149
!! by a floating ice shelf [nondim].
150+
real, dimension(SZI_(G),SZJ_(G)), &
151+
optional, intent(in) :: mass_shelf !< The mass per unit area of the overlying
152+
!! ice shelf [ R Z ~> kg m-2 ]
150153
! Local variables
151154
real :: depth_tot(SZI_(G),SZJ_(G)) ! The nominal total depth of the ocean [Z ~> m]
152155
character(len=200) :: filename ! The name of an input file.
@@ -158,6 +161,7 @@ subroutine MOM_initialize_state(u, v, h, tv, Time, G, GV, US, PF, dirs, &
158161
real :: vel_rescale ! A rescaling factor for velocities from the representation in
159162
! a restart file to the internal representation in this run.
160163
real :: dt ! The baroclinic dynamics timestep for this run [T ~> s].
164+
161165
logical :: from_Z_file, useALE
162166
logical :: new_sim
163167
integer :: write_geom
@@ -404,6 +408,23 @@ subroutine MOM_initialize_state(u, v, h, tv, Time, G, GV, US, PF, dirs, &
404408
if (use_temperature .and. use_OBC) &
405409
call fill_temp_salt_segments(G, GV, OBC, tv)
406410

411+
! Calculate the initial surface displacement under ice shelf
412+
413+
call get_param(PF, mdl, "DEPRESS_INITIAL_SURFACE", depress_sfc, &
414+
"If true, depress the initial surface to avoid huge "//&
415+
"tsunamis when a large surface pressure is applied.", &
416+
default=.false., do_not_log=just_read)
417+
call get_param(PF, mdl, "TRIM_IC_FOR_P_SURF", trim_ic_for_p_surf, &
418+
"If true, cuts way the top of the column for initial conditions "//&
419+
"at the depth where the hydrostatic pressure matches the imposed "//&
420+
"surface pressure which is read from file.", default=.false., &
421+
do_not_log=just_read)
422+
423+
if (new_sim) then
424+
if (use_ice_shelf .and. present(mass_shelf) .and. .not. (trim_ic_for_p_surf .or. depress_sfc)) &
425+
call calc_sfc_displacement(PF, G, GV, US, mass_shelf, tv, h)
426+
endif
427+
407428
! The thicknesses in halo points might be needed to initialize the velocities.
408429
if (new_sim) call pass_var(h, G%Domain)
409430

@@ -458,15 +479,6 @@ subroutine MOM_initialize_state(u, v, h, tv, Time, G, GV, US, PF, dirs, &
458479
call convert_thickness(h, G, GV, US, tv)
459480

460481
! Remove the mass that would be displaced by an ice shelf or inverse barometer.
461-
call get_param(PF, mdl, "DEPRESS_INITIAL_SURFACE", depress_sfc, &
462-
"If true, depress the initial surface to avoid huge "//&
463-
"tsunamis when a large surface pressure is applied.", &
464-
default=.false., do_not_log=just_read)
465-
call get_param(PF, mdl, "TRIM_IC_FOR_P_SURF", trim_ic_for_p_surf, &
466-
"If true, cuts way the top of the column for initial conditions "//&
467-
"at the depth where the hydrostatic pressure matches the imposed "//&
468-
"surface pressure which is read from file.", default=.false., &
469-
do_not_log=just_read)
470482
if (depress_sfc .and. trim_ic_for_p_surf) call MOM_error(FATAL, "MOM_initialize_state: "//&
471483
"DEPRESS_INITIAL_SURFACE and TRIM_IC_FOR_P_SURF are exclusive and cannot both be True")
472484
if (new_sim .and. debug .and. (depress_sfc .or. trim_ic_for_p_surf)) &
@@ -1035,7 +1047,7 @@ subroutine convert_thickness(h, G, GV, US, tv)
10351047
end subroutine convert_thickness
10361048

10371049
!> Depress the sea-surface based on an initial condition file
1038-
subroutine depress_surface(h, G, GV, US, param_file, tv, just_read)
1050+
subroutine depress_surface(h, G, GV, US, param_file, tv, just_read, z_top_shelf)
10391051
type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure
10401052
type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure
10411053
type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
@@ -1045,6 +1057,8 @@ subroutine depress_surface(h, G, GV, US, param_file, tv, just_read)
10451057
type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to various thermodynamic variables
10461058
logical, intent(in) :: just_read !< If true, this call will only read
10471059
!! parameters without changing h.
1060+
real, dimension(SZI_(G),SZJ_(G)), &
1061+
optional, intent(in) :: z_top_shelf !< Top interface position under ice shelf [Z ~> m]
10481062
! Local variables
10491063
real, dimension(SZI_(G),SZJ_(G)) :: &
10501064
eta_sfc ! The free surface height that the model should use [Z ~> m].
@@ -1057,30 +1071,40 @@ subroutine depress_surface(h, G, GV, US, param_file, tv, just_read)
10571071
character(len=200) :: inputdir, eta_srf_file ! Strings for file/path
10581072
character(len=200) :: filename, eta_srf_var ! Strings for file/path
10591073
integer :: i, j, k, is, ie, js, je, nz
1074+
logical :: use_z_shelf
10601075

10611076
is = G%isc ; ie = G%iec ; js = G%jsc ; je = G%jec ; nz = GV%ke
10621077

1063-
! Read the surface height (or pressure) from a file.
1078+
use_z_shelf = present(z_top_shelf)
10641079

1065-
call get_param(param_file, mdl, "INPUTDIR", inputdir, default=".")
1066-
inputdir = slasher(inputdir)
1067-
call get_param(param_file, mdl, "SURFACE_HEIGHT_IC_FILE", eta_srf_file,&
1068-
"The initial condition file for the surface height.", &
1069-
fail_if_missing=.not.just_read, do_not_log=just_read)
1070-
call get_param(param_file, mdl, "SURFACE_HEIGHT_IC_VAR", eta_srf_var, &
1071-
"The initial condition variable for the surface height.",&
1072-
default="SSH", do_not_log=just_read)
1073-
filename = trim(inputdir)//trim(eta_srf_file)
1074-
if (.not.just_read) &
1075-
call log_param(param_file, mdl, "INPUTDIR/SURFACE_HEIGHT_IC_FILE", filename)
10761080

1077-
call get_param(param_file, mdl, "SURFACE_HEIGHT_IC_SCALE", scale_factor, &
1078-
"A scaling factor to convert SURFACE_HEIGHT_IC_VAR into units of m", &
1079-
units="variable", default=1.0, scale=US%m_to_Z, do_not_log=just_read)
1081+
if (.not. use_z_shelf) then
1082+
! Read the surface height (or pressure) from a file.
10801083

1081-
if (just_read) return ! All run-time parameters have been read, so return.
1084+
call get_param(param_file, mdl, "INPUTDIR", inputdir, default=".")
1085+
inputdir = slasher(inputdir)
1086+
call get_param(param_file, mdl, "SURFACE_HEIGHT_IC_FILE", eta_srf_file,&
1087+
"The initial condition file for the surface height.", &
1088+
fail_if_missing=.not.just_read, do_not_log=just_read)
1089+
call get_param(param_file, mdl, "SURFACE_HEIGHT_IC_VAR", eta_srf_var, &
1090+
"The initial condition variable for the surface height.",&
1091+
default="SSH", do_not_log=just_read)
1092+
filename = trim(inputdir)//trim(eta_srf_file)
1093+
if (.not.just_read) &
1094+
call log_param(param_file, mdl, "INPUTDIR/SURFACE_HEIGHT_IC_FILE", filename)
1095+
1096+
call get_param(param_file, mdl, "SURFACE_HEIGHT_IC_SCALE", scale_factor, &
1097+
"A scaling factor to convert SURFACE_HEIGHT_IC_VAR into units of m", &
1098+
units="variable", default=1.0, scale=US%m_to_Z, do_not_log=just_read)
1099+
1100+
if (just_read) return ! All run-time parameters have been read, so return.
10821101

1083-
call MOM_read_data(filename, eta_srf_var, eta_sfc, G%Domain, scale=scale_factor)
1102+
call MOM_read_data(filename, eta_srf_var, eta_sfc, G%Domain, scale=scale_factor)
1103+
else
1104+
do j=js,je ; do i=is,ie
1105+
eta_sfc(i,j) = z_top_shelf(i,j)
1106+
enddo; enddo
1107+
endif
10841108

10851109
! Convert thicknesses to interface heights.
10861110
call find_eta(h, tv, G, GV, US, eta, dZref=G%Z_ref)
@@ -1201,6 +1225,88 @@ subroutine trim_for_ice(PF, G, GV, US, ALE_CSp, tv, h, just_read)
12011225

12021226
end subroutine trim_for_ice
12031227

1228+
!> Calculate the hydrostatic equilibrium position of the surface under an ice shelf
1229+
subroutine calc_sfc_displacement(PF, G, GV, US, mass_shelf, tv, h)
1230+
type(param_file_type), intent(in) :: PF !< Parameter file structure
1231+
type(ocean_grid_type), intent(in) :: G !< Ocean grid structure
1232+
type(verticalGrid_type), intent(in) :: GV !< Vertical grid structure
1233+
type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
1234+
real, dimension(SZI_(G),SZJ_(G)), &
1235+
intent(in) :: mass_shelf !< Ice shelf mass [R Z ~> kg m-2]
1236+
type(thermo_var_ptrs), intent(inout) :: tv !< Thermodynamics structure
1237+
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), &
1238+
intent(inout) :: h !< Layer thickness [H ~> m or kg m-2]
1239+
1240+
real :: z_top_shelf(SZI_(G),SZJ_(G)) ! The depth of the top interface under ice shelves [Z ~> m]
1241+
real, dimension(SZI_(G),SZJ_(G),SZK_(GV)+1) :: &
1242+
eta ! The free surface height that the model should use [Z ~> m].
1243+
! temporary arrays
1244+
real, dimension(SZK_(GV)) :: rho_col ! potential density in the column for use in ice
1245+
real, dimension(SZK_(GV)) :: rho_h ! potential density multiplied by thickness [R Z ~> kg m-2 ]
1246+
real, dimension(SZK_(GV)) :: h_tmp ! temporary storage for thicknesses [H ~> m]
1247+
real, dimension(SZK_(GV)) :: p_ref ! pressure for density [R Z ~> kg m-2]
1248+
real, dimension(SZK_(GV)+1) :: ei_tmp, ei_orig ! temporary storage for interface positions [Z ~> m]
1249+
real :: z_top, z_col, mass_disp, residual, tol
1250+
integer :: is, ie, js, je, k, nz, i, j, max_iter, iter
1251+
1252+
is = G%isc ; ie = G%iec ; js = G%jsc ; je = G%jec ; nz = GV%ke
1253+
1254+
1255+
tol = 0.001 ! The initialization tolerance for ice shelf initialization (m)
1256+
call get_param(PF, mdl, "ICE_SHELF_INITIALIZATION_Z_TOLERANCE", tol, &
1257+
"A initialization tolerance for the calculation of the static "// &
1258+
"ice shelf displacement (m) using initial temperature and salinity profile.",&
1259+
default=tol, units="m", scale=US%m_to_Z)
1260+
max_iter = 1e3
1261+
call MOM_mesg("Started calculating initial interface position under ice shelf ")
1262+
! Convert thicknesses to interface heights.
1263+
call find_eta(h, tv, G, GV, US, eta, dZref=G%Z_ref)
1264+
do j = js, je ; do i = is, ie
1265+
iter = 1
1266+
z_top_shelf(i,j) = 0.0
1267+
p_ref(:) = tv%p_ref
1268+
if (G%mask2dT(i,j) .gt. 0. .and. mass_shelf(i,j) .gt. 0.) then
1269+
call calculate_density(tv%T(i,j,:), tv%S(i,j,:), P_Ref, rho_col, tv%eqn_of_state)
1270+
z_top = min(max(-1.0*mass_shelf(i,j)/rho_col(1),-G%bathyT(i,j)),0.)
1271+
h_tmp = 0.0
1272+
z_col = 0.0
1273+
ei_tmp(1:nz+1)=eta(i,j,1:nz+1)
1274+
ei_orig(1:nz+1)=eta(i,j,1:nz+1)
1275+
do k=1,nz+1
1276+
if (ei_tmp(k)<z_top) ei_tmp(k)=z_top
1277+
enddo
1278+
mass_disp = 0.0
1279+
do k=1,nz
1280+
h_tmp(k) = max(ei_tmp(k)-ei_tmp(k+1),GV%Angstrom_H)
1281+
rho_h(k) = h_tmp(k) * rho_col(k)
1282+
mass_disp = mass_disp + rho_h(k)
1283+
enddo
1284+
residual = mass_shelf(i,j) - mass_disp
1285+
do while (abs(residual) .gt. tol .and. z_top .gt. -G%bathyT(i,j) .and. iter .lt. max_iter)
1286+
z_top=min(max(z_top-(residual*0.5e-3),-G%bathyT(i,j)),0.0)
1287+
h_tmp = 0.0
1288+
z_col = 0.0
1289+
ei_tmp(1:nz+1) = ei_orig(1:nz+1)
1290+
do k=1,nz+1
1291+
if (ei_tmp(k)<z_top) ei_tmp(k)=z_top
1292+
enddo
1293+
mass_disp = 0.0
1294+
do k=1,nz
1295+
h_tmp(k) = max(ei_tmp(k)-ei_tmp(k+1),GV%Angstrom_H)
1296+
rho_h(k) = h_tmp(k) * rho_col(k)
1297+
mass_disp = mass_disp + rho_h(k)
1298+
enddo
1299+
residual = mass_shelf(i,j) - mass_disp
1300+
iter = iter+1
1301+
end do
1302+
if (iter .ge. max_iter) call MOM_mesg("Warning: calc_sfc_displacement too many iterations.")
1303+
z_top_shelf(i,j) = z_top
1304+
endif
1305+
enddo; enddo
1306+
call MOM_mesg("Calling depress_surface ")
1307+
call depress_surface(h, G, GV, US, PF, tv, just_read=.false.,z_top_shelf=z_top_shelf)
1308+
call MOM_mesg("Finishing calling depress_surface ")
1309+
end subroutine calc_sfc_displacement
12041310

12051311
!> Adjust the layer thicknesses by removing the top of the water column above the
12061312
!! depth where the hydrostatic pressure matches p_surf
@@ -2597,6 +2703,7 @@ subroutine MOM_temp_salt_initialize_from_Z(h, tv, depth_tot, G, GV, US, PF, just
25972703
old_remap=remap_old_alg, answers_2018=answers_2018 )
25982704
call ALE_remap_scalar(remapCS, G, GV, nkd, h1, tmpS1dIn, h, tv%S, all_cells=remap_full_column, &
25992705
old_remap=remap_old_alg, answers_2018=answers_2018 )
2706+
26002707
deallocate( h1 )
26012708
deallocate( tmpT1dIn )
26022709
deallocate( tmpS1dIn )

0 commit comments

Comments
 (0)