ismip7_run
The ismip7_run test group
(compass.landice.tests.ismip7_run) sets up experiments from
the ISMIP7 experimental protocol for both the Antarctic Ice Sheet (AIS)
and the Greenland Ice Sheet (GrIS). Optionally, the AIS test case
supports coupled MALI–Sea Level Model (SLM) simulations and/or coupled
MALI–FastIsostasy (regional bedrock/GIA) simulations.
(see ismip7_run).
framework
The ismip7_run test group
(compass.landice.tests.ismip7_run.Ismip7Run) registers two
test cases:
There is little shared functionality between the two test cases at
present, with one exception: GIA coupling (SLM vs. FastIsostasy vs. none)
is selected by a single gia_model config option (none, 1dSLM,
or FastIsostasy – mutually exclusive by construction, since only one
can be selected at a time) rather than two independent booleans, and this
is parsed by
compass.landice.tests.ismip7_run.gia_options.parse_gia_model(),
which returns (sea_level_model, fastisostasy) booleans for the rest of
the code to use. This helper is shared (rather than living inside either
test case’s own package) so both ismip7_ais and ismip7_gris can use
it symmetrically as siblings, without one importing from the other’s
internals if/when GrIS gains GIA coupling options of its own –
parse_gia_model takes the config section name as a parameter
(ismip7_run_ais by default) for exactly this reason. It also lives in
its own module (rather than in ismip7_run/__init__.py) specifically to
avoid a circular import: ismip7_ais/__init__.py and
ismip7_gris/__init__.py each import their own step classes
(CreateSlmMappingFiles, CreateFastIsoMappingFiles, SetUpExperiment),
and those step modules also need to call it. Other shared functions may be
added here in the future if more needed functionality can be generalized
across the two test cases.
ismip7_ais
The compass.landice.tests.ismip7_run.ismip7_ais.Ismip7Ais
test case sets up an ensemble of ISMIP7 Antarctica simulations
(standalone MALI or coupled MALI-SLM).
The constructor (__init__) does nothing other than allow the
ismip7_ais test case to be listed by compass list without having
all individual experiments listed in a verbose listing. Each individual
experiment is a step rather than a test case to avoid excessive
subdirectories.
The configure method parses the exp_list config option from the
[ismip7_run_ais] section. It supports:
all— all 11 core experimentshistorical— just the two historical runsprojections— the six SSP projection runsctrl— the two CTRL2015 runsA comma-delimited list of specific experiment names
Each selected experiment is added as a
SetUpExperiment
step and immediately removed from steps_to_run (experiments should be
submitted individually, not run through the test case).
The run method raises an error instructing the user to submit batch
jobs for each experiment individually.
set_up_experiment (AIS)
The class
compass.landice.tests.ismip7_run.ismip7_ais.set_up_experiment.SetUpExperiment
defines a step for a single ISMIP7 AIS experiment.
The setup method sets up the experiment directory by:
Creating symlinks to forcing files from the conventional path layout under
forcing_basepath.Symlinking the
reference_surface_pathfile into the run directory, where it is used by MALI when applying lapse rates.Copying and populating the streams template with the correct forcing filenames and intervals (monthly for SMB/temperature/runoff, annual for lapse rates and thermal forcing,
initial_onlyfor melt parameters).Processing the namelist template for the experiment’s time period and restart frequency.
Adding calving-specific streams (face melting, von Mises params) if configured.
If
use_hydrofracture_forcingis true and the experiment’s scenario is nothistorical,ctrl, orocx, looking for a single Path Cice_shelf_collapse_mask_*.ncfile under{forcing_basepath}/{model}_{scenario}/shelf_collapse/(from fracture). If found, it is symlinked in, thestreams.mask_calvingstream is added, andconfig_apply_calving_mask,config_restore_calving_front,config_require_extensional_stresses_for_mask_calving, andconfig_calving_fracture_toughnessare set accordingly. If not found, setup fails with an error, since the mask is required wheneveruse_hydrofracture_forcingis true for that scenario.Creating a restart symlink for projection experiments pointing to the corresponding ESM’s historical restart (
../historical_{model}/rst.2015-01-01.nc).Setting up CTRL2015 experiments with constant-climate forcing (
initial_onlyintervals).Setting up the OCX experiment with reanalysis-based forcing.
If SLM coupling is enabled, adding a
CreateSlmMappingFilesstep and writing the SLM namelist from the Jinja2 template.If FastIsostasy coupling is enabled, adding a
CreateFastIsoMappingFilesstep; writing the FastIsostasy namelist from the Jinja2 template, includingconfig_fastisostasy_grid_resolution(derived fromfastiso_res_km, converted from km to m, so the two stay in sync automatically) andmask_file(rendered fromfastiso_mask_filename, or the literal string"None"if that config option is left asNone); and symlinking the FastIsostasy mapping files, the Earth-structure rheology file (fastiso_earth_structure_filename), and – if configured – the interactive-sea-level activation mask file (fastiso_mask_filename) into the run directory. Both input files are expected under the same directory,fastiso_path.Generating a
graph.infofile and a SLURM job script.Symlinking the compass load script into the run directory.
The run method executes MALI for the given experiment.
create_slm_mapping_files
The class
compass.landice.tests.ismip7_run.ismip7_ais.create_slm_mapping_files.CreateSlmMappingFiles
creates mapping files between the MALI mesh and the SLM grid. This step
is only added when sea-level model coupling is enabled.
create_fastiso_mapping_files
The class
compass.landice.tests.ismip7_run.ismip7_ais.create_fastiso_mapping_files.CreateFastIsoMappingFiles
creates mapping files between the MALI mesh and the regular grid
FastIsostasy runs on. This step is only added when FastIsostasy coupling
is enabled.
Its run method:
Creates a minimal ISMIP7-standard regular grid file (x/y projected coordinates only) at the requested resolution (
compass.landice.tests.ismip7_run.ismip7_ais.create_fastiso_mapping_files.create_ismip7_grid_file()), using the same domain extents as the ISMIP7 standard AIS/GrIS output grids.Builds SCRIP files for both the FastIsostasy grid (via
mpas_tools.scrip.from_planar) and the MALI mesh (viampas_tools.scrip.from_mpas).Generates two
ESMF_RegridWeightGenmapping files: a conservative MALI → FastIsostasy mapping file (used to remap ice thickness and bed topography onto the FastIsostasy grid) and a bilinear FastIsostasy → MALI mapping file (used to remap the updated bed topography back onto the MALI mesh).
ismip7_gris
The compass.landice.tests.ismip7_run.ismip7_gris.Ismip7Gris
test case mirrors ismip7_ais but for the Greenland Ice Sheet.
Key differences from the AIS test case:
Ocean thermal forcing is always 2D (depth-averaged)
ismip6_2dThermalForcing; settinguse_3d_thermal_forcing = truein[ismip7_run_gris]additionally enables the AIS-style 3D convention (ismip6shelfMelt_3dThermalForcing+ismip6shelfMelt_zOcean, plus theismip7_paramsstream forismip6shelfMelt_deltaT/_basin/_gamma0read frommelt_params_path), consuming the output of thebuild_3d_thermal_forcingstep inlandice/ismip7_forcing/ocean_thermal. Both 2D and 3D forcings are delivered to MALI simultaneously when 3D is enabled.No sea-level model coupling.
Default calving method is
crevasse_depth.Config section is
[ismip7_run_gris].
set_up_experiment (GrIS)
The class
compass.landice.tests.ismip7_run.ismip7_gris.set_up_experiment.SetUpExperiment
follows the same logic as the AIS version, with the differences noted
above (no SLM support). The setup always globs for *2dThermalForcing_*.nc
(a single file) and symlinks it for the ismip7_TF stream to read
ismip6_2dThermalForcing. When use_3d_thermal_forcing is true, it
additionally globs *3dThermalForcing_*.nc (a chunked series), symlinks the
whole series, and adds an ismip7_TF_3d stream to read
ismip6shelfMelt_3dThermalForcing + ismip6shelfMelt_zOcean via a $Y
template and filename_interval. Both 2D and 3D GrIS thermal forcing use
monthly input intervals. When 3D forcing is enabled, the facemelting routine
still uses the ismip6_2dThermalForcing field to avoid any artificats introduced
by constructing the 3d fields.