Skip to content

Commit

Permalink
Merge pull request #1375 from ESMCI/bertinia/st_archive
Browse files Browse the repository at this point in the history
bug fix for DART in case_st_archive.py
  • Loading branch information
fischer-ncar authored Apr 19, 2017
2 parents 06c5645 + 49bf068 commit 5a141f8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/lib/CIME/case_st_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ def _get_ninst_info(case, compclass):
ninst_strings = []
if ninst is None:
ninst = 1
for i in range(ninst):
if ninst > 1:
ninst_strings.append('_' + '%04d' % i)
else:
ninst_strings.append('')
for i in range(1,ninst+1):
if ninst > 1:
ninst_strings.append('_' + '%04d' % i)
else:
ninst_strings.append('')

logger.debug("ninst and ninst_strings are: %s and %s for %s" %(ninst, ninst_strings, compclass))
return ninst, ninst_strings
Expand Down Expand Up @@ -120,7 +120,7 @@ def _archive_log_files(case):
srcfile = join(rundir, os.path.basename(logfile))
destfile = join(archive_logdir, os.path.basename(logfile))
shutil.move(srcfile, destfile)
logger.info("moving \b%s to \b%s" %(srcfile, destfile))
logger.info("moving \n%s to \n%s" %(srcfile, destfile))


###############################################################################
Expand Down Expand Up @@ -231,7 +231,7 @@ def _archive_restarts(case, archive, archive_entry,
for i in range(ninst):
restfiles = ""
pattern = r"%s\.%s\d*.*" % (casename, compname)
if pattern != "dart":
if "dart" not in pattern:
pfile = re.compile(pattern)
files = [f for f in os.listdir(rundir) if pfile.search(f)]
if ninst_strings:
Expand Down

0 comments on commit 5a141f8

Please sign in to comment.