Merge pull request #333 from PyPSA/fix/snakefile-renewable-wildcards

Constrain Snakefile rule build_renewable_profiles with wildcard_constraint
This commit is contained in:
Fabian Neumann 2022-03-24 14:20:41 +01:00 committed by GitHub
commit 8f74d1e266
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -201,15 +201,15 @@ rule build_renewable_profiles:
benchmark: "benchmarks/build_renewable_profiles_{technology}"
threads: ATLITE_NPROCESSES
resources: mem_mb=ATLITE_NPROCESSES * 5000
wildcard_constraints: technology="(?!hydro).*" # Any technology other than hydro
script: "scripts/build_renewable_profiles.py"
if 'hydro' in config['renewable'].keys():
rule build_hydro_profile:
input:
country_shapes='resources/country_shapes.geojson',
eia_hydro_generation='data/bundle/EIA_hydro_generation_2000_2014.csv',
cutout="cutouts/" + config["renewable"]['hydro']['cutout'] + ".nc"
cutout=f"cutouts/{config['renewable']['hydro']['cutout']}.nc" if "hydro" in config["renewable"] else "config['renewable']['hydro']['cutout'] not configured",
output: 'resources/profile_hydro.nc'
log: "logs/build_hydro_profile.log"
resources: mem_mb=5000