Merge branch 'PyPSA:master' into msw_incineration

This commit is contained in:
Markus Millinger 2024-07-04 11:53:00 +02:00 committed by GitHub
commit 521cf0e753
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
118 changed files with 4722 additions and 2288 deletions

View File

@ -19,7 +19,7 @@ on:
- cron: "0 5 * * TUE"
env:
DATA_CACHE_NUMBER: 1
DATA_CACHE_NUMBER: 2
jobs:
build:

16
.gitignore vendored
View File

@ -2,6 +2,8 @@
#
# SPDX-License-Identifier: CC0-1.0
master
.snakemake*
.ipynb_checkpoints
__pycache__
@ -37,18 +39,16 @@ dconf
/data/links_p_nom.csv
/data/*totals.csv
/data/biomass*
/data/bundle-sector/emobility/
/data/bundle-sector/eea*
/data/bundle-sector/jrc*
/data/bundle/emobility/
/data/bundle/eea*
/data/bundle/jrc*
/data/heating/
/data/bundle-sector/eurostat*
/data/bundle/eurostat*
/data/odyssee/
/data/transport_data.csv
/data/bundle-sector/switzerland*
/data/.nfs*
/data/bundle-sector/Industrial_Database.csv
/data/retro/tabula-calculator-calcsetbuilding.csv
/data/bundle-sector/nuts*
/data/retro/*
/data/bundle/nuts*
data/gas_network/scigrid-gas/
data/costs_*.csv

View File

@ -30,7 +30,7 @@ repos:
# Find common spelling mistakes in comments and docstrings
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
args: ['--ignore-regex="(\b[A-Z]+\b)"', '--ignore-words-list=fom,appartment,bage,ore,setis,tabacco,berfore,vor'] # Ignore capital case words, e.g. country codes
@ -74,7 +74,7 @@ repos:
# Format Snakemake rule / workflow files
- repo: https://github.com/snakemake/snakefmt
rev: v0.10.1
rev: v0.10.2
hooks:
- id: snakefmt
@ -87,6 +87,6 @@ repos:
# Check for FSFE REUSE compliance (licensing)
- repo: https://github.com/fsfe/reuse-tool
rev: v3.0.2
rev: v3.1.0a1
hooks:
- id: reuse

View File

@ -30,7 +30,3 @@ License: CC0-1.0
Files: borg-it
Copyright: 2017-2024 The PyPSA-Eur Authors
License: CC0-1.0
Files: graphics/*
Copyright: 2017-2024 The PyPSA-Eur Authors
License: CC-BY-4.0

View File

@ -6,7 +6,7 @@ cff-version: 1.1.0
message: "If you use this package, please cite it in the following way."
title: "PyPSA-Eur: An open sector-coupled optimisation model of the European energy system"
repository: https://github.com/pypsa/pypsa-eur
version: 0.10.0
version: 0.11.0
license: MIT
authors:
- family-names: Brown

View File

@ -80,7 +80,7 @@ all greenhouse gas emitters except waste management and land use.
This diagram gives an overview of the sectors and the links between
them:
![sector diagram](graphics/multisector_figure.png)
![sector diagram](doc/img/multisector_figure.png)
Each of these sectors is built up on the transmission network nodes
from [PyPSA-Eur](https://github.com/PyPSA/pypsa-eur):

View File

@ -24,9 +24,11 @@ run = config["run"]
scenarios = get_scenarios(run)
RDIR = get_rdir(run)
logs = path_provider("logs/", RDIR, run["shared_resources"])
benchmarks = path_provider("benchmarks/", RDIR, run["shared_resources"])
resources = path_provider("resources/", RDIR, run["shared_resources"])
shared_resources = run["shared_resources"]["policy"]
exclude_from_shared = run["shared_resources"]["exclude"]
logs = path_provider("logs/", RDIR, shared_resources, exclude_from_shared)
benchmarks = path_provider("benchmarks/", RDIR, shared_resources, exclude_from_shared)
resources = path_provider("resources/", RDIR, shared_resources, exclude_from_shared)
CDIR = "" if run["shared_cutouts"] else RDIR
RESULTS = "results/" + RDIR
@ -71,7 +73,7 @@ if config["foresight"] == "perfect":
rule all:
input:
expand(RESULTS + "graphs/costs.pdf", run=config["run"]["name"]),
expand(RESULTS + "graphs/costs.svg", run=config["run"]["name"]),
default_target: True

View File

@ -3,7 +3,7 @@
# SPDX-License-Identifier: CC0-1.0
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#top-level-configuration
version: 0.10.0
version: 0.11.0
tutorial: false
logging:
@ -26,7 +26,9 @@ run:
enable: false
file: config/scenarios.yaml
disable_progressbar: false
shared_resources: false
shared_resources:
policy: false
exclude: []
shared_cutouts: true
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#foresight
@ -38,17 +40,15 @@ scenario:
simpl:
- ''
ll:
- v1.5
- vopt
clusters:
- 37
- 128
- 256
- 512
- 1024
opts:
- ''
sector_opts:
- Co2L0-3H-T-H-B-I-A-dist1
- ''
planning_horizons:
# - 2020
# - 2030
@ -69,12 +69,9 @@ enable:
retrieve: auto
prepare_links_p_nom: false
retrieve_databundle: true
retrieve_sector_databundle: true
retrieve_cost_data: true
build_cutout: false
retrieve_cutout: true
build_natura_raster: false
retrieve_natura_raster: true
custom_busmap: false
drop_leap_day: true
@ -97,7 +94,6 @@ electricity:
co2limit_enable: false
co2limit: 7.75e+7
co2base: 1.487e+9
agg_p_nom_limits: data/agg_p_nom_minmax.csv
operational_reserve:
activate: false
@ -110,17 +106,17 @@ electricity:
H2: 168
extendable_carriers:
Generator: [solar, onwind, offwind-ac, offwind-dc, OCGT]
Generator: [solar, solar-hsat, onwind, offwind-ac, offwind-dc, offwind-float, OCGT, CCGT]
StorageUnit: [] # battery, H2
Store: [battery, H2]
Link: [] # H2 pipeline
powerplants_filter: (DateOut >= 2023 or DateOut != DateOut) and not (Country == 'Germany' and Fueltype == 'Nuclear')
custom_powerplants: false
everywhere_powerplants: [nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass]
everywhere_powerplants: []
conventional_carriers: [nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass]
renewable_carriers: [solar, onwind, offwind-ac, offwind-dc, hydro]
renewable_carriers: [solar, solar-hsat, onwind, offwind-ac, offwind-dc, offwind-float, hydro]
estimate_renewable_capacities:
enable: true
@ -128,7 +124,7 @@ electricity:
year: 2020
expansion_limit: false
technology_mapping:
Offshore: [offwind-ac, offwind-dc]
Offshore: [offwind-ac, offwind-dc, offwind-float]
Onshore: [onwind]
PV: [solar]
@ -196,7 +192,7 @@ renewable:
luisa: false # [0, 5230]
natura: true
ship_threshold: 400
max_depth: 50
max_depth: 60
max_shore_distance: 30000
excluder_resolution: 200
clip_p_max_pu: 1.e-2
@ -212,10 +208,28 @@ renewable:
luisa: false # [0, 5230]
natura: true
ship_threshold: 400
max_depth: 50
max_depth: 60
min_shore_distance: 30000
excluder_resolution: 200
clip_p_max_pu: 1.e-2
offwind-float:
cutout: europe-2013-era5
resource:
method: wind
turbine: NREL_ReferenceTurbine_5MW_offshore
# ScholzPhd Tab 4.3.1: 10MW/km^2
capacity_per_sqkm: 2
correction_factor: 0.8855
# proxy for wake losses
# from 10.1016/j.energy.2018.08.153
# until done more rigorously in #153
corine: [44, 255]
natura: true
ship_threshold: 400
excluder_resolution: 200
min_depth: 60
max_depth: 1000
clip_p_max_pu: 1.e-2
solar:
cutout: europe-2013-sarah
resource:
@ -231,6 +245,21 @@ renewable:
natura: true
excluder_resolution: 100
clip_p_max_pu: 1.e-2
solar-hsat:
cutout: europe-2013-sarah
resource:
method: pv
panel: CSi
orientation:
slope: 35.
azimuth: 180.
tracking: horizontal
capacity_per_sqkm: 4.43 # 15% higher land usage acc. to NREL
corine: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 26, 31, 32]
luisa: false # [1111, 1121, 1122, 1123, 1130, 1210, 1221, 1222, 1230, 1241, 1242, 1310, 1320, 1330, 1410, 1421, 1422, 2110, 2120, 2130, 2210, 2220, 2230, 2310, 2410, 2420, 3210, 3320, 3330]
natura: true
excluder_resolution: 100
clip_p_max_pu: 1.e-2
hydro:
cutout: europe-2013-era5
carriers: [ror, PHS, hydro]
@ -263,7 +292,7 @@ lines:
max_extension: 20000 #MW
length_factor: 1.25
reconnect_crimea: true
under_construction: 'zero' # 'zero': set capacity to zero, 'remove': remove, 'keep': with full capacity
under_construction: 'keep' # 'zero': set capacity to zero, 'remove': remove, 'keep': with full capacity
dynamic_line_rating:
activate: false
cutout: europe-2013-era5
@ -309,6 +338,8 @@ pypsa_eur:
- onwind
- offwind-ac
- offwind-dc
- offwind-float
- solar-hsat
- solar
- ror
- nuclear
@ -359,8 +390,8 @@ solar_thermal:
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#existing-capacities
existing_capacities:
grouping_years_power: [1895, 1920, 1950, 1955, 1960, 1965, 1970, 1975, 1980, 1985, 1990, 1995, 2000, 2005, 2010, 2015, 2020, 2025, 2030]
grouping_years_heat: [1980, 1985, 1990, 1995, 2000, 2005, 2010, 2015, 2020] # heat grouping years >= baseyear will be ignored
grouping_years_power: [1920, 1950, 1955, 1960, 1965, 1970, 1975, 1980, 1985, 1990, 1995, 2000, 2005, 2010, 2015, 2020, 2025]
grouping_years_heat: [1980, 1985, 1990, 1995, 2000, 2005, 2010, 2015, 2019] # heat grouping years >= baseyear will be ignored
threshold_capacity: 10
default_heating_lifetime: 20
conventional_carriers:
@ -401,7 +432,6 @@ sector:
bev_availability: 0.5
bev_energy: 0.05
bev_charge_efficiency: 0.9
bev_plug_to_wheel_efficiency: 0.2
bev_charge_rate: 0.011
bev_avail_max: 0.95
bev_avail_mean: 0.8
@ -430,8 +460,9 @@ sector:
2040: 0.3
2045: 0.15
2050: 0
transport_fuel_cell_efficiency: 0.5
transport_internal_combustion_efficiency: 0.3
transport_electric_efficiency: 53.19 # 1 MWh_el = 53.19*100 km
transport_fuel_cell_efficiency: 30.003 # 1 MWh_H2 = 30.003*100 km
transport_ice_efficiency: 16.0712 # 1 MWh_oil = 16.0712 * 100 km
agriculture_machinery_electric_share: 0
agriculture_machinery_oil_share: 1
agriculture_machinery_fuel_efficiency: 0.7
@ -537,7 +568,7 @@ sector:
- nearshore # within 50 km of sea
# - offshore
ammonia: false
min_part_load_fischer_tropsch: 0.7
min_part_load_fischer_tropsch: 0.5
min_part_load_methanolisation: 0.3
min_part_load_methanation: 0.3
use_fischer_tropsch_waste_heat: true
@ -560,6 +591,8 @@ sector:
gas pipeline:
efficiency_per_1000km: 1 #0.977
compression_per_1000km: 0.01
electricity distribution grid:
efficiency_static: 0.97
H2_network: true
gas_network: false
H2_retrofit: false
@ -588,6 +621,13 @@ sector:
solar: 3
offwind-ac: 3
offwind-dc: 3
enhanced_geothermal:
enable: false
flexible: true
max_hours: 240
max_boost: 0.25
var_cf: true
sustainability_factor: 0.0025
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#industry
industry:
@ -653,6 +693,9 @@ industry:
2040: 0.12
2045: 0.16
2050: 0.20
HVC_environment_sequestration_fraction: 0.
waste_to_energy: false
waste_to_energy_cc: false
sector_ratios_fraction_future:
2020: 0.0
2025: 0.1
@ -671,6 +714,7 @@ industry:
methanol_production_today: 1.5
MWh_elec_per_tMeOH: 0.167
MWh_CH4_per_tMeOH: 10.25
MWh_MeOH_per_tMeOH: 5.528
hotmaps_locate_missing: false
reference_year: 2015
@ -678,8 +722,7 @@ industry:
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#costs
costs:
year: 2030
version: v0.8.1
rooftop_share: 0.14 # based on the potentials, assuming (0.1 kW/m2 and 10 m2/person)
version: v0.9.0
social_discountrate: 0.02
fill_values:
FOM: 0
@ -751,11 +794,28 @@ solving:
# io_api: "direct" # Increases performance but only supported for the highs and gurobi solvers
# options that go into the optimize function
track_iterations: false
min_iterations: 4
max_iterations: 6
min_iterations: 2
max_iterations: 3
transmission_losses: 2
linearized_unit_commitment: true
horizon: 365
post_discretization:
enable: false
line_unit_size: 1700
line_threshold: 0.3
link_unit_size:
DC: 2000
H2 pipeline: 1200
gas pipeline: 1500
link_threshold:
DC: 0.3
H2 pipeline: 0.3
gas pipeline: 0.3
agg_p_nom_limits:
agg_offwind: false
include_existing: false
file: data/agg_p_nom_minmax.csv
constraints:
CCL: false
@ -854,6 +914,7 @@ plotting:
CCGT: "Combined-Cycle Gas"
offwind-ac: "Offshore Wind (AC)"
offwind-dc: "Offshore Wind (DC)"
offwind-float: "Offshore Wind (Floating)"
onwind: "Onshore Wind"
solar: "Solar"
PHS: "Pumped Hydro Storage"
@ -878,6 +939,9 @@ plotting:
offwind-dc: "#74c6f2"
offshore wind (DC): "#74c6f2"
offshore wind dc: "#74c6f2"
offwind-float: "#b5e2fa"
offshore wind (Float): "#b5e2fa"
offshore wind float: "#b5e2fa"
# water
hydro: '#298c81'
hydro reservoir: '#298c81'
@ -889,6 +953,7 @@ plotting:
# solar
solar: "#f9d002"
solar PV: "#f9d002"
solar-hsat: "#fdb915"
solar thermal: '#ffbf2b'
residential rural solar thermal: '#f1c069'
services rural solar thermal: '#eabf61'
@ -990,6 +1055,7 @@ plotting:
BEV charger: '#baf238'
V2G: '#e5ffa8'
land transport EV: '#baf238'
land transport demand: '#38baf2'
Li ion: '#baf238'
# hot water storage
water tanks: '#e69487'
@ -1094,6 +1160,7 @@ plotting:
methanolisation: '#83d6d5'
methanol: '#468c8b'
shipping methanol: '#468c8b'
industry methanol: '#468c8b'
# co2
CC: '#f29dae'
CCS: '#f29dae'
@ -1124,6 +1191,9 @@ plotting:
waste: '#e3d37d'
other: '#000000'
geothermal: '#ba91b1'
geothermal heat: '#ba91b1'
geothermal district heat: '#d19D00'
geothermal organic rankine cycle: '#ffbf00'
AC: "#70af1d"
AC-AC: "#70af1d"
AC line: "#70af1d"
@ -1133,3 +1203,6 @@ plotting:
DC-DC: "#8a1caf"
DC link: "#8a1caf"
load: "#dd2e23"
waste CHP: '#e3d37d'
waste CHP CC: '#e3d3ff'
HVC to air: 'k'

View File

@ -5,7 +5,8 @@
run:
name: "entsoe-all"
disable_progressbar: true
shared_resources: false
shared_resources:
policy: false
shared_cutouts: true
scenario:
@ -38,6 +39,5 @@ lines:
enable:
retrieve: true
retrieve_databundle: true
retrieve_sector_databundle: false
retrieve_cost_data: true
retrieve_cutout: true

View File

@ -8,14 +8,15 @@ tutorial: true
run:
name: "test-elec" # use this to keep track of runs with different settings
disable_progressbar: true
shared_resources: "test"
shared_resources:
policy: "test"
shared_cutouts: true
scenario:
clusters:
- 5
opts:
- Co2L-24h
- ''
countries: ['BE']
@ -24,6 +25,7 @@ snapshots:
end: "2013-03-08"
electricity:
co2limit_enable: true
co2limit: 100.e+6
extendable_carriers:
@ -32,7 +34,7 @@ electricity:
Store: [H2]
Link: [H2 pipeline]
renewable_carriers: [solar, onwind, offwind-ac, offwind-dc]
renewable_carriers: [solar, solar-hsat, onwind, offwind-ac, offwind-dc, offwind-float]
atlite:
@ -53,12 +55,20 @@ renewable:
offwind-dc:
cutout: be-03-2013-era5
max_depth: false
offwind-float:
cutout: be-03-2013-era5
max_depth: false
min_depth: false
solar:
cutout: be-03-2013-era5
solar-hsat:
cutout: be-03-2013-era5
clustering:
exclude_carriers: ["OCGT", "offwind-ac", "coal"]
temporal:
resolution_elec: 24h
lines:
dynamic_line_rating:

View File

@ -7,7 +7,8 @@ tutorial: true
run:
name: "test-sector-myopic"
disable_progressbar: true
shared_resources: "test"
shared_resources:
policy: "test"
shared_cutouts: true
foresight: myopic
@ -18,7 +19,7 @@ scenario:
clusters:
- 5
sector_opts:
- 24h-T-H-B-I-A-dist1
- ''
planning_horizons:
- 2030
- 2040
@ -34,7 +35,6 @@ sector:
central_heat_vent: true
electricity:
co2limit: 100.e+6
extendable_carriers:
Generator: [OCGT]
@ -42,7 +42,10 @@ electricity:
Store: [H2]
Link: [H2 pipeline]
renewable_carriers: [solar, onwind, offwind-ac, offwind-dc]
renewable_carriers: [solar, solar-hsat, onwind, offwind-ac, offwind-dc, offwind-float]
estimate_renewable_capacities:
enable: false
atlite:
default_cutout: be-03-2013-era5
@ -62,8 +65,18 @@ renewable:
offwind-dc:
cutout: be-03-2013-era5
max_depth: false
offwind-float:
cutout: be-03-2013-era5
max_depth: false
min_depth: false
solar:
cutout: be-03-2013-era5
solar-hsat:
cutout: be-03-2013-era5
clustering:
temporal:
resolution_sector: 24h
industry:
St_primary_fraction:

View File

@ -7,7 +7,8 @@ tutorial: true
run:
name: "test-sector-overnight"
disable_progressbar: true
shared_resources: "test"
shared_resources:
policy: "test"
shared_cutouts: true
@ -17,7 +18,7 @@ scenario:
clusters:
- 5
sector_opts:
- CO2L0-24h-T-H-B-I-A-dist1
- ''
planning_horizons:
- 2030
@ -28,7 +29,6 @@ snapshots:
end: "2013-03-08"
electricity:
co2limit: 100.e+6
extendable_carriers:
Generator: [OCGT]
@ -36,7 +36,7 @@ electricity:
Store: [H2]
Link: [H2 pipeline]
renewable_carriers: [solar, onwind, offwind-ac, offwind-dc]
renewable_carriers: [solar, solar-hsat, onwind, offwind-ac, offwind-dc, offwind-float]
atlite:
default_cutout: be-03-2013-era5
@ -56,13 +56,28 @@ renewable:
offwind-dc:
cutout: be-03-2013-era5
max_depth: false
offwind-float:
cutout: be-03-2013-era5
max_depth: false
min_depth: false
solar:
cutout: be-03-2013-era5
solar-hsat:
cutout: be-03-2013-era5
clustering:
temporal:
resolution_sector: 24h
sector:
gas_network: true
H2_retrofit: true
industry:
HVC_environment_sequestration_fraction: 0.5
waste_to_energy: true
waste_to_energy_cc: true
solving:
solver:
name: glpk

View File

@ -7,7 +7,8 @@ tutorial: true
run:
name: "test-sector-perfect"
disable_progressbar: true
shared_resources: "test"
shared_resources:
policy: "test"
shared_cutouts: true
foresight: perfect
@ -18,7 +19,7 @@ scenario:
clusters:
- 5
sector_opts:
- 8760h-T-H-B-I-A-dist1
- ''
planning_horizons:
- 2030
- 2040
@ -31,7 +32,6 @@ snapshots:
end: "2013-03-08"
electricity:
co2limit: 100.e+6
extendable_carriers:
Generator: [OCGT]
@ -39,7 +39,7 @@ electricity:
Store: [H2]
Link: [H2 pipeline]
renewable_carriers: [solar, onwind, offwind-ac, offwind-dc]
renewable_carriers: [solar, solar-hsat, onwind, offwind-ac, offwind-dc, offwind-float]
sector:
min_part_load_fischer_tropsch: 0
@ -63,8 +63,18 @@ renewable:
offwind-dc:
cutout: be-03-2013-era5
max_depth: false
offwind-float:
cutout: be-03-2013-era5
max_depth: false
min_depth: false
solar:
cutout: be-03-2013-era5
solar-hsat:
cutout: be-03-2013-era5
clustering:
temporal:
resolution_sector: 8760h
industry:
St_primary_fraction:

View File

@ -12,14 +12,15 @@ run:
enable: true
file: "config/test/scenarios.yaml"
disable_progressbar: true
shared_resources: base
shared_resources:
policy: base
shared_cutouts: true
scenario:
clusters:
- 5
opts:
- Co2L-24H
- ''
countries: ['BE']

View File

@ -1,31 +1,33 @@
country,carrier,min,max
DE,onwind,0.1,
DE,offwind-ac,0.1,
DE,offwind-dc,0.1,
DE,solar,0.2,
LU,onwind,,
LU,solar,,
NL,onwind,,
NL,offwind-ac,,
NL,offwind-dc,,
NL,solar,,
GB,onwind,,
GB,offwind-ac,,
GB,offwind-dc,,
GB,solar,,
IE,onwind,,
IE,offwind-ac,,
IE,offwind-dc,,
IE,solar,,
FR,onwind,,
FR,offwind-ac,,
FR,offwind-dc,,
FR,solar,,
DK,onwind,,
DK,offwind-ac,,
DK,offwind-dc,,
DK,solar,,
BE,onwind,,
BE,offwind-ac,,
BE,offwind-dc,,
BE,solar,,
,,2030,2030,2040,2040,2050,2050
,,min,max,min,max,min,max
country,carrier,,,,,,
DE,onwind,0.1,,0.1,,0.1,
DE,offwind-ac,0.1,,0.1,,0.1,
DE,offwind-dc,0.1,,0.1,,0.1,
DE,solar,0.2,,0.2,,0.2,
LU,onwind,,,,,,
LU,solar,,,,,,
NL,onwind,,,,,,
NL,offwind-ac,,,,,,
NL,offwind-dc,,,,,,
NL,solar,,,,,,
GB,onwind,,,,,,
GB,offwind-ac,,,,,,
GB,offwind-dc,,,,,,
GB,solar,,,,,,
IE,onwind,,,,,,
IE,offwind-ac,,,,,,
IE,offwind-dc,,,,,,
IE,solar,,,,,,
FR,onwind,,,,,,
FR,offwind-ac,,,,,,
FR,offwind-dc,,,,,,
FR,solar,,,,,,
DK,onwind,,,,,,
DK,offwind-ac,,,,,,
DK,offwind-dc,,,,,,
DK,solar,,,,,,
BE,onwind,,,,,,
BE,offwind-ac,,,,,,
BE,offwind-dc,,,,,,
BE,solar,,,,,,

1 country carrier min 2030 max 2030 2040 2040 2050 2050
2 DE onwind 0.1 min max min max min max
3 DE country offwind-ac carrier 0.1
4 DE DE offwind-dc onwind 0.1 0.1 0.1 0.1
5 DE DE solar offwind-ac 0.2 0.1 0.1 0.1
6 LU DE onwind offwind-dc 0.1 0.1 0.1
7 LU DE solar solar 0.2 0.2 0.2
8 NL LU onwind onwind
9 NL LU offwind-ac solar
10 NL NL offwind-dc onwind
11 NL NL solar offwind-ac
12 GB NL onwind offwind-dc
13 GB NL offwind-ac solar
14 GB GB offwind-dc onwind
15 GB GB solar offwind-ac
16 IE GB onwind offwind-dc
17 IE GB offwind-ac solar
18 IE IE offwind-dc onwind
19 IE IE solar offwind-ac
20 FR IE onwind offwind-dc
21 FR IE offwind-ac solar
22 FR FR offwind-dc onwind
23 FR FR solar offwind-ac
24 DK FR onwind offwind-dc
25 DK FR offwind-ac solar
26 DK DK offwind-dc onwind
27 DK DK solar offwind-ac
28 BE DK onwind offwind-dc
29 BE DK offwind-ac solar
30 BE BE offwind-dc onwind
31 BE BE solar offwind-ac
32 BE offwind-dc
33 BE solar

27
data/ch_cantons.csv Normal file
View File

@ -0,0 +1,27 @@
Canton,HASC,NUTS
Aargau,CH.AG,CH033
Appenzell Inner Rhodes,CH.AI,CH054
Appenzell Outer Rhodes,CH.AR,CH053
Basel-Landschaft,CH.BL,CH032
Basel-Stadt,CH.BS,CH031
Bern,CH.BE,CH021
Fribourg,CH.FR,CH022
Geneva,CH.GE,CH013
Glarus,CH.GL,CH051
Graubünden,CH.GR,CH056
Jura,CH.JU,CH025
Lucerne,CH.LU,CH061
Neuchâtel,CH.NE,CH024
Nidwalden,CH.NW,CH065
Obwalden,CH.OW,CH064
Sankt Gallen,CH.SG,CH055
Schaffhausen,CH.SH,CH052
Schwyz,CH.SZ,CH063
Solothurn,CH.SO,CH023
Thurgau,CH.TG,CH057
Ticino,CH.TI,CH07
Uri,CH.UR,CH062
Valais,CH.VS,CH012
Vaud,CH.VD,CH011
Zug,CH.ZG,CH066
Zurich,CH.ZH,CH04
1 Canton HASC NUTS
2 Aargau CH.AG CH033
3 Appenzell Inner Rhodes CH.AI CH054
4 Appenzell Outer Rhodes CH.AR CH053
5 Basel-Landschaft CH.BL CH032
6 Basel-Stadt CH.BS CH031
7 Bern CH.BE CH021
8 Fribourg CH.FR CH022
9 Geneva CH.GE CH013
10 Glarus CH.GL CH051
11 Graubünden CH.GR CH056
12 Jura CH.JU CH025
13 Lucerne CH.LU CH061
14 Neuchâtel CH.NE CH024
15 Nidwalden CH.NW CH065
16 Obwalden CH.OW CH064
17 Sankt Gallen CH.SG CH055
18 Schaffhausen CH.SH CH052
19 Schwyz CH.SZ CH063
20 Solothurn CH.SO CH023
21 Thurgau CH.TG CH057
22 Ticino CH.TI CH07
23 Uri CH.UR CH062
24 Valais CH.VS CH012
25 Vaud CH.VD CH011
26 Zug CH.ZG CH066
27 Zurich CH.ZH CH04

1
data/egs_costs.json Normal file

File diff suppressed because one or more lines are too long

31
data/hydro_capacities.csv Normal file
View File

@ -0,0 +1,31 @@
Country,p_nom_discharge[GW],p_nom_store[GW],E_store[TWh],InflowHourlyAvg[GWh]
AT,13.08,3.8,3.2,4.02
BE,1.42,1.31,0,0.04
BA,2.05,0.62,2.5,0.71
BG,3.13,0.86,4,0.53
HR,2,0.61,2.8,0.57
CZ,2.21,0.68,1.5,0.24
DK,0.01,0,0,0
EE,0.01,0,0,0
FI,3.2,0,5.5,1.59
FR,25.37,6.99,9.8,7.82
DE,11.26,6.8,0.3,1.93
GB,4.43,2.74,0,0.46
GR,3.24,0.7,2.3,0.26
HU,0.06,0,0.1,0.02
IE,0.53,0.29,0,0.08
IT,21.88,7.55,7.9,5.19
LV,1.58,0,1.8,0.3
LT,0.88,0.76,0.2,0.05
LU,1.13,1.29,0,0
NL,0.04,0,0,0.01
NO,30.51,1.35,84.4,14
PL,2.35,1.4,1.6,0.23
PT,5.72,1.03,2.6,1.37
RO,6.55,0.09,12.1,1.95
RS,2.14,0.61,0,1.18
SK,2.52,0.92,2.2,0.49
SI,1.25,0.18,2.2,0.36
ES,18.55,2.75,18.4,2.61
SE,16.41,0.1,33.8,7.8
CH,13.3,4.03,8.4,4.29
1 Country p_nom_discharge[GW] p_nom_store[GW] E_store[TWh] InflowHourlyAvg[GWh]
2 AT 13.08 3.8 3.2 4.02
3 BE 1.42 1.31 0 0.04
4 BA 2.05 0.62 2.5 0.71
5 BG 3.13 0.86 4 0.53
6 HR 2 0.61 2.8 0.57
7 CZ 2.21 0.68 1.5 0.24
8 DK 0.01 0 0 0
9 EE 0.01 0 0 0
10 FI 3.2 0 5.5 1.59
11 FR 25.37 6.99 9.8 7.82
12 DE 11.26 6.8 0.3 1.93
13 GB 4.43 2.74 0 0.46
14 GR 3.24 0.7 2.3 0.26
15 HU 0.06 0 0.1 0.02
16 IE 0.53 0.29 0 0.08
17 IT 21.88 7.55 7.9 5.19
18 LV 1.58 0 1.8 0.3
19 LT 0.88 0.76 0.2 0.05
20 LU 1.13 1.29 0 0
21 NL 0.04 0 0 0.01
22 NO 30.51 1.35 84.4 14
23 PL 2.35 1.4 1.6 0.23
24 PT 5.72 1.03 2.6 1.37
25 RO 6.55 0.09 12.1 1.95
26 RS 2.14 0.61 0 1.18
27 SK 2.52 0.92 2.2 0.49
28 SI 1.25 0.18 2.2 0.36
29 ES 18.55 2.75 18.4 2.61
30 SE 16.41 0.1 33.8 7.8
31 CH 13.3 4.03 8.4 4.29

View File

@ -93,9 +93,9 @@ author = "Tom Brown (KIT, TUB, FIAS), Jonas Hoersch (KIT, FIAS), Fabian Hofmann
# built documents.
#
# The short X.Y version.
version = "0.10"
version = "0.11"
# The full version, including alpha/beta/rc tags.
release = "0.10.0"
release = "0.11.0"
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -1,2 +1,2 @@
,Unit,Values,Description
co2_budget,--,Dictionary with planning horizons as keys.,CO2 budget as a fraction of 1990 emissions. Overwritten if ``CO2Lx`` or ``cb`` are set in ``{sector_opts}`` wildcard"doc/configtables/othertoplevel.csv
co2_budget,--,Dictionary with planning horizons as keys.,CO2 budget as a fraction of 1990 emissions. Overwritten if ``Co2Lx`` or ``cb`` are set in ``{sector_opts}`` wildcard"doc/configtables/othertoplevel.csv

Can't render this file because it contains an unexpected character in line 2 and column 174.

View File

@ -1,7 +1,6 @@
,Unit,Values,Description
year,--,YYYY; e.g. '2030',Year for which to retrieve cost assumptions of ``resources/costs.csv``.
version,--,vX.X.X or <user>/<repo>/vX.X.X; e.g. 'v0.5.0',Version of ``technology-data`` repository to use. If this string is of the form <user>/<repo>/<version> then costs are instead retrieved from ``github.com/<user>/<repo>`` at the <version> tag.
rooftop_share,--,float,Share of rooftop PV when calculating capital cost of solar (joint rooftop and utility-scale PV).
social_discountrate,p.u.,float,Social discount rate to compare costs in different investment periods. 0.02 corresponds to a social discount rate of 2%.
fill_values,--,float,Default values if not specified for a technology in ``resources/costs.csv``.
capital_cost,EUR/MW,Keys should be in the 'technology' column of ``resources/costs.csv``. Values can be any float.,"For the given technologies, assumptions about their capital investment costs are set to the corresponding value. Optional; overwrites cost assumptions from ``resources/costs.csv``."

1 Unit Values Description
2 year -- YYYY; e.g. '2030' Year for which to retrieve cost assumptions of ``resources/costs.csv``.
3 version -- vX.X.X or <user>/<repo>/vX.X.X; e.g. 'v0.5.0' Version of ``technology-data`` repository to use. If this string is of the form <user>/<repo>/<version> then costs are instead retrieved from ``github.com/<user>/<repo>`` at the <version> tag.
rooftop_share -- float Share of rooftop PV when calculating capital cost of solar (joint rooftop and utility-scale PV).
4 social_discountrate p.u. float Social discount rate to compare costs in different investment periods. 0.02 corresponds to a social discount rate of 2%.
5 fill_values -- float Default values if not specified for a technology in ``resources/costs.csv``.
6 capital_cost EUR/MW Keys should be in the 'technology' column of ``resources/costs.csv``. Values can be any float. For the given technologies, assumptions about their capital investment costs are set to the corresponding value. Optional; overwrites cost assumptions from ``resources/costs.csv``.

View File

@ -2,10 +2,9 @@
voltages,kV,"Any subset of {220., 300., 380.}",Voltage levels to consider
gaslimit_enable,bool,true or false,Add an overall absolute gas limit configured in ``electricity: gaslimit``.
gaslimit,MWhth,float or false,Global gas usage limit
co2limit_enable,bool,true or false,Add an overall absolute carbon-dioxide emissions limit configured in ``electricity: co2limit``.
co2limit_enable,bool,true or false,Add an overall absolute carbon-dioxide emissions limit configured in ``electricity: co2limit`` in :mod:`prepare_network`. **Warning:** This option should currently only be used with electricity-only networks, not for sector-coupled networks..
co2limit,:math:`t_{CO_2-eq}/a`,float,Cap on total annual system carbon dioxide emissions
co2base,:math:`t_{CO_2-eq}/a`,float,Reference value of total annual system carbon dioxide emissions if relative emission reduction target is specified in ``{opts}`` wildcard.
agg_p_nom_limits,file,path,Reference to ``.csv`` file specifying per carrier generator nominal capacity constraints for individual countries if ``'CCL'`` is in ``{opts}`` wildcard. Defaults to ``data/agg_p_nom_minmax.csv``.
operational_reserve,,,Settings for reserve requirements following `GenX <https://genxproject.github.io/GenX/dev/core/#Reserves>`_
,,,
-- activate,bool,true or false,Whether to take operational reserve requirements into account during optimisation
@ -28,14 +27,14 @@ everywhere_powerplants,--,"Any subset of {nuclear, oil, OCGT, CCGT, coal, lignit
,,,
conventional_carriers,--,"Any subset of {nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass}","List of conventional power plants to include in the model from ``resources/powerplants.csv``. If an included carrier is also listed in ``extendable_carriers``, the capacity is taken as a lower bound."
,,,
renewable_carriers,--,"Any subset of {solar, onwind, offwind-ac, offwind-dc, hydro}",List of renewable generators to include in the model.
renewable_carriers,--,"Any subset of {solar, onwind, offwind-ac, offwind-dc, offwind-float, hydro}",List of renewable generators to include in the model.
estimate_renewable_capacities,,,
-- enable,,bool,Activate routine to estimate renewable capacities
-- enable,,bool,Activate routine to estimate renewable capacities in rule :mod:`add_electricity`. This option should not be used in combination with pathway planning ``foresight: myopic`` or ``foresight: perfect`` as renewable capacities are added differently in :mod:`add_existing_baseyear`.
-- from_opsd,--,bool,Add renewable capacities from `OPSD database <https://data.open-power-system-data.org/renewable_power_plants/2020-08-25>`_. The value is depreciated but still can be used.
-- year,--,bool,Renewable capacities are based on existing capacities reported by IRENA (IRENASTAT) for the specified year
-- expansion_limit,--,float or false,"Artificially limit maximum IRENA capacities to a factor. For example, an ``expansion_limit: 1.1`` means 110% of capacities . If false are chosen, the estimated renewable potentials determine by the workflow are used."
-- technology_mapping,,,Mapping between PyPSA-Eur and powerplantmatching technology names
-- -- Offshore,--,"Any subset of {offwind-ac, offwind-dc}","List of PyPSA-Eur carriers that is considered as (IRENA, OPSD) onshore technology."
-- -- Offshore,--,"Any subset of {offwind-ac, offwind-dc, offwind-float}","List of PyPSA-Eur carriers that is considered as (IRENA, OPSD) onshore technology."
-- -- Offshore,--,{onwind},"List of PyPSA-Eur carriers that is considered as (IRENA, OPSD) offshore technology."
-- -- PV,--,{solar},"List of PyPSA-Eur carriers that is considered as (IRENA, OPSD) PV technology."
autarky,,,

Can't render this file because it has a wrong number of fields in line 5.

View File

@ -2,11 +2,8 @@
enable,str or bool,"{auto, true, false}","Switch to include (true) or exclude (false) the retrieve_* rules of snakemake into the workflow; 'auto' sets true|false based on availability of an internet connection to prevent issues with snakemake failing due to lack of internet connection."
prepare_links_p_nom,bool,"{true, false}","Switch to retrieve current HVDC projects from `Wikipedia <https://en.wikipedia.org/wiki/List_of_HVDC_projects>`_"
retrieve_databundle,bool,"{true, false}","Switch to retrieve databundle from zenodo via the rule :mod:`retrieve_databundle` or whether to keep a custom databundle located in the corresponding folder."
retrieve_sector_databundle,bool,"{true, false}","Switch to retrieve sector databundle from zenodo via the rule :mod:`retrieve_sector_databundle` or whether to keep a custom databundle located in the corresponding folder."
retrieve_cost_data,bool,"{true, false}","Switch to retrieve technology cost data from `technology-data repository <https://github.com/PyPSA/technology-data>`_."
build_cutout,bool,"{true, false}","Switch to enable the building of cutouts via the rule :mod:`build_cutout`."
retrieve_cutout,bool,"{true, false}","Switch to enable the retrieval of cutouts from zenodo with :mod:`retrieve_cutout`."
build_natura_raster,bool,"{true, false}","Switch to enable the creation of the raster ``natura.tiff`` via the rule :mod:`build_natura_raster`."
retrieve_natura_raster,bool,"{true, false}","Switch to enable the retrieval of ``natura.tiff`` from zenodo with :mod:`retrieve_natura_raster`."
custom_busmap,bool,"{true, false}","Switch to enable the use of custom busmaps in rule :mod:`cluster_network`. If activated the rule looks for provided busmaps at ``data/custom_busmap_elec_s{simpl}_{clusters}.csv`` which should have the same format as ``resources/busmap_elec_s{simpl}_{clusters}.csv``, i.e. the index should contain the buses of ``networks/elec_s{simpl}.nc``."
drop_leap_day,bool,"{true, false}","Switch to drop February 29 from all time-dependent data in leap years"

1 Unit Values Description
2 enable str or bool {auto, true, false} Switch to include (true) or exclude (false) the retrieve_* rules of snakemake into the workflow; 'auto' sets true|false based on availability of an internet connection to prevent issues with snakemake failing due to lack of internet connection.
3 prepare_links_p_nom bool {true, false} Switch to retrieve current HVDC projects from `Wikipedia <https://en.wikipedia.org/wiki/List_of_HVDC_projects>`_
4 retrieve_databundle bool {true, false} Switch to retrieve databundle from zenodo via the rule :mod:`retrieve_databundle` or whether to keep a custom databundle located in the corresponding folder.
retrieve_sector_databundle bool {true, false} Switch to retrieve sector databundle from zenodo via the rule :mod:`retrieve_sector_databundle` or whether to keep a custom databundle located in the corresponding folder.
5 retrieve_cost_data bool {true, false} Switch to retrieve technology cost data from `technology-data repository <https://github.com/PyPSA/technology-data>`_.
6 build_cutout bool {true, false} Switch to enable the building of cutouts via the rule :mod:`build_cutout`.
7 retrieve_cutout bool {true, false} Switch to enable the retrieval of cutouts from zenodo with :mod:`retrieve_cutout`.
build_natura_raster bool {true, false} Switch to enable the creation of the raster ``natura.tiff`` via the rule :mod:`build_natura_raster`.
retrieve_natura_raster bool {true, false} Switch to enable the retrieval of ``natura.tiff`` from zenodo with :mod:`retrieve_natura_raster`.
8 custom_busmap bool {true, false} Switch to enable the use of custom busmaps in rule :mod:`cluster_network`. If activated the rule looks for provided busmaps at ``data/custom_busmap_elec_s{simpl}_{clusters}.csv`` which should have the same format as ``resources/busmap_elec_s{simpl}_{clusters}.csv``, i.e. the index should contain the buses of ``networks/elec_s{simpl}.nc``.
9 drop_leap_day bool {true, false} Switch to drop February 29 from all time-dependent data in leap years

View File

@ -16,6 +16,9 @@ petrochemical_process _emissions,MtCO2/a,float,The emission of petrochemical pro
HVC_primary_fraction,--,float,The fraction of high value chemicals (HVC) produced via primary route
HVC_mechanical_recycling _fraction,--,float,The fraction of high value chemicals (HVC) produced using mechanical recycling
HVC_chemical_recycling _fraction,--,float,The fraction of high value chemicals (HVC) produced using chemical recycling
HVC_environment_sequestration_fraction,--,float,The fraction of high value chemicals (HVC) put into landfill resulting in additional carbon sequestration. The default value is 0.
waste_to_energy,--,bool,Switch to enable expansion of waste to energy CHPs for conversion of plastics. Default is false.
waste_to_energy_cc,--,bool,Switch to enable expansion of waste to energy CHPs for conversion of plastics with carbon capture. Default is false.
,,,
sector_ratios_fraction_future,--,Dictionary with planning horizons as keys.,The fraction of total progress in fuel and process switching achieved in the industry sector.
basic_chemicals_without_NH3_production_today,Mt/a,float,"The amount of basic chemicals produced without ammonia (= 86 Mtethylene-equiv - 17 MtNH3)."
@ -29,5 +32,6 @@ MWh_H2_per_tCl,MWhH2/tCl,float,"The energy amount of hydrogen needed to produce
methanol_production _today,MtMeOH/a,float,"The amount of methanol produced. From `DECHEMA (2017) <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry-p-20002750.pdf>`_, page 62"
MWh_elec_per_tMeOH,MWh/tMeOH,float,"The energy amount of electricity needed to produce a ton of methanol. From `DECHEMA (2017) <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry-p-20002750.pdf>`_, Table 14, page 65"
MWh_CH4_per_tMeOH,MWhCH4/tMeOH,float,"The energy amount of methane needed to produce a ton of methanol. From `DECHEMA (2017) <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry-p-20002750.pdf>`_, Table 14, page 65"
MWh_MeOH_per_tMeOH,LHV,float,"The energy amount per ton of methanol. From `DECHEMA (2017) <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry-p-20002750.pdf>`_, page 74."
hotmaps_locate_missing,--,"{true,false}",Locate industrial sites without valid locations based on city and countries.
reference_year,year,YYYY,The year used as the baseline for industrial energy demand and production. Data extracted from `JRC-IDEES 2015 <https://data.jrc.ec.europa.eu/dataset/jrc-10110-10001>`_

1 Unit Values Description
16 HVC_primary_fraction -- float The fraction of high value chemicals (HVC) produced via primary route
17 HVC_mechanical_recycling _fraction -- float The fraction of high value chemicals (HVC) produced using mechanical recycling
18 HVC_chemical_recycling _fraction -- float The fraction of high value chemicals (HVC) produced using chemical recycling
19 HVC_environment_sequestration_fraction -- float The fraction of high value chemicals (HVC) put into landfill resulting in additional carbon sequestration. The default value is 0.
20 waste_to_energy -- bool Switch to enable expansion of waste to energy CHPs for conversion of plastics. Default is false.
21 waste_to_energy_cc -- bool Switch to enable expansion of waste to energy CHPs for conversion of plastics with carbon capture. Default is false.
22
23 sector_ratios_fraction_future -- Dictionary with planning horizons as keys. The fraction of total progress in fuel and process switching achieved in the industry sector.
24 basic_chemicals_without_NH3_production_today Mt/a float The amount of basic chemicals produced without ammonia (= 86 Mtethylene-equiv - 17 MtNH3).
32 methanol_production _today MtMeOH/a float The amount of methanol produced. From `DECHEMA (2017) <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry-p-20002750.pdf>`_, page 62
33 MWh_elec_per_tMeOH MWh/tMeOH float The energy amount of electricity needed to produce a ton of methanol. From `DECHEMA (2017) <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry-p-20002750.pdf>`_, Table 14, page 65
34 MWh_CH4_per_tMeOH MWhCH4/tMeOH float The energy amount of methane needed to produce a ton of methanol. From `DECHEMA (2017) <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry-p-20002750.pdf>`_, Table 14, page 65
35 MWh_MeOH_per_tMeOH LHV float The energy amount per ton of methanol. From `DECHEMA (2017) <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry-p-20002750.pdf>`_, page 74.
36 hotmaps_locate_missing -- {true,false} Locate industrial sites without valid locations based on city and countries.
37 reference_year year YYYY The year used as the baseline for industrial energy demand and production. Data extracted from `JRC-IDEES 2015 <https://data.jrc.ec.europa.eu/dataset/jrc-10110-10001>`_

View File

@ -5,10 +5,8 @@
"naturalearth/*",,,,,http://www.naturalearthdata.com/about/terms-of-use/
"NUTS_2013 _60M_SH/*","x","x",,"x",https://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/administrative-units-statistical-units
"cantons.csv","x",,"x",,https://en.wikipedia.org/wiki/Data_codes_for_Switzerland
"eia_hydro_annual_generation.csv","x",,,,https://www.eia.gov/about/copyrights_reuse.php
"GEBCO_2014_2D.nc","x",,,,https://www.gebco.net/data_and_products/gridded_bathymetry_data/documents/gebco_2014_historic.pdf
"gebco/GEBCO_2014_2D.nc","x",,,,https://www.gebco.net/data_and_products/gridded_bathymetry_data/documents/gebco_2014_historic.pdf
"hydro_capacities.csv","x",,,,
"je-e-21.03.02.xls","x","x",,,https://www.bfs.admin.ch/bfs/en/home/fso/swiss-federal-statistical-office/terms-of-use.html
"nama_10r_3 gdp.tsv.gz","x",,,"x",https://ec.europa.eu/eurostat/about/policies/copyright
"nama_10r_3 popgdp.tsv.gz","x",,,"x",https://ec.europa.eu/eurostat/about/policies/copyright
"time_series_60min _singleindex_filtered.csv","x",,,,https://data.open-power-system-data.org/time_series/2019-06-05/README.md

1 Files BY NC SA Mark Changes Detail
5 naturalearth/* http://www.naturalearthdata.com/about/terms-of-use/
6 NUTS_2013 _60M_SH/* x x x https://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/administrative-units-statistical-units
7 cantons.csv x x https://en.wikipedia.org/wiki/Data_codes_for_Switzerland
8 eia_hydro_annual_generation.csv gebco/GEBCO_2014_2D.nc x https://www.eia.gov/about/copyrights_reuse.php https://www.gebco.net/data_and_products/gridded_bathymetry_data/documents/gebco_2014_historic.pdf
GEBCO_2014_2D.nc x https://www.gebco.net/data_and_products/gridded_bathymetry_data/documents/gebco_2014_historic.pdf
9 hydro_capacities.csv x
10 je-e-21.03.02.xls x x https://www.bfs.admin.ch/bfs/en/home/fso/swiss-federal-statistical-office/terms-of-use.html
11 nama_10r_3 gdp.tsv.gz x x https://ec.europa.eu/eurostat/about/policies/copyright
12 nama_10r_3 popgdp.tsv.gz x x https://ec.europa.eu/eurostat/about/policies/copyright
time_series_60min _singleindex_filtered.csv x https://data.open-power-system-data.org/time_series/2019-06-05/README.md

View File

@ -4,4 +4,4 @@ time_shift_for_large_gaps,string,string,"Periods which are used for copying time
manual_adjustments,bool,"{true, false}","Whether to adjust the load data manually according to the function in :func:`manual_adjustment`."
scaling_factor,--,float,"Global correction factor for the load time series."
fixed_year,--,Year or False,"To specify a fixed year for the load time series that deviates from the snapshots' year"
supplement_synthetic,bool,"{true, false}","Whether to supplement missing data for selected time period should be supplemented by synthetic data from https://zenodo.org/record/10820928."
supplement_synthetic,bool,"{true, false}","Whether to supplement missing data for selected time period should be supplemented by synthetic data from https://zenodo.org/records/10820928."

1 Unit Values Description
4 manual_adjustments bool {true, false} Whether to adjust the load data manually according to the function in :func:`manual_adjustment`.
5 scaling_factor -- float Global correction factor for the load time series.
6 fixed_year -- Year or False To specify a fixed year for the load time series that deviates from the snapshots' year
7 supplement_synthetic bool {true, false} Whether to supplement missing data for selected time period should be supplemented by synthetic data from https://zenodo.org/record/10820928. Whether to supplement missing data for selected time period should be supplemented by synthetic data from https://zenodo.org/records/10820928.

View File

@ -5,5 +5,7 @@ scenarios,,,
-- enable,bool,"{true, false}","Switch to select whether workflow should generate scenarios based on ``file``."
-- file,str,,"Path to the scenario yaml file. The scenario file contains config overrides for each scenario. In order to be taken account, ``run: scenarios`` has to be set to ``true`` and ``run: name`` has to be a subset of top level keys given in the scenario file. In order to automatically create a `scenario.yaml` file based on a combination of settings, alter and use the ``config/create_scenarios.py`` script in the ``config`` directory."
disable_progressbar,bool,"{true, false}","Switch to select whether progressbar should be disabled."
shared_resources,bool/str,,"Switch to select whether resources should be shared across runs. If a string is passed, this is used as a subdirectory name for shared resources. If set to 'base', only resources before creating the elec.nc file are shared."
shared_resources,,,
-- policy,bool/str,,"Boolean switch to select whether resources should be shared across runs. If a string is passed, this is used as a subdirectory name for shared resources. If set to 'base', only resources before creating the elec.nc file are shared."
-- exclude,str,"For the case shared_resources=base, specify additional files that should not be shared across runs."
shared_cutouts,bool,"{true, false}","Switch to select whether cutouts should be shared across runs."

Can't render this file because it has a wrong number of fields in line 10.

View File

@ -1,6 +1,6 @@
Trigger, Description, Definition, Status
``nH``, i.e. ``2H``-``6H``, "Resample the time-resolution by averaging over every ``n`` snapshots, ``prepare_network``: `average_every_nhours() <https://github.com/PyPSA/pypsa-eur/blob/6b964540ed39d44079cdabddee8333f486d0cd63/scripts/prepare_network.py#L110>`_ and its `caller <https://github.com/PyPSA/pypsa-eur/blob/6b964540ed39d44079cdabddee8333f486d0cd63/scripts/prepare_network.py#L146>`__)", In active use
``Co2L``, Add an overall absolute carbon-dioxide emissions limit configured in ``electricity: co2limit``. If a float is appended an overall emission limit relative to the emission level given in ``electricity: co2base`` is added (e.g. ``Co2L0.05`` limits emissisions to 5% of what is given in ``electricity: co2base``), ``prepare_network``: `add_co2limit() <https://github.com/PyPSA/pypsa-eur/blob/6b964540ed39d44079cdabddee8333f486d0cd63/scripts/prepare_network.py#L19>`_ and its `caller <https://github.com/PyPSA/pypsa-eur/blob/6b964540ed39d44079cdabddee8333f486d0cd63/scripts/prepare_network.py#L154>`__, In active use
``nH``, i.e. ``2h``-``6h``, "Resample the time-resolution by averaging over every ``n`` snapshots, ``prepare_network``: `average_every_nhours() <https://github.com/PyPSA/pypsa-eur/blob/6b964540ed39d44079cdabddee8333f486d0cd63/scripts/prepare_network.py#L110>`_ and its `caller <https://github.com/PyPSA/pypsa-eur/blob/6b964540ed39d44079cdabddee8333f486d0cd63/scripts/prepare_network.py#L146>`__)", In active use
``Co2L`` + ``n``, Add an overall absolute carbon-dioxide emissions limit of ``n`` times of the 1990 base emissions (e.g. ``Co2L0.05`` limits emissisions to 5% of what is calculated in the rule :mod:``prepare_sector_network`` in the function ``co2_emissions_year()``),:mod:``prepare_sector_network`` in the function ``co2_emissions_year()`` , In active use
``carrier+{c|p|m}factor``,"Alter the capital cost (``c``), installable potential (``p``) or marginal costs (``m``) of a carrier by a factor. Example: ``solar+c0.5`` reduces the capital cost of solar to 50\% of original values.", ``prepare_network``, In active use
``T``,Add land transport sector,,In active use
``H``,Add heating sector,,In active use

1 Trigger Description Definition Status
2 ``nH`` i.e. ``2H``-``6H`` i.e. ``2h``-``6h`` Resample the time-resolution by averaging over every ``n`` snapshots, ``prepare_network``: `average_every_nhours() <https://github.com/PyPSA/pypsa-eur/blob/6b964540ed39d44079cdabddee8333f486d0cd63/scripts/prepare_network.py#L110>`_ and its `caller <https://github.com/PyPSA/pypsa-eur/blob/6b964540ed39d44079cdabddee8333f486d0cd63/scripts/prepare_network.py#L146>`__) In active use
3 ``Co2L`` ``Co2L`` + ``n`` Add an overall absolute carbon-dioxide emissions limit configured in ``electricity: co2limit``. If a float is appended an overall emission limit relative to the emission level given in ``electricity: co2base`` is added (e.g. ``Co2L0.05`` limits emissisions to 5% of what is given in ``electricity: co2base``) Add an overall absolute carbon-dioxide emissions limit of ``n`` times of the 1990 base emissions (e.g. ``Co2L0.05`` limits emissisions to 5% of what is calculated in the rule :mod:``prepare_sector_network`` in the function ``co2_emissions_year()``) ``prepare_network``: `add_co2limit() <https://github.com/PyPSA/pypsa-eur/blob/6b964540ed39d44079cdabddee8333f486d0cd63/scripts/prepare_network.py#L19>`_ and its `caller <https://github.com/PyPSA/pypsa-eur/blob/6b964540ed39d44079cdabddee8333f486d0cd63/scripts/prepare_network.py#L154>`__ :mod:``prepare_sector_network`` in the function ``co2_emissions_year()`` In active use
4 ``carrier+{c|p|m}factor`` Alter the capital cost (``c``), installable potential (``p``) or marginal costs (``m``) of a carrier by a factor. Example: ``solar+c0.5`` reduces the capital cost of solar to 50\% of original values. ``prepare_network`` In active use
5 ``T`` Add land transport sector In active use
6 ``H`` Add heating sector In active use

View File

@ -24,7 +24,6 @@ bev_dsm,--,"{true, false}",Add the option for battery electric vehicles (BEV) to
bev_availability,--,float,The share for battery electric vehicles (BEV) that are able to do demand side management (DSM)
bev_energy,--,float,The average size of battery electric vehicles (BEV) in MWh
bev_charge_efficiency,--,float,Battery electric vehicles (BEV) charge and discharge efficiency
bev_plug_to_wheel _efficiency,km/kWh,float,The distance battery electric vehicles (BEV) can travel in km per kWh of energy charge in battery. Base value comes from `Tesla Model S <https://www.fueleconomy.gov/feg/>`_
bev_charge_rate,MWh,float,The power consumption for one electric vehicle (EV) in MWh. Value derived from 3-phase charger with 11 kW.
bev_avail_max,--,float,The maximum share plugged-in availability for passenger electric vehicles.
bev_avail_mean,--,float,The average share plugged-in availability for passenger electric vehicles.
@ -32,14 +31,15 @@ v2g,--,"{true, false}",Allows feed-in to grid from EV battery
land_transport_fuel_cell _share,--,Dictionary with planning horizons as keys.,The share of vehicles that uses fuel cells in a given year
land_transport_electric _share,--,Dictionary with planning horizons as keys.,The share of vehicles that uses electric vehicles (EV) in a given year
land_transport_ice _share,--,Dictionary with planning horizons as keys.,The share of vehicles that uses internal combustion engines (ICE) in a given year. What is not EV or FCEV is oil-fuelled ICE.
transport_fuel_cell _efficiency,--,float,The H2 conversion efficiencies of fuel cells in transport
transport_internal _combustion_efficiency,--,float,The oil conversion efficiencies of internal combustion engine (ICE) in transport
transport_electric_efficiency,MWh/100km,float,The conversion efficiencies of electric vehicles in transport
transport_fuel_cell_efficiency,MWh/100km,float,The H2 conversion efficiencies of fuel cells in transport
transport_ice_efficiency,MWh/100km,float,The oil conversion efficiencies of internal combustion engine (ICE) in transport
agriculture_machinery _electric_share,--,float,The share for agricultural machinery that uses electricity
agriculture_machinery _oil_share,--,float,The share for agricultural machinery that uses oil
agriculture_machinery _fuel_efficiency,--,float,The efficiency of electric-powered machinery in the conversion of electricity to meet agricultural needs.
agriculture_machinery _electric_efficiency,--,float,The efficiency of oil-powered machinery in the conversion of oil to meet agricultural needs.
Mwh_MeOH_per_MWh_H2,LHV,float,"The energy amount of the produced methanol per energy amount of hydrogen. From `DECHEMA (2017) <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry-p-20002750.pdf>`_, page 64."
MWh_MeOH_per_tCO2,LHV,float,"The energy amount of the produced methanol per ton of CO2. From `DECHEMA (2017) <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry-p-20002750.pdf>`_, page 64."
MWh_MeOH_per_tCO2,LHV,float,"The energy amount of the produced methanol per ton of CO2. From `DECHEMA (2017) <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry-p-20002750.pdf>`_, page 66."
MWh_MeOH_per_MWh_e,LHV,float,"The energy amount of the produced methanol per energy amount of electricity. From `DECHEMA (2017) <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry-p-20002750.pdf>`_, page 64."
shipping_hydrogen _liquefaction,--,"{true, false}",Whether to include liquefaction costs for hydrogen demand in shipping.
,,,
@ -145,3 +145,11 @@ limit_max_growth,,,
-- -- {carrier},GW,float,The historic maximum growth of a carrier
-- max_relative_growth,,,
-- -- {carrier},p.u.,float,The historic maximum relative growth of a carrier
,,,
enhanced_geothermal,,,
-- enable,--,"{true, false}",Add option to include Enhanced Geothermal Systems
-- flexible,--,"{true, false}",Add option for flexible operation (see Ricks et al. 2024)
-- max_hours,--,int,The maximum hours the reservoir can be charged under flexible operation
-- max_boost,--,float,The maximum boost in power output under flexible operation
-- var_cf,--,"{true, false}",Add option for variable capacity factor (see Ricks et al. 2024)
-- sustainability_factor,--,float,Share of sourced heat that is replenished by the earth's core (see details in `build_egs_potentials.py <https://github.com/PyPSA/pypsa-eur-sec/blob/master/scripts/build_egs_potentials.py>`_)

1 Unit Values Description
24 bev_availability -- float The share for battery electric vehicles (BEV) that are able to do demand side management (DSM)
25 bev_energy -- float The average size of battery electric vehicles (BEV) in MWh
26 bev_charge_efficiency -- float Battery electric vehicles (BEV) charge and discharge efficiency
bev_plug_to_wheel _efficiency km/kWh float The distance battery electric vehicles (BEV) can travel in km per kWh of energy charge in battery. Base value comes from `Tesla Model S <https://www.fueleconomy.gov/feg/>`_
27 bev_charge_rate MWh float The power consumption for one electric vehicle (EV) in MWh. Value derived from 3-phase charger with 11 kW.
28 bev_avail_max -- float The maximum share plugged-in availability for passenger electric vehicles.
29 bev_avail_mean -- float The average share plugged-in availability for passenger electric vehicles.
31 land_transport_fuel_cell _share -- Dictionary with planning horizons as keys. The share of vehicles that uses fuel cells in a given year
32 land_transport_electric _share -- Dictionary with planning horizons as keys. The share of vehicles that uses electric vehicles (EV) in a given year
33 land_transport_ice _share -- Dictionary with planning horizons as keys. The share of vehicles that uses internal combustion engines (ICE) in a given year. What is not EV or FCEV is oil-fuelled ICE.
34 transport_fuel_cell _efficiency transport_electric_efficiency -- MWh/100km float The H2 conversion efficiencies of fuel cells in transport The conversion efficiencies of electric vehicles in transport
35 transport_internal _combustion_efficiency transport_fuel_cell_efficiency -- MWh/100km float The oil conversion efficiencies of internal combustion engine (ICE) in transport The H2 conversion efficiencies of fuel cells in transport
36 transport_ice_efficiency MWh/100km float The oil conversion efficiencies of internal combustion engine (ICE) in transport
37 agriculture_machinery _electric_share -- float The share for agricultural machinery that uses electricity
38 agriculture_machinery _oil_share -- float The share for agricultural machinery that uses oil
39 agriculture_machinery _fuel_efficiency -- float The efficiency of electric-powered machinery in the conversion of electricity to meet agricultural needs.
40 agriculture_machinery _electric_efficiency -- float The efficiency of oil-powered machinery in the conversion of oil to meet agricultural needs.
41 Mwh_MeOH_per_MWh_H2 LHV float The energy amount of the produced methanol per energy amount of hydrogen. From `DECHEMA (2017) <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry-p-20002750.pdf>`_, page 64.
42 MWh_MeOH_per_tCO2 LHV float The energy amount of the produced methanol per ton of CO2. From `DECHEMA (2017) <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry-p-20002750.pdf>`_, page 64. The energy amount of the produced methanol per ton of CO2. From `DECHEMA (2017) <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry-p-20002750.pdf>`_, page 66.
43 MWh_MeOH_per_MWh_e LHV float The energy amount of the produced methanol per energy amount of electricity. From `DECHEMA (2017) <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry-p-20002750.pdf>`_, page 64.
44 shipping_hydrogen _liquefaction -- {true, false} Whether to include liquefaction costs for hydrogen demand in shipping.
45
145 -- -- {carrier} GW float The historic maximum growth of a carrier
146 -- max_relative_growth
147 -- -- {carrier} p.u. float The historic maximum relative growth of a carrier
148
149 enhanced_geothermal
150 -- enable -- {true, false} Add option to include Enhanced Geothermal Systems
151 -- flexible -- {true, false} Add option for flexible operation (see Ricks et al. 2024)
152 -- max_hours -- int The maximum hours the reservoir can be charged under flexible operation
153 -- max_boost -- float The maximum boost in power output under flexible operation
154 -- var_cf -- {true, false} Add option for variable capacity factor (see Ricks et al. 2024)
155 -- sustainability_factor -- float Share of sourced heat that is replenished by the earth's core (see details in `build_egs_potentials.py <https://github.com/PyPSA/pypsa-eur-sec/blob/master/scripts/build_egs_potentials.py>`_)

View File

@ -4,7 +4,7 @@ options,,,
-- load_shedding,bool/float,"{'true','false', float}","Add generators with very high marginal cost to simulate load shedding and avoid problem infeasibilities. If load shedding is a float, it denotes the marginal cost in EUR/kWh."
-- noisy_costs,bool,"{'true','false'}","Add random noise to marginal cost of generators by :math:`\mathcal{U}(0.009,0,011)` and capital cost of lines and links by :math:`\mathcal{U}(0.09,0,11)`."
-- skip_iterations,bool,"{'true','false'}","Skip iterating, do not update impedances of branches. Defaults to true."
-- rolling_horizon,bool,"{'true','false'}","Whether to optimize the network in a rolling horizon manner, where the snapshot range is split into slices of size `horizon` which are solved consecutively."
-- rolling_horizon,bool,"{'true','false'}","Switch for rule :mod:`solve_operations_network` whether to optimize the network in a rolling horizon manner, where the snapshot range is split into slices of size `horizon` which are solved consecutively. This setting has currently no effect on sector-coupled networks."
-- seed,--,int,Random seed for increased deterministic behaviour.
-- custom_extra_functionality,--,str,Path to a Python file with custom extra functionality code to be injected into the solving rules of the workflow relative to ``rules`` directory.
-- io_api,string,"{'lp','mps','direct'}",Passed to linopy and determines the API used to communicate with the solver. With the ``'lp'`` and ``'mps'`` options linopy passes a file to the solver; with the ``'direct'`` option (only supported for HIGHS and Gurobi) linopy uses an in-memory python API resulting in better performance.
@ -14,6 +14,18 @@ options,,,
-- transmission_losses,int,[0-9],"Add piecewise linear approximation of transmission losses based on n tangents. Defaults to 0, which means losses are ignored."
-- linearized_unit_commitment,bool,"{'true','false'}",Whether to optimise using the linearized unit commitment formulation.
-- horizon,--,int,Number of snapshots to consider in each iteration. Defaults to 100.
-- post_discretization,,,
-- -- enable,bool,"{'true','false'}",Switch to enable post-discretization of the network. Disabled by default.
-- -- line_unit_size,MW,float,Discrete unit size of lines in MW.
-- -- line_threshold,,float,The threshold relative to the discrete line unit size beyond which to round up to the next unit.
-- -- link_unit_size,MW,float,Discrete unit size of links in MW by carrier (given in dictionary style).
-- -- -- {carrier},,,
-- -- link_threshold,,float,The threshold relative to the discrete link unit size beyond which to round up to the next unit by carrier (given in dictionary style).
-- -- -- {carrier},,,
agg_p_nom_limits,,,Configure per carrier generator nominal capacity constraints for individual countries if ``'CCL'`` is in ``{opts}`` wildcard.
-- agg_offwind,bool,"{'true','false'}",Aggregate together all the types of offwind when writing the constraint. Default is false.
-- include_existing,bool,"{'true','false'}",Take existing capacities into account when writing the constraint. Default is false.
-- file,file,path,Reference to ``.csv`` file specifying per carrier generator nominal capacity constraints for individual countries and planning horizons. Defaults to ``data/agg_p_nom_minmax.csv``.
constraints ,,,
-- CCL,bool,"{'true','false'}",Add minimum and maximum levels of generator nominal capacity per carrier for individual countries. These can be specified in the file linked at ``electricity: agg_p_nom_limits`` in the configuration. File defaults to ``data/agg_p_nom_minmax.csv``.
-- EQ,bool/string,"{'false',`n(c| )``; i.e. ``0.5``-``0.7c``}",Require each country or node to on average produce a minimal share of its total consumption itself. Example: ``EQ0.5c`` demands each country to produce on average at least 50% of its consumption; ``EQ0.5`` demands each node to produce on average at least 50% of its consumption.

1 Unit Values Description
4 -- load_shedding bool/float {'true','false', float} Add generators with very high marginal cost to simulate load shedding and avoid problem infeasibilities. If load shedding is a float, it denotes the marginal cost in EUR/kWh.
5 -- noisy_costs bool {'true','false'} Add random noise to marginal cost of generators by :math:`\mathcal{U}(0.009,0,011)` and capital cost of lines and links by :math:`\mathcal{U}(0.09,0,11)`.
6 -- skip_iterations bool {'true','false'} Skip iterating, do not update impedances of branches. Defaults to true.
7 -- rolling_horizon bool {'true','false'} Whether to optimize the network in a rolling horizon manner, where the snapshot range is split into slices of size `horizon` which are solved consecutively. Switch for rule :mod:`solve_operations_network` whether to optimize the network in a rolling horizon manner, where the snapshot range is split into slices of size `horizon` which are solved consecutively. This setting has currently no effect on sector-coupled networks.
8 -- seed -- int Random seed for increased deterministic behaviour.
9 -- custom_extra_functionality -- str Path to a Python file with custom extra functionality code to be injected into the solving rules of the workflow relative to ``rules`` directory.
10 -- io_api string {'lp','mps','direct'} Passed to linopy and determines the API used to communicate with the solver. With the ``'lp'`` and ``'mps'`` options linopy passes a file to the solver; with the ``'direct'`` option (only supported for HIGHS and Gurobi) linopy uses an in-memory python API resulting in better performance.
14 -- transmission_losses int [0-9] Add piecewise linear approximation of transmission losses based on n tangents. Defaults to 0, which means losses are ignored.
15 -- linearized_unit_commitment bool {'true','false'} Whether to optimise using the linearized unit commitment formulation.
16 -- horizon -- int Number of snapshots to consider in each iteration. Defaults to 100.
17 -- post_discretization
18 -- -- enable bool {'true','false'} Switch to enable post-discretization of the network. Disabled by default.
19 -- -- line_unit_size MW float Discrete unit size of lines in MW.
20 -- -- line_threshold float The threshold relative to the discrete line unit size beyond which to round up to the next unit.
21 -- -- link_unit_size MW float Discrete unit size of links in MW by carrier (given in dictionary style).
22 -- -- -- {carrier}
23 -- -- link_threshold float The threshold relative to the discrete link unit size beyond which to round up to the next unit by carrier (given in dictionary style).
24 -- -- -- {carrier}
25 agg_p_nom_limits Configure per carrier generator nominal capacity constraints for individual countries if ``'CCL'`` is in ``{opts}`` wildcard.
26 -- agg_offwind bool {'true','false'} Aggregate together all the types of offwind when writing the constraint. Default is false.
27 -- include_existing bool {'true','false'} Take existing capacities into account when writing the constraint. Default is false.
28 -- file file path Reference to ``.csv`` file specifying per carrier generator nominal capacity constraints for individual countries and planning horizons. Defaults to ``data/agg_p_nom_minmax.csv``.
29 constraints
30 -- CCL bool {'true','false'} Add minimum and maximum levels of generator nominal capacity per carrier for individual countries. These can be specified in the file linked at ``electricity: agg_p_nom_limits`` in the configuration. File defaults to ``data/agg_p_nom_minmax.csv``.
31 -- EQ bool/string {'false',`n(c| )``; i.e. ``0.5``-``0.7c``} Require each country or node to on average produce a minimal share of its total consumption itself. Example: ``EQ0.5c`` demands each country to produce on average at least 50% of its consumption; ``EQ0.5`` demands each node to produce on average at least 50% of its consumption.

View File

@ -31,7 +31,7 @@ Top-level configuration
.. _run_cf:
``run``
=======
=============
It is common conduct to analyse energy system optimisation models for **multiple scenarios** for a variety of reasons,
e.g. assessing their sensitivity towards changing the temporal and/or geographical resolution or investigating how
@ -174,7 +174,7 @@ Switches for some rules and optional features.
:file: configtables/co2_budget.csv
.. note::
this parameter is over-ridden if ``CO2Lx`` or ``cb`` is set in
this parameter is over-ridden if ``Co2Lx`` or ``cb`` is set in
sector_opts.
.. _electricity_cf:
@ -265,7 +265,7 @@ Define and specify the ``atlite.Cutout`` used for calculating renewable potentia
.. literalinclude:: ../config/config.default.yaml
:language: yaml
:start-at: offwind-dc:
:end-before: solar:
:end-before: offwind-float:
.. csv-table::
:header-rows: 1
@ -273,9 +273,25 @@ Define and specify the ``atlite.Cutout`` used for calculating renewable potentia
:file: configtables/offwind-dc.csv
.. note::
both ``offwind-ac`` and ``offwind-dc`` have the same assumption on
Both ``offwind-ac`` and ``offwind-dc`` have the same assumption on
``capacity_per_sqkm`` and ``correction_factor``.
``offwind-float``
---------------
.. literalinclude:: ../config/config.default.yaml
:language: yaml
:start-at: offwind-float:
:end-before: solar:
.. csv-table::
:header-rows: 1
:widths: 22,7,22,33
:file: configtables/offwind-float.csv
.. note::
``offwind-ac``, ``offwind-dc`` , ``offwind-float`` have the same assumption on
``capacity_per_sqkm`` and ``correction_factor``.
``solar``
---------------
@ -534,9 +550,6 @@ The list of available biomass is given by the category in `ENSPRESO_BIOMASS <htt
:widths: 22,7,22,33
:file: configtables/costs.csv
.. note::
``rooftop_share:`` are based on the potentials, assuming
(0.1 kW/m2 and 10 m2/person)
.. _clustering_cf:

View File

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

View File

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

View File

Before

Width:  |  Height:  |  Size: 533 KiB

After

Width:  |  Height:  |  Size: 533 KiB

View File

Before

Width:  |  Height:  |  Size: 269 KiB

After

Width:  |  Height:  |  Size: 269 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 KiB

After

Width:  |  Height:  |  Size: 224 KiB

View File

Before

Width:  |  Height:  |  Size: 290 KiB

After

Width:  |  Height:  |  Size: 290 KiB

View File

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 110 KiB

View File

Before

Width:  |  Height:  |  Size: 523 KiB

After

Width:  |  Height:  |  Size: 523 KiB

View File

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 99 KiB

View File

Before

Width:  |  Height:  |  Size: 801 KiB

After

Width:  |  Height:  |  Size: 801 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 700 KiB

After

Width:  |  Height:  |  Size: 710 KiB

View File

@ -74,7 +74,7 @@ greenhouse gas emitters except waste management, agriculture, forestry and land
use. The diagram below gives an overview of the sectors and the links between
them:
.. image:: ../graphics/multisector_figure.png
.. image:: img/multisector_figure.png
:width: 70%
:align: center

View File

@ -35,7 +35,7 @@ For instance, an invocation to
.. code:: bash
.../pypsa-eur % snakemake -call results/networks/elec_s_128_ec_lvopt_Co2L-3H.nc
.../pypsa-eur % snakemake -call results/networks/elec_s_128_ec_lvopt_.nc
follows this dependency graph
@ -50,7 +50,7 @@ preceding rules which another rule takes as input data.
.. note::
The dependency graph was generated using
``snakemake --dag results/networks/elec_s_128_ec_lvopt_Co2L-3H.nc -F | sed -n "/digraph/,/}/p" | dot -Tpng -o doc/img/intro-workflow.png``
``snakemake --dag results/networks/elec_s_128_ec_lvopt_.nc -F | sed -n "/digraph/,/}/p" | dot -Tpng -o doc/img/intro-workflow.png``
For the use of ``snakemake``, it makes sense to familiarize yourself quickly
with the `basic tutorial

View File

@ -28,16 +28,13 @@ Electricity Systems Databundle
More details are included in `the description of the
data bundles on zenodo <https://zenodo.org/record/3517935#.XbGeXvzRZGo>`__.
.. csv-table::
:header-rows: 1
:file: configtables/licenses.csv
* BY: Attribute Source
* NC: Non-Commercial Use Only
* SA: Share Alike
Sector-Coupled Systems Databundle
=================================
.. csv-table::
:header-rows: 1
:file: configtables/licenses.csv
.. csv-table::
:header-rows: 1

View File

@ -26,7 +26,6 @@ With these and the externally extracted ENTSO-E online map topology
Then the process continues by calculating conventional power plant capacities, potentials, and per-unit availability time series for variable renewable energy carriers and hydro power plants with the following rules:
- :mod:`build_powerplants` for today's thermal power plant capacities using `powerplantmatching <https://github.com/FRESNA/powerplantmatching>`__ allocating these to the closest substation for each powerplant,
- :mod:`build_natura_raster` for rasterising NATURA2000 natural protection areas,
- :mod:`build_ship_raster` for building shipping traffic density,
- :mod:`build_renewable_profiles` for the hourly capacity factors and installation potentials constrained by land-use in each substation's Voronoi cell for PV, onshore and offshore wind, and
- :mod:`build_hydro_profile` for the hourly per-unit hydro power availability time series.
@ -47,14 +46,6 @@ Rule ``prepare_links_p_nom``
.. automodule:: prepare_links_p_nom
.. _natura:
Rule ``build_natura_raster``
===============================
.. automodule:: build_natura_raster
.. _base:
Rule ``base_network``

View File

@ -9,189 +9,379 @@ Release Notes
Upcoming Release
================
* Group existing capacities to the earlier grouping_year for consistency with optimized capacities.
* bugfix: installed heating capacities were 5% lower than existing heating capacities
* Set non-zero capital_cost for methanol stores to avoid unrealistic storage sizes
* Include gas and oil fields and saline aquifers in estimation of CO2 sequestration potential.
* Set p_nom = p_nom_min for generators with baseyear == grouping_year in add_existing_baseyear. This has no effect on the optimization but helps n.statistics to correctly report already installed capacities.
* bugfix: convert Strings to pathlib.Path objects as input to ConfigSettings
* Reverted outdated hotfix for doubled renewable capacity in myopic optimization.
* Allow the use of more solvers in clustering (Xpress, COPT, Gurobi, CPLEX, SCIP, MOSEK).
* Added Enhanced Geothermal Systems for generation of electricity and district heat.
Cost and available capacity assumptions based on `Aghahosseini et al. (2020)
<https://www.sciencedirect.com/science/article/pii/S0306261920312551>`__.
See configuration ``sector: enhanced_geothermal`` for details; by default switched off.
* Enhanced support for choosing different weather years
(https://github.com/PyPSA/pypsa-eur/pull/204):
* Partially revert https://github.com/PyPSA/pypsa-eur/pull/967 to return to old grouping year logic (which was mostly correct)
- Processed energy statistics from eurostat (1990-2021) and IDEES (2000-2015)
are now initially stored for all available years and filtered by the year
given in ``energy: energy_totals_year:``.
* Bugfix: Correctly read in threshold capacity below which to remove components from previous planning horizons in :mod:`add_brownfield`.
PyPSA-Eur 0.11.0 (25th May 2024)
=====================================
**New Features**
* Introduced scenario management to support the simultaneous execution of
multiple scenarios with a single ``snakemake`` call. A ``scenarios.yaml`` file
allows customizable scenario names with configuration overrides. To enable,
set ``run: scenarios: true`` and define the list of scenario names under
``run: name:`` in the configuration file. The scenario file's top-level keys
must match the defined scenario names.
(https://github.com/PyPSA/pypsa-eur/pull/724,
https://github.com/PyPSA/pypsa-eur/pull/975,
https://github.com/PyPSA/pypsa-eur/pull/989,
https://github.com/PyPSA/pypsa-eur/pull/993,
https://github.com/PyPSA/pypsa-eur/pull/1011)
- A scenarios template file ``config/scenarios.template.yaml`` is included and
copied to ``config/scenarios.yaml`` on first use.
- The scenario file can be changed via ``run: scenarios: file:``.
- Activating scenario management with ``run: scenarios: enable: true``
introduces a new wildcard ``{run}``. Configuration settings may now depend
on this wildcard. A new ``config_provider()`` function is used in the
``Snakefile`` and ``.smk`` files to handle wildcard values.
- Scenario files can be programmatically created using
``config/create_scenarios.py``. This script can be run with ``snakemake -j1
create_scenarios``.
- The setting ``run: name: all`` will run all scenarios in
``config/scenarios.yaml``. Otherwise, only the scenarios listed under ``run:
name:`` will run.
- The setting ``run: shared_resources:`` indicates whether resources should be
encapsulated by ``run: name:``. The special setting ``run: shared_resources:
base`` shares resources until ``add_electricity`` that do not contain
wildcards other than ``{"technology", "year", "scope"}``.
- Added new configuration options for all ``{opts}`` and ``{sector_opts}``
wildcard values to create a unique configuration file (``config.yaml``) per
PyPSA network file using ``update_config_from_wildcards()``. This function
updates the ``snakemake.config`` object with settings from wildcards.
- The cost data was moved from ``data/costs_{year}.csv`` to
``resources/costs_{year}.csv``. The ``retrieve_cost_data`` rule now calls a
Python script.
- Time clustering settings moved to ``clustering: temporal:`` from
``snapshots:``, simplifying scenario management.
- Collection rules have a new wildcard ``run=config["run"]["name"]`` to
collect outputs across scenarios.
- Scenarios can be encapsulated in a directory using ``run: prefix:``.
- The ``{sector_opts}`` wildcard is no longer used by default. All scenario
definitions are now in ``config.yaml``.
- **Warning:** Scenario management with myopic or perfect foresight pathway
optimization requires the first investment period to be shared across all
scenarios. The ``wildcard_constraints`` for the ``add_existing_baseyear``
rule do not accept wildcard-aware input functions.
* Enhanced support for choosing different weather years.
(https://github.com/PyPSA/pypsa-eur/pull/204)
- Processed energy statistics from Eurostat (1990-2021) and IDEES (2000-2015)
are stored for all available years and filtered by the year in ``energy:
energy_totals_year:``.
- Added option to supplement electricity load data with synthetic time series
for years not contained in OPSD (from https://zenodo.org/records/10820928,
``load: supplement_synthetic:``).
- The total annual heat demand for years not contained in the energy
statistics by eurostat (1990-2021) or IDEES (2000-2015) are scaled based on
a regression between the total number of heating degree days and the total
annual heat demand between the years 2007-2021, assuming a similar building
stock.
for years not in OPSD (from https://zenodo.org/records/10820928, ``load:
supplement_synthetic:``).
- Total annual heat demand for years not in Eurostat (1990-2021) or IDEES
(2000-2015) is scaled based on a regression between heating degree days and
heat demand for 2007-2021, assuming a similar building stock.
- Added option to scale annual hydro-electricity generation data for years not
contained in the in EIA (1980-2021) based on a regression between annual
generation and total runoff per country for the years 1980-2021
(``renewable: hydro: eia_approximate_missing:``)
- Added option to normalize annual hydro generation data by the associated
installed capacity reported by EIA (1980-2021) in order to eliminate changes
in generation due to newly built capacity (``renewable: hydro:
eia_approximate_missing: eia_correct_by_capacity:``).
in EIA (1980-2021) based on a regression between annual generation and total
runoff per country for 1980-2021 (``renewable: hydro:
eia_approximate_missing:``).
- Added option to normalize annual hydro generation data by the installed
capacity reported by EIA (1980-2021) to eliminate changes due to newly built
capacity (``renewable: hydro: eia_approximate_missing:
eia_correct_by_capacity:``).
- Added option to make hydro generation data independent of weather year
(``renewable: hydro: eia_approximate_missing: eia_norm_year:``).
- Added option to drop leap days (``enable: drop_leap_day:``).
- Added option to make electric load data independent of weather year
(``load: fixed_year:``).
- Include time series of Swiss number of passenger vehicles from the `Swiss
Federal Statistical Office
<https://www.bfs.admin.ch/bfs/en/home/statistics/mobility-transport/transport-infrastructure-vehicles/vehicles/road-vehicles-stock-level-motorisation.html>`__.
- Added option to make electric load data independent of weather year (``load:
fixed_year:``).
- Include time series of Swiss passenger vehicles from the Swiss Federal
Statistical Office.
- Updated hydro-electricity generation and capacity data from EIA.
- The easiest way to sweep over multiple weather years is to use the new
scenario management. An example for the necessary `create_scenarios.py`
script can be found in this `Github gist
- The easiest way to use multiple weather years is with the new scenario
management. An example `create_scenarios.py` script is available in this
`Github gist
<https://gist.github.com/fneum/47b857862dd9148a22eca5a2e85caa9a>`__.
* Removed rule ``copy_config``. Instead, a config file is created for each
network output of the ``solve_*`` rules, with the same content as ``n.meta``.
* New renewable technologies:
- Solar PV with single-axis horizontal tracking (N-S axis), carrier:
``solar-hsat``. (https://github.com/PyPSA/pypsa-eur/pull/1066)
- Floating offshore wind technology for water depths below 60m, carrier:
``offwind-float``. (https://github.com/PyPSA/pypsa-eur/pull/773)
* Added default values for power distribution losses, assuming uniform 3% losses
on distribution grid links. These are deducted from national load time series
to avoid double counting. Extensions for country-specific loss factors and
planning horizon developments are planned.
* Added ``industry: HVC_environment_sequestration_fraction:`` to specify the
fraction of carbon in plastics that is permanently sequestered in landfills.
The default assumption is that all carbon in plastics is eventually released
to the atmosphere. (https://github.com/PyPSA/pypsa-eur/pull/1060)
* Added options for building waste-to-energy plants with and without carbon
capture to consume non-recycled and non-sequestered plastics. Config settings:
``industry: waste_to_energy:`` and ``industry: waste_to_energy_cc``. This
excludes municipal solid waste. (https://github.com/PyPSA/pypsa-eur/pull/1060)
* Added option to post-discretize line and link capacities based on unit sizes
and rounding thresholds in the configuration under ``solving: options:
post_discretization:``. This is disabled by default.
(https://github.com/PyPSA/pypsa-eur/pull/1064)
* Time aggregation for sector-coupled networks is now its own rule
:mod:`time_aggregation`. Time aggregation is constant over planning horizons
of the same network when using time step segmentation.
(https://github.com/PyPSA/pypsa-eur/pull/1065,
https://github.com/PyPSA/pypsa-eur/pull/1075)
* Added config ``run: shared_resources: exclude:`` to specify files excluded
from shared resources with ``run: shared_resources: base``. The function
``_helpers/get_run_path()`` now takes an additional keyword argument
``exclude_from_shared`` with a list of files that should not be shared.
(https://github.com/PyPSA/pypsa-eur/pull/1050)
* Added existing biomass boilers in :mod:`add_existing_baseyear`.
(https://github.com/PyPSA/pypsa-eur/pull/951)
* Added new HVDC transmission projects from `TYNDP 2024 draft projects
<https://tyndp.entsoe.eu/news/176-pan-european-electricity-transmission-projects-and-33-storage-projects-will-be-assessed-in-tyndp-2024>`__.
(https://github.com/PyPSA/pypsa-eur/pull/982)
* Upgrade to Snakemake v8.5+. This version is the new minimum version required.
To upgrade an existing environment, run ``conda install -c bioconda
snakemake-minimal">=8.5"`` and ``pip install snakemake-storage-plugin-http``
(https://github.com/PyPSA/pypsa-eur/pull/825).
* Linearly interpolated missing investment periods in year-dependent
configuration options. (https://github.com/PyPSA/pypsa-eur/pull/943)
* Corrected a bug leading to power plants operating after their DateOut
(https://github.com/PyPSA/pypsa-eur/pull/958). Added additional grouping years
before 1980.
* Added shapes to the ``netCDF`` files for different stages of the network
object in `base_network`, `simplify_network`, and `cluster_network`. The
`build_bus_regions` rule is now integrated into the `base_network` rule.
(https://github.com/PyPSA/pypsa-eur/pull/1013,
https://github.com/PyPSA/pypsa-eur/pull/1051)
* Add decommissioning of existing renewables assets in `add_existing_baseyear`.
* Added config ``land_transport_demand_factor`` to model growth in land
transport demand for different time horizons.
* The Eurostat data was updated to the 2023 version in :mod:`build_energy_totals`.
* Allowed dictionary for ``aviation_demand_factor`` to specify changes in
aviation demand by investment period.
* The latest `Swiss energy totals
<https://www.bfe.admin.ch/bfe/de/home/versorgung/statistik-und-geodaten/energiestatistiken/energieverbrauch-nach-verwendungszweck.html/>`__
have been updated to the 2023 version.
* Allowed more solvers in clustering (Xpress, COPT, Gurobi, CPLEX, SCIP, MOSEK).
(https://github.com/PyPSA/pypsa-eur/pull/949)
* The JRC-IDEES data is only available until 2015. For energy totals years (``energy: energy_totals_year``) after
2015, the data scaled using the ratio of Eurostat data reported for the energy
totals year and 2015.
* Added option to download cost data from custom fork of ``technology-data``.
(https://github.com/PyPSA/pypsa-eur/pull/970)
* The default energy totals year (``energy: energy_totals_year``) was updated to 2019.
* Added ``nodal_supply_energy`` to :mod:`make_summary`.
(https://github.com/PyPSA/pypsa-eur/pull/1046)
* Upgrade default techno-economic assumptions to ``technology-data`` v0.8.1.
**Breaking Changes**
* Add possibility to download cost data from custom fork of ``technology-data``.
* Upgraded to Snakemake v8.5+. This version is the new minimum requirement. To
upgrade an existing environment, run ``conda install -c bioconda
snakemake-minimal">=8.5"`` and ``pip install snakemake-storage-plugin-http``.
(https://github.com/PyPSA/pypsa-eur/pull/825)
* Linearly interpolate missing investment periods in year-dependent
configuration options.
* Removed exogenously set share of rooftop PV (``costs: rooftop_share:``).
Rooftop and utility-scale PV are now separate technologies with endogenous
shares.
* Added new scenario management that supports the simultaneous execution of
multiple scenarios with a single ``snakemake`` call. For this purpose, a
``scenarios.yaml`` file is introduced which contains customizable scenario
names with configuration overrides. To enable it, set the ``run: scenarios:
true`` and define the list of scenario names to run under ``run: name:`` in
the configuration file. The latter must be a subset of toplevel keys in the
scenario file.
* Removed rule ``copy_config``. Instead, a config file is created for each
network output of the ``solve_*`` rules, with the same content as ``n.meta``.
(https://github.com/PyPSA/pypsa-eur/pull/965)
- To get started, a scenarios template file ``config/scenarios.template.yaml``
is included in the repository, which is copied to ``config/scenarios.yaml``
on first use.
* Moved switch ``run: shared_resources:`` to ``run: shared_resources: policy:``.
- The scenario file can be changed via ``run: scenarios: file:``.
**Changes**
- If scenario management is activated with ``run: scenarios: enable: true``, a
new wildcard ``{run}`` is introduced. This means that the configuration
settings may depend on the new ``{run}`` wildcard. Therefore, a new
``config_provider()`` function is used in the ``Snakefile`` and ``.smk``
files, which takes wildcard values into account. The calls to the ``config``
object have been reduced in ``.smk`` files since there is no awareness of
wildcard values outside rule definitions.
* Updated, merged, and reduced data bundle:
(https://github.com/PyPSA/pypsa-eur/pull/1020,
https://github.com/PyPSA/pypsa-eur/pull/1027)
- The scenario files can also be programmatically created using the template
script ``config/create_scenarios.py``. This script can be run with
``snakemake -j1 create_scenarios`` and creates the scenarios file referenced
under ``run: scenarios: file:``.
- Merged electricity-only and sector-coupled data bundles into one bundle.
This removed the ``retrieve_sector_databundle`` rule.
- Included rasterised ``natura.tiff`` in the data bundle and removed the
``retrieve_natura_raster`` rule.
- Removed the ``build_natura_raster`` rule due to its infrequent use and
significant data bundle size increase.
- Removed outdated files from the data bundle (e.g., Eurostat energy
balances).
- Reduced the spatial scope of GEBCO bathymetry data to Europe to save space.
- Removed a separate data bundle for tutorials.
- Directly downloaded the `Hotmaps Industrial Database
<https://gitlab.com/hotmaps/industrial_sites/industrial_sites_Industrial_Database/-/blob/master/data/Industrial_Database.csv>`__
from the source, removing ``Industrial_Database.csv`` from the data bundle.
- The setting ``run: name: all`` will run all scenarios in
``config/scenarios.yaml``. Otherwise, it will run those passed as list in
``run: name:`` as long as ``run: scenarios: enable: true``.
* Updated energy statistics: (https://github.com/PyPSA/pypsa-eur/pull/947,
https://github.com/PyPSA/pypsa-eur/pull/973,
https://github.com/PyPSA/pypsa-eur/pull/990,
https://github.com/PyPSA/pypsa-eur/pull/1025,
https://github.com/PyPSA/pypsa-eur/pull/1074)
- The setting ``run: shared_resources:`` indicates via a boolean whether the
resources should be encapsulated by the ``run: name:``. The special setting
``run: shared_resources: base`` shares resources until ``add_electricity``
that do not contain wildcards other than ``{"technology", "year",
"scope"}``.
- Updated Eurostat data to the 2023 version in :mod:`build_energy_totals`.
- Updated the latest Swiss energy totals to the 2023 version.
- Scaled JRC-IDEES data using the ratio of Eurostat data for energy totals
years after 2015 and 2015.
- Updated default energy totals year to 2019.
- Updated energy balances for residential demands (space, water, cooking) in
JRC-IDEES data with newer Eurostat values.
- Added new configuration options for all ``{opts}`` and ``{sector_opts}``
wildcard values to create a unique configuration file (``config.yaml``) per
PyPSA network file. This is done with the help of a new function
``update_config_from_wildcards()`` which parses configuration settings from
wildcards and updates the ``snakemake.config`` object. These updated
configuration settings are used in the scripts rather than directly parsed
values from ``snakemake.wildcards``.
* Improved documentation: (https://github.com/PyPSA/pypsa-eur/pull/1017,
https://github.com/PyPSA/pypsa-eur/pull/1014)
- The cost data was moved from ``data/costs_{year}.csv`` to
``resources/costs_{year}.csv`` since it depends on configuration settings.
The ``retrieve_cost_data`` rule was changed to calling a Python script.
- Clarified that ``solving: rolling_horizon:`` only works for
:mod:`solve_operations_network`, not for networks with sector-coupling or
investment variables.
- Clarified suffix usage in `add_existing_baseyear`.
- Added documentation section for contributing documentation.
- Moved time clustering settings to ``clustering: temporal:`` from
``snapshots:`` so that the latter is only used to define the
``pandas.DatetimeIndex`` which simplifies the scenario management.
* Included gas and oil fields and saline aquifers for estimating carbon
sequestration potentials. (https://github.com/PyPSA/pypsa-eur/pull/1010,
https://github.com/PyPSA/pypsa-eur/pull/983)
- Collection rules get a new wildcard ``run=config["run"]["name"]`` so they
can collect outputs across different scenarios.
* Doubled solar rooftop potentials to roughly 1 TW for Europe based on recent
European Commission reports.
- It is further possible to encapsulate your scenarios in a directory using
the setting ``run: prefix:``.
* Consistently sourced data on existing renewable capacities from
``powerplantmatching``. Removed ``retrieve_irena`` rule. Updated the dataset
to include 2023 values. (https://github.com/PyPSA/pypsa-eur/pull/1018)
- **Warning:** One caveat remains for the scenario management with myopic or
perfect foresight pathway optimisation. The first investment period must be
shared across all scenarios. The reason is that the ``wildcard_constraints``
defined for the rule ``add_existing_baseyear`` do not accept wildcard-aware
input functions (cf.
`https://github.com/snakemake/snakemake/issues/2703`_).
* Added methanol consumption in industry as reported in the DECHEMA report
directly as methanol demand. (https://github.com/PyPSA/pypsa-eur/pull/1068)
* The outputs of the rule ``retrieve_gas_infrastructure_data`` no longer
marked as ``protected()`` as the download size is small.
* Adapted disabling of transmission expansion in myopic foresight optimizations
when the limit is reached to handle cost limits.
(https://github.com/PyPSA/pypsa-eur/pull/952,
https://github.com/PyPSA/pypsa-eur/pull/1076)
* Bugfix: allow modelling sector-coupled landlocked regions. (Fixed handling of offshore wind.)
* Improved the behavior of ``agg_p_nom_limits``: Moved configuration to
``solving``; added the ability to aggregate all ``offwind`` types; added
option to consider existing capacities; added option to distinguish by
planning horizon. (https://github.com/PyPSA/pypsa-eur/pull/1023)
* Adapt the disabling of transmission expansion in myopic foresight optimisations when limit is already reached to also handle cost limits.
* Disabled ``electricity: everywhere_powerplants``` by default to save memory in
:mod:`simplify_network`.
* Fix duplicated years and grouping years reference in `add_land_use_constraint_m`.
* Moved non-essential example configuration files to ``config/examples``.
* Fix type error with `m` option in `cluster_network`.
* Outputs of the retrieve rules are no longer marked as ``protected()``.
* Fix error with `symbol` of `buses` in `simplify_network`.
* Improved carbon budget distribution plot.
(https://github.com/PyPSA/pypsa-eur/pull/1070)
* Fix index of existing capacities in `add_power_capacities_installed_before_baseyear` with `m` option.
* Moved all graphics to ``doc/img``.
(https://github.com/PyPSA/pypsa-eur/pull/1052)
* Fix custom busmap read in `cluster_network`.
* Connection costs calculated in :mod:`simplify_network` are no longer written
to file. (https://github.com/PyPSA/pypsa-eur/pull/1031)
* Data on existing renewable capacities is now consistently taken from powerplantmatching (instead of being retrieved separately); the dataset has also been updated to include 2023 values.
**Bugs and Compatibility**
* Added shapes to .nc file for different stages of the network object in `base_network`, `simplify_network`, and `cluster_network`; the `build_bus_regions` rule is now integrated into the `base_network` rule.
* Updated ``technology-data`` to version v0.9.0.
* Fix p_nom_min of renewables generators for myopic approach and add check of existing capacities in `add_land_use_constraint_m`.
* Bumped minimum ``powerplantmatching`` version to v0.5.15.
(https://github.com/PyPSA/pypsa-eur/pull/1057)
* Add documentation section for how to contribute documentation
* Bugfix: The configuration setting ``electricity:
estimate_renewable_capacities: enable:`` for rule :mod:`add_electricity` is
not compatible with ``foresight: myopic``. The logic now skips adding existing
renewable capacities in :mod:`add_electricity` if the foresight mode is
``myopic``. (https://github.com/PyPSA/pypsa-eur/pull/1080)
* Bugfix: Ensure gas-fired power plants are correctly added as OCGT or CCGT in
:mod:`add_electricity`. Previously, they were always added as OCGT.
* Bugfix: Fix distinction of temperature-dependent correction factors for the
energy demand of electric vehicles and ICEs fuel cell cars.
(https://github.com/PyPSA/pypsa-eur/pull/957)
* Bugfix: Ensure all industry coal demands are considered when using
``sector_ratios_fraction_future``.
(https://github.com/PyPSA/pypsa-eur/pull/1047)
* Bugfix: Add existing heat pumps to low-voltage level.
(https://github.com/PyPSA/pypsa-eur/pull/948)
* Fixed gas network retrofitting to hydrogen in :mod:`add_brownfield` for myopic
pathway studies. (https://github.com/PyPSA/pypsa-eur/pull/1036)
* Bugfix: Consider decommissioning of existing renewable assets in
:mod:`add_existing_baseyear`. (https://github.com/PyPSA/pypsa-eur/pull/1001,
https://github.com/PyPSA/pypsa-eur/pull/959)
* Bugfix: Adjust build year groups of existing capacities for consistency with
optimized capacities per planning horizon. The previous setup neglected some
existing heating capacities. (https://github.com/PyPSA/pypsa-eur/pull/1019)
* Bugfix: Corrected a bug causing power plants to operate after their
``DateOut``. Added additional grouping years before 1980.
(https://github.com/PyPSA/pypsa-eur/pull/958)
* Bugfix: Allow modeling sector-coupled landlocked regions by handling the
absence of offshore wind. (https://github.com/PyPSA/pypsa-eur/pull/944)
* Bugfix: Correct approximation of hydropower generation if Portugal or Spain
are not included. (https://github.com/PyPSA/pypsa-eur/pull/1054)
* Bugfix: In :mod:`build_electricity_demand`, ensure load data is only added if
the country is included in the configuration.
(https://github.com/PyPSA/pypsa-eur/pull/1054)
* Bugfix: Skip heat bus for CHPs in areas without central heating.
(https://github.com/PyPSA/pypsa-eur/pull/1021)
* Bugfix: Avoid duplicated offshore regions.
* Fixed type error with ``m`` option in :mod:`cluster_network`.
(https://github.com/PyPSA/pypsa-eur/pull/986)
* Fixed error with ``symbol`` column of buses in :mod:`simplify_network`.
(https://github.com/PyPSA/pypsa-eur/pull/987)
* Fixed index of existing capacities in
``add_power_capacities_installed_before_baseyear`` with ``m`` option.
(https://github.com/PyPSA/pypsa-eur/pull/1002)
* Fixed reading in custom busmaps in :mod:`cluster_network`.
(https://github.com/PyPSA/pypsa-eur/pull/1008)
* Fixed ``p_nom_min`` of renewables generators for myopic approach and added
check of existing capacities in ``add_land_use_constraint_m``.
(https://github.com/PyPSA/pypsa-eur/pull/1022,
https://github.com/PyPSA/pypsa-eur/pull/1029)
* Fixed duplicated years and grouping years reference in
``add_land_use_constraint_m``. (https://github.com/PyPSA/pypsa-eur/pull/991,
https://github.com/PyPSA/pypsa-eur/pull/968)
* Fixed filling of missing data in
``build_industry_sector_ratios_intermediate``.
(https://github.com/PyPSA/pypsa-eur/pull/1004)
* Fixed file name encoding in optional rule :mod:`build_biomass_transport_costs`
depending on the operating system.
(https://github.com/PyPSA/pypsa-eur/pull/769)
* Technical fix for constraint function ``add_operational_reserve_margin``.
(https://github.com/PyPSA/pypsa-eur/pull/1071)
* Technical fix for constraint function ``add_BAU_constraints``.
(https://github.com/PyPSA/pypsa-eur/pull/1024)
* Fixed network clustering and simplification issues caused by adding TYNDP
links. (https://github.com/PyPSA/pypsa-eur/pull/1067)
* Bugfix: Ensure correct indexing of weights in :mod:`cluster_network`.
(https://github.com/PyPSA/pypsa-eur/pull/988)
* Bugfix: Only sanitize locations when there are buses with a location.
(https://github.com/PyPSA/pypsa-eur/pull/971)
PyPSA-Eur 0.10.0 (19th February 2024)
=====================================
@ -634,7 +824,7 @@ PyPSA-Eur 0.9.0 (5th January 2024)
* The minimum PyPSA version is now 0.26.1.
* Update to ``tsam>=0.2.3`` for performance improvents in temporal clustering.
* Update to ``tsam>=0.2.3`` for performance improvements in temporal clustering.
* Pin ``snakemake`` version to below 8.0.0, as the new version is not yet
supported. The next release will switch to the requirement ``snakemake>=8``.
@ -1514,7 +1704,7 @@ This release is known to work with `PyPSA-Eur
**Gas Transmission Network**
* New rule ``retrieve_gas_infrastructure_data`` that downloads and extracts the
SciGRID_gas `IGGIELGN <https://zenodo.org/record/4767098>`__ dataset from
SciGRID_gas `IGGIELGN <https://zenodo.org/records/4767098>`__ dataset from
zenodo. It includes data on the transmission routes, pipe diameters,
capacities, pressure, and whether the pipeline is bidirectional and carries
H-Gas or L-Gas.
@ -1674,7 +1864,7 @@ This release is known to work with `PyPSA-Eur
PyPSA network.
* Updated `data bundle
<https://zenodo.org/record/5824485/files/pypsa-eur-sec-data-bundle.tar.gz>`__
<https://zenodo.org/records/5824485/files/pypsa-eur-sec-data-bundle.tar.gz>`__
that includes the hydrogan salt cavern storage potentials.
* Updated and extended documentation in
@ -2034,7 +2224,7 @@ PyPSA-Eur-Sec codebase in Version 0.2.0 above.
This model has `its own github repository
<https://github.com/martavp/pypsa-eur-sec-30-path>`__ and is `archived
on Zenodo <https://zenodo.org/record/4014807>`__.
on Zenodo <https://zenodo.org/records/4014807>`__.
@ -2050,7 +2240,7 @@ European countries with one node per country. It includes demand and
supply for electricity, space and water heating in buildings, and land
transport.
It is `archived on Zenodo <https://zenodo.org/record/1146666>`__.
It is `archived on Zenodo <https://zenodo.org/records/1146666>`__.
Release Process

View File

@ -53,32 +53,6 @@ The :ref:`tutorial` uses a smaller cutout than required for the full model (30 M
For details see :mod:`build_cutout` and read the `atlite documentation <https://atlite.readthedocs.io>`__.
Rule ``retrieve_natura_raster``
================================
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.4706686.svg
:target: https://doi.org/10.5281/zenodo.4706686
This rule, as a substitute for :mod:`build_natura_raster`, downloads an already rasterized version (`natura.tiff <https://zenodo.org/record/4706686/files/natura.tiff>`__) of `Natura 2000 <https://en.wikipedia.org/wiki/Natura_2000>`__ natural protection areas to reduce computation times. The file is placed into the ``resources`` sub-directory.
**Relevant Settings**
.. code:: yaml
enable:
build_natura_raster:
.. seealso::
Documentation of the configuration file ``config/config.yaml`` at
:ref:`toplevel_cf`
**Outputs**
- ``resources/natura.tiff``: Rasterized version of `Natura 2000 <https://en.wikipedia.org/wiki/Natura_2000>`__ natural protection areas to reduce computation times.
.. seealso::
For details see :mod:`build_natura_raster`.
Rule ``retrieve_electricity_demand``
====================================
@ -130,14 +104,3 @@ None.
**Outputs**
- ``data/shipdensity_global.zip``
Rule ``retrieve_sector_databundle``
====================================
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.5546516.svg
:target: https://doi.org/10.5281/zenodo.5546516
In addition to the databundle required for electricity-only studies,
another databundle is required for modelling sector-coupled systems.
The size of this data bundle is around 640 MB.

View File

@ -183,6 +183,11 @@ Rule ``cluster_gas_network``
.. automodule:: cluster_gas_network
Rule ``time_aggregation``
==============================================================================
.. automodule:: time_aggregation
Rule ``prepare_sector_network``
==============================================================================

View File

@ -15,11 +15,11 @@ The total number of nodes for Europe is set in the ``config/config.yaml`` file u
Exemplary unsolved network clustered to 512 nodes:
.. image:: ../graphics/elec_s_512.png
.. image:: img/elec_s_512.png
Exemplary unsolved network clustered to 37 nodes:
.. image:: ../graphics/elec_s_37.png
.. image:: img/elec_s_37.png
The total number of nodes for Europe is set in the ``config/config.yaml`` file under `clusters <https://github.com/PyPSA/pypsa-eur-sec/blob/3daff49c9999ba7ca7534df4e587e1d516044fc3/config.default.yaml#L20>`__. The number of nodes can vary between 37, the number of independent countries/synchronous areas, and several hundred. With 200-300 nodes, the model needs 100-150 GB RAM to solve with a commercial solver like Gurobi.
Not all of the sectors are at the full nodal resolution, and some demand for some sectors is distributed to nodes using heuristics that need to be corrected. Some networks are copper-plated to reduce computational times.

View File

@ -18,7 +18,7 @@ management, carbon capture and usage/sequestration, and gas networks.
The basic supply (left column) and demand (right column) options in the model are described in this figure:
.. image:: ../graphics/multisector_figure.png
.. image:: img/multisector_figure.png
.. _Electricity supply and demand:
@ -72,11 +72,11 @@ For every country, heat demand is split between low and high population density
Cooling is electrified and is included in the electricity demand. Cooling demand is assumed to remain at current levels. An example of regional distribution of the total heat demand for network 181 regions is depicted below.
.. image:: ../graphics/demand-map-heat.png
.. image:: img/demand-map-heat.png
As below figure shows, the current total heat demand in Europe is similar to the total electricity demand but features much more pronounced seasonal variations. The current total building heating demand in Europe adds up to 3084 TWh/a of which 78% occurs in urban areas.
.. image:: ../graphics/Heat_and_el_demand_timeseries.png
.. image:: img/Heat_and_el_demand_timeseries.png
In practice, in PyPSA-Eur-Sec, there are heat demand buses to which the corresponding heat demands are added.
@ -269,7 +269,7 @@ The existing European gas transmission network is represented based on the SciGR
The following figure shows the unclustered European gas transmission network based on the SciGRID Gas IGGIELGN dataset. Pipelines are color-coded by estimated capacities. Markers indicate entry-points, sites of fossil resource extraction, and LNG terminals.
.. image:: ../graphics/gas_pipeline_figure.png
.. image:: img/gas_pipeline_figure.png
.. _Biomass supply:
@ -374,7 +374,7 @@ Where process heat is required, our approach depends on the necessary temperatur
The following figure shows the final consumption of energy and non-energy feedstocks in industry today in comparison to the scenario in 2050 assumed in `Neumann et al <https://arxiv.org/abs/2207.05816>`__.
.. image:: ../graphics/fec_industry_today_tomorrow.png
.. image:: img/fec_industry_today_tomorrow.png
The following figure shows the process emissions in industry today (top bar) and in 2050 without
@ -383,12 +383,12 @@ carbon capture (bottom bar) assumed in `Neumann et al <https://arxiv.org/abs/220
.. image:: ../graphics/process-emissions.png
.. image:: img/process-emissions.png
Inside each country the industrial demand is then distributed using the `Hotmaps Industrial Database <https://zenodo.org/record/4687147#.YvOaxhxBy5c>`__, which is illustrated in the figure below. This open database includes georeferenced industrial sites of energy-intensive industry sectors in EU28, including cement, basic chemicals, glass, iron and steel, non-ferrous metals, non-metallic minerals, paper, and refineries subsectors. The use of this spatial dataset enables the calculation of regional and process-specific energy demands. This approach assumes that there will be no significant migration of energy-intensive industries.
Inside each country the industrial demand is then distributed using the `Hotmaps Industrial Database <https://zenodo.org/records/4687147#.YvOaxhxBy5c>`__, which is illustrated in the figure below. This open database includes georeferenced industrial sites of energy-intensive industry sectors in EU28, including cement, basic chemicals, glass, iron and steel, non-ferrous metals, non-metallic minerals, paper, and refineries subsectors. The use of this spatial dataset enables the calculation of regional and process-specific energy demands. This approach assumes that there will be no significant migration of energy-intensive industries.
.. image:: ../graphics/hotmaps.png
.. image:: img/hotmaps.png
.. _Iron and Steel:
@ -459,8 +459,7 @@ Statistics for the production of ammonia, which is commonly used as a fertilizer
The Haber-Bosch process is not explicitly represented in the model, such that demand for ammonia enters the model as a demand for hydrogen ( 6.5 MWh :math:`_{H_2}` / t :math:`_{NH_3}` ) and electricity ( 1.17 MWh :math:`_{el}` /t :math:`_{NH_3}` ) (see `Wang et. al <https://doi.org/10.1016/j.joule.2018.04.017>`__). Today, natural gas dominates in Europe as the source for the hydrogen used in the Haber-Bosch process, but the model can choose among the various hydrogen supply options described in the hydrogen section (see :ref:`Hydrogen supply`)
The total production and specific energy consumption of chlorine and methanol is taken from a `DECHEMA report <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry.pdf>`__. According to this source, the production of chlorine amounts to 9.58 MtCl/a, which is assumed to require electricity at 3.6 MWh :math:`_{el}`/t of chlorine and yield hydrogen at 0.937 MWh :math:`_{H_2}`/t of chlorine in the chloralkali process. The production of methanol adds up to 1.5 MtMeOH/a, requiring electricity at 0.167 MWh :math:`_{el}`/t of methanol and methane at 10.25 MWh :math:`_{CH_4}`/t of methanol.
The total production and specific energy consumption of chlorine and methanol is taken from a `DECHEMA report <https://dechema.de/dechema_media/Downloads/Positionspapiere/Technology_study_Low_carbon_energy_and_feedstock_for_the_European_chemical_industry.pdf>`__. According to this source, the production of chlorine amounts to 9.58 MtCl/a, which is assumed to require electricity at 3.6 MWh :math:`_{el}`/t of chlorine and yield hydrogen at 0.937 MWh :math:`_{H_2}`/t of chlorine in the chloralkali process. The production of methanol adds up to 1.5 MtMeOH/a. Low-carbon methanol production (or methanolisation) by hydrogenation of :math:`CO_2` requires hydrogen at 6.299 MWh :math:`_{H_2}`/t of methanol, carbon dioxide at 1.373 t :math:`_{CO_2}`/t of methanol and electricity at 1.5 MWh :math:`_{el}`/t of methanol. The energy content of methanol is 5.528 MWh :math:`_{MeOH}`/t of methanol. These values are set exogenously in the config file.
The production of ammonia, methanol, and chlorine production is deducted from the JRC IDEES basic chemicals, leaving the production totals of high-value chemicals. For this, we assume that the liquid hydrocarbon feedstock comes from synthetic or fossil- origin naphtha (14 MWh :math:`_{naphtha}`/t of HVC, similar to `Lechtenböhmer et al <https://doi.org/10.1016/j.energy.2016.07.110>`__), ignoring the methanol-to-olefin route. Furthermore, we assume the following transformations of the energy-consuming processes in the production of plastics: the final energy consumption in steam processing is converted to methane since requires temperature above 500 °C (4.1 MWh :math:`_{CH_4}` /t of HVC, see `Rehfeldt et al. <https://doi.org/10.1007/s12053-017-9571-y>`__); and the remaining processes are electrified using the current efficiency of microwave for high-enthalpy heat processing, electric furnaces, electric process cooling and electric generic processes (2.85 MWh :math:`_{el}`/t of HVC).
@ -573,7 +572,7 @@ The `demand for aviation <https://github.com/PyPSA/pypsa-eur-sec/blob/3daff49c99
**Shipping**
Shipping energy demand is covered by a combination of oil and hydrogen. Other fuel options, like methanol or ammonia, are currently not included in PyPSA-Eur-Sec. The share of shipping that is assumed to be supplied by hydrogen can be selected in the `config file <https://github.com/PyPSA/pypsa-eur-sec/blob/3daff49c9999ba7ca7534df4e587e1d516044fc3/config.default.yaml#L198>`__.
Shipping energy demand is covered by a combination of oil, hydrogen and methanol. Other fuel options, like ammonia, are currently not included in PyPSA-Eur-Sec. The share of shipping that is assumed to be supplied by hydrogen or methanol can be selected in the `config file <https://github.com/PyPSA/pypsa-eur/blob/master/config/config.default.yaml#L475>`__.
To estimate the `hydrogen demand <https://github.com/PyPSA/pypsa-eur-sec/blob/3daff49c9999ba7ca7534df4e587e1d516044fc3/scripts/prepare_sector_network.py#L2090>`__, the average fuel efficiency of the fleet is used in combination with the efficiency of the fuel cell defined in the technology-data repository. The average fuel efficiency is set in the `config file <https://github.com/PyPSA/pypsa-eur-sec/blob/3daff49c9999ba7ca7534df4e587e1d516044fc3/config.default.yaml#L196>`__.
@ -581,6 +580,8 @@ The consumed hydrogen comes from the general hydrogen bus where it can be produc
The energy demand for liquefaction of the hydrogen used for shipping can be `included <https://github.com/PyPSA/pypsa-eur-sec/blob/3daff49c9999ba7ca7534df4e587e1d516044fc3/config.default.yaml#L197>`__. If this option is selected, liquifaction will happen at the `node where the shipping demand occurs <https://github.com/PyPSA/pypsa-eur-sec/blob/3daff49c9999ba7ca7534df4e587e1d516044fc3/scripts/prepare_sector_network.py#L2064>`__.
The consumed methanol comes from the general methanol bus where it is produced through methanolisation (see :ref:`Chemicals Industry`).
.. _Carbon dioxide capture, usage and sequestration (CCU/S):
Carbon dioxide capture, usage and sequestration (CCU/S)

View File

@ -32,10 +32,9 @@ configuration, execute
.. code:: bash
:class: full-width
snakemake -call results/test-elec/networks/elec_s_6_ec_lcopt_Co2L-24H.nc --configfile config/test/config.electricity.yaml
snakemake -call results/test-elec/networks/elec_s_6_ec_lcopt_.nc --configfile config/test/config.electricity.yaml
This configuration is set to download a reduced data set via the rules :mod:`retrieve_databundle`,
:mod:`retrieve_natura_raster`, :mod:`retrieve_cutout`.
This configuration is set to download a reduced cutout via the rule :mod:`retrieve_cutout`.
For more information on the data dependencies of PyPSA-Eur, continue reading :ref:`data`.
How to configure runs?
@ -115,9 +114,9 @@ clustered down to 6 buses and every 24 hours aggregated to one snapshot. The com
.. code:: bash
snakemake -call results/test-elec/networks/elec_s_6_ec_lcopt_Co2L-24H.nc --configfile config/test/config.electricity.yaml
snakemake -call results/test-elec/networks/elec_s_6_ec_lcopt_.nc --configfile config/test/config.electricity.yaml
orders ``snakemake`` to run the rule :mod:`solve_network` that produces the solved network and stores it in ``results/networks`` with the name ``elec_s_6_ec_lcopt_Co2L-24H.nc``:
orders ``snakemake`` to run the rule :mod:`solve_network` that produces the solved network and stores it in ``results/networks`` with the name ``elec_s_6_ec_lcopt_.nc``:
.. literalinclude:: ../rules/solve_electricity.smk
:start-at: rule solve_network:
@ -133,30 +132,30 @@ This triggers a workflow of multiple preceding jobs that depend on each rule's i
graph[bgcolor=white, margin=0];
node[shape=box, style=rounded, fontname=sans, fontsize=10, penwidth=2];
edge[penwidth=2, color=grey];
0[label = "solve_network", color = "0.24 0.6 0.85", style="rounded"];
1[label = "prepare_network\nll: vopt\nopts: Co2L-3H", color = "0.10 0.6 0.85", style="rounded"];
2[label = "add_extra_components", color = "0.33 0.6 0.85", style="rounded"];
3[label = "cluster_network\nclusters: 128", color = "0.59 0.6 0.85", style="rounded"];
4[label = "simplify_network\nsimpl: ", color = "0.18 0.6 0.85", style="rounded"];
5[label = "add_electricity", color = "0.48 0.6 0.85", style="rounded"];
6[label = "build_renewable_profiles\ntechnology: solar", color = "0.29 0.6 0.85", style="rounded"];
7[label = "base_network", color = "0.30 0.6 0.85", style="rounded"];
8[label = "build_shapes", color = "0.61 0.6 0.85", style="rounded"];
9[label = "retrieve_databundle", color = "0.06 0.6 0.85", style="rounded"];
10[label = "retrieve_natura_raster", color = "0.03 0.6 0.85", style="rounded"];
11[label = "retrieve_cutout\ncutout: europe-2013-sarah", color = "0.50 0.6 0.85", style="rounded"];
12[label = "build_renewable_profiles\ntechnology: onwind", color = "0.29 0.6 0.85", style="rounded"];
13[label = "retrieve_cutout\ncutout: europe-2013-era5", color = "0.50 0.6 0.85", style="rounded"];
14[label = "build_renewable_profiles\ntechnology: offwind-ac", color = "0.29 0.6 0.85", style="rounded"];
15[label = "build_ship_raster", color = "0.16 0.6 0.85", style="rounded"];
16[label = "retrieve_ship_raster", color = "0.53 0.6 0.85", style="rounded"];
17[label = "build_renewable_profiles\ntechnology: offwind-dc", color = "0.29 0.6 0.85", style="rounded"];
18[label = "build_hydro_profile", color = "0.47 0.6 0.85", style="rounded"];
19[label = "retrieve_cost_data\nyear: 2030", color = "0.21 0.6 0.85", style="rounded"];
20[label = "build_powerplants", color = "0.56 0.6 0.85", style="rounded"];
21[label = "build_electricity_demand", color = "0.54 0.6 0.85", style="rounded"];
22[label = "retrieve_electricity_demand", color = "0.34 0.6 0.85", style="rounded"];
23[label = "retrieve_synthetic_electricity_demand", color = "0.65 0.6 0.85", style="rounded"];
0[label = "solve_network", color = "0.21 0.6 0.85", style="rounded"];
1[label = "prepare_network\nll: copt\nopts: ", color = "0.51 0.6 0.85", style="rounded"];
2[label = "add_extra_components", color = "0.43 0.6 0.85", style="rounded"];
3[label = "cluster_network\nclusters: 6", color = "0.17 0.6 0.85", style="rounded"];
4[label = "simplify_network\nsimpl: ", color = "0.49 0.6 0.85", style="rounded"];
5[label = "add_electricity", color = "0.26 0.6 0.85", style="rounded"];
6[label = "build_renewable_profiles\ntechnology: solar", color = "0.02 0.6 0.85", style="rounded"];
7[label = "base_network", color = "0.35 0.6 0.85", style="rounded"];
8[label = "build_shapes", color = "0.62 0.6 0.85", style="rounded"];
9[label = "retrieve_databundle", color = "0.24 0.6 0.85", style="rounded"];
10[label = "retrieve_cutout\ncutout: be-03-2013-era5", color = "0.36 0.6 0.85", style="rounded"];
11[label = "build_renewable_profiles\ntechnology: solar-hsat", color = "0.02 0.6 0.85", style="rounded"];
12[label = "build_renewable_profiles\ntechnology: onwind", color = "0.02 0.6 0.85", style="rounded"];
13[label = "build_renewable_profiles\ntechnology: offwind-ac", color = "0.02 0.6 0.85", style="rounded"];
14[label = "build_ship_raster", color = "0.08 0.6 0.85", style="rounded"];
15[label = "retrieve_ship_raster", color = "0.28 0.6 0.85", style="rounded"];
16[label = "build_renewable_profiles\ntechnology: offwind-dc", color = "0.02 0.6 0.85", style="rounded"];
17[label = "build_renewable_profiles\ntechnology: offwind-float", color = "0.02 0.6 0.85", style="rounded"];
18[label = "build_line_rating", color = "0.07 0.6 0.85", style="rounded"];
19[label = "retrieve_cost_data\nyear: 2030", color = "0.47 0.6 0.85", style="rounded"];
20[label = "build_powerplants", color = "0.11 0.6 0.85", style="rounded"];
21[label = "build_electricity_demand", color = "0.05 0.6 0.85", style="rounded"];
22[label = "retrieve_electricity_demand", color = "0.58 0.6 0.85", style="rounded"];
23[label = "retrieve_synthetic_electricity_demand", color = "0.11 0.6 0.85", style="rounded"];
1 -> 0
2 -> 1
19 -> 1
@ -168,44 +167,50 @@ This triggers a workflow of multiple preceding jobs that depend on each rule's i
19 -> 4
7 -> 4
6 -> 5
11 -> 5
12 -> 5
14 -> 5
13 -> 5
16 -> 5
17 -> 5
18 -> 5
7 -> 5
18 -> 5
19 -> 5
20 -> 5
9 -> 5
21 -> 5
8 -> 5
7 -> 6
9 -> 6
10 -> 6
8 -> 6
11 -> 6
10 -> 6
8 -> 7
9 -> 8
7 -> 11
9 -> 11
8 -> 11
10 -> 11
7 -> 12
9 -> 12
10 -> 12
8 -> 12
13 -> 12
7 -> 14
9 -> 14
10 -> 14
10 -> 12
7 -> 13
9 -> 13
14 -> 13
8 -> 13
10 -> 13
15 -> 14
8 -> 14
13 -> 14
16 -> 15
13 -> 15
10 -> 14
7 -> 16
9 -> 16
14 -> 16
8 -> 16
10 -> 16
7 -> 17
9 -> 17
10 -> 17
15 -> 17
14 -> 17
8 -> 17
13 -> 17
8 -> 18
13 -> 18
10 -> 17
7 -> 18
10 -> 18
7 -> 20
22 -> 21
23 -> 21
@ -223,8 +228,12 @@ In the terminal, this will show up as a list of jobs to be run:
------------------------------------- -------
add_electricity 1
add_extra_components 1
base_network 1
build_electricity_demand 1
build_line_rating 1
build_renewable_profiles 4
build_powerplants 1
build_renewable_profiles 6
build_shapes 1
build_ship_raster 1
cluster_network 1
prepare_network 1
@ -232,12 +241,11 @@ In the terminal, this will show up as a list of jobs to be run:
retrieve_cutout 1
retrieve_databundle 1
retrieve_electricity_demand 1
retrieve_natura_raster 1
retrieve_ship_raster 1
retrieve_synthetic_electricity_demand 1
simplify_network 1
solve_network 1
total 19
total 24
``snakemake`` then runs these jobs in the correct order.
@ -246,16 +254,15 @@ A job (here ``simplify_network``) will display its attributes and normally some
.. code:: bash
[Mon Feb 19 17:06:17 2024]
rule simplify_network:
input: resources/test/networks/elec.nc, data/costs_2030.csv, resources/test/regions_onshore.geojson, resources/test/regions_offshore.geojson
output: resources/test/networks/elec_s.nc, resources/test/regions_onshore_elec_s.geojson, resources/test/regions_offshore_elec_s.geojson, resources/test/busmap_elec_s.csv, resources/test/connection_costs_s.csv
log: logs/test-elec/simplify_network/elec_s.log
input: resources/test/networks/elec.nc, resources/test/costs_2030.csv, resources/test/regions_onshore.geojson, resources/test/regions_offshore.geojson
output: resources/test/networks/elec_s.nc, resources/test/regions_onshore_elec_s.geojson, resources/test/regions_offshore_elec_s.geojson, resources/test/busmap_elec_s.csv
log: logs/test/simplify_network/elec_s.log
jobid: 4
benchmark: benchmarks/test-elec/simplify_network/elec_s
reason: Missing output files: resources/test/regions_offshore_elec_s.geojson, resources/test/busmap_elec_s.csv, resources/test/regions_onshore_elec_s.geojson, resources/test/networks/elec_s.nc; Input files updated by another job: resources/test/regions_offshore.geojson, resources/test/networks/elec.nc, resources/test/regions_onshore.geojson, data/costs_2030.csv
benchmark: benchmarks/test/simplify_network/elec_s
reason: Forced execution
wildcards: simpl=
resources: tmpdir=/tmp, mem_mb=12000, mem_mib=11445
resources: tmpdir=<TBD>, mem_mb=12000, mem_mib=11445
Once the whole worktree is finished, it should state so in the terminal.
@ -273,7 +280,7 @@ For example, you can explore the evolution of the PyPSA networks by running
#. ``snakemake resources/networks/elec.nc -call --configfile config/test/config.electricity.yaml``
#. ``snakemake resources/networks/elec_s.nc -call --configfile config/test/config.electricity.yaml``
#. ``snakemake resources/networks/elec_s_6.nc -call --configfile config/test/config.electricity.yaml``
#. ``snakemake resources/networks/elec_s_6_ec_lcopt_Co2L-24H.nc -call --configfile config/test/config.electricity.yaml``
#. ``snakemake resources/networks/elec_s_6_ec_lcopt_.nc -call --configfile config/test/config.electricity.yaml``
To run all combinations of wildcard values provided in the ``config/config.yaml`` under ``scenario:``,
you can use the collection rule ``solve_elec_networks``.
@ -311,6 +318,6 @@ Jupyter Notebooks).
import pypsa
n = pypsa.Network("results/networks/elec_s_6_ec_lcopt_Co2L-24H.nc")
n = pypsa.Network("results/networks/elec_s_6_ec_lcopt_.nc")
For inspiration, read the `examples section in the PyPSA documentation <https://pypsa.readthedocs.io/en/latest/examples-basic.html>`__.

File diff suppressed because it is too large Load Diff

View File

@ -29,11 +29,11 @@ Results
By the time of writing the comparison with the historical data shows partially accurate, partially improvable results. The following figures show the comparison of the dispatch of the different carriers.
.. image:: ../graphics/validation_seasonal_operation_area_elec_s_37_ec_lv1.0_Ept.png
.. image:: img/validation_seasonal_operation_area_elec_s_37_ec_lv1.0_Ept.png
:width: 100%
:align: center
.. image:: ../graphics/validation_production_bar_elec_s_37_ec_lv1.0_Ept.png
.. image:: img/validation_production_bar_elec_s_37_ec_lv1.0_Ept.png
:width: 100%
:align: center

View File

@ -35,8 +35,8 @@ The ``{technology}`` wildcard
The ``{technology}`` wildcard specifies for which renewable energy technology to produce availability time
series and potentials using the rule :mod:`build_renewable_profiles`.
It can take the values ``onwind``, ``offwind-ac``, ``offwind-dc``, and ``solar`` but **not** ``hydro``
(since hydroelectric plant profiles are created by a different rule).
It can take the values ``onwind``, ``offwind-ac``, ``offwind-dc``, ``offwind-float``, and ``solar`` but **not** ``hydro``
(since hydroelectric plant profiles are created by a different rule)``
.. _simpl:
@ -101,7 +101,7 @@ The ``{opts}`` wildcard
The ``{opts}`` wildcard is used for electricity-only studies. It triggers
optional constraints, which are activated in either :mod:`prepare_network` or
the :mod:`solve_network` step. It may hold multiple triggers separated by ``-``,
i.e. ``Co2L-3H`` contains the ``Co2L`` trigger and the ``3H`` switch. There are
i.e. ``Co2L-3h`` contains the ``Co2L`` trigger and the ``3h`` switch. There are
currently:
@ -121,7 +121,7 @@ The ``{sector_opts}`` wildcard
# Co2Lx specifies the CO2 target in x% of the 1990 values; default will give default (5%);
# Co2L0p25 will give 25% CO2 emissions; Co2Lm0p05 will give 5% negative emissions
# xH is the temporal resolution; 3H is 3-hourly, i.e. one snapshot every 3 hours
# xH is the temporal resolution; 3h is 3-hourly, i.e. one snapshot every 3 hours
# single letters are sectors: T for land transport, H for building heating,
# B for biomass supply, I for industry, shipping and aviation,
# A for agriculture, forestry and fishing

View File

@ -4,469 +4,465 @@
name: pypsa-eur
channels:
- bioconda
- http://conda.anaconda.org/gurobi
- conda-forge
- bioconda
- gurobi
- defaults
dependencies:
- _libgcc_mutex=0.1=conda_forge
- _openmp_mutex=4.5=2_gnu
- affine=2.4.0=pyhd8ed1ab_0
- alsa-lib=1.2.11=hd590300_1
- ampl-mp=3.1.0=h2cc385e_1006
- amply=0.1.6=pyhd8ed1ab_0
- appdirs=1.4.4=pyh9f0ad1d_0
- argparse-dataclass=2.0.0=pyhd8ed1ab_0
- asttokens=2.4.1=pyhd8ed1ab_0
- atk-1.0=2.38.0=h04ea711_2
- atlite=0.2.12=pyhd8ed1ab_0
- attr=2.5.1=h166bdaf_1
- attrs=23.2.0=pyh71513ae_0
- aws-c-auth=0.7.18=he0b1f16_0
- aws-c-cal=0.6.11=heb1d5e4_0
- aws-c-common=0.9.15=hd590300_0
- aws-c-compression=0.2.18=hce8ee76_3
- aws-c-event-stream=0.4.2=h01f5eca_8
- aws-c-http=0.8.1=hdb68c23_10
- aws-c-io=0.14.7=hbfbeace_6
- aws-c-mqtt=0.10.4=h50844eb_0
- aws-c-s3=0.5.7=h6be9164_2
- aws-c-sdkutils=0.1.15=hce8ee76_3
- aws-checksums=0.1.18=hce8ee76_3
- aws-crt-cpp=0.26.8=h2150271_2
- aws-sdk-cpp=1.11.267=hddb5a97_7
- azure-core-cpp=1.11.1=h91d86a7_1
- azure-identity-cpp=1.6.0=hf1915f5_1
- azure-storage-blobs-cpp=12.10.0=h00ab1b0_1
- azure-storage-common-cpp=12.5.0=h94269e2_4
- beautifulsoup4=4.12.3=pyha770c72_0
- blosc=1.21.5=hc2324a3_1
- bokeh=3.4.1=pyhd8ed1ab_0
- bottleneck=1.3.8=py311h1f0f07a_0
- branca=0.7.2=pyhd8ed1ab_0
- brotli=1.1.0=hd590300_1
- brotli-bin=1.1.0=hd590300_1
- brotli-python=1.1.0=py311hb755f60_1
- bzip2=1.0.8=hd590300_5
- c-ares=1.28.1=hd590300_0
- c-blosc2=2.14.4=hb4ffafa_1
- ca-certificates=2024.2.2=hbcca054_0
- cads-api-client=1.0.0=pyhd8ed1ab_0
- cairo=1.18.0=h3faef2a_0
- cartopy=0.23.0=py311h320fe9a_0
- cdsapi=0.7.0=pyhd8ed1ab_0
- certifi=2024.2.2=pyhd8ed1ab_0
- cffi=1.16.0=py311hb3a22ac_0
- cfgv=3.3.1=pyhd8ed1ab_0
- cfitsio=4.4.0=hbdc6101_1
- cftime=1.6.3=py311h1f0f07a_0
- charset-normalizer=3.3.2=pyhd8ed1ab_0
- click=8.1.7=unix_pyh707e725_0
- click-plugins=1.1.1=py_0
- cligj=0.7.2=pyhd8ed1ab_1
- cloudpickle=3.0.0=pyhd8ed1ab_0
- coin-or-cbc=2.10.10=h9002f0b_0
- coin-or-cgl=0.60.7=h516709c_0
- coin-or-clp=1.17.8=h1ee7a9c_0
- coin-or-osi=0.108.10=haf5fa05_0
- coin-or-utils=2.11.11=hee58242_0
- coincbc=2.10.10=0_metapackage
- colorama=0.4.6=pyhd8ed1ab_0
- conda-inject=1.3.1=pyhd8ed1ab_0
- configargparse=1.7=pyhd8ed1ab_0
- connection_pool=0.0.3=pyhd3deb0d_0
- contourpy=1.2.1=py311h9547e67_0
- country_converter=1.2=pyhd8ed1ab_0
- cppad=20240000.4=h59595ed_0
- cycler=0.12.1=pyhd8ed1ab_0
- cytoolz=0.12.3=py311h459d7ec_0
- dask=2024.4.2=pyhd8ed1ab_0
- dask-core=2024.4.2=pyhd8ed1ab_0
- dask-expr=1.0.14=pyhd8ed1ab_0
- datrie=0.8.2=py311h459d7ec_7
- dbus=1.13.6=h5008d03_3
- decorator=5.1.1=pyhd8ed1ab_0
- deprecation=2.1.0=pyh9f0ad1d_0
- descartes=1.1.0=py_4
- distlib=0.3.8=pyhd8ed1ab_0
- distributed=2024.4.2=pyhd8ed1ab_0
- distro=1.9.0=pyhd8ed1ab_0
- docutils=0.21.2=pyhd8ed1ab_0
- dpath=2.1.6=pyha770c72_0
- entsoe-py=0.6.7=pyhd8ed1ab_0
- et_xmlfile=1.1.0=pyhd8ed1ab_0
- exceptiongroup=1.2.0=pyhd8ed1ab_2
- executing=2.0.1=pyhd8ed1ab_0
- expat=2.6.2=h59595ed_0
- filelock=3.14.0=pyhd8ed1ab_0
- fiona=1.9.6=py311hf8e0aa6_0
- fmt=10.2.1=h00ab1b0_0
- folium=0.16.0=pyhd8ed1ab_0
- font-ttf-dejavu-sans-mono=2.37=hab24e00_0
- font-ttf-inconsolata=3.000=h77eed37_0
- font-ttf-source-code-pro=2.038=h77eed37_0
- font-ttf-ubuntu=0.83=h77eed37_2
- fontconfig=2.14.2=h14ed4e7_0
- fonts-conda-ecosystem=1=0
- fonts-conda-forge=1=0
- fonttools=4.51.0=py311h459d7ec_0
- freetype=2.12.1=h267a509_2
- freexl=2.0.0=h743c826_0
- fribidi=1.0.10=h36c2ea0_0
- fsspec=2024.3.1=pyhca7485f_0
- gdal=3.8.5=py311hd032c08_2
- gdk-pixbuf=2.42.11=hb9ae30d_0
- geographiclib=2.0=pyhd8ed1ab_0
- geojson-rewind=1.1.0=pyhd8ed1ab_0
- geopandas=0.14.4=pyhd8ed1ab_0
- geopandas-base=0.14.4=pyha770c72_0
- geopy=2.4.1=pyhd8ed1ab_1
- geos=3.12.1=h59595ed_0
- geotiff=1.7.1=h6cf1f90_16
- gettext=0.22.5=h59595ed_2
- gettext-tools=0.22.5=h59595ed_2
- gflags=2.2.2=he1b5a44_1004
- giflib=5.2.2=hd590300_0
- gitdb=4.0.11=pyhd8ed1ab_0
- gitpython=3.1.43=pyhd8ed1ab_0
- glib=2.80.0=hf2295e7_6
- glib-tools=2.80.0=hde27a5a_6
- glog=0.7.0=hed5481d_0
- glpk=5.0=h445213a_0
- gmp=6.3.0=h59595ed_1
- graphite2=1.3.13=h59595ed_1003
- graphviz=9.0.0=h78e8752_1
- gst-plugins-base=1.24.1=hfa15dee_2
- gstreamer=1.24.1=h98fc4e7_2
- gtk2=2.24.33=h280cfa0_4
- gts=0.7.6=h977cf35_4
- harfbuzz=8.4.0=h3d44ed6_0
- hdf4=4.2.15=h2a13503_7
- hdf5=1.14.3=nompi_h4f84152_101
- humanfriendly=10.0=pyhd8ed1ab_6
- icu=73.2=h59595ed_0
- identify=2.5.36=pyhd8ed1ab_0
- idna=3.7=pyhd8ed1ab_0
- immutables=0.20=py311h459d7ec_1
- importlib-metadata=7.1.0=pyha770c72_0
- importlib_metadata=7.1.0=hd8ed1ab_0
- importlib_resources=6.4.0=pyhd8ed1ab_0
- iniconfig=2.0.0=pyhd8ed1ab_0
- ipopt=3.14.16=hf967516_0
- ipython=8.22.2=pyh707e725_0
- jedi=0.19.1=pyhd8ed1ab_0
- jinja2=3.1.3=pyhd8ed1ab_0
- joblib=1.4.2=pyhd8ed1ab_0
- json-c=0.17=h7ab15ed_0
- jsonschema=4.22.0=pyhd8ed1ab_0
- jsonschema-specifications=2023.12.1=pyhd8ed1ab_0
- jupyter_core=5.7.2=py311h38be061_0
- kealib=1.5.3=h2f55d51_0
- keyutils=1.6.1=h166bdaf_0
- kiwisolver=1.4.5=py311h9547e67_1
- krb5=1.21.2=h659d440_0
- lame=3.100=h166bdaf_1003
- lcms2=2.16=hb7c19ff_0
- ld_impl_linux-64=2.40=h55db66e_0
- lerc=4.0.0=h27087fc_0
- libabseil=20240116.2=cxx17_h59595ed_0
- libaec=1.1.3=h59595ed_0
- libarchive=3.7.2=h2aa1ff5_1
- libarrow=15.0.2=hefa796f_6_cpu
- libarrow-acero=15.0.2=hbabe93e_6_cpu
- libarrow-dataset=15.0.2=hbabe93e_6_cpu
- libarrow-flight=15.0.2=hc4f8a93_6_cpu
- libarrow-flight-sql=15.0.2=he4f5ca8_6_cpu
- libarrow-gandiva=15.0.2=hc1954e9_6_cpu
- libarrow-substrait=15.0.2=he4f5ca8_6_cpu
- libasprintf=0.22.5=h661eb56_2
- libasprintf-devel=0.22.5=h661eb56_2
- libblas=3.9.0=22_linux64_openblas
- libboost-headers=1.84.0=ha770c72_2
- libbrotlicommon=1.1.0=hd590300_1
- libbrotlidec=1.1.0=hd590300_1
- libbrotlienc=1.1.0=hd590300_1
- libcap=2.69=h0f662aa_0
- libcblas=3.9.0=22_linux64_openblas
- libclang-cpp15=15.0.7=default_h127d8a8_5
- libclang13=18.1.4=default_h5d6823c_0
- libcrc32c=1.1.2=h9c3ff4c_0
- libcups=2.3.3=h4637d8d_4
- libcurl=8.7.1=hca28451_0
- libdeflate=1.20=hd590300_0
- libedit=3.1.20191231=he28a2e2_2
- libev=4.33=hd590300_2
- libevent=2.1.12=hf998b51_1
- libexpat=2.6.2=h59595ed_0
- libffi=3.4.2=h7f98852_5
- libflac=1.4.3=h59595ed_0
- libgcc-ng=13.2.0=h77fa898_6
- libgcrypt=1.10.3=hd590300_0
- libgd=2.3.3=h119a65a_9
- libgdal=3.8.5=hf9625ee_2
- libgettextpo=0.22.5=h59595ed_2
- libgettextpo-devel=0.22.5=h59595ed_2
- libgfortran-ng=13.2.0=h69a702a_6
- libgfortran5=13.2.0=h43f5ff8_6
- libglib=2.80.0=hf2295e7_6
- libgomp=13.2.0=h77fa898_6
- libgoogle-cloud=2.23.0=h9be4e54_1
- libgoogle-cloud-storage=2.23.0=hc7a4891_1
- libgpg-error=1.49=h4f305b6_0
- libgrpc=1.62.2=h15f2491_0
- libhwloc=2.9.3=default_h554bfaf_1009
- libiconv=1.17=hd590300_2
- libjpeg-turbo=3.0.0=hd590300_1
- libkml=1.3.0=h01aab08_1018
- liblapack=3.9.0=22_linux64_openblas
- liblapacke=3.9.0=22_linux64_openblas
- libllvm15=15.0.7=hb3ce162_4
- libllvm16=16.0.6=hb3ce162_3
- libllvm18=18.1.4=h2448989_0
- libnetcdf=4.9.2=nompi_h9612171_113
- libnghttp2=1.58.0=h47da74e_1
- libnl=3.9.0=hd590300_0
- libnsl=2.0.1=hd590300_0
- libogg=1.3.4=h7f98852_1
- libopenblas=0.3.27=pthreads_h413a1c8_0
- libopus=1.3.1=h7f98852_1
- libparquet=15.0.2=hacf5a1f_6_cpu
- libpng=1.6.43=h2797004_0
- libpq=16.2=h33b98f1_1
- libprotobuf=4.25.3=h08a7969_0
- libre2-11=2023.09.01=h5a48ba9_2
- librsvg=2.58.0=hadf69e7_1
- librttopo=1.1.0=h8917695_15
- libscotch=7.0.4=h91e35bf_1
- libsndfile=1.2.2=hc60ed4a_1
- libspatialindex=1.9.3=h9c3ff4c_4
- libspatialite=5.1.0=h6f065fc_5
- libspral=2024.01.18=h6aa6db2_0
- libsqlite=3.45.3=h2797004_0
- libssh2=1.11.0=h0841786_0
- libstdcxx-ng=13.2.0=hc0a3c3a_6
- libsystemd0=255=h3516f8a_1
- libthrift=0.19.0=hb90f79a_1
- libtiff=4.6.0=h1dd3fc0_3
- libutf8proc=2.8.0=h166bdaf_0
- libuuid=2.38.1=h0b41bf4_0
- libvorbis=1.3.7=h9c3ff4c_0
- libwebp=1.4.0=h2c329e2_0
- libwebp-base=1.4.0=hd590300_0
- libxcb=1.15=h0b41bf4_0
- libxcrypt=4.4.36=hd590300_1
- libxkbcommon=1.7.0=h662e7e4_0
- libxml2=2.12.6=h232c23b_2
- libxslt=1.1.39=h76b75d6_0
- libzip=1.10.1=h2629f0a_3
- libzlib=1.2.13=hd590300_5
- linopy=0.3.8=pyhd8ed1ab_0
- locket=1.0.0=pyhd8ed1ab_0
- lxml=5.2.1=py311hc0a218f_0
- lz4=4.3.3=py311h38e4bf4_0
- lz4-c=1.9.4=hcb278e6_0
- lzo=2.10=hd590300_1001
- mapclassify=2.6.1=pyhd8ed1ab_0
- markupsafe=2.1.5=py311h459d7ec_0
- matplotlib=3.8.4=py311h38be061_0
- matplotlib-base=3.8.4=py311h54ef318_0
- matplotlib-inline=0.1.7=pyhd8ed1ab_0
- memory_profiler=0.61.0=pyhd8ed1ab_0
- metis=5.1.0=h59595ed_1007
- minizip=4.0.5=h0ab5242_0
- mpfr=4.2.1=h9458935_1
- mpg123=1.32.6=h59595ed_0
- msgpack-python=1.0.7=py311h9547e67_0
- multiurl=0.3.1=pyhd8ed1ab_0
- mumps-include=5.6.2=ha770c72_4
- mumps-seq=5.6.2=hfef103a_4
- munkres=1.1.4=pyh9f0ad1d_0
- mysql-common=8.3.0=hf1915f5_4
- mysql-libs=8.3.0=hca2cd23_4
- nbformat=5.10.4=pyhd8ed1ab_0
- ncurses=6.4.20240210=h59595ed_0
- netcdf4=1.6.5=nompi_py311he8ad708_100
- networkx=3.3=pyhd8ed1ab_1
- nodeenv=1.8.0=pyhd8ed1ab_0
- nomkl=1.0=h5ca1d4c_0
- nspr=4.35=h27087fc_0
- nss=3.98=h1d7d5a4_0
- numexpr=2.9.0=py311h039bad6_100
- numpy=1.26.4=py311h64a7726_0
- openjdk=22.0.1=hb622114_0
- openjpeg=2.5.2=h488ebb8_0
- openpyxl=3.1.2=py311h459d7ec_1
- openssl=3.3.0=hd590300_0
- orc=2.0.0=h17fec99_1
- packaging=24.0=pyhd8ed1ab_0
- pandas=2.2.2=py311h320fe9a_0
- pango=1.52.2=ha41ecd1_0
- parso=0.8.4=pyhd8ed1ab_0
- partd=1.4.1=pyhd8ed1ab_0
- patsy=0.5.6=pyhd8ed1ab_0
- pcre2=10.43=hcad00b1_0
- pexpect=4.9.0=pyhd8ed1ab_0
- pickleshare=0.7.5=py_1003
- pillow=10.3.0=py311h18e6fac_0
- pip=24.0=pyhd8ed1ab_0
- pixman=0.43.2=h59595ed_0
- pkgutil-resolve-name=1.3.10=pyhd8ed1ab_1
- plac=1.4.3=pyhd8ed1ab_0
- platformdirs=4.2.1=pyhd8ed1ab_0
- pluggy=1.5.0=pyhd8ed1ab_0
- ply=3.11=pyhd8ed1ab_2
- poppler=24.04.0=hb6cd0d7_0
- poppler-data=0.4.12=hd8ed1ab_0
- postgresql=16.2=h82ecc9d_1
- powerplantmatching=0.5.14=pyhd8ed1ab_0
- pre-commit=3.7.0=pyha770c72_0
- progressbar2=4.4.2=pyhd8ed1ab_0
- proj=9.4.0=h1d62c97_1
- prompt-toolkit=3.0.42=pyha770c72_0
- psutil=5.9.8=py311h459d7ec_0
- pthread-stubs=0.4=h36c2ea0_1001
- ptyprocess=0.7.0=pyhd3deb0d_0
- pulp=2.8.0=py311h38be061_0
- pulseaudio-client=17.0=hb77b528_0
- pure_eval=0.2.2=pyhd8ed1ab_0
- py-cpuinfo=9.0.0=pyhd8ed1ab_0
- pyarrow=15.0.2=py311hd5e4297_6_cpu
- pyarrow-hotfix=0.6=pyhd8ed1ab_0
- pycountry=22.3.5=pyhd8ed1ab_0
- pycparser=2.22=pyhd8ed1ab_0
- pygments=2.17.2=pyhd8ed1ab_0
- pyomo=6.6.1=py311hb755f60_0
- pyparsing=3.1.2=pyhd8ed1ab_0
- pyproj=3.6.1=py311hb3a3e68_6
- pypsa=0.27.1=pyhd8ed1ab_0
- pyqt=5.15.9=py311hf0fb5b6_5
- pyqt5-sip=12.12.2=py311hb755f60_5
- pyscipopt=5.0.1=py311hb755f60_0
- pyshp=2.3.1=pyhd8ed1ab_0
- pysocks=1.7.1=pyha2e5f31_6
- pytables=3.9.2=py311h3e8b7c9_2
- pytest=8.2.0=pyhd8ed1ab_0
- python=3.11.9=hb806964_0_cpython
- python-dateutil=2.9.0=pyhd8ed1ab_0
- python-fastjsonschema=2.19.1=pyhd8ed1ab_0
- python-tzdata=2024.1=pyhd8ed1ab_0
- python-utils=3.8.2=pyhd8ed1ab_0
- python_abi=3.11=4_cp311
- pytz=2024.1=pyhd8ed1ab_0
- pyxlsb=1.0.10=pyhd8ed1ab_0
- pyyaml=6.0.1=py311h459d7ec_1
- qt-main=5.15.8=hc9dc06e_21
- rasterio=1.3.10=py311h375a7ea_0
- rdma-core=51.0=hd3aeb46_0
- re2=2023.09.01=h7f4b329_2
- readline=8.2=h8228510_1
- referencing=0.35.1=pyhd8ed1ab_0
- requests=2.31.0=pyhd8ed1ab_0
- reretry=0.11.8=pyhd8ed1ab_0
- rioxarray=0.15.5=pyhd8ed1ab_0
- rpds-py=0.18.0=py311h46250e7_0
- rtree=1.2.0=py311h3bb2b0f_0
- s2n=1.4.12=h06160fa_0
- scikit-learn=1.4.2=py311hc009520_0
- scip=9.0.0=hded5f35_4
- scipy=1.13.0=py311h64a7726_0
- scotch=7.0.4=h23d43cc_1
- seaborn=0.13.2=hd8ed1ab_2
- seaborn-base=0.13.2=pyhd8ed1ab_2
- setuptools=69.5.1=pyhd8ed1ab_0
- setuptools-scm=8.0.4=pyhd8ed1ab_1
- setuptools_scm=8.0.4=hd8ed1ab_1
- shapely=2.0.4=py311h2032efe_0
- sip=6.7.12=py311hb755f60_0
- six=1.16.0=pyh6c4a22f_0
- smart_open=7.0.4=pyhd8ed1ab_0
- smmap=5.0.0=pyhd8ed1ab_0
- snakemake-interface-common=1.17.2=pyhdfd78af_0
- snakemake-interface-executor-plugins=9.1.1=pyhdfd78af_0
- snakemake-interface-report-plugins=1.0.0=pyhdfd78af_0
- snakemake-interface-storage-plugins=3.2.2=pyhdfd78af_0
- snakemake-minimal=8.11.1=pyhdfd78af_0
- snappy=1.2.0=hdb0a2a9_1
- snuggs=1.4.7=py_0
- sortedcontainers=2.4.0=pyhd8ed1ab_0
- soupsieve=2.5=pyhd8ed1ab_1
- spdlog=1.13.0=hd2e6256_0
- sqlite=3.45.3=h2c6b66d_0
- stack_data=0.6.2=pyhd8ed1ab_0
- statsmodels=0.14.1=py311h1f0f07a_0
- stopit=1.1.2=py_0
- tabula-py=2.7.0=py311h38be061_1
- tabulate=0.9.0=pyhd8ed1ab_1
- tbb=2021.11.0=h00ab1b0_1
- tblib=3.0.0=pyhd8ed1ab_0
- threadpoolctl=3.5.0=pyhc1e730c_0
- throttler=1.2.2=pyhd8ed1ab_0
- tiledb=2.22.0=h27f064a_3
- tk=8.6.13=noxft_h4845f30_101
- toml=0.10.2=pyhd8ed1ab_0
- tomli=2.0.1=pyhd8ed1ab_0
- toolz=0.12.1=pyhd8ed1ab_0
- toposort=1.10=pyhd8ed1ab_0
- tornado=6.4=py311h459d7ec_0
- tqdm=4.66.2=pyhd8ed1ab_0
- traitlets=5.14.3=pyhd8ed1ab_0
- typing-extensions=4.11.0=hd8ed1ab_0
- typing_extensions=4.11.0=pyha770c72_0
- tzcode=2024a=h3f72095_0
- tzdata=2024a=h0c530f3_0
- ucx=1.15.0=ha691c75_8
- ukkonen=1.0.1=py311h9547e67_4
- unidecode=1.3.8=pyhd8ed1ab_0
- unixodbc=2.3.12=h661eb56_0
- uriparser=0.9.7=h59595ed_1
- urllib3=2.2.1=pyhd8ed1ab_0
- validators=0.28.1=pyhd8ed1ab_0
- virtualenv=20.26.1=pyhd8ed1ab_0
- wcwidth=0.2.13=pyhd8ed1ab_0
- wheel=0.43.0=pyhd8ed1ab_1
- wrapt=1.16.0=py311h459d7ec_0
- xarray=2024.3.0=pyhd8ed1ab_0
- xcb-util=0.4.0=hd590300_1
- xcb-util-image=0.4.0=h8ee46fc_1
- xcb-util-keysyms=0.4.0=h8ee46fc_1
- xcb-util-renderutil=0.3.9=hd590300_1
- xcb-util-wm=0.4.1=h8ee46fc_1
- xerces-c=3.2.5=hac6953d_0
- xkeyboard-config=2.41=hd590300_0
- xlrd=2.0.1=pyhd8ed1ab_3
- xorg-fixesproto=5.0=h7f98852_1002
- xorg-inputproto=2.3.2=h7f98852_1002
- xorg-kbproto=1.0.7=h7f98852_1002
- xorg-libice=1.1.1=hd590300_0
- xorg-libsm=1.2.4=h7391055_0
- xorg-libx11=1.8.9=h8ee46fc_0
- xorg-libxau=1.0.11=hd590300_0
- xorg-libxdmcp=1.1.3=h7f98852_0
- xorg-libxext=1.3.4=h0b41bf4_2
- xorg-libxfixes=5.0.3=h7f98852_1004
- xorg-libxi=1.7.10=h7f98852_0
- xorg-libxrender=0.9.11=hd590300_0
- xorg-libxt=1.3.0=hd590300_1
- xorg-libxtst=1.2.3=h7f98852_1002
- xorg-recordproto=1.14.2=h7f98852_1002
- xorg-renderproto=0.11.1=h7f98852_1002
- xorg-xextproto=7.3.0=h0b41bf4_1003
- xorg-xf86vidmodeproto=2.3.1=h7f98852_1002
- xorg-xproto=7.0.31=h7f98852_1007
- xyzservices=2024.4.0=pyhd8ed1ab_0
- xz=5.2.6=h166bdaf_0
- yaml=0.2.5=h7f98852_2
- yte=1.5.4=pyha770c72_0
- zict=3.0.0=pyhd8ed1ab_0
- zipp=3.17.0=pyhd8ed1ab_0
- zlib=1.2.13=hd590300_5
- zlib-ng=2.0.7=h0b41bf4_0
- zstd=1.5.5=hfc55251_0
- _libgcc_mutex=0.1
- _openmp_mutex=4.5
- affine=2.4.0
- alsa-lib=1.2.11
- ampl-mp=3.1.0
- amply=0.1.6
- appdirs=1.4.4
- argparse-dataclass=2.0.0
- asttokens=2.4.1
- atk-1.0=2.38.0
- atlite=0.2.12
- attr=2.5.1
- attrs=23.2.0
- aws-c-auth=0.7.22
- aws-c-cal=0.6.14
- aws-c-common=0.9.19
- aws-c-compression=0.2.18
- aws-c-event-stream=0.4.2
- aws-c-http=0.8.1
- aws-c-io=0.14.8
- aws-c-mqtt=0.10.4
- aws-c-s3=0.5.9
- aws-c-sdkutils=0.1.16
- aws-checksums=0.1.18
- aws-crt-cpp=0.26.9
- aws-sdk-cpp=1.11.329
- azure-core-cpp=1.11.1
- azure-identity-cpp=1.6.0
- azure-storage-blobs-cpp=12.10.0
- azure-storage-common-cpp=12.5.0
- beautifulsoup4=4.12.3
- blosc=1.21.5
- bokeh=3.4.1
- bottleneck=1.3.8
- branca=0.7.2
- brotli=1.1.0
- brotli-bin=1.1.0
- brotli-python=1.1.0
- bzip2=1.0.8
- c-ares=1.28.1
- c-blosc2=2.14.4
- ca-certificates=2024.2.2
- cads-api-client=1.0.3
- cairo=1.18.0
- cartopy=0.23.0
- cdsapi=0.7.0
- certifi=2024.2.2
- cffi=1.16.0
- cfgv=3.3.1
- cfitsio=4.4.0
- cftime=1.6.3
- charset-normalizer=3.3.2
- click=8.1.7
- click-plugins=1.1.1
- cligj=0.7.2
- cloudpickle=3.0.0
- coin-or-cbc=2.10.10
- coin-or-cgl=0.60.7
- coin-or-clp=1.17.8
- coin-or-osi=0.108.10
- coin-or-utils=2.11.11
- coincbc=2.10.10
- colorama=0.4.6
- conda-inject=1.3.1
- configargparse=1.7
- connection_pool=0.0.3
- contourpy=1.2.1
- country_converter=1.2
- cppad=20240000.4
- cycler=0.12.1
- cytoolz=0.12.3
- dask=2024.5.1
- dask-core=2024.5.1
- dask-expr=1.1.1
- datrie=0.8.2
- dbus=1.13.6
- decorator=5.1.1
- deprecation=2.1.0
- descartes=1.1.0
- distlib=0.3.8
- distributed=2024.5.1
- distro=1.9.0
- docutils=0.21.2
- dpath=2.1.6
- entsoe-py=0.6.7
- et_xmlfile=1.1.0
- exceptiongroup=1.2.0
- executing=2.0.1
- expat=2.6.2
- filelock=3.14.0
- fiona=1.9.6
- fmt=10.2.1
- folium=0.16.0
- font-ttf-dejavu-sans-mono=2.37
- font-ttf-inconsolata=3.000
- font-ttf-source-code-pro=2.038
- font-ttf-ubuntu=0.83
- fontconfig=2.14.2
- fonts-conda-ecosystem=1
- fonts-conda-forge=1
- fonttools=4.52.1
- freetype=2.12.1
- freexl=2.0.0
- fribidi=1.0.10
- fsspec=2024.5.0
- gdal=3.8.5
- gdk-pixbuf=2.42.12
- geographiclib=2.0
- geojson-rewind=1.1.0
- geopandas=0.14.4
- geopandas-base=0.14.4
- geopy=2.4.1
- geos=3.12.1
- geotiff=1.7.3
- gettext=0.22.5
- gettext-tools=0.22.5
- gflags=2.2.2
- giflib=5.2.2
- gitdb=4.0.11
- gitpython=3.1.43
- glib=2.80.2
- glib-tools=2.80.2
- glog=0.7.0
- glpk=5.0
- gmp=6.3.0
- graphite2=1.3.13
- graphviz=11.0.0
- gst-plugins-base=1.24.3
- gstreamer=1.24.3
- gtk2=2.24.33
- gts=0.7.6
- gurobi=11.0.2
- harfbuzz=8.5.0
- hdf4=4.2.15
- hdf5=1.14.3
- humanfriendly=10.0
- icu=73.2
- identify=2.5.36
- idna=3.7
- immutables=0.20
- importlib-metadata=7.1.0
- importlib_metadata=7.1.0
- importlib_resources=6.4.0
- iniconfig=2.0.0
- ipopt=3.14.16
- ipython=8.24.0
- jedi=0.19.1
- jinja2=3.1.4
- joblib=1.4.2
- json-c=0.17
- jsonschema=4.22.0
- jsonschema-specifications=2023.12.1
- jupyter_core=5.7.2
- kealib=1.5.3
- keyutils=1.6.1
- kiwisolver=1.4.5
- krb5=1.21.2
- lame=3.100
- lcms2=2.16
- ld_impl_linux-64=2.40
- lerc=4.0.0
- libabseil=20240116.2
- libaec=1.1.3
- libarchive=3.7.4
- libarrow=16.1.0
- libarrow-acero=16.1.0
- libarrow-dataset=16.1.0
- libarrow-substrait=16.1.0
- libasprintf=0.22.5
- libasprintf-devel=0.22.5
- libblas=3.9.0
- libboost-headers=1.85.0
- libbrotlicommon=1.1.0
- libbrotlidec=1.1.0
- libbrotlienc=1.1.0
- libcap=2.69
- libcblas=3.9.0
- libclang-cpp15=15.0.7
- libclang13=18.1.5
- libcrc32c=1.1.2
- libcups=2.3.3
- libcurl=8.8.0
- libdeflate=1.20
- libedit=3.1.20191231
- libev=4.33
- libevent=2.1.12
- libexpat=2.6.2
- libffi=3.4.2
- libflac=1.4.3
- libgcc-ng=13.2.0
- libgcrypt=1.10.3
- libgd=2.3.3
- libgdal=3.8.5
- libgettextpo=0.22.5
- libgettextpo-devel=0.22.5
- libgfortran-ng=13.2.0
- libgfortran5=13.2.0
- libglib=2.80.2
- libgomp=13.2.0
- libgoogle-cloud=2.24.0
- libgoogle-cloud-storage=2.24.0
- libgpg-error=1.49
- libgrpc=1.62.2
- libhwloc=2.9.3
- libiconv=1.17
- libjpeg-turbo=3.0.0
- libkml=1.3.0
- liblapack=3.9.0
- liblapacke=3.9.0
- libllvm15=15.0.7
- libllvm18=18.1.6
- libnetcdf=4.9.2
- libnghttp2=1.58.0
- libnsl=2.0.1
- libogg=1.3.4
- libopenblas=0.3.27
- libopus=1.3.1
- libparquet=16.1.0
- libpng=1.6.43
- libpq=16.3
- libprotobuf=4.25.3
- libre2-11=2023.09.01
- librsvg=2.58.0
- librttopo=1.1.0
- libscotch=7.0.4
- libsndfile=1.2.2
- libspatialindex=1.9.3
- libspatialite=5.1.0
- libspral=2024.01.18
- libsqlite=3.45.3
- libssh2=1.11.0
- libstdcxx-ng=13.2.0
- libsystemd0=255
- libthrift=0.19.0
- libtiff=4.6.0
- libutf8proc=2.8.0
- libuuid=2.38.1
- libvorbis=1.3.7
- libwebp=1.4.0
- libwebp-base=1.4.0
- libxcb=1.15
- libxcrypt=4.4.36
- libxkbcommon=1.7.0
- libxml2=2.12.7
- libxslt=1.1.39
- libzip=1.10.1
- libzlib=1.2.13
- linopy=0.3.9
- locket=1.0.0
- lxml=5.2.2
- lz4=4.3.3
- lz4-c=1.9.4
- lzo=2.10
- mapclassify=2.6.1
- markupsafe=2.1.5
- matplotlib=3.8.4
- matplotlib-base=3.8.4
- matplotlib-inline=0.1.7
- memory_profiler=0.61.0
- metis=5.1.0
- minizip=4.0.5
- mpfr=4.2.1
- mpg123=1.32.6
- msgpack-python=1.0.8
- multiurl=0.3.1
- mumps-include=5.7.1
- mumps-seq=5.7.1
- munkres=1.1.4
- mysql-common=8.3.0
- mysql-libs=8.3.0
- nbformat=5.10.4
- ncurses=6.5
- netcdf4=1.6.5
- networkx=3.3
- nodeenv=1.8.0
- nomkl=1.0
- nspr=4.35
- nss=3.100
- numexpr=2.9.0
- numpy=1.26.4
- openjdk=22.0.1
- openjpeg=2.5.2
- openpyxl=3.1.2
- openssl=3.3.0
- orc=2.0.1
- packaging=24.0
- pandas=2.2.2
- pango=1.52.2
- parso=0.8.4
- partd=1.4.2
- patsy=0.5.6
- pcre2=10.43
- pexpect=4.9.0
- pickleshare=0.7.5
- pillow=10.3.0
- pip=24.0
- pixman=0.43.2
- pkgutil-resolve-name=1.3.10
- plac=1.4.3
- platformdirs=4.2.2
- pluggy=1.5.0
- ply=3.11
- poppler=24.04.0
- poppler-data=0.4.12
- postgresql=16.3
- powerplantmatching=0.5.15
- pre-commit=3.7.1
- progressbar2=4.4.2
- proj=9.4.0
- prompt-toolkit=3.0.42
- psutil=5.9.8
- pthread-stubs=0.4
- ptyprocess=0.7.0
- pulp=2.8.0
- pulseaudio-client=17.0
- pure_eval=0.2.2
- py-cpuinfo=9.0.0
- pyarrow=16.1.0
- pyarrow-core=16.1.0
- pyarrow-hotfix=0.6
- pycountry=22.3.5
- pycparser=2.22
- pygments=2.18.0
- pyomo=6.6.1
- pyparsing=3.1.2
- pyproj=3.6.1
- pypsa=0.28.0
- pyqt=5.15.9
- pyqt5-sip=12.12.2
- pyscipopt=5.0.1
- pyshp=2.3.1
- pysocks=1.7.1
- pytables=3.9.2
- pytest=8.2.1
- python=3.11.9
- python-dateutil=2.9.0
- python-fastjsonschema=2.19.1
- python-tzdata=2024.1
- python-utils=3.8.2
- python_abi=3.11
- pytz=2024.1
- pyxlsb=1.0.10
- pyyaml=6.0.1
- qt-main=5.15.8
- rasterio=1.3.10
- re2=2023.09.01
- readline=8.2
- referencing=0.35.1
- requests=2.32.2
- reretry=0.11.8
- rioxarray=0.15.5
- rpds-py=0.18.1
- rtree=1.2.0
- s2n=1.4.15
- scikit-learn=1.5.0
- scip=9.0.1
- scipy=1.13.1
- scotch=7.0.4
- seaborn=0.13.2
- seaborn-base=0.13.2
- setuptools=70.0.0
- setuptools-scm=8.1.0
- setuptools_scm=8.1.0
- shapely=2.0.4
- sip=6.7.12
- six=1.16.0
- smart_open=7.0.4
- smmap=5.0.0
- snakemake-interface-common=1.17.2
- snakemake-interface-executor-plugins=9.1.1
- snakemake-interface-report-plugins=1.0.0
- snakemake-interface-storage-plugins=3.2.2
- snakemake-minimal=8.11.6
- snappy=1.2.0
- snuggs=1.4.7
- sortedcontainers=2.4.0
- soupsieve=2.5
- spdlog=1.13.0
- sqlite=3.45.3
- stack_data=0.6.2
- statsmodels=0.14.2
- stopit=1.1.2
- tabula-py=2.7.0
- tabulate=0.9.0
- tbb=2021.11.0
- tblib=3.0.0
- threadpoolctl=3.5.0
- throttler=1.2.2
- tiledb=2.23.0
- tk=8.6.13
- toml=0.10.2
- tomli=2.0.1
- toolz=0.12.1
- toposort=1.10
- tornado=6.4
- tqdm=4.66.4
- traitlets=5.14.3
- typing-extensions=4.11.0
- typing_extensions=4.11.0
- tzcode=2024a
- tzdata=2024a
- ukkonen=1.0.1
- unidecode=1.3.8
- unixodbc=2.3.12
- uriparser=0.9.8
- urllib3=2.2.1
- validators=0.28.2
- virtualenv=20.26.2
- wcwidth=0.2.13
- wheel=0.43.0
- wrapt=1.16.0
- xarray=2024.5.0
- xcb-util=0.4.0
- xcb-util-image=0.4.0
- xcb-util-keysyms=0.4.0
- xcb-util-renderutil=0.3.9
- xcb-util-wm=0.4.1
- xerces-c=3.2.5
- xkeyboard-config=2.41
- xlrd=2.0.1
- xorg-fixesproto=5.0
- xorg-inputproto=2.3.2
- xorg-kbproto=1.0.7
- xorg-libice=1.1.1
- xorg-libsm=1.2.4
- xorg-libx11=1.8.9
- xorg-libxau=1.0.11
- xorg-libxdmcp=1.1.3
- xorg-libxext=1.3.4
- xorg-libxfixes=5.0.3
- xorg-libxi=1.7.10
- xorg-libxrender=0.9.11
- xorg-libxt=1.3.0
- xorg-libxtst=1.2.3
- xorg-recordproto=1.14.2
- xorg-renderproto=0.11.1
- xorg-xextproto=7.3.0
- xorg-xf86vidmodeproto=2.3.1
- xorg-xproto=7.0.31
- xyzservices=2024.4.0
- xz=5.2.6
- yaml=0.2.5
- yte=1.5.4
- zict=3.0.0
- zipp=3.17.0
- zlib=1.2.13
- zlib-ng=2.0.7
- zstd=1.5.6
- pip:
- highspy==1.5.3
- oauthlib==3.2.2
- requests-oauthlib==1.3.1
- snakemake-executor-plugin-cluster-generic==1.0.9
- snakemake-executor-plugin-slurm==0.4.5
- snakemake-executor-plugin-slurm==0.5.1
- snakemake-executor-plugin-slurm-jobstep==0.2.1
- snakemake-storage-plugin-http==0.2.3
- tsam==2.3.1

View File

@ -1,6 +1,6 @@
# SPDX-FileCopyrightText: : 2017-2024 The PyPSA-Eur Authors
#
# SPDX-License-Identifier: MIT
# SPDX-License-Identifier: CC0-1.0
name: pypsa-eur
channels:
@ -11,7 +11,7 @@ dependencies:
- pip
- atlite>=0.2.9
- pypsa>=0.26.1
- pypsa>=0.28
- linopy
- dask
@ -20,15 +20,15 @@ dependencies:
- openpyxl!=3.1.1
- pycountry
- seaborn
- snakemake-minimal>=8.11
- snakemake-minimal>=8.14
- memory_profiler
- yaml
- pytables
- lxml
- powerplantmatching>=0.5.13
- powerplantmatching>=0.5.15
- numpy
- pandas>=2.1
- geopandas>=0.11.0
- geopandas>=0.11.0, <1
- xarray>=2023.11.0
- rioxarray
- netcdf4

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 975 KiB

View File

@ -58,7 +58,7 @@ rule build_powerplants:
logs("build_powerplants.log"),
threads: 1
resources:
mem_mb=5000,
mem_mb=7000,
conda:
"../envs/environment.yaml"
script:
@ -111,7 +111,7 @@ rule build_shapes:
nuts3=ancient("data/bundle/NUTS_2013_60M_SH/data/NUTS_RG_60M_2013.shp"),
nuts3pop=ancient("data/bundle/nama_10r_3popgdp.tsv.gz"),
nuts3gdp=ancient("data/bundle/nama_10r_3gdp.tsv.gz"),
ch_cantons=ancient("data/bundle/ch_cantons.csv"),
ch_cantons=ancient("data/ch_cantons.csv"),
ch_popgdp=ancient("data/bundle/je-e-21.03.02.xls"),
output:
country_shapes=resources("country_shapes.geojson"),
@ -153,27 +153,6 @@ if config["enable"].get("build_cutout", False):
"../scripts/build_cutout.py"
if config["enable"].get("build_natura_raster", False):
rule build_natura_raster:
input:
natura=ancient("data/bundle/natura/Natura2000_end2015.shp"),
cutout=lambda w: "cutouts/"
+ CDIR
+ config_provider("atlite", "default_cutout")(w)
+ ".nc",
output:
resources("natura.tiff"),
resources:
mem_mb=5000,
log:
logs("build_natura_raster.log"),
conda:
"../envs/environment.yaml"
script:
"../scripts/build_natura_raster.py"
rule build_ship_raster:
input:
ship_density="data/shipdensity_global.zip",
@ -201,7 +180,7 @@ rule determine_availability_matrix_MD_UA:
wdpa="data/WDPA.gpkg",
wdpa_marine="data/WDPA_WDOECM_marine.gpkg",
gebco=lambda w: (
"data/bundle/GEBCO_2014_2D.nc"
"data/bundle/gebco/GEBCO_2014_2D.nc"
if config_provider("renewable", w.technology)(w).get("max_depth")
else []
),
@ -214,7 +193,7 @@ rule determine_availability_matrix_MD_UA:
offshore_shapes=resources("offshore_shapes.geojson"),
regions=lambda w: (
resources("regions_onshore.geojson")
if w.technology in ("onwind", "solar")
if w.technology in ("onwind", "solar", "solar-hsat")
else resources("regions_offshore.geojson")
),
cutout=lambda w: "cutouts/"
@ -257,7 +236,7 @@ rule build_renewable_profiles:
base_network=resources("networks/base.nc"),
corine=ancient("data/bundle/corine/g250_clc06_V18_5.tif"),
natura=lambda w: (
resources("natura.tiff")
"data/bundle/natura/natura.tiff"
if config_provider("renewable", w.technology, "natura")(w)
else []
),
@ -268,8 +247,11 @@ rule build_renewable_profiles:
),
gebco=ancient(
lambda w: (
"data/bundle/GEBCO_2014_2D.nc"
if config_provider("renewable", w.technology)(w).get("max_depth")
"data/bundle/gebco/GEBCO_2014_2D.nc"
if (
config_provider("renewable", w.technology)(w).get("max_depth")
or config_provider("renewable", w.technology)(w).get("min_depth")
)
else []
)
),
@ -282,7 +264,7 @@ rule build_renewable_profiles:
offshore_shapes=resources("offshore_shapes.geojson"),
regions=lambda w: (
resources("regions_onshore.geojson")
if w.technology in ("onwind", "solar")
if w.technology in ("onwind", "solar", "solar-hsat")
else resources("regions_offshore.geojson")
),
cutout=lambda w: "cutouts/"
@ -403,6 +385,7 @@ rule add_electricity:
electricity=config_provider("electricity"),
conventional=config_provider("conventional"),
costs=config_provider("costs"),
foresight=config_provider("foresight"),
drop_leap_day=config_provider("enable", "drop_leap_day"),
input:
unpack(input_profile_tech),
@ -414,11 +397,11 @@ rule add_electricity:
else resources("networks/base.nc")
),
tech_costs=lambda w: resources(
f"costs_{config_provider('costs', 'year') (w)}.csv"
f"costs_{config_provider('costs', 'year')(w)}.csv"
),
regions=resources("regions_onshore.geojson"),
powerplants=resources("powerplants.csv"),
hydro_capacities=ancient("data/bundle/hydro_capacities.csv"),
hydro_capacities=ancient("data/hydro_capacities.csv"),
geth_hydro_capacities="data/geth2015_hydro_capacities.csv",
unit_commitment="data/unit_commitment.csv",
fuel_price=lambda w: (
@ -459,7 +442,7 @@ rule simplify_network:
input:
network=resources("networks/elec.nc"),
tech_costs=lambda w: resources(
f"costs_{config_provider('costs', 'year') (w)}.csv"
f"costs_{config_provider('costs', 'year')(w)}.csv"
),
regions_onshore=resources("regions_onshore.geojson"),
regions_offshore=resources("regions_offshore.geojson"),
@ -507,7 +490,7 @@ rule cluster_network:
else []
),
tech_costs=lambda w: resources(
f"costs_{config_provider('costs', 'year') (w)}.csv"
f"costs_{config_provider('costs', 'year')(w)}.csv"
),
output:
network=resources("networks/elec_s{simpl}_{clusters}.nc"),
@ -536,7 +519,7 @@ rule add_extra_components:
input:
network=resources("networks/elec_s{simpl}_{clusters}.nc"),
tech_costs=lambda w: resources(
f"costs_{config_provider('costs', 'year') (w)}.csv"
f"costs_{config_provider('costs', 'year')(w)}.csv"
),
output:
resources("networks/elec_s{simpl}_{clusters}_ec.nc"),
@ -571,7 +554,7 @@ rule prepare_network:
input:
resources("networks/elec_s{simpl}_{clusters}_ec.nc"),
tech_costs=lambda w: resources(
f"costs_{config_provider('costs', 'year') (w)}.csv"
f"costs_{config_provider('costs', 'year')(w)}.csv"
),
co2_price=lambda w: resources("co2_price.csv") if "Ept" in w.opts else [],
output:

View File

@ -287,12 +287,13 @@ rule build_energy_totals:
energy=config_provider("energy"),
input:
nuts3_shapes=resources("nuts3_shapes.geojson"),
co2="data/bundle-sector/eea/UNFCCC_v23.csv",
co2="data/bundle/eea/UNFCCC_v23.csv",
swiss="data/switzerland-new_format-all_years.csv",
swiss_transport="data/gr-e-11.03.02.01.01-cc.csv",
idees="data/bundle-sector/jrc-idees-2015",
idees="data/bundle/jrc-idees-2015",
district_heat_share="data/district_heat_share.csv",
eurostat="data/eurostat/eurostat-energy_balances-april_2023_edition",
eurostat="data/eurostat/Balances-April2023",
eurostat_households="data/eurostat/eurostat-household_energy_balances-february_2024.csv",
output:
energy_name=resources("energy_totals.csv"),
co2_name=resources("co2_totals.csv"),
@ -338,10 +339,10 @@ rule build_biomass_potentials:
"https://zenodo.org/records/10356004/files/ENSPRESO_BIOMASS.xlsx",
keep_local=True,
),
nuts2="data/bundle-sector/nuts/NUTS_RG_10M_2013_4326_LEVL_2.geojson", # https://gisco-services.ec.europa.eu/distribution/v2/nuts/download/#nuts21
nuts2="data/bundle/nuts/NUTS_RG_10M_2013_4326_LEVL_2.geojson", # https://gisco-services.ec.europa.eu/distribution/v2/nuts/download/#nuts21
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
nuts3_population=ancient("data/bundle/nama_10r_3popgdp.tsv.gz"),
swiss_cantons=ancient("data/bundle/ch_cantons.csv"),
swiss_cantons=ancient("data/ch_cantons.csv"),
swiss_population=ancient("data/bundle/je-e-21.03.02.xls"),
country_shapes=resources("country_shapes.geojson"),
output:
@ -416,7 +417,7 @@ rule build_sequestration_potentials:
rule build_salt_cavern_potentials:
input:
salt_caverns="data/bundle-sector/h2_salt_caverns_GWh_per_sqkm.geojson",
salt_caverns="data/bundle/h2_salt_caverns_GWh_per_sqkm.geojson",
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
regions_offshore=resources("regions_offshore_elec_s{simpl}_{clusters}.geojson"),
output:
@ -436,7 +437,7 @@ rule build_salt_cavern_potentials:
rule build_ammonia_production:
input:
usgs="data/bundle-sector/myb1-2017-nitro.xls",
usgs="data/bundle/myb1-2017-nitro.xls",
output:
ammonia_production=resources("ammonia_production.csv"),
threads: 1
@ -458,7 +459,7 @@ rule build_industry_sector_ratios:
ammonia=config_provider("sector", "ammonia", default=False),
input:
ammonia_production=resources("ammonia_production.csv"),
idees="data/bundle-sector/jrc-idees-2015",
idees="data/bundle/jrc-idees-2015",
output:
industry_sector_ratios=resources("industry_sector_ratios.csv"),
threads: 1
@ -508,8 +509,8 @@ rule build_industrial_production_per_country:
countries=config_provider("countries"),
input:
ammonia_production=resources("ammonia_production.csv"),
jrc="data/bundle-sector/jrc-idees-2015",
eurostat="data/eurostat/eurostat-energy_balances-april_2023_edition",
jrc="data/bundle/jrc-idees-2015",
eurostat="data/eurostat/Balances-April2023",
output:
industrial_production_per_country=resources(
"industrial_production_per_country.csv"
@ -564,7 +565,10 @@ rule build_industrial_distribution_key:
input:
regions_onshore=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
clustered_pop_layout=resources("pop_layout_elec_s{simpl}_{clusters}.csv"),
hotmaps_industrial_database="data/bundle-sector/Industrial_Database.csv",
hotmaps_industrial_database=storage(
"https://gitlab.com/hotmaps/industrial_sites/industrial_sites_Industrial_Database/-/raw/master/data/Industrial_Database.csv",
keep_local=True,
),
output:
industrial_distribution_key=resources(
"industrial_distribution_key_elec_s{simpl}_{clusters}.csv"
@ -652,7 +656,7 @@ rule build_industrial_energy_demand_per_country_today:
countries=config_provider("countries"),
industry=config_provider("industry"),
input:
jrc="data/bundle-sector/jrc-idees-2015",
jrc="data/bundle/jrc-idees-2015",
industrial_production_per_country=resources(
"industrial_production_per_country.csv"
),
@ -704,7 +708,7 @@ rule build_retro_cost:
countries=config_provider("countries"),
input:
building_stock="data/retro/data_building_stock.csv",
data_tabula="data/bundle-sector/retro/tabula-calculator-calcsetbuilding.csv",
data_tabula="data/bundle/retro/tabula-calculator-calcsetbuilding.csv",
air_temperature=resources("temp_air_total_elec_s{simpl}_{clusters}.nc"),
u_values_PL="data/retro/u_values_poland.csv",
tax_w="data/retro/electricity_taxes_eu.csv",
@ -780,8 +784,8 @@ rule build_transport_demand:
"pop_weighted_energy_totals_s{simpl}_{clusters}.csv"
),
transport_data=resources("transport_data.csv"),
traffic_data_KFZ="data/bundle-sector/emobility/KFZ__count",
traffic_data_Pkw="data/bundle-sector/emobility/Pkw__count",
traffic_data_KFZ="data/bundle/emobility/KFZ__count",
traffic_data_Pkw="data/bundle/emobility/Pkw__count",
temp_air_total=resources("temp_air_total_elec_s{simpl}_{clusters}.nc"),
output:
transport_demand=resources("transport_demand_s{simpl}_{clusters}.csv"),
@ -856,18 +860,79 @@ rule build_existing_heating_distribution:
"../scripts/build_existing_heating_distribution.py"
rule time_aggregation:
params:
time_resolution=config_provider("clustering", "temporal", "resolution_sector"),
drop_leap_day=config_provider("enable", "drop_leap_day"),
solver_name=config_provider("solving", "solver", "name"),
input:
network=resources("networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc"),
hourly_heat_demand_total=lambda w: (
resources("hourly_heat_demand_total_elec_s{simpl}_{clusters}.nc")
if config_provider("sector", "heating")(w)
else []
),
solar_thermal_total=lambda w: (
resources("solar_thermal_total_elec_s{simpl}_{clusters}.nc")
if config_provider("sector", "solar_thermal")(w)
else []
),
output:
snapshot_weightings=resources(
"snapshot_weightings_elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.csv"
),
threads: 1
resources:
mem_mb=5000,
log:
logs("time_aggregation_elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.log"),
benchmark:
benchmarks("time_aggregation_elec_s{simpl}_{clusters}_ec_l{ll}_{opts}")
conda:
"../envs/environment.yaml"
script:
"../scripts/time_aggregation.py"
def input_profile_offwind(w):
return {
f"profile_{tech}": resources(f"profile_{tech}.nc")
for tech in ["offwind-ac", "offwind-dc"]
for tech in ["offwind-ac", "offwind-dc", "offwind-float"]
if (tech in config_provider("electricity", "renewable_carriers")(w))
}
rule build_egs_potentials:
params:
snapshots=config_provider("snapshots"),
sector=config_provider("sector"),
costs=config_provider("costs"),
input:
egs_cost="data/egs_costs.json",
regions=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"),
air_temperature=(
resources("temp_air_total_elec_s{simpl}_{clusters}.nc")
if config_provider("sector", "enhanced_geothermal", "var_cf")
else []
),
output:
egs_potentials=resources("egs_potentials_s{simpl}_{clusters}.csv"),
egs_overlap=resources("egs_overlap_s{simpl}_{clusters}.csv"),
egs_capacity_factors=resources("egs_capacity_factors_s{simpl}_{clusters}.csv"),
threads: 1
resources:
mem_mb=2000,
log:
logs("build_egs_potentials_s{simpl}_{clusters}.log"),
conda:
"../envs/environment.yaml"
script:
"../scripts/build_egs_potentials.py"
rule prepare_sector_network:
params:
time_resolution=config_provider("clustering", "temporal", "resolution_sector"),
drop_leap_day=config_provider("enable", "drop_leap_day"),
co2_budget=config_provider("co2_budget"),
conventional_carriers=config_provider(
"existing_capacities", "conventional_carriers"
@ -888,6 +953,9 @@ rule prepare_sector_network:
unpack(input_profile_offwind),
**rules.cluster_gas_network.output,
**rules.build_gas_input_locations.output,
snapshot_weightings=resources(
"snapshot_weightings_elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.csv"
),
retro_cost=lambda w: (
resources("retro_cost_elec_s{simpl}_{clusters}.csv")
if config_provider("sector", "retrofitting", "retro_endogen")(w)
@ -912,7 +980,7 @@ rule prepare_sector_network:
else []
),
network=resources("networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc"),
eurostat="data/eurostat/eurostat-energy_balances-april_2023_edition",
eurostat="data/eurostat/Balances-April2023",
pop_weighted_energy_totals=resources(
"pop_weighted_energy_totals_s{simpl}_{clusters}.csv"
),
@ -925,7 +993,7 @@ rule prepare_sector_network:
avail_profile=resources("avail_profile_s{simpl}_{clusters}.csv"),
dsm_profile=resources("dsm_profile_s{simpl}_{clusters}.csv"),
co2_totals_name=resources("co2_totals.csv"),
co2="data/bundle-sector/eea/UNFCCC_v23.csv",
co2="data/bundle/eea/UNFCCC_v23.csv",
biomass_potentials=lambda w: (
resources(
"biomass_potentials_s{simpl}_{clusters}_"
@ -982,6 +1050,21 @@ rule prepare_sector_network:
if config_provider("sector", "solar_thermal")(w)
else []
),
egs_potentials=lambda w: (
resources("egs_potentials_s{simpl}_{clusters}.csv")
if config_provider("sector", "enhanced_geothermal", "enable")(w)
else []
),
egs_overlap=lambda w: (
resources("egs_overlap_s{simpl}_{clusters}.csv")
if config_provider("sector", "enhanced_geothermal", "enable")(w)
else []
),
egs_capacity_factors=lambda w: (
resources("egs_capacity_factors_s{simpl}_{clusters}.csv")
if config_provider("sector", "enhanced_geothermal", "enable")(w)
else []
),
output:
RESULTS
+ "prenetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",

View File

@ -199,6 +199,7 @@ rule make_summary:
energy=RESULTS + "csvs/energy.csv",
supply=RESULTS + "csvs/supply.csv",
supply_energy=RESULTS + "csvs/supply_energy.csv",
nodal_supply_energy=RESULTS + "csvs/nodal_supply_energy.csv",
prices=RESULTS + "csvs/prices.csv",
weighted_prices=RESULTS + "csvs/weighted_prices.csv",
market_values=RESULTS + "csvs/market_values.csv",
@ -229,12 +230,12 @@ rule plot_summary:
costs=RESULTS + "csvs/costs.csv",
energy=RESULTS + "csvs/energy.csv",
balances=RESULTS + "csvs/supply_energy.csv",
eurostat="data/eurostat/eurostat-energy_balances-april_2023_edition",
co2="data/bundle-sector/eea/UNFCCC_v23.csv",
eurostat="data/eurostat/Balances-April2023",
co2="data/bundle/eea/UNFCCC_v23.csv",
output:
costs=RESULTS + "graphs/costs.pdf",
energy=RESULTS + "graphs/energy.pdf",
balances=RESULTS + "graphs/balances-energy.pdf",
costs=RESULTS + "graphs/costs.svg",
energy=RESULTS + "graphs/energy.svg",
balances=RESULTS + "graphs/balances-energy.svg",
threads: 2
resources:
mem_mb=10000,

View File

@ -14,23 +14,27 @@ if config["enable"]["retrieve"] is False:
if config["enable"]["retrieve"] and config["enable"].get("retrieve_databundle", True):
datafiles = [
"ch_cantons.csv",
"je-e-21.03.02.xls",
"eez/World_EEZ_v8_2014.shp",
"hydro_capacities.csv",
"naturalearth/ne_10m_admin_0_countries.shp",
"NUTS_2013_60M_SH/data/NUTS_RG_60M_2013.shp",
"nama_10r_3popgdp.tsv.gz",
"nama_10r_3gdp.tsv.gz",
"corine/g250_clc06_V18_5.tif",
"eea/UNFCCC_v23.csv",
"nuts/NUTS_RG_10M_2013_4326_LEVL_2.geojson",
"myb1-2017-nitro.xls",
"emobility/KFZ__count",
"emobility/Pkw__count",
"h2_salt_caverns_GWh_per_sqkm.geojson",
"natura/natura.tiff",
"gebco/GEBCO_2014_2D.nc",
]
if not config.get("tutorial", False):
datafiles.extend(["natura/Natura2000_end2015.shp", "GEBCO_2014_2D.nc"])
rule retrieve_databundle:
output:
protected(expand("data/bundle/{file}", file=datafiles)),
expand("data/bundle/{file}", file=datafiles),
directory("data/bundle/jrc-idees-2015"),
log:
"logs/retrieve_databundle.log",
resources:
@ -41,13 +45,31 @@ if config["enable"]["retrieve"] and config["enable"].get("retrieve_databundle",
script:
"../scripts/retrieve_databundle.py"
rule retrieve_eurostat_data:
output:
directory("data/eurostat/Balances-April2023"),
log:
"logs/retrieve_eurostat_data.log",
retries: 2
script:
"../scripts/retrieve_eurostat_data.py"
rule retrieve_eurostat_household_data:
output:
"data/eurostat/eurostat-household_energy_balances-february_2024.csv",
log:
"logs/retrieve_eurostat_household_data.log",
retries: 2
script:
"../scripts/retrieve_eurostat_household_data.py"
if config["enable"]["retrieve"] and config["enable"].get("retrieve_cutout", True):
rule retrieve_cutout:
input:
storage(
"https://zenodo.org/record/6382570/files/{cutout}.nc",
"https://zenodo.org/records/6382570/files/{cutout}.nc",
),
output:
protected("cutouts/" + CDIR + "{cutout}.nc"),
@ -79,64 +101,6 @@ if config["enable"]["retrieve"] and config["enable"].get("retrieve_cost_data", T
"../scripts/retrieve_cost_data.py"
if config["enable"]["retrieve"] and config["enable"].get(
"retrieve_natura_raster", True
):
rule retrieve_natura_raster:
input:
storage(
"https://zenodo.org/record/4706686/files/natura.tiff",
keep_local=True,
),
output:
resources("natura.tiff"),
log:
logs("retrieve_natura_raster.log"),
resources:
mem_mb=5000,
retries: 2
run:
copyfile(input[0], output[0])
validate_checksum(output[0], input[0])
if config["enable"]["retrieve"] and config["enable"].get(
"retrieve_sector_databundle", True
):
datafiles = [
"eea/UNFCCC_v23.csv",
"switzerland-sfoe/switzerland-new_format.csv",
"nuts/NUTS_RG_10M_2013_4326_LEVL_2.geojson",
"myb1-2017-nitro.xls",
"Industrial_Database.csv",
"emobility/KFZ__count",
"emobility/Pkw__count",
"h2_salt_caverns_GWh_per_sqkm.geojson",
]
rule retrieve_sector_databundle:
output:
protected(expand("data/bundle-sector/{files}", files=datafiles)),
protected(directory("data/bundle-sector/jrc-idees-2015")),
log:
"logs/retrieve_sector_databundle.log",
retries: 2
conda:
"../envs/retrieve.yaml"
script:
"../scripts/retrieve_sector_databundle.py"
rule retrieve_eurostat_data:
output:
directory("data/eurostat/eurostat-energy_balances-april_2023_edition"),
log:
"logs/retrieve_eurostat_data.log",
retries: 2
script:
"../scripts/retrieve_eurostat_data.py"
if config["enable"]["retrieve"]:
datafiles = [
"IGGIELGN_LNGs.geojson",
@ -199,11 +163,11 @@ if config["enable"]["retrieve"]:
rule retrieve_ship_raster:
input:
storage(
"https://zenodo.org/record/6953563/files/shipdensity_global.zip",
"https://zenodo.org/records/10973944/files/shipdensity_global.zip",
keep_local=True,
),
output:
protected("data/shipdensity_global.zip"),
"data/shipdensity_global.zip",
log:
"logs/retrieve_ship_raster.log",
resources:
@ -221,7 +185,7 @@ if config["enable"]["retrieve"]:
rule download_copernicus_land_cover:
input:
storage(
"https://zenodo.org/record/3939050/files/PROBAV_LC100_global_v3.0.1_2019-nrt_Discrete-Classification-map_EPSG-4326.tif",
"https://zenodo.org/records/3939050/files/PROBAV_LC100_global_v3.0.1_2019-nrt_Discrete-Classification-map_EPSG-4326.tif",
),
output:
"data/Copernicus_LC100_global_v3.0.1_2019-nrt_Discrete-Classification-map_EPSG-4326.tif",
@ -285,7 +249,7 @@ if config["enable"]["retrieve"]:
zip="data/WDPA_shp.zip",
folder=directory("data/WDPA"),
output:
gpkg=protected("data/WDPA.gpkg"),
gpkg="data/WDPA.gpkg",
run:
shell("cp {input} {params.zip}")
shell("unzip -o {params.zip} -d {params.folder}")
@ -294,7 +258,7 @@ if config["enable"]["retrieve"]:
layer_path = (
f"/vsizip/{params.folder}/WDPA_{bYYYY}_Public_shp_{i}.zip"
)
print(f"Adding layer {i + 1} of 3 to combined output file.")
print(f"Adding layer {i+1} of 3 to combined output file.")
shell("ogr2ogr -f gpkg -update -append {output.gpkg} {layer_path}")
rule download_wdpa_marine:
@ -310,14 +274,14 @@ if config["enable"]["retrieve"]:
zip="data/WDPA_WDOECM_marine.zip",
folder=directory("data/WDPA_WDOECM_marine"),
output:
gpkg=protected("data/WDPA_WDOECM_marine.gpkg"),
gpkg="data/WDPA_WDOECM_marine.gpkg",
run:
shell("cp {input} {params.zip}")
shell("unzip -o {params.zip} -d {params.folder}")
for i in range(3):
# vsizip is special driver for directly working with zipped shapefiles in ogr2ogr
layer_path = f"/vsizip/{params.folder}/WDPA_WDOECM_{bYYYY}_Public_marine_shp_{i}.zip"
print(f"Adding layer {i + 1} of 3 to combined output file.")
print(f"Adding layer {i+1} of 3 to combined output file.")
shell("ogr2ogr -f gpkg -update -append {output.gpkg} {layer_path}")

View File

@ -65,7 +65,7 @@ rule add_brownfield:
H2_retrofit_capacity_per_CH4=config_provider(
"sector", "H2_retrofit_capacity_per_CH4"
),
threshold_capacity=config_provider("existing_capacities", " threshold_capacity"),
threshold_capacity=config_provider("existing_capacities", "threshold_capacity"),
snapshots=config_provider("snapshots"),
drop_leap_day=config_provider("enable", "drop_leap_day"),
carriers=config_provider("electricity", "renewable_carriers"),

View File

@ -67,7 +67,7 @@ def get_rdir(run):
return RDIR
def get_run_path(fn, dir, rdir, shared_resources):
def get_run_path(fn, dir, rdir, shared_resources, exclude_from_shared):
"""
Dynamically provide paths based on shared resources and filename.
@ -87,6 +87,8 @@ def get_run_path(fn, dir, rdir, shared_resources):
- If string is "base", special handling for shared "base" resources (see notes).
- If random string other than "base", this folder is used instead of the `rdir` keyword.
- If boolean, directly specifies if the resource is shared.
exclude_from_shared: list
List of filenames to exclude from shared resources. Only relevant if shared_resources is "base".
Returns
-------
@ -104,10 +106,12 @@ def get_run_path(fn, dir, rdir, shared_resources):
existing_wildcards = set(re.findall(pattern, fn))
irrelevant_wildcards = {"technology", "year", "scope", "kind"}
no_relevant_wildcards = not existing_wildcards - irrelevant_wildcards
no_elec_rule = not fn.startswith("networks/elec") and not fn.startswith(
"add_electricity"
not_shared_rule = (
not fn.startswith("networks/elec")
and not fn.startswith("add_electricity")
and not any(fn.startswith(ex) for ex in exclude_from_shared)
)
is_shared = no_relevant_wildcards and no_elec_rule
is_shared = no_relevant_wildcards and not_shared_rule
rdir = "" if is_shared else rdir
elif isinstance(shared_resources, str):
rdir = shared_resources + "/"
@ -121,7 +125,7 @@ def get_run_path(fn, dir, rdir, shared_resources):
return f"{dir}{rdir}{fn}"
def path_provider(dir, rdir, shared_resources):
def path_provider(dir, rdir, shared_resources, exclude_from_shared):
"""
Returns a partial function that dynamically provides paths based on shared
resources and the filename.
@ -132,7 +136,13 @@ def path_provider(dir, rdir, shared_resources):
A partial function that takes a filename as input and
returns the path to the file based on the shared_resources parameter.
"""
return partial(get_run_path, dir=dir, rdir=rdir, shared_resources=shared_resources)
return partial(
get_run_path,
dir=dir,
rdir=rdir,
shared_resources=shared_resources,
exclude_from_shared=exclude_from_shared,
)
def get_opt(opts, expr, flags=None):
@ -396,7 +406,7 @@ def mock_snakemake(
from snakemake.api import Workflow
from snakemake.common import SNAKEFILE_CHOICES
from snakemake.script import Snakemake
from snakemake.settings import (
from snakemake.settings.types import (
ConfigSettings,
DAGSettings,
ResourceSettings,
@ -707,7 +717,7 @@ def update_config_from_wildcards(config, w, inplace=True):
def get_checksum_from_zenodo(file_url):
parts = file_url.split("/")
record_id = parts[parts.index("record") + 1]
record_id = parts[parts.index("records") + 1]
filename = parts[-1]
response = requests.get(f"https://zenodo.org/api/records/{record_id}", timeout=30)
@ -746,7 +756,7 @@ def validate_checksum(file_path, zenodo_url=None, checksum=None):
>>> validate_checksum("/path/to/file", checksum="md5:abc123...")
>>> validate_checksum(
... "/path/to/file",
... zenodo_url="https://zenodo.org/record/12345/files/example.txt",
... zenodo_url="https://zenodo.org/records/12345/files/example.txt",
... )
If the checksum is invalid, an AssertionError will be raised.

View File

@ -107,20 +107,16 @@ def add_brownfield(n, n_p, year):
# already retrofitted capacity from gas -> H2
already_retrofitted = (
n.links.loc[h2_retrofitted_fixed_i, "p_nom"]
.rename(lambda x: x.split("-2")[0].replace(fr, to))
.rename(lambda x: x.split("-2")[0].replace(fr, to) + f"-{year}")
.groupby(level=0)
.sum()
)
remaining_capacity = (
pipe_capacity
- CH4_per_H2
* already_retrofitted.reindex(index=pipe_capacity.index).fillna(0)
)
remaining_capacity = pipe_capacity - CH4_per_H2 * already_retrofitted.reindex(
index=pipe_capacity.index
).fillna(0)
n.links.loc[gas_pipes_i, "p_nom"] = remaining_capacity
else:
new_pipes = n.links.carrier.isin(pipe_carrier) & (
n.links.build_year == year
)
new_pipes = n.links.carrier.isin(pipe_carrier) & (n.links.build_year == year)
n.links.loc[new_pipes, "p_nom"] = 0.0
n.links.loc[new_pipes, "p_nom_min"] = 0.0
@ -136,22 +132,20 @@ def disable_grid_expansion_if_limit_hit(n):
minimum and extendable is turned off; the corresponding global
constraint is then dropped.
"""
cols = {"cost": "capital_cost", "volume": "length"}
for limit_type in ["cost", "volume"]:
glcs = n.global_constraints.query(
f"type == 'transmission_expansion_{limit_type}_limit'"
)
types = {"expansion_cost": "capital_cost", "volume_expansion": "length"}
for limit_type in types:
glcs = n.global_constraints.query(f"type == 'transmission_{limit_type}_limit'")
for name, glc in glcs.iterrows():
total_expansion = (
(
n.lines.query("s_nom_extendable")
.eval(f"s_nom_min * {cols[limit_type]}")
.eval(f"s_nom_min * {types[limit_type]}")
.sum()
)
+ (
n.links.query("carrier == 'DC' and p_nom_extendable")
.eval(f"p_nom_min * {cols[limit_type]}")
.eval(f"p_nom_min * {types[limit_type]}")
.sum()
)
).sum()
@ -201,6 +195,7 @@ def adjust_renewable_profiles(n, input_profiles, params, year):
for carrier in params["carriers"]:
if carrier == "hydro":
continue
with xr.open_dataset(getattr(input_profiles, "profile_" + carrier)) as ds:
if ds.indexes["bus"].empty or "year" not in ds.indexes:
continue

View File

@ -46,7 +46,7 @@ Inputs
------
- ``resources/costs.csv``: The database of cost assumptions for all included technologies for specific years from various sources; e.g. discount rate, lifetime, investment (CAPEX), fixed operation and maintenance (FOM), variable operation and maintenance (VOM), fuel costs, efficiency, carbon-dioxide intensity.
- ``data/bundle/hydro_capacities.csv``: Hydropower plant store/discharge power capacities, energy storage capacity, and average hourly inflow by country.
- ``data/hydro_capacities.csv``: Hydropower plant store/discharge power capacities, energy storage capacity, and average hourly inflow by country.
.. image:: img/hydrocapacities.png
:scale: 34 %
@ -230,10 +230,9 @@ def load_costs(tech_costs, config, max_hours, Nyears=1.0):
costs.at["OCGT", "co2_emissions"] = costs.at["gas", "co2_emissions"]
costs.at["CCGT", "co2_emissions"] = costs.at["gas", "co2_emissions"]
costs.at["solar", "capital_cost"] = (
config["rooftop_share"] * costs.at["solar-rooftop", "capital_cost"]
+ (1 - config["rooftop_share"]) * costs.at["solar-utility", "capital_cost"]
)
costs.at["solar", "capital_cost"] = costs.at["solar-utility", "capital_cost"]
costs = costs.rename({"solar-utility single-axis tracking": "solar-hsat"})
def costs_for_storage(store, link1, link2=None, max_hours=1.0):
capital_cost = link1["capital_cost"] + max_hours * store["capital_cost"]
@ -271,7 +270,6 @@ def load_powerplants(ppl_fn):
"bioenergy": "biomass",
"ccgt, thermal": "CCGT",
"hard coal": "coal",
"natural gas": "OCGT",
}
return (
pd.read_csv(ppl_fn, index_col=0, dtype={"bus": "str"})
@ -450,8 +448,6 @@ def attach_conventional_generators(
fuel_price=None,
):
carriers = list(set(conventional_carriers) | set(extendable_carriers["Generator"]))
add_missing_carriers(n, carriers)
add_co2_emissions(n, costs, carriers)
# Replace carrier "natural gas" with the respective technology (OCGT or
# CCGT) to align with PyPSA names of "carriers" and avoid filtering "natural
@ -467,6 +463,11 @@ def attach_conventional_generators(
)
ppl["efficiency"] = ppl.efficiency.fillna(ppl.efficiency_r)
# reduce carriers to those in power plant dataset
carriers = list(set(carriers) & set(ppl.carrier.unique()))
add_missing_carriers(n, carriers)
add_co2_emissions(n, costs, carriers)
if unit_commitment is not None:
committable_attrs = ppl.carrier.isin(unit_commitment).to_frame("committable")
for attr in unit_commitment.index:
@ -883,12 +884,19 @@ if __name__ == "__main__":
estimate_renewable_caps = params.electricity["estimate_renewable_capacities"]
if estimate_renewable_caps["enable"]:
if params.foresight != "overnight":
logger.info(
"Skipping renewable capacity estimation because they are added later "
"in rule `add_existing_baseyear` with foresight mode 'myopic'."
)
else:
tech_map = estimate_renewable_caps["technology_mapping"]
expansion_limit = estimate_renewable_caps["expansion_limit"]
year = estimate_renewable_caps["year"]
if estimate_renewable_caps["from_opsd"]:
attach_OPSD_renewables(n, tech_map)
estimate_renewable_capacities(
n, year, tech_map, expansion_limit, params.countries
)

View File

@ -61,9 +61,9 @@ def add_existing_renewables(df_agg, costs):
Append existing renewables to the df_agg pd.DataFrame with the conventional
power plants.
"""
tech_map = {"solar": "PV", "onwind": "Onshore", "offwind": "Offshore"}
tech_map = {"solar": "PV", "onwind": "Onshore", "offwind-ac": "Offshore"}
countries = snakemake.config["countries"]
countries = snakemake.config["countries"] # noqa: F841
irena = pm.data.IRENASTAT().powerplant.convert_country_to_alpha2()
irena = irena.query("Country in @countries")
irena = irena.groupby(["Technology", "Country", "Year"]).Capacity.sum()
@ -109,12 +109,13 @@ def add_existing_renewables(df_agg, costs):
name = f"{node}-{carrier}-{year}"
capacity = nodal_df.loc[node, year]
if capacity > 0.0:
cost_key = carrier.split("-")[0]
df_agg.at[name, "Fueltype"] = carrier
df_agg.at[name, "Capacity"] = capacity
df_agg.at[name, "DateIn"] = year
df_agg.at[name, "lifetime"] = costs.at[carrier, "lifetime"]
df_agg.at[name, "lifetime"] = costs.at[cost_key, "lifetime"]
df_agg.at[name, "DateOut"] = (
year + costs.at[carrier, "lifetime"] - 1
year + costs.at[cost_key, "lifetime"] - 1
)
df_agg.at[name, "cluster_bus"] = node
@ -163,7 +164,7 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas
technology_to_drop = ["Pv", "Storage Technologies"]
# drop unused fueltyps and technologies
# drop unused fueltypes and technologies
df_agg.drop(df_agg.index[df_agg.Fueltype.isin(fueltype_to_drop)], inplace=True)
df_agg.drop(df_agg.index[df_agg.Technology.isin(technology_to_drop)], inplace=True)
df_agg.Fueltype = df_agg.Fueltype.map(rename_fuel)
@ -200,19 +201,19 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas
phased_out = df_agg[df_agg["DateOut"] < baseyear].index
df_agg.drop(phased_out, inplace=True)
older_assets = (df_agg.DateIn < min(grouping_years)).sum()
if older_assets:
newer_assets = (df_agg.DateIn > max(grouping_years)).sum()
if newer_assets:
logger.warning(
f"There are {older_assets} assets with build year "
f"before first power grouping year {min(grouping_years)}. "
f"There are {newer_assets} assets with build year "
f"after last power grouping year {max(grouping_years)}. "
"These assets are dropped and not considered."
"Consider to redefine the grouping years to keep them."
)
to_drop = df_agg[df_agg.DateIn < min(grouping_years)].index
to_drop = df_agg[df_agg.DateIn > max(grouping_years)].index
df_agg.drop(to_drop, inplace=True)
df_agg["grouping_year"] = np.take(
grouping_years[::-1], np.digitize(df_agg.DateIn, grouping_years[::-1])
grouping_years, np.digitize(df_agg.DateIn, grouping_years, right=True)
)
# calculate (adjusted) remaining lifetime before phase-out (+1 because assuming
@ -252,8 +253,10 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas
]
suffix = "-ac" if generator == "offwind" else ""
name_suffix = f" {generator}{suffix}-{grouping_year}"
name_suffix_by = f" {generator}{suffix}-{baseyear}"
asset_i = capacity.index + name_suffix
if generator in ["solar", "onwind", "offwind"]:
if generator in ["solar", "onwind", "offwind-ac"]:
cost_key = generator.split("-")[0]
# to consider electricity grid connection costs or a split between
# solar utility and rooftop as well, rather take cost assumptions
# from existing network than from the cost database
@ -269,9 +272,9 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas
# this is for the year 2020
if not already_build.empty:
n.generators.loc[already_build, "p_nom_min"] = capacity.loc[
already_build.str.replace(name_suffix, "")
].values
n.generators.loc[already_build, "p_nom"] = n.generators.loc[
already_build, "p_nom_min"
] = capacity.loc[already_build.str.replace(name_suffix, "")].values
new_capacity = capacity.loc[new_build.str.replace(name_suffix, "")]
if "m" in snakemake.wildcards.clusters:
@ -281,21 +284,13 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas
# for offshore the splitting only includes coastal regions
inv_ind = [
i
for i in inv_ind
if (i + name_suffix)
in n.generators.index.str.replace(
str(baseyear), str(grouping_year)
)
i for i in inv_ind if (i + name_suffix_by) in n.generators.index
]
p_max_pu = n.generators_t.p_max_pu[
[i + name_suffix for i in inv_ind]
]
p_max_pu.columns = [
i + name_suffix.replace(str(grouping_year), str(baseyear))
for i in inv_ind
[i + name_suffix_by for i in inv_ind]
]
p_max_pu.columns = [i + name_suffix for i in inv_ind]
n.madd(
"Generator",
@ -306,16 +301,14 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas
/ len(inv_ind), # split among regions in a country
marginal_cost=marginal_cost,
capital_cost=capital_cost,
efficiency=costs.at[generator, "efficiency"],
efficiency=costs.at[cost_key, "efficiency"],
p_max_pu=p_max_pu,
build_year=grouping_year,
lifetime=costs.at[generator, "lifetime"],
lifetime=costs.at[cost_key, "lifetime"],
)
else:
p_max_pu = n.generators_t.p_max_pu[
capacity.index + f" {generator}{suffix}-{baseyear}"
]
p_max_pu = n.generators_t.p_max_pu[capacity.index + name_suffix_by]
if not new_build.empty:
n.madd(
@ -327,10 +320,10 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas
p_nom=new_capacity,
marginal_cost=marginal_cost,
capital_cost=capital_cost,
efficiency=costs.at[generator, "efficiency"],
efficiency=costs.at[cost_key, "efficiency"],
p_max_pu=p_max_pu.rename(columns=n.generators.bus),
build_year=grouping_year,
lifetime=costs.at[generator, "lifetime"],
lifetime=costs.at[cost_key, "lifetime"],
)
else:
@ -441,7 +434,7 @@ def add_heating_capacities_installed_before_baseyear(
linear decommissioning of heating capacities from 2020 to 2045 is
currently assumed heating capacities split between residential and
services proportional to heating load in both 50% capacities
in rural busess 50% in urban buses
in rural buses 50% in urban buses
"""
logger.debug(f"Adding heating capacities installed before {baseyear}")
@ -449,8 +442,6 @@ def add_heating_capacities_installed_before_baseyear(
snakemake.input.existing_heating_distribution, header=[0, 1], index_col=0
)
techs = existing_heating.columns.get_level_values(1).unique()
for name in existing_heating.columns.get_level_values(0).unique():
name_type = "central" if name == "urban central" else "decentral"
@ -473,6 +464,11 @@ def add_heating_capacities_installed_before_baseyear(
else:
efficiency = costs.at[costs_name, "efficiency"]
too_large_grouping_years = [gy for gy in grouping_years if gy >= int(baseyear)]
if too_large_grouping_years:
logger.warning(
f"Grouping years >= baseyear are ignored. Dropping {too_large_grouping_years}."
)
valid_grouping_years = pd.Series(
[
int(grouping_year)
@ -482,12 +478,12 @@ def add_heating_capacities_installed_before_baseyear(
]
)
assert valid_grouping_years.is_monotonic_increasing
# get number of years of each interval
_years = (
valid_grouping_years.diff()
.shift(-1)
.fillna(baseyear - valid_grouping_years.iloc[-1])
)
_years = valid_grouping_years.diff()
# Fill NA from .diff() with value for the first interval
_years[0] = valid_grouping_years[0] - baseyear + default_lifetime
# Installation is assumed to be linear for the past
ratios = _years / _years.sum()
@ -605,13 +601,13 @@ if __name__ == "__main__":
snakemake = mock_snakemake(
"add_existing_baseyear",
configfiles="config/test/config.myopic.yaml",
configfiles="config/config.yaml",
simpl="",
clusters="37",
ll="v1.0",
clusters="20",
ll="v1.5",
opts="",
sector_opts="8760-T-H-B-I-A-dist1",
planning_horizons=2020,
sector_opts="none",
planning_horizons=2030,
)
configure_logging(snakemake)

View File

@ -246,6 +246,7 @@ if __name__ == "__main__":
attach_hydrogen_pipelines(n, costs, extendable_carriers)
sanitize_carriers(n, snakemake.config)
if "location" in n.buses:
sanitize_locations(n)
n.meta = dict(snakemake.config, **dict(wildcards=dict(snakemake.wildcards)))

View File

@ -272,14 +272,15 @@ def _add_links_from_tyndp(buses, links, links_tyndp, europe_shape):
if links_tyndp.empty:
return buses, links
tree = spatial.KDTree(buses[["x", "y"]])
tree_buses = buses.query("carrier=='AC'")
tree = spatial.KDTree(tree_buses[["x", "y"]])
_, ind0 = tree.query(links_tyndp[["x1", "y1"]])
ind0_b = ind0 < len(buses)
links_tyndp.loc[ind0_b, "bus0"] = buses.index[ind0[ind0_b]]
ind0_b = ind0 < len(tree_buses)
links_tyndp.loc[ind0_b, "bus0"] = tree_buses.index[ind0[ind0_b]]
_, ind1 = tree.query(links_tyndp[["x2", "y2"]])
ind1_b = ind1 < len(buses)
links_tyndp.loc[ind1_b, "bus1"] = buses.index[ind1[ind1_b]]
ind1_b = ind1 < len(tree_buses)
links_tyndp.loc[ind1_b, "bus1"] = tree_buses.index[ind1[ind1_b]]
links_tyndp_located_b = (
links_tyndp["bus0"].notnull() & links_tyndp["bus1"].notnull()
@ -569,7 +570,7 @@ def _set_countries_and_substations(n, config, country_shapes, offshore_shapes):
buses["substation_lv"] = (
lv_b & onshore_b & (~buses["under_construction"]) & has_connections_b
)
buses["substation_off"] = (offshore_b | (hv_b & onshore_b)) & (
buses["substation_off"] = ((hv_b & offshore_b) | (hv_b & onshore_b)) & (
~buses["under_construction"]
)
@ -895,7 +896,7 @@ def build_bus_shapes(n, country_shapes, offshore_shapes, countries):
shapes = pd.concat(onshore_regions, ignore_index=True)
return onshore_regions, offshore_regions, shapes
return onshore_regions, offshore_regions, shapes, offshore_shapes
def append_bus_shapes(n, shapes, type):
@ -949,7 +950,7 @@ if __name__ == "__main__":
snakemake.config,
)
onshore_regions, offshore_regions, shapes = build_bus_shapes(
onshore_regions, offshore_regions, shapes, offshore_shapes = build_bus_shapes(
n,
snakemake.input.country_shapes,
snakemake.input.offshore_shapes,

View File

@ -4,6 +4,21 @@
# SPDX-License-Identifier: MIT
"""
Build historical annual ammonia production per country in ktonNH3/a.
Inputs
-------
- ``data/bundle-sector/myb1-2017-nitro.xls``
Outputs
-------
- ``resources/ammonia_production.csv``
Description
-------
This functions takes data from the `Minerals Yearbook <https://www.usgs.gov/centers/national-minerals-information-center/nitrogen-statistics-and-information>`_ (June 2024) published by the US Geological Survey (USGS) and the National Minerals Information Center and extracts the annual ammonia production per country in ktonN/a. The data is converted to ktonNH3/a.
"""
import country_converter as coco

View File

@ -12,12 +12,11 @@ import logging
import geopandas as gpd
import numpy as np
import pandas as pd
from _helpers import configure_logging, set_scenario_config
logger = logging.getLogger(__name__)
AVAILABLE_BIOMASS_YEARS = [2010, 2020, 2030, 2040, 2050]
from _helpers import configure_logging, set_scenario_config
def build_nuts_population_data(year=2013):
pop = pd.read_csv(

View File

@ -17,20 +17,27 @@ assuming as an approximation energy content of wood pellets
@author: bw0928
"""
import platform
import pandas as pd
import tabula as tbl
ENERGY_CONTENT = 4.8 # unit MWh/t (wood pellets)
system = platform.system()
encoding = "cp1252" if system == "Windows" else None
def get_countries():
pandas_options = dict(skiprows=range(6), header=None, index_col=0)
pandas_options = dict(
skiprows=range(6), header=None, index_col=0, encoding=encoding
)
return tbl.read_pdf(
str(snakemake.input.transport_cost_data),
pages="145",
multiple_tables=False,
pandas_options=pandas_options,
encoding=encoding,
)[0].index
@ -41,6 +48,7 @@ def get_cost_per_tkm(page, countries):
sep=" |,",
engine="python",
index_col=False,
encoding=encoding,
)
sc = tbl.read_pdf(
@ -48,6 +56,7 @@ def get_cost_per_tkm(page, countries):
pages=page,
multiple_tables=False,
pandas_options=pandas_options,
encoding=encoding,
)[0]
sc.index = countries
sc.columns = sc.columns.str.replace("", "EUR")

View File

@ -6,11 +6,40 @@
Build coefficient of performance (COP) time series for air- or ground-sourced
heat pumps.
The COP is a function of the temperature difference between source and
sink.
The COP is approximated as a quatratic function of the temperature difference between source and
sink, based on Staffell et al. 2012.
The quadratic regression used is based on Staffell et al. (2012)
https://doi.org/10.1039/C2EE22653G.
This rule is executed in ``build_sector.smk``.
Relevant Settings
-----------------
.. code:: yaml
heat_pump_sink_T:
Inputs:
-------
- ``resources/<run_name>/temp_soil_total_elec_s<simpl>_<clusters>.nc``: Soil temperature (total) time series.
- ``resources/<run_name>/temp_soil_rural_elec_s<simpl>_<clusters>.nc``: Soil temperature (rural) time series.
- ``resources/<run_name>/temp_soil_urban_elec_s<simpl>_<clusters>.nc``: Soil temperature (urban) time series.
- ``resources/<run_name>/temp_air_total_elec_s<simpl>_<clusters>.nc``: Ambient air temperature (total) time series.
- ``resources/<run_name>/temp_air_rural_elec_s<simpl>_<clusters>.nc``: Ambient air temperature (rural) time series.
- ``resources/<run_name>/temp_air_urban_elec_s<simpl>_<clusters>.nc``: Ambient air temperature (urban) time series.
Outputs:
--------
- ``resources/cop_soil_total_elec_s<simpl>_<clusters>.nc``: COP (ground-sourced) time series (total).
- ``resources/cop_soil_rural_elec_s<simpl>_<clusters>.nc``: COP (ground-sourced) time series (rural).
- ``resources/cop_soil_urban_elec_s<simpl>_<clusters>.nc``: COP (ground-sourced) time series (urban).
- ``resources/cop_air_total_elec_s<simpl>_<clusters>.nc``: COP (air-sourced) time series (total).
- ``resources/cop_air_rural_elec_s<simpl>_<clusters>.nc``: COP (air-sourced) time series (rural).
- ``resources/cop_air_urban_elec_s<simpl>_<clusters>.nc``: COP (air-sourced) time series (urban).
References
----------
[1] Staffell et al., Energy & Environmental Science 11 (2012): A review of domestic heat pumps, https://doi.org/10.1039/C2EE22653G.
"""
import xarray as xr

View File

@ -3,13 +3,50 @@
#
# SPDX-License-Identifier: MIT
"""
Build heat demand time series using heating degree day (HDD) approximation.
This rule builds heat demand time series using heating degree day (HDD)
approximation.
Snapshots are resampled to daily time resolution and ``Atlite.convert.heat_demand`` is used to convert ambient temperature from the default weather cutout to heat demand time series for the respective cutout.
Heat demand is distributed by population to clustered onshore regions.
The rule is executed in ``build_sector.smk``.
.. seealso::
`Atlite.Cutout.heat_demand <https://atlite.readthedocs.io/en/master/ref_api.html#module-atlite.convert>`_
Relevant Settings
-----------------
.. code:: yaml
snapshots:
drop_leap_day:
Inputs
------
- ``resources/<run_name>/pop_layout_<scope>.nc``: Population layout (spatial population distribution).
- ``resources/<run_name>/regions_onshore_elec_s<simpl>_<clusters>.geojson``: Onshore region shapes.
- ``cutout``: Weather data cutout, as specified in config
Outputs
-------
- ``resources/daily_heat_demand_<scope>_elec_s<simpl>_<clusters>.nc``:
Relevant settings
-----------------
.. code:: yaml
atlite:
default_cutout``:
"""
import atlite
import geopandas as gpd
import numpy as np
import pandas as pd
import xarray as xr
from _helpers import get_snapshots, set_scenario_config
from dask.distributed import Client, LocalCluster

View File

@ -4,6 +4,29 @@
# SPDX-License-Identifier: MIT
"""
Build district heat shares at each node, depending on investment year.
Inputs:
-------
- `resources/<run_name>/pop_layout.csv`: Population layout for each node: Total, urban and rural population.
- `resources/<run_name>/district_heat_share.csv`: Historical district heat share at each country. Output of `scripts/build_energy_totals.py`.
Outputs:
--------
- `resources/<run_name>/district_heat_share.csv`: District heat share at each node, potential for each investment year.
Relevant settings:
------------------
.. code:: yaml
sector:
district_heating:
energy:
energy_totals_year:
Notes:
------
- The district heat share is calculated as the share of urban population at each node, multiplied by the share of district heating in the respective country.
- The `sector.district_heating.potential` setting defines the max. district heating share.
- The max. share of district heating is increased by a progress factor, depending on the investment year (See `sector.district_heating.progress` setting).
"""
import logging

View File

@ -0,0 +1,249 @@
# -*- coding: utf-8 -*-
# SPDX-FileCopyrightText: : 2023 @LukasFranken, The PyPSA-Eur Authors
#
# SPDX-License-Identifier: MIT
"""
This rule extracts potential and cost for electricity generation through
enhanced geothermal systems.
For this, we use data from "From hot rock to useful energy..." by Aghahosseini, Breyer (2020)
'https://doi.org/10.1016/j.apenergy.2020.115769'
Note that we input data used here is not the same as in the paper, but was passed on by the authors.
The data provides a lon-lat gridded map of Europe (1° x 1°), with each grid cell assigned
a heat potential (in GWh) and a cost (in EUR/MW).
This scripts overlays that map with the network's regions, and builds a csv with CAPEX, OPEX and p_nom_max
"""
import logging
logger = logging.getLogger(__name__)
import json
import geopandas as gpd
import numpy as np
import pandas as pd
import xarray as xr
from shapely.geometry import Polygon
def prepare_egs_data(egs_file):
"""
Processes the original .json file EGS data to a more human-readable format.
"""
with open(egs_file) as f:
jsondata = json.load(f)
def point_to_square(p, lon_extent=1.0, lat_extent=1.0):
try:
x, y = p.coords.xy[0][0], p.coords.xy[1][0]
except IndexError:
return p
return Polygon(
[
[x - lon_extent / 2, y - lat_extent / 2],
[x - lon_extent / 2, y + lat_extent / 2],
[x + lon_extent / 2, y + lat_extent / 2],
[x + lon_extent / 2, y - lat_extent / 2],
]
)
years = [2015, 2020, 2025, 2030, 2035, 2040, 2045, 2050]
lcoes = ["LCOE50", "LCOE100", "LCOE150"]
egs_data = dict()
for year in years:
df = pd.DataFrame(columns=["Lon", "Lat", "CAPEX", "HeatSust", "PowerSust"])
for lcoe in lcoes:
for country_data in jsondata[lcoe]:
try:
country_df = pd.DataFrame(
columns=df.columns,
index=range(len(country_data[0][years.index(year)]["Lon"])),
)
except TypeError:
country_df = pd.DataFrame(columns=df.columns, index=range(0))
for col in df.columns:
country_df[col] = country_data[0][years.index(year)][col]
if country_df.dropna().empty:
continue
elif df.empty:
df = country_df.dropna()
else:
df = pd.concat((df, country_df.dropna()), ignore_index=True)
gdf = gpd.GeoDataFrame(
df.drop(columns=["Lon", "Lat"]), geometry=gpd.points_from_xy(df.Lon, df.Lat)
).reset_index(drop=True)
gdf["geometry"] = gdf.geometry.apply(lambda geom: point_to_square(geom))
egs_data[year] = gdf
return egs_data
def prepare_capex(prepared_data):
"""
The source paper provides only data for year and regions where LCOE <
100Euro/MWh. However, this implementations starts with the costs for 2020
for all regions and then adjusts the costs according to the user's chosen
setting in the config file.
As such, for regions where cost data is available only from, say,
2035, we need to reverse-engineer the costs for 2020. This is done
in the following (unfortunately verbose) function.
"""
default_year = 2020
# obtains all available CAPEX data
capex_df = pd.DataFrame(columns=prepared_data.keys())
for year in capex_df.columns:
year_data = prepared_data[year].groupby("geometry").mean().reset_index()
for g in year_data.geometry:
if not g in year_data.geometry.tolist():
# weird but apparently necessary
continue
capex_df.loc[g, year] = year_data.loc[
year_data.geometry == g, "CAPEX"
].values[0]
capex_df = capex_df.loc[:, default_year:]
# fill up missing values assuming cost reduction factors similar to existing values
for sooner, later in zip(capex_df.columns[::-1][1:], capex_df.columns[::-1]):
missing_mask = capex_df[sooner].isna()
cr_factor = (
capex_df.loc[~missing_mask, later] / capex_df.loc[~missing_mask, sooner]
)
capex_df.loc[missing_mask, sooner] = (
capex_df.loc[missing_mask, later] / cr_factor.mean()
)
# harmonice capacity and CAPEX
p_nom_max = prepared_data[2050].groupby("geometry")["PowerSust"].mean()
p_nom_max = p_nom_max.loc[p_nom_max > 0]
capex_df = capex_df.loc[p_nom_max.index]
data = (
pd.concat((capex_df[default_year], p_nom_max), axis=1)
.reset_index()
.rename(columns={2020: "CAPEX"})
)
return gpd.GeoDataFrame(data, geometry=data.geometry)
def get_capacity_factors(network_regions_file, air_temperatures_file):
"""
Performance of EGS is higher for lower temperatures, due to more efficient
air cooling Data from Ricks et al.: The Role of Flexible Geothermal Power
in Decarbonized Elec Systems.
"""
# these values are taken from the paper's
# Supplementary Figure 20 from https://zenodo.org/records/7093330
# and relate deviations of the ambient temperature from the year-average
# ambient temperature to EGS capacity factors.
delta_T = [-15, -10, -5, 0, 5, 10, 15, 20]
cf = [1.17, 1.13, 1.07, 1, 0.925, 0.84, 0.75, 0.65]
x = np.linspace(-15, 20, 200)
y = np.interp(x, delta_T, cf)
upper_x = np.linspace(20, 25, 50)
m_upper = (y[-1] - y[-2]) / (x[-1] - x[-2])
upper_y = upper_x * m_upper - x[-1] * m_upper + y[-1]
lower_x = np.linspace(-20, -15, 50)
m_lower = (y[1] - y[0]) / (x[1] - x[0])
lower_y = lower_x * m_lower - x[0] * m_lower + y[0]
x = np.hstack((lower_x, x, upper_x))
y = np.hstack((lower_y, y, upper_y))
network_regions = gpd.read_file(network_regions_file).set_crs(epsg=4326)
index = network_regions["name"]
air_temp = xr.open_dataset(air_temperatures_file)
snapshots = pd.date_range(freq="h", **snakemake.params.snapshots)
capacity_factors = pd.DataFrame(index=snapshots)
# bespoke computation of capacity factors for each bus.
# Considering the respective temperatures, we compute
# the deviation from the average temperature and relate it
# to capacity factors based on the data from above.
for bus in index:
temp = air_temp.sel(name=bus).to_dataframe()["temperature"]
capacity_factors[bus] = np.interp((temp - temp.mean()).values, x, y)
return capacity_factors
if __name__ == "__main__":
if "snakemake" not in globals():
from _helpers import mock_snakemake
snakemake = mock_snakemake(
"build_egs_potentials",
simpl="",
clusters=37,
)
egs_config = snakemake.params["sector"]["enhanced_geothermal"]
costs_config = snakemake.params["costs"]
egs_data = prepare_egs_data(snakemake.input.egs_cost)
egs_data = prepare_capex(egs_data)
egs_regions = egs_data.geometry
network_regions = (
gpd.read_file(snakemake.input.regions)
.set_index("name", drop=True)
.set_crs(epsg=4326)
)
overlap_matrix = pd.DataFrame(
index=network_regions.index,
columns=egs_data.index,
)
for name, polygon in network_regions.geometry.items():
overlap_matrix.loc[name] = (
egs_regions.intersection(polygon).area
) / egs_regions.area
overlap_matrix.to_csv(snakemake.output["egs_overlap"])
# the share of heat that is replenished from the earth's core.
# we are not constraining ourselves to the sustainable share, but
# inversely apply it to our underlying data, which refers to the
# sustainable heat. Source: Relative magnitude of sustainable heat vs
# nonsustainable heat in the paper "From hot rock to useful energy..."
sustainability_factor = egs_config["sustainability_factor"]
egs_data["p_nom_max"] = egs_data["PowerSust"] / sustainability_factor
egs_data[["p_nom_max", "CAPEX"]].to_csv(snakemake.output["egs_potentials"])
capacity_factors = get_capacity_factors(
snakemake.input["regions"],
snakemake.input["air_temperature"],
)
capacity_factors.to_csv(snakemake.output["egs_capacity_factors"])

View File

@ -129,7 +129,7 @@ def copy_timeslice(load, cntry, start, stop, delta, fn_load=None):
load.loc[start:stop, cntry] = load.loc[
start - delta : stop - delta, cntry
].values
elif fn_load is not None:
elif fn_load is not None and cntry in load:
duration = pd.date_range(freq="h", start=start - delta, end=stop - delta)
load_raw = load_timeseries(fn_load, duration, [cntry])
load.loc[start:stop, cntry] = load_raw.loc[
@ -312,7 +312,7 @@ if __name__ == "__main__":
fn = snakemake.input.synthetic
synthetic_load = pd.read_csv(fn, index_col=0, parse_dates=True)
# "UA" does not appear in synthetic load data
countries = list(set(countries) - set(["UA"]))
countries = list(set(countries) - set(["UA", "MD"]))
synthetic_load = synthetic_load.loc[snapshots, countries]
load = load.combine_first(synthetic_load)

View File

@ -3,13 +3,45 @@
#
# SPDX-License-Identifier: MIT
"""
Build total energy demands per country using JRC IDEES, eurostat, and EEA data.
Build total energy demands and carbon emissions per country using JRC IDEES,
eurostat, and EEA data.
- Country-specific data is read in :func:`build_eurostat`, :func:`build_idees` and `build_swiss`.
- :func:`build_energy_totals` then combines energy data from Eurostat, Swiss, and IDEES data and :func:`rescale_idees_from_eurostat` rescales IDEES data to match Eurostat data.
- :func:`build_district_heat_share` calculates the share of district heating for each country from IDEES data.
- Historical CO2 emissions are calculated in :func:`build_eea_co2` and :func:`build_eurostat_co2` and combined in :func:`build_co2_totals`.
Relevant Settings
-----------------
.. code:: yaml
countries:
energy:
Inputs
------
- `resources/<run_name>/nuts3_shapes.gejson`: NUTS3 shapes.
- `data/bundle/eea_UNFCCC_v23.csv`: CO2 emissions data from EEA.
- `data/switzerland-new_format-all_years.csv`: Swiss energy data.
- `data/gr-e-11.03.02.01.01-cc.csv`: Swiss transport data
- `data/bundle/jrc-idees`: JRC IDEES data.
- `data/district_heat_share.csv`: District heating shares.
- `data/eurostat/Balances-April2023`: Eurostat energy balances.
- `data/eurostat/eurostat-household_energy_balances-february_2024.csv`: Eurostat household energy balances.
Outputs
-------
- `resources/<run_name>/energy_totals.csv`: Energy totals per country, sector and year.
- `resources/<run_name>/co2_totals.csv`: CO2 emissions per country, sector and year.
- `resources/<run_name>/transport_data.csv`: Transport data per country and year.
- `resources/<run_name>/district_heat_share.csv`: District heating share per by country and year.
"""
import logging
import multiprocessing as mp
import os
from functools import partial
from typing import List
import country_converter as coco
import geopandas as gpd
@ -23,16 +55,54 @@ logger = logging.getLogger(__name__)
idx = pd.IndexSlice
def cartesian(s1, s2):
def cartesian(s1: pd.Series, s2: pd.Series) -> pd.DataFrame:
"""
Cartesian product of two pd.Series.
Compute the Cartesian product of two pandas Series.
Parameters
----------
s1: pd.Series
The first pandas Series
s2: pd.Series:
The second pandas Series.
Returns
----------
pd.DataFrame
A DataFrame representing the Cartesian product of s1 and s2.
Examples
--------
>>> s1 = pd.Series([1, 2, 3], index=["a", "b", "c"])
>>> s2 = pd.Series([4, 5, 6], index=["d", "e", "f"])
>>> cartesian(s1, s2)
d e f
a 4 5 6
b 8 10 12
c 12 15 18
"""
return pd.DataFrame(np.outer(s1, s2), index=s1.index, columns=s2.index)
def reverse(dictionary):
def reverse(dictionary: dict) -> dict:
"""
Reverses a keys and values of a dictionary.
Reverses the keys and values of a dictionary.
Parameters
----------
dictionary : dict
The dictionary to be reversed.
Returns
-------
dict
A new dictionary with the keys and values reversed.
Examples
--------
>>> d = {"a": 1, "b": 2, "c": 3}
>>> reverse(d)
{1: 'a', 2: 'b', 3: 'c'}
"""
return {v: k for k, v in dictionary.items()}
@ -69,7 +139,28 @@ to_ipcc = {
}
def eurostat_per_country(input_eurostat, country):
def eurostat_per_country(input_eurostat: str, country: str) -> pd.DataFrame:
"""
Read energy balance data for a specific country from Eurostat.
Parameters
----------
input_eurostat : str
Path to the directory containing Eurostat data files.
country : str
Country code for the specific country.
Returns
-------
pd.DataFrame
Concatenated energy balance data for the specified country.
Notes
-----
- The function reads `<input_eurostat>/<country>.-Energy-balance-sheets-April-2023-edition.xlsb`
- It removes the "Cover" sheet from the data and concatenates all the remaining sheets into a single DataFrame.
"""
filename = (
f"{input_eurostat}/{country}-Energy-balance-sheets-April-2023-edition.xlsb"
)
@ -84,10 +175,38 @@ def eurostat_per_country(input_eurostat, country):
return pd.concat(sheet)
def build_eurostat(input_eurostat, countries, nprocesses=1, disable_progressbar=False):
def build_eurostat(
input_eurostat: str,
countries: List[str],
nprocesses: int = 1,
disable_progressbar: bool = False,
) -> pd.DataFrame:
"""
Return multi-index for all countries' energy data in TWh/a.
Parameters:
-----------
input_eurostat : str
Path to the Eurostat database.
countries : List[str]
List of countries for which energy data is to be retrieved.
nprocesses : int, optional
Number of processes to use for parallel execution, by default 1.
disable_progressbar : bool, optional
Whether to disable the progress bar, by default False.
Returns:
--------
pd.DataFrame
Multi-index DataFrame containing energy data for all countries in TWh/a.
Notes:
------
- The function first renames the countries in the input list using the `idees_rename` mapping and removes "CH".
- It then reads country-wise data using :func:`eurostat_per_country` into a single DataFrame.
- The data is reordered, converted to TWh/a, and missing values are filled.
"""
countries = {idees_rename.get(country, country) for country in countries} - {"CH"}
func = partial(eurostat_per_country, input_eurostat)
@ -125,7 +244,6 @@ def build_eurostat(input_eurostat, countries, nprocesses=1, disable_progressbar=
df = pd.concat([temp, df.loc[~int_avia]])
# Fill in missing data on "Domestic aviation" for each country.
domestic_avia = df.index.get_level_values(4) == "Domestic aviation"
for country in countries:
slicer = idx[country, :, :, :, "Domestic aviation"]
# For the Total and Fossil energy columns, fill in zeros with
@ -142,6 +260,7 @@ def build_eurostat(input_eurostat, countries, nprocesses=1, disable_progressbar=
"Domestic navigation": "Domestic Navigation",
"International maritime bunkers": "Bunkers",
"UK": "GB",
"EL": "GR",
}
columns_rename = {"Total": "Total all products"}
df.rename(index=index_rename, columns=columns_rename, inplace=True)
@ -153,9 +272,20 @@ def build_eurostat(input_eurostat, countries, nprocesses=1, disable_progressbar=
return df
def build_swiss():
def build_swiss() -> pd.DataFrame:
"""
Return a pd.DataFrame of Swiss energy data in TWh/a.
Returns
--------
pd.DataFrame
Swiss energy data in TWh/a.
Notes
-----
- Reads Swiss energy data from `data/switzerland-new_format-all_years.csv`.
- Reshapes and renames data.
- Converts energy units from PJ/a to TWh/a.
"""
fn = snakemake.input.swiss
@ -175,7 +305,29 @@ def build_swiss():
return df
def idees_per_country(ct, base_dir):
def idees_per_country(ct: str, base_dir: str) -> pd.DataFrame:
"""
Calculate energy totals per country using JRC-IDEES data.
Parameters
----------
ct : str
The country code.
base_dir : str
The base directory where the JRC-IDEES data files are located.
Returns
-------
pd.DataFrame
A DataFrame containing the energy totals per country. Columns are energy uses.
Notes
-----
- Retrieves JRC-IDEES data for the specified country from `base_dir` for residential, tertiary, and transport sectors.
- Calculates energy totals for each sector, stores them in a dictionary and returns them as data frame.
- Assertions ensure indices of JRC-IDEES data are as expected.
"""
ct_idees = idees_rename.get(ct, ct)
fn_residential = f"{base_dir}/JRC-IDEES-2015_Residential_{ct_idees}.xlsx"
fn_tertiary = f"{base_dir}/JRC-IDEES-2015_Tertiary_{ct_idees}.xlsx"
@ -373,7 +525,27 @@ def idees_per_country(ct, base_dir):
return pd.DataFrame(ct_totals)
def build_idees(countries):
def build_idees(countries: List[str]) -> pd.DataFrame:
"""
Build energy totals from IDEES database for the given list of countries
using :func:`idees_per_country`.
Parameters
----------
countries : List[str]
List of country names for which energy totals need to be built.
Returns
-------
pd.DataFrame
Energy totals for the given countries.
Notes
-----
- Retrieves energy totals per country and year using :func:`idees_per_country`.
- Returns a DataFrame with columns: country, year, and energy totals for different categories.
"""
nprocesses = snakemake.threads
disable_progress = snakemake.config["run"].get("disable_progressbar", False)
@ -395,17 +567,51 @@ def build_idees(countries):
names=["country", "year"],
)
# efficiency kgoe/100km -> ktoe/100km so that after conversion TWh/100km
totals.loc[:, "passenger car efficiency"] /= 1e6
# convert ktoe to TWh
exclude = totals.columns.str.fullmatch("passenger cars")
totals.loc[:, ~exclude] *= 11.63 / 1e3
# convert TWh/100km to kWh/km
totals.loc[:, "passenger car efficiency"] *= 10
return totals
def build_energy_totals(countries, eurostat, swiss, idees):
def build_energy_totals(
countries: List[str],
eurostat: pd.DataFrame,
swiss: pd.DataFrame,
idees: pd.DataFrame,
) -> pd.DataFrame:
"""
Combine energy totals for the specified countries from Eurostat, Swiss, and
IDEES data.
Parameters
----------
countries : List[str]
List of country codes for which energy totals are to be calculated.
eurostat : pd.DataFrame
Eurostat energy balances dataframe.
swiss : pd.DataFrame
Swiss energy data dataframe.
idees : pd.DataFrame
IDEES energy data dataframe.
Returns
-------
pd.DataFrame
Energy totals dataframe for the given countries.
Notes
-----
- Missing values are filled based on Eurostat energy balances and average values in EU28.
- The function also performs specific calculations for Norway and splits road, rail, and aviation traffic for non-IDEES data.
References
----------
- `Norway heating data <http://www.ssb.no/en/energi-og-industri/statistikker/husenergi/hvert-3-aar/2014-07-14>`_
"""
eurostat_fuels = {"electricity": "Electricity", "total": "Total all products"}
eurostat_countries = eurostat.index.levels[0]
eurostat_years = eurostat.index.levels[1]
@ -593,7 +799,30 @@ def build_energy_totals(countries, eurostat, swiss, idees):
return df
def build_district_heat_share(countries, idees):
def build_district_heat_share(countries: List[str], idees: pd.DataFrame) -> pd.Series:
"""
Calculate the share of district heating for each country.
Parameters
----------
countries : List[str]
List of country codes for which to calculate district heating share.
idees : pd.DataFrame
IDEES energy data dataframe.
Returns
-------
pd.Series
Series with the district heating share for each country.
Notes
-----
- The function calculates the district heating share as the sum of residential and services derived heat, divided by the sum of residential and services thermal uses.
- The district heating share is then reindexed to match the provided list of countries.
- Missing district heating shares are filled from `data/district_heat_share.csv`.
- The function makes a conservative assumption and takes the minimum district heating share from both the IDEES data and `data/district_heat_share.csv`.
"""
# district heating share
district_heat = idees[["derived heat residential", "derived heat services"]].sum(
axis=1
@ -627,9 +856,37 @@ def build_district_heat_share(countries, idees):
return district_heat_share
def build_eea_co2(input_co2, year=1990, emissions_scope="CO2"):
# https://www.eea.europa.eu/data-and-maps/data/national-emissions-reported-to-the-unfccc-and-to-the-eu-greenhouse-gas-monitoring-mechanism-16
# downloaded 201228 (modified by EEA last on 201221)
def build_eea_co2(
input_co2: str, year: int = 1990, emissions_scope: str = "CO2"
) -> pd.DataFrame:
"""
Calculate CO2 emissions for a given year based on EEA data in Mt.
Parameters
----------
input_co2 : str
Path to the input CSV file with CO2 data.
year : int, optional
Year for which to calculate emissions, by default 1990.
emissions_scope : str, optional
Scope of the emissions to consider, by default "CO2".
Returns
-------
pd.DataFrame
DataFrame with CO2 emissions for the given year.
Notes
-----
- The function reads the `input_co2` data and for a specific `year` and `emission scope`
- It calculates "industrial non-elec" and "agriculture" emissions from that data
- It drops unneeded columns and converts the emissions to Mt.
References
---------
- `EEA CO2 data <https://www.eea.europa.eu/data-and-maps/data/national-emissions-reported-to-the-unfccc-and-to-the-eu-greenhouse-gas-monitoring-mechanism-16>`_ (downloaded 201228, modified by EEA last on 201221)
"""
df = pd.read_csv(input_co2, encoding="latin-1", low_memory=False)
df.replace(dict(Year="1985-1987"), 1986, inplace=True)
@ -675,11 +932,43 @@ def build_eea_co2(input_co2, year=1990, emissions_scope="CO2"):
]
emissions.drop(columns=to_drop, inplace=True)
# convert from Gg to Mt
# convert from Gt to Mt
return emissions / 1e3
def build_eurostat_co2(eurostat, year=1990):
def build_eurostat_co2(eurostat: pd.DataFrame, year: int = 1990) -> pd.Series:
"""
Calculate CO2 emissions for a given year based on Eurostat fuel consumption
data and fuel-specific emissions.
Parameters
----------
eurostat : pd.DataFrame
DataFrame with Eurostat data.
year : int, optional
Year for which to calculate emissions, by default 1990.
Returns
-------
pd.Series
Series with CO2 emissions for the given year.
Notes
-----
- The function hard-sets fuel-specific emissions:
- solid fuels: 0.36 tCO2_equi/MW_th (approximates coal)
- oil: 0.285 tCO2_equi/MW_th (average of distillate and residue)
- natural gas: 0.2 tCO2_equi/MW_th
- It then multiplies the Eurostat fuel consumption data for `year` by the specific emissions and sums the result.
References
----------
- Oil values from `EIA <https://www.eia.gov/tools/faqs/faq.cfm?id=74&t=11>`_
- Distillate oil (No. 2) 0.276
- Residual oil (No. 6) 0.298
- `EIA Electricity Annual <https://www.eia.gov/electricity/annual/html/epa_a_03.html>`_
"""
eurostat_year = eurostat.xs(year, level="year")
specific_emissions = pd.Series(index=eurostat.columns, dtype=float)
@ -689,15 +978,34 @@ def build_eurostat_co2(eurostat, year=1990):
specific_emissions["Oil (total)"] = 0.285 # Average of distillate and residue
specific_emissions["Gas"] = 0.2 # For natural gas
# oil values from https://www.eia.gov/tools/faqs/faq.cfm?id=74&t=11
# Distillate oil (No. 2) 0.276
# Residual oil (No. 6) 0.298
# https://www.eia.gov/electricity/annual/html/epa_a_03.html
return eurostat_year.multiply(specific_emissions).sum(axis=1)
def build_co2_totals(countries, eea_co2, eurostat_co2):
def build_co2_totals(
countries: List[str], eea_co2: pd.DataFrame, eurostat_co2: pd.DataFrame
) -> pd.DataFrame:
"""
Combine CO2 emissions data from EEA and Eurostat for a list of countries.
Parameters
----------
countries : List[str]
List of country codes for which CO2 totals need to be built.
eea_co2 : pd.DataFrame
DataFrame with EEA CO2 emissions data.
eurostat_co2 : pd.DataFrame
DataFrame with Eurostat CO2 emissions data.
Returns
-------
pd.DataFrame
Combined CO2 emissions data for the given countries.
Notes
-----
- The function combines the CO2 emissions from EEA and Eurostat into a single DataFrame for the given countries.
"""
co2 = eea_co2.reindex(countries)
for ct in pd.Index(countries).intersection(["BA", "RS", "AL", "ME", "MK"]):
@ -724,9 +1032,38 @@ def build_co2_totals(countries, eea_co2, eurostat_co2):
return co2
def build_transport_data(countries, population, idees):
# first collect number of cars
def build_transport_data(
countries: List[str], population: pd.DataFrame, idees: pd.DataFrame
) -> pd.DataFrame:
"""
Build transport data for a set of countries based on IDEES data.
Parameters
----------
countries : List[str]
List of country codes.
population : pd.DataFrame
DataFrame with population data.
idees : pd.DataFrame
DataFrame with IDEES data.
Returns
-------
pd.DataFrame
DataFrame with transport data.
Notes
-----
- The function first collects the number of passenger cars.
- For Switzerland, it reads the data from `data/gr-e-11.03.02.01.01-cc.csv`.
- It fills missing data on the number of cars and fuel efficiency with average data.
References
----------
- Swiss transport data: `BFS <https://www.bfs.admin.ch/bfs/en/home/statistics/mobility-transport/transport-infrastructure-vehicles/vehicles/road-vehicles-stock-level-motorisation.html>`_
"""
# first collect number of cars
transport_data = pd.DataFrame(idees["passenger cars"])
countries_without_ch = set(countries) - {"CH"}
@ -737,7 +1074,6 @@ def build_transport_data(countries, population, idees):
transport_data = transport_data.reindex(index=new_index)
# https://www.bfs.admin.ch/bfs/en/home/statistics/mobility-transport/transport-infrastructure-vehicles/vehicles/road-vehicles-stock-level-motorisation.html
if "CH" in countries:
fn = snakemake.input.swiss_transport
swiss_cars = pd.read_csv(fn, index_col=0).loc[2000:2015, ["passenger cars"]]
@ -768,9 +1104,8 @@ def build_transport_data(countries, population, idees):
transport_data = transport_data.combine_first(fill_values)
# collect average fuel efficiency in kWh/km
transport_data["average fuel efficiency"] = idees["passenger car efficiency"]
# collect average fuel efficiency in MWh/100km, taking passengar car efficiency in TWh/100km
transport_data["average fuel efficiency"] = idees["passenger car efficiency"] * 1e6
missing = transport_data.index[transport_data["average fuel efficiency"].isna()]
if not missing.empty:
@ -785,16 +1120,38 @@ def build_transport_data(countries, population, idees):
def rescale_idees_from_eurostat(
idees_countries,
energy,
eurostat,
):
idees_countries: List[str], energy: pd.DataFrame, eurostat: pd.DataFrame
) -> pd.DataFrame:
"""
Takes JRC IDEES data from 2015 and rescales it by the ratio of the eurostat
data and the 2015 eurostat data.
Takes JRC IDEES data from 2015 and rescales it by the ratio of the Eurostat
data and the 2015 Eurostat data.
Missing data: ['passenger car efficiency', 'passenger cars']
missing data: ['passenger car efficiency', 'passenger cars']
Parameters
----------
idees_countries : List[str]
List of IDEES country codes.
energy : pd.DataFrame
DataFrame with JRC IDEES data.
eurostat : pd.DataFrame
DataFrame with Eurostat data.
Returns
-------
pd.DataFrame
DataFrame with rescaled IDEES data.
Notes
-----
- The function first reads in the Eurostat data for 2015 and calculates the ratio of that data with other Eurostat data.
- This ratio is mapped to the IDEES data.
References
----------
- JRC IDEES data: `JRC IDEES <https://ec.europa.eu/jrc/en/publication/eur-scientific-and-technical-research-reports/jrc-idees>`_
- Eurostat data: `Eurostat <https://ec.europa.eu/eurostat/data/database>`_
"""
main_cols = ["Total all products", "Electricity"]
# read in the eurostat data for 2015
eurostat_2015 = eurostat.xs(2015, level="year")[main_cols]
@ -854,6 +1211,7 @@ def rescale_idees_from_eurostat(
"total passenger cars",
"total other road passenger",
"total light duty road freight",
"total heavy duty road freight",
],
"elec": [
"electricity road",
@ -891,6 +1249,7 @@ def rescale_idees_from_eurostat(
navigation = [
"total domestic navigation",
]
# international navigation is already read in from the eurostat data directly
for country in idees_countries:
filling_years = [(2015, slice(2016, 2021)), (2000, slice(1990, 1999))]
@ -940,9 +1299,83 @@ def rescale_idees_from_eurostat(
energy.loc[slicer_source, navigation].squeeze(axis=0),
).values
# set the total of agriculture/road to the sum of all agriculture/road categories (corresponding to the IDEES data)
rows = idx[country, :]
cols = [
"total agriculture electricity",
"total agriculture heat",
"total agriculture machinery",
]
energy.loc[rows, "total agriculture"] = energy.loc[rows, cols].sum(axis=1)
cols = [
"total passenger cars",
"total other road passenger",
"total light duty road freight",
"total heavy duty road freight",
]
energy.loc[rows, "total road"] = energy.loc[rows, cols].sum(axis=1)
return energy
def update_residential_from_eurostat(energy: pd.DataFrame) -> pd.DataFrame:
"""
Updates energy balances for residential from disaggregated data from
Eurostat by mutating input data DataFrame.
Parameters
----------
energy : pd.DataFrame
DataFrame with energy data.
Returns
-------
pd.DataFrame
DataFrame with updated energy balances.
Notes
-----
- The function first reads in the Eurostat data for households and maps the energy types to the corresponding Eurostat codes.
- For each energy type, it selects the corresponding data, converts units, and drops unnecessary data.
"""
eurostat_households = pd.read_csv(snakemake.input.eurostat_households)
# Column mapping for energy type
nrg_type = {
"total residential": ("FC_OTH_HH_E", "TOTAL"),
"total residential space": ("FC_OTH_HH_E_SH", "TOTAL"),
"total residential water": ("FC_OTH_HH_E_WH", "TOTAL"),
"total residential cooking": ("FC_OTH_HH_E_CK", "TOTAL"),
"electricity residential": ("FC_OTH_HH_E", "E7000"),
"electricity residential space": ("FC_OTH_HH_E_SH", "E7000"),
"electricity residential water": ("FC_OTH_HH_E_WH", "E7000"),
"electricity residential cooking": ("FC_OTH_HH_E_CK", "E7000"),
}
for nrg_name, (code, siec) in nrg_type.items():
# Select energy balance type, rename columns and countries to match IDEES data,
# convert TJ to TWh, and drop XK data already since included in RS data
col_to_rename = {"geo": "country", "TIME_PERIOD": "year", "OBS_VALUE": nrg_name}
idx_to_rename = {v: k for k, v in idees_rename.items()}
drop_geo = ["EU27_2020", "EA20", "XK"]
nrg_data = eurostat_households.query(
"nrg_bal == @code and siec == @siec and geo not in @drop_geo and OBS_VALUE > 0"
).copy()
nrg_data.rename(columns=col_to_rename, inplace=True)
nrg_data = nrg_data.set_index(["country", "year"])[nrg_name] / 3.6e3
nrg_data.rename(index=idx_to_rename, inplace=True)
# update energy balance from household-specific eurostat data
idx = nrg_data.index.intersection(energy.index)
energy.loc[idx, nrg_name] = nrg_data[idx]
logger.info(
"Updated energy balances for residential using disaggregate final energy consumption data in Households from Eurostat"
)
if __name__ == "__main__":
if "snakemake" not in globals():
from _helpers import mock_snakemake
@ -976,6 +1409,8 @@ if __name__ == "__main__":
logger.info("Extrapolate IDEES data based on eurostat for years 2015-2021.")
energy = rescale_idees_from_eurostat(idees_countries, energy, eurostat)
update_residential_from_eurostat(energy)
energy.to_csv(snakemake.output.energy_name)
# use rescaled idees data to calculate district heat share

View File

@ -5,6 +5,38 @@
"""
Builds table of existing heat generation capacities for initial planning
horizon.
Existing heat generation capacities are distributed to nodes based on population.
Within the nodes, the capacities are distributed to sectors (residential and services) based on sectoral consumption and urban/rural based population distribution.
Inputs:
-------
- Existing heating generators: `data/existing_heating_raw.csv` per country
- Population layout: `resources/{run_name}/pop_layout_s<simpl>_<clusters>.csv`. Output of `scripts/build_clustered_population_layout.py`
- Population layout with energy demands: `resources/<run_name>/pop_weighted_energy_totals_s<simpl>_<clusters>.csv`
- District heating share: `resources/<run_name>/district_heat_share_elec_s<simpl>_<clusters>_<planning_horizons>.csv`
Outputs:
--------
- Existing heat generation capacities distributed to nodes: `resources/{run_name}/existing_heating_distribution_elec_s{simpl}_{clusters}_{planning_horizons}.csv`
Relevant settings:
------------------
.. code:: yaml
scenario:
planning_horizons
sector:
existing_capacities:
Notes:
------
- Data for Albania, Montenegro and Macedonia is not included in input database and assumed 0.
- Coal and oil boilers are assimilated to oil boilers.
- All ground-source heat pumps are assumed in rural areas and all air-source heat pumps are assumed to be in urban areas.
References:
-----------
- "Mapping and analyses of the current and future (2020 - 2030) heating/cooling fuel deployment (fossil/renewables)" (https://energy.ec.europa.eu/publications/mapping-and-analyses-current-and-future-2020-2030-heatingcooling-fuel-deployment-fossilrenewables-1_en)
"""
import country_converter as coco
import numpy as np
@ -55,7 +87,6 @@ def build_existing_heating():
nodal_heating = nodal_heating.multiply(pop_layout.fraction, axis=0)
district_heat_info = pd.read_csv(snakemake.input.district_heat_share, index_col=0)
dist_fraction = district_heat_info["district fraction of node"]
urban_fraction = district_heat_info["urban fraction"]
energy_layout = pd.read_csv(

View File

@ -4,6 +4,17 @@
# SPDX-License-Identifier: MIT
"""
Approximate heat demand for all weather years.
:func:`approximate_heat_demand` approximates annual heat demand based on energy totals and heating degree days (HDD) using a regression of heat demand on HDDs.
Inputs
------
- `resources/<run_name>/energy_totals.csv`: Energy consumption by sector (columns), country and year. Output of :func:`scripts.build_energy_totals.py`.
- `data/era5-annual-HDD-per-country.csv`: Number of heating degree days by year (columns) and country (index).
Outputs
-------
- `resources/<run_name>/heat_totals.csv`: Approximated annual heat demand for each country.
"""
from itertools import product
@ -14,7 +25,30 @@ from numpy.polynomial import Polynomial
idx = pd.IndexSlice
def approximate_heat_demand(energy_totals, hdd):
def approximate_heat_demand(energy_totals: pd.DataFrame, hdd: pd.DataFrame):
"""
Approximate heat demand for a set of countries based on energy totals and
heating degree days (HDD). A polynomial regression of heat demand on HDDs
is performed on the data from 2007 to 2021. Then, for 2022 and 2023, the
heat demand is estimated from known HDDs based on the regression.
Parameters
----------
energy_totals : pd.DataFrame
DataFrame with energy consumption by sector (columns), country and year. Output of :func:`scripts.build_energy_totals.py`.
hdd : pd.DataFrame
DataFrame with number of heating degree days by year (columns) and country (index).
Returns
-------
pd.DataFrame
DataFrame with approximated heat demand for each country.
Notes
-----
- Missing data is filled forward for GB in 2020 and backward for CH from 2007 to 2009.
- If only one year of heating data is available for a country, a point (0, 0) is added to make the polynomial fit work.
"""
countries = hdd.columns.intersection(energy_totals.index.levels[0])

View File

@ -3,7 +3,31 @@
#
# SPDX-License-Identifier: MIT
"""
Build hourly heat demand time series from daily ones.
Build hourly heat demand time series from daily heat demand.
Water and space heating demand profiles are generated using intraday profiles from BDEW. Different profiles are used for the residential and services sectors as well as weekdays and weekend.
The daily heat demand is multiplied by the intraday profile to obtain the hourly heat demand time series. The rule is executed in ``build_sector.smk``.
Relevant Settings
-----------------
.. code:: yaml
snapshots:
drop_leap_day:
Inputs
------
- ``data/heat_load_profile_BDEW.csv``: Intraday heat profile for water and space heating demand for the residential and services sectors for weekends and weekdays.
- ``resources/daily_heat_demand_<scope>_elec_s<simpl>_<clusters>.nc``: Daily heat demand per cluster.
Outputs
-------
- ``resources/hourly_heat_demand_<scope>_elec_s<simpl>_<clusters>.nc``:
"""
from itertools import product

View File

@ -139,7 +139,10 @@ def approximate_missing_eia_stats(eia_stats, runoff_fn, countries):
runoff.index = runoff.index.astype(int)
# fix outliers; exceptional floods in 1977-1979 in ES & PT
runoff.loc[1978, ["ES", "PT"]] = runoff.loc[1979, ["ES", "PT"]]
if "ES" in runoff:
runoff.loc[1978, "ES"] = runoff.loc[1979, "ES"]
if "PT" in runoff:
runoff.loc[1978, "PT"] = runoff.loc[1979, "PT"]
runoff_eia = runoff.loc[eia_stats.index]

View File

@ -4,6 +4,36 @@
# SPDX-License-Identifier: MIT
"""
Build spatial distribution of industries from Hotmaps database.
Inputs
-------
- ``resources/regions_onshore_elec_s{simpl}_{clusters}.geojson``
- ``resources/pop_layout_elec_s{simpl}_{clusters}.csv``
Outputs
-------
- ``resources/industrial_distribution_key_elec_s{simpl}_{clusters}.csv``
Description
-------
This rule uses the `Hotmaps database <https://gitlab.com/hotmaps/industrial_sites/industrial_sites_Industrial_Database>`. After removing entries without valid locations, it assigns each industrial site to a bus region based on its location.
Then, it calculates the nodal distribution key for each sector based on the emissions of the industrial sites in each region. This leads to a distribution key of 1 if there is only one bus per country and <1 if there are multiple buses per country. The sum over buses of one country is 1.
The following subcategories of industry are considered:
- Iron and steel
- Cement
- Refineries
- Paper and printing
- Chemical industry
- Glass
- Non-ferrous metals
- Non-metallic mineral products
- Other non-classified
Furthermore, the population distribution is added
- Population
"""
import logging

View File

@ -4,6 +4,60 @@
# SPDX-License-Identifier: MIT
"""
Build industrial energy demand per country.
Inputs
-------
- ``data/bundle/jrc-idees-2015``
- ``industrial_production_per_country.csv``
Outputs
-------
- ``resources/industrial_energy_demand_per_country_today.csv``
Description
-------
This rule uses the industrial_production_per_country.csv file and the JRC-IDEES data to derive an energy demand per country and sector. If the country is not in the EU28, an average energy demand depending on the production volume is derived.
For each country and each subcategory of
- Alumina production
- Aluminium - primary production
- Aluminium - secondary production
- Ammonia
- Cement
- Ceramics & other NMM
- Chlorine
- Electric arc
- Food, beverages and tobacco
- Glass production
- HVC
- Integrated steelworks
- Machinery Equipment
- Methanol
- Other Industrial Sectors
- Other chemicals
- Other non-ferrous metals
- Paper production
- Pharmaceutical products etc.
- Printing and media reproduction
- Pulp production
- Textiles and leather
- Transport Equipment
- Wood and wood products
the output file contains the energy demand in TWh/a for the following carriers
- biomass
- electricity
- gas
- heat
- hydrogen
- liquid
- other
- solid
- waste
"""
import multiprocessing as mp

View File

@ -4,6 +4,36 @@
# SPDX-License-Identifier: MIT
"""
Build industrial energy demand per model region.
Inputs
------
- ``resources/industrial_energy_demand_today_elec_s{simpl}_{clusters}.csv``
- ``resources/industry_sector_ratios_{planning_horizons}.csv``
- ``resources/industrial_production_elec_s{simpl}_{clusters}_{planning_horizons}.csv``
Outputs
-------
- ``resources/industrial_energy_demand_elec_s{simpl}_{clusters}_{planning_horizons}.csv``
Description
-------
This rule aggregates the energy demand of the industrial sectors per model region.
For each bus, the following carriers are considered:
- electricity
- coal
- coke
- solid biomass
- methane
- hydrogen
- low-temperature heat
- naphtha
- ammonia
- process emission
- process emission from feedstock
which can later be used as values for the industry load.
"""
import pandas as pd

View File

@ -4,6 +4,25 @@
# SPDX-License-Identifier: MIT
"""
Build industrial energy demand per model region.
Inputs
-------
- ``resources/industrial_distribution_key_elec_s{simpl}_{clusters}.csv``
- ``resources/industrial_energy_demand_per_country_today.csv``
Outputs
-------
- ``resources/industrial_energy_demand_per_node_today_elec_s{simpl}_{clusters}.csv``
Description
-------
This rule maps the industrial energy demand per country `industrial_energy_demand_per_country_today.csv` to each bus region.
The energy demand per country is multiplied by the mapping value from the file ``industrial_distribution_key_elec_s{simpl}_{clusters}.csv`` between 0 and 1 to get the industrial energy demand per bus.
The unit of the energy demand is TWh/a.
"""
from itertools import product

View File

@ -3,7 +3,62 @@
#
# SPDX-License-Identifier: MIT
"""
Build industrial production per country.
This rule builds the historical industrial production per country.
Relevant Settings
-----------------
.. code:: yaml
countries:
..
Inputs
-------
- ``resources/ammonia_production.csv``
- ``data/bundle-sector/jrc-idees-2015``
- ``data/eurostat``
Outputs
-------
- ``resources/industrial_production_per_country.csv``
Description
-------
The industrial production is taken from the `JRC-IDEES <https://joint-research-centre.ec.europa.eu/potencia-policy-oriented-tool-energy-and-climate-change-impact-assessment/jrc-idees_en)>`.
This dataset provides detailed information about the consumption of energy for various processes.
If the country is not part of the EU28, the energy consumption in the industrial sectors is taken from the `Eurostat <https://ec.europa.eu/eurostat/de/data/database>` dataset. The industrial production is calculated for the year specified in the config["industry"]["reference_year"].
The ammonia production is provided by the rule `build_ammonia_production <https://pypsa-eur.readthedocs.io/en/latest/sector.html#module-build_ammonia_production>`. Since Switzerland is not part of the EU28 nor reported by eurostat, the energy consumption in the industrial sectors is taken from the `BFE <https://www.bfe.admin.ch/bfe/de/home/versorgung/statistik-und-geodaten/energiestatistiken/energieverbrauch-nach-verwendungszweck.html> dataset.
After the industrial production is calculated, the basic chemicals are separated into ammonia, chlorine, methanol and HVC. The production of these chemicals is assumed to be proportional to the production of basic chemicals without ammonia.
The following subcategories [kton/a] are considered:
- Electric arc
- Integrated steelworks
- Other chemicals
- Pharmaceutical products etc.
- Cement
- Ceramics & other NMM
- Glass production
- Pulp production
- Paper production
- Printing and media reproduction
- Food, beverages and tobacco
- Alumina production
- Aluminium - primary production
- Aluminium - secondary production
- Other non-ferrous metals
- Transport Equipment
- Machinery Equipment
- Textiles and leather
- Wood and wood products
- Other Industrial Sectors
- Ammonia
- HVC
- Chlorine
- Methanol
"""
import logging

View File

@ -4,6 +4,59 @@
# SPDX-License-Identifier: MIT
"""
Build future industrial production per country.
Relevant Settings
-----------------
.. code:: yaml
industry:
St_primary_fraction:
DRI_fraction:
Al_primary_fraction:
HVC_primary_fraction:
HVC_mechanical_recycling_fraction:
HVC_chemical_recycling_fraction:
.. seealso::
Documentation of the configuration file ``config/config.yaml`` at
:ref:`industry`
Inputs
-------
- ``resources/industrial_production_per_country.csv``
Outputs
-------
- ``resources/industrial_production_per_country_tomorrow_{planning_horizons}.csv``
Description
-------
This rule uses the ``industrial_production_per_country.csv`` file and the expected recycling rates to calculate the future production of the industrial sectors.
**St_primary_fraction**
The fraction of steel that is coming from primary production. This is more energy intensive than recycling steel (secondary production).
**DRI_fraction**
The fraction of primary steel that is produced in DRI plants.
**Al_primary_fraction**
The fraction of aluminium that is coming from primary production. This is more energy intensive than recycling aluminium (secondary production).
**HVC_primary_fraction**
The fraction of high value chemicals that are coming from primary production (crude oil or Fischer Tropsch).
**HVC_mechanical_recycling_fraction**
The fraction of high value chemicals that are coming from mechanical recycling.
**HVC_chemical_recycling_fraction**
The fraction of high value chemicals that are coming from chemical recycling.
If not already present, the information is added as new column in the output file.
The unit of the production is kt/a.
"""
import pandas as pd

View File

@ -4,6 +4,25 @@
# SPDX-License-Identifier: MIT
"""
Build industrial production per model region.
Inputs
-------
- ``resources/industrial_distribution_key_elec_s{simpl}_{clusters}.csv``
- ``resources/industrial_production_per_country_tomorrow_{planning_horizons}.csv``
Outputs
-------
- ``resources/industrial_production_per_node_elec_s{simpl}_{clusters}_{planning_horizons}.csv``
Description
-------
This rule maps the industrial production per country from a certain time horizon to each bus region.
The mapping file provides a value between 0 and 1 for each bus and industry subcategory, indicating the share of the country's production of that sector in that bus.
The industrial production per country is multiplied by the mapping value to get the industrial production per bus.
The unit of the production is kt/a.
"""
from itertools import product

View File

@ -3,7 +3,49 @@
#
# SPDX-License-Identifier: MIT
"""
Build specific energy consumption by carrier and industries.
Build best case specific energy consumption by carrier and category.
Relevant Settings
-----------------
.. code:: yaml
industry:
ammonia:
..
Inputs
-------
- ``resources/ammonia_production.csv``
- ``data/bundle-sector/jrc-idees-2015``
Outputs
-------
- ``resources/industry_sector_ratios.csv``
Description
-------
This script uses the `JRC-IDEES <https://joint-research-centre.ec.europa.eu/potencia-policy-oriented-tool-energy-and-climate-change-impact-assessment/jrc-idees_en>` data to calculate an EU28 average specific energy consumption by carrier and industries.
The industries are according to the rule `industrial_production_per_country <https://pypsa-eur.readthedocs.io/en/latest/sector.html#module-build_industrial_production_per_country>`.
The following carriers are considered:
- elec
- coal
- coke
- biomass
- methane
- hydrogen
- heat
- naphtha
- process emission
- process emission from feedstock
- (ammonia)
If the `config["industry"]["ammonia"] <https://pypsa-eur.readthedocs.io/en/latest/configuration.html#industry>` is set to true the ammonia demand is not converted to hydrogen and electricity but is considered as a separate carrier.
The unit of the specific energy consumption is MWh/t material and tCO2/t material for process emissions.
"""
import pandas as pd
@ -68,6 +110,7 @@ index = [
"heat",
"naphtha",
"ammonia",
"methanol",
"process emission",
"process emission from feedstock",
]
@ -313,7 +356,7 @@ def chemicals_industry():
df.loc["methane", sector] += s_fec["Natural gas"]
# LPG and other feedstock materials are assimilated to naphtha
# since they will be produced through Fischer-Tropsh process
# since they will be produced through Fischer-Tropsch process
sel = [
"Solids",
"Refinery gas",
@ -456,8 +499,7 @@ def chemicals_industry():
sector = "Methanol"
df[sector] = 0.0
df.loc["methane", sector] = params["MWh_CH4_per_tMeOH"]
df.loc["elec", sector] = params["MWh_elec_per_tMeOH"]
df.loc["methanol", sector] = params["MWh_MeOH_per_tMeOH"]
# Other chemicals

View File

@ -6,6 +6,77 @@
Build specific energy consumption by carrier and industries and by country,
that interpolates between the current average energy consumption (from
2015-2020) and the ideal future best-in-class consumption.
Relevant Settings
-----------------
.. code:: yaml
industry:
sector_ratios_fraction_future:
ammonia:
Inputs
------
- ``resources/industry_sector_ratios.csv``
- ``resources/industrial_energy_demand_per_country_today.csv``
- ``resources/industrial_production_per_country.csv``
Outputs
-------
- ``resources/industry_sector_ratios_{planning_horizons}.csv``
Description
-------
The config["industry"]["sector_ratios_fraction_future"] parameter determines the progress towards the future best-in-class consumption.
For each bus, the following industry subcategories
- Electric arc
- DRI + Electric arc
- Integrated steelworks
- HVC
- HVC (mechanical recycling)
- HVC (chemical recycling)
- Ammonia
- Chlorine
- Methanol
- Other chemicals
- Pharmaceutical products etc.
- Cement
- Ceramics & other NMM
- Glass production
- Pulp production
- Paper production
- Printing and media reproduction
- Food, beverages and tobacco
- Alumina production
- Aluminium - primary production
- Aluminium - secondary production
- Other non-ferrous metals
- Transport Equipment
- Machinery Equipment
- Textiles and leather
- Wood and wood products
- Other Industrial Sectors
with the following carriers are considered:
- elec
- coal
- coke
- biomass
- methane
- hydrogen
- heat
- naphtha
- process emission
- process emission from feedstock
- (ammonia)
Unit of the output file is MWh/t.
"""
import pandas as pd
@ -51,11 +122,14 @@ def build_industry_sector_ratios_intermediate():
intermediate_sector_ratios = {}
for ct, group in today_sector_ratios.T.groupby(level=0):
today_sector_ratios_ct = (
group.droplevel(0)
.T.reindex_like(future_sector_ratios)
.fillna(future_sector_ratios)
)
today_sector_ratios_ct = group.droplevel(0).T.reindex_like(future_sector_ratios)
missing_mask = today_sector_ratios_ct.isna().all()
today_sector_ratios_ct.loc[:, missing_mask] = future_sector_ratios.loc[
:, missing_mask
]
today_sector_ratios_ct.loc[:, ~missing_mask] = today_sector_ratios_ct.loc[
:, ~missing_mask
].fillna(0)
intermediate_sector_ratios[ct] = (
today_sector_ratios_ct * (1 - fraction_future)
+ future_sector_ratios * fraction_future

View File

@ -55,7 +55,6 @@ import re
import atlite
import geopandas as gpd
import numpy as np
import pandas as pd
import pypsa
import xarray as xr
from _helpers import configure_logging, get_snapshots, set_scenario_config

View File

@ -1,118 +0,0 @@
# -*- coding: utf-8 -*-
# SPDX-FileCopyrightText: : 2017-2024 The PyPSA-Eur Authors
#
# SPDX-License-Identifier: MIT
"""
Rasters the vector data of the `Natura 2000.
<https://en.wikipedia.org/wiki/Natura_2000>`_ natural protection areas onto all
cutout regions.
Relevant Settings
-----------------
.. code:: yaml
renewable:
{technology}:
cutout:
.. seealso::
Documentation of the configuration file ``config/config.yaml`` at
:ref:`renewable_cf`
Inputs
------
- ``data/bundle/natura/Natura2000_end2015.shp``: `Natura 2000 <https://en.wikipedia.org/wiki/Natura_2000>`_ natural protection areas.
.. image:: img/natura.png
:scale: 33 %
Outputs
-------
- ``resources/natura.tiff``: Rasterized version of `Natura 2000 <https://en.wikipedia.org/wiki/Natura_2000>`_ natural protection areas to reduce computation times.
.. image:: img/natura.png
:scale: 33 %
Description
-----------
"""
import logging
import atlite
import geopandas as gpd
import rasterio as rio
from _helpers import configure_logging, set_scenario_config
from rasterio.features import geometry_mask
from rasterio.warp import transform_bounds
logger = logging.getLogger(__name__)
def determine_cutout_xXyY(cutout_name):
"""
Determine the full extent of a cutout.
Since the coordinates of the cutout data are given as the
center of the grid cells, the extent of the cutout is
calculated by adding/subtracting half of the grid cell size.
Parameters
----------
cutout_name : str
Path to the cutout.
Returns
-------
A list of extent coordinates in the order [x, X, y, Y].
"""
cutout = atlite.Cutout(cutout_name)
assert cutout.crs.to_epsg() == 4326
x, X, y, Y = cutout.extent
dx, dy = cutout.dx, cutout.dy
return [x - dx / 2.0, X + dx / 2.0, y - dy / 2.0, Y + dy / 2.0]
def get_transform_and_shape(bounds, res):
left, bottom = [(b // res) * res for b in bounds[:2]]
right, top = [(b // res + 1) * res for b in bounds[2:]]
shape = int((top - bottom) // res), int((right - left) / res)
transform = rio.Affine(res, 0, left, 0, -res, top)
return transform, shape
if __name__ == "__main__":
if "snakemake" not in globals():
from _helpers import mock_snakemake
snakemake = mock_snakemake("build_natura_raster")
configure_logging(snakemake)
set_scenario_config(snakemake)
x, X, y, Y = determine_cutout_xXyY(snakemake.input.cutout)
bounds = transform_bounds(4326, 3035, x, y, X, Y)
transform, out_shape = get_transform_and_shape(bounds, res=100)
# adjusted boundaries
shapes = gpd.read_file(snakemake.input.natura).to_crs(3035)
raster = ~geometry_mask(shapes.geometry, out_shape, transform)
raster = raster.astype(rio.uint8)
with rio.open(
snakemake.output[0],
"w",
driver="GTiff",
dtype=rio.uint8,
count=1,
transform=transform,
crs=3035,
compress="lzw",
width=raster.shape[1],
height=raster.shape[0],
) as dst:
dst.write(raster, indexes=1)

View File

@ -148,7 +148,11 @@ def add_everywhere_powerplants(ppl, substations, everywhere_powerplants):
def replace_natural_gas_technology(df):
mapping = {"Steam Turbine": "CCGT", "Combustion Engine": "OCGT"}
mapping = {
"Steam Turbine": "CCGT",
"Combustion Engine": "OCGT",
"Not Found": "CCGT",
}
tech = df.Technology.replace(mapping).fillna("CCGT")
return df.Technology.mask(df.Fueltype == "Natural Gas", tech)

View File

@ -26,7 +26,7 @@ Relevant settings
renewable:
{technology}:
cutout: corine: luisa: grid_codes: distance: natura: max_depth:
cutout: corine: luisa: grid_codes: distance: natura: max_depth: min_depth:
max_shore_distance: min_shore_distance: capacity_per_sqkm:
correction_factor: min_p_max_pu: clip_p_max_pu: resource:
@ -52,7 +52,7 @@ Inputs
CORINE land cover, see `Annex 1 of the technical documentation
<https://publications.jrc.ec.europa.eu/repository/bitstream/JRC124621/technical_report_luisa_basemap_2018_v7_final.pdf>`_.
- ``data/bundle/GEBCO_2014_2D.nc``: A `bathymetric
- ``data/bundle/gebco/GEBCO_2014_2D.nc``: A `bathymetric
<https://en.wikipedia.org/wiki/Bathymetry>`_ data set with a global terrain
model for ocean and land at 15 arc-second intervals by the `General
Bathymetric Chart of the Oceans (GEBCO)
@ -284,6 +284,12 @@ if __name__ == "__main__":
func = functools.partial(np.greater, -params["max_depth"])
excluder.add_raster(snakemake.input.gebco, codes=func, crs=4326, nodata=-1000)
if params.get("min_depth"):
func = functools.partial(np.greater, -params["min_depth"])
excluder.add_raster(
snakemake.input.gebco, codes=func, crs=4326, nodata=-1000, invert=True
)
if "min_shore_distance" in params:
buffer = params["min_shore_distance"]
excluder.add_geometry(snakemake.input.country_shapes, buffer=buffer)

Some files were not shown because too many files have changed in this diff Show More