diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 3f8dd022..03fdbaf4 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -3628,7 +3628,10 @@ def set_temporal_aggregation(n, resolution, snapshot_weightings): """ Aggregate time-varying data to the given snapshots. """ - if "sn" in resolution.lower(): + if not resolution: + logger.info("No temporal aggregation. Using native resolution.") + return n + elif "sn" in resolution.lower(): # Representative snapshots are dealt with directly sn = int(resolution[:-2]) logger.info("Use every %s snapshot as representative", sn) diff --git a/scripts/time_aggregation.py b/scripts/time_aggregation.py index 97bf180a..7ed69112 100644 --- a/scripts/time_aggregation.py +++ b/scripts/time_aggregation.py @@ -79,8 +79,8 @@ if __name__ == "__main__": resolution = snakemake.params.time_resolution # Representative snapshots - if isinstance(resolution, str) and "sn" in resolution.lower(): - logger.info("Use representative snapshots") + if not resolution or isinstance(resolution, str) and "sn" in resolution.lower(): + logger.info("Use representative snapshot or no aggregation at all") # Output an empty csv; this is taken care of in prepare_sector_network.py pd.DataFrame().to_csv(snakemake.output.snapshot_weightings)