Skip to content
6 changes: 5 additions & 1 deletion CIME/SystemTests/eri.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ def run_phase(self):
start_1_year, start_1_month, start_1_day = [
int(item) for item in start_1.split("-")
]
start_2_year = start_1_year + 2
# Change the year for the hybrid case to make sure the system can handle this change in year.
# Note: When using a Gregorian calendar, it is important for the two years to be leap years
# because a testmod which tests the gregorian calendar starts the runs on leap day,
# which must exist in all of the start years.
start_2_year = start_1_year + 4
start_2 = "{:04d}-{:02d}-{:02d}".format(
start_2_year, start_1_month, start_1_day
)
Expand Down
14 changes: 13 additions & 1 deletion CIME/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
RUN_PHASE,
] # Order matters


###############################################################################
def _translate_test_names_for_new_pecount(test_names, force_procs, force_threads):
###############################################################################
Expand Down Expand Up @@ -130,6 +131,8 @@ def _translate_test_names_for_new_pecount(test_names, force_procs, force_threads


_TIME_CACHE = {}


###############################################################################
def _get_time_est(test, baseline_root, as_int=False, use_cache=False, raw=False):
###############################################################################
Expand Down Expand Up @@ -688,6 +691,15 @@ def _create_newcase_phase(self, test):
create_newcase_cmd += " --pecount {}".format(pesize)
elif case_opt.startswith("V"):
driver = case_opt[1:]
elif case_opt.startswith("cG"):
# Need to examine the long name.
# spinup cases are 1850, 2000, 2010
# not HIST, SSP###
spinup_po = re.compile('([\d]{1,4})')
spinup = spinup_po.match(compset)
expect(spinup == None,
"Gregorian calendar (_cG) cannot be used with spinup compset \n {}".format(compset)
)

create_newcase_cmd += " --driver {}".format(driver)

Expand Down Expand Up @@ -881,7 +893,7 @@ def _xml_phase(self, test):
envtest.set_test_parameter("USE_ESMF_LIB", "TRUE")
logger.debug(" USE_ESMF_LIB set to TRUE")

elif opt == "CG":
elif opt == "cG":
envtest.set_test_parameter("CALENDAR", "GREGORIAN")
logger.debug(" CALENDAR set to {}".format(opt))

Expand Down
2 changes: 1 addition & 1 deletion doc/source/system_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ MODIFIERS Description
============ =====================================================================================
_C# Set number of instances to # and use the multi driver (can't use with _N).

_CG CALENDAR set to "GREGORIAN".
_cG CALENDAR set to "GREGORIAN".

_D XML variable DEBUG set to "TRUE".

Expand Down
Loading