Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cost 2020 update #123

Merged
merged 13 commits into from
Feb 28, 2024
214 changes: 107 additions & 107 deletions outputs/costs_2020.csv

Large diffs are not rendered by default.

214 changes: 107 additions & 107 deletions outputs/costs_2025.csv

Large diffs are not rendered by default.

214 changes: 107 additions & 107 deletions outputs/costs_2030.csv

Large diffs are not rendered by default.

214 changes: 107 additions & 107 deletions outputs/costs_2035.csv

Large diffs are not rendered by default.

214 changes: 107 additions & 107 deletions outputs/costs_2040.csv

Large diffs are not rendered by default.

214 changes: 107 additions & 107 deletions outputs/costs_2045.csv

Large diffs are not rendered by default.

214 changes: 107 additions & 107 deletions outputs/costs_2050.csv

Large diffs are not rendered by default.

46 changes: 38 additions & 8 deletions scripts/compile_cost_assumptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,38 @@
# since February 2022 DEA uses a new format for the technology data
# all excel sheets of updated technologies have a different layout and are
# given in EUR_2020 money (instead of EUR_2015)
new_format = ['solar-utility',
cost_year_2020 = ['solar-utility',
'solar-utility single-axis tracking',
'solar-rooftop residential',
'solar-rooftop commercial',
'offwind',
'electrolysis']
'electrolysis',
'biogas',
'biogas CC',
'biogas upgrading',
'direct air capture',
'biomass CHP capture',
'cement capture',
'BioSNG',
'BtL',
'biomass-to-methanol',
'biogas plus hydrogen',
'methanolisation',
'Fischer-Tropsch'
]

cost_year_2019 = ['direct firing gas',
'direct firing gas CC',
'direct firing solid fuels',
'direct firing solid fuels CC',
'industrial heat pump medium temperature',
'industrial heat pump high temperature',
'electric boiler steam',
'gas boiler steam',
'solid biomass boiler steam',
'solid biomass boiler steam CC',
]


# %% -------- FUNCTIONS ---------------------------------------------------

Expand Down Expand Up @@ -273,7 +299,7 @@ def get_data_DEA(tech, data_in, expectation=None):
usecols += f",{uncrtnty_lookup[tech]}"


if (tech in new_format) or ("renewable_fuels" in excel_file):
if ((tech in cost_year_2019) or (tech in cost_year_2020) or ("renewable_fuels" in excel_file)):
skiprows = [0]
else:
skiprows = [0,1]
Expand Down Expand Up @@ -454,7 +480,7 @@ def get_data_DEA(tech, data_in, expectation=None):
df_final = df_final.ffill(axis=1)

df_final["source"] = source_dict["DEA"] + ", " + excel_file.replace("inputs/","")
if tech in new_format and (tech!="electrolysis"):
if tech in cost_year_2020 and (not ("for_carbon_capture_transport_storage" in excel_file)) and (not ("renewable_fuels" in excel_file)):
for attr in ["investment", "Fixed O&M"]:
to_drop = df[df.index.str.contains(attr) &
~df.index.str.contains("\(\*total\)")].index
Expand Down Expand Up @@ -2184,9 +2210,13 @@ def prepare_inflation_rate(fn):
data = add_carbon_capture(data, tech_data)

# adjust for inflation
data["currency_year"] = [2015 if x not in new_format else 2020 for x in
data.index.get_level_values(0)]

for x in data.index.get_level_values("technology"):
if x in cost_year_2020:
data.at[x, "currency_year"] = 2020
elif x in cost_year_2019:
data.at[x, "currency_year"] = 2019
else:
data.at[x, "currency_year"] = 2015

# %% (2) -- get data from other sources which need formatting -----------------
# (a) ---------- get old pypsa costs ---------------------------------------
Expand Down Expand Up @@ -2321,4 +2351,4 @@ def prepare_inflation_rate(fn):
costs_tot.sort_index(inplace=True)
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])
costs_tot.to_csv([v for v in snakemake.output if str(year) in v][0])