Skip to content

Commit

Permalink
Merge pull request #959 from openego/features/#958-delete-gas-bus
Browse files Browse the repository at this point in the history
Delete uncorrect gas bus
  • Loading branch information
AmeliaNadal committed Oct 28, 2022
2 parents 0c1e51f + e1406ad commit e4fc048
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,8 @@ Bug Fixes
`#914 <https://github.com/openego/eGon-data/issues/914>`_
* Drop era5 weather cell table using cascade
`#909 <https://github.com/openego/eGon-data/issues/909>`_
* Delete gas bus with wrong country code
`#958 <https://github.com/openego/eGon-data/issues/958>`_
* Overwrite capacities for conventional power plants with data from nep list
`#403 <https://github.com/openego/eGon-data/issues/403>`_

Expand Down
12 changes: 11 additions & 1 deletion 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.7",
version="0.0.8",
dependencies=dependencies,
tasks=(insert_gas_data, insert_gas_data_eGon100RE),
)
Expand Down Expand Up @@ -97,6 +97,9 @@ def define_gas_nodes_list():
gas_nodes_list.loc[
gas_nodes_list["id"] == "SEQ_10608_p", "country_code"
] = "NL"
gas_nodes_list.loc[
gas_nodes_list["id"] == "N_88_NS_LMGN", "country_code"
] = "XX"

gas_nodes_list = gas_nodes_list.rename(columns={"lat": "y", "long": "x"})

Expand Down Expand Up @@ -486,6 +489,13 @@ def insert_gas_pipeline_list(
gas_pipelines_list["id"] == "LKD_PS_0_Seg_0_Seg_3", "country_0"
] = "NL" # bus "SEQ_10608_p" DE -> NL

# Remove uncorrect pipelines
gas_pipelines_list = gas_pipelines_list[
(gas_pipelines_list["id"] != "PLNG_2637_Seg_0_Seg_0_Seg_0")
& (gas_pipelines_list["id"] != "NSG_6650_Seg_2_Seg_0")
& (gas_pipelines_list["id"] != "NSG_6734_Seg_2_Seg_0")
]

# Remove link test if length = 0
gas_pipelines_list = gas_pipelines_list[
gas_pipelines_list["length_km"] != 0
Expand Down

0 comments on commit e4fc048

Please sign in to comment.