Skip to content
3 changes: 2 additions & 1 deletion INTERFACE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ pathvars:
WDPA protected areas database from https://www.protectedplanet.net/ in GeoDB format (choose 'File Geodatabase' when downloading).
results:
area_potential:
default: "<results>/{shape}/area_potential_{tech}.tif"
default: "<results>/{shape}/{scenario}/area_potential_{tech}.tif"
description: "Area potential GeoTIFF raster in EPSG:4326 for the specified technology across all subunits."
wildcards:
shape: "Name of the shape to be processed, e.g., 'world', 'europe', 'MEX'."
tech: "Name of the technology, e.g., 'pv_rooftop' or 'wind_offshore'. Available technologies are defined in the module configuration."
scenario: "Scenario name from the module configuration."
182 changes: 93 additions & 89 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,93 +8,97 @@ split_by: country_id # likely country_id or shape_id

# Optional - specify land_cover_types here to override the internal defaults.

techs:
pv_rooftop:
initial_area: settlement_area
continuous_layers:
settlement_share:
min: 0.01
max: 1
share: 0.8
binary_layers:
regions_maritime: 0
regions_land: 1
protected: 0
# Include all land cover types; selection is done by settlement_share
landcover_FARM: 1
landcover_FOREST: 1
landcover_URBAN: 1
landcover_OTHER: 1
landcover_NOT_SUITABLE: 0
landcover_WATER: 0
pv_open_field:
initial_area: pixel_area
continuous_layers:
slope_deg:
min: 0
max: 3
settlement_share:
min: 0
max: 0.01
binary_layers:
regions_maritime: 0
regions_land: 1
protected: 0
landcover_FARM: 0.1
landcover_FOREST: 0
landcover_URBAN: 0
landcover_OTHER: 0.2
landcover_NOT_SUITABLE: 0
landcover_WATER: 0
wind_onshore:
initial_area: pixel_area
continuous_layers:
slope_deg:
min: 0
max: 20
settlement_share:
min: 0
max: 0.01
binary_layers:
regions_maritime: 0
regions_land: 1
protected: 0
landcover_FARM: 0.2
landcover_FOREST: 0.05
landcover_URBAN: 0
landcover_OTHER: 0.3
landcover_NOT_SUITABLE: 0
landcover_WATER: 0
wind_offshore:
initial_area: pixel_area
continuous_layers:
bathymetry:
min: -50
max: 0
share: 0.8
# AIS vessel-position counts per km2 accumulated over 2015–2021.
ship_travel:
# PyPSA-Eur's default for high-density ship routes
# 400 AIS * 8760 hours * 6 years
min: 0
max: 21024000
binary_layers:
regions_land: 0
regions_maritime: 1
protected: 0
shapes_buffer:
land: 10000 # meters
scenarios:
# Define at least one scenario. Multiple scenarios can be used to study
# the effect of different assumptions on the results.
base:
techs:
pv_rooftop:
initial_area: settlement_area
continuous_layers:
settlement_share:
min: 0.01
max: 1
share: 0.8
binary_layers:
regions_maritime: 0
regions_land: 1
protected: 0
# Include all land cover types; selection is done by settlement_share
landcover_FARM: 1
landcover_FOREST: 1
landcover_URBAN: 1
landcover_OTHER: 1
landcover_NOT_SUITABLE: 0
landcover_WATER: 0
pv_open_field:
initial_area: pixel_area
continuous_layers:
slope_deg:
min: 0
max: 3
settlement_share:
min: 0
max: 0.01
binary_layers:
regions_maritime: 0
regions_land: 1
protected: 0
landcover_FARM: 0.1
landcover_FOREST: 0
landcover_URBAN: 0
landcover_OTHER: 0.2
landcover_NOT_SUITABLE: 0
landcover_WATER: 0
wind_onshore:
initial_area: pixel_area
continuous_layers:
slope_deg:
min: 0
max: 20
settlement_share:
min: 0
max: 0.01
binary_layers:
regions_maritime: 0
regions_land: 1
protected: 0
landcover_FARM: 0.2
landcover_FOREST: 0.05
landcover_URBAN: 0
landcover_OTHER: 0.3
landcover_NOT_SUITABLE: 0
landcover_WATER: 0
wind_offshore:
initial_area: pixel_area
continuous_layers:
bathymetry:
min: -50
max: 0
share: 0.8
# AIS vessel-position counts per km2 accumulated over 2015–2021.
ship_travel:
# PyPSA-Eur's default for high-density ship routes
# 400 AIS * 8760 hours * 6 years
min: 0
max: 21024000
binary_layers:
regions_land: 0
regions_maritime: 1
protected: 0
shapes_buffer:
land: 10000 # meters

# Optional: override settings for specific subunits (countries, regions, etc.)
# This allows you to set specific parameters that differ from the defaults,
# or apply settings that are not defined in the defaults (defaults = `techs` section).
# The subunit keys should match the subunit IDs used in column selected in `split_by`.
overrides:
PRT: # Inside a subunit, any setting from `techs` can be overridden
wind_offshore:
shapes_buffer:
land: 2000 # meters
NLD:
wind_offshore:
shapes_buffer:
land: 22000 # 22 km = 12 nautical miles
# Optional: override settings for specific subunits (countries, regions, etc.)
# This allows you to set specific parameters that differ from the defaults,
# or apply settings that are not defined in the defaults (defaults = `techs` section).
# The subunit keys should match the subunit IDs used in column selected in `split_by`.
overrides:
PRT: # Inside a subunit, any setting from `techs` can be overridden
wind_offshore:
shapes_buffer:
land: 2000 # meters
NLD:
wind_offshore:
shapes_buffer:
land: 22000 # 22 km = 12 nautical miles
4 changes: 2 additions & 2 deletions tests/integration/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ module module_area_potentials:
shapes="resources/inputs/shapes/{shape}.parquet",
wdpa="resources/inputs/wdpa.gdb",
# Redirect specific module results (outputs)
area_potential="results/outputs/{shape}/area_potential_{tech}.tif",
area_potential="results/outputs/{shape}/{scenario}/area_potential_{tech}.tif",
# Redirect module intermediate files
logs="resources/module/logs",
resources="resources/module/resources",
Expand All @@ -80,6 +80,6 @@ rule all:
default_target: True
input:
# The report file requires all area potential output files
"resources/module/results/NLD/area_potential_report.html",
"resources/module/results/NLD/base/area_potential_report.html",
message:
"Run the module for the Netherlands shapes."
142 changes: 72 additions & 70 deletions tests/integration/test_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,73 +2,75 @@ module_area_potentials:
tiny_files: True
buffer_crs: "epsg:8857"
split_by: country_id
techs:
pv_rooftop:
initial_area: settlement_area
continuous_layers:
settlement_share:
min: 0.01
max: 1
share: 0.8
binary_layers:
regions_maritime: 0
regions_land: 1
protected: 0
# Include all land cover types; selection is done by settlement_share
landcover_FARM: 1
landcover_FOREST: 1
landcover_URBAN: 1
landcover_OTHER: 1
landcover_NOT_SUITABLE: 0
landcover_WATER: 0
pv_open_field:
initial_area: pixel_area
continuous_layers:
slope_deg:
min: 0
max: 3
settlement_share:
min: 0
max: 0.01
binary_layers:
regions_maritime: 0
regions_land: 1
protected: 0
landcover_FARM: 0.1
landcover_FOREST: 0
landcover_URBAN: 0
landcover_OTHER: 0.2
landcover_NOT_SUITABLE: 0
landcover_WATER: 0
wind_onshore:
initial_area: pixel_area
continuous_layers:
slope_deg:
min: 0
max: 20
settlement_share:
min: 0
max: 0.01
binary_layers:
regions_maritime: 0
regions_land: 1
protected: 0
landcover_FARM: 0.2
landcover_FOREST: 0.05
landcover_URBAN: 0
landcover_OTHER: 0.3
landcover_NOT_SUITABLE: 0
landcover_WATER: 0
wind_offshore:
initial_area: pixel_area
continuous_layers:
bathymetry:
min: -50
max: 0
share: 0.8
binary_layers:
regions_land: 0
regions_maritime: 1
protected: 0
shapes_buffer:
land: 10000 # meters
scenarios:
base:
techs:
pv_rooftop:
initial_area: settlement_area
continuous_layers:
settlement_share:
min: 0.01
max: 1
share: 0.8
binary_layers:
regions_maritime: 0
regions_land: 1
protected: 0
# Include all land cover types; selection is done by settlement_share
landcover_FARM: 1
landcover_FOREST: 1
landcover_URBAN: 1
landcover_OTHER: 1
landcover_NOT_SUITABLE: 0
landcover_WATER: 0
pv_open_field:
initial_area: pixel_area
continuous_layers:
slope_deg:
min: 0
max: 3
settlement_share:
min: 0
max: 0.01
binary_layers:
regions_maritime: 0
regions_land: 1
protected: 0
landcover_FARM: 0.1
landcover_FOREST: 0
landcover_URBAN: 0
landcover_OTHER: 0.2
landcover_NOT_SUITABLE: 0
landcover_WATER: 0
wind_onshore:
initial_area: pixel_area
continuous_layers:
slope_deg:
min: 0
max: 20
settlement_share:
min: 0
max: 0.01
binary_layers:
regions_maritime: 0
regions_land: 1
protected: 0
landcover_FARM: 0.2
landcover_FOREST: 0.05
landcover_URBAN: 0
landcover_OTHER: 0.3
landcover_NOT_SUITABLE: 0
landcover_WATER: 0
wind_offshore:
initial_area: pixel_area
continuous_layers:
bathymetry:
min: -50
max: 0
share: 0.8
binary_layers:
regions_land: 0
regions_maritime: 1
protected: 0
shapes_buffer:
land: 10000 # meters
11 changes: 9 additions & 2 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pathvars:
shapes="<resources>/user/shapes/{shape}.parquet",
wdpa="<resources>/user/wdpa.gdb",
# Module results
area_potential="<results>/{shape}/area_potential_{tech}.tif",
area_potential="<results>/{shape}/{scenario}/area_potential_{tech}.tif",


# Load the example configuration. This will be overridden by users.
Expand All @@ -36,7 +36,14 @@ workflow.source_path("scripts/_script_utils.py")
wildcard_constraints:
shape="[a-zA-Z0-9_-]+",
subunit="[a-zA-Z0-9_]+",
tech="|".join(config["techs"].keys()),
scenario="|".join(config["scenarios"].keys()),
tech="|".join(
[
tech
for scenario in config["scenarios"]
for tech in config["scenarios"][scenario]["techs"]
]
),


# Add all your includes here.
Expand Down
Loading