temporarily disable n.shapes until memory issues resolved (#1238)

This commit is contained in:
Fabian Neumann 2024-08-26 17:16:06 +02:00 committed by GitHub
parent 66051e04d4
commit bbff4297f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)