Skip to content

Commit

Permalink
Fix ice thickness and pressure where above flotation
Browse files Browse the repository at this point in the history
We don't want ice thickness and pressure to exceed their flotation
values.  Previously, we were only making sure that ice draft did
not exceed its flotation value (i.e. the draft was above the bed).
  • Loading branch information
xylar committed Aug 28, 2024
1 parent a06b08e commit 3ddbaa1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions compass/ocean/mesh/remap_topography.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,18 @@ def run(self):
ds_out[var] = xr.where(valid, ds_out[var] / norm, 0.)

thickness = ds_out.landIceThkObserved
bed = ds_out.bed_elevation
flotation_thickness = - (ocean_density / ice_density) * bed
# not allowed to be thicker than the flotation thickness
thickness = np.minimum(thickness, flotation_thickness)
ds_out['landIceThkObserved'] = thickness

ds_out['landIcePressureObserved'] = ice_density * g * thickness

# compute the ice draft to be consistent with the land ice pressure
# and using E3SM's density of seawater
draft = - (ice_density / ocean_density) * thickness
bed = ds_out.bed_elevation

# can't be deeper than the bed
draft = xr.where(draft >= bed, draft, bed)

ds_out['landIceDraftObserved'] = draft
ds_out['landIceDraftObserved'] = \
- (ice_density / ocean_density) * thickness

write_netcdf(ds_out, 'topography_remapped.nc')

0 comments on commit 3ddbaa1

Please sign in to comment.