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

Adds network energy balance plots #1285

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ copy_default_files(workflow)


configfile: "config/config.default.yaml"
configfile: "config/config.plotting.yaml"
configfile: "config/config.yaml"


Expand Down
139 changes: 139 additions & 0 deletions config/config.plotting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# SPDX-FileCopyrightText: : 2017-2024 The PyPSA-Eur Authors
#
# SPDX-License-Identifier: CC0-1.0
plotting_map:
theme:
style: white
context: paper
font: sans-serif
rc:
patch.linewidth: 0.1
savefig.bbox: "tight"
savefig.dpi: 350
ytick.left: true
ytick.major.width: 0.4
ytick.major.size: 2.5
xtick.major.pad: 0

balance_map:
alpha: 1
region_alpha: 0.6
figsize: [5, 6.5]
AC:
unit: TWh$_{el}$
unit_conversion: 1e6
region_cmap: Greens
region_unit: €/MWh$_{el}$
bus_factor: 2e-3
branch_factor: 2e-2
flow_factor: 1e+1
bus_sizes:
- 100
- 200
branch_sizes:
- 100
- 20
gas:
unit: TWh$_{th}$
unit_conversion: 1e6
region_cmap: Purples
region_unit: €/MWh$_{th}$
bus_factor: 1e+1
branch_factor: 5e-2
flow_factor: 6e+1
bus_sizes:
- 50
- 10
branch_sizes:
- 100
- 50
H2:
vmin: 60
vmax: 95
unit: TWh$_{H_2}$
unit_conversion: 1e6
region_cmap: Blues
region_unit: €/MWh$_{H_2}$
bus_factor: 2e-2
branch_factor: 7e-2
flow_factor: 1e+2
bus_sizes:
- 40
- 20
branch_sizes:
- 40
- 20
co2:
unit: Mt
unit_conversion: 1e6
region_cmap: Purples
region_unit: €/t_${CO_2}$
bus_factor: 2e-1
branch_factor: 5e+0
flow_factor: 2+e3
bus_sizes:
- 10
- 5
branch_sizes:
- 10
- 5
heat:
unit: TW$_{th}$
unit_conversion: 1e6
region_cmap: Oranges
region_unit: €/MWh_{th}$
bus_factor: 5e-2
branch_factor: 1e-1
flow_factor: 1e+2
bus_sizes:
- 20
- 10
branch_sizes:
methanol:
unit: TWh$_{MeOH}$
unit_conversion: 1e6
region_cmap: Greens
region_unit: €/MWh$_{MeOH}$
bus_factor: 5e-2
branch_factor: 1e-1
flow_factor: 1e+2
bus_sizes:
- 20
- 10
branch_sizes:
biogas:
unit: TWh$_{th}$
unit_conversion: 1e6
region_cmap: Greens
region_unit: €/MWh
bus_factor: 1e-1
branch_factor: 1e-1
flow_factor: 1e+2
bus_sizes:
- 20
- 10
branch_sizes:
biomass:
unit: TWh$_{th}$
unit_conversion: 1e6
region_cmap: Greens
region_unit: €/MWh
bus_factor: 1e-1
branch_factor: 1e-1
flow_factor: 1e+2
bus_sizes:
- 20
- 10
branch_sizes:
oil:
unit: TWh$_{th}$
unit_conversion: 1e3
region_cmap: Greys
region_unit: €/MWh
bus_factor: 1e-4
branch_factor: 1e-1
flow_factor: 1e+2
bus_sizes:
- 20
- 10
branch_sizes:
26 changes: 26 additions & 0 deletions rules/postprocess.smk
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,32 @@ if config["foresight"] != "perfect":
script:
"../scripts/plot_gas_network.py"

rule plot_balance_map:
params:
plotting=config_provider("plotting_map"),
input:
network=RESULTS
+ "postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
regions=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
output:
map=RESULTS
+ "maps/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}-{carrier}_network_{planning_horizons}.pdf",
threads: 2
resources:
mem_mb=10000,
log:
RESULTS
+ "logs/plot_balance_map/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}-{carrier}_network_{planning_horizons}.log",
benchmark:
(
RESULTS
+ "benchmarks/plot_balance_map/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}-{carrier}_network_{planning_horizons}"
)
conda:
"../envs/environment.yaml"
script:
"../scripts/plot_balance_map.py"


if config["foresight"] == "perfect":

Expand Down
Loading
Loading