From 1bded0ab9bac20c64e66d8a322208aa5bb80578b Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Sun, 11 Aug 2019 11:40:47 +0200 Subject: [PATCH] add rule section headers --- scripts/add_electricity.py | 13 +++++++++++++ scripts/base_network.py | 13 +++++++++++++ scripts/build_bus_regions.py | 13 +++++++++++++ scripts/build_country_flh.py | 13 +++++++++++++ scripts/build_cutout.py | 13 +++++++++++++ scripts/build_hydro_profile.py | 17 ++++++++++++++--- scripts/build_natura_raster.py | 13 +++++++++++++ scripts/build_powerplants.py | 13 +++++++++++++ scripts/build_renewable_profiles.py | 4 +--- scripts/build_shapes.py | 13 +++++++++++++ scripts/cluster_network.py | 11 ++++++++++- scripts/make_summary.py | 13 +++++++++++++ scripts/plot_network.py | 13 +++++++++++++ scripts/plot_p_nom_max.py | 13 +++++++++++++ scripts/plot_summary.py | 13 +++++++++++++ scripts/prepare_links_p_nom.py | 13 +++++++++++++ scripts/prepare_network.py | 13 +++++++++++++ scripts/simplify_network.py | 12 ++++++++++++ scripts/solve_network.py | 13 +++++++++++++ scripts/solve_operations_network.py | 13 +++++++++++++ scripts/trace_solve_network.py | 13 +++++++++++++ 21 files changed, 258 insertions(+), 7 deletions(-) diff --git a/scripts/add_electricity.py b/scripts/add_electricity.py index 1024c345..4afb79d7 100644 --- a/scripts/add_electricity.py +++ b/scripts/add_electricity.py @@ -1,6 +1,19 @@ # coding: utf-8 """ Adds electrical generators and storage units to base network + +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + """ import logging diff --git a/scripts/base_network.py b/scripts/base_network.py index ba2d4de1..01bbf54d 100644 --- a/scripts/base_network.py +++ b/scripts/base_network.py @@ -1,6 +1,19 @@ # coding: utf-8 """ Creates the network topology from ENTSO-E map extracts as a PyPSA network + +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + """ import yaml diff --git a/scripts/build_bus_regions.py b/scripts/build_bus_regions.py index e99b8c7c..3e4f0f68 100644 --- a/scripts/build_bus_regions.py +++ b/scripts/build_bus_regions.py @@ -1,5 +1,18 @@ """ Creates onshore and offshore Voronoi shapes for each bus + +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + """ import os diff --git a/scripts/build_country_flh.py b/scripts/build_country_flh.py index 5c724631..79644ade 100644 --- a/scripts/build_country_flh.py +++ b/scripts/build_country_flh.py @@ -1,6 +1,19 @@ #!/usr/bin/env python """ Create csv files and plots for comparing per country full load hours of renewable time-series + +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + """ import os diff --git a/scripts/build_cutout.py b/scripts/build_cutout.py index b6abaf04..6f97b406 100644 --- a/scripts/build_cutout.py +++ b/scripts/build_cutout.py @@ -1,5 +1,18 @@ """ Create cutouts configured in `atlite` config section + +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + """ import os import atlite diff --git a/scripts/build_hydro_profile.py b/scripts/build_hydro_profile.py index bbe9abc3..e5ed3d75 100644 --- a/scripts/build_hydro_profile.py +++ b/scripts/build_hydro_profile.py @@ -2,9 +2,20 @@ """ Build hydroelectric inflow time-series for each country -See also --------- -build_renewable_profiles +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + +.. seealso:: + build_renewable_profiles """ import os diff --git a/scripts/build_natura_raster.py b/scripts/build_natura_raster.py index 549f07a0..2aed9d23 100644 --- a/scripts/build_natura_raster.py +++ b/scripts/build_natura_raster.py @@ -1,5 +1,18 @@ """ Rasters the vector data of the NATURA2000 data onto all cutout regions + +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + """ import numpy as np diff --git a/scripts/build_powerplants.py b/scripts/build_powerplants.py index 313caf36..a8f05343 100644 --- a/scripts/build_powerplants.py +++ b/scripts/build_powerplants.py @@ -1,6 +1,19 @@ # coding: utf-8 """ Get conventional powerplants from `powerplantmatching`, assign to buses and create csv file + +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + """ import logging diff --git a/scripts/build_renewable_profiles.py b/scripts/build_renewable_profiles.py index 9d97b68e..854cfce1 100644 --- a/scripts/build_renewable_profiles.py +++ b/scripts/build_renewable_profiles.py @@ -1,7 +1,5 @@ #!/usr/bin/env python """ -Summary -------- The script ``build_renewable_profiles.py`` calculates for each node several geographical properties: 1. the installable capacity (based on land-use) @@ -47,7 +45,7 @@ for offshore we also have: underwater_fraction (bus) - the fraction of the average connection distance which is under water -Long description: +Description: ----------------- First the script computes how much of the technology can be installed at each diff --git a/scripts/build_shapes.py b/scripts/build_shapes.py index ffd0cc06..69dd466b 100644 --- a/scripts/build_shapes.py +++ b/scripts/build_shapes.py @@ -1,5 +1,18 @@ """ Create GIS shape files for countries on-shore and off-shore, europe and nuts3 regions + +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + """ import os diff --git a/scripts/cluster_network.py b/scripts/cluster_network.py index c4180b4c..4c3f9b46 100644 --- a/scripts/cluster_network.py +++ b/scripts/cluster_network.py @@ -2,9 +2,18 @@ """ Create networks clustered to `cluster` number of zones with aggregated buses, generators and transmission corridors -Summary +Relevant Settings +----------------- + +Inputs +------ + +Outputs ------- +Description +----------- + The rule cluster_network instead clusters the network to a given number of buses. -Why is this cluster function used? diff --git a/scripts/make_summary.py b/scripts/make_summary.py index 262bfcaf..2530ac10 100644 --- a/scripts/make_summary.py +++ b/scripts/make_summary.py @@ -1,5 +1,18 @@ """ Create summaries of aggregated energy and costs as csv files + +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + """ import os diff --git a/scripts/plot_network.py b/scripts/plot_network.py index 076b0982..7c9a3639 100644 --- a/scripts/plot_network.py +++ b/scripts/plot_network.py @@ -1,5 +1,18 @@ """ Plot map with pie charts and cost box plots + +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + """ # Dirty work-around so that sphinx can import this module and get the diff --git a/scripts/plot_p_nom_max.py b/scripts/plot_p_nom_max.py index 8816298c..363d70be 100644 --- a/scripts/plot_p_nom_max.py +++ b/scripts/plot_p_nom_max.py @@ -1,5 +1,18 @@ """ Plot renewable installation potentials per capacity factor + +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + """ import pypsa diff --git a/scripts/plot_summary.py b/scripts/plot_summary.py index 2ea66677..3980b3b1 100644 --- a/scripts/plot_summary.py +++ b/scripts/plot_summary.py @@ -1,5 +1,18 @@ """ Plot energy and cost summaries for several solved networks + +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + """ import os diff --git a/scripts/prepare_links_p_nom.py b/scripts/prepare_links_p_nom.py index 5c4ed9f8..294eafa7 100644 --- a/scripts/prepare_links_p_nom.py +++ b/scripts/prepare_links_p_nom.py @@ -1,6 +1,19 @@ #!/usr/bin/env python """ Extract capacities for HVDC links from wikipedia + +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + """ import pandas as pd diff --git a/scripts/prepare_network.py b/scripts/prepare_network.py index 0b1c7bf6..4b91da06 100644 --- a/scripts/prepare_network.py +++ b/scripts/prepare_network.py @@ -1,6 +1,19 @@ # coding: utf-8 """ Prepare PyPSA network for solving according to `opts`-wildcard + +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + """ import logging diff --git a/scripts/simplify_network.py b/scripts/simplify_network.py index 7bf9d23b..33168ab5 100644 --- a/scripts/simplify_network.py +++ b/scripts/simplify_network.py @@ -3,6 +3,18 @@ remove network dead-ends, and reduce multi-hop linear HVDC connections to a single link +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + The rule 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 624331e7..6670ea6d 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -1,5 +1,18 @@ """ Solve networks iteratively linear optimal power flow, while updating reactances + +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + """ import numpy as np diff --git a/scripts/solve_operations_network.py b/scripts/solve_operations_network.py index 6294218d..fc250ff1 100644 --- a/scripts/solve_operations_network.py +++ b/scripts/solve_operations_network.py @@ -1,6 +1,19 @@ """ Solve linear optimal dispatch in hourly resolution with capacities of previous capacity expansion + +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + """ import pypsa diff --git a/scripts/trace_solve_network.py b/scripts/trace_solve_network.py index 27e7a0b0..c6881b87 100644 --- a/scripts/trace_solve_network.py +++ b/scripts/trace_solve_network.py @@ -1,6 +1,19 @@ """ Iteratively solves expansion problem like solve_network, but additionally records intermediate branch capacity steps and values of the objective + +Relevant Settings +----------------- + +Inputs +------ + +Outputs +------- + +Description +----------- + """ import numpy as np