From 0cd659eaedaff9069d9463932e84160e1890b70d Mon Sep 17 00:00:00 2001 From: cpschau Date: Tue, 17 Sep 2024 14:31:53 +0200 Subject: [PATCH 1/2] fix ppm processing bug --- scripts/build_powerplants.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/build_powerplants.py b/scripts/build_powerplants.py index 71b701c1b..350c46fff 100644 --- a/scripts/build_powerplants.py +++ b/scripts/build_powerplants.py @@ -285,10 +285,8 @@ def replace_natural_gas_technology(df: pd.DataFrame): unique_tech_with_ng = df.loc[fueltype, "Technology"].unique() unknown_techs = np.setdiff1d(unique_tech_with_ng, ["CCGT", "OCGT"]) if len(unknown_techs) > 0: - df.Technology.where( - fueltype, - df["Technology"].map({t: "CCGT" for t in unknown_techs}), - inplace=True, + df.loc[fueltype, "Technology"] = df.loc[fueltype, "Technology"].replace( + {t: "CCGT" for t in unknown_techs} ) df["Fueltype"] = np.where(fueltype, df["Technology"], df["Fueltype"]) return df From 82a47891bb459264239672d2ec83dca83db4f1f8 Mon Sep 17 00:00:00 2001 From: cpschau Date: Wed, 18 Sep 2024 13:15:52 +0200 Subject: [PATCH 2/2] add release_note --- doc/release_notes.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 3d0537917..95c7572fd 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -22,6 +22,7 @@ E.g. if a new rule becomes available describe how to use it `snakemake -j1 run_t * Fixed problematic float parsing (`_parse_float`) in `clean_osm_data.py` to make sure all OSM lines are correctly accounted for `PR #1089 `__ * Fix minor bug for advanced csp implementation `PR #1076 `__ +* Fix minor bug in `build_powerplants.py` where the gas technology assignment incorrectly introduced NaN values for all powerplant technologies. `PR #1102 `__ PyPSA-Earth 0.4.0