AI Models Predict Hourly Temperatures Across 23 Years in Riyadh, but Reveal Rising Summer Heat Extremes
Urban Studies

AI Models Predict Hourly Temperatures Across 23 Years in Riyadh, but Reveal Rising Summer Heat Extremes

Researchers evaluate six machine learning architectures to forecast extreme hourly temperatures in the hyper-arid capital of Saudi Arabia.

By Mary Ellison
Published:
Email this Article
AI Models Predict Hourly Temperatures Across 23 Years in Riyadh, but Reveal Rising Summer Heat Extremes
Photo by ray rui on Unsplash

Hourly air temperature in Riyadh exhibits extreme diurnal fluctuations and seasonal variations that directly impact daily commuting safety, public health, and cooling energy demand in the capital of Saudi Arabia. Abdulla Al Kafy and researchers at the King Saud University network developed a data-driven prediction framework using 23 years of meteorological observations from 2001 to 2023. The team evaluated six machine learning and deep learning models to predict hourly air temperature across the desert metropolis. Among the tested algorithms, the long short-term memory model achieved the highest overall accuracy with a root mean square error of 0.1371 degrees Celsius. These findings, published in PLOS One, provide municipal planners and public health officials with reliable tools for managing urban heat stress and peak electricity loads.

Diurnal Temperature Dynamics in Riyadh

Riyadh experiences an arid desert climate marked by low precipitation, intense solar radiation, and rapid radiative heat loss during the night. Early morning hours between 5:00 and 6:00 AM recorded the lowest mean temperatures at 19.18 degrees Celsius, while midday hours between 12:00 and 2:00 PM exhibited peak mean values reaching 34.02 degrees Celsius. Maximum temperatures during extreme summer heat events frequently exceeded 47.47 degrees Celsius, while winter nights dropped below freezing down to minus 2.78 degrees Celsius. The standard deviation peaked during the late morning to early afternoon at up to 9.45 degrees Celsius at 9:00 AM, indicating greater variability during the day compared to night. These dramatic shifts impose severe thermal stress on urban infrastructure and residential water demand cycles across the metropolitan area.

Rapid urbanization over recent decades has transformed natural desert land into built-up surfaces such as asphalt and concrete. This modification of the surface energy balance intensifies the urban heat island effect, causing elevated air temperatures particularly at night due to reduced longwave radiative cooling. The city’s population exceeds 7.5 million inhabitants as of 2023, making accurate hourly temperature forecasting essential for designing effective heat warning systems. Daily or monthly averages conceal the intra-day fluctuations that determine human heat exposure and cooling energy demand, which accounts for more than 70 percent of peak electricity consumption in desert cities.

Fig 1: Time-series plot for hourly temperature in Riyadh during 2001-2023.
Time-series plot for hourly temperature in Riyadh during 2001-2023. Credit: Abdulla Al Kafy et al. / PLOS One

Long-Term Trends and Climatic Drivers

The analysis revealed slight warming trends during hotter months such as June, July, September, and October over the 23-year study period. September showed the highest rate of monthly average temperature increase with a slope of 0.0597 degrees Celsius per year, followed by November at 0.0715 degrees Celsius per year. Multivariate regression and Pearson correlation analyses demonstrated that wet-bulb temperature exhibited the strongest positive correlation with average air temperature at 0.89, confirming its dominant role in the thermodynamic profile of Riyadh. Specific and relative humidity showed weak or negative correlations with average air temperature, highlighting their limited contribution to temperature changes in this dry environment. Lagged correlation analysis indicated that wet-bulb and relative humidity reached their highest correlation at a lag of zero hours, reflecting immediate synchronous interactions.

In contrast, clear-sky solar irradiance and total solar irradiance showed maximum correlations at a lag of plus 26 hours, indicating a delayed effect due to accumulated radiative impacts over time. Wind speeds at 10 meters and 50 meters exhibited peak effects at negative 23 and negative 30 hours respectively, implying that wind conditions influenced upcoming temperature changes through advective heat transfer. Cooler months such as January and February showed stable thermal behavior with trend slopes near zero, reflecting consistent winter conditions. These climatic relationships underscore why WBT and dew-point temperature serve as primary environmental drivers in the local system.

Comparative Performance of Predictive Models

The research team evaluated six artificial intelligence models using a strict chronological partitioning of the dataset into 141,120 training observations, 30,240 validation observations, and 30,240 independent testing observations. This independent framework prevented neighboring hourly data from being randomly distributed across subsets, providing a rigorous assessment of temporal generalization. The models utilized a five-hour predictor window ranging from t minus 4 to t to estimate concurrent air temperature at hour t. Among the algorithms evaluated without leakage variables, the long short-term memory network achieved the best performance with an R-squared value of 0.99981 and a root mean square error of 0.1371 degrees Celsius. The recurrent neural network ranked second with an R-squared value of 0.99944 and a root mean square error of 0.2320 degrees Celsius.

Fig 2: Distribution of hourly temperature in different months.
Distribution of hourly temperature in different months. Credit: Abdulla Al Kafy et al. / PLOS One

Random forest ranked third with a root mean square error of 0.2739 degrees Celsius and a mean absolute error of 0.1141 degrees Celsius, demonstrating strong absolute-error performance. Artificial neural networks performed well with an R-squared value of 0.99896, whereas convolutional neural networks showed reduced accuracy with a root mean square error of 0.8590 degrees Celsius. Support vector machines proved to be the least accurate model with a root mean square error of 2.0805 degrees Celsius and a mean absolute error of 1.6268 degrees Celsius. Sensitivity analysis revealed that including dew-point and wet-bulb temperatures substantially reduced prediction errors for tree-based and traditional neural network models, confirming their strong thermodynamic dependence on air temperature.

Applications and Methodological Limitations

The predicted hourly temperature series provides a valuable meteorological input for downstream applications including building energy forecasting and smart city planning. In hyper-arid environments where outdoor temperature drives heating, ventilation, and air conditioning energy consumption, integrating these predictions with building characteristics can improve operational efficiency. However, the prediction models relied solely on meteorological variables without explicitly accounting for urban expansion or localized spatial heterogeneity within Riyadh. Consequently, the predicted temperatures represent the combined effects of meteorological forcing and long-term environmental changes contained within historical observations rather than the isolated influence of urbanization. Furthermore, the framework estimated concurrent hourly temperature rather than true future forecasting skill with defined lead times. Future research incorporating urban morphological features and explicit multi-step forecasting horizons will provide a more stringent test for early-warning systems.

The research was published in PLOS One on November 30, 2026.

Fact Checked

This article has been fact checked for accuracy, with information verified against reputable sources. Learn more about us and our editorial process.

Last reviewed on .

Article history

  • Latest version

Reference(s)

  1. Kafy, Abdulla Al., et al. “Machine learning ensemble models for hourly temperature prediction in arid urban environments: A comparative study with applications to climate-responsive planning.” PLOS One, vol. 21, no. 11, November 30, 2026, pp. e0363669 Public Library of Science (PLoS), doi: 10.1371/journal.pone.0363669. <https://doi.org/10.1371/journal.pone.0363669>.

Cite this page:

Ellison, Mary. “AI Models Predict Hourly Temperatures Across 23 Years in Riyadh, but Reveal Rising Summer Heat Extremes.” BioScience. BioScience ISSN 2521-5760, 01 December 2026. <https://www.bioscience.com.pk/en/subject/urban-studies/ai-models-predict-hourly-temperatures-across-23-years-in-riyadh-but-reveal-rising-summer-heat-extremes>. Ellison, M. (2026, December 01). “AI Models Predict Hourly Temperatures Across 23 Years in Riyadh, but Reveal Rising Summer Heat Extremes.” BioScience. ISSN 2521-5760. Retrieved December 01, 2026 from https://www.bioscience.com.pk/en/subject/urban-studies/ai-models-predict-hourly-temperatures-across-23-years-in-riyadh-but-reveal-rising-summer-heat-extremes Ellison, Mary. “AI Models Predict Hourly Temperatures Across 23 Years in Riyadh, but Reveal Rising Summer Heat Extremes.” BioScience. ISSN 2521-5760. https://www.bioscience.com.pk/en/subject/urban-studies/ai-models-predict-hourly-temperatures-across-23-years-in-riyadh-but-reveal-rising-summer-heat-extremes (accessed December 01, 2026).
End of the article