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 experiments

  • historical — just the two historical runs

  • projections — the six SSP projection runs

  • ctrl — the two CTRL2015 runs

  • A 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:

  1. Creating symlinks to forcing files from the conventional path layout under forcing_basepath.

  2. Symlinking the reference_surface_path file into the run directory, where it is used by MALI when applying lapse rates.

  3. 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_only for melt parameters).

  4. Processing the namelist template for the experiment’s time period and restart frequency.

  5. Adding calving-specific streams (face melting, von Mises params) if configured.

  6. If use_hydrofracture_forcing is true and the experiment’s scenario is not historical, ctrl, or ocx, looking for a single Path C ice_shelf_collapse_mask_*.nc file under {forcing_basepath}/{model}_{scenario}/shelf_collapse/ (from fracture). If found, it is symlinked in, the streams.mask_calving stream is added, and config_apply_calving_mask, config_restore_calving_front, config_require_extensional_stresses_for_mask_calving, and config_calving_fracture_toughness are set accordingly. If not found, setup fails with an error, since the mask is required whenever use_hydrofracture_forcing is true for that scenario.

  7. Creating a restart symlink for projection experiments pointing to the corresponding ESM’s historical restart (../historical_{model}/rst.2015-01-01.nc).

  8. Setting up CTRL2015 experiments with constant-climate forcing (initial_only intervals).

  9. Setting up the OCX experiment with reanalysis-based forcing.

  10. If SLM coupling is enabled, adding a CreateSlmMappingFiles step and writing the SLM namelist from the Jinja2 template.

  11. If FastIsostasy coupling is enabled, adding a CreateFastIsoMappingFiles step; writing the FastIsostasy namelist from the Jinja2 template, including config_fastisostasy_grid_resolution (derived from fastiso_res_km, converted from km to m, so the two stay in sync automatically) and mask_file (rendered from fastiso_mask_filename, or the literal string "None" if that config option is left as None); 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.

  12. Generating a graph.info file and a SLURM job script.

  13. 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:

  1. 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.

  2. Builds SCRIP files for both the FastIsostasy grid (via mpas_tools.scrip.from_planar) and the MALI mesh (via mpas_tools.scrip.from_mpas).

  3. Generates two ESMF_RegridWeightGen mapping 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; setting use_3d_thermal_forcing = true in [ismip7_run_gris] additionally enables the AIS-style 3D convention (ismip6shelfMelt_3dThermalForcing + ismip6shelfMelt_zOcean, plus the ismip7_params stream for ismip6shelfMelt_deltaT/_basin/_gamma0 read from melt_params_path), consuming the output of the build_3d_thermal_forcing step in landice/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.