From bbff4297f97f6593f462da1cbc8a1ea737353dc9 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Mon, 26 Aug 2024 17:16:06 +0200 Subject: [PATCH] temporarily disable n.shapes until memory issues resolved (#1238) --- scripts/base_network.py | 4 ++-- scripts/cluster_network.py | 4 ++-- scripts/simplify_network.py | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/base_network.py b/scripts/base_network.py index afb66387..0f661c28 100644 --- a/scripts/base_network.py +++ b/scripts/base_network.py @@ -1008,12 +1008,12 @@ if __name__ == "__main__": ) shapes.to_file(snakemake.output.regions_onshore) - append_bus_shapes(n, shapes, "onshore") + # append_bus_shapes(n, shapes, "onshore") if offshore_regions: shapes = pd.concat(offshore_regions, ignore_index=True) shapes.to_file(snakemake.output.regions_offshore) - append_bus_shapes(n, shapes, "offshore") + # append_bus_shapes(n, shapes, "offshore") else: offshore_shapes.to_frame().to_file(snakemake.output.regions_offshore) diff --git a/scripts/cluster_network.py b/scripts/cluster_network.py index b63747c2..4460b0ad 100644 --- a/scripts/cluster_network.py +++ b/scripts/cluster_network.py @@ -557,12 +557,12 @@ if __name__ == "__main__": ): # also available: linemap_positive, linemap_negative getattr(clustering, attr).to_csv(snakemake.output[attr]) - nc.shapes = n.shapes.copy() + # nc.shapes = n.shapes.copy() for which in ["regions_onshore", "regions_offshore"]: regions = gpd.read_file(snakemake.input[which]) clustered_regions = cluster_regions((clustering.busmap,), regions) clustered_regions.to_file(snakemake.output[which]) - append_bus_shapes(nc, clustered_regions, type=which.split("_")[1]) + # append_bus_shapes(nc, clustered_regions, type=which.split("_")[1]) nc.meta = dict(snakemake.config, **dict(wildcards=dict(snakemake.wildcards))) nc.export_to_netcdf(snakemake.output.network) diff --git a/scripts/simplify_network.py b/scripts/simplify_network.py index 124618cb..e9589120 100644 --- a/scripts/simplify_network.py +++ b/scripts/simplify_network.py @@ -669,7 +669,7 @@ if __name__ == "__main__": n.lines.drop(remove, axis=1, errors="ignore", inplace=True) if snakemake.wildcards.simpl: - shapes = n.shapes + # shapes = n.shapes n, cluster_map = cluster( n, int(snakemake.wildcards.simpl), @@ -679,7 +679,7 @@ if __name__ == "__main__": params.simplify_network["feature"], params.aggregation_strategies, ) - n.shapes = shapes + # n.shapes = shapes busmaps.append(cluster_map) update_p_nom_max(n) @@ -691,7 +691,7 @@ if __name__ == "__main__": regions = gpd.read_file(snakemake.input[which]) clustered_regions = cluster_regions(busmaps, regions) clustered_regions.to_file(snakemake.output[which]) - append_bus_shapes(n, clustered_regions, type=which.split("_")[1]) + # append_bus_shapes(n, clustered_regions, type=which.split("_")[1]) n.meta = dict(snakemake.config, **dict(wildcards=dict(snakemake.wildcards))) n.export_to_netcdf(snakemake.output.network)