replace config.yaml by config/config.yaml in doc and docstrings
This commit is contained in:
parent
7b42a2251a
commit
1f6f7a2039
@ -9,7 +9,7 @@
|
||||
Configuration
|
||||
##########################################
|
||||
|
||||
PyPSA-Eur has several configuration options which are documented in this section and are collected in a ``config.yaml`` file located in the root directory. Users should copy the provided default configuration (``config.default.yaml``) and amend their own modifications and assumptions in the user-specific configuration file (``config.yaml``); confer installation instructions at :ref:`defaultconfig`.
|
||||
PyPSA-Eur has several configuration options which are documented in this section and are collected in a ``config/config.yaml`` file located in the root directory. Users should copy the provided default configuration (``config/config.default.yaml``) and amend their own modifications and assumptions in the user-specific configuration file (``config/config.yaml``); confer installation instructions at :ref:`defaultconfig`.
|
||||
|
||||
.. _toplevel_cf:
|
||||
|
||||
|
@ -9,7 +9,7 @@ Techno-Economic Assumptions
|
||||
|
||||
The database of cost assumptions is retrieved from the repository
|
||||
`PyPSA/technology-data <https://github.com/pypsa/technology-data>`_ and then
|
||||
saved to a file ``data/costs_{year}.csv``. The ``config.yaml`` provides options
|
||||
saved to a file ``data/costs_{year}.csv``. The ``config/config.yaml`` provides options
|
||||
to choose a reference year and use a specific version of the repository.
|
||||
|
||||
.. literalinclude:: ../config.default.yaml
|
||||
@ -48,7 +48,7 @@ Modifying Assumptions
|
||||
=====================
|
||||
|
||||
Some cost assumptions (e.g. marginal cost and capital cost) can be directly
|
||||
set in the ``config.yaml`` (cf. Section :ref:`costs_cf` in
|
||||
set in the ``config/config.yaml`` (cf. Section :ref:`costs_cf` in
|
||||
:ref:`config`). To change cost assumptions in more detail, make a copy of
|
||||
``data/costs_{year}.csv`` and reference the new cost file in the ``Snakefile``:
|
||||
|
||||
|
@ -28,7 +28,7 @@ It does not affect the year for cost and technology assumptions, which is set se
|
||||
costs:
|
||||
year: 2030
|
||||
|
||||
For running overnight scenarios, use in the ``config.yaml``:
|
||||
For running overnight scenarios, use in the ``config/config.yaml``:
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
@ -44,7 +44,7 @@ Perfect foresight scenarios
|
||||
Perfect foresight is currently under development and not yet implemented.
|
||||
|
||||
For running perfect foresight scenarios, in future versions you will be able to
|
||||
set in the ``config.yaml``:
|
||||
set in the ``config/config.yaml``:
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
@ -94,13 +94,13 @@ evolve with the myopic approach:
|
||||
Configuration
|
||||
--------------
|
||||
|
||||
For running myopic foresight transition scenarios, set in ``config.yaml``:
|
||||
For running myopic foresight transition scenarios, set in ``config/config.yaml``:
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
foresight: myopic
|
||||
|
||||
The following options included in the config.yaml file are relevant for the
|
||||
The following options included in the ``config/config.yaml`` file are relevant for the
|
||||
myopic code.
|
||||
|
||||
The ``{planning_horizons}`` wildcard indicates the year in which the network is
|
||||
@ -163,7 +163,7 @@ Options
|
||||
The total carbon budget for the entire transition path can be indicated in the
|
||||
`sector_opts
|
||||
<https://github.com/PyPSA/pypsa-eur-sec/blob/f13902510010b734c510c38c4cae99356f683058/config.default.yaml#L25>`_
|
||||
in ``config.yaml``. The carbon budget can be split among the
|
||||
in ``config/config.yaml``. The carbon budget can be split among the
|
||||
``planning_horizons`` following an exponential or beta decay. E.g. ``'cb40ex0'``
|
||||
splits a carbon budget equal to 40 Gt :math:`_{CO_2}` following an exponential
|
||||
decay whose initial linear growth rate r is zero. They can also follow some
|
||||
@ -218,7 +218,7 @@ add_brownfield for the remaining planning_horizons.
|
||||
``results/run_name/networks/prenetworks-brownfield``.
|
||||
|
||||
Steps 2 and 3 are solved recursively for all the planning_horizons included in
|
||||
``config.yaml``.
|
||||
``config/config.yaml``.
|
||||
|
||||
Rule overview
|
||||
--------------
|
||||
|
@ -119,19 +119,19 @@ Handling Configuration Files
|
||||
============================
|
||||
|
||||
PyPSA-Eur has several configuration options that must be specified in a
|
||||
``config.yaml`` file located in the root directory. An example configuration
|
||||
``config.default.yaml`` is maintained in the repository, which will be used to
|
||||
automatically create your customisable ``config.yaml`` on first use. More
|
||||
``config/config.yaml`` file located in the root directory. An example configuration
|
||||
``config/config.default.yaml`` is maintained in the repository, which will be used to
|
||||
automatically create your customisable ``config/config.yaml`` on first use. More
|
||||
details on the configuration options are in :ref:`config`.
|
||||
|
||||
You can also use ``snakemake`` to specify another file, e.g.
|
||||
``config.mymodifications.yaml``, to update the settings of the ``config.yaml``.
|
||||
``config/config.mymodifications.yaml``, to update the settings of the ``config/config.yaml``.
|
||||
|
||||
.. code:: bash
|
||||
|
||||
.../pypsa-eur % snakemake -call --configfile config.mymodifications.yaml
|
||||
.../pypsa-eur % snakemake -call --configfile config/config.mymodifications.yaml
|
||||
|
||||
.. warning::
|
||||
Users are advised to regularly check their own ``config.yaml`` against changes
|
||||
in the ``config.default.yaml`` when pulling a new version from the remote
|
||||
Users are advised to regularly check their own ``config/config.yaml`` against changes
|
||||
in the ``config/config.default.yaml`` when pulling a new version from the remote
|
||||
repository.
|
||||
|
@ -74,7 +74,7 @@ what data to retrieve and what files to produce. Details are explained in
|
||||
:ref:`wildcards` and :ref:`scenario`.
|
||||
|
||||
The model also has several further configuration options collected in the
|
||||
``config.yaml`` file located in the root directory, which that are not part of
|
||||
``config/config.yaml`` file located in the root directory, which that are not part of
|
||||
the scenarios. Options are explained in :ref:`config`.
|
||||
|
||||
Folder Structure
|
||||
|
@ -339,7 +339,7 @@ PyPSA-Eur 0.5.0 (27th July 2022)
|
||||
* Network building is made deterministic by supplying a fixed random state to
|
||||
network clustering routines.
|
||||
|
||||
* Clustering strategies for generator and bus attributes can now be specified directly in the ``config.yaml``.
|
||||
* Clustering strategies for generator and bus attributes can now be specified directly in the ``config/config.yaml``.
|
||||
|
||||
* Iterative solving with impedance updates is skipped if there are no expandable
|
||||
lines.
|
||||
|
@ -42,7 +42,7 @@ The :ref:`tutorial` uses a smaller cutout than required for the full model (30 M
|
||||
build_cutout:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`toplevel_cf`
|
||||
|
||||
**Outputs**
|
||||
@ -69,7 +69,7 @@ This rule, as a substitute for :mod:`build_natura_raster`, downloads an already
|
||||
build_natura_raster:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`toplevel_cf`
|
||||
|
||||
**Outputs**
|
||||
@ -111,7 +111,7 @@ This rule downloads techno-economic assumptions from the `technology-data reposi
|
||||
version:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`costs_cf`
|
||||
|
||||
**Outputs**
|
||||
|
@ -11,7 +11,7 @@ Spatial resolution
|
||||
|
||||
The default nodal resolution of the model follows the electricity generation and transmission model `PyPSA-Eur <https://github.com/PyPSA/pypsa-eur>`_, which clusters down the electricity transmission substations in each European country based on the k-means algorithm (See `cluster_network <https://pypsa-eur.readthedocs.io/en/latest/simplification/cluster_network.html#rule-cluster-network>`_ for a complete explanation). This gives nodes which correspond to major load and generation centres (typically cities).
|
||||
|
||||
The total number of nodes for Europe is set in the ``config.yaml`` file under ``clusters``. The number of nodes can vary between 37, the number of independent countries / synchronous areas, and several hundred. With 200-300 nodes the model needs 100-150 GB RAM to solve with a commercial solver like Gurobi.
|
||||
The total number of nodes for Europe is set in the ``config/config.yaml`` file under ``clusters``. The number of nodes can vary between 37, the number of independent countries / synchronous areas, and several hundred. With 200-300 nodes the model needs 100-150 GB RAM to solve with a commercial solver like Gurobi.
|
||||
|
||||
Exemplary unsolved network clustered to 512 nodes:
|
||||
|
||||
@ -21,7 +21,7 @@ Exemplary unsolved network clustered to 37 nodes:
|
||||
|
||||
.. image:: ../graphics/elec_s_37.png
|
||||
|
||||
The total number of nodes for Europe is set in the config.yaml file under `clusters <https://github.com/PyPSA/pypsa-eur-sec/blob/3daff49c9999ba7ca7534df4e587e1d516044fc3/config.default.yaml#L20>`_. The number of nodes can vary between 37, the number of independent countries/synchronous areas, and several hundred. With 200-300 nodes, the model needs 100-150 GB RAM to solve with a commercial solver like Gurobi.
|
||||
The total number of nodes for Europe is set in the ``config/config.yaml`` file under `clusters <https://github.com/PyPSA/pypsa-eur-sec/blob/3daff49c9999ba7ca7534df4e587e1d516044fc3/config.default.yaml#L20>`_. The number of nodes can vary between 37, the number of independent countries/synchronous areas, and several hundred. With 200-300 nodes, the model needs 100-150 GB RAM to solve with a commercial solver like Gurobi.
|
||||
Not all of the sectors are at the full nodal resolution, and some demand for some sectors is distributed to nodes using heuristics that need to be corrected. Some networks are copper-plated to reduce computational times.
|
||||
|
||||
Here are some examples of how spatial resolution is set for different sectors in PyPSA-Eur-Sec:
|
||||
|
@ -189,7 +189,7 @@ higher costs and higher efficiency gains. They are added by step-wise
|
||||
linearisation in form of two additional generations in
|
||||
the `prepare_sector_network.py <https://github.com/PyPSA/pypsa-eur-sec/blob/3daff49c9999ba7ca7534df4e587e1d516044fc3/scripts/prepare_sector_network.py#L1600>`_ script.
|
||||
|
||||
Settings in the config.yaml concerning the endogenously optimisation of building
|
||||
Settings in the ``config/config.yaml`` concerning the endogenously optimisation of building
|
||||
renovation include `cost factor <https://github.com/PyPSA/pypsa-eur-sec/blob/3daff49c9999ba7ca7534df4e587e1d516044fc3/config.default.yaml#L223>`_, `interest rate <https://github.com/PyPSA/pypsa-eur-sec/blob/3daff49c9999ba7ca7534df4e587e1d516044fc3/config.default.yaml#L224>`_, `annualised cost <https://github.com/PyPSA/pypsa-eur-sec/blob/3daff49c9999ba7ca7534df4e587e1d516044fc3/config.default.yaml#L225>`_, `tax weighting <https://github.com/PyPSA/pypsa-eur-sec/blob/3daff49c9999ba7ca7534df4e587e1d516044fc3/config.default.yaml#L226>`_, and `construction index <https://github.com/PyPSA/pypsa-eur-sec/blob/3daff49c9999ba7ca7534df4e587e1d516044fc3/config.default.yaml#L227>`_.
|
||||
|
||||
Further information are given in the study by Zeyen et al. : `Mitigating heat demand peaks in buildings in a highly renewable European energy system, (2021) <https://arxiv.org/abs/2012.01831>`_.
|
||||
|
@ -26,7 +26,7 @@ local machine. The tutorial will cover examples on how to configure and
|
||||
customise the PyPSA-Eur model and run the ``snakemake`` workflow step by step
|
||||
from network creation to the solved network. The configuration for the tutorial
|
||||
is located at ``test/config.electricity.yaml``. It includes parts deviating from
|
||||
the default config file ``config.default.yaml``. To run the tutorial with this
|
||||
the default config file ``config/config.default.yaml``. To run the tutorial with this
|
||||
configuration, execute
|
||||
|
||||
.. code:: bash
|
||||
@ -282,7 +282,7 @@ For example, you can explore the evolution of the PyPSA networks by running
|
||||
#. ``snakemake resources/networks/elec_s_6.nc -call --configfile test/config.electricity.yaml``
|
||||
#. ``snakemake resources/networks/elec_s_6_ec_lcopt_Co2L-24H.nc -call --configfile test/config.electricity.yaml``
|
||||
|
||||
To run all combinations of wildcard values provided in the ``config.yaml`` under ``scenario:``,
|
||||
To run all combinations of wildcard values provided in the ``config/config.yaml`` under ``scenario:``,
|
||||
you can use the collection rule ``solve_elec_networks``.
|
||||
|
||||
.. code:: bash
|
||||
@ -290,7 +290,7 @@ you can use the collection rule ``solve_elec_networks``.
|
||||
snakemake -call solve_elec_networks --configfile test/config.electricity.yaml
|
||||
|
||||
If you now feel confident and want to tackle runs with larger temporal and
|
||||
spatial scope, clean-up the repository and after modifying the ``config.yaml`` file
|
||||
spatial scope, clean-up the repository and after modifying the ``config/config.yaml`` file
|
||||
target the collection rule ``solve_elec_networks`` again without providing the test
|
||||
configuration file.
|
||||
|
||||
|
@ -29,7 +29,7 @@ Overnight Scenarios
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
The default configuration file (``config.default.yaml``) is set up for running
|
||||
The default configuration file (``config/config.default.yaml``) is set up for running
|
||||
overnight scenarios. Running a sector-coupled model unlocks many further
|
||||
configuration options. In the example below, we say that the gas network should
|
||||
be added and spatially resolved. We also say that the existing gas network may
|
||||
@ -513,7 +513,7 @@ Scaling-Up
|
||||
==========
|
||||
|
||||
If you now feel confident and want to tackle runs with larger temporal, technological and
|
||||
spatial scope, clean-up the repository and after modifying the ``config.yaml`` file
|
||||
spatial scope, clean-up the repository and after modifying the ``config/config.yaml`` file
|
||||
target the collection rule ``all`` again without providing the test
|
||||
configuration file.
|
||||
|
||||
|
@ -83,7 +83,7 @@ def load_network(import_name=None, custom_components=None):
|
||||
custom_components : dict
|
||||
Dictionary listing custom components.
|
||||
For using ``snakemake.config['override_components']``
|
||||
in ``config.yaml`` define:
|
||||
in ``config/config.yaml`` define:
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
|
@ -41,7 +41,7 @@ Relevant Settings
|
||||
length_factor:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at :ref:`costs_cf`,
|
||||
Documentation of the configuration file ``config/config.yaml`` at :ref:`costs_cf`,
|
||||
:ref:`electricity_cf`, :ref:`load_cf`, :ref:`renewable_cf`, :ref:`lines_cf`
|
||||
|
||||
Inputs
|
||||
|
@ -27,7 +27,7 @@ Relevant Settings
|
||||
Store:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at :ref:`costs_cf`,
|
||||
Documentation of the configuration file ``config/config.yaml`` at :ref:`costs_cf`,
|
||||
:ref:`electricity_cf`
|
||||
|
||||
Inputs
|
||||
@ -44,7 +44,7 @@ Outputs
|
||||
Description
|
||||
-----------
|
||||
|
||||
The rule :mod:`add_extra_components` attaches additional extendable components to the clustered and simplified network. These can be configured in the ``config.yaml`` at ``electricity: extendable_carriers:``. It processes ``networks/elec_s{simpl}_{clusters}.nc`` to build ``networks/elec_s{simpl}_{clusters}_ec.nc``, which in contrast to the former (depending on the configuration) contain with **zero** initial capacity
|
||||
The rule :mod:`add_extra_components` attaches additional extendable components to the clustered and simplified network. These can be configured in the ``config/config.yaml`` at ``electricity: extendable_carriers:``. It processes ``networks/elec_s{simpl}_{clusters}.nc`` to build ``networks/elec_s{simpl}_{clusters}_ec.nc``, which in contrast to the former (depending on the configuration) contain with **zero** initial capacity
|
||||
|
||||
- ``StorageUnits`` of carrier 'H2' and/or 'battery'. If this option is chosen, every bus is given an extendable ``StorageUnit`` of the corresponding carrier. The energy and power capacities are linked through a parameter that specifies the energy capacity as maximum hours at full dispatch power and is configured in ``electricity: max_hours:``. This linkage leads to one investment variable per storage unit. The default ``max_hours`` lead to long-term hydrogen and short-term battery storage units.
|
||||
|
||||
|
@ -38,7 +38,7 @@ Relevant Settings
|
||||
type:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`snapshots_cf`, :ref:`toplevel_cf`, :ref:`electricity_cf`, :ref:`load_cf`,
|
||||
:ref:`lines_cf`, :ref:`links_cf`, :ref:`transformers_cf`
|
||||
|
||||
|
@ -14,7 +14,7 @@ Relevant Settings
|
||||
countries:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`toplevel_cf`
|
||||
|
||||
Inputs
|
||||
|
@ -25,7 +25,7 @@ Relevant Settings
|
||||
{cutout}:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`atlite_cf`
|
||||
|
||||
Inputs
|
||||
|
@ -25,7 +25,7 @@ Relevant Settings
|
||||
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`load_cf`
|
||||
|
||||
Inputs
|
||||
|
@ -20,7 +20,7 @@ Relevant Settings
|
||||
clip_min_inflow:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`toplevel_cf`, :ref:`renewable_cf`
|
||||
|
||||
Inputs
|
||||
|
@ -18,7 +18,7 @@ Relevant Settings
|
||||
cutout:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`renewable_cf`
|
||||
|
||||
Inputs
|
||||
|
@ -21,7 +21,7 @@ Relevant Settings
|
||||
custom_powerplants:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`electricity`
|
||||
|
||||
Inputs
|
||||
|
@ -42,7 +42,7 @@ Relevant settings
|
||||
resource:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`snapshots_cf`, :ref:`atlite_cf`, :ref:`renewable_cf`
|
||||
|
||||
Inputs
|
||||
|
@ -15,7 +15,7 @@ Relevant Settings
|
||||
countries:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`toplevel_cf`
|
||||
|
||||
Inputs
|
||||
|
@ -19,7 +19,7 @@ Relevant Settings
|
||||
cutout:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`renewable_cf`
|
||||
|
||||
Inputs
|
||||
|
@ -27,7 +27,7 @@ Relevant Settings
|
||||
length_factor:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`toplevel_cf`, :ref:`renewable_cf`, :ref:`solving_cf`, :ref:`lines_cf`
|
||||
|
||||
Inputs
|
||||
|
@ -18,7 +18,7 @@ Relevant Settings
|
||||
prepare_links_p_nom:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`toplevel_cf`
|
||||
|
||||
Inputs
|
||||
|
@ -34,7 +34,7 @@ Relevant Settings
|
||||
max_hours:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`costs_cf`, :ref:`electricity_cf`
|
||||
|
||||
Inputs
|
||||
|
@ -23,7 +23,7 @@ The :ref:`tutorial` uses a smaller `data bundle <https://zenodo.org/record/35179
|
||||
tutorial:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`toplevel_cf`
|
||||
|
||||
**Outputs**
|
||||
|
@ -40,7 +40,7 @@ Relevant Settings
|
||||
name:
|
||||
|
||||
.. seealso::
|
||||
Documentation of the configuration file ``config.yaml`` at
|
||||
Documentation of the configuration file ``config/config.yaml`` at
|
||||
:ref:`costs_cf`, :ref:`electricity_cf`, :ref:`renewable_cf`,
|
||||
:ref:`lines_cf`, :ref:`links_cf`, :ref:`solving_cf`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user