Skip to content

Commit

Permalink
Merge pull request #4714 from ESMCI/st_archive_fix
Browse files Browse the repository at this point in the history
St archive fix
  • Loading branch information
jedwards4b authored Dec 9, 2024
2 parents 902dc84 + 358381f commit b2f271b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
5 changes: 3 additions & 2 deletions CIME/SystemTests/eri.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
CIME ERI test This class inherits from SystemTestsCommon
"""

from CIME.XML.standard_module_setup import *
from CIME.utils import safe_copy
from CIME.SystemTests.system_tests_common import SystemTestsCommon
Expand Down Expand Up @@ -34,8 +35,8 @@ def _helper(dout_sr, refdate, refsec, rundir):
os.mkdir(rundir)
elif os.path.exists(dst):
os.remove(dst)

os.symlink(item, dst)
if not "rpointer" in item:
os.symlink(item, dst)

for item in glob.glob("{}/*rpointer*".format(rest_path)):
safe_copy(item, rundir)
Expand Down
19 changes: 6 additions & 13 deletions CIME/case/case_st_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,12 @@ def _archive_rpointer_files(
rpointers = glob.glob(
os.path.join(rundir, "rpointer.*" + _datetime_str(datename))
)
# If timestamped rpointers exist use them
if rpointers:
for rpointer in rpointers:
safe_copy(
rpointer, os.path.join(archive_restdir, os.path.basename(rpointer))
)
else:
# Copy of all rpointer files for latest restart date
rpointers = glob.glob(os.path.join(rundir, "rpointer.*"))
for rpointer in rpointers:
safe_copy(
rpointer, os.path.join(archive_restdir, os.path.basename(rpointer))
)
# Copy of all rpointer files for latest restart date
rpointers = glob.glob(os.path.join(rundir, "rpointer.*"))
for rpointer in rpointers:
safe_copy(
rpointer, os.path.join(archive_restdir, os.path.basename(rpointer))
)
else:
# Generate rpointer file(s) for interim restarts for the one datename and each
# possible value of ninst_strings
Expand Down
2 changes: 1 addition & 1 deletion CIME/non_py/cprnc
Submodule cprnc updated 0 files

0 comments on commit b2f271b

Please sign in to comment.