Skip to content

Commit

Permalink
Merge pull request #4418 from jedwards4b/use_which_ncdump
Browse files Browse the repository at this point in the history
add which to find ncdump and an error message if not found
  • Loading branch information
jedwards4b authored Aug 1, 2023
2 parents 56c1622 + ec537c7 commit c6dd05d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CIME/case/case_st_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,10 @@ def get_histfiles_for_restarts(
histfiles = set()
rest_hist_varname = archive.get_entry_value("rest_history_varname", archive_entry)
if rest_hist_varname != "unset":
cmd = "ncdump -v {} {} ".format(
rest_hist_varname, os.path.join(rundir, restfile)
ncdump = shutil.which("ncdump")
expect(ncdump, "ncdump not found in path")
cmd = "{} -v {} {} ".format(
ncdump, rest_hist_varname, os.path.join(rundir, restfile)
)
if testonly:
out = "{} =".format(rest_hist_varname)
Expand Down

0 comments on commit c6dd05d

Please sign in to comment.