Skip to content

Commit c0922ee

Browse files
authored
Merge pull request #45 from NGWPC/jwade_lakeout_fix
Jwade lakeout fix
2 parents 1f7b635 + dc93f2a commit c0922ee

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

python/nwm_fcst_mgr/forecast.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,13 @@ def postprocess(self, suppress_output: bool = False) -> None:
408408
if not suppress_output:
409409

410410
# read troute output file
411-
outfile = glob.glob(f"{run_output_dir}/troute*.nc")[0]
411+
outfiles = glob.glob(f"{run_output_dir}/troute_output*.nc")
412+
if len(outfiles) > 1:
413+
msg = f"More than 1 troute_output file found in output directory: {run_output_dir}"
414+
logger.critical(msg)
415+
raise ValueError(msg)
416+
outfile = outfiles[0]
417+
412418
logger.info(f"Reading T-route output file: {outfile}")
413419
output = read_troute_output(self.gage0, self.valid_config["model"]["crosswalk"], self.gpkg_cats, outfile)
414420

0 commit comments

Comments
 (0)