Skip to content

Commit

Permalink
need to copy CaseDocs to baseline dir
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Aug 31, 2016
1 parent 76a7dbc commit cf2de41
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils/python/CIME/hist_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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

0 comments on commit cf2de41

Please sign in to comment.