diff --git a/doc/preparation.rst b/doc/preparation.rst index d909ec1d..b88e4211 100644 --- a/doc/preparation.rst +++ b/doc/preparation.rst @@ -5,23 +5,23 @@ Preparing Networks The preparation process of the PyPSA-Eur energy system model consists of a group of ``snakemake`` rules which are briefly outlined and explained in detail in the sections below: -- ``build_shapes`` generates GeoJSON files with shapes of the countries, exclusive economic zones and `NUTS3 `_ areas. -- ``build_cutout`` prepares smaller weather data portions from `ERA5 `_ for cutout ``europe-2013-era5`` and SARAH for cutout ``europe-2013-sarah``. +- :mod:`build_shapes` generates GeoJSON files with shapes of the countries, exclusive economic zones and `NUTS3 `_ areas. +- :mod:`build_cutout` prepares smaller weather data portions from `ERA5 `_ for cutout ``europe-2013-era5`` and SARAH for cutout ``europe-2013-sarah``. With these and the externally extracted ENTSO-E online map topology (``data/entsoegridkit``), it can build a base PyPSA network with the following rules: -- ``base_network`` builds and stores the base network with all buses, HVAC lines and HVDC links, while -- ``build_bus_regions`` determines `Voronoi cells `_ for all substations. +- :mod:`base_network` builds and stores the base network with all buses, HVAC lines and HVDC links, while +- :mod:`build_bus_regions` determines `Voronoi cells `_ for all substations. Then the process continues by calculating conventional power plant capacities, potentials, and per-unit availability time series for variable renewable energy carriers and hydro power plants with the following rules: -- ``build_powerplants`` for today's thermal power plant capacities using `powerplantmatching `_ allocating these to the closest substation for each powerplant, -- ``build_renewable_potentials`` for the installation potentials for solar panels, onshore and offshore wind turbines constrained by landuse restrictions and natural protection areas, -- ``build_renewable_profiles`` for the hourly capacity factors in each substation's Voronoi cell for PV, onshore and offshore wind, and -- ``build_hydro_profile`` for the hourly per-unit hydro power availability time series. +- :mod:`build_powerplants` for today's thermal power plant capacities using `powerplantmatching `_ allocating these to the closest substation for each powerplant, +- :mod:`build_renewable_potentials` for the installation potentials for solar panels, onshore and offshore wind turbines constrained by landuse restrictions and natural protection areas, +- :mod:`build_renewable_profiles` for the hourly capacity factors in each substation's Voronoi cell for PV, onshore and offshore wind, and +- :mod:`build_hydro_profile` for the hourly per-unit hydro power availability time series. -The central rule ``add_electricity`` then ties all the different data inputs +The central rule :mod:`add_electricity` then ties all the different data inputs together into a detailed PyPSA network stored in ``networks/elec.nc``. .. _shapes: diff --git a/doc/simplification.rst b/doc/simplification.rst index 343c1274..68935a5d 100644 --- a/doc/simplification.rst +++ b/doc/simplification.rst @@ -6,8 +6,8 @@ Simplifying Networks The simplification ``snakemake`` rules prepare **approximations** of the full model, for which it is computationally viable to co-optimize generation, storage and transmission capacities. -- ``simplify_network`` transforms the transmission grid to a 380 kV only equivalent network, while -- ``cluster_network`` uses a `k-means `_ based clustering technique to partition the network into a given number of zones and then reduce the network to a representation with one bus per zone. +- :mod:`simplify_network` transforms the transmission grid to a 380 kV only equivalent network, while +- :mod:`cluster_network` uses a `k-means `_ based clustering technique to partition the network into a given number of zones and then reduce the network to a representation with one bus per zone. The simplification and clustering steps are described in detail in the paper diff --git a/doc/solving.rst b/doc/solving.rst index 402129cd..5ce15416 100644 --- a/doc/solving.rst +++ b/doc/solving.rst @@ -2,7 +2,7 @@ Solving Networks ########################################## -After generating and simplifying the networks they can be solved through the rule ``solve_network`` by using the collection rule ``solve_all_elec_networks``. Moreover, networks can be solved for another focus with the derivative rules ``trace_solve_network`` to log changes during iterations and ``solve_operations_network`` for dispatch-only analyses on an already solved network. +After generating and simplifying the networks they can be solved through the rule :mod:`solve_network` by using the collection rule :mod:`solve_all_elec_networks`. Moreover, networks can be solved for another focus with the derivative rules :mod:`solve_network` by using the collection rule :mod:`trace_solve_network` to log changes during iterations and :mod:`solve_network` by using the collection rule :mod:`solve_operations_network` for dispatch-only analyses on an already solved network. .. _solve: diff --git a/doc/wildcards.rst b/doc/wildcards.rst index 54fb63b3..941942aa 100644 --- a/doc/wildcards.rst +++ b/doc/wildcards.rst @@ -30,7 +30,7 @@ The ``{simpl}`` wildcard The ``{simpl}`` wildcard specifies number of buses a detailed network model should be pre-clustered to in the rule -``simplify_network`` (before ``cluster_network``). +:mod:`simplify_network` (before :mod:`cluster_network`). .. seealso:: :mod:`simplify_network` @@ -41,7 +41,7 @@ The ``{clusters}`` wildcard =========================== The ``{clusters}`` wildcard specifies the number of buses a detailed -network model should be reduced to in the rule ``cluster_network``. +network model should be reduced to in the rule :mod:`cluster_network`. The number of clusters must be lower than the total number of nodes and higher than the number of countries. However, a country counts twice if it has two asynchronous subnetworks (e.g. Denmark or Italy). @@ -91,7 +91,7 @@ The ``{opts}`` wildcard ======================= The ``{opts}`` wildcard triggers optional constraints, which are activated in either -``prepare_network`` or the ``solve_network`` step. +:mod:`prepare_network` or the :mod:`solve_network` step. It may hold multiple triggers separated by ``-``, i.e. ``Co2L-3H`` contains the ``Co2L`` trigger and the ``3H`` switch. There are currently: @@ -132,7 +132,7 @@ in Germany (in the solution for Europe) use: The ``{cutout}`` wildcard ========================= -The ``{cutout}`` wildcard facilitates running the rule ``build_cutout`` +The ``{cutout}`` wildcard facilitates running the rule :mod:`build_cutout` for all cutout configurations specified under ``atlite: cutouts:``. These cutouts will be stored in a folder specified by ``{cutout}``. @@ -176,7 +176,7 @@ The ``{ext}`` wildcard ====================== The ``{ext}`` wildcard specifies the file type of the figures the -rule ``plot_network``, ``plot_summary``, and ``plot_p_nom_max`` produce. +rule :mod:`plot_network`, :mod:`plot_summary`, and :mod:`plot_p_nom_max` produce. Typical examples are ``pdf`` and ``png``. The list of supported file formats depends on the used backend. To query the supported file types on your system, issue: diff --git a/scripts/add_electricity.py b/scripts/add_electricity.py index f64c7a8c..725a8fd6 100644 --- a/scripts/add_electricity.py +++ b/scripts/add_electricity.py @@ -74,7 +74,7 @@ Outputs Description ----------- -The rule ``add_electricity`` ties all the different data inputs from the preceding rules together into a detailed PyPSA network that is stored in ``networks/elec.nc``. It includes: +The rule :mod:`add_electricity` ties all the different data inputs from the preceding rules together into a detailed PyPSA network that is stored in ``networks/elec.nc``. It includes: - today's transmission topology and transfer capacities (optionally including lines which are under construction according to the config settings ``lines: under_construction`` and ``links: under_construction``), - today's thermal and hydro power generation capacities (for the technologies listed in the config setting ``electricity: conventional_carriers``), and diff --git a/scripts/cluster_network.py b/scripts/cluster_network.py index 6a25de62..23fefae3 100644 --- a/scripts/cluster_network.py +++ b/scripts/cluster_network.py @@ -83,9 +83,9 @@ Description do not work reliably with multiple voltage levels and transformers. .. tip:: - The rule ``cluster_all_networks`` runs + The rule :mod:`cluster_all_networks` runs for all ``scenario`` s in the configuration file - the rule ``cluster_network``. + the rule :mod:`cluster_network`. """ diff --git a/scripts/prepare_network.py b/scripts/prepare_network.py index 2df71926..4679b188 100644 --- a/scripts/prepare_network.py +++ b/scripts/prepare_network.py @@ -37,9 +37,9 @@ Description ----------- .. tip:: - The rule ``prepare_all_networks`` runs + The rule :mod:`prepare_all_networks` runs for all ``scenario`` s in the configuration file - the rule ``prepare_network``. + the rule :mod:`prepare_network`. """ diff --git a/scripts/simplify_network.py b/scripts/simplify_network.py index 01ce70fc..164b50cb 100644 --- a/scripts/simplify_network.py +++ b/scripts/simplify_network.py @@ -67,7 +67,7 @@ Outputs Description ----------- -The rule ``simplify_network`` does up to four things: +The rule :mod:`simplify_network` does up to four things: 1. Create an equivalent transmission network in which all voltage levels are mapped to the 380 kV level by the function ``simplify_network(...)``. diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 2e3d30ca..72765d4e 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -45,9 +45,9 @@ Description ----------- .. tip:: - The rule ``solve_all_networks`` runs + The rule :mod:`solve_all_networks` runs for all ``scenario`` s in the configuration file - the rule ``solve_network``. + the rule :mod:`solve_network`. """ diff --git a/scripts/solve_operations_network.py b/scripts/solve_operations_network.py index 2fc127e6..595e71ee 100644 --- a/scripts/solve_operations_network.py +++ b/scripts/solve_operations_network.py @@ -1,6 +1,6 @@ """ Solves linear optimal dispatch in hourly resolution -using the capacities of previous capacity expansion in rule ``solve_network``. +using the capacities of previous capacity expansion in rule :mod:`solve_network`. Relevant Settings ----------------- diff --git a/scripts/trace_solve_network.py b/scripts/trace_solve_network.py index cb75079b..c62a8f52 100644 --- a/scripts/trace_solve_network.py +++ b/scripts/trace_solve_network.py @@ -1,5 +1,5 @@ """ -Iteratively solves expansion problem like the rule ``solve_network``, but additionally +Iteratively solves expansion problem like the rule :mod:`solve_network`, but additionally records intermediate branch capacity steps and values of the objective function. Relevant Settings