diff --git a/cime_config/buildnml b/cime_config/buildnml index 674d1a29ea..01253a0e7d 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -47,6 +47,23 @@ def buildnml(case, caseroot, compname): RUN_REFDATE = case.get_value("RUN_REFDATE") RUN_REFTOD = case.get_value("RUN_REFTOD") COMP_INTERFACE = case.get_value("COMP_INTERFACE") + CALENDAR = case.get_value("CALENDAR") + COMPSET = case.get_value("COMPSET") + +# The Gregorian calendar currently can't be used with spinup compsets +# because CAM's stream-handling code can't handle a request for data +# for Feb 29 (possibly specified in a leapday testmod) from a non-leap-year +# in the stream(s) data (specified in a use_case, e.g. 1850_cam_lt.xml). +# This limitation can be removed when CAM's stream-handling is switched to +# using CDEPS, which appears to handle this situation. (See discussion in +# https://github.com/ESCOMP/CAM/issues/1447 for details.) + if CALENDAR.startswith("GREGORIAN"): + spinup_po = re.compile('\d{4}') + spinup = spinup_po.match(COMPSET) + expect(spinup == None, + "Gregorian calendar (modifier _cG) cannot be used with spinup compset \n {}".format(COMPSET) + ) + testsrc = os.path.join(srcroot, "components", "cam") if os.path.exists(testsrc): diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_leapday/shell_commands b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_leapday/shell_commands index 2805059fe3..5d2ba4457f 100644 --- a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_leapday/shell_commands +++ b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_leapday/shell_commands @@ -3,4 +3,4 @@ if [ "$driver" = "nuopc" ]; then ./xmlchange ROF_NCPL=\$ATM_NCPL ./xmlchange GLC_NCPL=\$ATM_NCPL fi -./xmlchange RUN_STARTDATE=2012-02-29 +./xmlchange RUN_STARTDATE=2008-02-29 diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_leapday/user_nl_cice b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_leapday/user_nl_cice new file mode 100644 index 0000000000..25175d22d4 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_leapday/user_nl_cice @@ -0,0 +1,8 @@ +!---------------------------------------------------------------------------------- +! Users should add all user specific namelist changes below in the form of +! namelist_var = new_namelist_value +! Note - that it does not matter what namelist group the namelist_var belongs to +!---------------------------------------------------------------------------------- +histfreq = 'd' +histfreq_n = 1 + diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_leapday/user_nl_clm b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_leapday/user_nl_clm index 0d83b5367b..da794cc283 100644 --- a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_leapday/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_leapday/user_nl_clm @@ -24,4 +24,5 @@ hist_nhtfrq = 9 hist_mfilt = 1 hist_ndens = 1 - +check_finidat_year_consistency = .false. +for_testing_allow_non_annual_changes = .true. diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq9s_leapday/user_nl_mosart b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_leapday/user_nl_mosart new file mode 100644 index 0000000000..3f64f4bb96 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/cam/outfrq9s_leapday/user_nl_mosart @@ -0,0 +1,8 @@ +!---------------------------------------------------------------------------------- +! Users should add all user specific namelist changes below in the form of +! namelist_var = new_namelist_value +! NOTE: namelist variable delt_mosart (the time-step) CAN ONLY be changed by modifying the value +! of the xml variable ROF_NCPL in env_run.xml +!---------------------------------------------------------------------------------- +nhtfrq = -24 +