Sensitivity Analysis of Rainfed Wheat Yield to Climatic Indices Using The Interpretable Xgboost–SHAP Model Under Climate Change Conditions: Zanjan Province Case Study

Document Type : Research Paper

Authors

1 irrigation and reclamation engineering, agricultural and forest meteorology, University of tehran

2 Associate Prof., Irrigation & Reclamation Engrg. Dept. University of Tehran Karaj, Iran.

Abstract

This study aimed to assess the sensitivity of rainfed wheat yield to climatic indices over the period 1990–2023 across three representative stations in Zanjan Province, Iran —Zanjan, Khodabandeh, and Khorramdarreh. The Extreme Gradient Boosting (XGBoost) algorithm, interpreted via SHapley Additive exPlanations (SHAP) values, was employed to identify the most influential climatic variables and to determine their optimal and yield-limiting thresholds. The methodological framework integrated four key approaches that have been seldom considered simultaneously in previous research: (i) estimating the length of the growing period (LGP) based on updated FAO guidelines, (ii) aligning climatic data with the actual crop growing period, (iii) focusing on the temporal distribution patterns of climatic indices rather than solely on their cumulative or seasonal means, and (iv) performing interactive and interpretable climatic analysis. The results indicated increasing trends in both yield and LGP across all three sites, although the LGP trend in Zanjan was statistically non-significant (P > 0.1). SHAP analysis revealed that moisture-related variables were the primary determinants of yield in all sites. Specifically, effective rainfall (ERGP: 1.8–2.9 mm/day) in Khodabandeh, the number of precipitation days (N_pr^GP: 4–31 days) in Zanjan, and uniform rainfall distribution (URGP: 11.2–31 mm) in Khorramdarreh emerged as the most influential positive drivers. Conversely, yield limitations were associated with shortened growing periods (LGP: 50–68 days) in Khodabandeh, poorly distributed rainfall (UR/ER: 5.4–10 mm) in Khorramdarreh, and a low number of precipitation days in Zanjan.

Keywords

Main Subjects


Introduction

Rainfed wheat (Triticum aestivum L.) in semiarid regions is highly sensitive to climate variability, and extreme temperatures along with changing precipitation patterns threaten its yield. Accurate analysis of the climate–yield relationship, identification of key influencing indices, and determination of optimal and limiting ranges for rainfed wheat yield are essential. Many previous studies relied on annual or fixed-season climate averages, which overlooked actual crop exposure during the true growing period (GP). To address these limitations, this study calculated all climatic indices exclusively for the real GP of rainfed wheat across three major production districts in Zanjan Province, Iran (Zanjan, Khodabandeh, and Khorramdarreh). The objectives were to: (i) identify key climatic factors driving yield variability, (ii) determine their location-specific optimal and limiting ranges, and (iii) provide actionable insights for targeted adaptation strategies.

Materials and Methods

This study aimed to assess the sensitivity of rainfed wheat yield to climatic indices over the period 1990–2023 across three representative stations in Zanjan Province, Iran — Zanjan, Khodabandeh, and Khorramdarreh. The Extreme Gradient Boosting (XGBoost) algorithm, interpreted via SHapley Additive exPlanations (SHAP) values, was employed to identify the most influential climatic variables and to determine their optimal and yield-limiting thresholds. The relationship between key climatic indices and dryland wheat yield was evaluated using this advanced machine‑learning model. The research methodology comprised four main steps: (i) estimation of the length of the growing period (LGP) based on the updated FAO guidelines, (ii) aligning all datasets with the actual plant growing period, (iii) analyzing the temporal distribution of climatic indices, and (iv) performing an interactive and interpretable climatic index analysis. This approach enabled the identification of location‑specific key variables, quantification of their optimal ranges, and improved understanding of regional yield variability.

Results and Discussion

In this analysis, the influential variables for each region were identified, and their optimal and limiting ranges—as well as thresholds—were quantified, providing clearer insight into the drivers of yield variability at the regional scale. Across all three study regions, both rainfed wheat yield and the length of the growing period (LGP) showed increasing trends; however, the trend in Zanjan was not statistically significant (p > 0.1). At the regional scale, correlation analysis between yield and agro‑climatic indices during the growing period indicated that moisture‑related indices were more strongly associated with yield than thermal indices. This pattern was consistent with the XGBoost–SHAP results, which also highlighted the predominance of moisture variables in explaining yield variability.In all stations, the number of precipitation days () exhibited the highest positive correlation with yield. Neither thermal indices nor LGP were significantly correlated with yield in Zanjan or Khodabandeh. By contrast, in Khorramdarreh, mean minimum temperature(T ̅_min^GP, r = 0.52, p < 0.01) and mean growing period temperature  (, r = 0.37, p < 0.1) were both significantly and positively correlated with yield. The XGBoost–SHAP modeling outcomes broadly agreed with the linear correlation analysis, although differences arose in the ranking of dominant moisture related indices.This integrated approach identified effective rainfall (ERGP  = 1.8–2.9 mm day⁻¹; mean daily rainfall during the growing period; threshold: 1.8 mm day⁻¹) in Khodabandeh, the number of precipitation days ( = 32–42 days; threshold: 32 days) in Zanjan, and the uneven rainfall index (URGP  ≥ 9.0 mm; hreshold: 9.0 mm) in Khorramdarreh as the primary determinants of yield. Moreover, ERGP= 1.8–2.9 mm day⁻¹ in Khodabandeh, optimal rainfall distribution (UR/ER(GP) = 10.3–12.4), and optimal mean temperature ( = 9.0–9.2 °C) in Khorramdarreh emerged as the most influential factors enhancing yield. Conversely, shorter growing periods (LGP = 50–68 days) in Khodabandeh, uneven rainfall distribution (URGP  = 1.1–8.7 mm) in Khorramdarreh, and low  = 4–31 days in Zanjan were the main limiting factors.

Conclusion

This study demonstrated that rainfed wheat yield variability across the three regions is driven by a limited set of agro‑climatic indices, each with distinct optimal and limiting ranges. The identified thresholds — such as ERGP, , and URGP — revealed that yield responses are inherently non‑linear and threshold‑dependent, which is a pattern clearly captured through the machine learning framework enhanced by SHAP interpretation. These findings highlight the necessity of region‑specific management strategies that align planting and water resource practices with the identified optimal climatic windows, thereby improving resilience and yield stability under variable climatic conditions.

Funding

This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.

Authors’ contributions

  1. Asgary: Gathering the experimental data, Data curation, Software; Methodology; Investigation, Conceptualization, Methodology, Writing-Reviewing and Editing, Formal analysis, Analyzing the experimental data, *Z. Aghashariatmadari: Supervision, Investigation, Conceptualization, Methodology, Analyzing the experimental data, Validation, Visualization, Writing-Original draft preparation, Writing-Reviewing and Editing. All authors have read and agreed to the published version of the manuscript.All authors contributed equally to the conceptualization of the article and writing of the original and subsequent drafts.

Data Availability Statement

Data available on request from the author.

Acknowledgements

The research was supported by the University of Tehran. The authors would like to express their special thanks to the vice chancellor for research affairs.

Ethical considerations

The author avoided data fabrication, falsification, plagiarism, and misconduct.

Conflict of interest

All authors declare that they have no conflict of interest.

 

Ashfaq, M., Khan, I., Alzahrani, A., Tariq, M. U., Khan, H., & Ghani, A. (2024). Accurate wheat yield prediction using machine learning and climate-NDVI data fusion. IEEE Access, 12, 40947–40961. https://doi.org/10.1109/ACCESS.2024.3456789
Adelzadeh, A. H. (2015). Diagnostic of the temperature in northwest Iran and its relationship with geopotential height. Journal of Applied Climatology, 2(2), 17–32. (in Persian).
Ansari, S., Javadi, S., Shahdany, S. M. H., & Azadegan, B. (2023). Estimation of the length of growing period of dry wheat based on the FAO ecological zoning method for the climate of Iran. Journal of Ecohydrology, 10(2), 231–243. https://doi.org/10.22059/ije.2023.360033.1733. (in Persian).
Chakraborty, D., Başağaoğlu, H., Alian, S., Mirchi, A., Moriasi, D. N., Starks, P. J., & Verser, J. A. (2023). Multiscale extrapolative learning algorithm for predictive soil moisture modeling & applications. Expert Systems with Applications, 213(Part B), 119056. https://doi.org/10.1016/j.eswa.2022.119056
Chen, T., & Guestrin, C. (2016). XGBoost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (pp. 785–794). ACM. https://doi.org/10.1145/2939672.2939785
Elsayed, T., Ouda, S., Khalil, F., & Elmetwalli, A. (2025). Optimizing wheat yield and water productivity under water scarcity in Egypt. Agricultural Water Management, 286, 108231. https://doi.org/10.1016/j.agwat.2024.108231
Hadi, M., Jalili, S., Mouneskhah, V., & Majnooni Heris, A. (2021). Estimation of rainfed wheat yield functions using climatic parameters and multivariate regression methods. Iranian Journal of Soil and Water Research, 52(2), 497–506. https://doi.org/10.22059/IJSWR.2021.309650.668731. (in Persian).
Haseeb, M., Ayub, M., Ashraf, M. S., Ahmed, W., Khan, M. A., & Ali, M. (2025). Winter wheat yield prediction using linear (Ridge, LASSO) and nonlinear (SVR, RF) machine learning models with remote sensing and climatic data. Computers and Electronics in Agriculture, 224, 108883. https://doi.org/10.1016/j.compag.2025.108883
He, Y., Wei, Y., DePauw, R., Qian, B., Lemke, R., Singh, A., & Wang, H. (2013). Spring wheat yield in the semiarid Canadian prairies: Effects of precipitation timing and soil texture over recent 30 years. Field Crops Research, 149, 329–337. https://doi.org/10.1016/j.fcr.2013.05.015
Hengl, T., Heuvelink, G. B. M., & Stein, A. (2004). A generic framework for spatial prediction of soil variables based on regression‑kriging. Geoderma, 120(1–2), 75–93.  https://doi.org/10.1016/j.geoderma.2003.08.018
Hu, J., Li, Y., & Shi, P. (2025). Impact of future climate trend and fluctuation on winter wheat yield in the North China Plain and adaptation strategies. Scientific Reports, 15, Article 06370. https://doi.org/10.1038/s41598-025-06370-6
IPCC. (2021). Summary for policymakers: Climate change, the physical science basis (Contribution of Working Group I to the Sixth Assessment Report of the Intergovernmental Panel on Climate Change). Cambridge University Press.
Khalili, A., Bazrafshan, J., & Cheraghalilzadeh, M. (2022). A comparative study on climate maps of Iran  in extended De Martonne classification and application of the method for world climate zoning. Agricultural Meteorology, 10(1), 3–16. https://doi.org/10.22125/agmj.2022.156309. (in Persian).
Li, Q. C., Xu, S. W., Zhuang, J. Y., Liu, J. J., Yi, Z. H., & Zhang, Z. X. (2023). Ensemble learning prediction of soybean yields in China based on meteorological data. Journal of Integrative Agriculture, 22, 1909–1927. https://doi.org/10.1016/S2095-3119(23)63477-2
Li, Y., Hu, J., Shi, P., et al. (2024). Knowledge guided machine learning for improving crop yield projections of waterlogging effects under climate change. Computational and Structural Biotechnology Journal, 22, 234–246. https://doi.org/10.1016/j.csbj.2024.03.007
Li, Y., Hu, J., Shi, P., et al. (2025). Using machine learning techniques to evaluate the impact of future climate change on wheat yields in Xinjiang, China. Agricultural Water Management, 300, 108960. https://doi.org/10.1016/j.agwat.2025.108960
Liu, B., et al. (2024). Modeling impacts of climate-induced yield variability and adaptation on wheat and maize in Northwestern China. Scientific Reports, 14(1), Article 09820. https://www.nature.com/articles/s41598-025-09820-3
Liu, X., Wang, P., Chen, J., Zhang, Y., Li, M., Huang, C., … & Zhou, T. (2025). Climate change impacts on crop yields across temperature rise regimes and climatic zones. Scientific Reports, 15, 7405. https://doi.org/10.1038/s41598-025-07405-8
Lundberg, S. M., & Lee, S. I. (2017). A unified approach to interpreting model predictions. Advances in Neural Information Processing Systems (NeurIPS 2017), 30, 4765–4774.
Lundberg, S. M., Erion, G., Chen, H., DeGrave, A., Prutkin, J. M., Nair, B., Katz, R., Himmelfarb, J., Bansal, N., & Lee, S. I. (2020). From local explanations to global understanding with explainable AI for trees. Nature Machine Intelligence, 2(1), 56–67.       
              https://doi.org/10.1038/s42256-019-0138-9
Mann, H. B. (1945). Nonparametric tests against trend. Econometrica, 13(3), 245–259. https://doi.org/10.2307/1907187
Mehnatkesh, A., Ayoubi, S., & Dehghani, A. A. (2017). Determination of the most important factors on   rainfed wheat yield by using sensitivity analysis in Central Zagros. Iranian Journal of Field Crops Research, 15(2), 257–266. https://doi.org/10.22067/gsc.v15i2.37244. (in Persian).
Monti, A., & Venturi, G. (2007). A simple method to improve the estimation of the relationship between rainfall and crop yield. Agronomy for Sustainable Development, 27(3), 255–260. https://doi.org/10.1051/agro:2007011
Moreno Sánchez, J. C., Acosta Mesa, H. G., Trueba Espinosa, A., Ruiz Castilla, S., & García Lamont, F. (2025). Improving wheat yield prediction through variable selection using support vector regression, random forest, and extreme gradient boosting. Smart Agricultural Technology, 10, 100791. https://doi.org/10.1016/j.atech.2025.100791
Samani, Z. A. (2000). Estimating solar radiation and evapotranspiration using minimum            climatological data. Journal of Irrigation and Drainage Engineering, 126(4), 265–267.   https://doi.org/10.1061/(ASCE)0733-9437(2000)126:4(265)
Sen, P. K. (1968). Estimates of the regression coefficient based on Kendall’s tau. Journal of the American Statistical Association, 63(324), 1379–1389. https://doi.org/10.1080/01621459.1968.10480934
Shapley, L. S. (1953). A value for n-person games. In H. W. Kuhn & A. W. Tucker (Eds.), Contributions to the theory of games II (pp. 307–317). Princeton University Press.
Singh, N., & Mulye, S. S. (1991). On the relations of the rainfall variability and distribution with the mean rainfall over India. Theoretical and Applied Climatology, 44(3), 209–221. https://doi.org/10.1007/BF00865531
Van Klompenburg, T., Kassahun, A., & Catal, C. (2020). Crop yield prediction using machine learning: A systematic literature review. Computers and Electronics in Agriculture, 177, 105709. https://doi.org/10.1016/j.compag.2020.105709
Xu, X., Li, Y., Zhang, H., & Wang, J. (2025). Variance-based sensitivity analysis of climate variability impacts on wheat yield using machine learning. Agricultural Water Management, 294, 109409. https://doi.org/10.1016/j.agwat.2025.109409
Xu, Y., Albalawneh, A., Al‑Zoubi, M., & Baroud, H. (2025). Variance‑based sensitivity analysis of climate variability impact on crop yield using machine learning: A case study in Jordan. Agricultural Water Management, 313, 109409. https://doi.org/10.1016/j.agwat.2025.109409
Xue, L., Khan, S., Sun, M., Anwar, S., Ren, A., Gao, Z., Lin, W., Xue, J., Yang, Z., & Deng, Y. (2019). Effects of tillage practices on water consumption and grain yield of dryland winter wheat under different precipitation distribution in the Loess Plateau of China. Soil and Tillage Research, 191, 66–74. https://doi.org/10.1016/j.still.2019.03.004
Yousefi, N., Dadfar, M., Sharafi, S., Ebrahimi, M., & Bazrafshan, O. (2024). Sustainability insights: Enhancing rainfed wheat and barley yield prediction in arid regions. Field Crops Research, 312, 109529. https://doi.org/10.1016/j.fcr.2024.109529
Yue, S., Pilon, P., & Cavadias, G. (2002). Power of the Mann–Kendall and Spearman’s rho tests for detecting monotonic trends in hydrological series. Journal of Hydrology, 259(1–4), 254–271. https://doi.org/10.1016/S0022-1694(01)00594-7
Zhang, X., Li, Y., Hu, L., & Wang, R. (2025). Impact of future climate trend and fluctuation on winter wheat yield. Scientific Reports, 15, Article 06370. https://doi.org/10.1038/s41598-025-06370-6