Skip to content

Rule build_powerplants

Workflow Diagram

See the complete workflow in the repository.

digraph snakemake_dag { graph [bgcolor=white, margin=0, size="8,5" ]; node [fontname=sans, fontsize=10, penwidth=2, shape=box, style=rounded ]; edge [color=grey, penwidth=2 ]; 4 [color="0.61 0.6 0.85", label=add_electricity]; 6 [color="0.17 0.6 0.85", label=base_network]; 7 [color="0.58 0.6 0.85", fillcolor=gray, label=build_powerplants, style=filled]; 6 -> 7; 7 -> 4; }

Script Documentation

Retrieves conventional powerplant capacities and locations from powerplantmatching <https://github.com/FRESNA/powerplantmatching>_, assigns these to buses and creates a .csv file. It is possible to amend the powerplant database with custom entries provided in data/custom_powerplants.csv.

Relevant Settings

.. code:: yaml

electricity:
  powerplants_filter:
  custom_powerplants:

.. seealso:: Documentation of the configuration file config.yaml at :ref:electricity

Inputs

  • networks/base.nc: confer :ref:base.
  • data/custom_powerplants.csv: custom powerplants in the same format as powerplantmatching <https://github.com/FRESNA/powerplantmatching>_ provides or as OSM extractor generates

Outputs

  • resource/powerplants.csv: A list of conventional power plants (i.e. neither wind nor solar) with fields for name, fuel type, technology, country, capacity in MW, duration, commissioning year, retrofit year, latitude, longitude, and dam information as documented in the powerplantmatching README <https://github.com/FRESNA/powerplantmatching/blob/master/README.md>_; additionally it includes information on the closest substation/bus in networks/base.nc.

    .. image:: /img/powerplantmatching.png :width: 30 %

    Source: powerplantmatching on GitHub <https://github.com/FRESNA/powerplantmatching>_

Description

The configuration options electricity: powerplants_filter and electricity: custom_powerplants can be used to control whether data should be retrieved from the original powerplants database or from custom amendments. These specify pandas.query <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.query.html>_ commands.

  1. Adding all powerplants from custom:

    .. code:: yaml

    powerplants_filter: false
    custom_powerplants: true
    
  2. Replacing powerplants in e.g. Germany by custom data:

    .. code:: yaml

    powerplants_filter: Country not in ['Germany']
    custom_powerplants: true
    

    or

    .. code:: yaml

    powerplants_filter: Country not in ['Germany']
    custom_powerplants: Country in ['Germany']
    
  3. Adding additional built year constraints:

    .. code:: yaml

    powerplants_filter: Country not in ['Germany'] and YearCommissioned <= 2015
    custom_powerplants: YearCommissioned <= 2015
    

Format required for the custom_powerplants.csv should be similar to the powerplantmatching format with some additional considerations:

Columns required: [id, Name, Fueltype, Technology, Set, Country, Capacity, Efficiency, DateIn, DateRetrofit, DateOut, lat, lon, Duration, Volume_Mm3, DamHeight_m, StorageCapacity_MWh, EIC, projectID]

Tagging considerations for columns in the file:

  • FuelType: 'Natural Gas' has to be tagged either as 'OCGT', 'CCGT'
  • Technology: 'Reservoir' has to be set as 'ror' if hydro powerplants are to be considered as 'Generators' and not 'StorageUnits'
  • Country: Country name has to be defined with its alpha2 code ('NG' for Nigeria,'BO' for Bolivia, 'FR' for France, etc.

The following assumptions were done to map custom OSM-extracted power plants with powerplantmatching format.

  1. The benchmark PPM keys values were taken as follows: 'Fueltype': ['Hydro', 'Hard Coal', 'Natural Gas', 'Lignite', 'Nuclear', 'Oil', 'Bioenergy' 'Wind', 'Geothermal', 'Solar', 'Waste', 'Other']

    'Technology': ['Reservoir', 'Pumped Storage', 'Run-Of-River', 'Steam Turbine', 'CCGT', 'OCGT'
        'Pv', 'CCGT, Thermal', 'Offshore', 'Storage Technologies']
    
    'Set': ['Store', 'PP', 'CHP']
    
  2. OSM-extracted features were mapped into PPM ones using a (quite arbitrary) set of rules: 'coal': 'Hard Coal' 'wind_turbine': 'Onshore', 'horizontal_axis' : 'Onshore', 'vertical_axis' : 'Offhore', 'nuclear': 'Steam Turbine'

  3. All hydro OSM-extracted objects were interpreted as generation technologies, although ["Run-Of-River", "Pumped Storage", "Reservoir"] in PPM can belong to 'Storage Technologies', too.
  4. OSM extraction was supposed to be ignoring non-generation features like CHP and Natural Gas storage (in contrast to PPM).

replace_natural_gas_technology(df)

Maps and replaces gas technologies in the powerplants.csv onto model compliant carriers.