Understanding the spatial and temporal characteristics of water flux into or out of shallow aquifers is imperative for water resources management and eco-environmental conservation. In this study, the spatial variability in the vertical specific fluxes and hydraulic conductivities in a streambed were evaluated by integrating distributed temperature sensing (DTS) data and vertical hydraulic gradients into an ensemble Kalman filter (EnKF) and smoother (EnKS) and an empirical thermal-mixing model. The formulation of the EnKF/EnKS assimilation scheme is based on a discretized 1D advection-conduction equation of heat transfer in the streambed. We first systematically tested a synthetic case and performed quantitative and statistical analyses to evaluate the performance of the assimilation schemes. Then a real-world case was evaluated to calculate assimilated specific flux. An initial estimate of the spatial distributions of the vertical hydraulic gradients was obtained from an empirical thermal-mixing model under steady-state conditions using a constant vertical hydraulic conductivity. Then, this initial estimate was updated by repeatedly dividing the assimilated specific flux by estimates of the vertical hydraulic gradients to obtain a refined spatial distribution of vertical hydraulic gradients and vertical hydraulic conductivities. Our results indicate that optimal parameters can be derived with fewer iterations but greater simulation effort using the EnKS compared with the EnKF. For the field application in a stream segment of the Heihe River Basin in northwest China, the average vertical hydraulic conductivities in the streambed varied over three orders of magnitude (5 x 10(-1) to 5 x 10(2) m/d). The specific fluxes ranged from near zero (q(z)<0.05 m/d) to 1.0 m/d, while the vertical hydraulic gradients were within the range of -0.2 to 0.15 m/m. The highest and most variable fluxes occurred adjacent to a debris-dam and bridge pier. This phenomenon is very likely the result of heterogeneous streambed hydraulic characteristics in these areas. Our results have significant implications for hyporheic micro-habitats, fish spawning and other wildlife incubation, regional flow and hyporheic solute transport models in the Heihe River Basin, as well as in other similar hydrologic settings.