From 17d7403f20fd5d7e279f33feae9d777a04da371e Mon Sep 17 00:00:00 2001 From: Fabian Hofmann Date: Fri, 24 Jun 2022 15:34:26 +0200 Subject: [PATCH] build_powerplants: apply suggestions from code review Co-authored-by: Martha Frysztacki --- doc/configtables/electricity.csv | 2 +- scripts/build_powerplants.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/configtables/electricity.csv b/doc/configtables/electricity.csv index 3ec26106..5abae842 100644 --- a/doc/configtables/electricity.csv +++ b/doc/configtables/electricity.csv @@ -14,6 +14,6 @@ max_hours,,, powerplants_filter,--,"use `pandas.query `_ strings here, e.g. Country not in ['Germany']",Filter query for the default powerplant database. custom_powerplants,--,"use `pandas.query `_ strings here, e.g. Country in ['Germany']",Filter query for the custom powerplant database. conventional_carriers,--,"Any subset of {nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass}",List of conventional power plants to include in the model from ``resources/powerplants.csv``. If an included carrier is also listed in `extendable_carriers`, the capacity is taken as a lower bound. -renewable_carriers,--,"Any subset of {solar, offwind-ac, offwind-dc, hydro}",List of renewable generators to include in the model. +renewable_carriers,--,"Any subset of {solar, onwind, offwind-ac, offwind-dc, hydro}",List of renewable generators to include in the model. estimate_renewable_capacities,,, "-- Fueltype [ppm], e.g. Wind",,"list of fueltypes strings in PyPSA-Eur, e.g. [onwind, offwind-ac, offwind-dc]",converts ppm Fueltype to PyPSA-EUR Fueltype diff --git a/scripts/build_powerplants.py b/scripts/build_powerplants.py index c1ee4127..a5dbf57b 100755 --- a/scripts/build_powerplants.py +++ b/scripts/build_powerplants.py @@ -131,7 +131,7 @@ if __name__ == "__main__": custom_ppl_query = snakemake.config['electricity']['custom_powerplants'] ppl = add_custom_powerplants(ppl, snakemake.input.custom_powerplants, custom_ppl_query) - countries_wo_ppl = [c for c in countries if c not in ppl.Country.unique()] + countries_wo_ppl = set(countries)-set(ppl.Country.unique()) if countries_wo_ppl: logging.warning(f"No powerplants known in: {', '.join(countries_wo_ppl)}")