From a65cf7cac48c62371723c6d28d2dc8bef8370bcd Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Fri, 5 Aug 2022 17:44:08 +0200 Subject: [PATCH] make_summary: add weather_year wildcard to multiindex --- scripts/make_summary.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/make_summary.py b/scripts/make_summary.py index 8d5f4e48..358b7b5c 100644 --- a/scripts/make_summary.py +++ b/scripts/make_summary.py @@ -528,7 +528,7 @@ def make_summaries(networks_dict): columns = pd.MultiIndex.from_tuples( networks_dict.keys(), - names=["cluster", "lv", "opt", "planning_horizon"] + names=["weather_year", "cluster", "lv", "opt", "planning_horizon"] ) df = {} @@ -562,8 +562,9 @@ if __name__ == "__main__": snakemake = mock_snakemake('make_summary') networks_dict = { - (cluster, lv, opt+sector_opt, planning_horizon) : - snakemake.config['results_dir'] + snakemake.config['run'] + f'/postnetworks/elec_s{simpl}_{cluster}_lv{lv}_{opt}_{sector_opt}_{planning_horizon}.nc' \ + (weather_year, cluster, lv, opt+sector_opt, planning_horizon) : + snakemake.config['results_dir'] + snakemake.config['run'] + f'/postnetworks/elec{weather_year}_s{simpl}_{cluster}_lv{lv}_{opt}_{sector_opt}_{planning_horizon}.nc' \ + for weather_year in snakemake.config['scenario']['weather_year'] for simpl in snakemake.config['scenario']['simpl'] \ for cluster in snakemake.config['scenario']['clusters'] \ for opt in snakemake.config['scenario']['opts'] \