Skip to content

Update ISMIP7 processing to handle OCX forcing - #978

Open
trhille wants to merge 5 commits into
MPAS-Dev:mainfrom
trhille:landice/ismip7_ocx_forcing
Open

Update ISMIP7 processing to handle OCX forcing#978
trhille wants to merge 5 commits into
MPAS-Dev:mainfrom
trhille:landice/ismip7_ocx_forcing

Conversation

@trhille

@trhille trhille commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Update ismip7_forcing test group to handle OCX forcing, which has a slightly different directory structure from other forcings. Extrapolate forcings into missing data cells before interpolating to MALI mesh. Also unify the structure for ismip7_forcing output with that expected as input for ismip7_run.

Checklist

  • User's Guide has been updated
  • Developer's Guide has been updated
  • 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

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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant