Skip to content

Commit

Permalink
Merge pull request #908 from PyPSA/revert_kernnetz
Browse files Browse the repository at this point in the history
deleted code to include kernnetz as it is no longer needed
  • Loading branch information
fneum authored Feb 5, 2024
2 parents 9fd25aa + 550e6f0 commit 3c6714a
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions scripts/prepare_sector_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -1319,22 +1319,6 @@ def add_storage_and_grids(n, costs):
n, "H2 pipeline ", carriers=["DC", "gas pipeline"]
)

h2_pipes["p_nom"] = 0.0

if snakemake.input.get("custom_h2_pipelines"):
fn = snakemake.input.custom_h2_pipelines
custom_pipes = pd.read_csv(fn, index_col=0)

h2_pipes = pd.concat([h2_pipes, custom_pipes])

# drop duplicates according to buses (order can be different) and keep pipe with highest p_nom
h2_pipes["buses_sorted"] = h2_pipes[["bus0", "bus1"]].apply(sorted, axis=1)
h2_pipes = (
h2_pipes.sort_values("p_nom")
.drop_duplicates(subset=["buses_sorted"], keep="last")
.drop(columns="buses_sorted")
)

# TODO Add efficiency losses
n.madd(
"Link",
Expand All @@ -1343,7 +1327,6 @@ def add_storage_and_grids(n, costs):
bus1=h2_pipes.bus1.values + " H2",
p_min_pu=-1,
p_nom_extendable=True,
p_nom_min=h2_pipes.p_nom.values,
length=h2_pipes.length.values,
capital_cost=costs.at["H2 (g) pipeline", "fixed"] * h2_pipes.length.values,
carrier="H2 pipeline",
Expand Down

0 comments on commit 3c6714a

Please sign in to comment.