Skip to content

This repository contains a set of R scripts and the data illustrating the possibility to model hourly electricity generation from renewable sources using the latest climate reanalysis from the Copernicus Climate Change Service (C3S).

Notifications You must be signed in to change notification settings

matteodefelice/modelling-electricity-generation-with-era5

Repository files navigation

DOI

Modelling renewable electricity generation in Europe with Copernicus ERA5 reanalysis

This repository contains a set of R scripts and the data illustrating the possibility to model with a random forest hourly electricity generation from renewable sources using the latest climate reanalysis from the Copernicus Climate Change Service (C3S). This work was supposed to be part of a scientific paper but then I have opted for a public repository.

The random forests models the hourly generation of run-of-river hydro-power, wind onshore and solar power using six different essential climate variables: runoff (ro), snow depth (sd), surface solar radiation downwards (ssrd), 2-meter temperature (t2m), wind speed at 10 meters (ws10) and wind speed at 100 meters (ws100).

Structure

This repository contains all the code and the data to run from scratch the analysis. The main folder contains all the markdown, while in src there is all the R files and the data. The markdown shows the commented code outputs and it has been generated with the powerful Knitr's spin.

There are six scripts in this repository:

Results

This random forest-based approach, in spite of its simplicity, leads in many cases to an error between 10%-20% (normalised mean absolute error) for the hourly generation. For example this is the error using the predictors aggregated at country level (NUTS0), the results improve using smaller aggregations: NMAE_NUTS

Moreover, this data-driven approach could be used to analyse the relationship between meteorological predictors and generations, for example analysing what is the impact of wind speed on the European-wide wind power...

WIND_POWER_RESPONSE

...or classifying the importance of predictors for each type of generation:

importance_facet

Data sources

This work is based on two datasets:

  1. ERA-NUTS: time-series based on ERA5 reanalysis for all the European regions using the NUTS 2016 classification. The original data has been split in single feather files in the folder src/ERA5-NUTS-2015-2018.
  2. Electricity generation data: the data is coming from the ENTSO-E Transparency platform for run-of-river hydro-power (Hydro Run-of-river and poundage) and from Open Power System Data time-series for wind and solar. The data has been split for country and generation type in feather files in the folder src/ts_prod.

Requirements

To run the code you need:

  • R
  • some famous packages like the tidyverse meta-package, lubridate, randomForest and feather
  • the package DALEX, possibly a recent version (I have used the 0.4.4)

References

This code is inspired by the work done during the C3S ECEM project (see this paper by Troccoli et al. ). This repository can be cited using the DOI 10.5281/zenodo.3458548

Contacts

If you need further information, additional code or data, you can contact me or you can create an Issue in the repository.

About

This repository contains a set of R scripts and the data illustrating the possibility to model hourly electricity generation from renewable sources using the latest climate reanalysis from the Copernicus Climate Change Service (C3S).

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages