diff --git a/rules/build_electricity.smk b/rules/build_electricity.smk index e0517933..a9e111ea 100644 --- a/rules/build_electricity.smk +++ b/rules/build_electricity.smk @@ -25,9 +25,11 @@ rule build_electricity_demand: load=config_provider("load"), input: reported=ancient("data/electricity_demand_raw.csv"), - artificial=lambda w: ancient("data/load_artificial_raw.csv") - if config_provider("load", "supplement_missing_data_artificially")(w) - else [], + artificial=lambda w: ( + ancient("data/load_artificial_raw.csv") + if config_provider("load", "supplement_missing_data_artificially")(w) + else [] + ), output: resources("electricity_demand.csv"), log: diff --git a/rules/postprocess.smk b/rules/postprocess.smk index ac7bf983..dc08699f 100644 --- a/rules/postprocess.smk +++ b/rules/postprocess.smk @@ -23,9 +23,7 @@ if config["foresight"] != "perfect": resources: mem_mb=4000, benchmark: - benchmarks( - "plot_power_network_clustered/elec_s{simpl}_{clusters}" - ) + benchmarks("plot_power_network_clustered/elec_s{simpl}_{clusters}") conda: "../envs/environment.yaml" script: @@ -37,9 +35,7 @@ if config["foresight"] != "perfect": 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" - ), + 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", @@ -66,9 +62,7 @@ if config["foresight"] != "perfect": 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" - ), + regions=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"), output: map=RESULTS + "maps/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}-h2_network_{planning_horizons}.pdf", @@ -94,9 +88,7 @@ if config["foresight"] != "perfect": 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" - ), + regions=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"), output: map=RESULTS + "maps/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}-ch4_network_{planning_horizons}.pdf", @@ -133,9 +125,7 @@ if config["foresight"] == "perfect": 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" - ), + regions=resources("regions_onshore_elec_s{simpl}_{clusters}.geojson"), output: unpack(output_map_year), threads: 2 @@ -292,8 +282,7 @@ rule plot_elec_statistics: plotting=config_provider("plotting"), barplots=STATISTICS_BARPLOTS, input: - network=RESULTS - + "networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc", + network=RESULTS + "networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc", output: **{ f"{plot}_bar": RESULTS