From 11e818880f3b87bebc13e10c003de005fe28f9c4 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Wed, 22 Jan 2025 12:06:19 -0700 Subject: [PATCH 1/2] mct doesnt care about maxncpl --- CIME/SystemTests/system_tests_common.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CIME/SystemTests/system_tests_common.py b/CIME/SystemTests/system_tests_common.py index 02e74910854..b76501df672 100644 --- a/CIME/SystemTests/system_tests_common.py +++ b/CIME/SystemTests/system_tests_common.py @@ -158,6 +158,11 @@ def _set_restart_interval( if ncpl and minncpl < ncpl: minncpl = ncpl + comp_interface = self._case.get_value("COMP_INTERFACE") + # mct doesn't care about maxncpl so set it to minncpl + if comp_interface == "mct": + maxncpl = minncpl + ncpl_base_period = self._case.get_value("NCPL_BASE_PERIOD") if ncpl_base_period == "hour": coupling_secs = 3600 / maxncpl @@ -187,6 +192,7 @@ def _set_restart_interval( else: expect(False, f"stop_option {stop_option} not available for this test") stop_n = int(stop_n * factor // coupling_secs) + rest_n = math.ceil((stop_n // 2 + 1) * coupling_secs / factor) expect(stop_n > 0, "Bad STOP_N: {:d}".format(stop_n)) expect(stop_n > 2, "ERROR: stop_n value {:d} too short".format(stop_n)) From 9d6673bdf257ecc15e243e43bd35963cd0ed74d1 Mon Sep 17 00:00:00 2001 From: James Foucar Date: Wed, 22 Jan 2025 12:37:56 -0700 Subject: [PATCH 2/2] More ninst fixes --- CIME/SystemTests/eri.py | 4 ++-- CIME/SystemTests/restart_tests.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CIME/SystemTests/eri.py b/CIME/SystemTests/eri.py index e5e27390c0b..6d80a8fd808 100644 --- a/CIME/SystemTests/eri.py +++ b/CIME/SystemTests/eri.py @@ -105,7 +105,7 @@ def run_phase(self): ninst = self._case.get_value("NINST") drvrest = "rpointer.cpl" - if ninst > 1: + if ninst is not None and ninst > 1: drvrest += "_0001" drvrest += self._rest_time self._set_drv_restart_pointer(drvrest) @@ -288,7 +288,7 @@ def run_phase(self): self._case.set_value("HIST_OPTION", stop_option) self._case.set_value("HIST_N", hist_n) drvrest = "rpointer.cpl" - if ninst > 1: + if ninst is not None and ninst > 1: drvrest += "_0001" drvrest += self._rest_time diff --git a/CIME/SystemTests/restart_tests.py b/CIME/SystemTests/restart_tests.py index d89acf70070..ffc50270ce2 100644 --- a/CIME/SystemTests/restart_tests.py +++ b/CIME/SystemTests/restart_tests.py @@ -52,7 +52,7 @@ def _case_two_setup(self): self._case.set_value("REST_OPTION", "never") ninst = self._case.get_value("NINST") drvrest = "rpointer.cpl" - if ninst > 1: + if ninst is not None and ninst > 1: drvrest += "_0001" drvrest += self._rest_time self._set_drv_restart_pointer(drvrest)