diff --git a/python/ngen_cal/src/ngen/cal/calibration_set.py b/python/ngen_cal/src/ngen/cal/calibration_set.py index f2a8a76e..c750a88f 100644 --- a/python/ngen_cal/src/ngen/cal/calibration_set.py +++ b/python/ngen_cal/src/ngen/cal/calibration_set.py @@ -62,7 +62,10 @@ def output(self) -> 'DataFrame': """ # TODO should contributing_catchments be singular??? assuming it is for now... # Call output hooks, take first non-none result provided from hooks (called in LIFO order of registration) - df = self._hooks.ngen_cal_model_output(id=self._eval_nexus.contributing_catchments[0].replace('cat', 'wb')) + cat_id = self._eval_nexus.contributing_catchments[0].id + assert cat_id.startswith("cat"), f"expected catchment id to start with 'cat': {cat_id}" + cat_id = cat_id.replace("cat", "wb") + df = self._hooks.ngen_cal_model_output(id=cat_id) if df is None: # list of results is empty print("No suitable output found from output hooks...") @@ -144,4 +147,4 @@ def restart(self): except FileNotFoundError: return 0 #Reload the evaluation information - return Evaluatable.restart(self) \ No newline at end of file + return Evaluatable.restart(self)