From 2398fc9a483ac573873539114e212ff937b68e4a Mon Sep 17 00:00:00 2001 From: Trevor Hillebrand Date: Mon, 21 Sep 2026 16:46:23 -0600 Subject: [PATCH 01/14] Add input streams for damage calving, strain rate scaling, and melt params For AIS: - Add damageCalvingThreshold input stream with conditional configuration - Add ISMIP7 melt parameter stream (ismip7shelfMelt_K, ismip7shelfMelt_basin) - Rename existing melt stream from ismip7_params to ismip6_melt_params for clarity For GrIS: - Add calvingStrainRateScaling input stream with conditional configuration - Add ISMIP6 melt parameter stream (ismip6shelfMelt_deltaT, _basin, _gamma0) All new streams are conditionally added via config flags and follow existing patterns for symlink creation and stream template replacement. Co-Authored-By: Claude Sonnet 4.5 --- .../ismip7_ais/set_up_experiment.py | 22 +++++++++++++++++++ .../streams.damage_calving_threshold | 11 ++++++++++ .../ismip7_ais/streams.landice.template | 11 +++++++++- .../ismip7_gris/set_up_experiment.py | 22 +++++++++++++++++++ .../streams.calving_strain_rate_scaling | 11 ++++++++++ .../ismip7_gris/streams.landice.template | 10 +++++++++ 6 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 compass/landice/tests/ismip7_run/ismip7_ais/streams.damage_calving_threshold create mode 100644 compass/landice/tests/ismip7_run/ismip7_gris/streams.calving_strain_rate_scaling diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py b/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py index b51d1ff72b..1784c15e51 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py +++ b/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py @@ -69,6 +69,10 @@ def setup(self): # noqa: C901 calving_fracture_toughness = section.get( 'calving_fracture_toughness') sea_level_model, fastisostasy = parse_gia_model(config) + use_damage_calving = section.getboolean('use_damage_calving') + damage_calving_threshold_path = section.get( + 'damage_calving_threshold_path') + sea_level_model = section.getboolean('sea_level_model') exp_info = self.exp_info scenario = exp_info['scenario'] @@ -110,6 +114,14 @@ def setup(self): # noqa: C901 os.path.join(self.work_dir, os.path.basename(reference_surface_path))) + # Symlink damage calving threshold file if using damage calving + if use_damage_calving: + damage_calving_threshold_fname = os.path.split( + damage_calving_threshold_path)[-1] + os.symlink(damage_calving_threshold_path, + os.path.join(self.work_dir, + damage_calving_threshold_fname)) + # --- Find and symlink forcing files --- if scenario == 'ctrl': # Control run: use climatology files @@ -354,6 +366,16 @@ def setup(self): # noqa: C901 self.add_namelist_options(options=options, out_name='namelist.landice') + # Damage calving threshold options + if use_damage_calving: + damage_stream_replacements = { + 'input_file_damage_calving_threshold': + damage_calving_threshold_fname} + self.add_streams_file( + resource_location, 'streams.damage_calving_threshold', + out_name='streams.landice', + template_replacements=damage_stream_replacements) + # Sea-level model options if sea_level_model: slm_input_ice = section.get('slm_input_ice') diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/streams.damage_calving_threshold b/compass/landice/tests/ismip7_run/ismip7_ais/streams.damage_calving_threshold new file mode 100644 index 0000000000..5ddd3f8239 --- /dev/null +++ b/compass/landice/tests/ismip7_run/ismip7_ais/streams.damage_calving_threshold @@ -0,0 +1,11 @@ + + + + + + + diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/streams.landice.template b/compass/landice/tests/ismip7_run/ismip7_ais/streams.landice.template index 03de43b3db..c62978289a 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/streams.landice.template +++ b/compass/landice/tests/ismip7_run/ismip7_ais/streams.landice.template @@ -82,7 +82,7 @@ - + + + + + + + + + + + diff --git a/compass/landice/tests/ismip7_run/ismip7_gris/streams.landice.template b/compass/landice/tests/ismip7_run/ismip7_gris/streams.landice.template index 26f74dd7c0..d6e06ba400 100644 --- a/compass/landice/tests/ismip7_run/ismip7_gris/streams.landice.template +++ b/compass/landice/tests/ismip7_run/ismip7_gris/streams.landice.template @@ -81,6 +81,16 @@ + + + + + + Date: Mon, 21 Sep 2026 16:48:18 -0600 Subject: [PATCH 02/14] Add config options for new input streams Add configuration options with defaults for: - AIS: use_damage_calving and damage_calving_threshold_path - GrIS: use_calving_strain_rate_scaling and calving_strain_rate_scaling_path All options default to false/NotAvailable to maintain backward compatibility. Updated both production and test config files. Co-Authored-By: Claude Sonnet 4.5 --- compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg | 7 +++++++ .../tests/ismip7_run/ismip7_ais/ismip7_ais_test.cfg | 7 +++++++ .../landice/tests/ismip7_run/ismip7_gris/ismip7_gris.cfg | 7 +++++++ .../tests/ismip7_run/ismip7_gris/ismip7_gris_test.cfg | 7 +++++++ 4 files changed, 28 insertions(+) diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg b/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg index 3449f9f865..c257f76dc9 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg +++ b/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg @@ -78,6 +78,13 @@ calving_fracture_toughness = 2.0e5 # FastIsostasy - couple to FastIsostasy (uses the fastiso_* options below) gia_model = none +# Whether to use damage-based calving with a spatially-varying threshold +use_damage_calving = false + +# Path to the file containing the damage calving threshold field. +# Only required if use_damage_calving is set to true. +damage_calving_threshold_path = NotAvailable + # Path to the directory containing globally defined ice thickness # field for the sea-level model slm_input_ice = NotAvailable diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais_test.cfg b/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais_test.cfg index 3810fcb549..8b2c6164d5 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais_test.cfg +++ b/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais_test.cfg @@ -66,6 +66,13 @@ von_mises_parameter_path = NotAvailable # FastIsostasy - couple to FastIsostasy (uses the fastiso_* options below) gia_model = FastIsostasy +# Whether to use damage-based calving with a spatially-varying threshold +use_damage_calving = false + +# Path to the file containing the damage calving threshold field. +# Only required if use_damage_calving is set to true. +damage_calving_threshold_path = NotAvailable + # Path to the directory containing globally defined ice thickness # field for the sea-level model slm_input_ice = NotAvailable diff --git a/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris.cfg b/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris.cfg index a3b6a6229a..43711149bd 100644 --- a/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris.cfg +++ b/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris.cfg @@ -45,5 +45,12 @@ calving_method = restore # Path to the von Mises parameter fields. von_mises_parameter_path = NotAvailable +# Whether to use spatially-varying calving strain rate scaling +use_calving_strain_rate_scaling = false + +# Path to the file containing the calving strain rate scaling field. +# Only required if use_calving_strain_rate_scaling is set to true. +calving_strain_rate_scaling_path = NotAvailable + [parallel] parallel_executable = srun --label --cpu-bind=cores diff --git a/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris_test.cfg b/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris_test.cfg index 9287dc1a1d..ae8ffa6148 100644 --- a/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris_test.cfg +++ b/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris_test.cfg @@ -45,5 +45,12 @@ calving_method = restore # Path to the von Mises parameter fields. von_mises_parameter_path = NotAvailable +# Whether to use spatially-varying calving strain rate scaling +use_calving_strain_rate_scaling = false + +# Path to the file containing the calving strain rate scaling field. +# Only required if use_calving_strain_rate_scaling is set to true. +calving_strain_rate_scaling_path = NotAvailable + [parallel] parallel_executable = srun --label --cpu-bind=cores From 06987c9eb486576fd9554c9414ff7e2ea9addead Mon Sep 17 00:00:00 2001 From: Trevor Hillebrand Date: Mon, 21 Sep 2026 16:51:18 -0600 Subject: [PATCH 03/14] Remove boolean config flags; control via namelist instead Remove use_damage_calving and use_calving_strain_rate_scaling config options. Streams are now added automatically when valid file paths are provided (not 'NotAvailable' and file exists). Actual activation of these features is controlled through MALI namelist options, simplifying the compass configuration. Co-Authored-By: Claude Sonnet 4.5 --- .../tests/ismip7_run/ismip7_ais/ismip7_ais.cfg | 3 ++- .../tests/ismip7_run/ismip7_ais/ismip7_ais_test.cfg | 3 ++- .../ismip7_run/ismip7_ais/set_up_experiment.py | 11 +++++++---- .../tests/ismip7_run/ismip7_gris/ismip7_gris.cfg | 6 ++---- .../ismip7_run/ismip7_gris/ismip7_gris_test.cfg | 6 ++---- .../ismip7_run/ismip7_gris/set_up_experiment.py | 13 +++++++------ 6 files changed, 22 insertions(+), 20 deletions(-) diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg b/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg index c257f76dc9..555a70d823 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg +++ b/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg @@ -82,7 +82,8 @@ gia_model = none use_damage_calving = false # Path to the file containing the damage calving threshold field. -# Only required if use_damage_calving is set to true. +# If provided, the damageCalvingThreshold stream will be added. +# Actual use is controlled by namelist options in MALI. damage_calving_threshold_path = NotAvailable # Path to the directory containing globally defined ice thickness diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais_test.cfg b/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais_test.cfg index 8b2c6164d5..be38585e1d 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais_test.cfg +++ b/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais_test.cfg @@ -70,7 +70,8 @@ gia_model = FastIsostasy use_damage_calving = false # Path to the file containing the damage calving threshold field. -# Only required if use_damage_calving is set to true. +# If provided, the damageCalvingThreshold stream will be added. +# Actual use is controlled by namelist options in MALI. damage_calving_threshold_path = NotAvailable # Path to the directory containing globally defined ice thickness diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py b/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py index 1784c15e51..be62eae1fd 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py +++ b/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py @@ -114,13 +114,16 @@ def setup(self): # noqa: C901 os.path.join(self.work_dir, os.path.basename(reference_surface_path))) - # Symlink damage calving threshold file if using damage calving - if use_damage_calving: + # Symlink damage calving threshold file if path is provided + if (damage_calving_threshold_path != 'NotAvailable' and + os.path.exists(damage_calving_threshold_path)): damage_calving_threshold_fname = os.path.split( damage_calving_threshold_path)[-1] os.symlink(damage_calving_threshold_path, os.path.join(self.work_dir, damage_calving_threshold_fname)) + else: + damage_calving_threshold_fname = None # --- Find and symlink forcing files --- if scenario == 'ctrl': @@ -366,8 +369,8 @@ def setup(self): # noqa: C901 self.add_namelist_options(options=options, out_name='namelist.landice') - # Damage calving threshold options - if use_damage_calving: + # Damage calving threshold stream + if damage_calving_threshold_fname is not None: damage_stream_replacements = { 'input_file_damage_calving_threshold': damage_calving_threshold_fname} diff --git a/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris.cfg b/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris.cfg index 43711149bd..dae2ea46a6 100644 --- a/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris.cfg +++ b/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris.cfg @@ -45,11 +45,9 @@ calving_method = restore # Path to the von Mises parameter fields. von_mises_parameter_path = NotAvailable -# Whether to use spatially-varying calving strain rate scaling -use_calving_strain_rate_scaling = false - # Path to the file containing the calving strain rate scaling field. -# Only required if use_calving_strain_rate_scaling is set to true. +# If provided, the calvingStrainRateScaling stream will be added. +# Actual use is controlled by namelist options in MALI. calving_strain_rate_scaling_path = NotAvailable [parallel] diff --git a/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris_test.cfg b/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris_test.cfg index ae8ffa6148..79ba361995 100644 --- a/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris_test.cfg +++ b/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris_test.cfg @@ -45,11 +45,9 @@ calving_method = restore # Path to the von Mises parameter fields. von_mises_parameter_path = NotAvailable -# Whether to use spatially-varying calving strain rate scaling -use_calving_strain_rate_scaling = false - # Path to the file containing the calving strain rate scaling field. -# Only required if use_calving_strain_rate_scaling is set to true. +# If provided, the calvingStrainRateScaling stream will be added. +# Actual use is controlled by namelist options in MALI. calving_strain_rate_scaling_path = NotAvailable [parallel] diff --git a/compass/landice/tests/ismip7_run/ismip7_gris/set_up_experiment.py b/compass/landice/tests/ismip7_run/ismip7_gris/set_up_experiment.py index de8c70cb42..3c6439210f 100644 --- a/compass/landice/tests/ismip7_run/ismip7_gris/set_up_experiment.py +++ b/compass/landice/tests/ismip7_run/ismip7_gris/set_up_experiment.py @@ -59,8 +59,6 @@ def setup(self): # noqa: C901 reference_surface_path = section.get('reference_surface_path') reference_surface_fname = os.path.split(reference_surface_path)[-1] calving_method = section.get('calving_method') - use_calving_strain_rate_scaling = section.getboolean( - 'use_calving_strain_rate_scaling') calving_strain_rate_scaling_path = section.get( 'calving_strain_rate_scaling_path') @@ -100,13 +98,16 @@ def setup(self): # noqa: C901 os.path.join(self.work_dir, os.path.basename(reference_surface_path))) - # Symlink calving strain rate scaling file if using it - if use_calving_strain_rate_scaling: + # Symlink calving strain rate scaling file if path is provided + if (calving_strain_rate_scaling_path != 'NotAvailable' and + os.path.exists(calving_strain_rate_scaling_path)): calving_strain_rate_scaling_fname = os.path.split( calving_strain_rate_scaling_path)[-1] os.symlink(calving_strain_rate_scaling_path, os.path.join(self.work_dir, calving_strain_rate_scaling_fname)) + else: + calving_strain_rate_scaling_fname = None # --- Find and symlink forcing files --- if scenario == 'ctrl': @@ -293,8 +294,8 @@ def setup(self): # noqa: C901 out_name='streams.landice', template_replacements=vM_stream_replacements) - # Calving strain rate scaling options - if use_calving_strain_rate_scaling: + # Calving strain rate scaling stream + if calving_strain_rate_scaling_fname is not None: calving_scaling_stream_replacements = { 'input_file_calving_strain_rate_scaling': calving_strain_rate_scaling_fname} From 8600b01cdad063f7bf6e4a00b3426a16b298f3b8 Mon Sep 17 00:00:00 2001 From: Trevor Hillebrand Date: Mon, 21 Sep 2026 16:55:50 -0600 Subject: [PATCH 04/14] Update ISMIP7 namelist settings per issue #991 AIS changes: - Use FCT advection with 3rd order and coefficient 1.0 - Set calving to crevasse_depth with mask and damage settings - Enable Runge-Kutta time integration (order 3) - Change sub-shelf melt from ISMIP6 to ISMIP7 GrIS changes: - 3rd-order FCT with RK2 time stepping - Add config_calving_strainrate_scaling_source = 'data' - Change sub-shelf melt from 'none' to ISMIP6 Co-Authored-By: Claude Sonnet 4.5 --- .../ismip7_run/ismip7_ais/namelist.landice | 20 ++++++++++++------- .../ismip7_run/ismip7_gris/namelist.landice | 3 ++- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/namelist.landice b/compass/landice/tests/ismip7_run/ismip7_ais/namelist.landice index b73de90eb6..4e1bef9ee3 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/namelist.landice +++ b/compass/landice/tests/ismip7_run/ismip7_ais/namelist.landice @@ -5,8 +5,10 @@ config_nonconvergence_error = .false. config_flowParamA_calculation = 'PB1982' - config_thickness_advection = 'fo' - config_tracer_advection = 'fo' + config_thickness_advection = 'fct' + config_tracer_advection = 'fct' + config_horiz_tracer_adv_order = 3 + config_advection_coef_3rd_order = 1.0 config_zero_sfcMassBalApplied_over_bare_land = .true. config_apply_smb_sat_lapse_rate = .true. @@ -16,11 +18,13 @@ config_SLM_to_MALI_weights_file = 'mapfile_slm_to_mali.nc' config_fastisostasy_coupling_interval = 1 - config_calving = 'none' - config_apply_calving_mask = .false. + config_calving = 'crevasse_depth' + config_apply_calving_mask = .true. + config_require_extensional_stresses_for_mask_calving = .true. config_restore_calving_front_prevent_retreat = .false. - config_calculate_damage = .true. + config_calculate_damage = .false. config_damage_calving_threshold = 0.95 + config_damage_calving_threshold_source = 'data' config_damage_calving_method = 'none' config_calving_speed_limit = 0.00063492063 config_restore_calving_front = .true. @@ -36,7 +40,7 @@ config_surface_air_temperature_source = 'file' config_basal_heat_flux_source = 'file' - config_basal_mass_bal_float = 'ismip6' + config_basal_mass_bal_float = 'ismip7' config_front_mass_bal_grounded = 'ismip6' config_use_3d_thermal_forcing_for_face_melt = .true. config_add_ocean_thermal_forcing = 0.0 @@ -48,7 +52,9 @@ config_dynamic_thickness = 10.0 config_dt = '0000-01-00_00:00:00' - config_time_integration = 'forward_euler' + config_time_integration = 'runge_kutta' + config_rk_order = 3 + config_rk3_stages = 3 config_adaptive_timestep = .true. config_adaptive_timestep_calvingCFL_fraction = 0.8 config_adaptive_timestep_include_calving = .true. diff --git a/compass/landice/tests/ismip7_run/ismip7_gris/namelist.landice b/compass/landice/tests/ismip7_run/ismip7_gris/namelist.landice index c00c9a5d18..85238bebca 100644 --- a/compass/landice/tests/ismip7_run/ismip7_gris/namelist.landice +++ b/compass/landice/tests/ismip7_run/ismip7_gris/namelist.landice @@ -28,6 +28,7 @@ config_calving_error_threshold = 100000.0 config_apply_facemelt_strainrate_enhancement = .true. config_calving_strainrate_scaling = 1.0 + config_calving_strainrate_scaling_source = 'data' config_thermal_solver = 'temperature' @@ -37,7 +38,7 @@ config_surface_air_temperature_source = 'file' config_basal_heat_flux_source = 'file' - config_basal_mass_bal_float = 'none' + config_basal_mass_bal_float = 'ismip6' config_front_mass_bal_grounded = 'ismip6' config_use_3d_thermal_forcing_for_face_melt = .false. config_add_ocean_thermal_forcing = 0.0 From ab9f0d837207fcda416f15e9e5a752f06bf13b74 Mon Sep 17 00:00:00 2001 From: Trevor Hillebrand Date: Mon, 21 Sep 2026 22:26:40 -0600 Subject: [PATCH 05/14] Update OCX ocean to v2 --- compass/landice/ismip7/ice_sheet_params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compass/landice/ismip7/ice_sheet_params.py b/compass/landice/ismip7/ice_sheet_params.py index d991eae45c..222f202d89 100644 --- a/compass/landice/ismip7/ice_sheet_params.py +++ b/compass/landice/ismip7/ice_sheet_params.py @@ -44,7 +44,7 @@ }, 'ais': { 'atm_version': 'v1', - 'ocean_version': 'v1', + 'ocean_version': 'v2', 'atm_model': 'RACMO2.3p2-ERA', 'ocean_model': None, # AIS OCX ocean files have no model token and live in per-choice From 2d807f23e3ba1d7d6cb926d19654dc0950376bf6 Mon Sep 17 00:00:00 2001 From: Trevor Hillebrand Date: Fri, 25 Sep 2026 12:42:18 -0600 Subject: [PATCH 06/14] Allow multiple forcing files from different meshes in same directory --- .../ismip7_ais/set_up_experiment.py | 57 +++++++++++++++---- 1 file changed, 45 insertions(+), 12 deletions(-) diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py b/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py index be62eae1fd..fa38f5b140 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py +++ b/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py @@ -57,6 +57,11 @@ def setup(self): # noqa: C901 forcing_basepath = section.get('forcing_basepath') init_cond_path = section.get('init_cond_path') init_cond_fname = os.path.split(init_cond_path)[-1] + # Extract mesh name from init cond filename (e.g., AIS_2to20km_r03_20260922) + # Typical format: AIS____.nc + # Strip .nc extension first, then take first 4 underscore-separated parts + mesh_name = '_'.join(init_cond_fname.replace('.nc', '').split('_')[:4]) + print(f" Extracted mesh name: {mesh_name} from init cond: {init_cond_fname}") melt_params_path = section.get('melt_params_path') melt_params_fname = os.path.split(melt_params_path)[-1] region_mask_path = section.get('region_mask_path') @@ -137,27 +142,34 @@ def setup(self): # noqa: C901 # Find atmosphere climatology files smb_files = glob.glob(os.path.join(ctrl_atm_path, '*SMB*.nc')) smb_files = [f for f in smb_files if 'gradient' not in f] + # Filter by mesh name to handle directories with multiple meshes + smb_files = [f for f in smb_files if mesh_name in f] if len(smb_files) == 1: smb_fname = os.path.split(smb_files[0])[-1] os.symlink(smb_files[0], os.path.join(self.work_dir, smb_fname)) else: - sys.exit(f"ERROR: Expected 1 SMB climatology file in " - f"{ctrl_atm_path}, found {len(smb_files)}") + sys.exit(f"ERROR: Expected 1 SMB climatology file matching mesh " + f"{mesh_name} in {ctrl_atm_path}, found {len(smb_files)}") temp_files = glob.glob( os.path.join(ctrl_atm_path, '*temperature*.nc')) temp_files = [f for f in temp_files if 'gradient' not in f] + # Filter by mesh name to handle directories with multiple meshes + temp_files = [f for f in temp_files if mesh_name in f] if len(temp_files) == 1: temp_fname = os.path.split(temp_files[0])[-1] os.symlink(temp_files[0], os.path.join(self.work_dir, temp_fname)) else: - sys.exit(f"ERROR: Expected 1 temperature climatology file in " - f"{ctrl_atm_path}, found {len(temp_files)}") + sys.exit(f"ERROR: Expected 1 temperature climatology file " + f"matching mesh {mesh_name} in {ctrl_atm_path}, " + f"found {len(temp_files)}") runoff_files = glob.glob( os.path.join(ctrl_atm_path, '*runoff*.nc')) + # Filter by mesh name to handle directories with multiple meshes + runoff_files = [f for f in runoff_files if mesh_name in f] if len(runoff_files) == 1: runoff_fname = os.path.split(runoff_files[0])[-1] os.symlink(runoff_files[0], @@ -167,6 +179,8 @@ def setup(self): # noqa: C901 smb_grad_files = glob.glob( os.path.join(ctrl_atm_path, '*SMB_gradient*.nc')) + # Filter by mesh name to handle directories with multiple meshes + smb_grad_files = [f for f in smb_grad_files if mesh_name in f] smb_grad_fname = '' if len(smb_grad_files) == 1: smb_grad_fname = os.path.split(smb_grad_files[0])[-1] @@ -175,6 +189,8 @@ def setup(self): # noqa: C901 temp_grad_files = glob.glob( os.path.join(ctrl_atm_path, '*temperature_gradient*.nc')) + # Filter by mesh name to handle directories with multiple meshes + temp_grad_files = [f for f in temp_grad_files if mesh_name in f] temp_grad_fname = '' if len(temp_grad_files) == 1: temp_grad_fname = os.path.split(temp_grad_files[0])[-1] @@ -189,30 +205,39 @@ def setup(self): # noqa: C901 # SMB forcing smb_search = os.path.join(atm_dir, '*SMB_*.nc') smb_list = glob.glob(smb_search) + print(f" Found {len(smb_list)} SMB files before filtering") smb_list = [f for f in smb_list if 'gradient' not in f] + print(f" Found {len(smb_list)} SMB files after removing gradients") + # Filter by mesh name to handle directories with multiple meshes + smb_list = [f for f in smb_list if mesh_name in f] + print(f" Found {len(smb_list)} SMB files after mesh filter: {smb_list}") if len(smb_list) == 1: smb_fname = os.path.split(smb_list[0])[-1] os.symlink(smb_list[0], os.path.join(self.work_dir, smb_fname)) else: - sys.exit(f"ERROR: Expected 1 SMB file at {smb_search}, " - f"found {len(smb_list)}: {smb_list}") + sys.exit(f"ERROR: Expected 1 SMB file matching mesh {mesh_name} " + f"at {smb_search}, found {len(smb_list)}: {smb_list}") # Temperature forcing temp_search = os.path.join(atm_dir, '*temperature_*.nc') temp_list = glob.glob(temp_search) temp_list = [f for f in temp_list if 'gradient' not in f] + # Filter by mesh name to handle directories with multiple meshes + temp_list = [f for f in temp_list if mesh_name in f] if len(temp_list) == 1: temp_fname = os.path.split(temp_list[0])[-1] os.symlink(temp_list[0], os.path.join(self.work_dir, temp_fname)) else: - sys.exit(f"ERROR: Expected 1 temperature file at " - f"{temp_search}, found {len(temp_list)}") + sys.exit(f"ERROR: Expected 1 temperature file matching mesh " + f"{mesh_name} at {temp_search}, found {len(temp_list)}") # Runoff forcing (optional — may not exist for all experiments) runoff_search = os.path.join(atm_dir, '*runoff_*.nc') runoff_list = glob.glob(runoff_search) + # Filter by mesh name to handle directories with multiple meshes + runoff_list = [f for f in runoff_list if mesh_name in f] runoff_fname = '' if len(runoff_list) == 1: runoff_fname = os.path.split(runoff_list[0])[-1] @@ -222,6 +247,8 @@ def setup(self): # noqa: C901 # SMB gradient (lapse rate) smb_grad_search = os.path.join(atm_dir, '*SMB_gradient_*.nc') smb_grad_list = glob.glob(smb_grad_search) + # Filter by mesh name to handle directories with multiple meshes + smb_grad_list = [f for f in smb_grad_list if mesh_name in f] smb_grad_fname = '' if len(smb_grad_list) == 1: smb_grad_fname = os.path.split(smb_grad_list[0])[-1] @@ -232,6 +259,8 @@ def setup(self): # noqa: C901 temp_grad_search = os.path.join(atm_dir, '*temperature_gradient_*.nc') temp_grad_list = glob.glob(temp_grad_search) + # Filter by mesh name to handle directories with multiple meshes + temp_grad_list = [f for f in temp_grad_list if mesh_name in f] temp_grad_fname = '' if len(temp_grad_list) == 1: temp_grad_fname = os.path.split(temp_grad_list[0])[-1] @@ -241,13 +270,15 @@ def setup(self): # noqa: C901 # Thermal forcing tf_search = os.path.join(ocean_dir, '*thermal_forcing_*.nc') tf_list = glob.glob(tf_search) + # Filter by mesh name to handle directories with multiple meshes + tf_list = [f for f in tf_list if mesh_name in f] if len(tf_list) == 1: tf_fname = os.path.split(tf_list[0])[-1] os.symlink(tf_list[0], os.path.join(self.work_dir, tf_fname)) else: - sys.exit(f"ERROR: Expected 1 TF file at {tf_search}, " - f"found {len(tf_list)}: {tf_list}") + sys.exit(f"ERROR: Expected 1 TF file matching mesh {mesh_name} " + f"at {tf_search}, found {len(tf_list)}: {tf_list}") # --- Find shelf collapse (calving) mask from ismip7_forcing # fracture Path C, if requested --- @@ -259,6 +290,8 @@ def setup(self): # noqa: C901 mask_search = os.path.join(forcing_dir, 'shelf_collapse', '*ice_shelf_collapse_mask_*.nc') mask_list = glob.glob(mask_search) + # Filter by mesh name to handle directories with multiple meshes + mask_list = [f for f in mask_list if mesh_name in f] if len(mask_list) == 1: mask_fname = os.path.split(mask_list[0])[-1] os.symlink(mask_list[0], @@ -267,8 +300,8 @@ def setup(self): # noqa: C901 else: sys.exit( f"ERROR: use_hydrofracture_forcing is True but did not " - f"find exactly 1 shelf collapse mask file at " - f"{mask_search}: {mask_list}") + f"find exactly 1 shelf collapse mask file matching mesh " + f"{mesh_name} at {mask_search}: {mask_list}") # --- Set up streams --- # Determine forcing interval From 4441dd8de674fcd8fdbcf74510d45a67a9dea164 Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Fri, 25 Sep 2026 13:25:36 -0600 Subject: [PATCH 07/14] Fix flake8 linting errors in set_up_experiment.py - Fix E501 line length violations by splitting long lines - Remove unused variable use_damage_calving (F841) Co-Authored-By: Claude Sonnet 4.5 --- .../ismip7_ais/set_up_experiment.py | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py b/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py index fa38f5b140..92d90df5c3 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py +++ b/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py @@ -57,11 +57,15 @@ def setup(self): # noqa: C901 forcing_basepath = section.get('forcing_basepath') init_cond_path = section.get('init_cond_path') init_cond_fname = os.path.split(init_cond_path)[-1] - # Extract mesh name from init cond filename (e.g., AIS_2to20km_r03_20260922) + # Extract mesh name from init cond filename + # (e.g., AIS_2to20km_r03_20260922) # Typical format: AIS____.nc - # Strip .nc extension first, then take first 4 underscore-separated parts - mesh_name = '_'.join(init_cond_fname.replace('.nc', '').split('_')[:4]) - print(f" Extracted mesh name: {mesh_name} from init cond: {init_cond_fname}") + # Strip .nc extension first, then take first 4 underscore-separated + # parts + base = init_cond_fname.replace('.nc', '') + mesh_name = '_'.join(base.split('_')[:4]) + print(f" Extracted mesh name: {mesh_name} from init cond: " + f"{init_cond_fname}") melt_params_path = section.get('melt_params_path') melt_params_fname = os.path.split(melt_params_path)[-1] region_mask_path = section.get('region_mask_path') @@ -74,7 +78,6 @@ def setup(self): # noqa: C901 calving_fracture_toughness = section.get( 'calving_fracture_toughness') sea_level_model, fastisostasy = parse_gia_model(config) - use_damage_calving = section.getboolean('use_damage_calving') damage_calving_threshold_path = section.get( 'damage_calving_threshold_path') sea_level_model = section.getboolean('sea_level_model') @@ -149,8 +152,9 @@ def setup(self): # noqa: C901 os.symlink(smb_files[0], os.path.join(self.work_dir, smb_fname)) else: - sys.exit(f"ERROR: Expected 1 SMB climatology file matching mesh " - f"{mesh_name} in {ctrl_atm_path}, found {len(smb_files)}") + sys.exit(f"ERROR: Expected 1 SMB climatology file matching " + f"mesh {mesh_name} in {ctrl_atm_path}, found " + f"{len(smb_files)}") temp_files = glob.glob( os.path.join(ctrl_atm_path, '*temperature*.nc')) @@ -207,17 +211,20 @@ def setup(self): # noqa: C901 smb_list = glob.glob(smb_search) print(f" Found {len(smb_list)} SMB files before filtering") smb_list = [f for f in smb_list if 'gradient' not in f] - print(f" Found {len(smb_list)} SMB files after removing gradients") + print(f" Found {len(smb_list)} SMB files after removing " + f"gradients") # Filter by mesh name to handle directories with multiple meshes smb_list = [f for f in smb_list if mesh_name in f] - print(f" Found {len(smb_list)} SMB files after mesh filter: {smb_list}") + print(f" Found {len(smb_list)} SMB files after mesh filter: " + f"{smb_list}") if len(smb_list) == 1: smb_fname = os.path.split(smb_list[0])[-1] os.symlink(smb_list[0], os.path.join(self.work_dir, smb_fname)) else: - sys.exit(f"ERROR: Expected 1 SMB file matching mesh {mesh_name} " - f"at {smb_search}, found {len(smb_list)}: {smb_list}") + sys.exit(f"ERROR: Expected 1 SMB file matching mesh " + f"{mesh_name} at {smb_search}, found " + f"{len(smb_list)}: {smb_list}") # Temperature forcing temp_search = os.path.join(atm_dir, '*temperature_*.nc') @@ -231,7 +238,8 @@ def setup(self): # noqa: C901 os.path.join(self.work_dir, temp_fname)) else: sys.exit(f"ERROR: Expected 1 temperature file matching mesh " - f"{mesh_name} at {temp_search}, found {len(temp_list)}") + f"{mesh_name} at {temp_search}, found " + f"{len(temp_list)}") # Runoff forcing (optional — may not exist for all experiments) runoff_search = os.path.join(atm_dir, '*runoff_*.nc') @@ -277,8 +285,9 @@ def setup(self): # noqa: C901 os.symlink(tf_list[0], os.path.join(self.work_dir, tf_fname)) else: - sys.exit(f"ERROR: Expected 1 TF file matching mesh {mesh_name} " - f"at {tf_search}, found {len(tf_list)}: {tf_list}") + sys.exit(f"ERROR: Expected 1 TF file matching mesh " + f"{mesh_name} at {tf_search}, found " + f"{len(tf_list)}: {tf_list}") # --- Find shelf collapse (calving) mask from ismip7_forcing # fracture Path C, if requested --- From bbf10a45536f4bc7a554496d2ec66ce1361cbc9a Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Fri, 25 Sep 2026 13:41:57 -0600 Subject: [PATCH 08/14] Switch gis output stream from basicmesh to minmesh Smaller file size while retaining fields needed for paraview/mosaic viz --- .../tests/ismip7_run/ismip7_gris/streams.landice.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compass/landice/tests/ismip7_run/ismip7_gris/streams.landice.template b/compass/landice/tests/ismip7_run/ismip7_gris/streams.landice.template index d6e06ba400..cae00a6fb3 100644 --- a/compass/landice/tests/ismip7_run/ismip7_gris/streams.landice.template +++ b/compass/landice/tests/ismip7_run/ismip7_gris/streams.landice.template @@ -107,7 +107,7 @@ filename_template="output/output_2d_$Y.nc" type="output"> - + From 30373288afbff98aa00a829499c7d10371d03b90 Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Fri, 25 Sep 2026 14:12:44 -0600 Subject: [PATCH 09/14] Minor streams adjustments * Remove cellProcID field from both ice sheet output streams. It has no time-dependence so it's not a big field, but it seemed like an easy target for pruning * Add geoidChange field to AIS output stream. This is only needed if GIA is active, which is not currently the case, but but I'm adding it anyway so we don't forget to do so later. --- .../tests/ismip7_run/ismip7_ais/streams.landice.template | 2 +- .../tests/ismip7_run/ismip7_gris/streams.landice.template | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/streams.landice.template b/compass/landice/tests/ismip7_run/ismip7_ais/streams.landice.template index c62978289a..002c6047d0 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/streams.landice.template +++ b/compass/landice/tests/ismip7_run/ismip7_ais/streams.landice.template @@ -124,6 +124,7 @@ + @@ -133,7 +134,6 @@ - diff --git a/compass/landice/tests/ismip7_run/ismip7_gris/streams.landice.template b/compass/landice/tests/ismip7_run/ismip7_gris/streams.landice.template index cae00a6fb3..e85b714e78 100644 --- a/compass/landice/tests/ismip7_run/ismip7_gris/streams.landice.template +++ b/compass/landice/tests/ismip7_run/ismip7_gris/streams.landice.template @@ -123,7 +123,6 @@ - From 62fdb98faf2f399251e09f66260ae2b3f65f808f Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Fri, 25 Sep 2026 20:42:30 -0600 Subject: [PATCH 10/14] For now, disable calving parameter fields we don't have yet Switch back to scalar calving parameters for AIS config_damage_calving_threshold_source and GIS config_calving_strainrate_scaling_source. Also disable restore-calving for AIS now that calving is active. --- compass/landice/tests/ismip7_run/ismip7_ais/namelist.landice | 4 ++-- compass/landice/tests/ismip7_run/ismip7_gris/namelist.landice | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/namelist.landice b/compass/landice/tests/ismip7_run/ismip7_ais/namelist.landice index 4e1bef9ee3..5daefd0533 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/namelist.landice +++ b/compass/landice/tests/ismip7_run/ismip7_ais/namelist.landice @@ -24,10 +24,10 @@ config_restore_calving_front_prevent_retreat = .false. config_calculate_damage = .false. config_damage_calving_threshold = 0.95 - config_damage_calving_threshold_source = 'data' + config_damage_calving_threshold_source = 'scalar' config_damage_calving_method = 'none' config_calving_speed_limit = 0.00063492063 - config_restore_calving_front = .true. + config_restore_calving_front = .false. config_remove_icebergs = .true. config_remove_small_islands = .true. config_distribute_unablatedVolumeDynCell = .true. diff --git a/compass/landice/tests/ismip7_run/ismip7_gris/namelist.landice b/compass/landice/tests/ismip7_run/ismip7_gris/namelist.landice index 85238bebca..1cbd94826d 100644 --- a/compass/landice/tests/ismip7_run/ismip7_gris/namelist.landice +++ b/compass/landice/tests/ismip7_run/ismip7_gris/namelist.landice @@ -28,7 +28,7 @@ config_calving_error_threshold = 100000.0 config_apply_facemelt_strainrate_enhancement = .true. config_calving_strainrate_scaling = 1.0 - config_calving_strainrate_scaling_source = 'data' + config_calving_strainrate_scaling_source = 'scalar' config_thermal_solver = 'temperature' From 4b2dd766434b708f9127d79216c68333023b1d64 Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Fri, 25 Sep 2026 21:31:13 -0600 Subject: [PATCH 11/14] Remove calving options from cfg for ais and gris Rather than support cfg variants for these options, let's hardcode the choice of calving law and its options in the namelist and streams. --- .../ismip7_run/ismip7_ais/ismip7_ais.cfg | 8 ------- .../ismip7_ais/set_up_experiment.py | 23 ------------------- .../streams.damage_calving_threshold | 11 --------- .../ismip7_run/ismip7_gris/ismip7_gris.cfg | 5 ---- .../ismip7_gris/set_up_experiment.py | 23 ------------------- .../streams.calving_strain_rate_scaling | 11 --------- 6 files changed, 81 deletions(-) delete mode 100644 compass/landice/tests/ismip7_run/ismip7_ais/streams.damage_calving_threshold delete mode 100644 compass/landice/tests/ismip7_run/ismip7_gris/streams.calving_strain_rate_scaling diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg b/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg index 555a70d823..3449f9f865 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg +++ b/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg @@ -78,14 +78,6 @@ calving_fracture_toughness = 2.0e5 # FastIsostasy - couple to FastIsostasy (uses the fastiso_* options below) gia_model = none -# Whether to use damage-based calving with a spatially-varying threshold -use_damage_calving = false - -# Path to the file containing the damage calving threshold field. -# If provided, the damageCalvingThreshold stream will be added. -# Actual use is controlled by namelist options in MALI. -damage_calving_threshold_path = NotAvailable - # Path to the directory containing globally defined ice thickness # field for the sea-level model slm_input_ice = NotAvailable diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py b/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py index 92d90df5c3..6c6c4e7a02 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py +++ b/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py @@ -78,8 +78,6 @@ def setup(self): # noqa: C901 calving_fracture_toughness = section.get( 'calving_fracture_toughness') sea_level_model, fastisostasy = parse_gia_model(config) - damage_calving_threshold_path = section.get( - 'damage_calving_threshold_path') sea_level_model = section.getboolean('sea_level_model') exp_info = self.exp_info @@ -122,17 +120,6 @@ def setup(self): # noqa: C901 os.path.join(self.work_dir, os.path.basename(reference_surface_path))) - # Symlink damage calving threshold file if path is provided - if (damage_calving_threshold_path != 'NotAvailable' and - os.path.exists(damage_calving_threshold_path)): - damage_calving_threshold_fname = os.path.split( - damage_calving_threshold_path)[-1] - os.symlink(damage_calving_threshold_path, - os.path.join(self.work_dir, - damage_calving_threshold_fname)) - else: - damage_calving_threshold_fname = None - # --- Find and symlink forcing files --- if scenario == 'ctrl': # Control run: use climatology files @@ -411,16 +398,6 @@ def setup(self): # noqa: C901 self.add_namelist_options(options=options, out_name='namelist.landice') - # Damage calving threshold stream - if damage_calving_threshold_fname is not None: - damage_stream_replacements = { - 'input_file_damage_calving_threshold': - damage_calving_threshold_fname} - self.add_streams_file( - resource_location, 'streams.damage_calving_threshold', - out_name='streams.landice', - template_replacements=damage_stream_replacements) - # Sea-level model options if sea_level_model: slm_input_ice = section.get('slm_input_ice') diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/streams.damage_calving_threshold b/compass/landice/tests/ismip7_run/ismip7_ais/streams.damage_calving_threshold deleted file mode 100644 index 5ddd3f8239..0000000000 --- a/compass/landice/tests/ismip7_run/ismip7_ais/streams.damage_calving_threshold +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris.cfg b/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris.cfg index dae2ea46a6..a3b6a6229a 100644 --- a/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris.cfg +++ b/compass/landice/tests/ismip7_run/ismip7_gris/ismip7_gris.cfg @@ -45,10 +45,5 @@ calving_method = restore # Path to the von Mises parameter fields. von_mises_parameter_path = NotAvailable -# Path to the file containing the calving strain rate scaling field. -# If provided, the calvingStrainRateScaling stream will be added. -# Actual use is controlled by namelist options in MALI. -calving_strain_rate_scaling_path = NotAvailable - [parallel] parallel_executable = srun --label --cpu-bind=cores diff --git a/compass/landice/tests/ismip7_run/ismip7_gris/set_up_experiment.py b/compass/landice/tests/ismip7_run/ismip7_gris/set_up_experiment.py index 3c6439210f..4118ce44b5 100644 --- a/compass/landice/tests/ismip7_run/ismip7_gris/set_up_experiment.py +++ b/compass/landice/tests/ismip7_run/ismip7_gris/set_up_experiment.py @@ -59,8 +59,6 @@ def setup(self): # noqa: C901 reference_surface_path = section.get('reference_surface_path') reference_surface_fname = os.path.split(reference_surface_path)[-1] calving_method = section.get('calving_method') - calving_strain_rate_scaling_path = section.get( - 'calving_strain_rate_scaling_path') exp_info = self.exp_info scenario = exp_info['scenario'] @@ -98,17 +96,6 @@ def setup(self): # noqa: C901 os.path.join(self.work_dir, os.path.basename(reference_surface_path))) - # Symlink calving strain rate scaling file if path is provided - if (calving_strain_rate_scaling_path != 'NotAvailable' and - os.path.exists(calving_strain_rate_scaling_path)): - calving_strain_rate_scaling_fname = os.path.split( - calving_strain_rate_scaling_path)[-1] - os.symlink(calving_strain_rate_scaling_path, - os.path.join(self.work_dir, - calving_strain_rate_scaling_fname)) - else: - calving_strain_rate_scaling_fname = None - # --- Find and symlink forcing files --- if scenario == 'ctrl': ctrl_tf_path = section.get('ctrl_tf_climatology_path') @@ -294,16 +281,6 @@ def setup(self): # noqa: C901 out_name='streams.landice', template_replacements=vM_stream_replacements) - # Calving strain rate scaling stream - if calving_strain_rate_scaling_fname is not None: - calving_scaling_stream_replacements = { - 'input_file_calving_strain_rate_scaling': - calving_strain_rate_scaling_fname} - self.add_streams_file( - resource_location, 'streams.calving_strain_rate_scaling', - out_name='streams.landice', - template_replacements=calving_scaling_stream_replacements) - # --- Symlink restart for projections/ctrl --- if not is_historical: hist_exp = f"historical_{model}" diff --git a/compass/landice/tests/ismip7_run/ismip7_gris/streams.calving_strain_rate_scaling b/compass/landice/tests/ismip7_run/ismip7_gris/streams.calving_strain_rate_scaling deleted file mode 100644 index 03653adeaa..0000000000 --- a/compass/landice/tests/ismip7_run/ismip7_gris/streams.calving_strain_rate_scaling +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - From 6c81b17d1832e8cdfe62511da78bc2c244302a9e Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Fri, 25 Sep 2026 21:42:52 -0600 Subject: [PATCH 12/14] Remove option support for hydrofracture mask settings for AIS The settings hardcoded in nl and streams are what are used --- .../ismip7_run/ismip7_ais/ismip7_ais.cfg | 12 ----- .../ismip7_run/ismip7_ais/namelist.landice | 1 + .../ismip7_ais/set_up_experiment.py | 44 +++++-------------- .../ismip7_ais/streams.landice.template | 9 ++++ .../ismip7_ais/streams.mask_calving | 12 ----- 5 files changed, 20 insertions(+), 58 deletions(-) delete mode 100644 compass/landice/tests/ismip7_run/ismip7_ais/streams.mask_calving diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg b/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg index 3449f9f865..04defefb4c 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg +++ b/compass/landice/tests/ismip7_run/ismip7_ais/ismip7_ais.cfg @@ -59,18 +59,6 @@ calving_method = restore # Only required if calving_method is set to 'von_mises'. von_mises_parameter_path = NotAvailable -# Whether to apply the ISMIP7 Path C ice shelf collapse mask (from -# ismip7_forcing fracture) as hydrofracture-gated mask calving. Expected -# layout: {forcing_basepath}/{model}_{scenario}/shelf_collapse/*.nc -# Not used for historical, ctrl, or ocx experiments. If true and the mask -# file is missing for an experiment that should have one, setup fails. -use_hydrofracture_forcing = true - -# Ice fracture toughness (K_IC, Pa m^0.5) used in the hydrofracture -# vulnerability criterion gating mask calving. Only used when -# use_hydrofracture_forcing is true. -calving_fracture_toughness = 2.0e5 - # Which glacial isostatic adjustment (GIA) coupling to use. Options: # none - no GIA coupling (fixed bed) # 1dSLM - couple to the 1-D sea-level model (uses the slm_* and diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/namelist.landice b/compass/landice/tests/ismip7_run/ismip7_ais/namelist.landice index 5daefd0533..498f0b8ebe 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/namelist.landice +++ b/compass/landice/tests/ismip7_run/ismip7_ais/namelist.landice @@ -21,6 +21,7 @@ config_calving = 'crevasse_depth' config_apply_calving_mask = .true. config_require_extensional_stresses_for_mask_calving = .true. + config_calving_fracture_toughness = 2.0e5 config_restore_calving_front_prevent_retreat = .false. config_calculate_damage = .false. config_damage_calving_threshold = 0.95 diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py b/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py index 6c6c4e7a02..231cba069e 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py +++ b/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py @@ -73,10 +73,6 @@ def setup(self): # noqa: C901 reference_surface_path = section.get('reference_surface_path') reference_surface_fname = os.path.split(reference_surface_path)[-1] calving_method = section.get('calving_method') - use_hydrofracture_forcing = section.getboolean( - 'use_hydrofracture_forcing') - calving_fracture_toughness = section.get( - 'calving_fracture_toughness') sea_level_model, fastisostasy = parse_gia_model(config) sea_level_model = section.getboolean('sea_level_model') @@ -277,12 +273,10 @@ def setup(self): # noqa: C901 f"{len(tf_list)}: {tf_list}") # --- Find shelf collapse (calving) mask from ismip7_forcing - # fracture Path C, if requested --- - # historical, ctrl, and ocx experiments never use hydrofracture - # forcing, regardless of use_hydrofracture_forcing. - useCalvingMask = False - if (use_hydrofracture_forcing and - scenario not in ('historical', 'ctrl', 'ocx')): + # fracture Path C --- + # historical, ctrl, and ocx experiments do not use hydrofracture + # forcing. + if scenario not in ('historical', 'ctrl', 'ocx'): mask_search = os.path.join(forcing_dir, 'shelf_collapse', '*ice_shelf_collapse_mask_*.nc') mask_list = glob.glob(mask_search) @@ -292,12 +286,13 @@ def setup(self): # noqa: C901 mask_fname = os.path.split(mask_list[0])[-1] os.symlink(mask_list[0], os.path.join(self.work_dir, mask_fname)) - useCalvingMask = True else: sys.exit( - f"ERROR: use_hydrofracture_forcing is True but did not " - f"find exactly 1 shelf collapse mask file matching mesh " - f"{mesh_name} at {mask_search}: {mask_list}") + f"ERROR: Did not find exactly 1 shelf collapse mask file " + f"matching mesh {mesh_name} at {mask_search}: {mask_list}") + else: + # For historical/ctrl/ocx, set to empty - stream won't be used + mask_fname = '' # --- Set up streams --- # Determine forcing interval @@ -326,6 +321,7 @@ def setup(self): # noqa: C901 'input_file_runoff_forcing': runoff_fname, 'input_file_smb_gradient_forcing': smb_grad_fname, 'input_file_temperature_gradient_forcing': temp_grad_fname, + 'input_file_calving_mask_forcing': mask_fname, 'forcing_interval_monthly': forcing_interval_monthly, 'forcing_interval_annual': forcing_interval_annual, } @@ -336,14 +332,6 @@ def setup(self): # noqa: C901 out_name='streams.landice', template_replacements=stream_replacements) - if useCalvingMask: - mask_stream_replacements = { - 'input_file_calving_mask_forcing_name': mask_fname} - self.add_streams_file( - resource_location, 'streams.mask_calving', - out_name='streams.landice', - template_replacements=mask_stream_replacements) - # --- Set up namelist --- self.add_namelist_file( resource_location, 'namelist.landice', @@ -385,18 +373,6 @@ def setup(self): # noqa: C901 out_name='streams.landice', template_replacements=vM_stream_replacements) - # Mask calving options (ismip7_forcing fracture Path C), gated by - # hydrofracture vulnerability (MALI PR #187) - if useCalvingMask: - options = { - 'config_apply_calving_mask': ".true.", - 'config_restore_calving_front': ".false.", - 'config_require_extensional_stresses_for_mask_calving': - ".true.", - 'config_calving_fracture_toughness': - f'{calving_fracture_toughness}'} - self.add_namelist_options(options=options, - out_name='namelist.landice') # Sea-level model options if sea_level_model: diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/streams.landice.template b/compass/landice/tests/ismip7_run/ismip7_ais/streams.landice.template index 002c6047d0..3b241f685a 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/streams.landice.template +++ b/compass/landice/tests/ismip7_run/ismip7_ais/streams.landice.template @@ -109,6 +109,15 @@ + + + + - - - - - - From bc18fb72e7a57feced732f0b83edc8d54110dd6e Mon Sep 17 00:00:00 2001 From: Trevor Hillebrand Date: Sat, 26 Sep 2026 07:36:12 -0700 Subject: [PATCH 13/14] Update albany yaml files Update albany_input.yaml files to use nonlinear budd friction, MOLHO solver, and grounding-line parameterization. --- .../tests/ismip7_run/ismip7_ais/albany_input.yaml | 11 +++++------ .../tests/ismip7_run/ismip7_gris/albany_input.yaml | 3 ++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/albany_input.yaml b/compass/landice/tests/ismip7_run/ismip7_ais/albany_input.yaml index e1a4dcd7c4..e301472436 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/albany_input.yaml +++ b/compass/landice/tests/ismip7_run/ismip7_ais/albany_input.yaml @@ -2,23 +2,22 @@ --- ANONYMOUS: Problem: + Depth Integrated Model: true LandIce Field Norm: sliding_velocity_basalside: Regularization Type: Given Value Regularization Value: 1.0e-4 LandIce BCs: BC 0: + Cubrature Degree: 8 Basal Friction Coefficient: Type: Power Law - Power Exponent: 0.2 + Power Exponent: 0.33333333333 Mu Type: Field - Effective Pressure Type: Constant - Effective Pressure: 1.0 - # Zero Effective Pressure On Floating Ice At Nodes: true + Effective Pressure Type: Hydrostatic Computed At Nodes + Zero Effective Pressure On Floating Ice At Nodes: true Zero Beta On Floating Ice: true - Cubature Degree: 8 - # Discretization Description Discretization: #Exodus Output File Name: albany_output.exo diff --git a/compass/landice/tests/ismip7_run/ismip7_gris/albany_input.yaml b/compass/landice/tests/ismip7_run/ismip7_gris/albany_input.yaml index bdd3fa7108..a4f09fdc22 100644 --- a/compass/landice/tests/ismip7_run/ismip7_gris/albany_input.yaml +++ b/compass/landice/tests/ismip7_run/ismip7_gris/albany_input.yaml @@ -9,9 +9,10 @@ ANONYMOUS: Regularization Value: 1.0e-4 LandIce BCs: BC 0: + Cubature Degree: 8 Basal Friction Coefficient: Type: Power Law - Power Exponent: 1.0 + Power Exponent: 0.33333333333 Mu Type: Field Effective Pressure Type: Hydrostatic Computed At Nodes Zero Effective Pressure On Floating Ice At Nodes: true From dd284191ccb5a773567263205f47b3dedf0776cd Mon Sep 17 00:00:00 2001 From: Matthew Hoffman Date: Sat, 26 Sep 2026 14:50:22 -0600 Subject: [PATCH 14/14] lint fix --- compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py | 1 - 1 file changed, 1 deletion(-) diff --git a/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py b/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py index 231cba069e..7d750c2efe 100644 --- a/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py +++ b/compass/landice/tests/ismip7_run/ismip7_ais/set_up_experiment.py @@ -373,7 +373,6 @@ def setup(self): # noqa: C901 out_name='streams.landice', template_replacements=vM_stream_replacements) - # Sea-level model options if sea_level_model: slm_input_ice = section.get('slm_input_ice')