Skip to content

Commit c8c711d

Browse files
committed
fixes adjustment inflation
1 parent 155ddea commit c8c711d

8 files changed

+6432
-6493
lines changed

outputs/costs_2020.csv

+918-927
Large diffs are not rendered by default.

outputs/costs_2025.csv

+918-927
Large diffs are not rendered by default.

outputs/costs_2030.csv

+918-927
Large diffs are not rendered by default.

outputs/costs_2035.csv

+918-927
Large diffs are not rendered by default.

outputs/costs_2040.csv

+918-927
Large diffs are not rendered by default.

outputs/costs_2045.csv

+918-927
Large diffs are not rendered by default.

outputs/costs_2050.csv

+918-927
Large diffs are not rendered by default.

scripts/compile_cost_assumptions.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -1522,7 +1522,7 @@ def carbon_flow(costs,year):
15221522
costs.loc[('electrobiofuels', 'efficiency-biomass'), 'source'] = 'Stoichiometric calculation'
15231523

15241524

1525-
efuel_scale_factor = costs.loc[('BtL', 'C stored'), 'value'][0] * costs.loc[('Fischer-Tropsch', 'capture rate'), 'value'][0]
1525+
efuel_scale_factor = costs.loc[('BtL', 'C stored'), 'value']* costs.loc[('Fischer-Tropsch', 'capture rate'), 'value']
15261526

15271527
costs.loc[('electrobiofuels', 'efficiency-hydrogen'), 'value'] = costs.loc[('Fischer-Tropsch', 'efficiency'), 'value']\
15281528
/ efuel_scale_factor
@@ -2266,7 +2266,8 @@ def geometric_series(nominator, denominator=1, number_of_terms=1, start=1):
22662266
print("old c_v and c_b values are assumed where given")
22672267
to_add = costs_pypsa.loc[comp_missing].drop("year", axis=1)
22682268
to_add.loc[:, "further description"] = " from old pypsa cost assumptions"
2269-
to_add = to_add.drop("geothermal") # more data on geothermal is added downstream, so old assumptions are redundant
2269+
# more data on geothermal is added downstream, so old assumptions are redundant
2270+
to_add = to_add.drop("geothermal")
22702271
# TODO check currency year from old pypsa cost assumptions
22712272
to_add["currency_year"] = 2015
22722273
costs_tot = pd.concat([costs_tot, to_add], sort=False)
@@ -2277,9 +2278,10 @@ def geometric_series(nominator, denominator=1, number_of_terms=1, start=1):
22772278

22782279
# adjust for inflation
22792280
techs = costs_tot.index.get_level_values(0).unique()
2280-
costs_tot = adjust_for_inflation(data, techs, costs_tot.currency_year, years)
2281+
costs_tot = adjust_for_inflation(costs_tot, techs, costs_tot.currency_year, ["value"])
22812282

22822283
# format and sort
22832284
costs_tot.sort_index(inplace=True)
2284-
costs_tot.loc[:,'value'] = round(costs_tot.value.astype(float), snakemake.config.get("ndigits", 2))
2285+
costs_tot.loc[:,'value'] = round(costs_tot.value.astype(float),
2286+
snakemake.config.get("ndigits", 2))
22852287
costs_tot.to_csv([v for v in snakemake.output if str(year) in v][0])

0 commit comments

Comments
 (0)