Skip to content

Commit 2d2e0f3

Browse files
committed
existing heating: adjust 2020 stock to ARIADNE database totals
Also adjust space heating reduction and DH shares to better values.
1 parent b1a3b38 commit 2d2e0f3

File tree

4 files changed

+65
-6
lines changed

4 files changed

+65
-6
lines changed

config/config.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#run
66
run:
7-
name: "240112-365H-forceboilersconstraint2"
7+
name: "240112-365H-adaptexistingheat"
88
scenarios:
99
enable: true
1010
shared_resources: true #stops recalculating
@@ -122,7 +122,7 @@ h2_import_max:
122122
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#sector
123123
sector:
124124
district_heating:
125-
potential: 0.6
125+
potential: 0.4
126126
progress:
127127
2020: 0.0
128128
2030: 0.3
@@ -146,7 +146,16 @@ industry:
146146
2040: 0.4
147147
2045: 0.35
148148
2050: 0.3
149-
#TBD what to include in config
149+
150+
# this needs to be taken from ariadne database
151+
reduce_space_heat_exogenously_factor:
152+
2020: 0.0
153+
2025: 0.05
154+
2030: 0.10
155+
2035: 0.16
156+
2040: 0.22
157+
2045: 0.25
158+
2050: 0.35
150159

151160
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#solving
152161
solving:

workflow/Snakefile

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ rule retrieve_ariadne_scenario_data:
5555
params:
5656
iiasa=config["iiasa_database"]
5757
output:
58-
data="resources/ariadne_scenario_data.csv"
58+
data=RESOURCES + "ariadne_scenario_data.csv"
5959
log:
6060
"logs/retrieve_ariadne_scenario_data.log"
6161
resources:
@@ -87,4 +87,23 @@ use rule solve_sector_network_myopic from pypsaeur with:
8787
custom_extra_functionality=workflow.source_path("scripts/additional_functionality.py"),
8888
input:
8989
**rules.solve_sector_network_myopic.input,
90-
co2_totals_name=RESOURCES + "co2_totals.csv",
90+
co2_totals_name=RESOURCES + "co2_totals.csv",
91+
92+
93+
rule modify_existing_heating:
94+
input:
95+
ariadne=RESOURCES + "ariadne_scenario_data.csv",
96+
existing_heating="data/existing_infrastructure/existing_heating_raw.csv",
97+
output:
98+
existing_heating=RESOURCES + "existing_heating.csv",
99+
resources:
100+
mem_mb=1000
101+
script:
102+
"scripts/modify_existing_heating.py"
103+
104+
105+
106+
use rule add_existing_baseyear from pypsaeur with:
107+
input:
108+
**{k: v for k, v in rules.add_existing_baseyear.input.items() if k != "existing_heating"},
109+
existing_heating=RESOURCES + "existing_heating.csv",
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
3+
import pandas as pd
4+
5+
6+
existing_heating = pd.read_csv(snakemake.input.existing_heating,
7+
index_col=0)
8+
9+
ariadne = pd.read_csv(snakemake.input.ariadne,
10+
index_col=0)
11+
12+
print("before",existing_heating.loc["Germany"])
13+
14+
mapping = {"gas boiler" : "Gas Boiler",
15+
"oil boiler" : "Oil Boiler",
16+
"air heat pump" : "Heat Pump|Electrical|Air",
17+
"ground heat pump" : "Heat Pump|Electrical|Ground",
18+
"biomass boiler" : "Biomass Boiler"}
19+
20+
year = "2020"
21+
for tech in mapping:
22+
stock = ariadne.at[f"Stock|Space Heating|{mapping[tech]}",year]
23+
peak = stock*existing_heating.loc["Germany"].sum()/ariadne.at[f"Stock|Space Heating",year]
24+
existing_heating.at["Germany",tech] = peak
25+
26+
27+
28+
print("before",existing_heating.loc["Germany"])
29+
30+
31+
existing_heating.to_csv(snakemake.output.existing_heating)

0 commit comments

Comments
 (0)