Skip to content

Commit f223020

Browse files
committed
fix: remapping cat -> wb. related to #141
1 parent 0c9e843 commit f223020

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

python/ngen_cal/src/ngen/cal/calibration_set.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ def output(self) -> 'DataFrame':
6262
"""
6363
# TODO should contributing_catchments be singular??? assuming it is for now...
6464
# Call output hooks, take first non-none result provided from hooks (called in LIFO order of registration)
65-
df = self._hooks.ngen_cal_model_output(id=self._eval_nexus.contributing_catchments[0].replace('cat', 'wb'))
65+
cat_id = self._eval_nexus.contributing_catchments[0].id
66+
assert cat_id.startswith("cat"), f"expected catchment id to start with 'cat': {cat_id}"
67+
cat_id = cat_id.replace("cat", "wb")
68+
df = self._hooks.ngen_cal_model_output(id=cat_id)
6669
if df is None:
6770
# list of results is empty
6871
print("No suitable output found from output hooks...")
@@ -144,4 +147,4 @@ def restart(self):
144147
except FileNotFoundError:
145148
return 0
146149
#Reload the evaluation information
147-
return Evaluatable.restart(self)
150+
return Evaluatable.restart(self)

0 commit comments

Comments
 (0)