fix EU bus location with new config setting

This commit is contained in:
Fabian Neumann 2022-04-12 16:21:09 +02:00
parent c5ca8f4c20
commit cdd56288ff
2 changed files with 9 additions and 2 deletions

View File

@ -388,6 +388,9 @@ plotting:
color_geomap:
ocean: white
land: whitesmoke
eu_node_location:
x: -5.5
y: 46.
costs_max: 1000
costs_threshold: 1
energy_max: 20000

View File

@ -115,7 +115,9 @@ def plot_map(network, components=["links", "stores", "storage_units", "generator
costs = costs.stack() # .sort_index()
# hack because impossible to drop buses...
n.buses.loc["EU gas", ["x", "y"]] = n.buses.loc["DE0 0", ["x", "y"]]
eu_location = snakemake.config["plotting"].get("eu_node_location", dict(x=-5.5, y=46))
n.buses.loc["EU gas", "x"] = eu_location["x"]
n.buses.loc["EU gas", "y"] = eu_location["y"]
n.links.drop(n.links.index[(n.links.carrier != "DC") & (
n.links.carrier != "B2B")], inplace=True)
@ -524,7 +526,9 @@ def plot_map_without(network):
# hack because impossible to drop buses...
if "EU gas" in n.buses.index:
n.buses.loc["EU gas", ["x", "y"]] = n.buses.loc["DE0 0", ["x", "y"]]
eu_location = snakemake.config["plotting"].get("eu_node_location", dict(x=-5.5, y=46))
n.buses.loc["EU gas", "x"] = eu_location["x"]
n.buses.loc["EU gas", "y"] = eu_location["y"]
to_drop = n.links.index[(n.links.carrier != "DC") & (n.links.carrier != "B2B")]
n.links.drop(to_drop, inplace=True)