Skip to main content

Open Source Solar Forecasting for a Site

Project description

Quartz Solar Forecast

All Contributors

The aim of the project is to build an open source PV forecast that is free and easy to use. The forecast provides the expected generation in kw for 0 to 48 hours for a single PV site.

Open Climate Fix also provide a commercial PV forecast, please get in touch at quartz.support@openclimatefix.org

The current model uses GFS or ICON NWPs to predict the solar generation at a site

from quartz_solar_forecast.forecast import run_forecast
from quartz_solar_forecast.pydantic_models import PVSite

# make a pv site object
site = PVSite(latitude=51.75, longitude=-1.25, capacity_kwp=1.25)

# run model, uses ICON NWP data by default
predictions_df = run_forecast(site=site, ts='2023-11-01')

Which gives the following prediction

https://github.com/openclimatefix/Open-Source-Quartz-Solar-Forecast/blob/main/predictions.png?raw=true

Model

The model is a gradient boosted tree model and uses 9 NWP variables. It is trained on 25,000 PV sites with over 5 years of PV history, which is available here. The training of this model is handled in pv-site-prediction TODO - we need to benchmark this forecast.

The 9 NWP variables, from Open-Meteo documentation, are mentioned above with their appropariate units.

  1. Visibility (km), or vis: Distance at which objects can be clearly seen. Can affect the amount of sunlight reaching solar panels.
  2. Wind Speed at 10 meters (km/h), or si10 : Wind speed measured at a height of 10 meters above ground level. Important for understanding weather conditions and potential impacts on solar panels.
  3. Temperature at 2 meters (°C), or t : Air temperature measure at 2 meters above the ground. Can affect the efficiency of PV systems.
  4. Precipiration (mm), or prate : Precipitation (rain, snow, sleet, etc.). Helps to predict cloud cover and potentiel reductions in solar irradiance.
  5. Shortwave Radiation (W/m²), or dswrf: Solar radiation in the shortwave spectrum reaching the Earth's surface. Measure of the potential solar energy available for PV systems.
  6. Direct Radiation (W/m²) or dlwrf: Longwave (infrared) radiation emitted by the Earth back into the atmosphere. confirm it is correct
  7. Cloud Cover low (%), or lcc: Percentage of the sky covered by clouds at low altitudes. Impacts the amount of solar radiation reachign the ground, and similarly the PV system.
  8. Cloud Cover mid (%), or mcc : Percentage of the sky covered by clouds at mid altitudes.
  9. Cloud Cover high (%), or lcc : Percentage of the sky covered by clouds at high altitude

Known restrictions

  • The model is trained on UK MetOffice NWPs, but when running inference we use GFS data from Open-meteo. The differences between GFS and UK MetOffice, could led to some odd behaviours.
  • It looks like the GFS data on Open-Meteo is only available for free for the last 3 months.

Evaluation

To evaluate the model we use the UK PV dataset and the ICON NWP dataset. All the data is publicly available and the evaluation script can be run with the following command

python scripts/run_evaluation.py

The test dataset we used is defined in quartz_solar_forecast/dataset/testset.csv. This contains 50 PV sites, which 50 unique timestamps. The data is from 2021.

The results of the evaluation are as follows The MAE is 0.1906 kw across all horizons.

Horizons MAE [kw] MAE [%]
0 0.202 +- 0.03 6.2
1 0.211 +- 0.03 6.4
2 0.216 +- 0.03 6.5
3 - 4 0.211 +- 0.02 6.3
5 - 8 0.191 +- 0.01 6
9 - 16 0.161 +- 0.01 5
17 - 24 0.173 +- 0.01 5.3
24 - 48 0.201 +- 0.01 6.1

If we exclude nighttime, then the average MAE [%] from 0 to 36 forecast hours is 13.0%.

Notes:

  • The MAE in % is the MAE divided by the capacity of the PV site. We acknowledge there are a number of different ways to do this.
  • It is slightly surprising that the 0-hour forecast horizon and the 24-48 hour horizon have a similar MAE. This may be because the model is trained expecting live PV data, but currently in this project we provide no live PV data.

Abbreviations

  • NWP: Numerical Weather Predictions
  • GFS: Global Forecast System
  • PV: Photovoltaic
  • MAE: Mean Absolute Error
  • KW: Kilowatt

Contribution

We welcome other models

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Peter Dudfield
Peter Dudfield

💻
Megawattz
Megawattz

🤔
EdFage
EdFage

📖 💻
Chloe Pilon Vaillancourt
Chloe Pilon Vaillancourt

📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Project details


Release history Release notifications | RSS feed

This version

0.0.8

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quartz_solar_forecast-0.0.8.tar.gz (468.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quartz_solar_forecast-0.0.8-py3-none-any.whl (191.6 kB view details)

Uploaded Python 3

File details

Details for the file quartz_solar_forecast-0.0.8.tar.gz.

File metadata

  • Download URL: quartz_solar_forecast-0.0.8.tar.gz
  • Upload date:
  • Size: 468.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for quartz_solar_forecast-0.0.8.tar.gz
Algorithm Hash digest
SHA256 9b8950322ab779d325b92157eaf81edd089a76a1b5bfb84ef477959846f7aa02
MD5 5d952f970587114b84afd316757add68
BLAKE2b-256 9a2590c5bf7cc6744b92da1ee4df2ca4a9db1645a9ba6c343227821640b216ec

See more details on using hashes here.

File details

Details for the file quartz_solar_forecast-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for quartz_solar_forecast-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 afbaaf39f71e5d0ae953430e3dbd3a55c56dcf6dbc0704872ca035696d10d26b
MD5 d01d055498400cca6a08dfbd6a67c896
BLAKE2b-256 daaa2e8184b4acc109d6de9e17f331868e5395ef557f9e01798fb78b0f75ed30

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page