Skip to content

Commit

Permalink
fixes adjustment inflation
Browse files Browse the repository at this point in the history
  • Loading branch information
lisazeyen committed Feb 15, 2024
1 parent 155ddea commit c8c711d
Show file tree
Hide file tree
Showing 8 changed files with 6,432 additions and 6,493 deletions.
1,845 changes: 918 additions & 927 deletions outputs/costs_2020.csv

Large diffs are not rendered by default.

1,845 changes: 918 additions & 927 deletions outputs/costs_2025.csv

Large diffs are not rendered by default.

1,845 changes: 918 additions & 927 deletions outputs/costs_2030.csv

Large diffs are not rendered by default.

1,845 changes: 918 additions & 927 deletions outputs/costs_2035.csv

Large diffs are not rendered by default.

1,845 changes: 918 additions & 927 deletions outputs/costs_2040.csv

Large diffs are not rendered by default.

1,845 changes: 918 additions & 927 deletions outputs/costs_2045.csv

Large diffs are not rendered by default.

1,845 changes: 918 additions & 927 deletions outputs/costs_2050.csv

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions scripts/compile_cost_assumptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,7 @@ def carbon_flow(costs,year):
costs.loc[('electrobiofuels', 'efficiency-biomass'), 'source'] = 'Stoichiometric calculation'


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

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

# adjust for inflation
techs = costs_tot.index.get_level_values(0).unique()
costs_tot = adjust_for_inflation(data, techs, costs_tot.currency_year, years)
costs_tot = adjust_for_inflation(costs_tot, techs, costs_tot.currency_year, ["value"])

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

0 comments on commit c8c711d

Please sign in to comment.