-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSnakefile
More file actions
44 lines (36 loc) · 1.44 KB
/
Snakefile
File metadata and controls
44 lines (36 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Emulate a user configuring the module.
configfile: workflow.source_path("./test_config.yaml")
# Import the module and configure it.
# `snakefile:` specifies the module. It can use file paths and special github(...) / gitlab(...) markers
# `config`: specifies the module configuration.
# `pathvars:` helps you re-wire where the module places files.
module module_hydropower:
pathvars:
# Redirect specific user resources (inputs)
shapes="resources/inputs/{shapes}/shapes.parquet",
powerplants="resources/inputs/{shapes}/powerplants.parquet",
# Redirect specific module results (outputs)
aggregated_inflow_pu="results/outputs/{shapes}/{plant_type}_pu.parquet",
# Redirect module intermediate files
logs="resources/hydropower/logs",
resources="resources/hydropower/resources",
results="resources/hydropower/results",
snakefile:
"../../workflow/Snakefile"
config:
config["module_hydropower"]
# rename all module rules with a prefix, to avoid naming conflicts.
use rule * from module_hydropower as module_hydropower_*
PLANTS = ["run_of_river", "reservoir"]
SHAPES = ["MNE"]
# Request something from the module
rule all:
default_target: True
input:
expand(
"results/outputs/{shapes}/{plant_type}_pu.parquet",
shapes=SHAPES,
plant_type=PLANTS,
),
message:
"Generate PU timeseries for a small country."