doc: document powerplantmatching changes from #84

This commit is contained in:
Fabian Neumann 2019-11-06 15:59:34 +01:00
parent cabe2e2a3f
commit 0fb57601bf
4 changed files with 40 additions and 3 deletions

View File

@ -33,7 +33,9 @@ if config['enable']['prepare_links_p_nom']:
script: 'scripts/prepare_links_p_nom.py'
rule build_powerplants:
input: base_network="networks/base.nc"
input:
base_network="networks/base.nc",
custom_powerplants="data/custom_powerplants.csv"
output: "resources/powerplants.csv"
threads: 1
resources: mem=500

View File

@ -0,0 +1 @@
id,Name,Fueltype,Technology,Set,Country,Capacity,Efficiency,Duration,Volume_Mm3,DamHeight_m,YearCommissioned,Retrofit,lat,lon,projectID
1 id Name Fueltype Technology Set Country Capacity Efficiency Duration Volume_Mm3 DamHeight_m YearCommissioned Retrofit lat lon projectID

View File

@ -9,4 +9,6 @@ extendable_carriers,,,
max_hours,,,
-- battery,h,float,"Maximum state of charge capacity of the battery in terms of hours at full output capacity ``p_nom``. Cf. `PyPSA documentation <https://pypsa.readthedocs.io/en/latest/components.html#storage-unit>`_."
-- H2,h,float,"Maximum state of charge capacity of the hydrogen storage in terms of hours at full output capacity ``p_nom``. Cf. `PyPSA documentation <https://pypsa.readthedocs.io/en/latest/components.html#storage-unit>`_."
powerplants_filter,--,"use `pandas.query <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.query.html>`_ strings here, e.g. Country not in ['Germany']","Filter query for the default powerplant database."
custom_powerplants,--,"use `pandas.query <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.query.html>`_ 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``."

1 Unit Values Description
9 max_hours
10 -- battery h float Maximum state of charge capacity of the battery in terms of hours at full output capacity ``p_nom``. Cf. `PyPSA documentation <https://pypsa.readthedocs.io/en/latest/components.html#storage-unit>`_.
11 -- H2 h float Maximum state of charge capacity of the hydrogen storage in terms of hours at full output capacity ``p_nom``. Cf. `PyPSA documentation <https://pypsa.readthedocs.io/en/latest/components.html#storage-unit>`_.
12 powerplants_filter -- use `pandas.query <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.query.html>`_ strings here, e.g. Country not in ['Germany'] Filter query for the default powerplant database.
13 custom_powerplants -- use `pandas.query <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.query.html>`_ strings here, e.g. Country in ['Germany'] Filter query for the custom powerplant database.
14 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``.

View File

@ -1,6 +1,6 @@
# coding: utf-8
"""
Retrieves conventional powerplant capacities and locations from `powerplantmatching <https://github.com/FRESNA/powerplantmatching>`_, assigns these to buses and creates a ``.csv`` file.
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
-----------------
@ -13,12 +13,13 @@ Relevant Settings
.. seealso::
Documentation of the configuration file ``config.yaml`` at
:ref:`toplevel_cf`
: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
Outputs
-------
@ -33,6 +34,37 @@ Outputs
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 amendmends. 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
"""
import logging