Skip to content

Rule build_renewable_profiles

Workflow Diagram

See the complete workflow in the repository.

digraph snakemake_dag { graph [bgcolor=white, margin=0, size="8,5" ]; node [fontname=sans, fontsize=10, penwidth=2, shape=box, style=rounded ]; edge [color=grey, penwidth=2 ]; 4 [color="0.61 0.6 0.85", label=add_electricity]; 5 [color="0.19 0.6 0.85", label=build_bus_regions]; 9 [color="0.22 0.6 0.85", fillcolor=gray, label=build_renewable_profiles, style=filled]; 5 -> 9; 9 -> 4; 6 [color="0.17 0.6 0.85", label=base_network]; 6 -> 9; 8 [color="0.00 0.6 0.85", label=build_shapes]; 8 -> 9; 12 [color="0.31 0.6 0.85", label=build_natura_raster]; 12 -> 9; 13 [color="0.56 0.6 0.85", label=build_cutout]; 13 -> 9; }

Script Documentation

Calculates for each network node the (i) installable capacity (based on land- use), (ii) the available generation time series (based on weather data), and (iii) the average distance from the node for onshore wind, AC-connected offshore wind, DC-connected offshore wind and solar PV generators. For hydro generators, it calculates the expected inflows. In addition for offshore wind it calculates the fraction of the grid connection which is under water.

Relevant settings

.. code:: yaml

snapshots:

atlite:
    nprocesses:

renewable:
    {technology}:
        cutout:
        copernicus:
            grid_codes:
            distance:
            distance_grid_codes:
        natura:
        max_depth:
        max_shore_distance:
        min_shore_distance:
        capacity_per_sqkm:
        correction_factor:
        potential:
        min_p_max_pu:
        clip_p_max_pu:
        resource:
        clip_min_inflow:

.. seealso:: Documentation of the configuration file config.yaml at :ref:snapshots_cf, :ref:atlite_cf, :ref:renewable_cf

Inputs

  • data/copernicus/PROBAV_LC100_global_v3.0.1_2019-nrt_Discrete-Classification-map_EPSG-4326.tif: Copernicus Land Service <https://land.copernicus.eu/global/products/lc> inventory on 23 land use classes (e.g. forests, arable land, industrial, urban areas) based on UN-FAO classification. See Table 4 in the PUM <https://land.copernicus.eu/global/sites/cgls.vito.be/files/products/CGLOPS1_PUM_LC100m-V3_I3.4.pdf> for a list of all classes.

    .. image:: /img/copernicus.png :width: 33 %

  • data/gebco/GEBCO_2021_TID.nc: A bathymetric <https://en.wikipedia.org/wiki/Bathymetry> data set with a global terrain model for ocean and land at 15 arc-second intervals by the General Bathymetric Chart of the Oceans (GEBCO) <https://www.gebco.net/data_and_products/gridded_bathymetry_data/>.

    .. image:: /img/gebco_2021_grid_image.jpg :width: 50 %

    Source: GEBCO <https://www.gebco.net/data_and_products/images/gebco_2019_grid_image.jpg>_

  • resources/natura.tiff: confer :ref:natura

  • resources/offshore_shapes.geojson: confer :ref:shapes
  • resources/.geojson: (if not offshore wind), confer :ref:busregions
  • resources/regions_offshore.geojson: (if offshore wind), :ref:busregions
  • "cutouts/" + config["renewable"][{technology}]['cutout']: :ref:cutout
  • networks/base.nc: :ref:base

Outputs

  • resources/profile_{technology}.nc, except hydro technology, with the following structure

    =================== ========== ========================================================= Field Dimensions Description =================== ========== ========================================================= profile bus, time the per unit hourly availability factors for each node


    weight bus sum of the layout weighting for each node


    p_nom_max bus maximal installable capacity at the node (in MW)


    potential y, x layout of generator units at cutout grid cells inside the Voronoi cell (maximal installable capacity at each grid cell multiplied by capacity factor)


    average_distance bus average distance of units in the Voronoi cell to the grid node (in km)


    underwater_fraction bus fraction of the average connection distance which is under water (only for offshore) =================== ========== =========================================================

  • resources/profile_hydro.nc for the hydro technology =================== ================ ======================================================== Field Dimensions Description =================== ================ ======================================================== inflow plant, time Inflow to the state of charge (in MW), e.g. due to river inflow in hydro reservoir. =================== ================ ========================================================

    • profile

    .. image:: /img/profile_ts.png :width: 33 % :align: center

    • p_nom_max

    .. image:: /img/p_nom_max_hist.png :width: 33 % :align: center

    • potential

    .. image:: /img/potential_heatmap.png :width: 33 % :align: center

    • average_distance

    .. image:: /img/distance_hist.png :width: 33 % :align: center

    • underwater_fraction

    .. image:: /img/underwater_hist.png :width: 33 % :align: center

Description

This script leverages on atlite function to derivate hourly time series for an entire year for solar, wind (onshore and offshore), and hydro data.

This script functions at two main spatial resolutions: the resolution of the network nodes and their Voronoi cells <https://en.wikipedia.org/wiki/Voronoi_diagram>_, and the resolution of the cutout grid cells for the weather data. Typically the weather data grid is finer than the network nodes, so we have to work out the distribution of generators across the grid cells within each Voronoi cell. This is done by taking account of a combination of the available land at each grid cell and the capacity factor there.

This uses the Copernicus land use data, Natura2000 nature reserves and GEBCO bathymetry data.

.. image:: /img/eligibility.png :width: 50 % :align: center

To compute the layout of generators in each node's Voronoi cell, the installable potential in each grid cell is multiplied with the capacity factor at each grid cell. This is done since we assume more generators are installed at cells with a higher capacity factor.

.. image:: /img/offwinddc-gridcell.png :width: 50 % :align: center

.. image:: /img/offwindac-gridcell.png :width: 50 % :align: center

.. image:: /img/onwind-gridcell.png :width: 50 % :align: center

.. image:: /img/solar-gridcell.png :width: 50 % :align: center

This layout is then used to compute the generation availability time series from the weather data cutout from atlite.

Two methods are available to compute the maximal installable potential for the node (p_nom_max): simple and conservative:

  • simple adds up the installable potentials of the individual grid cells. If the model comes close to this limit, then the time series may slightly overestimate production since it is assumed the geographical distribution is proportional to capacity factor.

  • conservative ascertains the nodal limit by increasing capacities proportional to the layout until the limit of an individual grid cell is reached.

get_irena_annual_hydro_generation(fn, countries)

Load annual renewable hydropower generation data from the IRENA Country sheet. Convert ISO3 country codes to ISO2 and annual generation from GWh to MWh.

Original source: https://www.irena.org/-/media/Files/IRENA/Agency/Publication/2025/Jul/IRENA_Statistics_Extract_2025H2.xlsx

Note

IRENA energy statistics dataset is available for non-commercial use only. Users are responsible for ensuring compliance with the dataset’s licensing terms.

check_cutout_completness(cf)

Check if a cutout contains missed values.

That may be the case due to some issues with accessibility of ERA5 data See for details https://confluence.ecmwf.int/display/CUSF/Missing+data+in+ERA5T Returns share of cutout cells with missed data

estimate_bus_loss(data_column, tech)

Calculated share of buses with data loss due to flaws in the cutout data.

Returns share of the buses with missed data

filter_cutout_region(cutout, regions)

Filter the cutout to focus on the region of interest.

rescale_hydro(plants, runoff, normalize_using_yearly, normalization_year)

Function used to rescale the inflows of the hydro capacities to match country statistics.

Parameters

plants : DataFrame Run-of-river plants orf dams with lon, lat, countries, installed_hydro columns. Countries and installed_hydro column are only used with normalize_using_yearly installed_hydro column shall be a boolean vector specifying whether that plant is currently installed and used to normalize the inflows runoff : xarray object Runoff at each bus normalize_using_yearly : DataFrame Dataframe that specifies for every country the total hydro production year : int Year used for normalization

check_flag(d, field)

Check if a string is contained in keys of a dictionary and is either True or non-boolean