Skip to content

Add hydrofracture mask input to ismip7_run/ismip7_ais test case - #989

Open
trhille wants to merge 11 commits into
MPAS-Dev:mainfrom
trhille:landice/ismip7_run_fracture
Open

trhille wants to merge 11 commits into
MPAS-Dev:mainfrom
trhille:landice/ismip7_run_fracture

Conversation

@trhille

@trhille trhille commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

This merge sets up the run to use hydrofracture mask forcing in the isimp7_run/ismip7_ais case. It also fixes an issue with the output path of the ismip7_forcing/fracture case being inconsistent with the atmosphere and ocean_thermal_forcing cases.

Checklist

  • User's Guide has been updated
  • Developer's Guide has been updated
  • API documentation in the Developer's Guide (api.rst) has any new or modified class, method and/or functions listed
  • Documentation has been built locally and changes look as expected
  • Document (in a comment titled Testing in this PR) any testing that was used to verify the changes

Note that this is branched from #978, so I'll rebase when that is merged. This depends on changes in MALI-Dev/E3SM#187.

trhille and others added 9 commits September 3, 2026 09:21
Handle the OCX scenario in the ismip7_forcing test group. OCX has no distinct
ESM model: it uses RACMO2.3p2-ERA (atmosphere) and EN4 (ocean) at data version
v1, with a named grid resolution (ocean-1000m) in the ocean file names.

get_params() now applies OCX-specific overrides (sources, versions, ocean grid
token) when scenario == OCX, so the [ismip7] model option is ignored and a
single config file drives both the atmosphere and ocean_thermal test cases.
Adds ismip7_forcing_ocx_gis.cfg and updates the user and developer docs.
Two fixes that block processing of forcing whose remapped files or source
directories differ from the CESM test data:

- Drop the ncremap-mangled 'time_bnds' variable when combining remapped
  files. ncremap collides the bounds 'nv' dimension with the destination
  mesh corner dimension and pads with a fill value that overflows time
  decoding. The steps build their own xtime and never use time_bnds.

- Skip input files whose trailing token is not a year (e.g. climatology
  averages like *_1978-2007_avg.nc) instead of crashing on int('avg').
Restructure processed-forcing output from
{output_base_path}/atmosphere_forcing/{model}_{scenario}/ (and the analogous
ocean_thermal_forcing path) to {output_base_path}/{group}/atmosphere/ and
{output_base_path}/{group}/ocean_thermal_forcing/, matching the directory
layout the ismip7_run test group globs for. 'group' is {model}_{scenario} for
the ESM scenarios and {scenario} (i.e. OCX) for OCX, whose atmosphere and
ocean sources differ but must share one directory. Documents the layout and
how to point ismip7_run's forcing_basepath / ocx_forcing_path at it.
…lation helper

process_smb.py, process_temperature.py, process_smb_gradient.py, and
process_temperature_gradient.py remapped the raw source file directly with
ncremap, unlike process_runoff.py, ocean_thermal, and the fracture pathway,
which all extrapolate fill/missing values on the source grid first. Without
that step, no-data cells near the ice-sheet margin (e.g. ocean cells in the
RACMO OCX source) leak the ~9.97e36 netCDF fill sentinel into valid
neighboring cells during conservative/bilinear remapping.

Add the same pre-remap extrapolation to the four affected steps.

Also promote the previously-duplicated extrapolate_source() (from
fracture/remap_utils.py, formerly re-implemented again in
ocean_thermal/process_thermal_forcing.py and process_runoff.py) to a single
shared compass.landice.tests.ismip7_forcing.remap_utils module, and update
all five call sites to use it instead of per-file private copies.
extrapolate_source moved from fracture.remap_utils to the shared
compass.landice.tests.ismip7_forcing.remap_utils module (828699b). Update
the api.rst autosummary entry accordingly; this was breaking the strict
Sphinx build (autosummary failed to import the moved symbol).
Enable the OCX (reanalysis) scenario for the Antarctic ice sheet:

- ice_sheet_params: add an 'ais' OCX override (RACMO atmosphere at v1,
  reanalysis ocean at v1 with no model token) and an ocean_choice_layout
  flag for the idiosyncratic AIS OCX ocean layout.
- process_thermal_forcing: assemble a list of ocean forcing sources so AIS
  OCX can process one or more ocean choices (main/cold/warm/vary), each in
  its own OCX_<choice> output directory; other cases are unchanged.
- ismip7_forcing.cfg: add ocean_choice option (AIS OCX only).
- remap_utils: write the extrapolated source file as CDF-5 so large 3D
  ocean thermal forcing fields aren't limited by the NetCDF3 per-variable
  size cap or HDF5 chunk limits that break ncremap.
- add ismip7_forcing_ocx_ais.cfg example config.
Ensure variables do not inherit encoding from source files.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Make atmosphere ocx output structure parallel to ocean forcing, using
symlinks to main atmosphere output directory. This makes the output
structure compatible with ismip7_run.
- Fix ismip7_forcing fracture output paths (excess_melt, lake_properties,
  shelf_collapse) to use {model}_{scenario}/{category}/ layout, matching
  atmosphere and ocean_thermal_forcing outputs.
- ismip7_ais: optionally apply the Path C calvingMask via a new
  fracture_basepath cfg option, enabling mask calving and the
  hydrofracture vulnerability gating added in MALI PR MPAS-Dev#187
  (config_require_extensional_stresses_for_mask_calving,
  config_calving_fracture_toughness). Disabled by default and per
  experiment when no mask file is found (e.g. ctrl, ocx).
@trhille trhille changed the title Add hydrofracture mask input to ismip7_run ais test case Add hydrofracture mask input to isimp7_run/ismip7_ais test case Sep 14, 2026
@trhille trhille changed the title Add hydrofracture mask input to isimp7_run/ismip7_ais test case Add hydrofracture mask input to ismip7_run/ismip7_ais test case Sep 15, 2026
- users_guide/ismip7_forcing: fix fracture output path examples to the
  corrected {model}_{scenario}/{category}/ layout; document it in the
  Output Layout section.
- users_guide/ismip7_run: document fracture_basepath and
  calving_fracture_toughness config options, the shelf_collapse forcing
  directory, and add a Mask Calving (Path C) section describing the
  hydrofracture vulnerability gating from MALI PR MPAS-Dev#187.
- developers_guide/ismip7_run: note the new mask calving setup step in
  SetUpExperiment.
…rofracture_forcing

- Remove the separate fracture_basepath cfg option; the Path C shelf
  collapse mask is now looked up at
  {forcing_basepath}/{model}_{scenario}/shelf_collapse/, the same tree
  used for atmosphere/ocean forcing.
- Add use_hydrofracture_forcing (default true) to toggle mask calving.
  historical, ctrl, and ocx scenarios never use hydrofracture forcing
  regardless of this setting.
- When use_hydrofracture_forcing is true for any other scenario, the
  mask file is now required: setup fails with an error if it is
  missing, instead of silently leaving mask calving off.
- Update users_guide/ismip7_run, users_guide/ismip7_forcing, and
  developers_guide/ismip7_run docs to match.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant