From 3b133223c2f91f4fae5a88dc70b1102c60550ebb Mon Sep 17 00:00:00 2001 From: ulfmueller Date: Thu, 6 Jun 2024 12:47:14 +0200 Subject: [PATCH 1/6] change x of transformer since in pypsa the base power is the individual s_nom of each transformer --- src/egon/data/datasets/osmtgmod/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/egon/data/datasets/osmtgmod/__init__.py b/src/egon/data/datasets/osmtgmod/__init__.py index 21a84b73a..ba1913a9f 100644 --- a/src/egon/data/datasets/osmtgmod/__init__.py +++ b/src/egon/data/datasets/osmtgmod/__init__.py @@ -583,7 +583,7 @@ def to_pypsa(): branch_id AS trafo_id, f_bus AS bus0, t_bus AS bus1, - br_x/100 AS x, --- change base from 100MVA (osmtgmod) to 1 MVA (pypsa) + br_x/(100 * rate_a) AS x, --- change base from 100MVA (osmtgmod) to the its individual s_nom (pypsa) rate_a as s_nom, rate_a as s_nom_min, TRUE, From c1c6dcad603fad02224ce9ae2361eb804eb46f5c Mon Sep 17 00:00:00 2001 From: CarlosEpia Date: Wed, 23 Oct 2024 15:04:24 +0200 Subject: [PATCH 2/6] add osmtgmod as a dependency for electrical_neighbours --- src/egon/data/airflow/dags/pipeline_status_quo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/egon/data/airflow/dags/pipeline_status_quo.py b/src/egon/data/airflow/dags/pipeline_status_quo.py index a93dd57dd..a76083648 100755 --- a/src/egon/data/airflow/dags/pipeline_status_quo.py +++ b/src/egon/data/airflow/dags/pipeline_status_quo.py @@ -335,7 +335,7 @@ # Deal with electrical neighbours foreign_lines = ElectricalNeighbours( - dependencies=[prepare_pypsa_eur, tyndp_data] + dependencies=[prepare_pypsa_eur, tyndp_data, osmtgmod, fix_subnetworks] ) # Import NEP (Netzentwicklungsplan) data From 86011056f0b3cfd1f9ee8d8f41cee212c500d123 Mon Sep 17 00:00:00 2001 From: CarlosEpia Date: Wed, 23 Oct 2024 15:04:58 +0200 Subject: [PATCH 3/6] cast number of cables to int --- src/egon/data/datasets/electrical_neighbours.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/egon/data/datasets/electrical_neighbours.py b/src/egon/data/datasets/electrical_neighbours.py index 752dc959e..5a6032572 100644 --- a/src/egon/data/datasets/electrical_neighbours.py +++ b/src/egon/data/datasets/electrical_neighbours.py @@ -538,6 +538,7 @@ def cross_border_lines(scenario, sources, targets, central_buses): new_lines = new_lines[new_lines.bus0 != new_lines.bus1] + new_lines["cables"] = new_lines["cables"].apply(int) # Insert lines to the database new_lines.to_postgis( From c7e08191c85916f816efd9bd91c65974c44673d8 Mon Sep 17 00:00:00 2001 From: CarlosEpia Date: Fri, 8 Nov 2024 09:52:57 +0100 Subject: [PATCH 4/6] use old_bnetza_mastr --- src/egon/data/datasets/storages/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/egon/data/datasets/storages/__init__.py b/src/egon/data/datasets/storages/__init__.py index 9f2445272..a3aed51dc 100755 --- a/src/egon/data/datasets/storages/__init__.py +++ b/src/egon/data/datasets/storages/__init__.py @@ -309,7 +309,7 @@ def allocate_storage_units_sq(scn_name, storage_types): for storage_type in storage_types: # Read-in data from MaStR mastr_ph = pd.read_csv( - WORKING_DIR_MASTR_NEW / sources["mastr_storage"], + WORKING_DIR_MASTR_OLD / sources["mastr_storage"], delimiter=",", usecols=[ "Nettonennleistung", From cc658fa45bcc7316c26ca7b7c1966833a297500a Mon Sep 17 00:00:00 2001 From: Kilian Helfenbein Date: Fri, 22 Nov 2024 15:08:19 +0100 Subject: [PATCH 5/6] bugfix #343 which didn't allow for multiple values for the scenario parameter in the cli and therefore interpreted multiple values as one string --- src/egon/data/cli.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/egon/data/cli.py b/src/egon/data/cli.py index f99f29213..d12f59b78 100644 --- a/src/egon/data/cli.py +++ b/src/egon/data/cli.py @@ -179,6 +179,7 @@ default=["status2019", "eGon2035"], metavar="SCENARIOS", help=("List of scenario names for which a data model shall be created."), + multiple=True, show_default=True, ) @click.option( From 84b403f4fedb761566cb373987f53da458a80653 Mon Sep 17 00:00:00 2001 From: Kilian Helfenbein Date: Fri, 22 Nov 2024 15:11:24 +0100 Subject: [PATCH 6/6] adapt changelog --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 34c180f38..74e4d093a 100755 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -738,6 +738,9 @@ Bug Fixes `#179 `_ * Fix depricated python-operator import `#183 `_ +* Fix incorrect YAML serialization of the --scenarios CLI + parameter that caused broken DAGs in the pipeline. + `#343 `_ .. _PR #692: https://github.com/openego/eGon-data/pull/692