Skip to content

Commit 26a26b5

Browse files
committed
Merge branch 'master' of github.com:pypsa/pypsa-eur-sec
2 parents df1bba0 + 341ee6a commit 26a26b5

File tree

12 files changed

+183
-77
lines changed

12 files changed

+183
-77
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: : 2021 The PyPSA-Eur Authors
1+
# SPDX-FileCopyrightText: : 2021-2023 The PyPSA-Eur Authors
22
#
33
# SPDX-License-Identifier: CC0-1.0
44

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright 2017-2021 The PyPSA-Eur Authors
3+
Copyright 2017-2023 The PyPSA-Eur Authors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

config.default.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 0.6.0
1+
version: 0.7.0
22

33
logging_level: INFO
44

@@ -510,6 +510,7 @@ plotting:
510510
natural gas: '#e05b09'
511511
CCGT: '#a85522'
512512
CCGT marginal: '#a85522'
513+
allam: '#B98F76'
513514
gas for industry co2 to atmosphere: '#692e0a'
514515
gas for industry co2 to stored: '#8a3400'
515516
gas for industry: '#853403'

doc/conf.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,17 @@
6363

6464
# General information about the project.
6565
project = u'PyPSA-Eur-Sec'
66-
copyright = u'2019-2021 Tom Brown (KIT, TUB), Marta Victoria (Aarhus University), Lisa Zeyen (KIT, TUB), Fabian Neumann (TUB)'
67-
author = u'2019-2021 Tom Brown (KIT, TUB), Marta Victoria (Aarhus University), Lisa Zeyen (KIT, TUB), Fabian Neumann (TUB)'
66+
copyright = u'2019-2023 Tom Brown (KIT, TUB), Marta Victoria (Aarhus University), Lisa Zeyen (KIT, TUB), Fabian Neumann (TUB)'
67+
author = u'2019-2023 Tom Brown (KIT, TUB), Marta Victoria (Aarhus University), Lisa Zeyen (KIT, TUB), Fabian Neumann (TUB)'
6868

6969
# The version info for the project you're documenting, acts as replacement for
7070
# |version| and |release|, also used in various other places throughout the
7171
# built documents.
7272
#
7373
# The short X.Y version.
74-
version = u'0.6'
74+
version = u'0.7'
7575
# The full version, including alpha/beta/rc tags.
76-
release = u'0.6.0'
76+
release = u'0.7.0'
7777

7878
# The language for content autogenerated by Sphinx. Refer to documentation
7979
# for a list of supported languages.

doc/data.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ existing heating potentials,existing_infrastructure/existing_heating_raw.csv,unk
1616
IRENA existing VRE capacities,existing_infrastructure/{solar|onwind|offwind}_capcity_IRENA.csv,unknown,https://www.irena.org/Statistics/Download-Data
1717
USGS ammonia production,myb1-2017-nitro.xls,unknown,https://www.usgs.gov/centers/nmic/nitrogen-statistics-and-information
1818
hydrogen salt cavern potentials,h2_salt_caverns_GWh_per_sqkm.geojson,CC BY 4.0,https://doi.org/10.1016/j.ijhydene.2019.12.161 https://doi.org/10.20944/preprints201910.0187.v1
19+
international port trade volumes,attributed_ports.json,CC BY 4.0,https://datacatalog.worldbank.org/search/dataset/0038118/Global---International-Ports
1920
hotmaps industrial site database,Industrial_Database.csv,CC BY 4.0,https://gitlab.com/hotmaps/industrial_sites/industrial_sites_Industrial_Database
2021
Hotmaps building stock data,data_building_stock.csv,CC BY 4.0,https://gitlab.com/hotmaps/building-stock
2122
U-values Poland,u_values_poland.csv,unknown,https://data.europa.eu/euodp/de/data/dataset/building-stock-observatory

doc/index.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,15 @@ Ministry for Education and Research (BMBF) <https://www.bmbf.de/en/index.html>`_
9797
as part of the `Stromnetze Research Initiative
9898
<http://forschung-stromnetze.info/projekte/grundlagen-und-konzepte-fuer-effiziente-dezentrale-stromnetze/>`_.
9999

100+
Workflow Outline
101+
================
102+
103+
.. image:: ../graphics/workflow.png
104+
105+
.. note::
106+
The graph above was generated using
107+
``snakemake --rulegraph -F | sed -n "/digraph/,/}/p" | dot -Tpng -o workflow.png``
108+
100109

101110
Documentation
102111
=============

doc/release_notes.rst

Lines changed: 153 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,49 @@ Future release
88
.. note::
99
This unreleased version currently may require the master branches of PyPSA, PyPSA-Eur, and the technology-data repository.
1010

11-
This release includes the addition of the European gas transmission network and
12-
incorporates retrofitting options to hydrogen.
11+
* new feature
12+
13+
14+
PyPSA-Eur-Sec 0.7.0 (16th February 2023)
15+
========================================
16+
17+
This release includes many new features. Highlights include new gas
18+
infrastructure data with retrofitting options for hydrogen transport, improved
19+
carbon management and infrastructure planning, regionalised potentials for
20+
hydrogen underground storage and carbon sequestration, new applications for
21+
biomass, and explicit modelling of methanol and ammonia as separate energy
22+
carriers.
23+
24+
This release is known to work with `PyPSA-Eur
25+
<https://github.com/PyPSA/pypsa-eur>`_ Version 0.7.0 and `Technology Data
26+
<https://github.com/PyPSA/technology-data>`_ Version 0.5.0.
1327

1428
**Gas Transmission Network**
1529

1630
* New rule ``retrieve_gas_infrastructure_data`` that downloads and extracts the
17-
SciGRID_gas `IGGIELGN <https://zenodo.org/record/4767098>`_ dataset from zenodo.
18-
It includes data on the transmission routes, pipe diameters, capacities, pressure,
19-
and whether the pipeline is bidirectional and carries H-Gas or L-Gas.
31+
SciGRID_gas `IGGIELGN <https://zenodo.org/record/4767098>`_ dataset from
32+
zenodo. It includes data on the transmission routes, pipe diameters,
33+
capacities, pressure, and whether the pipeline is bidirectional and carries
34+
H-Gas or L-Gas.
2035

21-
* New rule ``build_gas_network`` processes and cleans the pipeline data from SciGRID_gas.
22-
Missing or uncertain pipeline capacities can be inferred by diameter.
36+
* New rule ``build_gas_network`` processes and cleans the pipeline data from
37+
SciGRID_gas. Missing or uncertain pipeline capacities can be inferred by
38+
diameter.
2339

2440
* New rule ``build_gas_input_locations`` compiles the LNG import capacities
25-
(including planned projects from gem.wiki), pipeline entry capacities and
26-
local production capacities for each region of the model. These are the
27-
regions where fossil gas can eventually enter the model.
41+
(from the Global Energy Monitor's `Europe Gas Tracker
42+
<https://globalenergymonitor.org/projects/europe-gas-tracker/>`_, pipeline
43+
entry capacities and local production capacities for each region of the model.
44+
These are the regions where fossil gas can eventually enter the model.
2845

2946
* New rule ``cluster_gas_network`` that clusters the gas transmission network
30-
data to the model resolution. Cross-regional pipeline capacities are aggregated
31-
(while pressure and diameter compatibility is ignored), intra-regional pipelines
32-
are dropped. Lengths are recalculated based on the regions' centroids.
47+
data to the model resolution. Cross-regional pipeline capacities are
48+
aggregated (while pressure and diameter compatibility is ignored),
49+
intra-regional pipelines are dropped. Lengths are recalculated based on the
50+
regions' centroids.
3351

34-
* With the option ``sector: gas_network:``, the existing gas network is
35-
added with a lossless transport model. A length-weighted `k-edge augmentation
52+
* With the option ``sector: gas_network:``, the existing gas network is added
53+
with a lossless transport model. A length-weighted `k-edge augmentation
3654
algorithm
3755
<https://networkx.org/documentation/stable/reference/algorithms/generated/networkx.algorithms.connectivity.edge_augmentation.k_edge_augmentation.html#networkx.algorithms.connectivity.edge_augmentation.k_edge_augmentation>`_
3856
can be run to add new candidate gas pipelines such that all regions of the
@@ -41,92 +59,167 @@ incorporates retrofitting options to hydrogen.
4159
the gas network is activated, all the gas demands are regionally disaggregated
4260
as well.
4361

44-
* New constraint allows endogenous retrofitting of gas pipelines to hydrogen pipelines.
45-
This option is activated via the setting ``sector: H2_retrofit:``. For every
46-
unit of gas pipeline capacity dismantled, ``sector:
62+
* New constraint allows endogenous retrofitting of gas pipelines to hydrogen
63+
pipelines. This option is activated via the setting ``sector: H2_retrofit:``.
64+
For every unit of gas pipeline capacity dismantled, ``sector:
4765
H2_retrofit_capacity_per_CH4`` units are made available as hydrogen pipeline
4866
capacity in the corresponding corridor. These repurposed hydrogen pipelines
49-
have lower costs than new hydrogen pipelines. Both new and repurposed pipelines
50-
can be built simultaneously. The retrofitting option ``sector: H2_retrofit:`` also works
51-
with a copperplated methane infrastructure, i.e. when ``sector: gas_network: false``.
67+
have lower costs than new hydrogen pipelines. Both new and repurposed
68+
pipelines can be built simultaneously. The retrofitting option ``sector:
69+
H2_retrofit:`` also works with a copperplated methane infrastructure, i.e.
70+
when ``sector: gas_network: false``.
5271

5372
* New hydrogen pipelines can now be built where there are already power or gas
5473
transmission routes. Previously, only the electricity transmission routes were
5574
considered.
5675

57-
**New features and functionality**
76+
**Carbon Management and Biomass**
5877

78+
* Add option to spatially resolve carrier representing stored carbon dioxide
79+
(``co2_spatial``). This allows for more detailed modelling of CCUTS, e.g.
80+
regarding the capturing of industrial process emissions, usage as feedstock
81+
for electrofuels, transport of carbon dioxide, and geological sequestration
82+
sites.
83+
84+
* Add option for regionally-resolved geological carbon dioxide sequestration
85+
potentials through new rule ``build_sequestration_potentials`` based on
86+
`CO2StoP <https://setis.ec.europa.eu/european-co2-storage-database_en>`_. This
87+
can be controlled in the section ``regional_co2_sequestration_potential`` of
88+
the ``config.yaml``. It includes options to select the level of conservatism,
89+
whether onshore potentials should be included, the respective upper and lower
90+
limits per region, and an annualisation parameter for the cumulative
91+
potential. The defaults are preliminary and will be validated the next
92+
release.
5993

60-
* Add option to aggregate network temporally using representative snapshots or segments (with tsam package)
94+
* Add option to sweep the global CO2 sequestration potentials with keyword
95+
``seq200`` in the ``{sector_opts}`` wildcard (for limit of 200 Mt CO2).
6196

62-
* Add option for biomass boilers (wood pellets) for decentral heating
97+
* Add option to include `Allam cycle gas power plants
98+
<https://en.wikipedia.org/wiki/Allam_power_cycle>`_ (``allam_cycle``).
6399

64-
* Add option for BioSNG (methane from biomass) with and without CC
100+
* Add option for planning a new carbon dioxide network (``co2network``).
65101

66-
* Add option for BtL (Biomass to liquid fuel/oil) with and without CC
102+
* Separate option to regionally resolve biomass (``biomass_spatial``) from
103+
option to allow biomass transport (``biomass_transport``).
67104

68-
* Add option for minimum part load for Fischer-Tropsch plants (default: 90%) and methanolisation plants (default: 50%).
105+
* Add option for biomass boilers (wood pellets) for decentral heating.
69106

70-
* Units are assigned to the buses. These only provide a better understanding. The specifications of the units are not taken into account in the optimisation, which means that no automatic conversion of units takes place.
107+
* Add option for BioSNG (methane from biomass) with and without carbon capture.
71108

72-
* Option ``retrieve_sector_databundle`` to automatically retrieve and extract data bundle.
109+
* Add option for BtL (biomass to liquid fuel/oil) with and without carbon
110+
capture.
73111

74-
* Add option to use waste heat of electrolysis in district heating networks (``use_electrolysis_waste_heat``).
75112

76-
* Add regionalised hydrogen salt cavern storage potentials from `Technical Potential of Salt Caverns for Hydrogen Storage in Europe <https://doi.org/10.20944/preprints201910.0187.v1>`_.
113+
**Other new features**
77114

78-
* Add option to sweep the global CO2 sequestration potentials with keyword ``seq200`` in the ``{sector_opts}`` wildcard (for limit of 200 Mt CO2).
115+
* Add regionalised hydrogen salt cavern storage potentials from `Technical
116+
Potential of Salt Caverns for Hydrogen Storage in Europe
117+
<https://doi.org/10.20944/preprints201910.0187.v1>`_. This data is compiled in
118+
a new rule ``build_salt_cavern_potentials``.
79119

80120
* Add option to resolve ammonia as separate energy carrier with Haber-Bosch
81121
synthesis, ammonia cracking, storage and industrial demand. The ammonia
82-
carrier can be nodally resolved or copperplated across Europe. This feature is
83-
controlled by ``sector: ammonia:``.
122+
carrier can be nodally resolved or copperplated across Europe (see
123+
``ammonia``).
124+
125+
* Add methanol as energy carrier, methanolisation as process, and option for
126+
methanol demand in shipping sector.
127+
128+
* Shipping demand now defaults to methanol rather than liquefied hydrogen
129+
until 2050.
84130

85-
* Add methanol as energy carrier, methanolisation as process, and option for methanol demand in shipping sector.
131+
* Demand for liquid hydrogen in international shipping is now geographically
132+
distributed by port trade volumes in a new rule ``build_shipping_demand``
133+
using data from the `World Bank Data Catalogue
134+
<https://datacatalog.worldbank.org/search/dataset/0038118/Global---International-Ports>`_.
135+
Domestic shipping remains distributed by population.
86136

87-
* Updated `data bundle <https://zenodo.org/record/5824485/files/pypsa-eur-sec-data-bundle.tar.gz>`_ that includes the hydrogan salt cavern storage potentials.
137+
* Add option to aggregate network temporally using representative snapshots or
138+
segments (with `tsam <https://github.com/FZJ-IEK3-VSA/tsam>`_).
88139

89-
* Updated and extended documentation in <https://pypsa-eur-sec.readthedocs.io/en/latest/>
140+
* Add option for minimum part load for Fischer-Tropsch plants (default: 90%) and
141+
methanolisation plants (default: 50%).
90142

91-
* Shipping demand now defaults to (synthetic) oil rather than liquefied hydrogen until 2050.
143+
* Add option to use waste heat of electrolysis in district heating networks
144+
(``use_electrolysis_waste_heat``).
92145

93-
* Improved network plots including better legends, hydrogen retrofitting network display, and change to EqualEarth projection.
146+
* Add option for coal CHPs with carbon capture (see ``coal_cc``).
147+
148+
* In overnight optimisation, it is now possible to specify a year for the
149+
technology cost projections separate from the planning horizon.
94150

95151
* New config options for changing energy demands in aviation
96152
(``aviation_demand_factor``) and HVC industry (``HVC_demand_factor``), as well
97153
as explicit ICE shares for land transport (``land_transport_ice_share``) and
98154
agriculture machinery (``agriculture_machinery_oil_share``).
99155

100-
* Add option to spatially resolve carrier representing stored carbon dioxide
101-
(``co2_spatial``). This allows for more detailed modelling of CCUTS, e.g.
102-
regarding the capturing of industrial process emissions, usage as feedstock
103-
for electrofuels, transport of carbon dioxide, and geological sequestration sites.
156+
* It is now possible to merge residential and services heat buses to reduce the
157+
problem size (see ``cluster_heat_nodes``).
104158

105-
* Add option for planning a new carbon dioxide network (``co2network``).
159+
* Added option to tweak (almost) any configuration parameter through the
160+
``{sector_opts}`` wildcard. The regional_co2_sequestration_potential is
161+
triggered by the prefix ``CF+`` after which it is possible to pipe to any
162+
setting that does not contain underscores (``_``). Example:
163+
``CF+sector+v2g+false`` disables vehicle-to-grid flexibility.
106164

165+
* Option ``retrieve_sector_databundle`` to automatically retrieve and extract
166+
data bundle.
107167

108-
* Add option for regionally-resolved geological carbon dioxide sequestration
109-
potentials through new rule ``build_sequestration_potentials`` based on
110-
`CO2StoP <https://setis.ec.europa.eu/european-co2-storage-database_en>`_. This
111-
can be controlled in the section ``regional_co2_sequestration_potential`` of
112-
the ``config.yaml``. It includes options to select the level of conservatism,
113-
whether onshore potentials should be included, the respective upper and lower
114-
limits per region, and an annualisation parameter for the cumulative
115-
potential. The defaults are preliminary and will be validated the next
116-
release.
168+
* Removed the need to clone ``technology-data`` repository in a parallel
169+
directory. The new approach automatically retrieves the technology data from
170+
remote in the rule ``retrieve_cost_data``.
117171

118-
* Separate option to regionally resolve biomass (``biomass_spatial``) from
119-
option to allow biomass transport (``biomass_transport``).
172+
* Improved network plots including better legends, hydrogen retrofitting network
173+
display, and change to EqualEarth projection. A new color scheme for
174+
technologies was also introduced.
120175

121-
* Add option to include `Allam cycle gas power plants
122-
<https://en.wikipedia.org/wiki/Allam_power_cycle>`_ (``allam_cycle``).
176+
* Add two new rules ``build_transport_demand`` and
177+
``build_population_weighted_energy_totals`` using code previously contained in
178+
``prepare_sector_network``.
179+
180+
* Rules that convert weather data with ``atlite`` now largely run separately for
181+
categories residential, rural and total.
182+
183+
* Units are assigned to the buses. These only provide a better understanding.
184+
The specifications of the units are not taken into account in the
185+
optimisation, which means that no automatic conversion of units takes place.
186+
187+
* Configuration file and wildcards are now stored under ``n.meta`` in every
188+
PyPSA network.
189+
190+
* Updated `data bundle
191+
<https://zenodo.org/record/5824485/files/pypsa-eur-sec-data-bundle.tar.gz>`_
192+
that includes the hydrogan salt cavern storage potentials.
193+
194+
* Updated and extended documentation in
195+
<https://pypsa-eur-sec.readthedocs.io/en/latest/>
196+
197+
* Added new rule ``copy_conda_env`` that exports a list of packages with which
198+
the workflow was executed.
199+
200+
* Add basic continuous integration using Github Actions.
201+
202+
* Add basic ``rsync`` setup.
123203

124204
**Bugfixes**
125205

126-
* The CO2 sequestration limit implemented as GlobalConstraint (introduced in the previous version)
127-
caused a failure to read in the shadow prices of other global constraints.
206+
* The CO2 sequestration limit implemented as GlobalConstraint (introduced in the
207+
previous version) caused a failure to read in the shadow prices of other
208+
global constraints.
209+
210+
* Correct capital cost of Fischer-Tropsch according to new units in
211+
``technology-data`` repository.
212+
213+
* Fix unit conversion error for thermal energy storage.
214+
215+
* For myopic pathway optimisation, set optimised capacities of power grid
216+
expansion of previous iteration as minimum capacity for next iteration.
128217

129-
* Correct capital cost of Fischer-Tropsch according to new units in ``technology-data``.
218+
* Further rather minor bugfixes for myopic optimisation code (see `#256
219+
<https://github.com/PyPSA/pypsa-eur-sec/pull/256>`_).
220+
221+
222+
Many thanks to all who contributed to this release!
130223

131224

132225
PyPSA-Eur-Sec 0.6.0 (4 October 2021)

graphics/workflow.png

324 KB
Loading

scripts/add_existing_baseyear.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas
178178
busmap = pd.read_csv(snakemake.input.busmap, index_col=0).squeeze()
179179

180180
inv_busmap = {}
181-
for k, v in busmap.iteritems():
181+
for k, v in busmap.items():
182182
inv_busmap[v] = inv_busmap.get(v, []) + [k]
183183

184184
clustermaps = busmap_s.map(busmap)

scripts/build_population_layouts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
reference = ["RS", "BA"]
4141
average = urban_fraction[reference].mean()
4242
fill_values = pd.Series({ct: average for ct in missing})
43-
urban_fraction = urban_fraction.append(fill_values)
43+
urban_fraction = pd.concat([urban_fraction, fill_values])
4444

4545
# population in each grid cell
4646
pop_cells = pd.Series(I.dot(nuts3['pop']))

0 commit comments

Comments
 (0)