Skip to content

Commit 8a48933

Browse files
committed
distribute electricity demand by JRC energy atlas
1 parent d7338c1 commit 8a48933

9 files changed

Lines changed: 281 additions & 38 deletions

File tree

config/config.default.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ load:
381381
scaling_factor: 1.0
382382
fixed_year: false
383383
supplement_synthetic: true
384+
substation_only: true
384385
distribution_key:
385386
gdp: 0.6
386387
population: 0.4

doc/configtables/load.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ manual_adjustments,bool,"{true, false}","Whether to adjust the load data manuall
77
scaling_factor,--,float,"Global correction factor for the load time series."
88
fixed_year,--,Year or False,"To specify a fixed year for the load time series that deviates from the snapshots' year"
99
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."
10+
substation_only,bool,"{true, false}","Whether to only consider substations for the spatial disaggregation of the per-country electricity demand data."
1011
distribution_key,--,--,"Distribution key for spatially disaggregating the per-country electricity demand data."
1112
-- gdp,float,"[0, 1]","Weighting factor for the GDP data in the distribution key."
1213
-- population,float,"[0, 1]","Weighting factor for the population data in the distribution key."

doc/data-retrieval.rst

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,4 +249,25 @@ Data in this section is retrieved and extracted in rules specified in ``rules/re
249249
- **Source:** European Network of Transmission System Operators for Electricity (ENTSO-E) and European Network of Transmission System Operators for Gas (ENTSOG)
250250
- **Link:** https://2024.entsos-tyndp-scenarios.eu/download/
251251
- **License:** CC-BY 4.0
252-
- **Description:** Contains the node list and the reference grids from the Ten-Year Network Development Plan (TYNDP) 2024.
252+
- **Description:** Contains the node list and the reference grids from the Ten-Year Network Development Plan (TYNDP) 2024.
253+
254+
``data/demand-distribution/electricity_tot_demand_2019.tif``
255+
256+
- **Source:** JRC Energy Atlas
257+
- **Link:** https://jeodpp.jrc.ec.europa.eu/ftp/jrc-opendata/EIGL-Data/RASTER/ and https://energy-industry-geolab.jrc.ec.europa.eu/energy-atlas/
258+
- **License:** CC-BY 4.0 (https://jeodpp.jrc.ec.europa.eu/ftp/jrc-opendata/EIGL-Data/RASTER/copyright.txt)
259+
- **Description:** Contains 1km by 1km raster data of annual electricity demand per EU country.
260+
261+
``data/demand-distribution/Subnational_electricity_consumption_statistics_2005-2023.xlsx`
262+
263+
- **Source:** UK Government, Department for Energy Security and Net Zero
264+
- **Link:** https://www.gov.uk/government/statistics/regional-and-local-authority-electricity-consumption-statistics
265+
- **License:** Open Government Licence v3.0 (https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/)
266+
- **Description:** Contains subnational electricity consumption statistics from 2005 to 2023.
267+
268+
``data/Local_Authority_Districts_May_2024_Boundaries__UK_BSC.geojson``
269+
270+
- **Source:** UK Office for National Statistics
271+
- **Link:** https://geoportal.statistics.gov.uk/datasets/ons::local-authority-districts-may-2024-boundaries-uk-bsc-2/about
272+
- **License:** Open Government Licence v.3.0 (https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/)
273+
- **Description:** Contains shapefiles of local authorities in the United Kingdom.

doc/release_notes.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ Upcoming Release
4646
* Fix `retrieve_eurostat_data` and `retrieve_eurostat_household_data` on Windows by avoiding a double access to a temporary file.
4747
(https://github.com/PyPSA/pypsa-eur/pull/1825)
4848

49+
* Distributing country-level electricity demand time series to subnational model
50+
regions of EU countries now uses data from the `JRC Energy Atlas
51+
<https://energy-industry-geolab.jrc.ec.europa.eu/energy-atlas>`__. This
52+
dataset provides electricity consumption on a 1km by 1km raster for the year,
53+
which is more accurate than the previous NUTS3-based distribution. Another
54+
dataset is used for Great Britain from the `Department for Energy Security and
55+
Net Zero
56+
<https://www.gov.uk/government/statistics/regional-and-local-authority-electricity-consumption-statistics>`__.
57+
Other non-EU countries still use NUTS3-based distribution keys from GDP and
58+
population.
59+
4960
PyPSA-Eur v2025.07.0 (11th July 2025)
5061
=====================================
5162

doc/retrieve.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,22 @@ None.
108108

109109
- ``data/electricity_demand_raw.csv``
110110

111+
Rule ``retrieve_electricity_demand_energy_atlas``
112+
=================================================
113+
114+
This rule downloads 1km by 1km raster of estimated annual electricity demand from the `JRC Energy Atlas <https://energy-industry-geolab.jrc.ec.europa.eu/energy-atlas/>`__ .
115+
116+
Rule ``retrieve_electricity_demand_subnational_gb``
117+
===================================================
118+
119+
This rule downloads subnational electricity consumption data for Great Britain from the `Department for Energy Security and Net Zero <https://www.gov.uk/government/statistics/regional-and-local-authority-electricity-consumption-statistics>`__ .
120+
121+
Rule ``retrieve_local_authorities_uk``
122+
======================================
123+
124+
This rule downloads shapefiles of local authorities in the United Kingdom from the `Office for National Statistics <https://geoportal.statistics.gov.uk/datasets/ons::local-authority-districts-may-2024-boundaries-uk-bsc-2/about>`__ .
125+
126+
111127
Rule ``retrieve_tyndp_bundle``
112128
=========================================
113129

envs/environment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ dependencies:
5757
- cartopy
5858
- descartes
5959
- rasterio
60+
- rasterstats
6061

6162
# Development dependencies
6263
- jupyter

rules/build_electricity.smk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,9 +533,13 @@ def input_class_regions(w):
533533
rule build_electricity_demand_base:
534534
params:
535535
distribution_key=config_provider("load", "distribution_key"),
536+
substation_only=config_provider("load", "substation_only"),
536537
input:
537538
base_network=resources("networks/base_s.nc"),
538539
regions=resources("regions_onshore_base_s.geojson"),
540+
raster="data/demand-distribution/electricity_tot_demand_2019.tif",
541+
gb_excel="data/demand-distribution/Subnational_electricity_consumption_statistics_2005-2023.xlsx",
542+
gb_geojson="data/Local_Authority_Districts_May_2024_Boundaries__UK_BSC.geojson",
539543
nuts3=resources("nuts3_shapes.geojson"),
540544
load=resources("electricity_demand.csv"),
541545
output:

rules/retrieve.smk

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,61 @@ if config["enable"]["retrieve"]:
262262
move(input[0], output[0])
263263

264264

265+
if config["enable"]["retrieve"]:
266+
267+
rule retrieve_electricity_demand_energy_atlas:
268+
input:
269+
storage(
270+
"https://jeodpp.jrc.ec.europa.eu/ftp/jrc-opendata/EIGL-Data/RASTER/electricity_tot_demand_2019.tif",
271+
),
272+
output:
273+
"data/demand-distribution/electricity_tot_demand_2019.tif",
274+
log:
275+
"logs/retrieve_electricity_demand_energy_atlas.log",
276+
resources:
277+
mem_mb=5000,
278+
retries: 2
279+
run:
280+
move(input[0], output[0])
281+
282+
283+
if config["enable"]["retrieve"]:
284+
285+
rule retrieve_electricity_demand_subnational_gb:
286+
input:
287+
storage(
288+
"https://assets.publishing.service.gov.uk/media/6762951abe7b2c675de30705/Subnational_electricity_consumption_statistics_2005-2023.xlsx",
289+
),
290+
output:
291+
"data/demand-distribution/Subnational_electricity_consumption_statistics_2005-2023.xlsx",
292+
log:
293+
"logs/retrieve_electricity_demand_subnational_gb.log",
294+
resources:
295+
mem_mb=5000,
296+
retries: 2
297+
run:
298+
move(input[0], output[0])
299+
300+
301+
if config["enable"]["retrieve"]:
302+
303+
rule retrieve_local_authorities_uk:
304+
output:
305+
"data/Local_Authority_Districts_May_2024_Boundaries__UK_BSC.geojson"
306+
run:
307+
import requests
308+
309+
url = "https://services1.arcgis.com/ESMARspQHYMw9BZ9/arcgis/rest/services/Local_Authority_Districts_May_2024_Boundaries__UK_BSC/FeatureServer/0/query"
310+
params = {
311+
"outFields": "*",
312+
"where": "1=1",
313+
"f": "geojson",
314+
}
315+
response = requests.get(url, params=params)
316+
with open(output[0], "wb") as f:
317+
f.write(response.content)
318+
319+
265320
if config["enable"]["retrieve"]:
266321

267322
rule retrieve_ship_raster:

0 commit comments

Comments
 (0)