Skip to content

Commit 1998919

Browse files
authored
Merge branch 'master' into energy-atlas-demand
2 parents 12cf4f2 + 31e7992 commit 1998919

File tree

74 files changed

+4757
-864
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+4757
-864
lines changed

.github/workflows/codeql.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959

6060
# Initializes the CodeQL tools for scanning.
6161
- name: Initialize CodeQL
62-
uses: github/codeql-action/init@v3
62+
uses: github/codeql-action/init@v4
6363
with:
6464
languages: ${{ matrix.language }}
6565
build-mode: ${{ matrix.build-mode }}
@@ -87,6 +87,6 @@ jobs:
8787
exit 1
8888
8989
- name: Perform CodeQL Analysis
90-
uses: github/codeql-action/analyze@v3
90+
uses: github/codeql-action/analyze@v4
9191
with:
9292
category: "/language:${{matrix.language}}"

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
107107
- name: Upload artifacts
108108
if: always()
109-
uses: actions/upload-artifact@v4
109+
uses: actions/upload-artifact@v5
110110
with:
111111
name: results-${{ matrix.os }}
112112
path: |

.github/workflows/update-pinned-env.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
6161
6262
- name: Upload artifacts
63-
uses: actions/upload-artifact@v4
63+
uses: actions/upload-artifact@v5
6464
with:
6565
name: lockfiles
6666
path: envs/*.lock.yaml
@@ -71,7 +71,7 @@ jobs:
7171
steps:
7272
- uses: actions/checkout@v5
7373
- name: Download all artifacts
74-
uses: actions/download-artifact@v5
74+
uses: actions/download-artifact@v6
7575
with:
7676
name: lockfiles
7777
path: envs/

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,5 @@ dev/*
7979
# ai coding tools
8080
CLAUDE.md
8181
.claude/
82-
.github/copilot-instructions.md
82+
.github/copilot-instructions.md
83+
CLAUDE.local.md

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ci:
88

99
repos:
1010
- repo: https://github.com/pre-commit/pre-commit-hooks
11-
rev: v5.0.0
11+
rev: v6.0.0
1212
hooks:
1313
- id: check-merge-conflict
1414
- id: check-added-large-files
@@ -17,7 +17,7 @@ repos:
1717
# Run ruff to lint and format
1818
- repo: https://github.com/astral-sh/ruff-pre-commit
1919
# Ruff version.
20-
rev: v0.12.2
20+
rev: v0.13.3
2121
hooks:
2222
# Run the linter.
2323
- id: ruff
@@ -47,17 +47,17 @@ repos:
4747
rev: v2.15.0
4848
hooks:
4949
- id: pretty-format-yaml
50-
exclude: (pinned\.yaml|\.lock\.yaml)$
50+
exclude: (\.lock\.yaml)$
5151
args: [--autofix, --indent, "2", --preserve-quotes]
5252

5353
# Format Snakemake rule / workflow files
5454
- repo: https://github.com/snakemake/snakefmt
55-
rev: v0.11.0
55+
rev: v0.11.2
5656
hooks:
5757
- id: snakefmt
5858

5959
# Check for FSFE REUSE compliance (licensing)
6060
- repo: https://github.com/fsfe/reuse-tool
61-
rev: v5.0.2
61+
rev: v6.0.0
6262
hooks:
63-
- id: reuse
63+
- id: reuse-lint-file

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ test:
8181
snakemake -call solve_elec_networks --configfile config/test/config.electricity.yaml
8282
snakemake -call --configfile config/test/config.overnight.yaml
8383
snakemake -call --configfile config/test/config.myopic.yaml
84-
snakemake -call make_summary_perfect --configfile config/test/config.perfect.yaml
8584
snakemake -call resources/test-elec-clusters/networks/base_s_adm.nc --configfile config/test/config.clusters.yaml
8685
snakemake -call --configfile config/test/config.scenarios.yaml -n
8786
snakemake -call plot_power_networks_clustered --configfile config/test/config.tyndp.yaml

Snakefile

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ rule all:
9494
run=config["run"]["name"],
9595
**config["scenario"],
9696
),
97+
# COP profiles plots
98+
expand(
99+
RESULTS + "graphs/cop_profiles_s_{clusters}_{planning_horizons}.html",
100+
run=config["run"]["name"],
101+
**config["scenario"],
102+
),
97103
lambda w: expand(
98104
(
99105
RESULTS
@@ -143,6 +149,74 @@ rule all:
143149
run=config["run"]["name"],
144150
**config["scenario"],
145151
),
152+
# Explicitly list heat source types for temperature maps
153+
lambda w: expand(
154+
(
155+
RESULTS
156+
+ "maps/base_s_{clusters}_{opts}_{sector_opts}_{planning_horizons}-heat_source_temperature_map_river_water.html"
157+
if config_provider("plotting", "enable_heat_source_maps")(w)
158+
and "river_water"
159+
in config_provider("sector", "heat_pump_sources", "urban central")(w)
160+
else []
161+
),
162+
**config["scenario"],
163+
run=config["run"]["name"],
164+
),
165+
lambda w: expand(
166+
(
167+
RESULTS
168+
+ "maps/base_s_{clusters}_{opts}_{sector_opts}_{planning_horizons}-heat_source_temperature_map_sea_water.html"
169+
if config_provider("plotting", "enable_heat_source_maps")(w)
170+
and "sea_water"
171+
in config_provider("sector", "heat_pump_sources", "urban central")(w)
172+
else []
173+
),
174+
**config["scenario"],
175+
run=config["run"]["name"],
176+
),
177+
lambda w: expand(
178+
(
179+
RESULTS
180+
+ "maps/base_s_{clusters}_{opts}_{sector_opts}_{planning_horizons}-heat_source_temperature_map_ambient_air.html"
181+
if config_provider("plotting", "enable_heat_source_maps")(w)
182+
and "air"
183+
in config_provider("sector", "heat_pump_sources", "urban central")(w)
184+
else []
185+
),
186+
**config["scenario"],
187+
run=config["run"]["name"],
188+
),
189+
# Only river_water has energy maps
190+
lambda w: expand(
191+
(
192+
RESULTS
193+
+ "maps/base_s_{clusters}_{opts}_{sector_opts}_{planning_horizons}-heat_source_energy_map_river_water.html"
194+
if config_provider("plotting", "enable_heat_source_maps")(w)
195+
and "river_water"
196+
in config_provider("sector", "heat_pump_sources", "urban central")(w)
197+
else []
198+
),
199+
**config["scenario"],
200+
run=config["run"]["name"],
201+
),
202+
expand(
203+
RESULTS
204+
+ "graphics/balance_timeseries/s_{clusters}_{opts}_{sector_opts}_{planning_horizons}",
205+
run=config["run"]["name"],
206+
**config["scenario"],
207+
),
208+
expand(
209+
RESULTS
210+
+ "graphics/heatmap_timeseries/s_{clusters}_{opts}_{sector_opts}_{planning_horizons}",
211+
run=config["run"]["name"],
212+
**config["scenario"],
213+
),
214+
expand(
215+
RESULTS
216+
+ "graphics/interactive_bus_balance/s_{clusters}_{opts}_{sector_opts}_{planning_horizons}",
217+
run=config["run"]["name"],
218+
**config["scenario"],
219+
),
146220
default_target: True
147221

148222

config/config.default.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,6 @@ sector:
534534
aquifer_volumetric_heat_capacity: 2600
535535
fraction_of_aquifer_area_available: 0.2
536536
effective_screen_length: 20
537-
dh_area_buffer: 1000
538537
capex_as_fraction_of_geothermal_heat_source: 0.75
539538
recovery_factor: 0.6
540539
marginal_cost_charger: 0.035
@@ -550,10 +549,15 @@ sector:
550549
geothermal:
551550
constant_temperature_celsius: 65
552551
ignore_missing_regions: false
552+
river_water:
553+
constant_temperature_celsius: false
553554
direct_utilisation_heat_sources:
554555
- geothermal
555556
temperature_limited_stores:
556557
- ptes
558+
dh_areas:
559+
buffer: 1000
560+
handle_missing_countries: fill
557561
heat_pump_sources:
558562
urban central:
559563
- air
@@ -736,6 +740,7 @@ sector:
736740
biomass_to_methanol: true
737741
biomass_to_methanol_cc: false
738742
ammonia: true
743+
min_part_load_electrolysis: 0
739744
min_part_load_fischer_tropsch: 0.5
740745
min_part_load_methanolisation: 0.3
741746
min_part_load_methanation: 0.3

config/plotting.default.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#plotting
66
plotting:
7+
enable_heat_source_maps: false
78
map:
89
boundaries: [-11, 30, 34, 71]
9-
color_geomap:
10+
geomap_colors:
1011
ocean: white
1112
land: white
1213
projection:
@@ -53,6 +54,8 @@ plotting:
5354
- residential rural heat
5455
- services urban decentral heat
5556
- services rural heat
57+
interactive_bus_balance:
58+
bus_name_pattern: None
5659
heatmap_timeseries:
5760
marginal_price:
5861
- AC
@@ -458,6 +461,10 @@ plotting:
458461
urban central geothermal heat pump: '#4f2144'
459462
geothermal heat pump: '#4f2144'
460463
geothermal heat direct utilisation: '#ba91b1'
464+
river_water heat: '#4bb9f2'
465+
river_water heat pump: '#4bb9f2'
466+
sea_water heat: '#0b222e'
467+
sea_water heat pump: '#0b222e'
461468
ground heat pump: '#2fb537'
462469
residential rural ground heat pump: '#4f2144'
463470
residential rural air heat pump: '#48f74f'

config/test/config.myopic.yaml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,17 @@ sector:
4040
supplemental_heating:
4141
enable: true
4242
booster_heat_pump: true
43-
heat_pump_sources:
44-
urban central:
45-
- air
46-
- geothermal
47-
urban decentral:
48-
- air
49-
rural:
50-
- air
51-
- ground
43+
heat_pump_sources:
44+
urban central:
45+
- air
46+
- geothermal
47+
- river_water
48+
- sea_water
49+
urban decentral:
50+
- air
51+
rural:
52+
- air
53+
- ground
5254
hydrogen_turbine: false
5355
regional_oil_demand: false
5456
regional_co2_sequestration_potential:
@@ -121,3 +123,6 @@ plotting:
121123
energy_max:
122124
energy_min:
123125
energy_threshold: 0.000001
126+
interactive_bus_balance:
127+
bus_name_pattern: "*central heat*"
128+
enable_heat_source_maps: true

0 commit comments

Comments
 (0)