Skip to content

Commit d759c55

Browse files
authored
Merge branch 'pik-piam:main' into main
2 parents 637e683 + 132a435 commit d759c55

25 files changed

+501
-107
lines changed

config/default_config.yaml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ logging:
7070
enable:
7171
build_cutout: false
7272
retrieve_cutout: false
73-
retrieve_raster: false
73+
retrieve_raster: true
7474

7575
atlite:
76-
cutout_name: "China-2020c_bare"
76+
cutout_name: "China-2020c"
7777
freq: "h"
7878
nprocesses: 1
7979
show_progress: true
@@ -104,9 +104,14 @@ renewable:
104104
n: 3
105105
capacity_per_sqkm: 3 # ScholzPhd Tab 4.3.1: 10MW/km^2
106106
potential: simple # or conservative
107-
natura: false
107+
natural_reserves: false
108+
max_altitude: 3000 # m
109+
max_slope: 20 # %
108110
clip_p_max_pu: 1.e-2
109111
min_p_nom_max: 1.e-2
112+
# Copernicus LC100 land cover codes for allowed areas
113+
# 20=Shrubland, 30=Herbaceous, 40=Agriculture, 60=Bare, 100=Moss
114+
land_cover_codes: [20, 30, 40, 60, 100]
110115
offwind:
111116
cutout: China-2020c
112117
resource:
@@ -118,10 +123,12 @@ renewable:
118123
capacity_per_sqkm: 2 # ScholzPhd Tab 4.3.1: 20MW/km^2
119124
correction_factor: 0.8855
120125
potential: simple # or conservative
121-
natura: true
126+
natural_reserves: true
122127
max_depth: 50
123128
clip_p_max_pu: 1.e-2
124129
min_p_nom_max: 1.e-2
130+
# Offshore wind uses water depth from GEBCO, not land cover codes
131+
land_cover_codes: null
125132
solar:
126133
cutout: China-2020c
127134
resource:
@@ -136,9 +143,13 @@ renewable:
136143
capacity_per_sqkm: 5.1 # ScholzPhd Tab 4.3.1: 170 MW/km^2 3%
137144
potential: simple # or conservative
138145
correction_factor: 0.85
139-
natura: false
146+
natural_reserves: false
140147
clip_p_max_pu: 1.e-2
141148
min_p_nom_max: 1.e-2
149+
# Copernicus LC100 land cover codes for allowed areas
150+
# 20=Shrubland, 30=Herbaceous, 40=Agriculture, 50=Urban, 60=Bare, 100=Moss
151+
land_cover_codes: [20, 30, 50, 60, 100]
152+
max_slope: 12 # %
142153
renewable_potential_cutoff: 200 # MW, skip low potentials
143154

144155
heat_demand:

config/pik_hpc_profile/config.yaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ set-resources:
7878
time: 300
7979
threads: 4
8080
mem_mb: 30000
81+
build_solar_thermal_profiles:
82+
time: 30
83+
threads: 4
84+
mem_mb: 16000
8185
plot_network:
8286
mem_mb: 8000
8387
threads: 2
@@ -91,21 +95,11 @@ set-resources:
9195
threads: 1
9296
partition: io # login
9397
qos: io
94-
retrieve_Build_up_raster:
98+
retrieve_copernicus_land_cover:
9599
time: 300
96100
threads: 1
97101
partition: io # login
98102
qos: io
99-
retrieve_Grass_raster:
100-
time: 300
101-
threads: 1
102-
partition: io
103-
qos: io
104-
retrieve_Bare_raster:
105-
time: 300
106-
threads: 1
107-
partition: io
108-
qos: io
109103
retrieve_powerplants:
110104
time: 300
111105
threads: 2

docs/data.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Data
2+
3+
The user is responsible for checking the license of the original data, their validity and applicability.
4+
Below is a list of data sources
5+
6+
### Land classification (copernicus global land cover)
7+
Marcel Buchhorn, Bruno Smets, Luc Bertels, Bert De Roo, Myroslava Lesiv, Nandin-Erdene Tsendbazar, Martin Herold, & Steffen Fritz. (2020). Copernicus Global Land Service: Land Cover 100m: collection 3: epoch 2019: Globe (V3.0.1) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.3939050
8+
9+
- Source: Copernicus Global Land Service:
10+
- Link: https://land.copernicus.eu/en/products/global-dynamic-land-cover/copernicus-global-land-service-land-cover-100m-collection-3-epoch-2019-globe
11+
- License: Creative Commons Attribution 4.0 International
12+
- Description: 100m resolution land classification
13+
14+
### Administrative regions
15+
GADM Global adminstrative map
16+
- Source: GADM
17+
- Link: https://gadm.org/
18+
- License: [GADM license](https://gadm.org/license.html)
19+
- Description: poylgons of administrative areas
20+
21+
### Protected areas
22+
China Nature Reserve Specimen Resource Sharing Platform. (2024). List and Vector Boundaries of Nature Reserves in China [Data set].
23+
24+
- Source: China Nature Reserve Specimen Resource Sharing Platform
25+
- Link: https://doi.org/10.5281/zenodo.14875797
26+
- License: MIT
27+
- Description: polygons of protected area
28+
29+
### Bathymetry
30+
Elevation and depth data
31+
32+
- Source: GEBCO
33+
- Link: https://www.gebco.net/data-products-gridded-bathymetry-data/gebco2025-grid
34+
- License: CC0 (reference)
35+
- Description: Bathymetric dataset (2025 version).
36+
37+
### Power infrastruture
38+
Historical brownfield capacities
39+
40+
- Source: Glboal Energy Monitor
41+
- Link: https://globalenergymonitor.org/projects/global-integrated-power-tracker/
42+
- License: Creative Commons Attribution 4.0 International Public License
43+
- Description: powerplant, renewable and transmission data
44+
45+
### Population
46+
Gridded population data
47+
48+
- Source: WorldPop (www.worldpop.org - School of Geography and Environmental Science, University of Southampton; Department of Geography and Geosciences, University of Louisville; Departement de Geographie, Universite de Namur) and Center for International Earth Science Information Network (CIESIN), Columbia University (2018). Global High Resolution Population Denominators Project - Funded by The Bill and Melinda Gates Foundation (OPP1134076). https://dx.doi.org/10.5258/SOTON/WP00647
49+
- Link: https://hub.worldpop.org/doi/10.5258/SOTON/WP00647
50+
- License: CC-BY 4.0 (reference)
51+
- Description: Gridded population data.
52+

tests/integration/test_workflow.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,14 @@ def launch_subprocess(cmd: str, env=None) -> subprocess.CompletedProcess:
4848
logging.info("\n\t".join(res.stdout.split("\n")))
4949
logging.info(f"return code: {res.returncode}")
5050
logging.info(f"====== stderr ====== :\n {'\n\t'.join(res.stderr.split('\n'))}")
51+
return res
5152
except subprocess.CalledProcessError as e:
5253
logging.error(e.stderr)
5354
logging.error(e)
54-
assert False, "Workflow integration test failed"
55-
return res
55+
# Return the failed process info instead of raising assertion
56+
return subprocess.CompletedProcess(
57+
args=e.cmd, returncode=e.returncode, stdout=e.stdout, stderr=e.stderr
58+
)
5659

5760

5861
# TODO: add existing baseyear, add remind_coupled, add_plotting
@@ -116,7 +119,7 @@ def test_dry_run(make_test_config_file):
116119
"""Simple workflow test to check the snakemake inputs and outputs are valid"""
117120
cfg = make_test_config_file
118121
cmd = f"snakemake --configfile {cfg} -n -f"
119-
cmd += " --rerun-incomplete"
122+
cmd += " --rerun-incomplete --rerun-triggers input"
120123
res = launch_subprocess(cmd)
121124
if res.returncode != 0:
122125
hash_id = copy_failed_config(cfg)
-66.4 KB
Binary file not shown.

tests/testdata/landuse_availability/Bare.tif renamed to tests/testdata/landuse_availability/Copernicus_LC100_discrete_classification_2019.tif

File renamed without changes.

tests/testdata/landuse_availability/GEBCO_tiff/gebco_2024_CN.tif renamed to tests/testdata/landuse_availability/GEBCO_tiff/gebco_2025_CN.tif

File renamed without changes.
Binary file not shown.
-66.5 KB
Binary file not shown.
-66.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)