×

OpenWeather
Meteorological Service

Dan Hart Speak to the Chief
Meteorologist Dan Hart and
his team!

Bring some shine to your app with our Global Solar Radiation Forecast and Current data API

Bring some shine to your app with our Global Solar Radiation Forecast and Current data API

Posted on 13 Dec 2021

Since the dawn of humanity, we have strived to find more efficient ways to produce our energy. By 700 BC we had understood how to create fire by focusing the sun’s rays, and by 1698 we had started to harness the power of steam. Today, we are focusing our ingenuity to develop a network of sustainable, reliable, clean, and efficient sources of energy.

2018 saw renewable energy investment reach £288bn, with solar power accounting for $139bn of that. Predicting how much solar radiation we are due to receive is becoming a critical element in the management of our sustainable resources. One of the main drawbacks of solar power is the variability of sunlight, and the need to operate arrays of grid-connected batteries to store the energy. Having an accurate and nuanced forecast of the level of solar radiation helps avoid unnecessary battery charging cycles, saving energy, resources and money.   

In addition to being a source of energy for our homes and businesses, the sun has also proved to affect our health in many ways. In 1992, the World Health Organisation launched their Intersun Project to carry out research into the link between our health and solar radiation. This ongoing project recommended that local authorities should include the solar radiation levels with the normal weather forecast, to help the population reduce the risk of solar eye and skin damage.  

Understanding the level of solar radiation is therefore becoming as important as understanding the forecast amount of rain and snow heading our way. The OpenWeather Solar Radiation API Current and Forecast gives detailed solar data, for any location on the globe. The forecast data can reach up to 16 days into the future, with a 1-hour granularity for the first 120 hours, and 3 hours after that. 

There are three indices that are returned by this easy-to-use, double API set:

  • Global Horizontal Irradiance (GHI)

  • Direct Normal Irradiance (DNI)

  • Diffuse Horizontal Irradiance (DHI)

This OpenWeather API returns current and forecast solar radiation data for both our clear sky and cloudy sky models. 

Our two models use enriched input data sets to build upon the Solis algorithm for clear sky, and DirInt for cloudy to give highly accurate results. There is a fuller description of these APIs in our documentation here.     

After gaining access, you can start retrieving data by calling the APIs:

  • For retrieving the current solar radiation data, use the following API call, specifying the location’s coordinates and your API key in the API request. 

    http://api.openweathermap.org/data/2.5/solar_radiation?lat={lat}&lon={lon}&
    appid={API key}

  • Similarly, for retrieving the forecast solar radiation data, use the following API call:

    http://api.openweathermap.org/data/2.5/solar_radiation/forecast?lat={lat}&
    lon={lon}&appid={API key}


The API response for both API calls will return that solar radiation data for the specified geographical point. The API response will contain DNI, DHI, GHI indices for both clear sky and cloudy sky models. An example of the response is below:

    
{
  "coord": {
    "lon": -114.6244,
    "lat": 32.7243
  },
  "list": [
    {
      "radiation": {
        "ghi": 206.68,
        "dni": 2.27,
        "dhi": 204.83,
        "ghi_cs": 826.71,
        "dni_cs": 885.47,
        "dhi_cs": 114.93
      },
      "dt": 1618232400
    }
  ]
}


Getting up and running with the OpenWeather API cannot be easier – our sales team can explain how you can gain access for your API key. If you do not have a key already, please just sign up here. You can also start studying our detailed technical documentation.


Find out more how the OpenWeather Solar Radiation API Current and Forecast can help you understand the solar radiation, wherever you may be.  

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.