209
209
# since February 2022 DEA uses a new format for the technology data
210
210
# all excel sheets of updated technologies have a different layout and are
211
211
# given in EUR_2020 money (instead of EUR_2015)
212
- new_format = ['solar-utility' ,
212
+ cost_year_2020 = ['solar-utility' ,
213
213
'solar-utility single-axis tracking' ,
214
214
'solar-rooftop residential' ,
215
215
'solar-rooftop commercial' ,
216
216
'offwind' ,
217
- 'electrolysis' ]
217
+ 'electrolysis' ,
218
+ 'biogas' ,
219
+ 'biogas CC' ,
220
+ 'biogas upgrading' ,
221
+ 'direct air capture' ,
222
+ 'biomass CHP capture' ,
223
+ 'cement capture' ,
224
+ 'BioSNG' ,
225
+ 'BtL' ,
226
+ 'biomass-to-methanol' ,
227
+ 'biogas plus hydrogen' ,
228
+ 'methanolisation' ,
229
+ 'Fischer-Tropsch'
230
+ ]
231
+
232
+ cost_year_2019 = ['direct firing gas' ,
233
+ 'direct firing gas CC' ,
234
+ 'direct firing solid fuels' ,
235
+ 'direct firing solid fuels CC' ,
236
+ 'industrial heat pump medium temperature' ,
237
+ 'industrial heat pump high temperature' ,
238
+ 'electric boiler steam' ,
239
+ 'gas boiler steam' ,
240
+ 'solid biomass boiler steam' ,
241
+ 'solid biomass boiler steam CC' ,
242
+ ]
243
+
218
244
219
245
# %% -------- FUNCTIONS ---------------------------------------------------
220
246
@@ -273,7 +299,7 @@ def get_data_DEA(tech, data_in, expectation=None):
273
299
usecols += f",{ uncrtnty_lookup [tech ]} "
274
300
275
301
276
- if (tech in new_format ) or ("renewable_fuels" in excel_file ):
302
+ if (( tech in cost_year_2019 ) or (tech in cost_year_2020 ) or ( "renewable_fuels" in excel_file ) ):
277
303
skiprows = [0 ]
278
304
else :
279
305
skiprows = [0 ,1 ]
@@ -454,7 +480,7 @@ def get_data_DEA(tech, data_in, expectation=None):
454
480
df_final = df_final .ffill (axis = 1 )
455
481
456
482
df_final ["source" ] = source_dict ["DEA" ] + ", " + excel_file .replace ("inputs/" ,"" )
457
- if tech in new_format and (tech != "electrolysis" ):
483
+ if tech in cost_year_2020 and (not ( "for_carbon_capture_transport_storage" in excel_file )) and ( not ( "renewable_fuels" in excel_file ) ):
458
484
for attr in ["investment" , "Fixed O&M" ]:
459
485
to_drop = df [df .index .str .contains (attr ) &
460
486
~ df .index .str .contains ("\(\*total\)" )].index
@@ -2184,9 +2210,13 @@ def prepare_inflation_rate(fn):
2184
2210
data = add_carbon_capture (data , tech_data )
2185
2211
2186
2212
# adjust for inflation
2187
- data ["currency_year" ] = [2015 if x not in new_format else 2020 for x in
2188
- data .index .get_level_values (0 )]
2189
-
2213
+ for x in data .index .get_level_values ("technology" ):
2214
+ if x in cost_year_2020 :
2215
+ data .at [x , "currency_year" ] = 2020
2216
+ elif x in cost_year_2019 :
2217
+ data .at [x , "currency_year" ] = 2019
2218
+ else :
2219
+ data .at [x , "currency_year" ] = 2015
2190
2220
2191
2221
# %% (2) -- get data from other sources which need formatting -----------------
2192
2222
# (a) ---------- get old pypsa costs ---------------------------------------
@@ -2321,4 +2351,4 @@ def prepare_inflation_rate(fn):
2321
2351
costs_tot .sort_index (inplace = True )
2322
2352
costs_tot .loc [:,'value' ] = round (costs_tot .value .astype (float ),
2323
2353
snakemake .config .get ("ndigits" , 2 ))
2324
- costs_tot .to_csv ([v for v in snakemake .output if str (year ) in v ][0 ])
2354
+ costs_tot .to_csv ([v for v in snakemake .output if str (year ) in v ][0 ])
0 commit comments