Skip to content

Commit

Permalink
Merge pull request #582 from NREL/co2-bugfix
Browse files Browse the repository at this point in the history
Update models.py
  • Loading branch information
adfarth committed May 6, 2024
2 parents 3b2a9b9 + 2d17596 commit 2b0ac75
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions reoptjl/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1842,8 +1842,9 @@ def clean(self):
elif self.outage_durations not in [None,[]]:
self.outage_probabilities = [1/len(self.outage_durations)] * len(self.outage_durations)

if self.co2_from_avert or len(self.emissions_factor_series_lb_CO2_per_kwh) > 0:
self.emissions_factor_CO2_decrease_fraction = EMISSIONS_DECREASE_DEFAULTS.get("CO2e", None) # leave blank otherwise; the Julia Pkg will set to 0 unless site is in AK or HI
if (self.co2_from_avert or len(self.emissions_factor_series_lb_CO2_per_kwh) > 0) and self.emissions_factor_CO2_decrease_fraction == None:
# use default if not provided and using AVERT or custom EFs. Leave blank otherwise and the Julia Pkg will set to 0 unless site is in AK or HI.
self.emissions_factor_CO2_decrease_fraction = EMISSIONS_DECREASE_DEFAULTS.get("CO2e", None)

if self.emissions_factor_NOx_decrease_fraction == None:
self.emissions_factor_NOx_decrease_fraction = EMISSIONS_DECREASE_DEFAULTS.get("NOx", 0.0)
Expand Down

0 comments on commit 2b0ac75

Please sign in to comment.