From ad189c5391cc87e3cbb19483509912ad1d82354f Mon Sep 17 00:00:00 2001 From: Yerbol Akhmetov <113768325+yerbol-akhmetov@users.noreply.github.com> Date: Wed, 16 Oct 2024 01:22:50 +0500 Subject: [PATCH] Fix issue of adding H2 store in `add_extra_components` rule (#1134) * fix issue of adding H2 store and make H2 Store in AC buses * add release notes * Add H2 Stores to both AC and DC buses --- doc/release_notes.rst | 2 ++ scripts/add_extra_components.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 1ea2f5393..470e9743d 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -26,6 +26,8 @@ E.g. if a new rule becomes available describe how to use it `make test` and in o * Include a dedicated cutout for Europe in bundle_config.yaml `PR #1125 `_ +* Fix the mismatch between buses and x, y locations while creating H2 Stores `PR #1134 `_ + PyPSA-Earth 0.4.1 ================= diff --git a/scripts/add_extra_components.py b/scripts/add_extra_components.py index cab8195df..2c317c305 100644 --- a/scripts/add_extra_components.py +++ b/scripts/add_extra_components.py @@ -104,7 +104,7 @@ def attach_stores(n, costs, config): _add_missing_carriers_from_costs(n, costs, carriers) - buses_i = n.buses.query("carrier == 'AC'").index + buses_i = n.buses.index bus_sub_dict = {k: n.buses[k].values for k in ["x", "y", "country"]} if "H2" in carriers: