Skip to content

Commit

Permalink
fix: remapping cat -> wb. related to #141
Browse files Browse the repository at this point in the history
  • Loading branch information
aaraney committed Aug 2, 2024
1 parent 0c9e843 commit f223020
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/ngen_cal/src/ngen/cal/calibration_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -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...")
Expand Down Expand Up @@ -144,4 +147,4 @@ def restart(self):
except FileNotFoundError:
return 0
#Reload the evaluation information
return Evaluatable.restart(self)
return Evaluatable.restart(self)

0 comments on commit f223020

Please sign in to comment.