From 0a09bcaf738db25723cf1a4af3458c7eeb14bdec Mon Sep 17 00:00:00 2001 From: yerbol-akhmetov Date: Sat, 4 Jan 2025 17:55:45 +0500 Subject: [PATCH 1/3] do not compute powerplants from ppm if replace option is used --- scripts/build_powerplants.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/scripts/build_powerplants.py b/scripts/build_powerplants.py index 4bf22e524..b1719108d 100644 --- a/scripts/build_powerplants.py +++ b/scripts/build_powerplants.py @@ -337,13 +337,16 @@ def replace_natural_gas_technology(df: pd.DataFrame): else: config["main_query"] = "" - ppl = ( - pm.powerplants(from_url=False, update=True, config_update=config) - .powerplant.fill_missing_decommissioning_years() - .query('Fueltype not in ["Solar", "Wind"] and Country in @countries_names') - .powerplant.convert_country_to_alpha2() - .pipe(replace_natural_gas_technology) - ) + if snakemake.config["electricity"]["custom_powerplants"] != "replace": + ppl = ( + pm.powerplants(from_url=False, update=True, config_update=config) + .powerplant.fill_missing_decommissioning_years() + .query('Fueltype not in ["Solar", "Wind"] and Country in @countries_names') + .powerplant.convert_country_to_alpha2() + .pipe(replace_natural_gas_technology) + ) + else: + ppl = pd.DataFrame() ppl = add_custom_powerplants( ppl, snakemake.input, snakemake.config From c3a1eb19802361e91f2b1efb6eb851a9eca1a52a Mon Sep 17 00:00:00 2001 From: yerbol-akhmetov Date: Sat, 4 Jan 2025 19:16:42 +0500 Subject: [PATCH 2/3] Add release notes --- doc/release_notes.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 280904488..9faf38931 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -42,6 +42,8 @@ PyPSA-Earth 0.6.0 * Update BW, NG and BJ tutorial databundles to include gadm-like sources from geoboundaries `PR #1257 `__ +* Prevent computation of powerplantmatching if replace option is selected for custom_powerplants `PR #1281 `__ + PyPSA-Earth 0.5.0 ================= From 395aaecd98112b82ff46c72f75a19b1ecaab36de Mon Sep 17 00:00:00 2001 From: Davide Fioriti Date: Sat, 4 Jan 2025 17:04:21 +0100 Subject: [PATCH 3/3] Move release note and drop DateMothball column from custom_powerplants --- data/custom_powerplants.csv | 2 +- doc/release_notes.rst | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/custom_powerplants.csv b/data/custom_powerplants.csv index fb83a5ff4..d81c32bca 100644 --- a/data/custom_powerplants.csv +++ b/data/custom_powerplants.csv @@ -1 +1 @@ -Name,Fueltype,Technology,Set,Country,Capacity,Efficiency,Duration,Volume_Mm3,DamHeight_m,StorageCapacity_MWh,DateIn,DateRetrofit,DateMothball,DateOut,lat,lon,EIC,projectID,bus +Name,Fueltype,Technology,Set,Country,Capacity,Efficiency,Duration,Volume_Mm3,DamHeight_m,StorageCapacity_MWh,DateIn,DateRetrofit,DateOut,lat,lon,EIC,projectID,bus diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 9faf38931..80f8f7410 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -16,6 +16,8 @@ This part of documentation collects descriptive release notes to capture the mai **Minor Changes and bug-fixing** +* Prevent computation of powerplantmatching if replace option is selected for custom_powerplants `PR #1281 `__ + PyPSA-Earth 0.6.0 ================= @@ -42,8 +44,6 @@ PyPSA-Earth 0.6.0 * Update BW, NG and BJ tutorial databundles to include gadm-like sources from geoboundaries `PR #1257 `__ -* Prevent computation of powerplantmatching if replace option is selected for custom_powerplants `PR #1281 `__ - PyPSA-Earth 0.5.0 =================