@@ -507,8 +507,8 @@ def add_desalinsation_data(costs):
507
507
costs .loc [(tech , 'lifetime' ), 'unit' ] = "years"
508
508
costs .loc [(tech , 'lifetime' ), 'source' ] = source_dict ['Caldera2016' ] + ", Table 1."
509
509
510
- costs = adjust_for_inflation (costs , ['seawater desalination' ], 2015 )
511
- costs = adjust_for_inflation (costs , ['clean water tank storage' ], 2013 )
510
+ costs = adjust_for_inflation (costs , ['seawater desalination' ], 2015 , [ "value" ] )
511
+ costs = adjust_for_inflation (costs , ['clean water tank storage' ], 2013 , [ "value" ] )
512
512
513
513
return costs
514
514
@@ -633,7 +633,7 @@ def get_data_from_DEA(data_in, expectation=None):
633
633
634
634
return d_by_tech
635
635
636
- def adjust_for_inflation (costs , techs , ref_year ):
636
+ def adjust_for_inflation (costs , techs , ref_year , col ):
637
637
"""
638
638
adjust the investment costs for the specified techs for inflation.
639
639
@@ -646,9 +646,10 @@ def adjust_for_inflation(costs, techs, ref_year):
646
646
"""
647
647
648
648
inflation = (1 + snakemake .config ['rate_inflation' ])** (ref_year - snakemake .config ['eur_year' ])
649
- paras = ["investment" , "VOM" , "fixed" ]
649
+ paras = ["investment" , "VOM" , "fixed" , "fuel" ]
650
650
filter_i = costs .index .get_level_values (0 ).isin (techs ) & costs .index .get_level_values (1 ).isin (paras )
651
- costs .loc [filter_i , 'value' ] /= inflation
651
+
652
+ costs .loc [filter_i , col ] = costs .loc [filter_i , col ].div (inflation .loc [filter_i ], axis = 0 )
652
653
653
654
654
655
return costs
@@ -1277,7 +1278,7 @@ def add_manual_input(data):
1277
1278
df = pd .read_csv (snakemake .input ['manual_input' ], quotechar = '"' ,sep = ',' , keep_default_na = False )
1278
1279
df = df .rename (columns = {"further_description" : "further description" })
1279
1280
1280
- # Inflation adjustment for investment and VOM
1281
+ # Inflation adjustment
1281
1282
mask = df [df ['parameter' ].isin (['investment' ,'VOM' ,'fuel' ])].index
1282
1283
df .loc [mask , 'value' ] /= (1 + snakemake .config ['rate_inflation' ])** (df .loc [mask , 'currency_year' ].astype (int )- snakemake .config ['eur_year' ])
1283
1284
@@ -2109,7 +2110,12 @@ def geometric_series(nominator, denominator=1, number_of_terms=1, start=1):
2109
2110
data = add_gas_storage (data )
2110
2111
# add carbon capture
2111
2112
data = add_carbon_capture (data , tech_data )
2112
-
2113
+
2114
+ # adjust for inflation
2115
+ data ["currency_year" ] = [2015 if x not in new_format else 2020 for x in
2116
+ data .index .get_level_values (0 )]
2117
+ techs = data .index .get_level_values (0 )
2118
+ data = adjust_for_inflation (data , techs , data .currency_year , years )
2113
2119
2114
2120
# %% (2) -- get data from other sources which need formatting -----------------
2115
2121
# (a) ---------- get old pypsa costs ---------------------------------------
@@ -2177,17 +2183,16 @@ def geometric_series(nominator, denominator=1, number_of_terms=1, start=1):
2177
2183
solar_techs = ['solar' , 'solar-rooftop' , 'solar-rooftop commercial' ,
2178
2184
'solar-rooftop residential' ,
2179
2185
'solar-utility' , 'solar-utility single-axis tracking' ]
2180
- costs = adjust_for_inflation ( costs , solar_techs , 2020 )
2186
+
2181
2187
2182
2188
# adjust for inflation all techs in new DEA format
2183
2189
new_format_without_solar = [tech for tech in new_format if tech not in solar_techs ]
2184
- costs = adjust_for_inflation (costs , new_format_without_solar , 2020 )
2185
2190
# add desalination and clean water tank storage
2186
2191
costs = add_desalinsation_data (costs )
2187
2192
# add energy storage database
2188
2193
if snakemake .config ['energy_storage_database' ]['pnnl_energy_storage' ].get ("add_data" , True ):
2189
2194
costs , tech = add_energy_storage_database (costs , year )
2190
- costs = adjust_for_inflation (costs , tech , 2020 )
2195
+ costs = adjust_for_inflation (costs , tech , 2020 , [ "value" ] )
2191
2196
2192
2197
# add electrolyzer and fuel cell efficiency from other source than DEA
2193
2198
if snakemake .config ["energy_storage_database" ].get ("h2_from_budischak" , True ):
0 commit comments