GSEE: Global Solar Energy Estimator
GSEE is a solar energy simulation library designed for rapid calculations and ease of use, from a single site with a pandas DataFrame to hundreds of thousands of sites or global grids with xarray Datasets. Renewables.ninja uses GSEE.
The development of GSEE predates the existence of pvlib-python but builds on its functionality as of v0.4.0. Use GSEE if you want fast simulations with sensible defaults, and pvlib-python if you need control over the nuts and bolts of simulating PV systems.
Upgrading from an older version? See the guide on migrating from v0.3 to v0.4.
Installation
pip install gsee
To also install the built-in irradiance probability density functions used by the climate data interface (the gsee-climate-data companion package):
pip install gsee[climate]
GSEE is also available via conda-forge (conda install -c conda-forge gsee); the gsee-climate-data companion package must currently be installed with pip.
See Development for installing a development build.
Functionality
There are three entry points, from single sites to global grids:
- Single site:
gsee.pv.run_model()simulates one PV system from a pandas DataFrame of hourly or finer irradiance data. - Many sites or grids:
gsee.api.run_sites()andgsee.api.run_grid()simulate many sites at once on a vectorized computation core, at roughly 20x lower per-site cost than the single-site path, with chunked and optionally parallel execution. - Climate data:
gsee.climate.run_climate()runs the PV model directly on gridded climate data at annual, seasonal, monthly, daily or hourly resolution, synthesizing hourly irradiance where needed.
Underneath sit the lower-level modules:
gsee.core: the vectorized multi-site computation core (solar position, plane-of-array irradiance, panel and inverter models, diffuse-fraction estimation, hourly synthesis) operating on(time, site)numpy arrays.gsee.legacy: the frozen pre-0.4 single-site implementation (ephem-based solar positions and the original BRL diffuse-fraction model), kept only to replicate older simulation runs; requires the optionallegacyextra (pip install gsee[legacy]), see Legacy options.
Examples
Power output from a PV system with fixed panels
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), indexed with a timezone-aware UTC DatetimeIndex.
result = gsee.pv.run_model(
data,
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
)
Power output from many sites at once
result = gsee.api.run_sites(
dataset, # xarray.Dataset over (time, site), see the multi-site documentation
tilt=30,
azim=180,
tracking=0,
capacity=1000,
)
See Multi-site simulations for the input format and the scaling options (chunking, worker processes, float32 mode, streaming input data from disk).
In-plane irradiance and other intermediate results
include_raw_data=True returns a DataFrame that includes the in-plane direct and diffuse irradiance, module temperature and relative efficiency alongside the power output:
result = gsee.pv.run_model(
data,
coords=(22.78, 5.51),
tilt=30,
azim=180,
tracking=2, # 2-axis tracking
capacity=1000,
include_raw_data=True,
)
plane_irradiance = result[["direct", "diffuse"]]
PV output from gridded monthly climate data
result = gsee.climate.run_climate(
dataset, # xarray.Dataset over (time, lat, lon) with monthly mean irradiance
tilt=35,
azim=180,
tracking=0,
capacity=1000,
pdfs="builtin", # requires `pip install gsee[climate]`
)
See the climate data interface documentation for details.
Credits and contact
Contact Stefan Pfenninger for questions about GSEE. GSEE is also a component of the Renewables.ninja project, developed by Stefan Pfenninger and Iain Staffell. Use the contact page there if you want more information about Renewables.ninja.
Citation
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/j.energy.2016.08.060
License
BSD-3-Clause
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Stefan Pfenninger-Lee 💻 🤔 |
Iain Staffell 🤔 |
Johannes 💻 🤔 |
Tony Yu Cao 🐛 |
Jan Wohland 🐛 |
Linh Ho 💻 🤔 |
Mayk Thewessen 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!