Skip to content

Commit

Permalink
updates due to change in default settings
Browse files Browse the repository at this point in the history
fixes to hfc tests
  • Loading branch information
denised committed Oct 25, 2021
1 parent f6117d4 commit 9db0c20
Show file tree
Hide file tree
Showing 54 changed files with 92 additions and 65 deletions.
9 changes: 6 additions & 3 deletions model/operatingcost.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@ def annual_breakout(
if not has_var_costs and not fixed_oper_cost_per_iunit:
return breakout

# supply a reasonable value if none provided; this matches the requested default in the Excel
if lifetime_replacement == 0:
lifetime_replacement = 100

for year in range(first_year, last_year + 1):
# within the years of interest, assume replacement of worn out equipment.
lifetime = lifetime_replacement
assert lifetime_replacement != 0, 'Cannot have a lifetime replacement of 0 and non-zero operating costs'
while math.ceil(lifetime) < (last_year + 1 - year):
lifetime += lifetime_replacement

Expand Down Expand Up @@ -399,7 +402,7 @@ def soln_vs_conv_single_iunit_cashflow(self):
result.name = 'soln_vs_conv_single_iunit_cashflow'

soln_lifetime = self.ac.soln_lifetime_replacement
if self.ac.soln_avg_annual_use is not None and self.ac.conv_avg_annual_use is not None:
if self.ac.soln_avg_annual_use is not None and self.ac.conv_avg_annual_use is not None and self.ac.conv_avg_annual_use != 0:
conv_usage_mult = self.ac.soln_avg_annual_use / self.ac.conv_avg_annual_use # RRS
else:
conv_usage_mult = 1 # LAND
Expand Down Expand Up @@ -510,7 +513,7 @@ def soln_only_single_iunit_cashflow(self):
result.name = 'soln_only_single_iunit_cashflow'

soln_lifetime = self.ac.soln_lifetime_replacement
if self.ac.soln_avg_annual_use is not None and self.ac.conv_avg_annual_use is not None:
if self.ac.soln_avg_annual_use is not None and self.ac.conv_avg_annual_use is not None and self.ac.conv_avg_annual_use != 0:
conv_usage_mult = self.ac.soln_avg_annual_use / self.ac.conv_avg_annual_use # RRS
else:
conv_usage_mult = 1 # LAND
Expand Down
24 changes: 21 additions & 3 deletions model/tests/test_emissionsfactors.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,45 +54,63 @@ def test_ElectricityGenOnGrid_conv_ref_grid_CO2eq_per_KWh():
table = eg.conv_ref_grid_CO2eq_per_KWh()
assert table.loc[2025, "OECD90"] == pytest.approx(0.454068989)
assert table.loc[2020, 'World'] == pytest.approx(0.483415642)

ac = advanced_controls.AdvancedControls(
emissions_grid_source="ipcc_only", emissions_grid_range="low")
eg = ef.ElectricityGenOnGrid(ac=ac)
table = eg.conv_ref_grid_CO2eq_per_KWh()
assert table.loc[2020, 'World'] == pytest.approx(0.416520905)

ac = advanced_controls.AdvancedControls(
emissions_grid_source="ipcc_only", emissions_grid_range="high")
eg = ef.ElectricityGenOnGrid(ac=ac)
table = eg.conv_ref_grid_CO2eq_per_KWh()
assert table.loc[2020, 'World'] == pytest.approx(0.952177536)

ac = advanced_controls.AdvancedControls(
emissions_grid_source="meta-analysis", emissions_grid_range="mean")
eg = ef.ElectricityGenOnGrid(ac=ac)
eg = ef.ElectricityGenOnGrid(ac=ac, grid_emissions_version=1)
table = eg.conv_ref_grid_CO2eq_per_KWh()
assert table.loc[2020, 'World'] == pytest.approx(0.581083120)

ac = advanced_controls.AdvancedControls(
emissions_grid_source="meta-analysis", emissions_grid_range="low")
eg = ef.ElectricityGenOnGrid(ac=ac)
eg = ef.ElectricityGenOnGrid(ac=ac, grid_emissions_version=1)
table = eg.conv_ref_grid_CO2eq_per_KWh()
assert table.loc[2020, 'World'] == pytest.approx(0.446005409)

ac = advanced_controls.AdvancedControls(
emissions_grid_source="meta-analysis", emissions_grid_range="high")
eg = ef.ElectricityGenOnGrid(ac=ac)
eg = ef.ElectricityGenOnGrid(ac=ac, grid_emissions_version=1)
table = eg.conv_ref_grid_CO2eq_per_KWh()
assert table.loc[2020, 'World'] == pytest.approx(0.726403172)

ac = advanced_controls.AdvancedControls(
emissions_grid_source="meta-analysis", emissions_grid_range="mean")
eg = ef.ElectricityGenOnGrid(ac=ac, grid_emissions_version=2)
table = eg.conv_ref_grid_CO2eq_per_KWh()
assert table.loc[2033, 'World'] == pytest.approx(0.5546363024)

ac = advanced_controls.AdvancedControls(
emissions_grid_source="meta-analysis", emissions_grid_range="mean")
eg = ef.ElectricityGenOnGrid(ac=ac, grid_emissions_version=3)
table = eg.conv_ref_grid_CO2eq_per_KWh()
assert table.loc[2043, 'World'] == pytest.approx(0.52233785855)

eg = ef.ElectricityGenOnGrid(ac=ac, grid_emissions_version=4)
table = eg.conv_ref_grid_CO2eq_per_KWh()
assert table.loc[2042, 'World'] == pytest.approx(0.52865037213)

def test_emissions_grid_current():
# Test that default and current both load, and are the same
ac = advanced_controls.AdvancedControls(
emissions_grid_source="meta-analysis", emissions_grid_range="low")
eg_default = ef.ElectricityGenOnGrid(ac=ac)
table = eg_default.conv_ref_grid_CO2eq_per_KWh()

eg_current = ef.ElectricityGenOnGrid(ac=ac,grid_emissions_version="current")
table_2 = eg_current.conv_ref_grid_CO2eq_per_KWh()
assert table.loc[2040,'World'] == table_2.loc[2040,'World']

def test_ElectricityGenOnGrid_conv_ref_grid_CO2eq_per_KWh_invalid_range():
with pytest.raises(ValueError):
Expand Down
12 changes: 7 additions & 5 deletions model/tests/test_helpertables.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,17 +710,19 @@ def test_soln_use_first_pds_datapoint_not_2014():
ht_pds_datapoints = ht_ref_datapoints
ht = helpertables.HelperTables(ac, pds_adoption_data_per_region=custom_scen,
ref_datapoints=ht_ref_datapoints, pds_datapoints=ht_pds_datapoints,
copy_pds_world_too=True)
copy_pds_datapoint=True, copy_pds_world_too=True)
result = ht.soln_pds_funits_adopted()
# even when first datapoint is not 2014, copy_pds_datapoint copies to 2014
for region in regions:
assert int(result.loc[2020, region]) == 1000
assert int(result.loc[2014, region]) == 1000

ht = helpertables.HelperTables(ac, pds_adoption_data_per_region=custom_scen,
ref_datapoints=ht_ref_datapoints, pds_datapoints=ht_pds_datapoints,
copy_pds_world_too=False)
copy_pds_datapoint=True, copy_pds_world_too=False)
result = ht.soln_pds_funits_adopted()
assert int(result.loc[2020, regions[0]]) != 1000
assert int(result.loc[2014, regions[0]]) != 1000
for region in regions[1:]:
assert int(result.loc[2020, region]) == 1000
assert int(result.loc[2014, region]) == 1000


def test_copy_ref_datapoint():
Expand Down
2 changes: 1 addition & 1 deletion solution/afforestation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac,grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=self.tla_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/airplanes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac,grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=ref_tam_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/bamboo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac,grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=self.tla_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/biochar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=ref_tam_per_region, pds_total_adoption_units=pds_tam_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/biogas_small/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=ref_tam_per_region, pds_total_adoption_units=pds_tam_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/bioplastic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=ref_tam_per_region, pds_total_adoption_units=pds_tam_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/buildingautomation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def __init__(self, scen=None):
pds_adoption_is_single_source=pds_adoption_is_single_source,
copy_ref_world_too=True)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=ref_tam_per_region, pds_total_adoption_units=pds_tam_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/composting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=ref_tam_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/conservationagriculture/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=self.tla_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/coolroofs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=ref_tam_per_region, pds_total_adoption_units=pds_tam_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/districtheating/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=ref_tam_per_region, pds_total_adoption_units=pds_tam_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/farmlandrestoration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=self.tla_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/forestprotection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def constrained_tla(rate):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=self.tla_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/grasslandprotection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def constrained_tla(ad_2050):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=self.tla_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/heatpumps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=ref_tam_per_region, pds_total_adoption_units=pds_tam_per_region,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
24.10.2021 denise
I fixed the erroneous space in the expect.zip file, so that scenario can now be loaded.
If this solution is extracted again, it will need to be redone: after running the macros, find
the index file and hand-edit it to remove the space.
I also added checks to the model financial analysis code so that no exceptions are raised
(and thus the modification to expected_result_tester is no longer required.)
I haven't checked or verified any of the other issues.
26.08.2021 danielmk
hfc_replacement initial Python port.
Automated extraction worked only partially with hfc_replacement. For example,
Expand Down
Binary file modified solution/hfc_replacement/tests/expected.zip
Binary file not shown.
7 changes: 3 additions & 4 deletions solution/hfc_replacement/tests/test_hfc_replacement.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@


# If there are long-running test failures that should be skipped, you can indicate them here.
# Someday we'll have a scanner that will check for these
SCENARIO_SKIP = ['PDS2-82p2050-Median', 1, 'PDS3-97p2050-Upper', 2]
TEST_SKIP = ['First Cost', 'Operating Cost', 'Net Profit Margin', 'Unit Adoption']
# 'S-Curve', 'Unit Adoption Calculations',
# HFC model doesn't have financial analysis in place.
SCENARIO_SKIP = [] #['PDS2-82p2050-Median', 1, 'PDS3-97p2050-Upper', 2]
TEST_SKIP = ['First Cost', 'Operating Cost', 'Net Profit Margin']

def test_loader():
"""Test that the solution can load the defined scenarios"""
Expand Down
2 changes: 1 addition & 1 deletion solution/improvedcookstoves/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=ref_tam_per_region, pds_total_adoption_units=pds_tam_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/improvedrice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=self.tla_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/indigenouspeoplesland/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def constrained_tla(datapoints):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=self.tla_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/insulation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=ref_tam_per_region, pds_total_adoption_units=pds_tam_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/irrigationefficiency/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=self.tla_per_region, pds_total_adoption_units=self.tla_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/leds_commercial/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=ref_tam_per_region, pds_total_adoption_units=pds_tam_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/leds_residential/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=ref_tam_per_region, pds_total_adoption_units=pds_tam_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/managedgrazing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=self.tla_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/mangroverestoration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=self.tla_per_region,
Expand Down
2 changes: 1 addition & 1 deletion solution/methaneleak/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def __init__(self, scen=None):
pds_adoption_trend_per_region=pds_adoption_trend_per_region,
pds_adoption_is_single_source=pds_adoption_is_single_source)

self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac)
self.ef = emissionsfactors.ElectricityGenOnGrid(ac=self.ac, grid_emissions_version=1)

self.ua = unitadoption.UnitAdoption(ac=self.ac,
ref_total_adoption_units=ref_tam_per_region,
Expand Down
Loading

0 comments on commit 9db0c20

Please sign in to comment.