Skip to content

Commit 0e27284

Browse files
committed
Merge remote-tracking branch 'upstream/main' into merge-upstream-june
2 parents 42e4705 + f9d8f52 commit 0e27284

16 files changed

+2222
-46
lines changed

Snakefile

Lines changed: 106 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,102 @@ rule build_egon_data:
399399
"scripts/pypsa-de/build_egon_data.py"
400400

401401

402+
rule prepare_district_heating_subnodes:
403+
params:
404+
district_heating=config_provider("sector", "district_heating"),
405+
baseyear=config_provider("scenario", "planning_horizons", 0),
406+
input:
407+
heating_technologies_nuts3=resources("heating_technologies_nuts3.geojson"),
408+
regions_onshore=resources("regions_onshore_base_s_{clusters}.geojson"),
409+
fernwaermeatlas="data/fernwaermeatlas/fernwaermeatlas.xlsx",
410+
cities="data/fernwaermeatlas/cities_geolocations.geojson",
411+
lau_regions="data/lau_regions.zip",
412+
census=storage(
413+
"https://www.zensus2022.de/static/Zensus_Veroeffentlichung/Zensus2022_Heizungsart.zip",
414+
keep_local=True,
415+
),
416+
osm_land_cover=storage(
417+
"https://heidata.uni-heidelberg.de/api/access/datafile/23053?format=original&gbrecs=true",
418+
keep_local=True,
419+
),
420+
natura=ancient("data/bundle/natura/natura.tiff"),
421+
groundwater_depth=storage(
422+
"http://thredds-gfnl.usc.es/thredds/fileServer/GLOBALWTDFTP/annualmeans/EURASIA_WTD_annualmean.nc",
423+
keep_local=True,
424+
),
425+
output:
426+
district_heating_subnodes=resources(
427+
"district_heating_subnodes_base_s_{clusters}.geojson"
428+
),
429+
regions_onshore_extended=resources(
430+
"regions_onshore_base-extended_s_{clusters}.geojson"
431+
),
432+
regions_onshore_restricted=resources(
433+
"regions_onshore_base-restricted_s_{clusters}.geojson"
434+
),
435+
resources:
436+
mem_mb=20000,
437+
script:
438+
"scripts/pypsa-de/prepare_district_heating_subnodes.py"
439+
440+
441+
def baseyear_value(wildcards):
442+
return config_provider("scenario", "planning_horizons", 0)(wildcards)
443+
444+
445+
rule add_district_heating_subnodes:
446+
params:
447+
district_heating=config_provider("sector", "district_heating"),
448+
baseyear=config_provider("scenario", "planning_horizons", 0),
449+
sector=config_provider("sector"),
450+
heat_pump_sources=config_provider(
451+
"sector", "heat_pump_sources", "urban central"
452+
),
453+
heat_utilisation_potentials=config_provider(
454+
"sector", "district_heating", "heat_utilisation_potentials"
455+
),
456+
direct_utilisation_heat_sources=config_provider(
457+
"sector", "district_heating", "direct_utilisation_heat_sources"
458+
),
459+
adjustments=config_provider("adjustments", "sector"),
460+
input:
461+
unpack(input_heat_source_power),
462+
network=resources(
463+
"networks/base_s_{clusters}_{opts}_{sector_opts}_{planning_horizons}.nc"
464+
),
465+
subnodes=resources("district_heating_subnodes_base_s_{clusters}.geojson"),
466+
nuts3=resources("nuts3_shapes.geojson"),
467+
regions_onshore=resources("regions_onshore_base_s_{clusters}.geojson"),
468+
fernwaermeatlas="data/fernwaermeatlas/fernwaermeatlas.xlsx",
469+
cities="data/fernwaermeatlas/cities_geolocations.geojson",
470+
cop_profiles=resources("cop_profiles_base_s_{clusters}_{planning_horizons}.nc"),
471+
direct_heat_source_utilisation_profiles=resources(
472+
"direct_heat_source_utilisation_profiles_base_s_{clusters}_{planning_horizons}.nc"
473+
),
474+
existing_heating_distribution=lambda w: resources(
475+
f"existing_heating_distribution_base_s_{{clusters}}_{baseyear_value(w)}.csv"
476+
),
477+
lau_regions="data/lau_regions.zip",
478+
output:
479+
network=resources(
480+
"networks/base-extended_s_{clusters}_{opts}_{sector_opts}_{planning_horizons}.nc"
481+
),
482+
district_heating_subnodes=resources(
483+
"district_heating_subnodes_base_s_{clusters}_{opts}_{sector_opts}_{planning_horizons}.geojson"
484+
),
485+
existing_heating_distribution_extended=(
486+
resources(
487+
"existing_heating_distribution_base-extended_s_{clusters}_{opts}_{sector_opts}_{planning_horizons}.csv"
488+
)
489+
if baseyear_value != "{planning_horizons}"
490+
else []
491+
),
492+
resources:
493+
mem_mb=10000,
494+
script:
495+
"scripts/pypsa-de/add_district_heating_subnodes.py"
496+
497+
402498
ruleorder: modify_district_heat_share > build_district_heat_share
403499

404500

@@ -534,6 +630,10 @@ rule retrieve_mastr:
534630

535631

536632
rule build_existing_chp_de:
633+
params:
634+
district_heating_subnodes=config_provider(
635+
"sector", "district_heating", "subnodes"
636+
),
537637
input:
538638
mastr_biomass="data/mastr/bnetza_open_mastr_2023-08-08_B_biomass.csv",
539639
mastr_combustion="data/mastr/bnetza_open_mastr_2023-08-08_B_combustion.csv",
@@ -542,8 +642,13 @@ rule build_existing_chp_de:
542642
keep_local=True,
543643
),
544644
regions=resources("regions_onshore_base_s_{clusters}.geojson"),
645+
district_heating_subnodes=lambda w: (
646+
resources("district_heating_subnodes_base_s_{clusters}.geojson")
647+
if config_provider("sector", "district_heating", "subnodes", "enable")(w)
648+
else []
649+
),
545650
output:
546-
german_chp=resources("german_chp_{clusters}.csv"),
651+
german_chp=resources("german_chp_base_s_{clusters}.csv"),
547652
log:
548653
logs("build_existing_chp_de_{clusters}.log"),
549654
script:

config/config.de.yaml

Lines changed: 18 additions & 1 deletion
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-
prefix: 20250630_merge_upstream
7+
prefix: 20250514_dhsubnodes
88
name:
99
# - ExPol
1010
- KN2045_Mix
@@ -289,6 +289,23 @@ sector:
289289
2040: 0.6
290290
2045: 0.8
291291
2050: 1.0
292+
subnodes:
293+
enable: false
294+
nlargest: 40
295+
census_areas:
296+
enable: true
297+
min_district_heating_share: 0.01
298+
processing:
299+
min_area: [10000, 100000, 0, 1000000]
300+
buffer_factor: [0.01, 0.05, 0.05, 0]
301+
limit_ptes_potential:
302+
enable: true
303+
limit_mother_nodes: true
304+
excluder_resolution: 10
305+
osm_landcover_codes: [21, 23, 32, 33]
306+
max_groundwater_depth: -10
307+
min_area: 10000
308+
default_capacity: 4500
292309
heat_vent:
293310
urban central: true
294311
urban decentral: true

config/config.sysgf.yaml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# SPDX-FileCopyrightText: : 2017-2024 The PyPSA-Eur Authors
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
run:
6+
prefix: 20250514_dhsubnodes
7+
name:
8+
- Baseline
9+
# - No_PTES
10+
# - LowPTESCAPEX
11+
# - HighPTESCAPEX
12+
# - LowStandingLosses
13+
# - HighStandingLosses
14+
# - LowGroundWaterDepth
15+
# - HighGroundWaterDepth
16+
# - LowEtPRatio
17+
# - HighEtPRatio
18+
scenarios:
19+
enable: true
20+
manual_file: config/scenarios.sysgf.yaml
21+
file: config/scenarios.automated.yaml
22+
shared_resources:
23+
policy: base #stops recalculating
24+
exclude:
25+
- existing_heating.csv # specify files which should not be shared between scenarios
26+
- costs
27+
- retrieve_cost # This is necessary to save retrieve_cost_data_{year}.log in the correct folder
28+
- industry_sector_ratios
29+
- build_industry_sector_ratios # This is necessary to save build_industry_sector_ratios_data.log in the correct folder
30+
- modify_existing_heating
31+
32+
foresight: myopic
33+
34+
scenario:
35+
ll:
36+
- vopt
37+
clusters:
38+
- 27 #current options: 27, 49
39+
opts:
40+
- ''
41+
sector_opts:
42+
- none
43+
planning_horizons:
44+
# - 2020
45+
# - 2025
46+
# - 2030
47+
# - 2035
48+
# - 2040
49+
- 2045
50+
51+
clustering:
52+
temporal:
53+
resolution_sector: 365H
54+
55+
adjustments:
56+
electricity: false
57+
sector:
58+
absolute:
59+
StorageUnit:
60+
urban central water pits:
61+
standing_loss: 0.00012121
62+
urban central water tanks:
63+
standing_loss: 0.00015476
64+
65+
wasserstoff_kernnetz:
66+
enable: false
67+
68+
sector:
69+
district_heating:
70+
potential: 0.5
71+
subnodes:
72+
enable: true
73+
limited_heat_sources:
74+
geothermal:
75+
ignore_missing_regions: true
76+
heat_pump_sources:
77+
urban central:
78+
- air
79+
- geothermal
80+
urban decentral:
81+
- air
82+
rural:
83+
- air
84+
- ground
85+
86+
solving:
87+
constraints:
88+
CCL: false
89+
EQ: false
90+
BAU: false
91+
SAFE: false
92+
efuel_export_ban: false
93+
limits_capacity_max: {}
94+
limits_capacity_min: {}
95+
limits_volume_max: {}
96+
limits_volume_min: {}
97+
limits_power_max: {}

config/scenarios.sysgf.yaml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# -*- coding: utf-8 -*-
2+
# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors
3+
#
4+
# SPDX-License-Identifier: MIT
5+
6+
Baseline:
7+
foresight: myopic
8+
iiasa_database:
9+
reference_scenario: KN2045_Mix
10+
co2_budget_DE_source: UBA
11+
12+
No_PTES:
13+
adjustments:
14+
electricity: false
15+
sector:
16+
absolute:
17+
Store:
18+
urban central water pits:
19+
e_nom_max: 0
20+
21+
LowPTESCAPEX:
22+
adjustments:
23+
electricity: false
24+
sector:
25+
factor:
26+
Store:
27+
urban central water pits:
28+
capital_cost: 0.5
29+
absolute:
30+
Store:
31+
urban central water pits:
32+
standing_loss: 0.00012121
33+
urban central water tanks:
34+
standing_loss: 0.00015476
35+
36+
HighPTESCAPEX:
37+
adjustments:
38+
electricity: false
39+
sector:
40+
factor:
41+
Store:
42+
urban central water pits:
43+
capital_cost: 2
44+
absolute:
45+
Store:
46+
urban central water pits:
47+
standing_loss: 0.00012121
48+
urban central water tanks:
49+
standing_loss: 0.00015476
50+
51+
LowStandingLosses:
52+
adjustments:
53+
electricity: false
54+
sector:
55+
absolute:
56+
Store:
57+
urban central water pits:
58+
standing_loss: 0
59+
60+
HighStandingLosses:
61+
adjustments:
62+
electricity: false
63+
sector:
64+
absolute:
65+
Store:
66+
urban central water pits:
67+
standing_loss: 0.0012121
68+
69+
LowGroundWaterDepth:
70+
sector:
71+
district_heating:
72+
subnodes:
73+
limit_ptes_potential:
74+
max_groundwater_depth: -25
75+
76+
HighGroundWaterDepth:
77+
sector:
78+
district_heating:
79+
subnodes:
80+
limit_ptes_potential:
81+
max_groundwater_depth: 0
82+
83+
LowEtPRatio:
84+
adjustments:
85+
electricity: false
86+
sector:
87+
factor:
88+
Link:
89+
urban central water pits charger:
90+
energy to power ratio: 0.5
91+
92+
HighEtPRatio:
93+
adjustments:
94+
electricity: false
95+
sector:
96+
factor:
97+
Link:
98+
urban central water pits charger:
99+
energy to power ratio: 2

0 commit comments

Comments
 (0)