Skip to content

Commit

Permalink
Merge pull request #1084 from openego/features/#1081_isolated_gas_pip…
Browse files Browse the repository at this point in the history
…eline

Fix isolated gas pipelines
  • Loading branch information
AmeliaNadal committed Feb 1, 2023
2 parents 5ac8248 + 4736533 commit 3140f2f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,8 @@ Bug Fixes
`#1015 <https://github.com/openego/eGon-data/issues/1015>`_
* Fix installed capacity per individual heat pump
`#1058 <https://github.com/openego/eGon-data/issues/1058>`_
* Fix gas pipelines isolated of the German grid
`#1081 <https://github.com/openego/eGon-data/issues/1081>`_
* Fix aggregation of DSM-components
`#1058 <https://github.com/openego/eGon-data/issues/1069>`_
* Fix URL of TYNDP scenario dataset
Expand Down
21 changes: 17 additions & 4 deletions src/egon/data/datasets/gas_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class GasNodesandPipes(Dataset):
def __init__(self, dependencies):
super().__init__(
name="GasNodesandPipes",
version="0.0.8",
version="0.0.9",
dependencies=dependencies,
tasks=(insert_gas_data, insert_gas_data_eGon100RE),
)
Expand Down Expand Up @@ -393,13 +393,26 @@ def insert_gas_pipeline_list(
gas_pipelines_list = gas_pipelines_list[
gas_pipelines_list["country_code"].str.contains("DE")
]

# Remove links disconnected of the rest of the grid
# Remove manually for disconnected link EntsoG_Map__ST_195
# Remove manually for disconnected link EntsoG_Map__ST_195 and EntsoG_Map__ST_108
gas_pipelines_list = gas_pipelines_list[
gas_pipelines_list["node_id"] != "['SEQ_11790_p', 'Stor_EU_107']"
]
gas_pipelines_list = gas_pipelines_list[
~gas_pipelines_list["id"].str.match("EntsoG_Map__ST_195")
~gas_pipelines_list["id"].str.match("EntsoG_Map__ST_108")
]

# Manually add pipeline to artificially connect isolated pipeline
gas_pipelines_list.at["new_pipe", "param"] = gas_pipelines_list[
gas_pipelines_list["id"] == "NO_PS_8_Seg_0_Seg_23"
]["param"].values[0]
gas_pipelines_list.at[
"new_pipe", "node_id"
] = "['SEQ_12442_p', 'LKD_N_200']"
gas_pipelines_list.at["new_pipe", "lat"] = "[53.358536, 53.412719]"
gas_pipelines_list.at["new_pipe", "long"] = "[7.041677, 7.093251]"
gas_pipelines_list.at["new_pipe", "country_code"] = "['DE', 'DE']"

gas_pipelines_list["link_id"] = range(
new_id, new_id + len(gas_pipelines_list)
)
Expand Down

0 comments on commit 3140f2f

Please sign in to comment.