Rainfall Prediction Using Machine Learning in Nineveh Governorate, Iraq
DOI:
https://doi.org/10.23917/forgeo.16759Keywords:
Rainfall, Model, Standard Deviation, Machine Learning, Nineveh GovernorateAbstract
Accurate rainfall forecasting is essential in arid and semi-arid regions such as Iraq due to increasing climate variability, water scarcity, and the growing need for sustainable water resource management. This study proposes an integrated spatiotemporal framework for rainfall forecasting in Nineveh Governorate, Iraq, combining non-parametric trend detection, multivariate correlation analysis, and ensemble machine learning. Monthly climate data from seven stations (1994-2024) were analysed using the Mann-Kendall test and Sen’s slope estimator to assess long-term rainfall dynamics. Pearson and Spearman coefficients were applied to examine interrelationships among climatic variables and to mitigate multicollinearity prior to model construction. Four predictive models (XGBoost, CatBoost, Random Forest, and LSTM) were combined through a weighted stacking ensemble to improve robustness and reduce forecasting uncertainty. Results indicate no statistically significant long-term monotonic trend in annual rainfall; however, clear spatial heterogeneity and seasonal variability were observed. The stacking model outperformed the individual models, achieving an R² value of 0.981 (98.1%), indicating high predictive performance., with reduced RMSE and MAE values. Findings highlight the dominance role of temperature-humidity-pressure interactions in shaping rainfall behaviour in semi-arid environments. The proposed framework enhances both predictive reliability and structural interpretation of rainfall variability under regional climate stress conditions.
Downloads
References
Abdaki, M. A., Al-Azzar, A. Z., Al-Obaidi, O., Al-Tiyawi, A. N. (2023). Predicting Rainfall in Nineveh Governorate in Northern Iraq using a Machine Learning Time-series Forecasting Algorithm. Arab J Geosci, 16, 11779. doi: 10.1007/s12517-023-11779-2.
Al-Azzawi, A. A. (2017). Analysis of the Spatial and Temporal Variability of Rainfall in Iraq using GIS and Remote Sensing Techniques
Al-Hashimi, M. M., Hayawi, H. A. A. (2024). Nonlinear Model for Precipitation Forecasting in Northern Iraq using Ma-chine Learning Algorithms. Int J Math Comput Sci, 19(1), 171–179.
Al-Hussein, A. A. M., Khalil, S. A., Salman F. H., Mahmood, B. F. (2024). Evaluation of accuracy for satellites rainfall datasets compared in ground stations: a case study of Duhok governorate, Northern Iraq. Sustain Water Re-sour Manag. doi: 10.1007/s40899-024-01158-4
Al-Mousawi, A. S, Abu Rahil, A. H. M. (2013). [Title of the book], 1st edn. Al-Mizan Printing Press, Najaf Al-Ashraf.
Al-Ozeer, A. Z., Abdaki, M. A., Al-Iraqi, A. R., Al-Samman, S. H., Al-Hammadi, N. A. (2020). Estimation of mean areal rainfall and missing data by using GIS in Nineveh, northern Iraq. Iraqi Geol J, 53(1E), 93–103. doi: 10.46717/igj.53.1E.7Ry-2020-07.07
Géron, A. (2019). Hands-on Machine Learning with Scikit-learn, Keras, and Tensorflow: Concepts, Tools, and Tech-niques to Build Intelligent Systems, 2nd edn. O’Reilly Media. Retrieved From https://www.oreilly.com/library/view/hands-on-machine-learning/9781492032632
Bahrom, S., Abu, N., Abd Rahman, N. H., Zainal, N. A. (2026). Forecasting of Rainfall in Malaysia using Time Series Analysis. Environ Sci Pollut Res. Retrieved From https://doi.org/10.1007/s11356-026-37668-1
Baig, F., Ali, L., Faiz, M. A., Chen, H., Sherif, M. (2024). How Accurate are the Machine Learning Models in Improving Monthly Rainfall Prediction in Hyperarid Environment?. J Hydrol, 633, 131040. doi: 10.1016/j.jhydrol.2024.131040
Benesty, J., Chen, J., Huang, Y., Cohen, I. (2009). Pearson correlation coefficient. In: Noise reduction in speech pro-cessing. Springer.
Breiman, L. (2001). Random forests. Machine Learning, 45(1), 5–32.doi.org/10.1023/A:1010933404324
Chen T, Guestrin C (2016) Xgboost: a Scalable Tree Boosting System. In: Proceedings of the 22nd ACM SIGKDD in-ternational conference on knowledge discovery and data mining, 785–794. doi: 10.1145/2939672.2939785.
Datta, P., Das, S. (2019). Analysis of Long-term Precipitation Changes in West Bengal, India: an Approach to Detect monotonic Trends Influenced by Autocorrelations. Dyn Atmos Oceans, 88, 101118. doi: 10.1016/j.dynatmoce.2019.101118
El Hafyani, M, E. l., Himdi, K., E,. l., Adlouni, S. E. (2024). Improving Monthly Precipitation Prediction Accuracy using Machine Learning Models: a Multi-view Stacking Learning Technique. Front Water, 6, 1378598. doi: 10.3389/frwa.2024.1378598
Elshaboury, N., Abdelkader, E., Attia, A., Marzouk, M. (2021). Rainfall Forecasting in Arid Regions using an Ensemble of Artificial Neural Networks. J Phys Conf Ser, 1900, 012015. doi: 10.1088/1742-6596/1900/1/012015
Farouk, I. E., Ashour, M. A. (2005). Tourism Geography: Development, Foundations, Approaches, and Applications. Anglo-Egyptian Bookshop, Cairo
Fereshtehpour, M, Sabbaghian, R. J., Farrokhi, A., Jovein, E. B., Sarindizaj, E. E. (2020). Evaluation of Factors Govern-ing the use of Floating Solar System: A Study on Iran’s Important Water Infrastructures. Renew Energy, 171, 1171–1187. doi: 10.1016/j.renene.2020.12.005
Ghosh, S, Gourisaria, M. K., Sahoo, B., Das, H. (2023). A Pragmatic Ensemble Learning Approach for Rainfall Predic-tion. Discov Internet Things, 3l, 13. doi: 10.1007/s43926-023-00044-3
Gu, J., Liu, S., Zhou, Z., Chalov, S. R., Zhuang, Q. (2022). A stacking Ensemble Learning Model for Monthly Rainfall Prediction. Water, 14(3), 492. doi: 10.3390/w14030492
Hamed, K. H. (2008). Trend Detection in Hydrologic Data: the Mann–Kendall Trend Test Under the Scaling Hypothe-sis. J Hydrol, 349(3–4), 350–363. doi: 10.1016/j.jhydrol.2007.11.009
Han, J., Kamber, M., Pei, J. (2012). Data Mining: Concepts and Techniques, 3rd edn. Elsevier. Retrieved From https://www.sciencedirect.com/book/9780123814791/data-mining-concepts-and-techniques
Harris, C. R., Millman, K. J., van der Walt, S. J., Gommers, R., Virtanen, P. (2020). Array programming with NumPy. Na-ture, 585, 357–362. doi: 10.1038/s41586-020-2649-2
Hastie, T., Tibshirani, R., Friedman, J. (2009). The elements of statistical learning: data mining, inference, and predic-tion, 2nd edn. Springer. Retrieved From https://doi.org/10.1007/978-0-387-84858-7
Hochreiter and Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8), 1735–1780.
Hunter, J. D. (2007). Matplotlib: a 2D Graphics Environment. Comput Sci Eng, 9(3), 90–95.
Jumadi, J., Danardono, D., Roziaty, E., Ulinuha, A., Supari, S., Choy, L. K., Sattar, F., Nawaz, M. (2025). AI-driven en-semble learning for spatio-temporal rainfall prediction in the Bengawan Solo River watershed, Indonesia. Sus-tainability, 17(20),9281. doi: 10.3390/su17209281
Kannan, S., Ghosh, S. (2010). Prediction of Daily Rainfall State in a River Basin using Statistical Downscaling from GCM Output. Stoch Environ Res Risk Assess, 25(4), 457–474. doi: 10.1007/s00477-010-0415-y
Kendall, M. G. (1975). Rank correlation methods, 4th edn. Charles Griffin, London
Khan, M. M. H., Mustafa, U., Shams. S., Hossain, M. S. (2023). Short-term and Long-term Rainfall Forecasting Using ARIMA Model. Int J Environ Sci Dev, 14(5), 292–298. doi: 10.18178/ijesd.2023.14.5.1447
Kim, J. W., Pachepsky, Y. A. (2010). Reconstructing missing daily precipitation data using regression trees and artifi-cial neural networks for SWAT streamflow simulation. J Hydrol, 394(3–4), 305–314. doi: 10.1016/j.jhydrol.2010.09.005
Kõlõc, Z. (2020). The Importance of Water and Conscious Use of Water. Int J Hydrol, 4(5), 239–241. doi: 10.15406/ijh.2020.04.00250
Kratzert, F., Klotz, D., Brenner, C., Schulz, K., Herrnegger, M. (2018) Rainfall–Runoff Modeling Using Long Short-term Memory (LSTM) Networks. Hydrol Earth Syst Sci, 22, 6005–6022. doi: 10.5194/hess-22-6005-2018
Kuhn, M., Johnson, K. (2013). Applied Predictive Modeling. Springer, 26, 13. doi: 10.1007/978-1-4614-6849-3
Kundu, S., Biswas, S. K., Tripathi, D., Karmakar, R., Majumdar, S., Mandal, S. (2023). Forecasting Using Ensemble Learning Techniques. E-Prime Adv Electr Eng Electron Energy, 6, 100296. doi: 10.1016/j.prime.2023.100296
Latif, S. H., Koo, N. A. B., Ng, J. L., Chaplot, B., Huang, Y. F., El-Shafie, A., Ahmed, A. N. (2023). Assessing Rainfall Prediction Models: Exploring the Advantages of Machine Learning and Remote Sensing Approaches. Alex Eng J, 82, 16–25. doi : 10.1016/j.aej.2023.09.060
Manaf, M., Ali, Z., Scholz, M. (2026). Integrating Random Forest-Based Regression Kriging for Analyzing Spatial Var-iability of Rainfall in Arid and Semi-arid Regions. Sci Rep, 16, 5298. doi: 10.1038/s41598-026-36074-4.
Mann, H. B. (1945). Nonparametric tests against trend. Econometrica, 13(3), 245–259. doi: 10.2307/1907187
MileHacker. (2019). Best Time to Visit Mosul: Weather, Seasons, and Climate. Retrieved From https://www.milehacker.com/travel/iraq/nineveh/mosul/best-time-to-visit-mosul-weather-seasons-climate/
Musa, M, Atiyah, K. S. (2022) Extract the effective rain in Nineveh Governorate. J Tikrit Univ Humanit, 29(5), 117–150. doi: 10.25130/jtuh.29.5.2022.07
Nirranjana, R., Aishwarya, R., Tejshree, S., Gayathri, K. S., Natarajan, S., Thirunavukkarasu, P. (2025) Rainfall forecast-ing model for Amaravathi basin using machine learning approach. J Inst Eng India Ser A, 106(4), 1067–1080. doi: 10.1007/s40030-025-00914-9
Parmar, A., Mistree, K., Sompura, M. (2017). Machine learning techniques for rainfall prediction: a review. In: Interna-tional conference on innovations in information embedded and communication systems. Retrieved From https://doi.org/10.1109/ICIIECS.2017.8276023
Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B. (2011). Scikit-learn: machine learning in Python. J Mach Learn Res, 12, 2825–2830.
Rahi A, Al-Madhhachi AAT, Al-Hussaini SN (2019) Assessment of surface water resources of eastern Iraq. Hydrology, 6(3), 57. doi: 10.3390/hydrology6030057
Reback, J., McKinney, W. (2020). Pandas: Python data analysis library. Retrieved From https://pandas.pydata.org/docs/
Saber, M., Boulmaiz, T., Guermoui, M., Abdrabo, K. I., Kantoush, S. A., Sumi, T., Boutaghane, H., Nohara, D., Mabrouk E. (2022). Examining LightGBM and CatBoost models for wadi flash flood susceptibility prediction. Geocarto Int, 37(25), 7462–7487. doi: 10.1080/10106049.2021.1974959
Salman, S. A., Shahid, S., Ismail, T., Ahmed, K., Chung, E. S., Wang, X. J. (2019). Characteristics of annual and seasonal trends of rainfall and temperature in Iraq. Asia-Pac J Atmos Sci 55:429–438. https://doi.org/10.1007/s13143-018-0073-4
Sen, P. K. (1968). Estimates of the regression coefficient based on Kendall’s tau. J Am Stat Assoc, 63(324), 1379–1389. doi: 10.1080/01621459.1968.10480934
Sharma, A. K., Ahmad, R., & Chen, R. (2021). Predicting the default borrowers in P2P platform using machine learn-ing models. In: Artificial intelligence and sustainable computing for smart city, 267–281. Springer Interna-tional Publishing
Shneishil, B. S. (2025). Rainfall prediction using statistical modeling and artificial intelligence in arid and semiarid environments of northwestern Iraq: an applied case study. Ramah J Res Stud
Spearman, C. (1904). The proof and measurement of association between two things. Am J Psychol, 15(1), 72–101. doi: 10.2307/1412159
Tabari, H., AghaKouchak, A., Willems, P. (2018). A perturbation approach for assessing trends in precipitation extremes across Europe. J Hydrol 519, 2019–2033. doi: 10.1016/j.jhydrol.2014.08.047
Tahseen, D., Ali, R. (2025). Advancing an innovative machine learning model for monthly rainfall forecasting in a hot-summer Mediterranean climate region, Erbil, Iraq. Iraqi Geol J, 58(2D), 1–20. doi: 10.46717/igj.2025.58.2D.1
Uddin, M. T. M., Rahman, M. F., Rahib, M. A., Arun, N., Venkatesh, J. (2025). Rainfall prediction using machine learn-ing. Int J Res Anal Rev, 12,(1).
Voss, K. A., Famiglietti, J. S., Lo, M., De, Linage, C., Rodell, M., Swenson, S. C. (2013). Groundwater depletion in the Middle East from GRACE with implications for transboundary water management in the Tigris–Euphrates–Western Iran region. Water Resour Res 49(2), 904–914. doi: 10.1002/wrcr.20078
Wang, Y., Xu, Y., Tabari, H., Wang, J., Wang, Q., Song, S., Hu, Z. (2020). Innovative Trend Analysis of Annual and Sea-sonal Rainfall in the Yangtze River Delta, Eastern China. Atmos Res, 231, 104673. doi: 10.1016/j.atmosres.2019.104673
Wilks, D. S. (2011). Statistical methods in the atmospheric sciences, 3rd edn. Academic Press. Retrieved From https://doi.org/10.1016/B978-0-12-385022-5.00021-X
Wolpert, D. H. (1992). Stacked generalization. Neural Netw, 5(2), 241–259. doi: 10.1016/S0893-6080(05)80023-1
Yue, S., Wang, C. Y. (2004). The Mann–Kendall test modified by effective sample size to detect trend in serially corre-lated hydrological series. Water Resour Manag, 18, 201–218. doi: 10.1023/B:WARM.0000043140.61082.60
Zelenakova, M., Abd-Elhamid, H., Krajnikova, K., Smetankova, J., Purcz, P. (2022). Spatial and temporal variability of rainfall trends in response to climate change: a case study of Syria. Water, 14(10),1670. doi: 10.3390/w14101670
Downloads
Submitted
Accepted
Published
Issue
Section
License
Copyright (c) 2026 khaled nafea; khaled nafea; Mahdi Jawad Ali

This work is licensed under a Creative Commons Attribution 4.0 International License.


















