Skip to content

Commit

Permalink
Handle KeyError in cooling_fr to avoid minimum version tag
Browse files Browse the repository at this point in the history
  • Loading branch information
glatterf42 committed Sep 11, 2024
1 parent 5f69016 commit db297cf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions message_ix_models/model/water/data/water_for_ppl.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ def cooling_fr(x: pd.Series) -> float:
where:
h_fg (flue gasses losses) = 0.1 (10% assumed losses)
"""
if "hpl" in x["parent_tech"]:
return x["value"] - 1
else:
try:
if "hpl" in x["parent_tech"]:
return x["value"] - 1
else:
return x["value"] - (x["value"] * 0.1) - 1
except KeyError:
return x["value"] - (x["value"] * 0.1) - 1


Expand Down

0 comments on commit db297cf

Please sign in to comment.