Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d5762ab
Fix AIS ismip7 melt streams
trhille Sep 29, 2026
3c8731f
Remove deprecated config_enable_timeAvgRestarts
trhille Oct 28, 2026
3e3d332
Reduce restart intervals from 1 year to 3 months
trhille Oct 28, 2026
ac49687
Fix typo in albany_input.yaml
trhille Oct 28, 2026
be202e6
Add extrusion velo limiter option for GIS
matthewhoffman Oct 30, 2026
b0aa529
Update strainrate multiplier for GIS after calibration
matthewhoffman Oct 30, 2026
2d7331a
Update paths for input and surfaceRef files for GIS
matthewhoffman Oct 30, 2026
47d4607
Update GIS cfg paths
matthewhoffman Oct 30, 2026
154f1a5
GIS: crev water=24; strainmult=4; CFLfrac=0.75
matthewhoffman Nov 2, 2026
6223627
Update final params: strainratemult=5, CFLfrac=0.5, remove extrusion opt
matthewhoffman Nov 4, 2026
e2b1d12
Update i.c. file to be consistent with new calving settings; rename p…
matthewhoffman Nov 4, 2026
9005baf
update region file to current mesh generation
matthewhoffman Nov 4, 2026
ea9ffe8
Update yaml friction settings to match GIS optimization
matthewhoffman Nov 5, 2026
03f4aab
Add monthly output stream with just thickness and surfaceSpeed
matthewhoffman Nov 5, 2026
bef2e31
Remove initial_only forcing frequency for GIS ctrl run
matthewhoffman Nov 6, 2026
058c577
Treat ctrl like other ismip7_run experiments
matthewhoffman Nov 6, 2026
65e55a6
Align GrIS 3D TF stream reference time with first chunk
matthewhoffman Nov 6, 2026
64f76d3
Partition graph.info in ismip7_run experiment setup
matthewhoffman Nov 7, 2026
22e2ab1
Add optional custom job script to ismip7_run
matthewhoffman Nov 7, 2026
14d0f7e
Set water depth to 0; update i.c. & surf ref files
matthewhoffman Nov 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions compass/landice/tests/ismip7_run/custom_job_script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import os
from importlib import resources

import numpy as np
from jinja2 import Template


def write_custom_job_script(config, section, work_dir, job_name, ntasks):
"""
Write ``job_script.custom.sh``, which runs MALI directly from the run
directory with a user-supplied environment, if requested in the config

Parameters
----------
config : compass.config.CompassConfigParser
Configuration options for the test case

section : str
The config section with the ``custom_job_script`` and
``custom_job_env_cmds`` options

work_dir : str
The work directory where the job script should be written

job_name : str
The name of the batch job

ntasks : int
The number of MPI tasks for the model run
"""
option = config.get(section, 'custom_job_script')
if option == 'None':
return
if option != 'custom':
raise ValueError(f"[{section}] custom_job_script must be 'None' or "
f"'custom', not '{option}'")

env_cmds = config.get(section, 'custom_job_env_cmds')
if env_cmds == 'None':
raise ValueError(f"[{section}] custom_job_env_cmds must be set when "
f"custom_job_script = custom")

if config.has_option('parallel', 'account'):
account = config.get('parallel', 'account')
else:
account = ''

if config.has_option('parallel', 'constraints'):
constraint = config.getlist('parallel', 'constraints')[0]
else:
constraint = ''

cores_per_node = config.getint('parallel', 'cores_per_node')
nodes = int(np.ceil(ntasks / cores_per_node))

model = os.path.basename(config.get('executables', 'model'))

template = Template(resources.read_text(
'compass.landice.tests.ismip7_run', 'job_script_custom.template'))
text = template.render(
job_name=job_name, account=account, nodes=f'{nodes}',
constraint=constraint, env_cmds=env_cmds, ntasks=ntasks, model=model,
parallel_executable=config.get('parallel', 'parallel_executable'))

with open(os.path.join(work_dir, 'job_script.custom.sh'), 'w') as handle:
handle.write(text)
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ANONYMOUS:
Regularization Value: 1.0e-4
LandIce BCs:
BC 0:
Cubrature Degree: 8
Cubature Degree: 8
Basal Friction Coefficient:
Type: Power Law
Power Exponent: 0.33333333333
Expand Down
21 changes: 11 additions & 10 deletions compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@ reference_surface_path = NotAvailable
# Path to the region mask file
region_mask_path = NotAvailable

# Path to the ocean thermal forcing climatology file for CTRL2015 runs.
# This is the constant-climate 30-year mean (2000-2029) thermal forcing.
# User has to supply if running ctrl experiments.
ctrl_tf_climatology_path = NotAvailable

# Path to the atmosphere climatology files for CTRL2015 runs.
# Directory containing constant-climate SMB, temperature, etc.
# User has to supply if running ctrl experiments.
ctrl_atm_climatology_path = NotAvailable

# Path to OCX (observationally constrained experiment) forcing.
# User has to supply if running the ocx experiment.
ocx_forcing_path = NotAvailable
Expand Down Expand Up @@ -104,5 +94,16 @@ fastiso_mask_filename = None
# Note: for now, resolution finer than 8 km yield numerically unstable results
fastiso_res_km = 8

# Optionally write job_script.custom.sh, which runs the MALI executable
# directly (in addition to the standard compass job_script.sh).
# Options: None (no custom script) or custom
custom_job_script = None

# Environment commands for the custom job script, as a single line, e.g.
# "source /path/to/modules.sh; export LD_LIBRARY_PATH=/path/lib:$$LD_LIBRARY_PATH"
# Write each literal $ as $$ so the config parser does not interpolate it.
# Required if custom_job_script = custom
custom_job_env_cmds = None

[parallel]
parallel_executable = srun --label --cpu-bind=cores
10 changes: 0 additions & 10 deletions compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais_test.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@ reference_surface_path = /global/cfs/cdirs/m4288/users/trhille/ISMIP7/forcing/AI
# Path to the region mask file
region_mask_path = /global/cfs/cdirs/fanssie/MALI_projects/ISMIP6-2300/initial_conditions/AIS_4to20km_20230105/AIS_4to20km_r01_20220907.regionMask_ismip6.nc

# Path to the ocean thermal forcing climatology file for CTRL2015 runs.
# This is the constant-climate 30-year mean (2000-2029) thermal forcing.
# User has to supply if running ctrl experiments.
ctrl_tf_climatology_path = NotAvailable

# Path to the atmosphere climatology files for CTRL2015 runs.
# Directory containing constant-climate SMB, temperature, etc.
# User has to supply if running ctrl experiments.
ctrl_atm_climatology_path = NotAvailable

# Path to OCX (observationally constrained experiment) forcing.
# User has to supply if running the ocx experiment.
ocx_forcing_path = NotAvailable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
config_adaptive_timestep_include_DCFL = .false.
config_adaptive_timestep_force_interval = '0000-01-00_00:00:00'
config_timeaveraging_interval = '0001-00-00_00:00:00'
config_enable_timeAvgRestarts = .false.

config_do_restart = .true.
config_restart_timestamp_name = 'restart_timestamp'
Expand Down
Loading
Loading