Update ISMIP7 processing to handle OCX forcing - #978
Open
trhille wants to merge 5 commits into
Open
Conversation
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).
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update
ismip7_forcingtest 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 forismip7_forcingoutput with that expected as input forismip7_run.Checklist
Testingin this PR) any testing that was used to verify the changes