diff --git a/doc/configuration.rst b/doc/configuration.rst index 42a58529..7ee9ce18 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -6,6 +6,8 @@ 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 can amend their own modifications and assumptions by changing the default configuration provided in the configuration file (``config.yaml``). +.. _toplevel_cf: + Top-level configuration ======================= @@ -50,6 +52,8 @@ An exemplary dependency graph (starting from the simplification rules) then look :widths: 25,7,22,30 :file: configtables/scenario.csv +.. _snapshots_cf: + ``snapshots`` ============= @@ -64,6 +68,7 @@ Specifies the temporal range to build an energy system model for as arguments to :widths: 25,7,22,30 :file: configtables/snapshots.csv +.. _electricity_cf: ``electricity`` =============== @@ -80,6 +85,8 @@ Specifies the temporal range to build an energy system model for as arguments to .. warning:: Carriers in ``conventional_carriers`` must not also be in ``extendable_carriers``. +.. _atlite_cf: + ``atlite`` ============= @@ -92,6 +99,8 @@ Specifies the temporal range to build an energy system model for as arguments to :widths: 25,7,22,30 :file: configtables/atlite.csv +.. _renewable_cf: + ``renewable`` ============= @@ -135,6 +144,8 @@ Specifies the temporal range to build an energy system model for as arguments to :widths: 25,7,22,30 :file: configtables/hydro.csv +.. _lines_cf: + ``lines`` ============= @@ -143,6 +154,8 @@ Specifies the temporal range to build an energy system model for as arguments to :widths: 25,7,22,30 :file: configtables/lines.csv +.. _links_cf: + ``links`` ============= @@ -151,6 +164,8 @@ Specifies the temporal range to build an energy system model for as arguments to :widths: 25,7,22,30 :file: configtables/links.csv +.. _transformers_cf: + ``transformers`` ================ @@ -159,6 +174,8 @@ Specifies the temporal range to build an energy system model for as arguments to :widths: 25,7,22,30 :file: configtables/transformers.csv +.. _load_cf: + ``load`` ============= @@ -167,6 +184,8 @@ Specifies the temporal range to build an energy system model for as arguments to :widths: 25,7,22,30 :file: configtables/load.csv +.. _costs_cf: + ``costs`` ============= @@ -180,6 +199,8 @@ Specifies the temporal range to build an energy system model for as arguments to You can also build multiple different cost databases. Make a renamed copy of ``data/costs.csv`` (e.g. ``data/costs-optimistic.csv``) and set the variable ``COSTS=data/costs-optimistic.csv`` in the ``Snakefile``. +.. _solving_cf: + ``solving`` ============= @@ -199,6 +220,8 @@ Specifies the temporal range to build an energy system model for as arguments to :widths: 25,7,22,30 :file: configtables/solving-solver.csv +.. _plotting_cf: + ``plotting`` ============= diff --git a/doc/introduction.rst b/doc/introduction.rst index 0ac2d27a..43dcae40 100644 --- a/doc/introduction.rst +++ b/doc/introduction.rst @@ -37,7 +37,7 @@ Scenarios, Configuration and Modification It is easy to run PyPSA-Eur for multiple scenarios using the `wildcards feature `_ of ``snakemake``. Wildcards allow to generalise a rule to produce all files that follow a `regular expression `_ pattern, which e.g. defines one particular scenario. One can think of a wildcard as a parameter that shows up in the input/output file names and thereby determines which rules to run, 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. **All options are explained in detail in** :ref:`config`. +located in the root directory, which that are not part of the scenarios. **All options are explained in detail in** :ref:`config`. Folder Structure ================ diff --git a/environment_docs.yaml b/environment_docs.yaml index e3dd7041..c5fbc0d7 100644 --- a/environment_docs.yaml +++ b/environment_docs.yaml @@ -44,5 +44,4 @@ dependencies: - git+https://github.com/PyPSA/geokit.git#egg=geokit - git+https://github.com/FRESNA/powerplantmatching.git#egg=powerplantmatching - sphinx - - sphinx_rtd_theme - - sphinxcontrib-bibtex \ No newline at end of file + - sphinx_rtd_theme \ No newline at end of file diff --git a/scripts/add_electricity.py b/scripts/add_electricity.py index 6117e6ce..f64c7a8c 100644 --- a/scripts/add_electricity.py +++ b/scripts/add_electricity.py @@ -36,6 +36,9 @@ Relevant Settings lines: length_factor: +.. seealso:: + Documentation of the configuration file ``config.yaml`` at :ref:`costs_cf`, :ref:`electricity_cf`, :ref:`load_cf`, :ref:`renewable_cf`, :ref:`lines_cf` + Inputs ------ diff --git a/scripts/base_network.py b/scripts/base_network.py index 907b6eec..50f0f141 100644 --- a/scripts/base_network.py +++ b/scripts/base_network.py @@ -28,6 +28,11 @@ Relevant Settings x: s_nom: type: + +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`snapshots_cf`, :ref:`toplevel_cf`, :ref:`electricity_cf`, :ref:`load_cf`, + :ref:`lines_cf`, :ref:`links_cf`, :ref:`transformers_cf` Inputs ------ diff --git a/scripts/build_bus_regions.py b/scripts/build_bus_regions.py index d3f2fea1..f6292350 100644 --- a/scripts/build_bus_regions.py +++ b/scripts/build_bus_regions.py @@ -8,6 +8,9 @@ Relevant Settings countries: +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`toplevel_cf` Inputs ------ diff --git a/scripts/build_country_flh.py b/scripts/build_country_flh.py index 6e951b19..8e310e4c 100644 --- a/scripts/build_country_flh.py +++ b/scripts/build_country_flh.py @@ -15,6 +15,10 @@ Relevant Settings resource: correction_factor: +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`snapshots_cf`, :ref:`renewable_cf` + Inputs ------ diff --git a/scripts/build_cutout.py b/scripts/build_cutout.py index cbc55d2d..ff17b0ee 100644 --- a/scripts/build_cutout.py +++ b/scripts/build_cutout.py @@ -11,6 +11,10 @@ Relevant Settings cutouts: {cutout}: +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`atlite_cf` + Inputs ------ diff --git a/scripts/build_hydro_profile.py b/scripts/build_hydro_profile.py index 16c88ae5..6027a289 100644 --- a/scripts/build_hydro_profile.py +++ b/scripts/build_hydro_profile.py @@ -14,6 +14,10 @@ Relevant Settings cutout: clip_min_inflow: +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`toplevel_cf`, :ref:`renewable_cf` + Inputs ------ diff --git a/scripts/build_natura_raster.py b/scripts/build_natura_raster.py index 2fceade4..588312f3 100644 --- a/scripts/build_natura_raster.py +++ b/scripts/build_natura_raster.py @@ -10,6 +10,10 @@ Relevant Settings {technology}: cutout: +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`renewable_cf` + Inputs ------ diff --git a/scripts/build_powerplants.py b/scripts/build_powerplants.py index 052bebcc..d63c6e2b 100644 --- a/scripts/build_powerplants.py +++ b/scripts/build_powerplants.py @@ -10,6 +10,10 @@ Relevant Settings enable: powerplantmatching: +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`toplevel_cf` + Inputs ------ diff --git a/scripts/build_renewable_profiles.py b/scripts/build_renewable_profiles.py index 179408ab..74f26437 100644 --- a/scripts/build_renewable_profiles.py +++ b/scripts/build_renewable_profiles.py @@ -35,6 +35,10 @@ Relevant settings clip_p_max_pu: resource: +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`snapshots_cf`, :ref:`atlite_cf`, :ref:`renewable_cf` + Inputs ------ diff --git a/scripts/build_shapes.py b/scripts/build_shapes.py index 584ba7a8..921139ea 100644 --- a/scripts/build_shapes.py +++ b/scripts/build_shapes.py @@ -8,6 +8,10 @@ Relevant Settings countries: +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`toplevel_cf` + Inputs ------ diff --git a/scripts/cluster_network.py b/scripts/cluster_network.py index 04e5702a..6a25de62 100644 --- a/scripts/cluster_network.py +++ b/scripts/cluster_network.py @@ -18,6 +18,10 @@ Relevant Settings lines: length_factor: +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`renewable_cf`, :ref:`solving_cf`, :ref:`lines_cf` + Inputs ------ diff --git a/scripts/make_summary.py b/scripts/make_summary.py index 64b1f446..150c159e 100644 --- a/scripts/make_summary.py +++ b/scripts/make_summary.py @@ -15,6 +15,10 @@ Relevant Settings electricity: max_hours: +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`costs_cf`, :ref:`electricity_cf` + Inputs ------ diff --git a/scripts/plot_p_nom_max.py b/scripts/plot_p_nom_max.py index 215bcb07..d1df54ad 100644 --- a/scripts/plot_p_nom_max.py +++ b/scripts/plot_p_nom_max.py @@ -15,6 +15,12 @@ Description """ +# Dirty work-around so that sphinx can import this module and get the +# doc-string +if __name__ != "__main__": + import sys + sys.exit(0) + import pypsa import pandas as pd import matplotlib.pyplot as plt diff --git a/scripts/prepare_links_p_nom.py b/scripts/prepare_links_p_nom.py index c514c36c..061adc35 100644 --- a/scripts/prepare_links_p_nom.py +++ b/scripts/prepare_links_p_nom.py @@ -10,6 +10,10 @@ Relevant Settings enable: prepare_links_p_nom: +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`toplevel_cf` + Inputs ------ diff --git a/scripts/prepare_network.py b/scripts/prepare_network.py index a6e4adab..9f9360f0 100644 --- a/scripts/prepare_network.py +++ b/scripts/prepare_network.py @@ -18,6 +18,10 @@ Relevant Settings co2limit: max_hours: +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`costs_cf`, :ref:`electricity_cf` + Inputs ------ diff --git a/scripts/simplify_network.py b/scripts/simplify_network.py index 49b0143e..01ce70fc 100644 --- a/scripts/simplify_network.py +++ b/scripts/simplify_network.py @@ -32,6 +32,11 @@ Relevant Settings solver: name: +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`costs_cf`, :ref:`electricity_cf`, :ref:`renewable_cf`, + :ref:`lines_cf`, :ref:`links_cf`, :ref:`solving_cf` + Inputs ------ diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 06b4bf0b..2e3d30ca 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -27,6 +27,10 @@ Relevant Settings (plotting:) (conv_techs:) +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`electricity_cf`, :ref:`solving_cf`, :ref:`plotting_cf` + Inputs ------ diff --git a/scripts/solve_operations_network.py b/scripts/solve_operations_network.py index 13ca5c69..2fc127e6 100644 --- a/scripts/solve_operations_network.py +++ b/scripts/solve_operations_network.py @@ -21,11 +21,15 @@ Relevant Settings name: (solveroptions): +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`solving_cf` + Inputs ------ - ``networks/{network}_s{simpl}_{clusters}.nc``: confer :ref:`cluster` -- ``results/networks/{network}_s{simpl}_{clusters}_l{ll}_{opts}.nc``: confer :ref:`solve ` +- ``results/networks/{network}_s{simpl}_{clusters}_l{ll}_{opts}.nc``: confer :ref:`solve` Outputs ------- diff --git a/scripts/trace_solve_network.py b/scripts/trace_solve_network.py index 286dc2e8..cb75079b 100644 --- a/scripts/trace_solve_network.py +++ b/scripts/trace_solve_network.py @@ -21,6 +21,10 @@ Relevant Settings name: (solveroptions): +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`solving_cf` + Inputs ------