Skip to content

Commit

Permalink
fix issue in sort method
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Nov 8, 2024
1 parent 9f09473 commit baca0fe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions CIME/case/case_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,7 @@ def case_run(self, skip_pnl=False, set_continue_run=False, submit_resubmits=Fals
rundir = self.get_value("RUNDIR")
if drv_restart_pointer:
pattern = os.path.join(rundir, "rpointer.cpl*")
files = glob.glob(pattern)
files.sort(key=(os.path.getmtime(x) for x in files))
files = sorted(glob.glob(pattern), key=os.path.getmtime)
drv_ptr = os.path.basename(files[-1])
self.set_value("DRV_RESTART_POINTER", drv_ptr)
model_log(
Expand Down
1 change: 0 additions & 1 deletion CIME/case/case_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def _submit(
rpointer = "rpointer.drv"
if case.get_value("MULTI_DRIVER"):
rpointer = rpointer + "_0001"

expect(
os.path.exists(os.path.join(rundir, rpointer)),
"CONTINUE_RUN is true but this case does not appear to have restart files staged in {} {}".format(
Expand Down

0 comments on commit baca0fe

Please sign in to comment.