diff --git a/doc/index.rst b/doc/index.rst index 00a57464..c333a3a0 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -157,21 +157,6 @@ Documentation configuration costs -**Implementation details** - -* :doc:`spatial_resolution` -* :doc:`supply_demand` -* :doc:`technology_assumptions` - -.. toctree:: - :hidden: - :maxdepth: 1 - :caption: Implementation details - - spatial_resolution - supply_demand - technology_assumptions - **Rules Overview** * :doc:`preparation` @@ -204,6 +189,22 @@ Documentation myopic perfect + +**Implementation details** + +* :doc:`spatial_resolution` +* :doc:`supply_demand` +* :doc:`technology_assumptions` + +.. toctree:: + :hidden: + :maxdepth: 1 + :caption: Implementation details + + spatial_resolution + supply_demand + technology_assumptions + **References** * :doc:`release_notes` diff --git a/scripts/add_brownfield.py b/scripts/add_brownfield.py index a0efddc7..25922640 100644 --- a/scripts/add_brownfield.py +++ b/scripts/add_brownfield.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: MIT +"""Prepares brownfield data from previous planning horizon.""" + import logging logger = logging.getLogger(__name__) diff --git a/scripts/add_existing_baseyear.py b/scripts/add_existing_baseyear.py index e62b734e..e074be43 100644 --- a/scripts/add_existing_baseyear.py +++ b/scripts/add_existing_baseyear.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: MIT +"""Adds existing power and heat generation capacities for initial planning horizon.""" + import logging logger = logging.getLogger(__name__) diff --git a/scripts/build_ammonia_production.py b/scripts/build_ammonia_production.py index 16ed4ce2..d78d627e 100644 --- a/scripts/build_ammonia_production.py +++ b/scripts/build_ammonia_production.py @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: MIT """ -Build ammonia production. +Build historical annual ammonia production per country in ktonNH3/a. """ import country_converter as coco diff --git a/scripts/build_biomass_potentials.py b/scripts/build_biomass_potentials.py index 43360d34..7387418a 100644 --- a/scripts/build_biomass_potentials.py +++ b/scripts/build_biomass_potentials.py @@ -2,6 +2,10 @@ # SPDX-FileCopyrightText: : 2021-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT +""" +Compute biogas and solid biomass potentials for each clustered model region +using data from JRC ENSPRESO. +""" import geopandas as gpd import pandas as pd diff --git a/scripts/build_clustered_population_layouts.py b/scripts/build_clustered_population_layouts.py index 9fb70d40..bc81c29a 100644 --- a/scripts/build_clustered_population_layouts.py +++ b/scripts/build_clustered_population_layouts.py @@ -4,7 +4,8 @@ # SPDX-License-Identifier: MIT """ -Build clustered population layouts. +Build population layouts for all clustered model regions as total as well as +split by urban and rural population. """ import atlite diff --git a/scripts/build_cop_profiles.py b/scripts/build_cop_profiles.py index 44b8052e..510c8a7a 100644 --- a/scripts/build_cop_profiles.py +++ b/scripts/build_cop_profiles.py @@ -4,19 +4,20 @@ # SPDX-License-Identifier: MIT """ -Build COP time series for air- or ground-sourced heat pumps. +Build coefficient of performance (COP) time series for air- or ground-sourced +heat pumps. + +The COP is a function of the temperature difference between +source and sink. + +The quadratic regression used is based on Staffell et al. (2012) +https://doi.org/10.1039/C2EE22653G. """ import xarray as xr def coefficient_of_performance(delta_T, source="air"): - """ - COP is function of temp difference source to sink. - - The quadratic regression is based on Staffell et al. (2012) - https://doi.org/10.1039/C2EE22653G. - """ if source == "air": return 6.81 - 0.121 * delta_T + 0.000630 * delta_T**2 elif source == "soil": diff --git a/scripts/build_energy_totals.py b/scripts/build_energy_totals.py index 9d30ba6a..1480732a 100644 --- a/scripts/build_energy_totals.py +++ b/scripts/build_energy_totals.py @@ -3,6 +3,10 @@ # # SPDX-License-Identifier: MIT +""" +Build total energy demands per country using JRC IDEES, eurostat, and EEA data. +""" + import logging logger = logging.getLogger(__name__) diff --git a/scripts/build_gas_input_locations.py b/scripts/build_gas_input_locations.py index 983a3439..314cb767 100644 --- a/scripts/build_gas_input_locations.py +++ b/scripts/build_gas_input_locations.py @@ -5,7 +5,7 @@ """ Build import locations for fossil gas from entry-points, LNG terminals and -production sites. +production sites with data from SciGRID_gas and Global Energy Monitor. """ import logging diff --git a/scripts/build_gas_network.py b/scripts/build_gas_network.py index c13cca3f..b34ebe9f 100644 --- a/scripts/build_gas_network.py +++ b/scripts/build_gas_network.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT """ -Preprocess gas network based on data from bthe SciGRID Gas project +Preprocess gas network based on data from bthe SciGRID_gas project (https://www.gas.scigrid.de/). """ diff --git a/scripts/build_heat_demand.py b/scripts/build_heat_demand.py index a626dc28..6164d25d 100644 --- a/scripts/build_heat_demand.py +++ b/scripts/build_heat_demand.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT """ -Build heat demand time series. +Build heat demand time series using heating degree day (HDD) approximation. """ import atlite diff --git a/scripts/build_industrial_distribution_key.py b/scripts/build_industrial_distribution_key.py index ad9e1489..5f2f6893 100644 --- a/scripts/build_industrial_distribution_key.py +++ b/scripts/build_industrial_distribution_key.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT """ -Build industrial distribution keys from hotmaps database. +Build spatial distribution of industries from Hotmaps database. """ import logging diff --git a/scripts/build_industrial_energy_demand_per_node.py b/scripts/build_industrial_energy_demand_per_node.py index 95d0782c..b75b2058 100644 --- a/scripts/build_industrial_energy_demand_per_node.py +++ b/scripts/build_industrial_energy_demand_per_node.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT """ -Build industrial energy demand per node. +Build industrial energy demand per model region. """ import pandas as pd diff --git a/scripts/build_industrial_energy_demand_per_node_today.py b/scripts/build_industrial_energy_demand_per_node_today.py index e715bc53..da1ec2d7 100644 --- a/scripts/build_industrial_energy_demand_per_node_today.py +++ b/scripts/build_industrial_energy_demand_per_node_today.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT """ -Build industrial energy demand per node. +Build industrial energy demand per model region. """ from itertools import product diff --git a/scripts/build_industrial_production_per_node.py b/scripts/build_industrial_production_per_node.py index 681c809c..7b40cb7c 100644 --- a/scripts/build_industrial_production_per_node.py +++ b/scripts/build_industrial_production_per_node.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT """ -Build industrial production per node. +Build industrial production per model region. """ from itertools import product diff --git a/scripts/build_industry_sector_ratios.py b/scripts/build_industry_sector_ratios.py index 7896bb06..5f5f7b90 100644 --- a/scripts/build_industry_sector_ratios.py +++ b/scripts/build_industry_sector_ratios.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT """ -Build industry sector ratios. +Build specific energy consumption by carrier and industries. """ import pandas as pd diff --git a/scripts/build_population_layouts.py b/scripts/build_population_layouts.py index e3ac8f45..a9308b7e 100644 --- a/scripts/build_population_layouts.py +++ b/scripts/build_population_layouts.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT """ -Build mapping between grid cells and population (total, urban, rural) +Build mapping between cutout grid cells and population (total, urban, rural). """ import logging diff --git a/scripts/build_population_weighted_energy_totals.py b/scripts/build_population_weighted_energy_totals.py index 1d29a08f..85d7a8b3 100644 --- a/scripts/build_population_weighted_energy_totals.py +++ b/scripts/build_population_weighted_energy_totals.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT """ -Build population-weighted energy totals. +Distribute country-level energy demands by population. """ import pandas as pd diff --git a/scripts/build_retro_cost.py b/scripts/build_retro_cost.py index bd2ba93e..88f85517 100644 --- a/scripts/build_retro_cost.py +++ b/scripts/build_retro_cost.py @@ -5,13 +5,13 @@ # SPDX-License-Identifier: MIT """ -Created on Fri Jan 22 10:36:39 2021. - -This script should calculate the space heating savings through better +This script calculates the space heating savings through better insulation of the thermal envelope of a building and corresponding costs for different building types in different countries. ------------------METHODOLOGY ------------------------------------------------ +Methodology +----------- + The energy savings calculations are based on the EN ISO 13790 / seasonal method https://www.iso.org/obp/ui/#iso:std:iso:13790:ed-2:v1:en: @@ -29,7 +29,9 @@ The energy savings calculations are based on the - tabula https://episcope.eu/fileadmin/tabula/public/calc/tabula-calculator.xlsx ----------------------BASIC EQUAIONS ------------------------------------------- +Basic Equations +--------------- + The basic equations: The Energy needed for space heating E_space [W/m²] are calculated as the @@ -53,7 +55,8 @@ The basic equations: H_gains = nu * (H_solar + H_int) ----------------- STRUCTURE OF THE SCRIPT -------------------------------------- +Structure +--------- The script has the following structure: @@ -64,9 +67,6 @@ The script has the following structure: (3) calculate costs for corresponding additional insulation material (4) get cost savings per retrofitting measures for each sector by weighting with heated floor area - -------------------------------------------------------------------------------- -@author: Lisa """ import pandas as pd import xarray as xr diff --git a/scripts/build_sequestration_potentials.py b/scripts/build_sequestration_potentials.py index 63aa9dda..1dfda7eb 100644 --- a/scripts/build_sequestration_potentials.py +++ b/scripts/build_sequestration_potentials.py @@ -3,6 +3,12 @@ # # SPDX-License-Identifier: MIT +""" +Build regionalised geological sequestration potential for carbon dioxide using +data from `CO2Stop +`_. +""" + import geopandas as gpd import pandas as pd diff --git a/scripts/build_temperature_profiles.py b/scripts/build_temperature_profiles.py index f0f08cea..b1973fd8 100644 --- a/scripts/build_temperature_profiles.py +++ b/scripts/build_temperature_profiles.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT """ -Build temperature profiles. +Build time series for air and soil temperatures per clustered model region. """ import atlite diff --git a/scripts/build_transport_demand.py b/scripts/build_transport_demand.py index 797897a5..f6a4b30b 100644 --- a/scripts/build_transport_demand.py +++ b/scripts/build_transport_demand.py @@ -4,7 +4,9 @@ # SPDX-License-Identifier: MIT """ -Build transport demand. +Build land transport demand per clustered model region including efficiency +improvements due to drivetrain changes, time series for electric vehicle +availability and demand-side management constraints. """ import numpy as np diff --git a/scripts/cluster_gas_network.py b/scripts/cluster_gas_network.py index 7c181391..d180041c 100755 --- a/scripts/cluster_gas_network.py +++ b/scripts/cluster_gas_network.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT """ -Cluster gas network. +Cluster gas transmission network to clustered model regions. """ import logging diff --git a/scripts/copy_config.py b/scripts/copy_config.py index 0ff60e86..c79e578c 100644 --- a/scripts/copy_config.py +++ b/scripts/copy_config.py @@ -3,6 +3,10 @@ # # SPDX-License-Identifier: MIT +""" +Copy used configuration files and important scripts for archiving. +""" + from pathlib import Path from shutil import copy diff --git a/scripts/make_summary.py b/scripts/make_summary.py index b58ba698..7aff83fb 100644 --- a/scripts/make_summary.py +++ b/scripts/make_summary.py @@ -3,6 +3,11 @@ # # SPDX-License-Identifier: MIT +""" +Create summary CSV files for all scenario runs including costs, capacities, +capacity factors, curtailment, energy balances, prices and other metrics. +""" + import logging logger = logging.getLogger(__name__) diff --git a/scripts/plot_network.py b/scripts/plot_network.py index 9c5576f7..2110718b 100644 --- a/scripts/plot_network.py +++ b/scripts/plot_network.py @@ -3,6 +3,12 @@ # # SPDX-License-Identifier: MIT +""" +Creates plots for optimised network topologies, including electricity, gas and +hydrogen networks, and regional generation, storage and conversion capacities +built. +""" + import logging logger = logging.getLogger(__name__) diff --git a/scripts/plot_summary.py b/scripts/plot_summary.py index 01e3040e..af028116 100644 --- a/scripts/plot_summary.py +++ b/scripts/plot_summary.py @@ -3,6 +3,10 @@ # # SPDX-License-Identifier: MIT +""" +Creates plots from summary CSV files. +""" + import logging logger = logging.getLogger(__name__) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 3682ff50..4f0640cd 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -3,6 +3,11 @@ # # SPDX-License-Identifier: MIT +""" +Adds all sector-coupling components to the network, including demand and supply +technologies for the buildings, transport and industry sectors. +""" + import logging import os import re diff --git a/scripts/retrieve_sector_databundle.py b/scripts/retrieve_sector_databundle.py index 0526d01e..97426ab2 100644 --- a/scripts/retrieve_sector_databundle.py +++ b/scripts/retrieve_sector_databundle.py @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: MIT """ -Retrieve and extract sector data bundle. +Retrieve and extract data bundle for sector-coupled studies. """ import logging diff --git a/scripts/solve_sector_network.py b/scripts/solve_sector_network.py index 04839855..8bc8b4f6 100644 --- a/scripts/solve_sector_network.py +++ b/scripts/solve_sector_network.py @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: MIT """ -Solve network. +Solves sector-coupled network. """ import logging diff --git a/test/config.myopic.yaml b/test/config.myopic.yaml index 8795fde0..71c05f3c 100644 --- a/test/config.myopic.yaml +++ b/test/config.myopic.yaml @@ -17,7 +17,7 @@ scenario: clusters: - 5 sector_opts: - - 40H-T-H-B-I-A-solar+p3-dist1 + - 24H-T-H-B-I-A-solar+p3-dist1 planning_horizons: - 2030 - 2040 diff --git a/test/config.overnight.yaml b/test/config.overnight.yaml index 776d1fbb..ec9bd502 100644 --- a/test/config.overnight.yaml +++ b/test/config.overnight.yaml @@ -16,7 +16,7 @@ scenario: clusters: - 5 sector_opts: - - CO2L0-40H-T-H-B-I-A-solar+p3-dist1 + - CO2L0-24H-T-H-B-I-A-solar+p3-dist1 planning_horizons: - 2030 diff --git a/test/config.test1.yaml b/test/config.test1.yaml index ab7b2c42..d95858de 100755 --- a/test/config.test1.yaml +++ b/test/config.test1.yaml @@ -15,7 +15,7 @@ scenario: clusters: - 5 opts: - - Co2L-40H + - Co2L-24H countries: ['BE']