Weather data: Main notebook
This Notebook is part of the Weather data Datapackage of Open Power System Data.

About Open Power System Data

This notebook is part of the project Open Power System Data. Open Power System Data develops a platform for free and open data for electricity system modeling. We collect, check, process, document, and provide data that are publicly available but currently inconvenient to use. More info on Open Power System Data:

About Jupyter Notebooks and GitHub

This file is a Jupyter Notebook. A Jupyter Notebook is a file that combines executable programming code with visualizations and comments in markdown format, allowing for an intuitive documentation of the code. We use Jupyter Notebooks for combined coding and documentation. We use Python 3 as programming language. All Notebooks are stored on GitHub, a platform for software development, and are publicly available. More information on our IT-concept can be found here. See also our step-by-step manual how to use the dataplatform.

About this datapackage

We provide data in different chunks, or datapackages. The one you are looking at right now, Weather data, contains a script that allows the download, subset and processing of MERRA-2 datasets (provided by NASA Goddard Space Flight Center) and export them as CSV.

Weather data differ significantly from the other data types used resp. provided by OPSD in that the sheer size of the data packages greatly exceeds OPSD's capacity to host them in a similar way as feed-in timeseries, power plant data etc. While the other data packages also offer a complete one-klick download of the bundled data packages with all relevant data, this is impossible for weather datasets like MERRA-2 due to their size (variety of variables, very long timespan, huge geographical coverage etc.). It would make no sense to mirror the data from the NASA servers. Instead we choose to provide a documented methodological script (as a kind of tutorial). The method describes one way to automatically obtain the desired weather data from the MERRA-2 database and simplifies resp. unifies alternative manual data obtaining methods in a single script.

For the weather package we offer a ready-made sample data set with weather data for Germany and the year 2016. It includes the following data:

  • wind
    • v1: velocity [m/s] @ height h1 (2 meters above displacement height)
    • v2: velocity [m/s] @ height h2 (10 meters above displacement height)
    • v_50m: velocity [m/s] @ 50 meters above ground
    • h1: height above ground [m] (h1 = displacement height +2m)
    • h2: height above ground [m] (h2 = displacement height +10m)
    • z0: roughness length [m]
  • solar parameters:
    • SWTDN: total top-of-the-atmosphere horizontal radiation [W/m²]
    • SWGDN: total ground horizontal radiation [W/m²]
    • (Note: this is not the direkt/indirect radiation which can be calculated with these parameters using one of the methods described in the documentation script)
  • temperature data
    • T: Temperature [K] @ 2 meters above displacement height (see h1)
  • air data
    • Rho: air density [kg/m³] @ surface
    • p: air pressure [Pa] @ surface

To access, subset and download the MERRA-2 database we use the OPeNDAP framework. The use of MERRA-2 is only exemplary for this method - through the use of OPenDAP it can be adapted to other datasets using the same protocol.

This method/script is tailored to the needs of energy system modellers that a) do not want to downlad and haggle with the original MERRA-2 data manually, and those who on the other side also b) do not just want to take over ready-made feed-ins calculated by tools like but rather want to use their own feed-in tools with processed weather data.

See the OPSD wiki on Github for more information on MERRA-2 weather data, OPeNDAP and OPSD's approach.

Data sources

The data source is the MERRA-2 dataset provided by NASA Goddard Space Flight Center. Specifically we use the following datasets (Two–Dimensional, Hourly, Time‐averaged Assimilation and Forecast Fields)


This notebook as well as all other documents in this repository is published under the MIT License.