Skip to content

Commit

Permalink
Merge pull request #1511 from jedwards4b/no_interum_dirs
Browse files Browse the repository at this point in the history
do not make dirs unless needed

Only create rest directories if they are going to be populated

Test suite: scripts_regression_tests.py and hand testing
Test baseline:
Test namelist changes:
Test status: bit for bit

Fixes #1449

User interface changes?:

Code review:
  • Loading branch information
jgfouca authored May 10, 2017
2 parents 144cc38 + 76738e6 commit 9d865d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/lib/CIME/case_st_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,9 @@ def _archive_restarts(case, archive, archive_entry,
rundir = case.get_value("RUNDIR")
casename = case.get_value("CASE")
archive_restdir = join(dout_s_root, 'rest', datename)
if not os.path.exists(archive_restdir):
os.makedirs(archive_restdir)
if not datename_is_last or case.get_value('DOUT_S_SAVE_INTERIM_RESTART_FILES'):
if not os.path.exists(archive_restdir):
os.makedirs(archive_restdir)

# archive the rpointer file(s) for this datename and all possible ninst_strings
_archive_rpointer_files(case, archive, archive_entry, archive_restdir,
Expand Down

0 comments on commit 9d865d5

Please sign in to comment.