{'fraction_non_alphanumeric': 0.03638199411022297, 'fraction_numerical': 0.019907446360959192, 'mean_word_length': 4.896606469537606, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Supply, Demand, and In-Stream Retention of Dissolved Organic Carbon and Nitrate During Storms in Mediterranean Forested Headwater Streams

The capacity of headwater streams to transform and retain organic matter and nutrients during base flow conditions has been largely demonstrated in the literature. Yet, most solute export occurs during storms, and thus, it becomes essential to understand the role of in-stream processes on regulating solute concentrations and exports during storm flow conditions. In this study, we explored patterns of solute supply, solute demand, and resulting in-stream solute retention for a number of individual storms from two Mediterranean streams (intermittent and perennial) that together encompassed a wide range of hydrological conditions. Our results indicate that >70% of the individual storms were chemodynamic (i.e. solute concentrations either increased or decreased with increasing discharge) at the two sites and for both dissolved organic carbon (DOC) and nitrate (NO3-). At the perennial stream, DOC and NO3- concentrations did not show any clear pattern of storm response during both dry and wet periods, though deviations from chemostasis were generally larger for those events showing higher concentrations during storm flow. At the intermittent stream, DOC and NO3- showed positive divergences from chemostasis during the wet period. In this site, DOC showed no clear pattern of storm response during the dry period, while many storms showed low NO3- concentrations compared to chemostasis, suggesting either limited NO3- sources or in-stream retention. At the two streams, in-stream biogeochemical demand during individual storms was either similar or higher than during base flow conditions for both DOC and NO3-. In-stream NO3- demand resulted in substantial whole-reach retention during storms (up to 40%), indicating that in-stream biogeochemical processes substantially reduced downstream flux of terrestrial NO3- inputs during storm events. Conversely, whole-reach DOC retention was relatively low during storms (< 10%), suggesting little ability to regulate DOC export and an energy subsidy to downstream ecosystems during storms. This study indicates that in-stream biogeochemical demand during storms can counterbalance solute supply to some extent, and stresses the importance of considering the potential role of in-stream processes on shaping stream solute export during storms.

The capacity of headwater streams to transform and retain organic matter and nutrients during base flow conditions has been largely demonstrated in the literature. Yet, most solute exporting occurs during storms, and thus, it becomes essential to understand the role of in-stream processes in regulating solute concentrations and exports during storm flow conditions. In this study, we explored patterns of solute supply, solute demand, and resulting in-stream solute retention for a number of individual storms from two Mediterranean streams (intermittent and perennial) that together encompassed a wide range of hydrological conditions. Our results indicate that more than 70% of the individual storms were chemodynamic (i.e., solute concentrations either increased or decreased with increasing discharge) at the two sites, for both dissolved organic carbon (DOC) and nitrate (NO − 3 ). At the perennial stream, DOC and NO − 3 concentrations did not show any clear pattern of storm response during both dry and wet periods, though deviations from chemostasis were generally larger for those events showing higher concentrations during storm flow. At the intermittent stream, DOC and NO − 3 showed positive divergences from chemostasis during the wet period. In this site, DOC showed no clear pattern of storm response during the dry period, while many storms showed low NO − 3 concentrations compared to chemostasis, suggesting either limited NO − 3 sources or in-stream retention. At the two streams, in-stream biogeochemical demand during individual storms was either similar or higher than during base flow conditions for both DOC and NO − 3 . In-stream NO − 3 demand resulted in substantial whole-reach retention during storms (up to 40%), indicating that in-stream biogeochemical processes substantially reduced downstream flux of terrestrial NO − 3 inputs during storm events. Conversely, wholereach DOC retention was relatively low (<10%), suggesting little ability to regulate DOC export and an energy subsidy to downstream ecosystems during storms.

INTRODUCTION
Headwater streams are important water sources for downstream sections of streams and rivers, and account for most of the length of fluvial networks (Alexander et al., 2007). Headwater streams are considered biogeochemical reactors within catchments because of their ability to transform and retain organic matter and nutrients from terrestrial ecosystems (Peterson et al., 2001;Bernhardt et al., 2005). This is an essential feature of freshwater ecosystems that helps to maintain and improve water quality, and thus, preserves ecosystem and human health (Abbott et al., 2018). However, our knowledge of the factors driving stream water chemistry in headwater streams is still limited (Bishop et al., 2008). Evidence is growing that the biogeochemical processing capacity of headwater streams can play a large role in shaping carbon (C) and nitrogen (N) cycles at regional and larger scales (Cole et al., 2007;Battin et al., 2008;Wollheim et al., 2008;Moatar et al., 2017). Thus, understanding in-stream biogeochemical processes across different hydrological conditions, including storm flows, is important for assessing the potential of headwater streams to shape C and N fluxes, as well as for protecting and restoring aquatic ecosystems.
The potential of stream biogeochemical processes to remove solutes from the water column can be assessed by conducting in situ slug or constant rate solute additions. These experiments allow estimating microbial C consumption and gross N uptake during base flow conditions and suggest high in-stream biogeochemical reactivity (Ensign and Doyle, 2006;Tank et al., 2008;Mineau et al., 2016;Marcé et al., 2018). A common assumption is that similar biogeochemical processing rates may occur during storm flows (e.g., Wollheim et al., 2018). Yet, this idea is difficult to confirm because these field methods cannot be implemented at high flows (Doyle, 2005). Published studies report contradictory results, which further limits our ability to understand the potential of stream biota to process bioreactive solutes during storm flow conditions. Some studies suggest that the influence of in-stream biogeochemical processes on C and nitrate (NO − 3 ) export decreases with increasing stream discharge (Ejarque et al., 2017;Moatar et al., 2017). This pattern can be explained by the predominance of advective transport and the decrease of water residence time within transient storage zones (Doyle, 2005;Covino, 2017), or as a consequence of stream biofilm damage (Fisher et al., 1982;Martí et al., 1997;Bernhardt et al., 2018), which could decrease in-stream biogeochemical processing rates for both dissolved organic carbon (DOC) and NO − 3 . Alternatively, in-stream rates could stay the same during storm flow conditions, but whole-reach solute retention could drop down as a consequence of increased supply (Wollheim et al., 2018). Other studies show that in-stream NO − 3 processing rates hold or even increase during high snowmelt flows and moderate storms because of increases in the availability of limiting elements and stream-hyporheic exchange resulting in relatively high whole-reach NO − 3 retention (Hall et al., 2009;Wollheim et al., 2017). The composition of dissolved organic carbon (DOC) may also shift toward compounds that are more bioreactive during storms, compared to baseflow conditions, which can stimulate in-stream heterotrophic activity (e.g., Pellerin et al., 2012;Wilson et al., 2013). In this sense, Raymond et al. (2016) proposed that the transport distance of dissolved organic compounds will increase with storm magnitude, but decrease with increasing organic matter lability, implying that in-stream processing can play a role in shaping DOC concentrations and loads during relatively high flows. Therefore, biological demand for DOC and NO − 3 could differ between base flow and storm flow conditions, though on different directions, as a consequence of the different mechanisms involved.
Climate and antecedent moisture conditions can have a strong influence on the hydrological and biogeochemical response of catchments to precipitation events. When fluvial networks are hydrologically disconnected from uplands, C and nutrient supply from terrestrial sources is limited and elements can become exhausted during storms (Bernal et al., 2013). On the other hand, catchment sources previously disconnected from the stream can supply solutes when hydrological connectivity is high (Creed et al., 2015;Covino, 2017). Thus, differences in hydrological connectivity can induce changes in concentration-discharge patterns during storms, resulting from either a decrease (e.g., solute exhaustion) or increase (e.g., solute surplus) in concentration with increasing discharge (Creed et al., 2015;Moatar et al., 2017). Although concentration-discharge patterns are typically interpreted from a hydrological perspective, recent studies indicate that in-stream processes can also induce divergences from chemostasis (i.e., no change in concentrations with discharge; Moatar et al., 2017). The possibility that in-stream processes influence solute concentrations and fluxes during storms to some extent, can have large implications when computing biogeochemical processes along the land-ocean continuum. Yet, the potential role of in-stream processes during storms has been largely neglected in the literature, and there are almost no studies quantifying in-stream retention during storm flow conditions (but see Ejarque et al., 2017;Wollheim et al., 2017).
We propose that streams can process solutes during storms, though in-stream solute retention declines gradually as stream discharge increases, and thus, differs between storms of different magnitudes. This differential response could result from gradual increases in solute supply and/or as a consequence of changes in biological processing rates during and between storms. The dynamic role of aquatic processes is a cornerstone of the river network saturation concept (Wollheim et al., 2018), which states that the potential for solute retention in fluvial networks is the balance between supply from terrestrial sources and biogeochemical demand by stream ecosystems. Briefly, supply and demand are expected to be closely coupled under low flow conditions and to decouple, with supply exceeding demand, as discharge increases. The objective of this study was to quantify solute supply and biogeochemical demand during individual storms and explore whether imbalances between the two could contribute to the emergence of divergences from chemostasis. Supply of DOC and NO − 3 was estimated by monitoring upstream and riparian groundwater sources, while in-stream biogeochemical demand was inferred by applying empirical relationships between water residence time and solute uptake processing rates. A central aspect of this study is that we explored event-scale solute loads for a continuum of storm sizes monitored in two contrasting forested headwater streams: Fuirosos, an intermittent stream showing little hydrological connection to uplands during the dry period (Bernal et al., 2006), and Font del Regàs, a perennial stream hydrologically connected to uplands throughout the year (Lupon et al., 2016). These two streams together encompass a wide range of hydrological conditions and provide a suite of supply vs. demand scenarios for testing how event-scale solute export dynamics vary during storm events of different magnitude and under contrasting hydrological connectivity scenarios.

Study Site
Fuirosos (intermittent) and Font del Regàs (perennial) are 3rd order streams (sensu Strahler, 1952), composed mostly by sands and gravels. The two streams have similar drainage areas (10-14 km 2 ) and are fed by groundwater inputs. During the warmer months, the streams are mostly fed by groundwater springs located at the uppermost part of the catchment. The catchments are mostly forested (>85%) with minimal human perturbation (<5 ind/km 2 ). At the valley bottom, the two streams have a well-developed riparian zone that occupies ∼6% of the catchment area. Despite the proximity of the two catchments (<12 km apart), they exhibit contrasting climatic and vegetation characteristics as a consequence of differences in altitude, which lead to contrasting hydrological regimes and degrees of catchment hydrological connectivity.
The Fuirosos catchment (10.6 km 2 ) is located in the Montnegre-Corredor Natural Park, NE Spain (41 • 42 ′ N, 2 • 34 ′ , 50-770 m a.s.l.). The climate is typically Mediterranean, with temperatures ranging from a monthly mean of 3 • C in January to 24 • C in August. Average annual precipitation is 750 mm. The catchment is mainly underlain by granite, and it has an identifiable alluvial zone (50-130 m width) at the valley bottom. The hillslope soils are poorly developed, with a very thin organic O-horizon, or more frequently an Ao-horizon, that becomes Bhorizon in < 5-cm depth. The riparian soils are sandy with low organic matter content (3-6% in the first 10 cm; Bernal et al., 2006). The catchment is mainly covered by perennial forests (Quercus suber, Quercus ilex, Pinus pinea, and Pinus halepensis). The riparian forest (10-20 m width) is composed of Alnus glutinosa and Platanus acerifolia. Streamflow at the Fuirosos stream and all its effluents is intermittent. Stream flow stops in summer for several weeks, and then resumes during autumn storm events. The coefficient of variation of daily stream flows (CV Q ) equals 7.1 which corresponds to extremely erratic flow regimes based on the classification proposed by Botter et al. (2013). During the hydrological transition from dry-towet conditions, stream water infiltrates into the riparian zone (up to 20 m day −1 , Butturini et al., 2003). The Fuirosos stream loses water toward the riparian zone until November and then tends to gain water from groundwater sources until early summer (Butturini et al., 2003). The riparian groundwater level is typically >2 m below the soil surface, far down from surficial organic soil layers that are only reached during exceptionally large storms (Butturini et al., 2003). Average discharge during base flow conditions is 7 L s −1 , while mean wetted width and water velocity are 4.5 m and 0.2 m s −1 , respectively.  (Lupon et al., 2016). The riparian soils are sandy-loam with a low organic matter content (10-12% in the first 10 cm; Lupon et al., 2016). The catchment is mainly covered by Quercus ilex and Fagus sylvatica. The riparian forest (5-25 m width) is composed mostly by A. glutinosa, Robinia pseudoacacia, Platanus hybrid, and Fraxinus excelsior. The Font del Regàs stream has a permanent flow, though some of its smaller tributaries can dry up in the summer. The flow regime is persistent (CV Q = 1.1) according to Botter et al. (2013). The stream gains water from groundwater sources from October to May, while it loses water toward the riparian zone during the vegetative period. Riparian groundwater typically flows 0.5 below the soil surface, though it can reach surface organic soil layers during storms (Bernal et al., 2015). Average discharge during base flow conditions is 62 L s −1 , mean wetted width and water velocity are 2.7 m and 0.35 m s −1 , respectively (Lupon et al., 2016).

Field Sampling and Laboratory Analyses
For this study, we analyzed stream discharge and water chemistry obtained for >80 storms at Fuirosos (period 1998-2002) and Font del Regàs (period 2011-2012. At each study site, we selected a stream reach of ca 1.2 km long with minimal influence of tributaries during base flow conditions. We identified two sampling stations, at the top and the bottom of each reach, from where stream data was collected (see below). At Fuirosos, the top and bottom sampling sites drained 3 and 10.6 km 2 , respectively. At Font del Regàs, the sampling site at the top drained 8.5 km 2 , while the one at the bottom drained 13 km 2 . Air temperature and precipitation were recorded at 30 min intervals by installing automatic meteorological stations at the valley bottom of each catchment during the study period (Bernal et al., 2006;Lupon et al., 2016). At each study site (n = 4), the stream water level was recorded at 30 min intervals using water pressure sensors (Campbell © CR10X and Teledyne ISCO Model 1612 for Fuirosos and Font del Regàs, respectively). An empirical relationship between the discharge and stream water level was obtained at each site using the "slug" chloride addition method in the field (Gordon et al., 2004). The goodness of fit of the rating curves was strong at the two study sites, Fuirosos (r 2 = 0.91, d.f. = 23, p < 0.001) and Font del Regàs (r 2 = 0.98, d.f. = 65, p < 0.001). We calculated stream water velocity (v, in m s −1 ) from each obtained breakthrough curve to assess the relationship between discharge and v (n = 36 and 30 for Fuirosos and Font del Regàs, respectively; Bernal et al., 2004;Lupon et al., 2016).
At the Fuirosos stream, automatic samplers were programmed to start sampling at an increment in stream water levels of 2-3 cm and water samples were collected at hourly and sub-hourly intervals during storm flow conditions. We grabbed samples during base flow conditions at least once every 10 days (except during the cessation of flow in summer). The same procedure was followed at the top sampling station, starting in July 2000. In total, we monitored 56 storms at the bottom sampling station and 21 at the station located at the top of the reach. For each individual storm, we collected between six and 26 stream water samples through the entire hydrograph. The success was larger at the bottom station because increases in water levels during storm events were easier to anticipate and the site location favored the lifetime of the ISCO battery. At the Font del Regàs stream, the two automatic samplers were programmed to sample water twice a day (12:00 a.m. and 12:00 p.m.) during 2011, and once a day (12:00 p.m.) during 2012. Therefore, stream water chemistry for individual storms at Font del Regàs was usually characterized from two to four stream water samples. This sampling strategy resulted in a collection of a lower number of samples during the storm hydrograph compared to Fuirosos, but warranted the monitoring of the same number of storm events at the top and bottom sites.
To characterize riparian groundwater chemistry, we collected groundwater samples every 2 weeks for a 2-year period at each study site. At the two sites, piezometers were PVC tubes uniformly perforated approximately along their final 100 cm that were installed to a depth of 1.5-2 m. Collected samples integrated riparian groundwater from 0.5 to 1.7 m below the soil surface. At Fuirosos, riparian groundwater was collected from a set of six piezometers located ca. 10 m from the stream channel at the bottom sampling station (period 2000(period -2002(period , Butturini et al., 2003. At Font del Regàs, riparian groundwater was collected from a set of seven piezometers located 3 m from the stream (period 2010-2012, Lupon et al., 2016).
All water samples were filtered through pre-ashed GF/F glass fiber filters and stored at 4 • C until analyzed (usually in <7 days). Dissolved organic carbon was analyzed using a hightemperature catalytic oxidation (Shimadzu R TOC analyzer) after acidification and sparging to remove inorganic carbon. Nitrate was measured colorimetrically with a Technicon-Autoanalyser (Technicon, 1976) by the Griess-Ilosvay method after reduction by percolation through a copperized cadmium column (Keeney and Nelson, 1982). Analytical precision was 0.085 mg C L −1 for DOC and 0.007 mg N L −1 for NO − 3 .

Hydrological Characterization of Individual Storms
For each individual storm, we calculated the total amount of precipitation (P, in mm), water export (Q, in mm), and the runoff coefficient (RC, in %). Q was calculated by linearly interpolating stream discharge (in L s −1 ) between recorded measurements, summing up values for the whole duration of the storm hydrograph (D, in sec), and referring the total amount of water to the corresponding drainage area. D was the difference between the start and the end of the hydrograph, which were determined graphically based on the constant slope method (McCuen, 2004). The RC was the ratio between Q and P multiplied by 100 (Table S1).
For each individual storm, we also estimated the mean residence time of water in each study reach (τ , in days). This variable was used to estimate in-stream retention during storm events (see below). The τ was calculated by dividing reach length (1,161 and 1,200 m for Fuirosos and Font del Regàs, respectively) by weighted stream water velocity (v, in m s −1 ), which was estimated from weighted stream discharge (Q, in m 3 s −1 ).Q was calculated by dividing the total amount of water flux during a given storm (in m 3 ) by D. For estimatingv fromQ, we applied the empirical scaling law obtained between water velocity and discharge from chloride slug additions conducted at each study site (Bernal et al., 2004;Lupon et al., 2016).

Stream Export of DOC and Nitrate During Individual Storms
For the two streams, we calculated DOC and NO − 3 export (E, in kg) for each storm by multiplying concentration and discharge. Instantaneous solute concentrations were estimated by linear interpolation of measured solute concentrations (Bernal et al., 2002). Stream solute export for individual storms was calculated by linearly interpolating instantaneous solute export and summing up values for the duration of the storm. The same calculations were done for the sampling stations at the top and at the bottom of the study reaches. Given that stream water samples were collected only once or twice per day at Font del Regàs, we conducted a simple exercise in order to quantify the potential loss of accuracy associated with the low number of samples collected during individual storms at Font del Regàs compared to Fuirosos. For a subset of Fuirosos' s individual storms (5 from the dry, and 5 from the wet period), we calculated DOC and NO − 3 export during the storm hydrograph considering (i) all available stream water samples, and (ii) only one water sample per day (the one closest to 12:00 p.m.). On average, differences in event-scale solute export between the two approaches were <7%. Mean differences were as low as 3% for storms occurring during the wet period and increased to 12% for the dry period. Therefore, we are confident that results from the two study sites were comparable because differences in the adopted sampling strategies had a relatively small influence on the calculation of solute exports.
To explore divergences from chemostasis, we estimated the expected stream DOC and NO − 3 fluxes at the bottom sampling station if the catchment would behave as pure chemostat (i.e., no changes in solute concentration despite changes in discharge; Moatar et al., 2017). Chemostatic responses imply that solute export will change linearly with stream discharge (Musolff et al., 2017). To do so, we calculated volume-weighted concentration (Ĉ, in mg L −1 ) for each storm event and solute by dividing E by total water export. For each sampling site, the median value ofĈ for all recorded storms was considered as the most likely solute concentration in a pure chemostatic scenario and was then used to estimate expected DOC and NO − 3 fluxes if concentrations would remain invariant with increases in water export. The 40th and 60th percentiles ofĈ were used to calculate the lower and upper limit of expected DOC and NO − 3 fluxes. By using the median value ofĈ, we assume that catchments act as chemostats. Therefore, we might be underestimating to some extend hydrological and biogeochemical processes that could contribute to lower solute concentrations during storms.
For each stream, we counted the number of individual storms that fall above, below, and within the 1:1 line (i.e., pure chemostasis). The individual storms falling outside of the 1:1 line were considered to show a chemodynamic response (i.e., solute concentrations change with discharge; Moatar et al., 2017). Moreover, divergences from chemostasis were assessed by calculating the relative bias (RB) from expected solute fluxes (i.e., chemostatic scenario) as follows: where n is the number of samples (in this case, number of individual storms), E the average export for the solute j, and E and E the expected and measured fluxes, respectively (Zar, 2010). Note that RB integrates all individual storms, which are pooled together. Positive biases (RB > 0) indicate that the sum of measured solute fluxes is higher than expected from pure chemostasis. This pattern was interpreted as an indication that solute export was transport limited (Figure 1), and thus, RB > 0 will point toward the existence of additional catchment sources contributing to solute export during storms (Butturini et al., 2008;Creed et al., 2015;Moatar et al., 2017). Negative biases (RB < 0) indicate that the sum of measured fluxes is lower than expected from pure chemostasis. This pattern is typically attributed to source limitation within the catchment (i.e., solute exhaustion in water sources contributing to runoff; Creed et al., 2015;Fovet et al., 2018). Alternatively, RB < 0 could result from in-stream processes such as DOC consumption or nitrate uptake during storms which could also lead to lower solute export than expected from pure chemostasis (Moatar et al., 2017).

In-Stream Net Uptake of DOC and Nitrate During Individual Storms
To assess the potential contribution of in-stream processes to divergences between measured and expected solute export, we estimated the proportion of solute removal at whole-reach scale (R, expressed as a %) by applying principles derived from nutrient spiraling theory. For each individual storm, R was calculated FIGURE 1 | Schematic illustration indicating the pure chemostatic behavior (solid line) for which solute concentration does not change with increasing discharge. In this scenario, changes in solute export are proportional to increases in water export. Divergences above the line represent the transport-limited scenario for which stream solute concentration increases with increasing discharge. This pattern emerges as additional sources get hydrologically connected within the catchment and solutes are flushed toward the stream. Near-and in-stream biological demand may occur but could be exceed by solute supply. Divergences below the line correspond to the solute-limited scenario for which solute concentration decreases with increasing discharge. This pattern can emerge when solute sources within the catchment become exhausted, solute are taken up by biota, or both. In this case, near-and in-stream biological demand could exceed supply.
following Wollheim (2016): where U is areal uptake (in kg of C or N m −2 min −1 ), w is mean width (in m), l is reach length (m), D is storm event duration (in min), and E up and E gw are the solute flux entering into the reach from the top sampling station and groundwater sources, respectively. The numerator represents the biogeochemical demand for a given solute, while the denominator represents the supply (i.e., solute export; Wollheim, 2016). For each individual storm, U was estimated following (Stream Solute Workshop, 1990): were k is time specific uptake rate (in day −1 ) andv,Q, andĈ are weighted stream water velocity (in m s −1 ), stream discharge (in L s −1 ), and stream concentration (in mg L −1 ) measured at the bottom station. We assumed that w was not changing with discharge because the stream channels were quite narrow and constrained. Yet, we acknowledge that by doing that, we might be overestimating U especially during the most extreme events. For both DOC and NO − 3 , k was estimated from τ using the general empirical relationships reported in the literature which encompass a wide range of aquatic ecosystems and expand across several orders of magnitude: k DOC = 0.16 τ −0.95 (Middelburg, 1989) and k NO3 = 0.63 τ −0.86 (Cheng and Basu, 2017). The use of general empirical relationships implies some degree of uncertainty. Yet, we consider that inferring k with an approach independent of our data set is advantageous because it allows estimating in-stream biogeochemical uptake rates per se, without interferences associated with hydrological retention that could result on solute export declines unrelated to stream biological demand. An upper and lower limit of U was calculated by considering a 20% variation in k DOC and k NO3 .
Finally, to estimate solute supply from riparian groundwater, we calculated the difference in Q between the bottom and top sampling stations (∆Q) for each individual storm event.
When ∆Q < 0 m 3 , we assumed that groundwater inputs to the study reach were minimal (E gw = 0 kg). When ∆Q > 0 m 3 , we estimated E gw by multiplying ∆Q and groundwater concentration (C gw , in mg L −1 ). By doing that, we assumed that lateral groundwater inputs were responsible for the majority of increases in stream discharge. Yet, water inputs from ephemeral tributaries cannot be rule out, especially during the largest storm events. For the two sites, we used mean monthly values of groundwater DOC and NO − 3 concentrations. An upper and lower limit of E gw was calculated by considering a 20% variation in mean monthly solute concentrations.
The calculation of a characteristic R by storm event is a simplification of the temporal variability that both solute demand and supply likely experience during the evolution of storms. Solute uptake rates could vary as a consequence of differences in τ , which would lead to different solute demand between the rising and falling limbs of the hydrograph. Yet, the estimation of a characteristic U by storm event allowed us to approximate in-stream DOC and NO − 3 demand during events of different magnitude in a relatively simple way, which was a necessary step to estimate in-stream retention. C gw could also change during storms, especially when groundwater level reaches superficial soil layers and/or when superficial overland flow is activated. Notably, the possibility to calculate E gw from in situ measured groundwater concentrations is an added value of this study given that most of the studies calculating solute retention at wholereach or even at fluvial network scale rarely measure groundwater inputs (e.g., Tiwari et al., 2014). Nevertheless, the uncertainty in our calculations is constrained by the fact that changes in DOC and nutrient concentrations during storms are usually orders of magnitude lower than changes in stream discharge .
In order to better understand changes in in-stream solute uptake and retention between base flow and storm flow conditions, the same calculations were done for days with no storm flow. For each stream, we selected 1 day for which we measured stream DOC and NO − 3 concentrations within the previous week of each individual storm. Then, we calculated U and R following the procedure described above. To ensure that these calculations were not influenced by previous storm events, we avoid those days laying between storms separated by <7 days.

Data Analysis
We tested whether storm responses varied with the degree of hydrological connectivity, by splitting the data set in two groups (dry and wet) based on previous knowledge gained at the two study sites. At Fuirosos (intermittent stream), the dry period comprised of individual storms occurring from September to November, when water resumed after the summer drought but the stream still lost water toward the riparian zone (i.e., ∆Q < 0 m 3 ; Butturini et al., 2003). Storm events in June were also included in the dry period because the reach was mostly losing water toward the riparian zone. At Font del Regàs, the dry period comprised of individual storms occurring from late May to October when this reach was mostly losing water toward the riparian zone (Lupon et al., 2016).
We used Wilcoxon tests to explore whether the studied hydrological, chemical, and biogeochemical variables differed between the intermittent and perennial streams. For each site, Wilcoxon tests were also applied to investigate whether differences in the studied variables were statistically significant between dry and wet periods, and also between base flow and storm flow conditions. Regression models both linear and power were used to explore the relationship between water and solute fluxes. We used analysis of variance (ANOVA) to test the statistical significance of the regression models (Zar, 2010). All statistical analyses were performed with JMP 5.0 software.
Differences in stream solute concentrations between storms occurring during the dry and wet periods were not consistent between the two streams. For DOC, differences inĈ between dry and wet periods were no statistically significant at any of the two streams ( Table 1). For NO − 3 , individual storms at the intermittent stream had lowerĈ during the dry period compared to the wet period, while no differences were observed at the perennial stream (Table 1).
Riparian groundwater solute concentrations were similar between the two sites. Median monthly concentrations were 1.13  For each stream and variable, different letters indicate statistically significant differences between the two periods (Wilcoxon test, p < 0.05).

Hydrological Characterization of Storms
In total, we monitored 83 individual storms (56 at the intermittent stream and 27 at the perennial stream) that encompassed precipitation events (P) ranging from 5 to 153 mm per storm (Table S2). Individual storms showed no statistically significant differences in P and RC between the intermittent and perennial streams (in the two cases: p > 0.05). Storms showed lowerQ at the intermittent than at the perennial stream (p < 0.0001; Table 2). Storms lasted longer at the intermittent than the perennial one (p = 0.0063), whilev was lower at the former than at the latter (p < 0.0001). The τ was higher at the intermittent than at the perennial stream (p < 0.0001; Table 2).
The two streams showed differences in storm hydrological characteristics between dry and wet periods. Individual storms had lowerQ, lowerv, and higher τ during the dry period compared to the wet period. This pattern was consistent at the two study sites. In contrast, D was similar between the two periods at the two streams ( Table 2).
At the two streams, DOC and NO − 3 concentrations differed from chemostasis during >80% of the studied storms, as indicated by divergences from the 1:1 line between measured and expected solute exports (Figure 2). The magnitude and direction of these divergences varied depending on the stream, solute, and period considered. At the intermittent stream, divergences from chemostasis differed between the dry and wet periods. For DOC, RB was +57% during the dry period, when 58% of the individual storms fall above the 1:1 line (Figure 2 and Table 3). This result suggests the existence of additional sources of DOC during this period. During the wet period, positive and negative biases from expected DOC export counterbalanced each other, leading to RB ∼ 0. For NO − 3 , RB was +21% during the wet period, when 61% of the individual storms fall above the 1:1 line (Figure 2). During the dry period, 92% of the cases fall below the 1:1 line, but RB was relatively close to  (Table 3). This result indicates that NO − 3 concentration decreased during storms, but the magnitude of decline was relatively small.
At the perennial stream, RB for DOC was > +40%. Yet, only half of the storm events fall above the 1:1 line (Figure 2). This result hold when individual storms were either pooled together or split by period. For NO − 3 , the pattern was similar to that found for DOC, though RB values were lower, especially during the dry period (Table 3). These results indicate that deviations from chemostasis were generally larger for those events showing higher concentrations.

Supply, Demand, and Whole-Reach Retention During Storms
The supply of DOC and NO − 3 (E up + E gw ) was highly variable during individual storms, especially at the intermittent stream, where it varied up to 2 orders of magnitude (Table 4). Consequently, differences in DOC and NO − 3 supply between Values of RB have been calculated for all individual storms as well as for the dry and wet periods separately (the number of cases is shown in parenthesis). For each group of individual storms, RB ∼ 0 indicates that measured exports are closed to those expected from chemostasis (i.e., no changes in concentration despite changes in stream discharge). Positive (RB > 0) and negative (RB < 0) biases indicate that measured solute exports are higher and lower than expected from chemostasis, respectively. The number of individual storms that fall above (% st. > 0), below (% st. < 0), or within (% st. ∼ 0) the chemostatic scenario are indicated in relative terms. See Figure 1 for an illustration of the different scenarios. the two streams were not statistically significant (for the two solutes p > 0.05). The contribution of E gw to solute supply during individual storms ranged from 0% (when ∆Q < 0 m 3 ) to >80%. At the intermittent stream, DOC and NO − 3 supply showed no statistically significant differences between the dry and wet period, which could be partially explained by the high variability of solute supply during the latter period (Table 4). At the perennial stream, the variability of DOC and NO − 3 supply was lower than at the intermittent stream, and median values of solute supply were higher during the wet period (Table 4).
During individual storms, in-stream areal uptake rates (U) were lower at the intermittent than at the perennial stream for both DOC and NO − 3 (in the two cases: p < 0.01). U DOC and U NO3 were higher during the wet period than during the dry period, a pattern that was observed for the two study streams ( Table 4). During storm flow conditions, U was either similar or higher than during base flow conditions (Figure 3). For DOC, the perennial stream showed higher U during storms ( There were differences in R between solutes and streams. At the intermittent stream, median R during individual storms was low (<10%) for both DOC and NO − 3 , with no statistically significant differences between dry and wet periods ( Table 4). At the perennial stream, R-values during individual storms were higher for NO − 3 than for DOC (18.0 [14.0, 20.1] vs. 8.0 [6.6, 8.9], p < 0.0001), especially during the dry period (Table 4). During individual storms, R for DOC was similar between the two streams (p > 0.05), while R for NO − 3 was higher at the perennial than at the intermittent stream (Table 4).
Differences in R between base flow and storm flow conditions were not consistent between solutes and streams. At the intermittent stream, R for DOC was higher during storm flow (5.6% [2.9, 8.7]) than during base flow conditions (2.8% [2.5, 4.5]), while R for NO − 3 was highly variable during base flow conditions and no statistically significant differences were observed compared to storm flow conditions (Figure 3). At the perennial stream, R was higher during base flow than during storm flow conditions for both DOC (9.6% [8.6, 11.2] vs. 8.2% The storm size influenced differently solute supply, solute demand, and R at the two study streams. For the two solutes, both FIGURE 3 | Box-plots of (A) in-stream areal uptake rates (U) and (B) whole-reach retention (R) of dissolved organic carbon (DOC) and nitrate (NO − 3 ) for the intermittent and the perennial stream during base flow and storm flow conditions. Lines are medians, the extreme of the boxes are the 25th and 75th percentiles, and whiskers are the 10th and 90th percentiles. For each stream, asterisks (*) indicate statistically significant differences between base flow and storm flow conditions (Wilcoxon test, p < 0.05).
supply and demand increased with increasing storm size, though the pattern differed between the two sites. At the intermittent stream, solute demand increased at a faster rate than supply, while solute demand increased at a similar rate than supply at the perennial stream (Figure 4). Although solute supply and demand were positively related to storm size, the values of the former were higher than the later (Figure 4). The only exception was observed at the intermittent stream, where NO − 3 demand was not related to the magnitude of stream discharge. Values of R were unrelated to stream discharge for the two solutes at the two study sites, except for NO − 3 at the perennial stream, which showed a statistically significant decline with increasing the magnitude of the storm (r 2 = 0.35, p = 0.001; Figure 5).

DISCUSSION
The capacity of streams to transform and take up C and nutrients during base flow conditions has been widely demonstrated across headwater streams (e.g., Peterson et al., 2001;Ensign and Doyle, 2006;Tank et al., 2008;Marcé et al., 2018). However, hydrology is the master variable driving annual exports because solutes are transported downstream mostly during storms (e.g., Hinton et al., 1997;Raymond et al., 2016). This study aimed to shed some light into the potential for in-stream retention during storms by revisiting a large data set comprising >80 storm events of different magnitude in two Mediterranean streams, one intermittent and one perennial. We combined measurements of discharge, stream water chemistry, and riparian groundwater chemistry, and applied different empirical approaches to explore divergences from chemostasis for DOC and NO − 3 , and changes in in-stream solute retention among individual storms. Our calculations were not without limitations because concentrations FIGURE 4 | Relationship between water export and supply from upstream and riparian groundwater sources (E up +E gw ) (triangles) and whole-reach demand (circles) estimated from in-stream areal uptake rates (U) of dissolved organic carbon (DOC) and nitrate (NO − 3 ) for individual storm events at the intermittent stream Fuirosos (A,B) and the perennial stream Font del Regàs (C,D). Error bars indicate the uncertainty associated with supply and demand fluxes (see text for details). Note that error bars are small and even not distinguishable in some cases. The solid lines indicate regression models only when statistically significant.
were not continuously monitored, and only monthly riparian groundwater chemistry was available. Yet, our study allowed to evaluate the capacity of in-stream processes to shape storm solute export and concentration-discharge responses under a wide range of hydrological conditions, that represented contrasting scenarios of hydrological connectivity.

Divergences From Chemostasis Show Higher Variability at the Intermittent Stream
Most of the storm events included in this study (> 70%) were chemodynamic, coinciding with previous studies showing that solute concentrations in headwater streams usually change (either increase or decrease) during the evolution of storm events (Moatar et al., 2017;Fovet et al., 2018). At the perennial stream, RB values were positive and relatively high (> +40%) for both DOC and NO − 3 , though only half of the storms showed high concentrations compared to chemostasis. This result suggests that deviations from chemostasis were generally larger for those events showing higher concentrations during storm flow. This pattern has been previously reported in other headwater catchments and can be explained by the contribution of additional solute sources to stream runoff that become hydrologically connected to the stream during storms (Hinton et al., 1997;Bernal et al., 2002).
At the intermittent stream, a large percentage of individual storms also showed divergences from chemostasis (77 and 99% for DOC and NO − 3 , respectively). Yet, in this case, values of RB were closer to zero, especially for DOC during the wet period. This result suggests that DOC concentration-discharge responses were less consistent and showed greater variability at the intermittent stream, which could be explained by low hydrological connectivity (that likely lead to pockets of DOC accumulation) and a more variable connectivity between the stream and potential sources of DOC from one storm to another. Hydrological disconnection within the intermittent catchment usually accentuates during the dry period, when riparian groundwater is the major contributor to runoff (Butturini et al., 2003;Bernal et al., 2006). We found that stream NO − 3 concentrations were low during storms occurring in the dry period, and that most of the storms showed negative divergences from chemostasis for this solute (RB < 0%). These results could be attributed to the exhaustion of NO − 3 stored in the channel and near-stream zone during droughts (Poblador et al., 2017). In contrast, stream DOC concentrations were high during storms occurring in the dry period and showed the largest positive divergences from chemostasis (RB > +50%). This result agrees with previous studies reporting the flushing of large stocks of organic matter (mostly leaf litter leachate) accumulated in the dry bed of the intermittent stream during the summer drought (Bernal et al., 2006;Acuña et al., 2007).
Overall, our results indicate that divergences from chemostasis were more variable between the dry and wet period at the intermittent than at the perennial stream. This result could be an artifact associated with the lower number of samples collected at the perennial stream. Yet, differences in solute export were relatively small (<12%) when using either few or many samples, and thus it seems unlikely that this limitation alone could explain the observed pattern. In addition, this result supports that chemical stability is lower in intermittent fluvial networks, with more erratic flow regimes and abrupt shifts in hydrological connectivity compared to perennial streams, with more persistent flows and higher hydrological connectivity throughout the year (Vázquez et al., 2011;Godsey and Kirchner, 2014). Further studies including conservative tracers and geogenic cations would be needed to confirm this hypothesis and better constrain biogeochemical from purely hydrological responses during storms.

Large Variation of Areal Uptake Rates During Individual Storms
Concentration-discharge relationships are generally attributed to the hydrological mixing of catchment sources during storms. However, the potential role of in-stream processes on shaping stream solute export during storms has been largely ignored in the literature, likely because measuring in-stream solute uptake rates during storm flow conditions is not an easy task. Our results suggest that in-stream uptake occurs during storms and that values of U can be as high or even higher than during base flow conditions. Further, we found that U DOC and U NO3 can vary between 3 and 4 orders of magnitude across flow conditions. This large variability can be partially explained by the large range of hydrological conditions included in the present study, given that, the hydrological variables used for calculating U (Equation 3), such as storm-event discharge (Q), and water residence time (τ ), varied between 3 and 5 orders of magnitude.
For bulk DOC, the obtained U-values were between 10-and 40-fold lower than those reported for some leaf leachates and acetate (Mineau et al., 2016). This result is not surprising given the complex nature of stream dissolved organic matter (DOM) and suggests that the lability of DOC was relatively low at the two streams. Our finding is concordant with previous studies conducted at the intermittent stream showing that DOM has a terrestrial origin and that labile compounds (polysaccharides and protein-like compounds) usually represent a relatively small fraction (<15%) of the total DOM (von Schiller et al., 2015). In contrast, protein-like compounds represent about 70% of the total DOM at the perennial stream (at least during base flow conditions; Bernal et al., 2018), and thus, one would expect high in-stream DOC uptake. Hence, relatively low U DOC values may not be only attributed to the quality of DOM but also to low DOC availability or low capacity of stream biota to process DOM inputs. Median U DOC doubled from base flow to storm flow conditions at the perennial stream (from 0.1 to 0.2 mg C m −2 min −1 ), suggesting an increase in the bioavailable fraction of DOM during storms. These results are coincident with previous studies showing that fresh and potentially bioavailable DOM rich in lipids an aliphatic molecule reaches forested streams during storms, especially during the rising limb of the hydrograph (Pellerin et al., 2012;Wilson et al., 2013;Wagner et al., 2019).
Regarding NO − 3 , we also found either similar or higher U between base flow and storm flow conditions. Further, the range of values of U during individual storms was within those published in the literature for base flow conditions (0.005-0.066 mg N m −2 min −1 for 3rd order headwater streams; Ensign and Doyle, 2006). This result is important because it suggests that stream ecosystems can store and/or actively take up NO − 3 from the water column during storms. Few studies have quantified instream nutrient processing rates during storm flow conditions. Hall et al. (2009) reported similar NO − 3 areal uptake rates between high flow and low flow conditions in a 15 N-NO − 3 addition experiment in a mountain stream (ID, USA). This similarity was explained by increases in hydrological exchange between the stream and the riparian zone that counterbalanced decreases in biological demand in the open channel during high flow conditions. Other studies have reported in-stream net NO − 3 retention during small to moderate storm events (Bernal et al., 2006;Wollheim et al., 2017), which implies the existence of hydrological transient storage zones and/or the persistence of NO − 3 demand by stream biota despite moderate increases in discharge. Our findings are in line with these previous studies and add to the growing body of knowledge showing that headwater streams can remain biogeochemically active when discharge increases.

Solute Supply and Demand Shapes Whole-Reach Retention During Individual Storms
In-stream solute retention depends not only on solute demand, but also on solute supply, which is triggered by hydrological events (Hinton et al., 1997;Bernal et al., 2002;Raymond and Saiers, 2010). If supply increases at a faster rate than demand with increasing discharge, the former will progressively exceed the latter, and consequently, in-stream retention will decline. In this case, even if streams remain biogeochemically active during storms, in-stream processes responsible for solute uptake could become ineffective from a "mass balance" point of view (Covino et al., 2018;Wollheim et al., 2018). We found that solute supply and demand increased non-linearly with increasing water flux, but the magnitude of the former was generally higher. Wholereach retention (demand/supply) was detectable, but R values remained relatively constant for the two solutes, with median values of 5 and 21% for DOC and NO − 3 , respectively. This pattern contrasted with the high variability observed for other stormevent based variables such as U,Q,v, and τ . Unlike Wollheim et al. (2017), we did not find the expected pattern of R decreasing with the size of the storm event, except for NO − 3 at the perennial stream. The lack of a consistent decline in R with increasing discharge between the two solutes could be explained by the different biogeochemical mechanisms involved in the uptake of DOC and NO − 3 , a hypothesis that would need further work to be tested. Moreover, we may have missed R values for the most extreme events given that we only captured 3 storms withQ > 500 L s −1 , and most of the storms hadQ < 200 L s −1 . For the largest storm events, wet width likely increased substantially, which would lead to declines in U, and thereby in R. Moreover, we were likely underestimating the contribution of unsaturated water flow paths (e.g., overland flow) to solute inputs, which would lead to increases in supply, and thereby decreases in R, especially when water infiltration is limited by dry soils or during high rainfall intensity events (Bernal et al., 2006;Inamdar and Mitchell, 2006). The predominance of supply over demand across flows was especially noticeable for DOC, which showed lower values of R than NO − 3 , especially at the perennial stream. The large and positive divergences from chemostasis (RB > +40%) exhibited by this stream support the idea that supply predominates over demand when hydrological connectivity is high and water flow paths intercept large solute pools throughout the catchment Wollheim et al., 2018). In this case, there might be small place for in-stream biogeochemical demand to counterbalance solute inputs arriving from terrestrial sources during storms. Our study adds to the growing evidence that pulses of DOM are transported almost conservatively through headwater streams despite potential increases in the proportion of labile compounds and associated in-stream biogeochemical activity (Wollheim et al., 2015;Raymond et al., 2016;Ejarque et al., 2017).
Whole-reach NO − 3 retention was relatively high at the two streams during some individual storms. At the perennial stream, median R for NO − 3 approached 20%, while it increased up to 40% in some cases at the intermittent stream. The obtained R values suggest that in-stream biogeochemical processes can contribute to decrease NO − 3 downstream export, especially during small and moderate storms. Our results are coincident with those reported for a temperate suburban river network in NH (USA), the Oyster River, where network scale aquatic NO − 3 retention during small to moderate storm events varied between 50 and 80% (Wollheim et al., 2017). The R-values obtained in our study are lower than those measured at the Oyster River. Note, however, that we estimated in-stream NO − 3 retention along stream-reaches <2 km long that drained <5 km 2 , while values reported by Wollheim et al. (2017) integrated whole-network NO − 3 retention, including low order streams, that drained 50 km 2 .
Our study shows that in-stream biogeochemical demand counterbalanced NO − 3 supply to some extent. Yet, we also found positive divergences from chemostasis for NO − 3 at the two study streams, especially during the wet period, which taken alone would suggest no in-stream retention. These results highlight that concentration-discharge relationships emerge from the combination of different source activation, exhaustion, and attenuation processes (Musolff et al., 2017). Thus, the potential influence of in-stream biogeochemical processes on stream solute loads during storms cannot be inferred from concentrationdischarge relationships, unless independent measurements are considered simultaneously in the experimental design. Moatar et al. (2017) combined stream water chemistry with water temperature and chlorophyll concentrations to show that biogeochemical processes influenced stream NO − 3 concentration at low and intermediate flows. In the present study, we combined water chemistry from different stream locations, groundwater chemistry, and nutrient spiraling metrics to infer the potential role of in-stream biogeochemical processes during storms. Covino et al. (2018) also concluded that a good understanding of in-stream biogeochemical processing requires simultaneous measurements of nutrient supply, demand, and uptake. Therefore, future work combining different empirical approaches at different spatio-temporal scales is essential to better constrain the potential role of in-stream biogeochemical processes on regulating stream solute export to downstream ecosystems under different hydrological conditions.

CONCLUSIONS
The role of in-stream processes in shaping solute concentrations and exports arriving to running waters during storms has been largely neglected in the literature, mostly due to methodological constraints. However, most solute export occurs during storms, and thus, there is growing interest in integrating storm flow dynamics into stream ecosystem theory (Raymond et al., 2016;Wollheim et al., 2018). Empirical approaches that allow exploring in-stream C and nutrient retention across hydrologic conditions are essential for understanding the potential of fluvial ecosystems to modify solute concentrations from terrestrial sources and to improve stream water quality. High frequency sensors can provide new insights into this question by capturing continuous discharge and solute concentrations at different locations along fluvial networks (e.g., Wollheim et al., 2017). Yet, this type of field equipment is expensive, and few research groups can afford and maintain a large fleet of sensors in the field. We have shown that traditional low-technological equipment (such as automatic samplers) is useful to explore this type of question, and further, passive and low-cost sensors and technics are still needed in order to chemically characterize water sources that contribute to runoff. Experimental settings could be especially effective if combining several of these empirical approaches with indicators of in-stream biological activity such as chlorophyll, bacterial abundance, or bacterial community structure during the evolution of storm events (e.g., Wagner et al., 2019).
Our results suggest that in-stream demand can remain relatively high during storms, especially for NO − 3 that showed areal uptake rates comparable to those measured during base flow conditions. In-stream NO − 3 demand led to substantial whole-reach retention (up to 40%), highlighting that in-stream processes can contribute to decreased terrestrial NO − 3 inputs during storm events. Regarding DOC, storm flow export was mostly driven by hydrology and whole-reach retention was relatively low (<10%). For the two study solutes, large differences in in-stream areal uptake rates and concentration-discharge responses were observed between dry and wet periods in the intermittent stream, but not in the perennial stream. This finding supports the idea that hydrological connectivity and antecedent moisture conditions precondition the response of catchments and stream ecosystems to storms, likely by influencing the type and diversity of DOM molecules, nutrient availability, stream biota and microbial community structure (Ylla et al., 2011;Catalán et al., 2017;Sabater et al., 2017). Our results add to the growing body of research showing that headwater streams can actively modify solute fluxes and play a fundamental role in shaping the transfer of solutes to downstream ecosystems and coastal areas.