Spatial mapping of residual soil nitrate (NO 3 - ) after harvest is essential for targeted nitrogen (N) management and reducing leaching risk. Specifically, predicting NO 3 - in spatially diversified cropping systems is challenging because soil properties, crop types, and fertilization rates vary between and adjacent crops. This study tested a stacked ensemble machine learning model to predict crop-scale post-harvest NO 3 - of the topsoil (0-30 cm) in a diversified patch cropping system in Brandenburg, Germany. Five years of data (2020–2024) from 30 patches and 9 different crops were used. The framework integrated data on volumetric soil moisture, precipitation, Sentinel-2 vegetation indices, and N management variables aggregated over temporal windows from 1 to 90 days before harvest. The stacked ensemble of Random Forest and XGBoost achieved the highest performance for the 90-day window (RMSE = 11.5 NO 3 -N kg ha -1 , MAE = 9.0 NO 3 -N kg ha -1 , R 2 = 0.61), outperforming both base learners individually. The feature importance analysis (SHAP) identified cumulative precipitation and NDVI as the dominant predictors. Predicted responses showed increased residual NO 3 - under low precipitation (<150 mm) and high N fertilizer rates (>150 kg N ha -1 ), whereas NO 3 - declined with high NDVI averages above 0.55. The five-year dataset captured both a persistent texture-driven spatial gradient in residual NO 3 - and a drought-related reversal in 2022, when sandy low-yielding patches exhibited unusually high post-harvest NO 3 - under exceptionally dry pre-harvest conditions. These results demonstrate that a multi-source machine learning approach can identify relative post-harvest NO 3 - hotspots in spatially heterogeneous diversified cropping systems with contrasting crop phenologies and management conditions. The framework provides a locally calibratable template for targeted N monitoring in comparable climates, spatially heterogeneous diversified cropping systems with the availability of soil, local weather, crop, and management data.
No takes yet. Share an insight, caveat, or question.
Hossain et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: