diff --git a/config/config_tests.xml b/config/config_tests.xml
index 502194038df..0c1b8b84c6e 100644
--- a/config/config_tests.xml
+++ b/config/config_tests.xml
@@ -49,6 +49,13 @@ ERS exact restart from startup (default 6 days + 5 days)
if $IOP_ON is set then suffix is rest_iop
compare component history files ".base" and ".rest" at day 11
+ERS2 exact restart from startup (default 6 days + 5 days)
+ do an 11 day initial test without making restarts (suffix: base)
+ if $IOP_ON is set then suffix is base_iop
+ do an 11 day restart test stopping at day 6 with a restart, then resuming from restart at day 6 (suffix: rest)
+ if $IOP_ON is set then suffix is rest_iop
+ compare component history files ".base" and ".rest" at day 11
+
ERP pes counts hybrid (open-MP/MPI) restart bfb test from startup, default 6 days + 5 days (previousy PER)
initial pes set up out of the box
do an 11 day initial test - write a restart at day 6 (suffix base)
@@ -260,6 +267,19 @@ NODEFAIL Tests restart upon detected node failure. Generates fake failu
FALSE
+
+ exact restart from startup, default 6 days + 5 days
+ 1
+ ndays
+ 11
+ $STOP_N / 2 + 1
+ $STOP_OPTION
+ $STOP_N
+ $STOP_OPTION
+ FALSE
+ FALSE
+
+
exact restart from startup with different PIO methods, default 6 days + 5 days
1
diff --git a/scripts/lib/CIME/SystemTests/ers2.py b/scripts/lib/CIME/SystemTests/ers2.py
new file mode 100644
index 00000000000..7e411e811fc
--- /dev/null
+++ b/scripts/lib/CIME/SystemTests/ers2.py
@@ -0,0 +1,60 @@
+"""
+CIME restart test 2 This class inherits from SystemTestsCommon
+"""
+from CIME.XML.standard_module_setup import *
+from CIME.SystemTests.system_tests_common import SystemTestsCommon
+
+logger = logging.getLogger(__name__)
+
+class ERS2(SystemTestsCommon):
+
+ def __init__(self, case):
+ """
+ initialize an object interface to the ERS2 system test
+ """
+ SystemTestsCommon.__init__(self, case)
+
+ def _ers2_first_phase(self):
+ stop_n = self._case.get_value("STOP_N")
+ stop_option = self._case.get_value("STOP_OPTION")
+ rest_n = self._case.get_value("REST_N")
+
+ # Don't need restarts for first run
+ self._case.set_value("REST_OPTION","never")
+
+ expect(stop_n > 0, "Bad STOP_N: %d" % stop_n)
+ expect(stop_n > 2, "ERROR: stop_n value %d too short"%stop_n)
+
+ logger.info("doing an %s %s initial test with restart file at %s %s"
+ %(str(stop_n), stop_option, str(rest_n), stop_option))
+ self.run_indv()
+
+ def _ers2_second_phase(self):
+ stop_n = self._case.get_value("STOP_N")
+ stop_option = self._case.get_value("STOP_OPTION")
+
+ rest_n = stop_n/2 + 1
+ stop_new = rest_n
+
+ self._case.set_value("REST_OPTION",stop_option)
+ self._case.set_value("STOP_N", stop_new)
+ self._case.flush()
+ logger.info("doing first part %s %s restart test"
+ %(str(stop_new), stop_option))
+ self.run_indv(suffix="intermediate")
+
+ stop_new = stop_n - rest_n
+ self._case.set_value("STOP_N", stop_new)
+ self._case.set_value("CONTINUE_RUN", True)
+ self._case.set_value("REST_OPTION","never")
+
+ logger.info("doing second part %s %s restart test"
+ %(str(stop_new), stop_option))
+ self.run_indv(suffix="rest")
+
+ # Compare restart file
+ self._component_compare_test("base", "rest")
+
+ def run_phase(self):
+ self._ers2_first_phase()
+ self._ers2_second_phase()