We develop a heat-transport model to study the impact of streambed morphology on temperature distribution within the hyporheic zone of gravel bed rivers. The heat transport model, which includes conduction, diffusion, and advection, is solved by a Lagrangian approach, neglecting transverse dispersion and considering stream water temperature as boundary condition at the streambed. First, we show that the model accurately reproduces the temperature distribution measured within the hyporheic zone of a reach of the Bear Valley Creek, Idaho (USA). Our model reveals spatially complex patterns of hyporheic water temperatures that vary with time within the hyporheic zone and at the streambed surface. The analysis shows that temperature distributions are primarily related to the hyporheic residence time and consequently to the bed morphology and in-stream flow discharge. Results show that the hyporheic temperature amplitudes are smaller than the surface water temperature and they decrease with stream size, leading hyporheic zones of large streams to be independent from in-stream daily temperature fluctuations.
 Temperature is an essential and vital parameter of water quality and exerts a strong control on aquatic ecosystems [Constantz and Stonestorm, 2003]. It influences dissolved oxygen concentration, aquatic chemical reactions, and processes such as those controlling the concentration of nutrients and contaminants, aquatic organism metabolism, plant photosynthesis rates, and timing, rate, and direction of fish migrations [Allan, 1995; Jonsson, 1991; Bjornn and Reiser, 1991].
 Aquatic organism activity, growth, and reproduction increase with warm stream temperature [e.g., Bjornn and Reiser, 1991]. Although activities decline and growth and reproduction cease as temperature conditions are below or exceed certain thresholds, which are species specific, excessively high or low temperatures can cause organism mortality [e.g., Vannote and Sweeney, 1980]. Plants and animals adapt and tolerate specific temperature variations, whose range changes widely from narrow to large intervals among species [Vannote and Sweeney, 1980; Carreker, 1985].
 The spatial distribution, activities, and metabolism of benthic organisms and hyporheos, which dwell at the stream bottom and within the hyporheic zone, respectively, strongly depend on the temperature of the intragravel flows [Evans and Petts, 1997]. In turn, hyporheic water temperature may affect in-stream water quality because most biogeochemical reactions, such as nitrification and denitrification, occur within the hyporheic zone [Master et al., 2005]. Furthermore, emissions of nitrogen gases, as product of denitrification, with nitrous oxide an important greenhouse gas, depend on both hyporheic and in-stream water temperatures [e.g., Marzadri et al., 2011, 2012].
 Hyporheic temperatures may be highly dynamic, both spatially and temporally, due to the interaction among in-stream flow regime, groundwater table, in-stream water temperature, and hyporheic exchange [White et al., 1987; Evans and Petts, 1997]. Malard et al.  report that in a reach with alternate-bar morphology the hyporheic water emerges at the leeward end of a bar with a temperature lower than the stream water (15°C against 18°C of the stream water). Additionally, Constantz and Stonestorm  show a complex vertical temperature profile, which changes daily and seasonally, within the sediment of a small desert stream.
 Despite the importance of intragravel temperature on stream ecology, previous studies are limited to field measurements and numerical models in one or two dimensions [Hewlett and Fortson, 1982; Lapham, 1989; Mellina et al., 2002; Constantz and Stonestorm, 2003; Anderson, 2005; Hatch et al., 2006; Brown et al., 2007; Lautz et al., 2010; Gariglio et al., 2012; Luce et al., 2013]. Most studies focus on one-dimensional heat transport and temperature profile models, which use temperature as a tracer to quantify stream-groundwater interaction [Lapham, 1989; Constantz and Stonestorm, 2003; Anderson, 2005; Hatch et al., 2006; Lautz et al., 2010; Gariglio et al., 2012; Luce et al., 2013] and predict the vertical component of the downwelling and upwelling fluxes [Hewlett and Fortson, 1982; Mellina et al., 2002; Brown et al., 2007]. Two-dimensional studies are limited to few numerical analysis of hyporheic temperature distributions in streams with idealized dune-like triangular bed forms [Cardenas and Wilson, 2007], channel-spanning logs [Sawyer et al., 2012], and to the analysis of a few experimental data in gravel bed rivers [e.g., Malard et al., 2002; Seydell et al., 2007].
 However, to our best knowledge, none of these numerical or analytical models consider the complex flow pattern induced by three-dimensional bed forms, such as pool and riffle, which are common in natural streams [Tonina and Buffington, 2007; Buffington and Tonina, 2009; Tonina and Buffington, 2011; Marzadri et al., 2010]. Consequently, we hypothesize a complex three-dimensional hyporheic temperature distribution in gravel bed rivers with pool-riffle morphology, which reflects the flow pattern. To test this hypothesis, we develop a novel three-dimensional semianalytical process-based model, which accounts for advection, diffusion, and conduction, for predicting the thermal regime within the hyporheic zone [Anderson, 2005; Hohen and Cirpka, 2006; Cardenas and Wilson, 2007; Arrigoni et al., 2008]. We focus our investigation on pool-riffle bed form because of its ubiquity and ecological importance [Tonina and Buffington, 2007; Buffington and Tonina, 2009). However, the model could be applied to any stream topography. Our goals are (1) to test our model against field measurements, (2) to study the interaction between stream morphology and temperature dynamics within the sediment interstices, and (3) to quantify the effects of the daily cycle of in-stream temperatures on the hyporheic thermal regime.
 To this end, we model the hyporheic flows with an analytical solution of the flow equation coupled with the Darcy law in the alluvium below a pool-riffle morphology [Marzadri et al., 2010]. In addition, we model heat transport as a passive tracer and solve the advection dispersion equation (ADE) with a Lagrangian approach [Dagan et al., 1992; Rubin, 2003; Bellin and Rubin, 2004], assuming negligible transverse dispersivity and imposing the daily temperature fluctuations of the in-stream water as the thermal boundary conditions at the streambed. First, we test the model with temperature time series measured within the streambed of a gravel bed river, and then we investigate the effect of river morphology on hyporheic temperature regime by applying our model to a wide range of stream sizes.
2. Study Site
 In the present work, we model the spatial pattern of temperature within the hyporheic zone of a 150 m long reach of Bear Valley Creek (44°22.738′N, 115°23.434′W; see Figure 1a), a headwater tributary of the Middle Fork of the Salmon River within the Boise National Forest [Tonina and McKean, 2010; Tonina et al., 2011]. Bear Valley Creek encompasses a drainage area of 496 km2 with the watershed area upstream of the study site of approximately 161 km2 [Gariglio, 2012]. The mean basin elevation is 2152 m above sea level with 70.1% forest cover largely composed of lodgepole and subalpine fir forests with extensive meadow systems and with 62% of the area inventoried as roadless [United States Forest Service (USFS), 1990]. The local climate has wet winters and dry summers with annual precipitation for the drainage falling as snow from November to March [Thurow, 2000]. Stream hydrographs are characteristic of a snowmelt-dominated system, in which peak streamflows correspond with spring and early summer snowmelt, which begins around April and can extend into early June. The remainder of the year is dominated by low flows.
 The study site is pool-to-pool sequence within a meandering pool-riffle reach flowing in a large gentle slope meadow. The bankfull discharge is near 6 m3 s−1 and bankfull width approximately 15 m. The mean slope is 0.003 m m−1 with a median grain size of 0.032 m. The substrate is gravel with sand pockets located along the margins of the bars.
3.1. Hyporheic Flow Model
 We studied the temperature distribution within the hyporheic zone by means of a semianalytical model of flow and heat transport able to characterize the hyporheic flow field generated by pumping processes. Surface and subsurface flows are studied separately because of the small water and momentum exchange between the two-flow systems [Elliott and Brooks, 1997a; Marzadri et al., 2010]. The two surface and subsurface systems are connected via the near-bed head distribution, which is represented as follows [Stonedahl et al., 2010]:
where Nx and Ny are the number of harmonics considered in the expansion along the longitudinal (x) and transverse (y) directions, and and are the wave number in the longitudinal and transverse directions, respectively (with L and W the corresponding domain dimensions). In addition, anm and are the amplitudes and phase differences of the transverse (n) and longitudinal (m) modes, respectively. The water surface elevations, of which the equation (1) is the fast Fourier transform, could be measured, or obtained through a hydrodynamic model solved numerically or analytically. In the case of fully submerged alternate bars in equilibrium with the flow discharge, equation (1) can be further simplified because the terms of order higher than the second produce a negligible contribution on the head variation (i.e., , see equation (2) in Marzadri et al. ) according to the work of Colombini et al. .
 Assuming steady-state conditions and a streambed characterized by homogeneous and isotropic porous media, the hyporheic flow is governed by the Laplace equation:
where h is the energy head. This equation is solved within a rectangular parallelepiped of length L, width W, and depth zd, representing the control volume, which may contain the floodplain and a meandering reach or may reduce to the stream volume for a straight alternate bar reach (see Figure 2). The bottom surface of the control volume is impervious, the four lateral sides are periodic boundary with specified hydraulic head and the hydraulic head given by the equation (1) is applied at the upper boundary, which coincides with the mean streambed elevation. This simplification holds because imposing the head at the mean streambed elevation instead than at the streambed surface does not alter the hyporheic flow, except close to the water-sediment interface, and the residence time distribution, as showed by Marzadri et al. .
3.2. Heat Transport Model
 Under the assumption that the streambed material is in local thermal equilibrium, the governing equation of heat transport assumes the following form:
where C is the effective volumetric heat capacity of the sediment-water matrix, Cw is the volumetric heat capacity of water, KT is the effective thermal conductivity, D is the mechanical dispersion tensor, ϕ is the porosity of the sediment, and u is the intragravel flow velocity. Notice that the assumption of local thermal equilibrium implies that, at each point, sediment and water temperatures are the same and the variables C and KT characterize the medium, which is composed of sediment and water [Cardenas and Wilson, 2007]. Furthermore, we assume that heat is not exchanged through the lateral and bottom boundaries of the hyporheic zone:
 We adopt these boundary conditions to focus our attention on stream-hyporheic zone exchange and its effect on temperature regime within the hyporheic zone. However, they can be modified by adding lateral and bottom exchanges if needed. Streambed material is in local thermal equilibrium with homogeneous and isotropic hydraulic conductivity ( , which is within the range of the values typically attributed to mixed gravel and sand formations [Freeze and Cherry, 1979]).
 We solve equation (3) in a Lagrangian reference system moving along the streamline (and with the axis ξ tangent to the streamline, see Figure 3). In this framework, the dispersion tensor becomes diagonal, with the diagonal terms given by and , where and are the longitudinal and transverse components of dispersivity and u is the velocity vector of magnitude u. For simplicity, we assume that the transverse component can be neglected owing to its small value with respect to .
 In this Lagrangian framework, equation (3) can be written in a more convenient way for its analytical treatment by applying mass conservation along a streamline with the longitudinal local spatial coordinate ξ replaced by the travel time τ of a particle traveling along the streamline (see equation (A1) in Appendix Effects of Velocity Variation Along the Streamline) [Gelhar and Collins, 1971; Dagan et al., 1992; Cvetkovic and Dagan, 1994; Bellin and Rubin, 2004]:
where the integration is performed along the streamline up to the distance l from streamline's origin at the downwelling location. Moreover, we consider that heat conduction, which stems from the velocity gradient along the trajectories, is negligible because velocity gradients are small within the alluvium, except near the streambed and deep in the sediment (Appendix Effects of Velocity Variation Along the Streamline) [e.g., Buffington and Tonina, 2007; Cardenas and Wilson, 2007; Tonina and Buffington, 2009]. With these approximations, the heat transport equation along a streamline simplifies to:
 By solving this equation along all the streamlines that connect the downwelling with the upwelling zones, we are able to model, under suitable boundary and initial conditions, the impact of in-stream temperature regime on the hyporheic zone. In particular, we use the following simplified solution for predicting the temperature within the hyporheic zone in the Bear Valley Creek field study:
 In a broader sense and with the intent to analyze the effect of streambed morphology on hyporheic thermal response, we considered also the case in which the in-stream temperature signal, , is given by the superimposition of a dial sinusoidal component to a constant component T0, with the other two boundary conditions (B1a) and (B1c) remaining unaltered. Under these circumstances, the solution of the transport equation (6) is given by equation (B10). In doing that, we focus on the effect of dial variations on the stream temperature neglecting the effect of higher frequency oscillations, which can be identified only if the temperature is recorded at high frequency as we did for the Bear Valley Creek experiment.
 We consider the relative importance of advection and diffusion with the following local thermal Peclet number:
where is the length scale of the thermal diffusion process [Taniguchi, 1993].
3.3. Model Validation
 We verify our model against measured surface water and hyporheic water temperatures at nine locations along the Bear Valley Creek, Idaho (USA), during summer 2007. Five temperature-monitoring probes were installed near the center of the channel in order to capture the pool-riffle-pool sequence along the streamflow direction (central upstream pool, upstream riffle, central riffle, downstream riffle, and downstream pool); while other four probes were installed in the transverse direction across the channel near the upstream pool and the central riffle (right upstream pool, left upstream pool, right riffle, and left riffle) (see Figure 1d). At each location, temperatures were recorded every 16 min by nesting three Onset StowAway TidBiT temperature sensors in a PVC pipe. The topmost of them was located at the streambed surface while the other two were located within the hyporheic sediments at 10 and 20 cm below the streambed, respectively. The PVC pipe was perforated at each sensor location to allow direct contact with streambed sediments and seepage water. In order to prevent vertically preferential flow paths within the PVC pipe, disks of styrofoam material and streambed sediments were inserted in between sensors (see Figure 1c). The manufacturer reports measurement range for the temperature sensors is −4°C to 38°C with a resolution of 0.15°C and an accuracy of 0.1°C. Temperature sensors were checked prior to and following deployment for temporal or thermal drift by testing their measurements in a temperature-controlled water bath. Data collection began on 12 July 2007 and ended on 3 September 2008.
 Detailed water surface elevations were collected with a total station (Leica 500 System) on 23 August 2007 at a streamflow of 1 m3 s−1 for the study site. Water surface elevation measurements also cover the meanders upstream and downstream the study site. Furthermore, 9 piezometers were driven in the floodplain to define the groundwater table surrounding the reach. Water surface elevations are used as boundary condition for the hyporheic model because they are good estimates of the hydraulic head distribution in gravel bed rivers with pool-riffle morphology [e.g., Tonina and Buffington, 2007; Marzadri et al., 2010]. Discharge measurements were collected at two cross sections at the upstream and downstream ends of the study site with an acoustic doppler velocimeter (SonTek FlowTracker Handheld ADV) and they differed less than 5%. Repeated discharge measurements on 22 and 24 August showed approximately constant discharge. Similarly, the water surface table was constant during that period. Therefore, we use this period (22–24 August 2007) to compare our model-predicted and field-measured temperatures within the hyporheic zone, because we do have accurate measurements of surface water and water table elevations, which are used to define the boundary condition of the hyporheic hydraulic model.
 We represent the measured temperature profiles at the stream water interface ( ) at each location via a Fourier series (8). The analysis shows that the first six harmonicas suffice to represent the temperature fluctuations with the Fourier series; therefore, in our simulation NT = 5. The thermodynamic parameters used in the simulations are reported in Table 1.
Table 1. Values of Thermodynamic Parameters Used in the Simulation for Modeling Temperature Measurements Along the Bear Valley Creek, Idahoa
Cs is the heat capacity of sediment, C is the effective volumetric heat capacity of the sediment-water matrix, Ke is the average bulk thermal diffusivity, KT is the effective thermal conductivity, ϕ is the porosity of the sediment, and αL is the longitudinal component of the dispersivity.
 To put in a more general framework the analysis of the thermal behavior within the hyporheic zone and to investigate the role of streamed morphology, we analyze a large class of streams from small steep to large low gradient. The former streams are representative of headwater channels with thin alluvium depths and steep slopes. The latter represent streams commonly found in valley bottoms with thick alluvium depths and gentle slopes. We set the relative submergence dS (ratio between the streambed median grain size d50 and the mean flow depth Y0) to vary between 0.20 and 0.01, while keeping the stream aspect ratio β (ratio between half stream width, , and Y0) and the Shields number θ, both constant and equal to 13 and 0.08, respectively. The analysis is performed with median grain size d50 = 0.01 m, such that variations of dS are obtained by varying the mean flow depth Y0. Table 2 reports the depths Y0 used in the simulations and the corresponding stream's characteristics computed by using classic morphological expressions [e.g., Marzadri et al., 2012].
Table 2. Morphological and Hydrodynamic Parameters Considered in the Simulations and Computed With the Below Expressionsa
Mean flow depth , channel width , alluvium depth , streambed slope , stream water discharge , bed form length L and dimensionless depth (where is the submerged specific gravity of the sediment, HBM is the bar amplitude [Colombini et al., 1987] and is the roughness coefficient, with Cz indicating the dimensionless Chezy coefficient and g the gravitational acceleration). Moreover Test 1, Test 10, and Test 18 correspond to small steep, medium moderate, and large low gradient stream, respectively.
4.1. Comparison With Field Measurements
 Our model identifies upwelling and downwelling areas that are in agreement with those calculated by Gariglio  at low flow by analyzing the temperature signals within the hyporheic zone of the same reach (see Figure 1d). Because their results are independent from any hydraulic measurements, it is an independent analysis of the same system. Thus, these results confirm that water surface elevations are the primary mechanism driving hyporheic flows in gravel bed rivers with pool-riffle morphology. Similar to Gariglio , our results show the effect of the valley slope superposed on the local reach slope in characterizing the upwelling and downwelling areas (Figure 1d). At the study site, the two slopes are almost orthogonal to each other. Hyporheic fluxes are mainly dominated by the valley slope at the sides of the channel with the upvalley side (right bank of the stream) with upwelling fluxes and the downvalley side (left bank of the stream) with downwelling fluxes (Figure 1d). However, the pool-riffle bedform influences the upwelling and downwelling locations along the center of the channel. As expected by pool-riffle induced hyporheic flow, the site presents downwelling and upwelling areas upstream and downstream of the riffle crest along the center of the stream, respectively.
 Similarly with the upwelling-downwelling areas, the comparison between predicted and measured temperature profiles at two different depths within the hyporheic zone beneath the upstream pool presents a good match (Figure 4). In general, we can observe that measured and modeled signals are in phase and present comparable maximum and minimum. At the central upstream pool at depth z2 = −24 cm (Figure 4d), there is a sensible difference between measured and modeled signals due to the particular location of probe 2 between downwelling and upwelling areas.
 Figure 5 shows the comparison between our model and the measured temperature profiles beneath the riffle crest. Modeled temperatures at probe 5 (right riffle) show different phase although similar temperature amplitude. The pathlines for both sensors of probe 5 have very long residence time due to the upstream meander where flow downwells at the bank of the upstream section and moves beneath the meander (see also Figure 1a). This long residence time reduces the temperature amplitude and could have increased the possibility for errors in timing, which controls the phase. Moving across the riffle crest from right to left or from upwelling to downwelling areas, the match between the modeled and measured temperature improves for both probe 6 (central riffle) and probe 7 (left riffle). For probe 7, only the information of the temperature signal at depth z2 is available, because sensor at depth z1 was damaged during the retrieval of the data.
 Model performance improves in comparing the temperature profiles along the center of the channel, as shown in Figure 6. Temperature profiles at these locations depend on hyporheic flows induced by the local bedform geometry rather than the meander and valley slopes.
 Measured and predicted temperature signals show high decrease and smoothing of their amplitudes and a tendency to the mean daily temperature (T0). This effect is due to the diffusion process, which is comparable to the advective process for heat transport. This is supported by the low values of the Peclet numbers quantified with equation (9). Their values range between 0.8 and 18 based on data from our study site.
 We plot measured versus modeled temperatures in Figure 7, and we report the goodness of fit in terms of the coefficient of determination R2 of the 1:1 line. Comparison of Figures 7a and 7b show that as the depth increases model performance in predicting temperature decreases, though remaining acceptable. This is probably due to mixing with groundwater, which also causes lower daily mean temperatures of the hyporheic water than those of surface water. The good performance of the model predictions is also suggested by the high values of index of agreement, d, Wilmot  shown in Figure 8. The index of agreement is quantified with the following equation:
where is the ith value of the measured temperature with mean , is the ith value of the modeled temperature and N is the number of data. The values of d oscillates between 0.35 and 0.98, with perfect match obtained for d = 1.
4.2. Morphodynamic Effects
 In this section, we analyze the results of simulations performed on river reaches whose geomorphological characteristic are presented in Table 2. Figure 9 shows the in-stream temperature and the hyporheic temperature averaged over the upwelling areas for both small steep-gradient, medium moderate-gradient, and large low-gradient streams (Test 1, Test 10, and Test 18 of Table 2, respectively). The daily mean hyporheic water temperature is equal to the mean in-stream water temperature in all cases as observed in the field studies of Arrigoni et al. . The signal of the upwelling water temperature is characterized by a time lag, the lagged effect in Arrigoni et al. , and an attenuation defined as the buffered effect in Arrigoni et al. . These effects relate directly with the dimension of the stream and consequently with the hyporheic residence time. They depend on the hyporheic flow field, which develops in a thin and shallow area near the streambed surface in small-steep reaches that cause small lagged and buffered effects [Marzadri et al., 2010]. Conversely, the large low-gradient streams with deeper and slower hyporheic flows than the former reaches have the mean output signal with a strong attenuation [Marzadri et al., 2010]. The time lag of large low-gradient streams is greater than 24 h, as shown by the phase shift between the input (Tstream in Figure 9) and output (Thz-large in Figure 9) temperature signals.
 Figure 10a shows the dimensionless temperature attenuation of upwelling hyporheic water ( , where and are the hyporheic averaged and the stream amplitude signals, respectively) as a function of the dimensionless depth ( ). The attenuation increases with dimensionless depth following a power-law relation. Conversely, the time lag increases with following a linear relation (Figure 10b). This result highlights the role of the hyporheic zone in controlling the stream water temperature and its strong dependance on the hyporheic residence time distribution, which in turn is a function of streambed morphology. and time lag increase with stream dimension. Consequently, large streams have hyporheic thermal response with less variability than the stream daily response. This causes a more stable hyporheic thermal regime, which influences organism presence and biogeochemical reactions than that of the stream.
4.3. Streambed Temperature
 Figure 11 is a snapshot of the temperature distribution within the hyporheic zone in the case of small steep streams at midday. Downwelling areas present the same warm temperature of the in-stream water, because pumping mechanism draws in-stream water within the sediment, whereas upwelling areas have a complex temperature distribution, which reflects advection through the hyporheic zone (hyporheic residence times (Figure 3)) and diffusion and conduction along the pathlines. Because of the daily fluctuations and the different residence times among pathlines, spots of cold and warm water move through the sediment creating a complex three-dimensional temperature pattern. These differences can be attenuated, but not eliminated, by transverse dispersion, which we neglected in our model.
 We visualize the residence time distributions within the hyporheic zone and at the streambed interface in Figure 12b to show the role of the residence time in modulating intragravel water temperature. We adopt the red and blue tones for long ( h) and short ( h) residence times, respectively. Comparison of Figures 11 and 12 shows that downwelling areas (deep dark blue) are characterized by the same temperature of the stream water, while upwelling areas present a range of residence time from short (light blue) that have temperatures near those of the downwelling areas to long (dark red) residence time with time lag larger than one day. Upwelling areas with long residence times are mostly located near the riffle crest.
 We developed a simple semianalytical model to predict hyporheic temperature dynamics. The model accounts for advection, longitudinal diffusion, and conduction. It uses the modeled flow field within the hyporheic zone for simulating the advective heat transport. Hyporheic fluxes are obtained by solving the flow equation coupled with the Darcy law for a porous media with homogeneous and isotropic hydraulic conductivity. We did not account for heterogeneity, which may lead to preferential flow paths. However, more complex subsurface models could be used, such as anisotropic or heterogeneous hydraulic conductivities. Although our model accounts for conduction and longitudinal diffusion, it does not account for lateral diffusion and consequently for mixing. This is an inherent limitation of the Lagrangian methodology that we adopt. The travel time approach simplifies a three-dimensional problem in a Cartesian coordinate system to a one-dimensional problem based on residence time. Whereas this simplification facilitates the derivation of analytical solutions for the heat transport, it does not allow accounting for the heat transfer among adjacent pathlines, because it considers each pathline to be independent from the others. Because of the relatively small local Peclet numbers calculated for our field data, diffusion is important. However, diffusion is stronger along the streamlines than across them. In addition, transverse diffusion is more important at the fringes of the thermal plume than within it. Therefore, relevant transverse pumping of thermal energy is expected mainly at the contact between hyporheic water and groundwater. By neglecting lateral diffusion, we neglect this transfer of thermal energy, which is responsible of differences in the long term mean temperature of the hyporheic zone and the stream. As a result, the mean hyporheic temperature signal is greater than the in-stream temperature signal. As a confirmation of this, our model produced a good match between modeled and measured temperatures when the exchange with groundwater is small to negligible, and less accurate, yet acceptable when this exchange is significant (i.e., Figure 5d). Notice that our model is not calibrated and its parameters are derived from field measurements. Thermal properties of the sediment are those measured for the same study site by Gariglio , and hydraulic conductivity is chosen according to the granulometric distribution of the sediments. The head field is predicted with the boundary condition at the water-sediment interface approximated by measured water surface elevations. Consequently, the processes that the model simulates describe most of the variance of the temperature measurements, thereby confirming that they are the primary mechanisms controlling temperature distribution within the hyporheic zone.
 Local lateral dispersion is important in the presence of strong temperature gradients and mixing between downwelling and ground waters, which may induce a significant heat flux across the lower boundary of the domain. An immediate consequence of heat exchange is a difference between the mean daily temperature of the hyporheic and stream waters, as shown in Figure 5d, for example. In systems where mixing is limited and temperature gradients between ground and surface waters are small, the daily mean hyporheic temperature should coincide with that of the surface water. These systems may include loosing or neutral rivers, where hyporheic flows have less interaction with the groundwater or where the hyporheic flows are not compressed by the groundwater system. This case has been typically observed in the field [Arrigoni et al., 2008; Poole et al., 2008] and our model should perform well (e.g., Figures 4-6) [e.g., Sawyer et al., 2012; Malard et al., 2002]. However, lower performance should be expected in those hyporheic zones where mixing is important. These systems are characterized by different daily mean temperatures between surface and hyporheic waters (e.g., Figure 5d). Thus, the change in mean daily temperature can be used as an index of surface-subsurface water mixing.
 Similar to previous investigations [e.g., Cardenas and Wilson, 2007; Constantz and Stonestorm, 2003; Sawyer et al., 2012], our results show that advection and longitudinal diffusion are the main mechanisms controlling temperature distribution within the hyporheic zone. Longitudinal diffusion depends on the sediment and water thermal properties, which are bounded in a narrow range [Constantz and Stonestorm, 2003]. Recently, Luce et al.  proposed a new methodology to infer these properties from temperature measurements, thereby facilitating the applications of our model as an alternative to one-dimensional diffusion type methods based on lumped parameters. The residence time distribution and, therefore, the advective transport are intimately related to the hyporheic flow structure. Thus, the temperature regime within the hyporheic zone strongly relates to stream morphology, surface water hydraulics and stream water temperature regime. Through our simple process-based model, we are able to relate all those characteristics in terms of the residence time distribution. This result highlights the importance of stream morphology and flow on hyporheic processes and suggests a systematic change in hyporheic temperature regime with stream size.
 We show the effects of stream size from small steep to large low-gradient streams for the case of reaches with alternate-bar morphology. Large low-gradient streams have streamlines with mostly small amplitudes of the daily fluctuations because of long residence time. Long residence time allows diffusion to smooth the temperature gradients of the downwelling waters. This results in most of the hyporheic zone of large streams with water temperatures close to the mean daily surface temperature (e.g., T0). Consequently, hyporheic zone of large streams is less affected by daily temperature fluctuations than small streams and may be more influenced by larger temporal scale variations (e.g., weekly and seasonal time scales) than daily fluctuations [Marzadri et al., 2012]. Conversely, small steep streams show streamlines with amplitude of the temperature signals close to that of the surface water, and thus they may present a more dynamic temperature regime than that of large low-gradient streams.
 The metabolism of aquatic organisms strongly depends on temperature, while benthic and hyporheos species may migrate and move following hyporheic temperature pattern in search of their thermal optima [e.g., Bruno et al., 2009]. The intimate interlink between stream morphodynamic and hyporheic temperature patterns we evidenced in this work offers a consistent framework for analyzing biodiversity at the scale of river systems. According to our simulations, hyporheic sediment near upwelling areas of large streams provide more stable thermal conditions than those of small streams as they buffer daily fluctuations. This suggests that anthropogenic activities at the daily time scale, such as thermopeaking due to power generation, may have a larger impact on the hyporheic zone of small than large steams [see e.g., Arrigoni et al., 2008, and references therein].
 Temperature regime also influences the biogeochemical processes involving oxygen, nutrients, and contaminants. The pattern distribution of hyporheic temperature influences the spatial distribution of reactive species because temperature controls their reaction rates. According to Arrhenius's law, the reaction rate coefficients increase with temperature. Thus, transformation hot spots within the hyporheic zone may change during the day depending on hyporheic water temperature besides the amount of reactant downwelled within the hyporheic zone. This temperature effect should be more pronounced in small than large streams.
 We compared the hyporheic temperature measured at several locations within the hyporheic zone of a mountain meandering gravel bed river with pool-riffle morphology (Bear Valley Creek, Central Idaho, USA) with the results of a simplified Lagrangian heat transport model. Our model neglects water mixing and lateral diffusion and uses parameters derived (not calibrated) from field measurements. Despite these restrictive working hypotheses, the model succeeded in the prediction of measured temperatures in the hyporheic zone of the river reach, thereby suggesting that stream morphology and hydraulic properties of the sediment are the primary properties controlling hyporheic temperature especially in neutral or losing reaches.
 Our results evidence a strong relationship between hyporheic residence time and temperature pattern, with important ecological implications. Consequently, like the hyporheic residence time distribution, temperature pattern within the hyporheic zone stems from the interaction between streamflow and streambed morphology at both local (bed form) and channel-reach (meanders) scales. At both scales, our results confirm that the water surface elevations provide a good boundary condition for hyporheic modeling in pool-riffle morphology, as shown in flume experiments [Tonina and Buffington, 2007].
 The temperature response of the hyporheic to daily temperature fluctuations of the surface water depends on stream size, through the complex pattern of the residence time distribution of water entering at the same temperature in different portions of the downwelling area. Time variability of the downwelling water combines with the distribution of travel time to produce a complex pattern of temperature in the hyporheic, which can be predicted by our model and related to rather general morphological characteristics (such as the ratio between the stream depth Y0 and the bar amplitude HBM). Our results show that the hyporheic thermal regime depends on stream size. Small steep streams are characterized by dynamic thermal regime that changes at the daily scale. Conversely, large low-gradient rivers present more thermally stable hyporheic zones that depend on temperature fluctuations of the in-stream water at scales larger than daily time scale.
 Our temperature model could be coupled with a reactive solute transport model to account for temperature-dependent reaction rates. This should improve our understanding of hyporheic flow in small streams, which are characterized by complex and dynamic hyporheic temperature distribution.
Appendix A: Effects of Velocity Variation Along the Streamline
 The heat transport equation for the intragravel flow (3) expressed in terms of the travel time τ assumes the following form:
in which the parameters assume the following values:
 With these parameters, the coefficients in equation (A1) assumes the following order of magnitude:
 This dimensional analysis shows that the term involving velocity gradient along the streamline has, on the average, an order of magnitude 10−2, which are always smaller than the other terms. Consequently, in our model, we neglect this term.
Appendix B: Solution for Periodic Fluctuations of the Stream Temperature
 Here, we report the solution of equation (6) for constant and periodic fluctuations of the stream temperature . We assume the groundwater temperature TGW as initial condition within the sediments and that stream temperature at the upwelling surface does not influence the temperature distribution within the streamline (this is equivalent to assuming negligible the diffusional flux of heat at the upwelling end of the streamline) [Gelhar and Collins, 1971; VanGenuchten and Alves, 1982]:
 In-stream temperatures present daily variations, which can be expressed as a superposition of a constant mean and periodic fluctuations (see Figure 3). This allows representing the in-stream temperature signal with a Fourier series, which assumes the following form:
where and ( ) are the amplitude and phase of the temperature data of the NT Fourier harmonics, respectively.
 The solution of equation (6) with the initial condition (B1a) and boundary conditions (B1b) and (B1c), with given by the expression (B2), can be represented as a superimposition of elementary solutions obtained separately for each component of Ts (constant , sinusoidal and cosinusoidal ): .
B1. Constant Temperature
 Solutions of equation (6) for a constant temperature in the stream ( ) with initial and boundary conditions (B1a) and (B1c) is the following:
 The solution of equation (6), with boundary conditions (B1a) and (B1c) and specialized for the sinusoidal signal is
while the solution of the same equation (6), with boundary conditions (B1a) and (B1c) but specialized for the cosinusoidal signal is
while , , , and are complex functions defined in Alshawabkeh and Adrian  and related to ith harmonic components:
 The solution obtained by superposition of (B2), (B5), (B6) could be further simplified by introducing the following approximation: , , , and . Comparisons between the complete ( ) and the simplified solution (8) show negligible differences with the maximum relative error lower than 5‰. Equation (8) further simplifies if we consider that the in-stream temperature signal could be represented in terms of a single sinusoidal oscillation around a mean value T0:
 This research is partially supported by the Deadwood River Project, U.S. Forest Service award 009421-01, by the postdoc 2006 grant, project “Flussi Iporreici” - researcher Daniele Tonina, of the autonomous Province of Trento (Italy), sponsor and funding body for the project, and by the National Science Foundation award 1141690.