From 65e35135e18a2eab21fe4c8e4de17fe0e6278235 Mon Sep 17 00:00:00 2001 From: euronion <42553970+euronion@users.noreply.github.com> Date: Fri, 18 Mar 2022 11:13:58 +0100 Subject: [PATCH 1/4] Update Snakefile --- Snakefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Snakefile b/Snakefile index 4b8fa0b3..a2d4c4b2 100644 --- a/Snakefile +++ b/Snakefile @@ -201,19 +201,19 @@ rule build_renewable_profiles: benchmark: "benchmarks/build_renewable_profiles_{technology}" threads: ATLITE_NPROCESSES resources: mem_mb=ATLITE_NPROCESSES * 5000 + wildcard_constraints: technology="solar|onwind|offwind-ac|offwind-dc" 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" - output: 'resources/profile_hydro.nc' - log: "logs/build_hydro_profile.log" - resources: mem_mb=5000 - script: 'scripts/build_hydro_profile.py' +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" + output: 'resources/profile_hydro.nc' + log: "logs/build_hydro_profile.log" + resources: mem_mb=5000 + script: 'scripts/build_hydro_profile.py' rule add_electricity: From da72f5487dbfd247b49a4c652378e41619dd1214 Mon Sep 17 00:00:00 2001 From: euronion <42553970+euronion@users.noreply.github.com> Date: Fri, 18 Mar 2022 14:29:50 +0100 Subject: [PATCH 2/4] Update Snakefile --- Snakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Snakefile b/Snakefile index a2d4c4b2..5286aa06 100644 --- a/Snakefile +++ b/Snakefile @@ -209,7 +209,7 @@ 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 From 30cb861ca2644e4c1acc3e1a7425c9e746bcb46b Mon Sep 17 00:00:00 2001 From: euronion <42553970+euronion@users.noreply.github.com> Date: Mon, 21 Mar 2022 09:37:50 +0100 Subject: [PATCH 3/4] Update Snakefile --- Snakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Snakefile b/Snakefile index 5286aa06..dc8277ea 100644 --- a/Snakefile +++ b/Snakefile @@ -201,7 +201,7 @@ rule build_renewable_profiles: benchmark: "benchmarks/build_renewable_profiles_{technology}" threads: ATLITE_NPROCESSES resources: mem_mb=ATLITE_NPROCESSES * 5000 - wildcard_constraints: technology="solar|onwind|offwind-ac|offwind-dc" + wildcard_constraints: technology="^(?!hydro).*$" # Any technology other than hydro script: "scripts/build_renewable_profiles.py" From e2e98120b17b3ae2c6137d7257dc17f6a05aa0b9 Mon Sep 17 00:00:00 2001 From: euronion <42553970+euronion@users.noreply.github.com> Date: Mon, 21 Mar 2022 10:01:34 +0100 Subject: [PATCH 4/4] Update Snakefile --- Snakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Snakefile b/Snakefile index dc8277ea..a0709043 100644 --- a/Snakefile +++ b/Snakefile @@ -201,7 +201,7 @@ 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 + wildcard_constraints: technology="(?!hydro).*" # Any technology other than hydro script: "scripts/build_renewable_profiles.py"