make plot_network conditional
This commit is contained in:
parent
890c80e047
commit
e5673731ab
@ -7,56 +7,57 @@ localrules:
|
|||||||
copy_config,
|
copy_config,
|
||||||
copy_conda_env,
|
copy_conda_env,
|
||||||
|
|
||||||
|
if config["foresight"] != "perfect":
|
||||||
|
rule plot_network:
|
||||||
|
params:
|
||||||
|
foresight=config["foresight"],
|
||||||
|
plotting=config["plotting"],
|
||||||
|
input:
|
||||||
|
network=RESULTS
|
||||||
|
+ "postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
|
||||||
|
regions=RESOURCES + "regions_onshore_elec_s{simpl}_{clusters}.geojson",
|
||||||
|
output:
|
||||||
|
map=RESULTS
|
||||||
|
+ "maps/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}-costs-all_{planning_horizons}.pdf",
|
||||||
|
today=RESULTS
|
||||||
|
+ "maps/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}-today.pdf",
|
||||||
|
threads: 2
|
||||||
|
resources:
|
||||||
|
mem_mb=10000,
|
||||||
|
benchmark:
|
||||||
|
(
|
||||||
|
BENCHMARKS
|
||||||
|
+ "plot_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
|
||||||
|
)
|
||||||
|
conda:
|
||||||
|
"../envs/environment.yaml"
|
||||||
|
script:
|
||||||
|
"../scripts/plot_network.py"
|
||||||
|
|
||||||
rule plot_network:
|
if config["foresight"] == "perfect":
|
||||||
params:
|
rule plot_network:
|
||||||
foresight=config["foresight"],
|
params:
|
||||||
plotting=config["plotting"],
|
foresight=config["foresight"],
|
||||||
input:
|
plotting=config["plotting"],
|
||||||
network=RESULTS
|
input:
|
||||||
+ "postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
|
network=RESULTS
|
||||||
regions=RESOURCES + "regions_onshore_elec_s{simpl}_{clusters}.geojson",
|
+ "postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_brownfield_all_years.nc",
|
||||||
output:
|
regions=RESOURCES + "regions_onshore_elec_s{simpl}_{clusters}.geojson",
|
||||||
map=RESULTS
|
output:
|
||||||
+ "maps/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}-costs-all_{planning_horizons}.pdf",
|
map=RESULTS
|
||||||
today=RESULTS
|
+ "maps/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}-costs-all_{year}.pdf",
|
||||||
+ "maps/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}-today.pdf",
|
today=RESULTS
|
||||||
threads: 2
|
+ "maps/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{year}-today.pdf",
|
||||||
resources:
|
threads: 2
|
||||||
mem_mb=10000,
|
resources:
|
||||||
benchmark:
|
mem_mb=10000,
|
||||||
(
|
benchmark:
|
||||||
BENCHMARKS
|
BENCHMARKS
|
||||||
+ "plot_network/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
|
+ "postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{year}_brownfield_all_years_benchmark.txt",
|
||||||
)
|
conda:
|
||||||
conda:
|
"../envs/environment.yaml"
|
||||||
"../envs/environment.yaml"
|
script:
|
||||||
script:
|
"../scripts/plot_network.py"
|
||||||
"../scripts/plot_network.py"
|
|
||||||
|
|
||||||
rule plot_network_perfect:
|
|
||||||
params:
|
|
||||||
foresight=config["foresight"],
|
|
||||||
plotting=config["plotting"],
|
|
||||||
input:
|
|
||||||
network=RESULTS
|
|
||||||
+ "postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_brownfield_all_years.nc",
|
|
||||||
regions=RESOURCES + "regions_onshore_elec_s{simpl}_{clusters}.geojson",
|
|
||||||
output:
|
|
||||||
map=RESULTS
|
|
||||||
+ "maps/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}-costs-all_{year}.pdf",
|
|
||||||
today=RESULTS
|
|
||||||
+ "maps/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{year}-today.pdf",
|
|
||||||
threads: 2
|
|
||||||
resources:
|
|
||||||
mem_mb=10000,
|
|
||||||
benchmark:
|
|
||||||
BENCHMARKS
|
|
||||||
+ "postnetworks/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{year}_brownfield_all_years_benchmark.txt",
|
|
||||||
conda:
|
|
||||||
"../envs/environment.yaml"
|
|
||||||
script:
|
|
||||||
"../scripts/plot_network.py"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user