A Random Forest (RF)-based model was developed that makes it possible to calculate nitrate concentrations in near-surface groundwater across Germany. The model is based on a Germany-wide dataset of more than 10,000 monitoring sites with measurements from 2016 to 2020, which was obtained from the water management authorities of the federal states in connection with a previous project by the Federal Environment Agency (UBA 2026).
The model is a powerful tool for comprehensively mapping large-scale patterns of nitrate contamination in near-surface groundwater. It achieves a test quality of r² = 0.532, making it robust and effective. For the predictions, the variables iron and oxygen (redox parameters) as well as the proportion of agricultural land have proven to be relevant factors. The model’s ability to accurately capture the hydrogeochemical patterns of nitrate pollution was confirmed by an analysis of the partial dependence plots. In particular, the abrupt drop in nitrate concentrations as iron concentrations increase serves as a clear indicator that the RF model has identified the dominant driver of the process, namely denitrification in reducing, anoxic environments of near-surface aquifers. The comparative analysis of regionalization methods shows that the developed IDW-RF approach for areal regionalization of the point-based (discrete) hydrochemical indicator parameters (iron, sulfate, and oxygen) exhibits the highest spatial variability and plausibility, as well as the greatest agreement with the actual measured concentrations at groundwater monitoring wells, compared to Kriging-RF and external reference models.
This resulted in the identification of more than twice as many hotspots (concentrations > 50 mg/l) as with the Kriging method, underscoring the importance of this interpolation method for mapping local extremes. Compared to previous solutions based exclusively on geostatistical methods, the model is better able to identify the spatial variance and the factors influencing nitrate contamination of groundwater. Consequently, it can be used in the future under the Fertilizer Ordinance to designate nitrate-contaminated areas and provides more spatially precise correspondences with the source areas of nitrogen loads.