Response to Comments from Referee # 2

The authors present an extensive modelling study on the interplay between diurnal temperature effects and groundwater gradients on the dynamic evolution of the hyporheic zone in a river with a defined bedform topography. The hyporheic zone is a highly relevant transition zone controlling biogeochemical processes such as denitrification in streams (e.g., Gomez et al. (2015)). Therefore, the topic of the manuscript fits well with the scope of HESS.

4. There are also diel fluctuations in groundwater fluxes for several reasons (readers will know and agree) 5. Therefore, there are two dynamic processes affecting the hyporheic zone and they may potentially interact in rather non-linear ways. This is just an example but I suggest to pay due attention to this aspect because the authors claim (with good reasons) that hyporheic processes have wider implications. This means their paper should also be read by a wider audience in the hydrology and water resources management community. Accordingly, they should write the paper for such an audience and consider what to expect from such readers as starting points for presenting the arguments and results.
Response: Thank you for suggesting a very clear outline for modifying the text.
Indeed the ideas can be conveyed much more clearly with the suggested structure.
We modified L.55-58 following the suggested outline as below: River temperature often fluctuates with a clear daily cycle in response to the diurnal change in solar radiation (Caissie, 2006). This daily change in river temperature directly affects water viscosity and density, and subsequently the hydraulic conductivity of the sediment. As a consequence, hyporheic exchange rates often exhibit a diel fluctuation pattern due to the temperature-dependent hydraulic conductivity that governs the flow transport in the sediment. Wu et al. (2020) observe that hyporheic exchange fluxes inherit the daily-scale spectral signatures from river temperature fluctuations, and noticeably, however, these signatures are absent in river discharge of the studied site. This observation evidently indicates a strong control of the diel river temperature fluctuation on hyporheic exchange processes. However, the temperature-dependent diel rhythm of hyporheic exchange rates can be interfered by the daily groundwater table fluctuations due to evapotranspiration and anthropogenic pumping activities.
Therefore, understanding the two players, namely daily groundwater hydraulic gradient change (as a result of daily groundwater table fluctuations) and diel hydraulic conductivity change (as a result of diel river temperature fluctuation), is important to characterize dynamic hyporheic exchange processes.
Model description There are several aspects of the model and its set-up that are not fully satisfactory: 1. Model dimensions. Given that the authors have used a 2-D model (L. 81), the model domain has to have dimensions along the x-and z-axes. Please provide this information (e.g., in terms of λ). Please demonstrate as well that this model set-up is a meaningful representation for the case study that represents a given real situation.
Response: Thank you for this suggestion. The streamwise length and the depth of the modeling domain are L = 3λ and d gw = 5λ,respectively.(added in Line 83) To demonstrate if the model set-up is a meaningful representation, the following paragraph is added in section 4.5 "Study Limitation": The morphological setting of the model is dune with aspect ratio of 0.1 under subcritical flow conditions with a Froude number around 0.39 (Bridge, 2009;Dingman, 2009 Fig. 2. At that point, the panels b and c are rather confusing. Panel a is very generic, but on the lower panels real dates are given and it is not clear to the reader what these values on the x-axes mean and why the are chosen. It is also obscure what the temperature represents. It takes a lot of reading until one can make the link to the case study and the respective observations.

Response:
Thank you for pointing out this issue. The dates in x-axes were chosen randomly with the objective of presenting the difference between the in-phase and out-of-phase scenarios. Because the groundwater flux was conceptualized as uniform sinusoidal curve, plotting it for a long period would make these two scenarios hard to distinguish. After plot experimenting, 10-day time window is appropriate to preserve the difference between the two scenarios. To clarify the meaning of the x-axes, 3. Mass balance. From Fig. 2 (a), it follows that the water balance for the model domain is given by Q river−out (t) = Q river−in (t) + q b (t). Based on how the boundary conditions are defined however, the water flow in the river is independent on the groundwater fluxes imposed (the flow simply follows from the prescribed H s (t) (Eq. 2,3). Also the head distribution at the water-sediment interface is flux-independent. However, this distribution was derived from empirical observations Elliott & Brooks (1997) without considering gaining or losing situations. This seems to be adequate as long as U s (t) H s (t) >> q b (t) L domain with L domain being the length of model domain. Please i) provide the evidence that this holds true for the case study and the dimension of the model domain, and ii) make these aspect also clear in the discussion. Actually, this aspect seems to emphasis the importance of the findings: even small groundwater fluxes may have a pronounced influence on the hyporheic zone. This may be evident to the authors, but I missed that point in the context of the entire paper.
Response: This is a good point. We calculated the river discharge and groundwater discharge/recharge as the reviewer suggested. The results indicate that the river discharge is 4 orders of magnitude higher than the groundwater discharge/recharge ( Figure R1), suggesting that ignoring the impact of groundwater flow on the head distribution at the sediment-water interface is a reasonable simplification. To address this issue in the manuscript, the following sentences are added in the Discussion 4.5 "Study Limitation": In the present study, surface water flow is an independent system that is not affected by groundwater flows. However, in nature groundwater discharges into surface water under gaining conditions, and surface water recharges into groundwater under losing conditions. This simplification can only be used when groundwater discharge or recharge is significantly smaller than the river discharge. In our case, the groundwater discharge or recharge is at least 4 orders of magnitude lower than the river discharge. Therefore, this simplification has limited impact on the results.
The notable difference in the magnitude between groundwater discharge/recharge and river discharge also emphasizes the finding that even small groundwater fluxes may have a pronounced influence on the hyporheic zone. 4. Eq. 6a. I could not find an explanation for a 0 . It is tedious to go to previous publications and guess that a 0 = 1.

Response:
Thank you for pointing out this problem. The following sentence is added in Line 125: "the initial condition for the moments a 0 = 1,…" Only the infiltrating hyporheic fluxes show higher fluctuation amplitudes.
The figure below is the same as figure 5 in the manuscript but with simulated hyporheic fluxes using flow reverse ( Figure R2).
If strictly following the definitions from Triska et al. (1989) and Gooseff (2010), tracking HZs with flow reverse is not necessary for losing conditions. However, after some discussions we think that tracking HZs under losing conditions using flow reverse is more appropriate to identify the areas with the largest influence from the surface water. Therefore, we added more details for tracking HZ under losing conditions in the method section (Line 136): With this condition, the threshold C ≥ 0.9C s will be eventually exceeded across the entire domain under losing conditions. Therefore, hyporheic Figure R2: This is the same figure as Figure 5 in the manuscript but with simulations using flow reverse.
zone is tracked using reversed Darcy flow in order to identify the areas with the largest influence from the surface water under losing conditions. Additionally, the Figure 5 will be replaced with the simulations results using reversed flow field as shown here in Figure R2.

Description of the case study
This description is very superficial and has to be improved substantially.
1. Site identification and description Please provide more information on the site including the location and name. It is not necessary that every interested reader has to check the USGS website. Describe some key characteristics of the climate and hydrology of the catchment and the measuring site (altitude, mean discharge etc.). This is important to put the findings in a proper context.
It is also essential to know which observation period was used for the simulations.
One learns only at a later stage (e.g., from Fig. 3a) that three hydrological years seem to have been used.
Response: Thank you for this suggestion. The following site description is added in Line 139: We use the observed river discharge and temperature measurements from USGS gauging station in Spring Branch Creek at Holke Road in Independence, Missouri (ID: 06893970, Lat 39°05'18", Long 94°20'36" referenced to North American Datum of 1927 On L. 160, the amplitude of groundwater flux changes are linked to a range of the groundwater table fluctuations. Although a reference is provided, this is not sufficient. Boano et al. (2008) presents a general framework for linking streamgroundwater interactions and the influence on the hyporheic zone, but not any site-specific information for this case study. Describe the approach including the equations used and the model assumptions. In this context, it would be also useful to provide evidence that this assumed water table fluctuation is also reasonable for a hypothetical groundwater pumping operation.
Response: Thank you for the suggestion. The following paragraphs are added at the end of the section "Study Scenarios": Boano et al. (2008)  Result section: This section contains a lot of material (which is positive) but the way of presenting needs improvement. The more so because not all of the necessary results seem to be shown so far.
1. Structure One of the key messages of the manuscript is that there is an intricate interplay between the temperature regime, the flow regime of the stream and the water table fluctuations in the aquifer that needs to be understood. To be able to understand this, one has to get an overview about the general conditions prevaling at the study site during the period of interest. Therefore, I suggest to start with a short description of the key features of the three hydrological years.
Subsequently, it helps the reader if the complexity is increased in a stepwise fashion. Therefore, I would first describe the results for the neutral conditions, then the losing conditions and finally the gaining conditions. Furthermore, I suggest to use explanations such as on L. 277 -279 to frame the result section in a way that is intuitive also to the non-specialist reader.
Response: This is a good suggestion for describing and organizing results with increasing complexity. The results section is re-organized following  Fig. 3a). The diel fluctuations of exfiltrating hyporheic fluxes (the orange solid line in Fig. 3e and 3f) follow the diel river temperature fluctuations (the red solid line in Fig. 3e and 3f).

Fig. 3a) present similar temporal variations as infiltrating hyporheic fluxes (the black dotdash line in
In winter, when the river temperature (the red solid line in Fig. 3e) is relatively stable (around Jan 20), the exfiltrating hyporheic fluxes also have negligible daily fluctuations; when temperature gets higher, the exfiltrating hyporheic fluxes start to fluctuate following the diel fluctuations of river temperature.

under Gaining Conditions
Compared to neutral condition, groundwater upwelling leads to an  Fig. 3e and 3f) and out-of-phase (the blue line in Fig. 3e and 3f)  To explore the impact of groundwater  Fig. 2b).
With the reduced groundwater upwelling amplitudes, the amplitudes of exfiltrating hyporheic flux fluctuations are also reduced (Fig. 4a)

under Losing Conditions
Differing from the gaining conditions, under losing conditions, the fluctuation amplitudes of exfiltrating hyporheic fluxes have not substantially increased compared with infiltrating hyporheic fluxes (Fig.   5a). This is also revealed in the frequency domain where the spectral power is similar between infiltrating and exfiltrating hyporheic fluxes across all temporal scales (Fig. 5b).
The river temperature also demonstrates different impacts under losing conditions. In winter, when the river temperature (the red solid line in (c) The time scales of denitrification. First, the description of how τ HZ was parameterised is insufficient. Which quantiles in Gomez et al. (2015) do you refer to? Second, denitrification depends very much on temperature (e.g., Boulêtreau et al. (2012)). This implies that τ dn is not constant. Given that the manuscript deals with temperature as a key influencing factor, it would seem logic to consider such a temperature dependence also for τ dn . At least one could test the sensitivity of RSF against the temperature dependence of denitrification.
Response: Thank you for these suggestions. Firstly, to better present the values of τ dn we will add the following figure in the supplementary information to show the quantiles of the characteristic time scales for denitrification.  (2014) and Gomez-Velez et al. (2015)) The second suggestion is also a good point. We add the following text to clarify in the manuscript in Line 371: The Detailed comments: L. 18 -19: Why is this understanding key to water resources management? There are many aspects relevant for water management (land use management, hydropower generation schemes etc.). Please be more specific for aspects this understanding is key and why.
Response: Thank you for this question. This sentence is rephrased as below: Understanding the spatiotemporal variability of hyporheic exchange processes is key to characterizing the nutrient cycling and river ecosystem functioning (Lewandowski et al., 2019)    One option could be to show the respective difference plots and to add difference plots for the fluxes.
Response: Thank you for pointing out this issue. We will remove this figure and add a GIF figure in the supplementary information to better present the differences in the heat transport dynamics under different hydrologic conditions.