From a5d0f07fe13f39cbc437c218324df90195646fb4 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Thu, 14 Mar 2024 15:29:27 +0100 Subject: [PATCH] build_cutout: revert to master version --- scripts/build_cutout.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/build_cutout.py b/scripts/build_cutout.py index 80ddae34..1edb18ce 100644 --- a/scripts/build_cutout.py +++ b/scripts/build_cutout.py @@ -109,11 +109,9 @@ if __name__ == "__main__": cutout_params = snakemake.params.cutouts[snakemake.wildcards.cutout] - if "time" not in cutout_params: - snapshots = pd.date_range(freq="h", **snakemake.params.snapshots) - cutout_params["time"] = [snapshots[0], snapshots[-1]] - - cutout_params["time"] = slice(*cutout_params["time"]) + snapshots = pd.date_range(freq="h", **snakemake.params.snapshots) + time = [snapshots[0], snapshots[-1]] + cutout_params["time"] = slice(*cutout_params.get("time", time)) if {"x", "y", "bounds"}.isdisjoint(cutout_params): # Determine the bounds from bus regions with a buffer of two grid cells