From Africa/Climate & energy tech/Nigeria · South Africa
Weather data alone can forecast solar power in Ibadan
A Random Forest model turned ordinary weather records into hourly sunlight forecasts for one site in Ibadan, Nigeria. Its yearly error on total sunlight was 0.19.
Researchers at the University of Ibadan in Nigeria and the University of Venda in South Africa forecast hourly sunlight in Ibadan from ordinary weather records. A Random Forest model beat a CNN and an LSTM. Its yearly normalised error on total sunlight was 0.19, falling to 0.12 in the dry season and rising to 0.27 in the wet season.
What happened
You flick a switch and nothing happens. In many Nigerian homes that is a normal evening. So people buy solar panels. But a panel is only as good as the sun that reaches it.
How much sun will reach your roof tomorrow? The usual way to know is a pyranometer. That is a sensor that sits outdoors and measures sunlight all day. It costs money, and someone must look after it. Most homes and small firms do not have one.
Three researchers tried a cheaper way. They used plain weather numbers, such as heat, damp air and wind, to work out how much sunlight hits the ground in Ibadan. Then they turned that sunlight into an energy figure for real solar panels.
The test
The paper is “Forecasting solar power output in Ibadan”, by Obarotu Peter Urhuerhi, Christopher Udomboso and Caston Sigauke. Two of them work at the University of Ibadan in Nigeria, at the Center for Petroleum, Energy Economics and Law and at the Department of Statistics. The third works at the University of Venda in South Africa.
They pulled hourly weather records for one spot in Ibadan. The spot is the CPEEL site at the University of Ibadan. The records run from 2005 to 2022. They come from the National Solar Radiation Data Base. Night hours, 7 p.m. to 6 a.m., were dropped.
The method runs in two steps. Step one guesses the sunlight on a clear day from weather alone. Step two adds cloud type, and guesses the real sunlight. The team trained three models on the same data. One was a Random Forest. The other two were neural networks, a CNN and an LSTM.
The whole of 2022 was held back. The models never saw it while learning. The rest was split, 80 percent to train and 20 percent to test. At the end, the sunlight forecasts went into PVLib, a free Python tool, with the specs of two real panels. One is the Trina Solar TSM-500DE18M (II). The other is the Canadian Solar CS3Y-500MS.
The result
The Random Forest won. It is the plainest of the three models. It grows many small decision trees and averages them.
For the year as a whole, its error on total sunlight was 0.19. That figure is called nRMSE. It is the typical size of a miss, divided by the size of the thing measured. So 0.19 means the typical miss was about 19 percent of the average. On the same yearly test, the error was 0.22 for scattered sky light and 0.33 for the direct beam.
The seasons split sharply. In the dry season the error on total sunlight fell to 0.12. In the wet season it rose to 0.27. The direct beam was worst of all in the wet season, at 0.50.
THE DRY SEASON IS EASY TO FORECAST AND THE WET SEASON IS NOT.
What it means
Think about what a solar seller in Ibadan must do. A customer asks how much power a system will make. Today the honest answer is a rough one, built on national averages. It does not fit one street, and it does not fit one season.
This work points at a better answer. Free weather records and a free Python tool give an hour by hour estimate for one place. No sensor is needed on the roof. The team also showed that you can type in a panel’s own numbers when that panel is missing from the standard database.
The season gap matters most. If you size a battery on dry season sun, you will fall short in June and July. This is because cloud breaks the direct beam, and the beam is the hardest part to forecast.
Business ideas from this paper
- A one page solar yield report for a single address in a Nigerian city, built from free weather records and PVLib, with separate dry and wet season figures. Who buys it: small solar installers who must quote a job. A price to test: 15 dollars per report, or 60 dollars a month for ten. A one-week test: give free reports to five installers, then ask each one to pay for the sixth.
- A wet season warning service that sends a short message when tomorrow’s sunlight looks far below normal. Who buys it: mini-grid and off-grid operators who must decide when to run a diesel backup. A price to test: 30 dollars a month for each site. A one-week test: send alerts by WhatsApp to three operators for seven days, then count how many changed a plan because of one.
- A short training kit that teaches junior staff to rebuild this forecast for their own town, using the authors’ public code. Who buys it: technical colleges and solar firms that train new hires. A price to test: 200 dollars for a class of twenty. A one-week test: run one free three hour session, then ask the department to book a paid one.
How sure can you be?
Not very sure yet. Here is why.
The study covers one spot. It is a single set of map coordinates at the University of Ibadan. Nothing here shows the same errors in Kano, in Lagos or anywhere else.
The sunlight figures came from a database, not from a sensor on that roof. The paper checks its forecasts against those database values. It does not report a check against a pyranometer in Ibadan. It also does not report the metered output of a system that is really installed.
The authors are open about the weak spots. They say the direct beam is still hard to forecast. They say the wet season needs better accuracy, because cloud and rain swing the output. They suggest mixing model types as the next step.
We score this paper 4 out of 10. It is a preprint, so no reviewer has checked it. It rests on one dataset from one place. The bright spot is openness. The data and the full Python code sit on GitHub, so anyone can run it again.
What would settle it? Run the same method at several African sites, then compare each forecast with a real meter for a full year.
Do this today
If you sell or run solar where the year splits into wet and dry, quote two numbers instead of one. Give a dry season figure and a wet season figure, and say plainly which months are which.
Source: Forecasting solar power output in Ibadan: A machine learning approach leveraging weather data and system specifications, August 2025. arXiv:2508.07462 · arxiv.org (preprint · not yet peer reviewed).
Just Out Tech explains new research in plain language. This article was drafted with AI assistance and checked by a human against the original source.
- A Random Forest trained on hourly weather records for one Ibadan site reached a normalised error of 0.19 on yearly total sunlight, beating a CNN and an LSTM.
- The same model was far more accurate in the dry season, with an error of 0.12 on total sunlight, than in the wet season, where the error was 0.27.
- The direct beam stayed the hardest part to forecast, with a wet season error of 0.50, which is the number the authors themselves flag as the weak point.
Questions people ask
how do you forecast solar power without a sun sensor?
You predict the sunlight from weather numbers you already have, such as temperature, humidity, wind and cloud type. This study did that in two steps, first for a clear sky and then for the real cloudy sky. The predicted sunlight was then fed into PVLib, a free Python tool, along with the specs of a real panel. The tool turns sunlight into an energy figure.
what does an nRMSE of 0.19 actually mean?
nRMSE is the typical size of a miss, divided by the size of the thing measured. An nRMSE of 0.19 means the typical miss was about 19 percent of the average value. Lower is better. In this study the dry season score of 0.12 was the best and the wet season direct beam score of 0.50 was the worst.
is the code from this paper available?
Yes. The paper states that the data and the full Python source code for preprocessing, training, evaluation and plotting are openly available on GitHub. That is unusual and it is the strongest point in the paper's favour. Anyone can rerun the work and check the numbers.
does this work for other African cities?
The paper does not show that. It covers a single set of coordinates at the University of Ibadan in Nigeria. The models were trained on records for that one place. Testing elsewhere would need new local records and a fresh run.