Skip to content

Commit c9cc079

Browse files
committed
feat: add global cutout_directory to config
1 parent 31a8074 commit c9cc079

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Snakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from pathlib import Path
66
import yaml
7-
from os.path import normpath, exists
7+
from os.path import normpath, exists, join
88
from shutil import copyfile, move, rmtree
99
from snakemake.utils import min_version
1010

@@ -31,7 +31,7 @@ benchmarks = path_provider("benchmarks/", RDIR, shared_resources, exclude_from_s
3131
resources = path_provider("resources/", RDIR, shared_resources, exclude_from_shared)
3232

3333
cutout_dir = config["atlite"]["cutout_directory"]
34-
CDIR = cutout_dir + "/" + ("" if run["shared_cutouts"] else RDIR)
34+
CDIR = join(cutout_dir, ("" if run["shared_cutouts"] else RDIR))
3535
RESULTS = "results/" + RDIR
3636

3737

rules/build_electricity.smk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ rule build_hydro_profile:
363363
eia_hydro_generation="data/eia_hydro_annual_generation.csv",
364364
eia_hydro_capacity="data/eia_hydro_annual_capacity.csv",
365365
era5_runoff="data/era5-annual-runoff-per-country.csv",
366-
cutout=lambda w: fCDIR
366+
cutout=lambda w: CDIR
367367
+ config_provider("renewable", "hydro", "cutout")(w)
368368
+ ".nc",
369369
output:

0 commit comments

Comments
 (0)