Abstract. Previous studies have suggested that shading by riparian vegetation may reduce maximum water temperature and provide refugia for temperature sensitive aquatic organisms. Longitudinal cooling gradients have been observed during the daytime for stream reaches shaded by coniferous trees downstream of clear cuts, or deciduous woodland downstream of open moorland. However, little is known about the energy exchange processes that drive such gradients, especially in semi-natural woodland contexts, and in the absence of potentially confounding cool groundwater inflows. To address this gap, this study quantified and modelled variability in stream temperature and heat fluxes along an upland reach of the Girnock Burn (a tributary of the Aberdeenshire Dee, Scotland) where riparian landuse transitions from open moorland to semi-natural forest. Observations were made along a 1050 m reach using a spatially-distributed network of ten water temperature micro-loggers, three automatic weather stations and >200 hemispherical photographs, which were used to estimate incoming solar radiation. These data parameterised a high-resolution energy flux model, incorporating flow-routing, which predicted spatio-temporal variability in stream temperature. Variability in stream temperature was controlled largely by energy fluxes at the water column–atmosphere interface. Predominantly net energy gains occurred along the reach during daylight hours, and heat exchange across the bed-water column interface accounted for <1% of the net energy budget. For periods when daytime net radiation gains were high (under clear skies), differences between water temperature observations decreased in the streamwise direction; a maximum difference of 2.5 °C was observed between the upstream reach boundary and 1050 m downstream. Furthermore, daily maximum water temperature at 1050 m downstream was ≤1°C cooler than at the upstream reach boundary and lagged the occurrence of daily maximum water temperature upstream by >1h. Temperature gradients were not generated by cooling of stream water, but rather by a combination of reduced rates of heating in the woodland reach and advection of cooler (overnight and early morning) water from the upstream moorland catchment. Longitudinal thermal gradients were indistinct at night and on days when net radiation gains were low (under over-cast skies), thus when changes in net energy gains or losses did not vary significantly in space and time, and heat advected into the reach was reasonably consistent. The findings of the study and the modelling approach employed are useful tools for assessing optimal planting strategies for mitigating against ecologically damaging stream temperature maxima.