Skip to content

Commit

Permalink
Merge pull request #28 from jedwards4b/remove_glob_rootdir
Browse files Browse the repository at this point in the history
Remove glob rootdir
  • Loading branch information
dabail10 authored Dec 5, 2024
2 parents f283ede + f450b48 commit 604b66a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,10 @@ def _create_namelists(case, confdir, infile, nmlgen, inst_string):
# find the most recent file matching pattern
cice_ptr = None
pattern = "rpointer.ice*"
files = glob.glob(pattern, root_dir=rundir)
os.chdir(rundir)
files = glob.glob(pattern)
files.sort(key=lambda x: os.path.getmtime(os.path.join(rundir,x)))
os.chdir(case.get_case_root())
if files:
cice_ptr = files[-1]

Expand Down

0 comments on commit 604b66a

Please sign in to comment.