fix syntax errors

This commit is contained in:
Fabian Neumann 2022-06-23 15:17:41 +02:00
parent 37c052667a
commit 9f91af28e7
3 changed files with 9 additions and 9 deletions

View File

@ -309,7 +309,7 @@ def plot_h2_map(network):
)
n.plot(
geomap=False,
# geomap=False,
bus_sizes=0,
link_colors='#72d3d6',
link_widths=link_widths_retro,
@ -443,7 +443,7 @@ def plot_ch4_map(network):
)
n.plot(
geomap=False,
# geomap=False,
ax=ax,
bus_sizes=0.,
link_colors='#e8d1d1',
@ -453,7 +453,7 @@ def plot_ch4_map(network):
)
n.plot(
geomap=False,
# geomap=False,
ax=ax,
bus_sizes=0.,
link_colors=link_color_used,

View File

@ -51,7 +51,7 @@ def rename_techs(label):
"ror": "hydroelectricity",
"hydro": "hydroelectricity",
"PHS": "hydroelectricity",
"NH3": "ammonia"
"NH3": "ammonia",
"co2 Store": "DAC",
"co2 stored": "CO2 sequestration",
"AC": "transmission lines",
@ -256,7 +256,7 @@ def plot_balances():
df = df / 1e6
#remove trailing link ports
df.index = [i[:-1] if ((i != "co2") and (i[-1:] in ["0","1","2","3"])) else i for i in df.index]
df.index = [i[:-1] if ((i not in ["co2", "NH3"]) and (i[-1:] in ["0","1","2","3"])) else i for i in df.index]
df = df.groupby(df.index.map(rename_techs)).sum()

View File

@ -100,7 +100,7 @@ def define_spatial(nodes, options):
spatial.ammonia.nodes = nodes + " NH3"
spatial.ammonia.locations = nodes
else:
spatial.ammonia.nodes = ["EU ammonia"]
spatial.ammonia.nodes = ["EU NH3"]
spatial.ammonia.locations = ["EU"]
spatial.ammonia.df = pd.DataFrame(vars(spatial.ammonia), index=nodes)
@ -690,8 +690,8 @@ def add_ammonia(n, costs):
bus2=nodes + " H2",
p_nom_extendable=True,
carrier="Haber-Bosch",
efficiency=1 / (cf_industry["MWh_elec_per_tNH3_electrolysis"] / cf_industry["MWh_NH3_per_tNH3"]) # output: MW_NH3 per MW_elec
efficiency2=-cf_industry["MWh_H2_per_tNH3_electrolysis"] / cf_industry["MWh_elec_per_tNH3_electrolysis"] # input: MW_H2 per MW_elec
efficiency=1 / (cf_industry["MWh_elec_per_tNH3_electrolysis"] / cf_industry["MWh_NH3_per_tNH3"]), # output: MW_NH3 per MW_elec
efficiency2=-cf_industry["MWh_H2_per_tNH3_electrolysis"] / cf_industry["MWh_elec_per_tNH3_electrolysis"], # input: MW_H2 per MW_elec
capital_cost=costs.at["Haber-Bosch synthesis", "fixed"],
lifetime=costs.at["Haber-Bosch synthesis", 'lifetime']
)
@ -703,7 +703,7 @@ def add_ammonia(n, costs):
bus1=nodes + " H2",
p_nom_extendable=True,
carrier="ammonia cracker",
efficiency=1 / cf_industry["MWh_NH3_per_MWh_H2_cracker"]
efficiency=1 / cf_industry["MWh_NH3_per_MWh_H2_cracker"],
capital_cost=costs.at["Ammonia cracker", "fixed"] / cf_industry["MWh_NH3_per_MWh_H2_cracker"], # given per MW_H2
lifetime=costs.at['Ammonia cracker', 'lifetime']
)