- 1University Mohammed VI Polytechnic, College of Agriculture ad Environmental Sciences, AgroBioSciences, Benguerir, Morocco
- 2University of Twente, Faculty of Geo-Information Science and Earth Observation (ITC), Enschede, Netherlands
Crop yield gaps in rainfed agricultural systems pose a persistent challenge to food security under increasing climate variability, particularly in semi-arid and Mediterranean regions. Although climate drivers, macronutrient inputs, and management practices are widely used to explain yield variability, the contribution of comprehensive soil chemistry to crop resilience remains insufficiently understood. This study assesses whether integrating heavy metals with conventional soil, climate, and management variables improves wheat yield gap modeling and supports agricultural adaptation strategies. Field surveys were conducted across 54 rainfed wheat sites in three Moroccan provinces (Meknes, Khemisset, and Settat) during the 2021 growing season. A total of 216 soil samples were analyzed for 25 physicochemical properties, including soil texture, macronutrients, micronutrients, and eight trace elements/heavy metals (Fe, Cu, Ni, Cd, As, Pb, Cr, Se). Climate data were derived from ERA5-Land, and farm management information was collected through farmer interviews. Yield gaps ranging from 2,000 to 4,000 kg ha⁻¹ were estimated using a 90th-percentile benchmark approach. To reduce dimensionality and identify the most relevant predictors, Boruta feature selection was applied prior to model training. The selected variables were then used to develop machine learning models (XGBoost, Random Forest, and Support Vector Regression) for yield gap prediction. Model performance was evaluated using cross-validation, and feature importance analysis was subsequently applied to interpret the contribution of individual predictors. Among the tested models, XGBoost achieved the highest accuracy (R² =0.64, RMSE =1,030 kg ha⁻¹). Growing season precipitation showed a strong negative relationship with yield gaps (r =−0.65), indicating that higher rainfall consistently reduced yield gaps and enhanced resilience in rainfed systems. Nitrogen inputs, represented by total N rate (r =−0.58) and NPK applied (r =−0.59), also had clear gapreducing effects, while phosphorus application exhibited a weaker but still negative relationship with yield gaps (r =−0.26). Among micronutrients, manganese showed a weak negative relationship with yield gaps (r =−0.30), with low to moderate concentrations associated with reduced yield gaps, consistent with its positive role in plant nutrition. In contrast, cadmium exhibited a positive relationship with yield gaps (r =+0.28), indicating a negative influence on crop performance and yield gap widening. These results suggest that trace elements capture soil chemical variability relevant to crop performance and resilience, likely through interactions with nutrient availability and soil buffering processes. Incorporating comprehensive soil chemistry into yield gap modeling enhances predictive performance and provides a more integrated basis for climate adaptation in rainfed agriculture.
Keywords: Yield gap analysis, predictive modeling, soil chemistry, heavy metals, machine learning, XGBoost, wheat, Morocco
How to cite: Bendou, N., Jemo, M., Bijker, W., and Belgiu, M.: Predictive modeling of wheat yield gaps using soil heavy Metals, climate, and Nutrient management in rainfed Morocco, EGU General Assembly 2026, Vienna, Austria, 3–8 May 2026, EGU26-15533, https://doi.org/10.5194/egusphere-egu26-15533, 2026.