Predicting stream water temperature: A data-driven approach highlighting the impact of riparian vegetation
Simon Walther, Benoît Hohl, Pauline Lourenço, Hector Fabio Satizabal Mejia, Jean-François Rubin, Andres Perez-UribeAbstract
Stream water temperature strongly influences aquatic ecosystem health, affecting dissolved oxygen, species distributions, and thermal stress for sensitive taxa. We present a data-driven framework to predict water temperatures across rivers in the Canton of Vaud, Switzerland, explicitly quantifying the influence of riparian vegetation. Meteorological and topographic features were extracted at each water temperature station. Vegetation features were derived from satellite imagery data, using Vegetation Height Models (VHM) and Specific Leaf Area Vegetation Index (SLAVI), and aggregated along upstream river segments to capture the influence of riparian zones on water temperature. These features were incorporated into a machine-learning model using grouped inputs with Softmax-based weighting for meteorology and a Gaussian attention layer for vegetation. Spatial cross-validation ensured realistic generalization. The model achieves a median mean absolute error of 1.3 °C for daily 90th percentile water temperatures. Model analyses show that dense riparian vegetation can reduce predicted stream temperatures by nearly 3 °C on warm days. Moreover, the spatial influence of vegetation varies with river slope: in flatter reaches, vegetation close to the water temperature station exerts the strongest cooling effect, whereas in steeper reaches, vegetation located further upstream becomes more influential, consistent with faster flow transporting thermal signals downstream. These results underscore the importance of incorporating spatially explicit riparian vegetation metrics in predictive models. The framework offers actionable insights for river management, showing that targeted riparian preservation or restoration, even in narrow corridors, can effectively mitigate thermal stress and support climate adaptation strategies.