Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ehighways resolution shape generation #370

Merged
merged 32 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
e293175
Initial step: copy across code from sector-coupled-euro-calliope
jonathan-peel Apr 9, 2024
a1d6d53
Added nuts-year into config and schema.
jonathan-peel Apr 9, 2024
6e9a803
Merge branch 'calliope-project:develop' into feature-ehighways-resolu…
jonathan-peel Apr 10, 2024
e684d78
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 10, 2024
f91e811
Added config options and updated custom_units rule
jonathan-peel Apr 10, 2024
7d0a9af
rule custom units now runs successfully with all inputs defined
jonathan-peel Apr 10, 2024
4902ced
rule units starts successfully. Pre-commit before restructuring Pytho…
jonathan-peel Apr 10, 2024
bba893f
Debugging snakemake rule to run properly. Mostly changing configurati…
jonathan-peel Apr 10, 2024
ebd4bb4
Code enters function successfully.
jonathan-peel Apr 10, 2024
1c8d34e
Small code documentation changes.
jonathan-peel Apr 10, 2024
97ad475
remove whitespace
jonathan-peel Apr 10, 2024
3a26c53
Refactoring for consistency; adding docstrings.
jonathan-peel Apr 10, 2024
07db593
Entrance into units.py via shapes.smk working.
jonathan-peel Apr 10, 2024
18ed036
Merged first function of custom units with input validation.
jonathan-peel Apr 11, 2024
18582c5
1st build of custom units working but buggy due to nuts year incompat…
jonathan-peel Apr 11, 2024
da9c0cb
Adding files from Sector-Coupled Euro-Calliope for comparison.
jonathan-peel Apr 11, 2024
742595f
Merge branch 'feature-ehighways-resolution-unts-318' of github.com:jo…
jonathan-peel Apr 11, 2024
63dc596
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 11, 2024
e7fd29b
Successfully build ehighways units using 2013 NUTS units.
jonathan-peel Apr 12, 2024
8c2ac3a
Removed references to nuts years. ehighways still build successfully …
jonathan-peel Apr 12, 2024
85bba84
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 12, 2024
d6654b0
Removing reference files and cleaning debug configurations.
jonathan-peel Apr 12, 2024
fac9b2c
Small comment
jonathan-peel Apr 12, 2024
371913a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 12, 2024
b296ec8
Refactoring of layer -> resolution
jonathan-peel Apr 12, 2024
e227ce8
Documenting statistical-to-custom-units
jonathan-peel Apr 12, 2024
f2fa62d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 12, 2024
52d34ac
Merge branch 'develop' into feature-ehighways-resolution-unts-318
brynpickering May 3, 2024
8950ccb
Process ehighways shapes as separate rule
brynpickering May 3, 2024
cc671d2
Updates following review; fixes on running minimal workflow
brynpickering May 6, 2024
0846431
Merge branch 'develop' into update-feature-ehighways-resolution
brynpickering May 10, 2024
6ab3c28
Fix test config for ehighways
brynpickering May 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Added (models)

* **ADD** Spatial resolution that aligns with the regions defined by the [e-Highway 2050 project](https://cordis.europa.eu/project/id/308908/reporting) (`ehighways`) (#370).

* **ADD** fully-electrified heat demand (#284).

* **ADD** fully-electrified road transportation (#270), (#271). A parameter allows to define the share of uncontrolled (timeseries) vs controlled charging (optimised) by the solver (PR #338).
Expand Down Expand Up @@ -37,7 +39,8 @@

### Updated (workflow)

* **UPDATE** YAML templates and parametrisation restructured:
* **UPDATED** to new Zenodo source of land-use potentials, to include potentials at the [e-Highway 2050 project](https://cordis.europa.eu/project/id/308908/reporting) resolution (`ehighways`) (#370).
* **UPDATED** structure of YAML templates and parametrisation:
* Parametrisation moved to eurocalliopelib.
* Rules to parametrise split into smaller technology-specific rules, to ensure inputs are directly relevant to the files being parametrised.
* YAML templates restructured to match structure of final model (see `Updated (models) above`);
Expand Down
41 changes: 15 additions & 26 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ include: "./rules/heat.smk"
min_version("8.10")
localrules: all, clean
wildcard_constraints:
resolution = "continental|national|regional"
resolution = "continental|national|regional|ehighways"

ruleorder: area_to_capacity_limits > hydro_capacities > biofuels > nuclear_regional_capacity > dummy_tech_locations_template
ruleorder: bio_techs_and_locations_template > techs_and_locations_template
Expand Down Expand Up @@ -74,36 +74,25 @@ rule all:
input:
"build/logs/continental/test.success",
"build/logs/national/test.success",
"build/models/continental/example-model.yaml",
"build/models/national/example-model.yaml",
"build/models/regional/example-model.yaml",
"build/models/continental/build-metadata.yaml",
"build/models/national/build-metadata.yaml",
"build/models/regional/build-metadata.yaml",
"build/models/regional/summary-of-potentials.nc",
"build/models/regional/summary-of-potentials.csv",
"build/models/national/summary-of-potentials.nc",
"build/models/national/summary-of-potentials.csv",
"build/models/continental/summary-of-potentials.nc",
"build/models/continental/summary-of-potentials.csv"
expand(
"build/models/{resolution}/{file}",
resolution=["continental", "national", "regional", "ehighways"],
file=["example-model.yaml", "build-metadata.yaml", "summary-of-potentials.nc", "summary-of-potentials.csv"]
)


rule all_tests:
message: "Generate euro-calliope pre-built models and run all tests."
input:
"build/models/continental/example-model.yaml",
"build/models/national/example-model.yaml",
"build/models/regional/example-model.yaml",
"build/logs/continental/test.success",
"build/logs/national/test.success",
"build/logs/regional/test.success",
"build/models/build-metadata.yaml",
"build/models/regional/summary-of-potentials.nc",
"build/models/regional/summary-of-potentials.csv",
"build/models/national/summary-of-potentials.nc",
"build/models/national/summary-of-potentials.csv",
"build/models/continental/summary-of-potentials.nc",
"build/models/continental/summary-of-potentials.csv"
expand(
"build/logs/{resolution}/test.success",
resolution=["continental", "national", "regional", "ehighways"],
),
expand(
"build/models/{resolution}/{file}",
resolution=["continental", "national", "regional", "ehighways"],
file=["example-model.yaml", "build-metadata.yaml", "summary-of-potentials.nc", "summary-of-potentials.csv"]
)


rule dummy_tech_locations_template: # needed to provide `techs_and_locations_template` with a locational CSV linked to each technology that has no location-specific data to define.
Expand Down
72 changes: 70 additions & 2 deletions config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ data-sources:
hydro-basins: https://www.dropbox.com/sh/hmpwobbz9qixxpe/AADeU9iCgMd3ZO1KgrFmfWu6a/HydroBASINS/standard/eu/hybas_eu_lev07_v1c.zip?dl=1
hydro-stations: https://zenodo.org/record/5215920/files/energy-modelling-toolkit/hydro-power-database-v10.zip?download=1
load: https://data.open-power-system-data.org/time_series/2019-06-05/time_series_60min_stacked.csv
nuts: https://ec.europa.eu/eurostat/cache/GISCO/geodatafiles/NUTS_2013_01M_SH.zip
potentials: https://zenodo.org/record/5112963/files/possibility-for-electricity-autarky.zip
nuts: https://ec.europa.eu/eurostat/cache/GISCO/geodatafiles/NUTS_{nuts_year}_01M_SH.zip
potentials: https://zenodo.org/records/6600619/files/raw-potentials.zip?download=1
entsoe-tyndp: https://2020.entsos-tyndp-scenarios.eu/wp-content/uploads/2020/06/TYNDP-2020-Scenario-Datafile.xlsx.zip
jrc-ppdb: https://zenodo.org/record/3574566/files/JRC-PPDB-OPEN.ver1.0.zip
jrc-idees: https://jeodpp.jrc.ec.europa.eu/ftp/jrc-opendata/JRC-IDEES/JRC-IDEES-2015_v1/JRC-IDEES-2015_All_xlsx_{country_code}.zip
Expand Down Expand Up @@ -174,6 +174,7 @@ parameters:
ntc_limit: max
energy_cap_limit: equals
nuclear-capacity-scenario: current
nuts-year: 2013
heat:
space_heat:
carnot-performance: 0.36 # [Nouvel_2015]
Expand Down Expand Up @@ -274,6 +275,37 @@ sea-connections:
- [CYP.1_1, CYP.2_1] # Famagusta and Larnaca
- [EST.7_1, EST.2_1] # Lääne and Hiiu
- [EST.7_1, EST.12_1] # Lääne and Saare
ehighways:
- [ITA_3, ITA_6]
- [ITA_6, FRA_15]
- [ITA_2, FRA_15]
- [ITA_4, ITA_5]
- [ITA_3, MNE_1]
- [ITA_2, HRV_1]
- [ITA_4, ALB_1]
- [ITA_4, GRC_1]
- [CYP_1, GRC_2]
- [EST_1, FIN_2]
- [FIN_2, SWE_3]
- [LTU_1, SWE_3]
- [POL_5, SWE_4]
- [NOR_1, GBR_4]
- [GBR_4, GBR_6]
- [GBR_3, IRL_1]
- [FRA_8, IRL_1]
- [FRA_9, GBR_1]
- [FRA_9, GBR_1]
- [FRA_13, GBR_1]
- [BEL_1, GBR_1]
- [NLD_1, GBR_1]
- [NLD_1, NOR_1]
- [DEU_1, NOR_1]
- [DNK_1, DNK_2]
- [DNK_1, NOR_1]
- [DNK_1, SWE_3]
- [DEU_1, SWE_4]
# the following do not exist today
- [GRC_2, CYP_1]
scope:
spatial:
countries:
Expand Down Expand Up @@ -320,6 +352,7 @@ scope:
first-year: 2016
final-year: 2016
shapes: # This config must be consistent with data from https://doi.org/10.5281/zenodo.3244985.
# TODO: update this link to Bryn's new one, which includes the potentials for ehighways
continental:
Austria: nuts0
Belgium: nuts0
Expand Down Expand Up @@ -429,3 +462,38 @@ shapes: # This config must be consistent with data from https://doi.org/10.5281/
Norway: gadm1 # match 19
Serbia: gadm1 # gadm1 25 regions; wiki 5 regions
Switzerland: gadm1 # match 26
ehighways:
Austria: ehighways
Belgium: nuts0
Bulgaria: nuts0
Croatia: nuts0
Cyprus: nuts0
Czech Republic: ehighways
Denmark: ehighways
Estonia: nuts0
Finland: ehighways
France: ehighways
Germany: ehighways
Greece: ehighways
Hungary: nuts0
Ireland: nuts0
Italy: ehighways
Latvia: nuts0
Lithuania: nuts0
Luxembourg: nuts0
Netherlands: nuts0
Poland: ehighways
Portugal: ehighways
Romania: ehighways
Slovakia: nuts0
Slovenia: nuts0
Spain: ehighways
Sweden: ehighways
United Kingdom: ehighways
Albania: gadm0
Bosnia and Herzegovina: gadm0
Macedonia, Republic of: gadm0
Montenegro: gadm0
Norway: ehighways
Serbia: gadm0
Switzerland: ehighways
3 changes: 3 additions & 0 deletions config/minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ sea-connections:
- [GBR, IRL]
regional: # Source: https://www.entsoe.eu/data/map/
- [GBR.4_1, IRL.17_1] # Wales and Meath
ehighways:
- [GBR_4, GBR_6]
- [GBR_3, IRL_1]
scope:
spatial:
countries:
Expand Down
10 changes: 8 additions & 2 deletions config/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,10 @@ properties:
type: string
description: Nuclear technology capacity scenario. "current" will use today's capacities based on the JRC power plant database (PPDB). All other scenario names should point to a configuration CSV file specifying minimum and maximum capacities per country in MW with non-zero capacities (columns=[country, min, max]).
pattern: ^(current)|(\w+.csv)$
nuts-year:
description: Version of the Nomenclature of Territorial Units for Statistics to use in creating spatial units (see https://ec.europa.eu/eurostat/web/nuts/history for more info).
type: number
enum: [2013] # FIXME: enable other years
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't sound like a fixme to me.

heat:
type: object
description: Parameters for heat sector model.
Expand Down Expand Up @@ -703,10 +707,12 @@ properties:
type: string
description: Region code
shapes:
description: Source for geospatial shapes of all locations. The config must be consistent with data from https://doi.org/10.5281/zenodo.3244985.
description: >-
Source for the lowest-level spatial units of all locations.
The config must be consistent with data from https://zenodo.org/records/6600619.
type: object
propertyNames:
enum: [continental, national, regional]
enum: [continental, national, regional, ehighways]
additionalProperties: false
patternProperties:
^[a-zA-Z]+.*$:
Expand Down
Loading
Loading