GSEE: Global Solar Energy Estimator
Switch branches/tags
Nothing to show
Clone or download
sjpfenninger Modify sunrise/set behavior, add tests
* Sunrise/sunset time now take sun radius into consideration
* Add tests for sunrise/sunset and sun angles
* Move climate data interface tests into a overall common test subdir
Latest commit 4750f37 Sep 26, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.

Build Status Coverage PyPI version

GSEE: Global Solar Energy Estimator

GSEE is a solar energy simulation library designed for rapid calculations and ease of use. uses GSEE.


Works only with Python 3. Required libraries:


Simply install with pip:

pip install gsee

The recommended way to install the required scientific libraries is to use the Anaconda Python distribution.


The following submodules are available:

  • brl_model: an implementation of the BRL model, a method to derive the diffuse fraction of irradiance, based on Ridley et al. (2010)
  • climatedata_interface: an interface to use GSEE with annual, seasonal, monthly or daily data. See docs/climatedata_interface for details.
  • pv: electric output from PV a panel
  • trigon: functions to calculate irradiance on an inclined plane

A model can be imported like this: import gsee.pv

A plant simulation model implements a model class (e.g. PVPlant) with the relevant settings, and a run_model() function that take time series data (a pandas Series) and runs a default instance of the model class, but can also take a model argument to specify a custom-configured model instance.


Power output from a PV system with fixed panels

In this example, data must be a pandas.DataFrame with columns global_horizontal (in W/m2), diffuse_fraction, and optionally a temperature column for ambient air temperature (in degrees Celsius).

result = gsee.pv.run_model(
    coords=(22.78, 5.51),  # Latitude and longitude
    tilt=30, # 30 degrees tilt angle
    azim=180,  # facing towards equator,
    tracking=0,  # fixed - no tracking
    capacity=1000,  # 1000 W

Aperture irradiance on a panel with 2-axis tracking

location = (22.78, 5.51)
plane_irradiance = gsee.trigon.aperture_irradiance(
    data['direct_horizontal'], data['diffuse_horizontal'],
    location, tracking=2

Climate data Interface

Example use directly reading NetCDF files with GHI, diffuse irradiance fraction, and temperature data:

from gsee.climatedata_interface.interface import run_interface

    ghi_tuple=('', 'ghi'),  # Tuple of (input file path, variable name)
    diffuse_tuple=('', 'diff_frac'),
    temp_tuple=('', 't2m'),
    params=dict(tilt=35, azim=180, tracking=0, capacity=1000),

Tilt can be given as a latitude-dependent function instead of static value:

params = dict(tilt=lambda lat: 0.35396 * lat + 16.84775, ...)

Instead of letting the climate data interface read and prepare data from NetCDF files, an xarray.Dataset can also be passed directly (e.g. when using the module in combination with a larger application):

from gsee.climatedata_interface.interface import run_interface_from_dataset

result = run_interface_from_dataset(
    data=my_dataset,  # my_dataset is an xarray.Dataset
    params=dict(tilt=35, azim=180, tracking=0, capacity=1000)

By default, a built-in file with monthly probability density functions is automatically downloaded and used to generate synthetic daily irradiance.

For more information, see the climate data interface documentation.


To install the latest development version directly from GitHub:

pip install -e git+

To build the climatedata_interface submodule, Cython is required.

Credits and contact

Contact Stefan Pfenninger for questions about GSEE. GSEE is also a component of the project, developed by Stefan Pfenninger and Iain Staffell. Use the contact page there if you want more information about


If you use GSEE or code derived from it in academic work, please cite:

Stefan Pfenninger and Iain Staffell (2016). Long-term patterns of European PV output using 30 years of validated hourly reanalysis and satellite data. Energy 114, pp. 1251-1265. doi: 10.1016/