Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.
13 changes: 13 additions & 0 deletions workflow/scripts/export_ariadne_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -5210,6 +5210,19 @@ def process_postnetworks(n, n_start, model_year, snakemake, costs):
n.links.loc[h2_links_kern, "capital_cost"] = capital_costs
n.links.loc[h2_links_kern, "overnight_cost"] = overnight_costs

logger.info("Assing average Kernnetz cost to carrier H2 pipeline (Kernnetz)")
h2_links_kern = n.links.query("carrier == 'H2 pipeline (Kernnetz))'").index
capital_costs = (
0.7 * costs.at["H2 (g) pipeline", "fixed"]
+ 0.3 * costs.at["H2 (g) pipeline repurposed", "fixed"]
) * n.links.loc[h2_links_kern, "length"]
overnight_costs = (
0.7 * costs.at["H2 (g) pipeline", "investment"]
+ 0.3 * costs.at["H2 (g) pipeline repurposed", "investment"]
) * n.links.loc[h2_links_kern, "length"]
n.links.loc[h2_links_kern, "capital_cost"] = capital_costs
n.links.loc[h2_links_kern, "overnight_cost"] = overnight_costs

logger.info("Post-Discretizing DC links")
_dc_lambda = lambda x: get_discretized_value(
x,
Expand Down
37 changes: 25 additions & 12 deletions workflow/scripts/modify_prenetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,18 +206,31 @@ def add_wasserstoff_kernnetz(n, wkn, costs):

names = wkn_new.index + f"-kernnetz-{investment_year}"

capital_costs = np.where(
wkn_new.retrofitted == False,
costs.at["H2 (g) pipeline", "fixed"] * wkn_new.length.values,
costs.at["H2 (g) pipeline repurposed", "fixed"] * wkn_new.length.values,
)

overnight_costs = np.where(
wkn_new.retrofitted == False,
costs.at["H2 (g) pipeline", "investment"] * wkn_new.length.values,
costs.at["H2 (g) pipeline repurposed", "investment"]
* wkn_new.length.values,
)
# capital_costs = np.where(
# wkn_new.retrofitted == False,
# costs.at["H2 (g) pipeline", "fixed"] * wkn_new.length.values,
# costs.at["H2 (g) pipeline repurposed", "fixed"] * wkn_new.length.values,
# )

# overnight_costs = np.where(
# wkn_new.retrofitted == False,
# costs.at["H2 (g) pipeline", "investment"] * wkn_new.length.values,
# costs.at["H2 (g) pipeline repurposed", "investment"]
# * wkn_new.length.values,
# )

# fix: pipes from Kernnetz data in the model are over-proportinally many retrofitted projects as they are longer
# do not use own cost data for retrofitted and new build pipes as this would underestimate the investment cost
# reconstruct average Kernnetz invest (250€/MW*km) from our costs data

capital_costs = (
0.7 * costs.at["H2 (g) pipeline", "fixed"]
+ 0.3 * costs.at["H2 (g) pipeline repurposed", "fixed"]
) * wkn_new.length.values
overnight_costs = (
0.7 * costs.at["H2 (g) pipeline", "investment"]
+ 0.3 * costs.at["H2 (g) pipeline repurposed", "investment"]
) * wkn_new.length.values

lifetime = np.where(
wkn_new.retrofitted == False,
Expand Down
1 change: 1 addition & 0 deletions workflow/scripts/plot_ariadne_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -2316,6 +2316,7 @@ def plot_elec_map_de(

m = network.copy()
m.remove("Bus", m.buses[m.buses.x == 0].index)
m.remove("Bus", m.buses[m.buses.x == 0].index)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this really need to be called twice?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably a merging duplicate

m.buses.drop(m.buses.index[m.buses.carrier != "AC"], inplace=True)

m_base = base_network.copy()
Expand Down
Loading