Skip to content

Commit ce3bffb

Browse files
committed
Use land-ice pressure to determine ice draft
This was previously only the case for thin-film cases. To accommodate this, we make the minimum ocean column thickness 10 m for non-thin-film cases. To make the different values for thin-film and non-thin-film cases more obvious, we use separate config options for the two.
1 parent aa26bd4 commit ce3bffb

File tree

3 files changed

+29
-31
lines changed

3 files changed

+29
-31
lines changed

polaris/ocean/tasks/isomip_plus/init/init.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from polaris.ocean.ice_shelf import (
1010
compute_freezing_temperature,
1111
compute_land_ice_draft_from_pressure,
12-
compute_land_ice_pressure_from_draft,
1312
)
1413
from polaris.ocean.vertical import init_vertical_coord
1514
from polaris.ocean.viz import compute_transect, plot_transect
@@ -109,7 +108,14 @@ def _compute_init_topo(self):
109108
section = config['isomip_plus_init']
110109
min_levels = section.getint('minimum_levels')
111110
min_layer_thickness = section.getfloat('min_layer_thickness')
112-
min_column_thickness = section.getfloat('min_column_thickness')
111+
if thin_film:
112+
min_column_thickness = section.getfloat(
113+
'min_column_thickness_thin_film'
114+
)
115+
else:
116+
min_column_thickness = section.getfloat(
117+
'min_column_thickness_no_thin_film'
118+
)
113119
min_land_ice_fraction = section.getfloat('min_land_ice_fraction')
114120

115121
ds_topo = xr.open_dataset('topo.nc')
@@ -143,31 +149,17 @@ def _compute_init_topo(self):
143149

144150
ds_init['landIceGroundedFraction'] = ds_topo['landIceGroundedFraction']
145151

146-
if thin_film:
147-
# start from landIcePressure and compute landIceDraft
148-
ds_init['landIcePressure'] = ds_topo['landIcePressure']
149-
150-
land_ice_draft = compute_land_ice_draft_from_pressure(
151-
land_ice_pressure=ds_topo.landIcePressure,
152-
modify_mask=ds_topo.landIcePressure > 0.0,
153-
)
154-
155-
land_ice_draft = np.maximum(
156-
ds_topo.bedrockTopography, land_ice_draft
157-
)
158-
159-
ds_init['landIceDraft'] = land_ice_draft
152+
# start from landIcePressure and compute landIceDraft
153+
ds_init['landIcePressure'] = ds_topo['landIcePressure']
160154

161-
else:
162-
# start form landIceDraft and compute landIcePressure
163-
ds_init['landIceDraft'] = ds_topo['landIceDraft']
155+
land_ice_draft = compute_land_ice_draft_from_pressure(
156+
land_ice_pressure=ds_topo.landIcePressure,
157+
modify_mask=ds_topo.landIcePressure > 0.0,
158+
)
164159

165-
land_ice_pressure = compute_land_ice_pressure_from_draft(
166-
land_ice_draft=ds_topo.landIceDraft,
167-
modify_mask=ds_topo.landIceDraft < 0.0,
168-
)
160+
land_ice_draft = np.maximum(ds_topo.bedrockTopography, land_ice_draft)
169161

170-
ds_init['landIcePressure'] = land_ice_pressure
162+
ds_init['landIceDraft'] = land_ice_draft
171163

172164
ds_init['ssh'] = ds_init.landIceDraft
173165

@@ -303,7 +295,15 @@ def _plot(self):
303295
Plot several fields from the initial condition
304296
"""
305297
section = self.config['isomip_plus_init']
306-
min_column_thickness = section.getfloat('min_column_thickness')
298+
thin_film = self.thin_film
299+
if thin_film:
300+
min_column_thickness = section.getfloat(
301+
'min_column_thickness_thin_film'
302+
)
303+
else:
304+
min_column_thickness = section.getfloat(
305+
'min_column_thickness_no_thin_film'
306+
)
307307
min_layer_thickness = section.getfloat('min_layer_thickness')
308308

309309
tol = 1e-10

polaris/ocean/tasks/isomip_plus/isomip_plus_init.cfg

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ minimum_levels = 3
5252
# The minimum allowable layer thickness
5353
min_layer_thickness = 0.0
5454

55-
# Minimum thickness of the initial ocean column (to prevent 'drying')
56-
min_column_thickness = 1e-3
55+
# Minimum thickness of the initial ocean column (to prevent 'drying') without
56+
# and with a thin film region
57+
min_column_thickness_no_thin_film = 10.0
58+
min_column_thickness_thin_film = 1e-3
5759

5860
# Minimum fraction of a cell that contains land ice in order for it to be
5961
# considered a land-ice cell by MPAS-Ocean (landIceMask == 1).

polaris/ocean/tasks/isomip_plus/isomip_plus_test.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,8 @@ def configure(self):
131131
'polaris.ocean.tasks.isomip_plus', 'isomip_plus_init.cfg'
132132
)
133133
vertical_coordinate = self.vertical_coordinate
134-
thin_film = self.thin_film
135134
experiment = self.experiment
136135

137-
if thin_film:
138-
config.set('isomip_plus', 'min_column_thickness', '1e-3')
139-
140136
# for most coordinates, use the config options, which is 36 layers
141137
levels = None
142138
if vertical_coordinate == 'single-layer':

0 commit comments

Comments
 (0)