From cf2de416d096d5a0a3cef97b5c98541122a7a7ec Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Fri, 26 Aug 2016 16:30:03 -0600 Subject: [PATCH] need to copy CaseDocs to baseline dir --- utils/python/CIME/hist_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/python/CIME/hist_utils.py b/utils/python/CIME/hist_utils.py index 56960e9c8775..b68bc8c4bd41 100644 --- a/utils/python/CIME/hist_utils.py +++ b/utils/python/CIME/hist_utils.py @@ -288,7 +288,6 @@ def generate_baseline(case, baseline_dir=None, allow_baseline_overwrite=False): case.get_value("MODEL") == "CESM" and not allow_baseline_overwrite): expect(False, " Cowardly refusing to overwrite existing baseline directory") - comments = "Generating baselines into '%s'\n" % basegen_dir num_gen = 0 for model in _iter_model_file_substrs(case): @@ -315,6 +314,10 @@ def generate_baseline(case, baseline_dir=None, allow_baseline_overwrite=False): shutil.copy(hist, baseline) comments += " generating baseline '%s' from file %s\n" % (baseline, hist) + # Copy namelist files from CaseDocs + shutil.copytree(os.path.join(case.get_value("CASEROOT"),"CaseDocs"), + os.path.join(basegen_dir,"CaseDocs")) + expect(num_gen > 0, "Could not generate any hist files for case '%s', something is seriously wrong" % testcase) return True, comments