From 7567b3db1d04fefd1ebbf34407f609fad536dd1e Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Mon, 9 Dec 2024 13:52:56 -0700 Subject: [PATCH 1/3] need to copy rpointer files with or without timestamp --- CIME/SystemTests/eri.py | 4 ++-- CIME/case/case_st_archive.py | 19 ++++++------------- CIME/non_py/cprnc | 2 +- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/CIME/SystemTests/eri.py b/CIME/SystemTests/eri.py index c7ac3142158..609dbcedea2 100644 --- a/CIME/SystemTests/eri.py +++ b/CIME/SystemTests/eri.py @@ -34,8 +34,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) diff --git a/CIME/case/case_st_archive.py b/CIME/case/case_st_archive.py index 5e32ef5b4f9..afc20266ad1 100644 --- a/CIME/case/case_st_archive.py +++ b/CIME/case/case_st_archive.py @@ -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 diff --git a/CIME/non_py/cprnc b/CIME/non_py/cprnc index 0784ad18d5a..e3eaa5346ec 160000 --- a/CIME/non_py/cprnc +++ b/CIME/non_py/cprnc @@ -1 +1 @@ -Subproject commit 0784ad18d5a48dbb497baa603ad1e4409b9979cc +Subproject commit e3eaa5346ecd50aef8b60fdf54b98cb1c13a24b1 From 22c7bea0feaa5717ee3f6df8edade49c4ee776fb Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Mon, 9 Dec 2024 13:56:48 -0700 Subject: [PATCH 2/3] trying to undo change in cprnc --- CIME/non_py/cprnc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CIME/non_py/cprnc b/CIME/non_py/cprnc index e3eaa5346ec..0b326fde0c1 160000 --- a/CIME/non_py/cprnc +++ b/CIME/non_py/cprnc @@ -1 +1 @@ -Subproject commit e3eaa5346ecd50aef8b60fdf54b98cb1c13a24b1 +Subproject commit 0b326fde0c1f719cced6b95b223fd821b9cb82e1 From 358381fbcb04ebf6e60c5f0ac8e5997e43f50151 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Mon, 9 Dec 2024 14:26:56 -0700 Subject: [PATCH 3/3] black reformat file --- CIME/SystemTests/eri.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CIME/SystemTests/eri.py b/CIME/SystemTests/eri.py index 609dbcedea2..e5e27390c0b 100644 --- a/CIME/SystemTests/eri.py +++ b/CIME/SystemTests/eri.py @@ -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 @@ -34,7 +35,7 @@ def _helper(dout_sr, refdate, refsec, rundir): os.mkdir(rundir) elif os.path.exists(dst): os.remove(dst) - if not 'rpointer' in item: + if not "rpointer" in item: os.symlink(item, dst) for item in glob.glob("{}/*rpointer*".format(rest_path)):