diff --git a/compass/landice/tests/ensemble_generator/sgh_restart_ensemble/restart_member.py b/compass/landice/tests/ensemble_generator/sgh_restart_ensemble/restart_member.py index e459d20691..83e3968589 100644 --- a/compass/landice/tests/ensemble_generator/sgh_restart_ensemble/restart_member.py +++ b/compass/landice/tests/ensemble_generator/sgh_restart_ensemble/restart_member.py @@ -4,6 +4,7 @@ import os +from compass.model import run_model from compass.step import Step @@ -40,8 +41,8 @@ class InPlaceRestartMember(Step): Rather than copying files to a new directory, this step operates directly in the original run directory. It sets ``config_do_restart = .true.`` in - ``namelist.landice`` so that the run continues from its last checkpoint - when ``job_script.sh`` is resubmitted by ``EnsembleManager``. + ``namelist.landice`` and then runs MALI to continue from the last + checkpoint. Attributes ---------- @@ -80,7 +81,8 @@ def __init__(self, test_case, run_num, spinup_work_dir): def setup(self): """ Edit ``namelist.landice`` in-place in the original run directory, - setting ``config_do_restart = .true.``. + setting ``config_do_restart = .true.``, and register the MALI + executable as an input for this step. No files are copied and no new subdirectories are created. """ @@ -98,3 +100,13 @@ def setup(self): print(f'Setting config_do_restart = .true. in {namelist_path}') _set_restart_in_namelist(namelist_path) + + # Register MALI executable so compass knows this step needs the model + self.add_model_as_input() + + def run(self): + """ + Run MALI in the original run directory to continue the simulation + from its last checkpoint. + """ + run_model(self) diff --git a/compass/landice/tests/ensemble_generator/sgh_restart_ensemble/test_case.py b/compass/landice/tests/ensemble_generator/sgh_restart_ensemble/test_case.py index 16388c1dd0..47e15534d5 100644 --- a/compass/landice/tests/ensemble_generator/sgh_restart_ensemble/test_case.py +++ b/compass/landice/tests/ensemble_generator/sgh_restart_ensemble/test_case.py @@ -15,9 +15,6 @@ import json import os -from compass.landice.tests.ensemble_generator.ensemble_manager import ( - EnsembleManager, -) from compass.testcase import TestCase from .restart_member import InPlaceRestartMember @@ -43,9 +40,6 @@ def __init__(self, test_group): name = 'sgh_restart_ensemble' super().__init__(test_group=test_group, name=name) - # Add the ensemble manager (handles job submission) - self.add_step(EnsembleManager(test_case=self)) - def configure(self): """ Configure restart ensemble by identifying incomplete runs. @@ -122,9 +116,6 @@ def configure(self): self.restart_run_numbers = restart_runs - # Only run ensemble_manager; it submits individual restart jobs - self.steps_to_run = ['ensemble_manager'] - def _should_restart_run( self, run_dir,