Skip to content

Commit 8f9a93b

Browse files
committed
first step to integrate new data
1 parent df36328 commit 8f9a93b

9 files changed

+24
-6466
lines changed
872 KB
Binary file not shown.

outputs/costs_2020.csv

-920
This file was deleted.

outputs/costs_2025.csv

-920
This file was deleted.

outputs/costs_2030.csv

-920
This file was deleted.

outputs/costs_2035.csv

-920
This file was deleted.

outputs/costs_2040.csv

-920
This file was deleted.

outputs/costs_2045.csv

-920
This file was deleted.

outputs/costs_2050.csv

-920
This file was deleted.

scripts/compile_cost_assumptions.py

+24-26
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@
100100
'hydrogen storage underground': '151c Hydrogen Storage - Caverns',
101101
'hydrogen storage tank type 1 including compressor': '151a Hydrogen Storage - Tanks',
102102
'micro CHP': '219 LT-PEMFC mCHP - natural gas',
103-
'biogas' : '81 Biogas Plant, Basic conf.',
104-
'biogas CC' : '81 Biogas Plant, Basic conf.',
105-
'biogas upgrading': '82 Biogas, upgrading',
103+
'biogas' : '81 Biogas, Basic plant, small',
104+
'biogas CC' : '81 Biogas, Basic plant, small',
105+
'biogas upgrading': '82 Upgrading 3,000 Nm3 per h',
106106
'battery': '180 Lithium Ion Battery',
107107
'industrial heat pump medium temperature': '302.a High temp. hp Up to 125 C',
108108
'industrial heat pump high temperature': '302.b High temp. hp Up to 150',
@@ -111,15 +111,15 @@
111111
'solid biomass boiler steam': '311.1e Steam boiler Wood',
112112
'solid biomass boiler steam CC': '311.1e Steam boiler Wood',
113113
'biomass boiler': '204 Biomass boiler, automatic',
114-
'electrolysis': '86 AEC 100MW', #'88 Alkaline Electrolyser',
114+
'electrolysis': '86 AEC 100 MW',
115115
'direct air capture': '403.a Direct air capture',
116116
'biomass CHP capture': '401.a Post comb - small CHP',
117117
'cement capture': '401.c Post comb - Cement kiln',
118118
'BioSNG': '84 Gasif. CFB, Bio-SNG',
119119
'BtL': '85 Gasif. Ent. Flow FT, liq fu ',
120120
'biomass-to-methanol': '97 Methanol from biomass gasif.',
121121
'biogas plus hydrogen': '99 SNG from methan. of biogas',
122-
'methanolisation': '98 Methanol from power',
122+
'methanolisation': '98 Methanol from hydrogen',
123123
'Fischer-Tropsch': '102 Hydrogen to Jet',
124124
'central hydrogen CHP': '12 LT-PEMFC CHP',
125125
'Haber-Bosch': '103 Hydrogen to Ammonia',
@@ -269,7 +269,7 @@ def get_data_DEA(tech, data_in, expectation=None):
269269
usecols += f",{uncrtnty_lookup[tech]}"
270270

271271

272-
if (tech in new_format) and (tech!="electrolysis"):
272+
if (tech in new_format) or ("renewable_fuels" in excel_file):
273273
skiprows = [0]
274274
else:
275275
skiprows = [0,1]
@@ -404,30 +404,26 @@ def get_data_DEA(tech, data_in, expectation=None):
404404
df.drop(df.loc[df.index.str.contains("Variable O&M (EUR /t Ammonia)", regex=False)].index, inplace=True)
405405

406406
if tech == "air separation unit":
407-
# Bugfix: DEA renewable fuels 04/2022 has wrong unit (MEUR instead of kEUR)
408-
df.index = df.index.str.replace("Fixed O&M (MEUR /TPD Ammonia)", "Fixed O&M (kEUR /TPD Ammonia)", regex=False)
409-
407+
410408
# Calculate ASU cost separate to HB facility in terms of t N2 output
409+
# To add the cost of an ASU a multiplication factor of 1.06-1.09
410+
# should be applied to the total Specific Investment
411411
df.loc[[
412-
"Specific investment (MEUR /TPD Ammonia output)",
413-
"Fixed O&M (kEUR /TPD Ammonia)",
414-
"Variable O&M (EUR /t Ammonia)"
415-
]] *= (df.loc["Specific investment mark-up factor optional ASU"] - 1.) / excel.loc["N2 Consumption, t/t Ammonia"]
416-
# Convert output to hourly generation
417-
df.loc[[
418-
"Specific investment (MEUR /TPD Ammonia output)",
419-
"Fixed O&M (kEUR /TPD Ammonia)",
420-
]] *= 24
421-
412+
"Specific investment [MEUR /MW Ammonia output]",
413+
"Fixed O&M [kEUR/MW Ammonia/year]",
414+
"Variable O&M [EUR/MWh Ammonia]"
415+
]] *= df.loc["Specific investment mark-up factor optional ASU"]
416+
# / excel.loc["N2 Consumption, [t/t] Ammonia"]
417+
422418
# Rename costs for correct units
423-
df.index = df.index.str.replace("MEUR /TPD Ammonia output", "MEUR/t_N2/h")
424-
df.index = df.index.str.replace("kEUR /TPD Ammonia", "kEUR/t_N2/h/year")
425-
df.index = df.index.str.replace("EUR /t Ammonia", "EUR/t_N2")
419+
# df.index = df.index.str.replace("MEUR /MW Ammonia output", "MEUR/MW_N2/h")
420+
# df.index = df.index.str.replace("kEUR/MW Ammonia/year", "kEUR/MW_N2/h/year")
421+
# df.index = df.index.str.replace("EUR/MWh Ammonia", "EUR/MWh_N2")
426422

427423
df.drop(df.loc[df.index.str.contains("Specific investment mark-up factor optional ASU")].index, inplace=True)
428-
df.drop(df.loc[df.index.str.contains("Specific investment (MEUR /MW Ammonia output)", regex=False)].index, inplace=True)
429-
df.drop(df.loc[df.index.str.contains("Fixed O&M (kEUR/MW Ammonia/year)", regex=False)].index, inplace=True)
430-
df.drop(df.loc[df.index.str.contains("Variable O&M (EUR/MWh Ammonia)", regex=False)].index, inplace=True)
424+
# df.drop(df.loc[df.index.str.contains("Specific investment [MEUR /MW Ammonia output]", regex=False)].index, inplace=True)
425+
# df.drop(df.loc[df.index.str.contains("Fixed O&M [kEUR/MW Ammonia/year]", regex=False)].index, inplace=True)
426+
# df.drop(df.loc[df.index.str.contains("Variable O&M [EUR/MWh Ammonia]", regex=False)].index, inplace=True)
431427

432428
if "solid biomass power" in tech:
433429
df.index = df.index.str.replace("EUR/MWeh", "EUR/MWh")
@@ -913,7 +909,7 @@ def order_data(tech_data):
913909
"""
914910

915911
clean_df = {}
916-
for tech in tech_data.index.levels[0]:
912+
for tech in tech_data.index.get_level_values(0).unique():
917913
clean_df[tech] = pd.DataFrame()
918914
switch = False
919915
df = tech_data.loc[tech]
@@ -1123,6 +1119,7 @@ def add_description(data):
11231119
# add excel sheet names to data frame
11241120
wished_order = list(years) + ["unit", "source", "further description"]
11251121
data = data.reindex(columns=wished_order)
1122+
data.index.set_names(["technology", "parameter"], inplace=True)
11261123
sheets = data.reset_index()["technology"].map(sheet_names).fillna("")
11271124
sheets.index = data.index
11281125
data["further description"] = sheets + ": " + data["further description"]
@@ -1280,6 +1277,7 @@ def add_manual_input(data):
12801277
l.append(s)
12811278

12821279
new_df = pd.DataFrame(l).set_index(['technology','parameter'])
1280+
data.index.set_names(["technology", "parameter"], inplace=True)
12831281
# overwrite DEA data with manual input
12841282
data = new_df.combine_first(data)
12851283

0 commit comments

Comments
 (0)