Skip to content

Commit

Permalink
Revise fig 7
Browse files Browse the repository at this point in the history
  • Loading branch information
KathiEsterl committed Jun 24, 2024
1 parent cf27683 commit 2bdf1ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions etrago/rev_figures.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ def foreign_sto_expansion(network):

etrago = Etrago(csv_folder_name="Calcs/kmedoids-dijkstra/300")

etrago.plot_grid(line_colors='expansion_abs', bus_colors='storage_expansion', bus_sizes=0.000001, ext_min=0.01, legend_entries=[], boundaries=[0, 20000])
etrago.plot_grid(line_colors='expansion_abs', bus_colors='storage_expansion', bus_sizes=0.000001, ext_min=0.01, legend_entries=[], boundaries=[0, 7200])

etrago = Etrago(csv_folder_name="Calcs/kmeans/300")

etrago.plot_grid(line_colors='expansion_abs', bus_colors='storage_expansion', bus_sizes=0.000001, ext_min=0.01, legend_entries=[], boundaries=[0, 20000])
etrago.plot_grid(line_colors='expansion_abs', bus_colors='storage_expansion', bus_sizes=0.000001, ext_min=0.01, legend_entries=[], boundaries=[0, 7200])
11 changes: 7 additions & 4 deletions etrago/tools/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1847,12 +1847,12 @@ def plot_grid(
#scale heat store representation
bus_sizes[bus_sizes.index.get_level_values('carrier').str.contains('heat')] /=10

bus_legend = "Storage expansion"
bus_legend = "storage expansion"
bus_unit = "GW"
elif bus_colors == "h2_battery_storage_expansion":
bus_scaling = bus_sizes
bus_sizes = bus_scaling * calc_storage_expansion_per_bus(network, carriers=["battery", "H2_overground", "H2_underground"])
bus_legend = "Storage expansion"
bus_legend = "storage expansion"
bus_unit = "GW"
elif bus_colors == "storage_distribution":
bus_scaling = bus_sizes
Expand Down Expand Up @@ -1916,14 +1916,17 @@ def plot_grid(
bus_sizes = bus_sizes.reset_index()
bus_sizes = bus_sizes[bus_sizes.carrier.str.contains("H2")]
bus_sizes.set_index(["bus", "carrier"], inplace=True)
bus_legend = "Storage expansion"
bus_legend = "storage expansion"
bus_unit = "GW"
else:
logger.warning("bus_color {} undefined".format(bus_colors))

if type(link_widths) != int:
link_widths.loc[network.links.carrier != "DC"] = 0

#import pdb; pdb.set_trace()
link_widths=3
line_widths=3
ll = network.plot(
line_colors=line_colors,
link_colors=link_colors,
Expand All @@ -1934,7 +1937,7 @@ def plot_grid(
line_widths=line_widths,
link_widths=link_widths,
flow=flow,
title=title,
#title=title,
geomap=False,
projection=ccrs.PlateCarree(),
color_geomap=True,
Expand Down

0 comments on commit 2bdf1ce

Please sign in to comment.