We investigate the effects of current–bed form induced flow and heat transport through permeable-bottom sediments overlain by a marine or terrestrial water column that is gaining or losing deep groundwater. Heat transport is forced by the diel variation of temperature in the water column. The investigation utilizes sequentially coupled simulations of turbulent flow in the water column, and Darcy flow and heat transport in the sediments. The simulations address the question when, where, and by how much are diel water column temperature variations transmitted into sediments subjected to ambient-groundwater discharge? This is crucial information for detecting, observing, and predicting temperature-sensitive biogeochemical and ecological processes in the bottom sediments. When the groundwater gain or loss is small, it has no appreciable effect on temperatures in the sediments, which are controlled by heat conduction and current–bed form induced heat advection. As losing discharge increases, the temperature signal from the water column penetrates deeper into the sediments, with the largest temperature variations found under a downwelling zone along the stoss side of the bed form and damped temperature variations found near a narrow upwelling zone below the crest. Similar patterns are observed under gaining conditions, but with temperature variations penetrating to shallower depths; the interfacial exchange zone is diminished by upward movement of deep groundwater. Large gains or losses of deep groundwater prevent the formation of an interfacial exchange zone making heat transport almost vertically one-dimensional. The sensitivity of the sediment-thermal regime to hydrodynamic conditions increases with increasing water column current (Reynolds number) and with sediment permeability.
 For terrestrial water bodies, such as streams, rivers, lakes and wetlands, different regional geologic and geomorphic settings result in varied interactions between water bodies and their adjacent aquifers [Larkin and Sharp, 1992]. Depending on the direction of regional groundwater flow, whether toward or away from the terrestrial-water body, the water body can be ‘gaining’ or ‘losing’ [Winter et al., 1998], or both. For example, along a single river both gaining and losing conditions can be found in adjacent reaches owing to channel sinuosity [e.g., Woessner, 2000] or topography, while a single flow-through lake is, by definition, gaining on one side and losing on the other [Cheng and Anderson, 1994]. Whether toward or away from the water body, this ambient-groundwater discharge affects the thermal energy budgets of fluvial corridors [Cozzetto et al., 2006; Loheide and Gorelick, 2006], leads to increased thermal heterogeneity within streambeds [e.g., Conant, 2004] and in channel-floodplain systems [e.g., Arscott et al., 2001; Brown et al., 2005], and affects hyporheic exchange [Cardenas and Wilson, 2007b]. The complex time- and space-varying interactions between stream water, groundwater and pore water, should therefore be considered in research on temperature-sensitive ecological and biogeochemical processes [Poole and Berman, 2001].
 It is also widely accepted that groundwater from coastal confined and unconfined aquifers is discharged to estuaries, along ocean coastlines, and even to deeper parts of the continental shelf up to as much as 80 km away from the coast [Simmons, 1992; Moore, 1996; Moore and Shaw, 1998; Burnett et al., 2003]. Upward or downward flow of deep groundwater relative to the sediment-water interface influences and further complicates the physics and biogeochemistry of both interstitial water and benthic water in these marine and coastal settings [Moore et al., 2002; Burnett et al., 2003].
 The literature sheds little light on the thermal impacts of coupled fluid flow in sediments below a ‘gaining’ or ‘losing’ water column. We recently independently studied different aspects of this issue for turbulent flow in a water column above porous dunes; in this paper we bring those aspects together. Cardenas and Wilson [2007b] investigated the isothermal interaction between current–bed form induced fluid flow and regional groundwater flow, with its ‘gaining’ or ‘losing’ conditions. We focused on pore water flow patterns and the interfacial exchange of hyporheic fluids. Cardenas and Wilson [2007c] used the same geometry, but without regional groundwater discharge, to investigate the thermal regime of sediments for the case where the water column suffers a diel temperature variation, but is neither gaining nor losing. Our goal in this paper is to combine these models to examine the thermal regime of sediments under gaining and losing conditions. That is, we investigate how the interaction between current–bed form induced fluid flow and regional groundwater flow influences the thermal regime of the dune sediments.
 We follow the methodology of Cardenas and Wilson [2007c]. The basic two-dimensional coupled-fluid-flow simulation is depicted in Figure 1. Mean unidirectional turbulent flow in the water column, over subaqueous dunes (Figure 1a), is simulated by Reynolds-averaged Navier-Stokes (RANS) equations (not shown) with the k-ω closure scheme [Cardenas and Wilson, 2007a]. The RANS simulation treats the bottom of the water column, the sediment-water interface, as a no-slip boundary condition. As shown in Figure 1, water column flow accelerates across the stoss side of the dune and decelerates on the lee side; flow separates and an eddy forms just downstream of the dune crest (Figure 1a). The eddy plays an important role in generating the water column bottom-head distribution that drives flow across the sediment-water interface [Cardenas and Wilson, 2007a]. The bottom heads are used as a Dirichlet boundary along the sediment-water interface for the groundwater flow domain, resulting in sequential coupling of flow in the water column and in the underlying sediments (Figure 1b). The lower boundary of the sediments is a prescribed fluid-flux boundary, qbas, to which we apply the labels “basal flux” and “ambient groundwater discharge.” Depending on the direction of the basal flux we simulate gaining or losing conditions (Figure 2). Lateral flow boundaries are considered spatially periodic with the same prescribed-head drop for both the water column and the sediments; the head drop results in mean flow from left to right of both domains. The groundwater flow field is then used sequentially in the simulation of heat transport in the sediments [Cardenas and Wilson, 2007c].
 The sediment model consists of the incompressible, nondeformable groundwater flow equations (1) and (2) and the heat advection-conduction-dispersion equation (3), which are solved to yield heads, velocities, and temperatures in the sediments,
where P is pressure, h is hydraulic head (= P/ρg + x3), T is temperature, qi is the specific discharge (i.e., Darcy flux), kp is intrinsic permeability, ϕ is porosity, ρ is water density, μ is water dynamic viscosity, Dij is the mechanical dispersion coefficient, t is time, xi are Cartesian coordinates with x2 vertical, and index i, j = 1, 2. The heat transport model assumes local thermal equilibrium (Tsolid = Twater at every point) with an effective thermal conductivity, KT, and an effective volumetric heat capacity, C, of the sediment-water composite. See equation (4) of Cardenas and Wilson [2007c] for the definition of C. The mechanical dispersion coefficient contains two dispersivity parameters [Bear, 1972]. The longitudinal dispersivity, αL, is set to 1 cm, equivalent to several grain diameters, which is typical for the scale of our experiments [e.g., de Marsily, 1986; Schulze-Makuch, 2005], and the transverse dispersivity, αT, is considered to be one tenth of αL.
 We previously analyzed the effects of a temperature-dependent viscosity, μ, and showed that this significantly affects instantaneous fluxes along the sediment-water interface, but has minimal effects on the time-dependent spatial patterns of temperature [Cardenas and Wilson, 2007c]. Moreover, these temperature patterns are more sensitive to thermomechanical dispersion than to temperature-dependent viscosity. Since our computational code does not allow having both a variable viscosity (i.e., full coupling of equations (1)–(3) and a locally variable dispersion coefficient tensor, we chose to consider the latter and not the former in this paper. Consequently, the thermal-energy balance (3) in the sediments assumes that fluid viscosity and density are fixed.
 The thermal forcing enters through the sediment-water interface as a Dirichlet boundary (see Figure 1), with temperature varying through time but not space; that is, the water column is well mixed. The forcing mimics a diel cycle of temperature in the water column,
where T is the temperature, Tave is the average about which the temperature varies, Tamp is the amplitude of the variations, and τ is the period of the variations. Parameters are τ = 24 hours, Tave = 20°C, and Tamp = 5°C in all simulations. The sides are spatially periodic boundaries, while the lower boundary is a convective or zero-gradient boundary described by
where n is the direction normal to the boundary. Equation (5) implies that all heat transfer at the lower boundary is due to advection and ignores regional geothermal-heat flux. The initial temperature is equal to Tave,
Heat transport simulations are run for 5 days allowing for several days of “spin-up”; results analyzed and presented correspond to the last 24-hour cycle.
 The turbulent flow simulations are implemented in the commercial code CFD-ACE+ while the groundwater flow and heat transport simulations are implemented in the commercial code COMSOL Multiphysics. The governing equations are sequentially solved in the following order: (1) RANS k-ω, (2) groundwater flow equation, and (3) heat transport equation. A typical grid for the groundwater flow and heat simulations is shown in Figure 1b. The domain consists of ∼17,000 triangular Lagrange-quadratic elements with a maximum size (length of one side) of 2 cm within the domain and 1 cm along the top boundary. Direct solvers from UMFPACK [Davis, 2004] are used. In all simulations, the bed form length L = 1.0 m, the bed form height H = 0.05 m, the depth of the sediments below the trough is >1.5 m, and the water column depth above the trough dwat = 0.5 m (see Figure 1). Model parameters are summarized in Table 1. Sensitivity of the thermal regime is mainly explored by varying permeability, kp, the water column Reynolds number (Re = VaveHρ/μ where Vave is the average velocity in the water column taken above the crest), and the prescribed basal flux, qbas. We normalize qbas by dividing it by the hydraulic conductivity of the sediments, K = kpρg/μ; the dimensionless basal flux is denoted by qbas*.
 The hydrodynamics of sediment-water interfaces under ambient groundwater discharge are discussed elsewhere [Cardenas and Wilson, 2007b]. Briefly, under losing conditions (Figure 2a) an interfacial or hyporheic exchange zone forms around the head minimum at the crest, near where the eddy detaches. The interfacial-exchange zone is the area within the sediments characterized by streamlines originating and ending at the sediment-water interface. Some of the water downwells along the stoss face flows through this zone and upwells to the sediment-water interface near this head minimum. Water downwelling near the head maximum, located close to the water column eddy reattachment point, moves deeper into the sediments and does not return to the sediment-water interface. Under gaining conditions (Figure 2c) an interfacial-exchange zone centers around the bottom-head maximum, located along the stoss face of the dune. The deep groundwater upwells near the bottom-head minimum near the dune crest. For comparison, Figure 2b shows the interfacial-exchange zone for neutral conditions [Cardenas and Wilson, 2007a, 2007c], when the water column has no net “gain” or “loss” of fluid to the sediments. It's the limiting condition when ambient groundwater discharge becomes negligible.
 The remainder of this paper focuses on the temperature in the groundwater and sediments, which is controlled by heat transfer between the water column and the sediments. The transfer is due to heat conduction, and to advection and dispersion, which are governed by the flow field created by current–bed form interaction and ambient groundwater discharge. Besides viewing the periodic temperature field at various times throughout a period, a useful way of summarizing the varying temperature over a period is through the application of a normalized-temperature amplitude,
where Tmax and Tmin are the temperature maximum and minimum, respectively, observed at a given point across a 24-hour period. A point with T* = 1 means that the entire temperature range of the diel forcing is observed at that given point, while a point with T* ∼ 0 is completely insensitive to the forcing. We first present temperature fields for losing conditions, followed by gaining conditions.
3.1. Losing Conditions: Sensitivity to Groundwater Discharge Magnitude
 Time snapshots of the temperature field and temperature amplitude, T*, are presented in Figure 3 for increasing strength of losing flux, qbas < 0. The time-space pattern of temperature is complex. When is there is little basal flux, the effects of the downward ambient discharge are negligible and the temperature distribution is similar to the neutral case when there is no basal flux (compare row 2 of Figure 3 to Figures 3 and 6 of Cardenas and Wilson [2007c]). When the basal flux is larger (rows 3–5, Figure 3), temperature variations penetrate into the sediments just below the downwelling zone on the stoss face. At the same time a zone of damped variations forms below the crest, owing to interfacial-exchange fluid that is returning to the water column (rows 3–5, Figure 3). For even higher basal flux the effects of current–bed form induced advection becomes less observable (row 7, Figure 3), and the temperature field becomes more one dimensional. For the flow and temperature fields to retain a two-dimensional character the current–bed form interaction must be strong enough to allow some of the downwelling water to return to the water column near the crest.
 Most previous studies of heat transport and fluid flow in the sediments below gaining and losing water bodies ignore heat advection due to current–bed form induced fluid flow. They approximate transport as vertically one-dimensional (see Stonestrom and Constantz  for examples). It is true that heat transport becomes essentially one-dimensional when it is dominated by conduction, say due to low permeability (see Cardenas and Wilson [2007c] for a sensitivity study). It also becomes almost one-dimensional when the ambient groundwater discharge is relatively very large, overwhelming interfacial exchange (row 7, Figure 3). However, between these extremes, interfacial exchange has an important influence on the thermal regime of sediments. Consider two examples. The first, in row 2 of Figure 3, has small ambient groundwater discharge, too small to significantly influence the temperature field. The flow field is dominated by the spatially variable head imposed on the sediment-water interface, where the variable head is taken from the turbulent flow model. This example also has a permeability value just above the threshold for which advection dominates the temperature field [Cardenas and Wilson, 2007c]. Compare it to row 1 of the Figure 3, which corresponds to a constant-in-space head boundary along the sediment-water interface, effectively ignoring current–bed form interaction driven flow. There is an observable difference. The second example is in row 5 of Figure 3 and has a high ambient groundwater discharge. Compare it to row 6 of the Figure 3, which again corresponds to a constant-in-space head boundary along the sediment-water interface, effectively ignoring current–bed form interaction driven flow. Once again, there is an observable difference. Ignoring current–bed form induced advection misses the two-dimensionality of the temperature field at both low and high groundwater discharge. The important difference is due to the upwelling of groundwater toward the crest which forms a zone of small-amplitude temperature variations. When current–bed form driven flow and advection are neglected so, too, are these zones and their influence.
3.2. Losing Conditions: Sensitivity to Reynolds Number and Permeability
 The flow field under losing conditions is a result of the competition between ambient-groundwater discharge and current–bed form induced fluid flow [Cardenas and Wilson, 2007b], as illustrated in Figure 4a. When the water column current increases, the Re increases. If we fix the basal flux, as we have done in Figure 4, when Re increases the head gradient along the sediment-water interface also increases until it dominates over the vertical head gradient associated with the downward basal flux [see Cardenas and Wilson, 2007b, Figure 7]. The impact of increasing Re, is not limited to changing the pattern of flow, but also directly affects the speed of flow and thus the rate of heat advection. Increasing Re increases head gradients along the sediment-water interface which in turn linearly increases seepage velocity, through Darcy's Law (2). Therefore increasing the Re (from left to right of Figure 4b) results in deeper penetration (less damping) of temperature amplitude.
 Increasing the permeability of sediments (indicated by going from top to bottom of Figure 4b) also results in deeper penetration of temperature amplitude. There is a threshold effect. The thermal regime of the sediments is sensitive to the flow field only when kp is high enough for advection to dominate over conduction. When kp is relatively low, the temperature field is similar to the conduction-only case [see Cardenas and Wilson, 2007c, Figure 3]. Row 1 in Figure 4b shows cases for which the temperature field is not affected significantly by the flow field across a broad range of Re. In this row kp = 1 × 10−10 m2, which is roughly equivalent to well-sorted medium to coarse sand [Bear, 1972]. When permeability is higher the temperature field becomes strongly dependent on the flow field, which is especially evident in rows 3 and 4 of Figure 4b. These high permeability values correspond to gravel [Bear, 1972]. Increasing Re and kp together takes us toward the simulations in the bottom right corner of Figure 4b. Here there is a bowl shaped zone of large temperature amplitude, centered below the area of downwelling, bordered horizontally by a narrow channel of upwelling water, moving toward the crest, with a much smaller temperature amplitude.
3.3. Gaining Conditions: Sensitivity to Groundwater Discharge Magnitude
 The effects of an upward ambient-groundwater discharge under gaining water column conditions are somewhat less complicated compared to the losing case (Figure 5). A relatively small magnitude of imposed basal flux (rows 2 and 3 in Figure 5) results in little difference in the temperature variation for the gaining case when compared to the neutral case. A further increase in groundwater discharge diminishes the extent of the interfacial exchange zone, also reducing penetration of heat pulses. Rows 4 and 5 in Figure 5 illustrate this, as well as the persistent importance of advection associated with current–bed form interaction even with a smaller interfacial-exchange zone. The upwelling near the crest still affects the thermal state of the sediments, manifested by a low-temperature-variation zone similar to the losing case. Further increases in qbas collapses the interfacial exchange zone [Cardenas and Wilson, 2007b] resulting in practically no transmission of the temperature variations from the water column to the sediments, with the average temperature of deep upwelling groundwater filling the entire space (row 7, Figure 5).
 The top row (row 1) of Figure 5 corresponds to a constant-in-space head boundary along the sediment-water interface, and effectively ignores current–bed form interaction driven flow. It can be compared to the simulation just below it (row 2), which has the same basal flux. Row 6 of Figure 5 is likewise the constant-head version of row 5. Comparing rows 1 with 2, and 5 with 6, once again illustrates the importance of accounting for current–bed form driven exchange for low and high rates of groundwater discharge, but this time for gaining conditions.
3.4. Gaining Conditions: Sensitivity to Reynolds Number and Permeability
 The hydrodynamics of gaining conditions are discussed by Cardenas and Wilson [2007b], where they illustrate remarkable similarities in the hydrodynamic and interfacial-exchange behavior of losing and gaining conditions. The thermal regime of sediments under losing and gaining conditions is likewise similar (compare Figures 4 and 6) . Figure 6a illustrates that when Re is low enough, interfacial exchange can be overpowered by the ambient-groundwater discharge, ultimately resulting in the absence of the interfacial exchange zone (not shown). As Re increases, with fixed basal flux, the head gradient along the sediment-water interface increases until it dominates over the vertical head gradient associated with the upward basal flux, thereby forming an interfacial exchange zone that in the limit at very high Re is similar to the case with no ambient upward flow (Figure 6a, right).
 Increasing the Re (from left to right of Figure 6b) results in deeper penetration of the diurnal temperature signals. Increasing the permeability of sediments (indicated by going from top to bottom of Figure 6b) similarly results in deeper penetration and less damping of temperature signals originating from the sediment-water interface. When kp is relatively low, heat transport is similar to the conduction-only case [see Cardenas and Wilson, 2007c, Figure 3]. For example, with kp = 1 × 10−10 m2 the first row of Figure 6b shows that even across a broad range of Re, the temperature field is not affected significantly by the flow field. At high kp, the temperature field becomes strongly dependent on the flow field (rows 3 and 4, Figure 6b). Up to kp = 1 × 10−9 m2, the thermal behavior of the sediments between gaining and losing conditions are the same (Figures 4 and 6). It is only at very high permeability values (kp = 5 × 10−9 m2), that differences emerge, primarily owing to differences in the flow field.
4. Ecological and Biogeochemical Implications
 Temperature is a primary variable for many of the physical, chemical and biological processes occurring in streams, lakes, estuaries and oceans, and their bottom sediments [Ward, 1985; Allen, 1995; Evans et al., 1998; Johnson, 2004]. Our simulations offer a view of the time-space distribution of biogeochemically and ecologically important flow and temperature fields in permeable-bottom sediments. The flow field must be influenced by current–bed form interaction, while the water column is either gaining or losing to groundwater, or is neutral. While we used dunes for the bed form, the results also provide a glimpse of what to expect for other sedimentary bed forms, like ripples, geomorphologic features like pool-riffle sequences, or other topographic features like coral or debris. Our results also suggest a path forward toward predictive modeling.
 Gaining systems provide thermal refugia for some organisms and affect fish spawning [e.g., Alexander and Caissie, 2003]. Our results suggest that, depending on the relative magnitude of current–bed form induced interfacial exchange and ambient-groundwater discharge, interfacial flow-driven advection of heat through sediments in both gaining (Figure 6) and losing systems (Figure 4) leads to significant heterogeneity of bottom-sediment temperatures. For example, streambeds where temperature-sensitive salmonid embryos are spawned have been inferred to be dominant heat sinks for streams due to interfacial exchange and upwelling of deep groundwater [Hannah et al., 2004]. Fish preferentially spawn in certain zones of a dune or other topographic feature, depending on which thermal regime is most favorable. Current–bed form induced flow and temperature heterogeneity likely influences the size and location of favorable spawning zones.
 Most biogeochemical processes occurring in permeable sediments, affecting both water column and pore water chemistry, are temperature-dependent [Westrich and Berner, 1998; Nimick et al., 2003]. Biogeochemical cycles are typically strongly correlated to diel cycles in temperature. For example, Kaplan and Bott  showed through experiments that the activity of sediment-attached bacteria is more sensitive to changes in temperature than to changes in water chemistry. Bacteria are responsible for cycling of nutrients and minerals through, for example, organic matter degradation, nitrogen and sulfur redox reactions [Fenchel et al., 1998], and by mediating weathering and diagenetic reactions [Berner and Berner, 1996]. Temperature dependence of these bacterially-mediated reactions is direct, through physiologic reactions [Fenchel et al., 1998], but also indirect, for example influencing whether bacteria are attached in abundance onto sediments. Moreover, McCaulou et al.  showed that bacteria motility is sensitive to temperature with increased removal from a sediment column at lower temperatures, opposite to predictions based on classical colloid-filtration theory. Penetration of diel temperature pulses into the sediments may therefore exert a significant role on bacterially mediated biogeochemical processes.
 Abiotic processes are also sensitive to diel-temperature variations. Trace-metal concentrations have been postulated to be primarily driven by temperature-sensitive abiotic sorption/desorption processes occurring in sediments [Machesky, 1990; Barrow, 1992; Nimick et al., 2003], while sorption kinetics for organic compounds are also temperature sensitive [Wu and Gschwend, 1986; Cornelissen et al., 1997; Kleinedam et al., 2004]. Since sorption is temperature dependent, the temporal variation of sorption/desorption processes in sediments and their effect on stream chemistry is directly controlled by the volume of sediments undergoing temperature shifts and the magnitude of those shifts.
 Our simulations provide an approach of determining both the volume and location of the sediments subjected to temperature shifts of different magnitude. Figure 4 suggests that under losing conditions, temperature variations may penetrate deep into the sediments while at the same time nearby flow back toward the water column allows for release of solutes within the sediment that are desorbed or dissolved owing to those variations. Figure 6 suggests that even under gaining conditions, discrete interfacial exchange zones within the sediments may be subjected to variable temperatures. The simulations also provide an approach for determining which sediments and water column flow conditions are most sensitive to temperature shifts. Under both gaining and losing conditions, the effects of diel temperature changes are most significant when both permeability of the sediments and water column Reynolds number are high. These influences are most important in high-velocity gravel bedded streams.
 Nutrient exchange between rivers and shallow aquifers is known to vary with temporal fluctuations of river discharge [Dahm et al., 1998]. What effect do temporal fluctuations of discharge, and also of stage, have on the exchange of thermal energy between rivers and sediments, and thus on biogeochemical reactions? Although this study is based on steady state assumptions it provides insight into possible temporal changes of sediment temperatures, provided that they are due to changing flow conditions involving a struggle between interfacial exchange and ambient-groundwater discharge. Changes in river stage alter the ambient head gradient between the river and aquifer, thereby changing the basal flux. Such changes are reflected in Figures 3 and 5. In fact, rivers may even switch from gaining to losing conditions owing to changes in stage. For example, the hydrodynamic and thermal conditions of the sediments may change from row 5 toward row 2 of Figure 3 owing to lowering of river stage, assuming that the average velocity in the river stays roughly the same. Further decreases may switch the water column to net gaining conditions which would then drive changes from Figure 3 to row 2 of Figure 5, then progressing toward row 7 of Figure 5 with a further drop in stage. Perhaps it is behavior like this that explains Brick and Moore's  suggestion that stream trace-metal diel cycles may be the result of temporal variations of groundwater influx. Stream-stage fluctuations are often accompanied by changes in discharge. This would be reflected by a change in the Reynolds number. Therefore hydrodynamic and thermal conditions would vary not only up and down the rows in Figures 3 and 5 but also across the columns of results presented in Figures 4 and 6. Of course, the potential dynamical scenarios are theoretical at this point, and we have not even mentioned the response time for these changes. Nevertheless, this analysis provides a foundation for understanding dynamic conditions until additional work is done on transient hydrodynamic and heat transport conditions. These simulation results simply constrain dynamical conceptual models and thought experiments. They also suggest that dynamic (stage and discharge) conditions will result in a complicated time-space thermal regime for the sediments, one that should be considered in biogeochemical and ecological studies.
 Many ecological and biogeochemical reactions in coupled water column and sediment systems are temperature sensitive. Yet there has been no thorough study of the thermal regime of bottom sediments under the combined influence of current–bed form driven fluid exchange and ambient-groundwater discharge. We conducted numerical simulations of coupled water column flow, porous flow, and porous-media thermal transport, in order to illustrate the hydrodynamical and thermal processes occurring in permeable-bottom sediments. Turbulent flow over dunes was simulated by solving the Reynolds-averaged Navier-Stokes (RANS) equations. The RANS-derived head solution along the sediment-water interface was imposed as a Dirichlet boundary for the Darcy flow model of the sediments. Gaining and losing water column conditions were imposed via a prescribed upward or downward flux boundary at the bottom of the sediments. Heat advection, conduction, and dispersion through the sediments were simulated on the basis of a Darcy groundwater-flow solution. The overlying water column was assumed to be thermally well mixed with a diel temperature signal. This signal, represented by a spatially constant, temporally sinusoidal Dirichlet temperature boundary along the sediment-water interface, provided thermal forcing of the sediments.
 Under losing conditions, small rates of ambient-groundwater discharge have no significant affect on the hydrodynamic and thermal conditions in the sediments. As the rate of ambient-groundwater discharge increases, diel-temperature variations penetrate deeper into the sediments. As long as the ambient-groundwater discharge is not too large, interfacial-exchange flow locally overpowers the ambient-downward flow of groundwater, circulating water and heat through the upper part of the sediments and discharging back toward the crest. This upwelling area is characterized by smaller temperature variations through time, while large variations are found near the adjacent downwelling zone below the stoss slope. Under gaining conditions the size of the interfacial exchange zone is diminished, resulting in the shallower penetration of heat pulses. When upward ambient-groundwater discharge is not too large and still allows the formation of an interfacial exchange zone, the temperature pattern is similar to the losing case. An area of low-temperature variations due to upwelling near the crest is found adjacent to a high-temperature variations area below the main downwelling zone. Whether gaining or losing, large-magnitude ambient-groundwater discharge leads to more-or-less vertical, one-dimensional advective heat transport.
 Increasing the water column Reynolds numbers allows for the formation of a larger interfacial-exchange zone, making it more important for heat transport through the sediments. Increasing the permeability of sediments further magnifies the importance of advection on the temperature field.
 The simulation results provide a means for making qualitative prediction of the thermal regime of sediments subjected to diel heat forcing but under various gaining or losing scenarios. This is important in determining when, where and by how much diel temperature signals in the water column are transmitted into the sediments subjected to ambient-groundwater discharge. Such information is crucial in determining potential impacts of diurnal temperature cycles on temperature-sensitive physical, ecological and biogeochemical processes occurring both in the sediments and in the water column.
 This research was funded by an American Geophysical Union Horton Research Grant and a New Mexico (NM) Water Resources Research Institute Student Grant awarded to M. B. C. M. B. C. was supported by the Frank E. Kottlowski Fellowship of the NM Bureau of Geology and Mineral Resources at the NM Institute of Mining and Technology throughout the duration of this study.