Fungal Biodiversity Mediates the Effects of Drying on Freshwater Ecosystem Functioning

Investigating the influence of biodiversity on ecosystem functioning over environmental gradients is needed to anticipate ecosystem responses to global change. However, our understanding of the functional role of freshwater biodiversity, especially for microbes, is mainly based on manipulative experiments, where biodiversity and environmental variability are minimized. Here, we combined observational and manipulative experiments to analyse how fungal biodiversity responds to and mediates the impacts of drying on two key ecosystem processes: organic matter decomposition and fungal biomass accrual. Our observational data set consists of fungal biodiversity and ecosystem processes from 15 streams spanning a natural gradient of flow intermittence. Our manipulative design evaluates the responses of ecosystem processes to two fungal richness levels crossed with three levels of drying. For the observational experiment, we found that increasing the duration of drying reduced fungal species richness and caused compositional changes. Changes in species composition were driven by species turnover, suggesting resistance mechanisms to cope with drying. We also found that fungal richness had a positive effect on organic matter decomposition and fungal biomass accrual. Positive effects of fungal biodiversity were consistent when controlling for the effects of drying duration on richness by means of structural equation modelling. In addition, our results for the manipulative experiment showed that the positive effects of higher richness on both ecosystem processes were evident even when exposed to short or long simulated drying. Overall, our study suggests that maintaining high levels of biodiversity is crucial for maintaining functional freshwater ecosystems in response to ongoing and future environmental changes.


ABSTRACT
Investigating the influence of biodiversity on ecosystem functioning over environmental gradients is needed to anticipate ecosystem responses to global change. However, our understanding of the functional role of freshwater biodiversity, especially for microbes, is mainly based on manipulative experiments, where biodiversity and environmental variability are minimized. Here, we combined observational and manipulative experiments to analyse how fungal biodiversity responds to and mediates the impacts of drying on two key ecosystem processes: organic matter decomposition and fungal biomass accrual. Our observational data set consists of fungal biodiversity and ecosystem processes from 15 streams spanning a natural gradient of flow intermittence. Our manipulative design evaluates the responses of ecosystem processes to two fungal richness levels crossed with three levels of drying. For the observational experiment, we found that increasing the duration of drying reduced fungal species richness and caused compositional changes. Changes in species composition were driven by species turnover, suggesting resistance mechanisms to cope with drying. We also found that fungal richness had a positive effect on organic matter decomposition and fungal biomass accrual. Positive effects of fungal biodiversity were consistent when controlling for the effects of drying duration on richness by means of structural equation modelling. In addition, our results for the manipulative experiment showed that the positive effects of higher richness on both ecosystem processes were evident even when exposed to short or long simulated drying. Overall, our study suggests that maintaining high levels of biodiversity is crucial for maintaining functional freshwater ecosystems in response to ongoing and future environmental changes.

INTRODUCTION
Microbial communities sustain biogeochemical cycles in ecosystems by playing a key role in carbon processing, nutrient cycling and energy transfer to higher tropic levels (Gessner and others 2010;Besemer 2015;Manning and others 2018). In terrestrial ecosystems, the importance of microbial biodiversity in driving these ecosystem processes has been demonstrated under various environmental contexts and spatial scales (Grossiord and others 2014;Trivedi and others 2016;Li and others 2019). However, in freshwater systems, our understanding of the functional role of microbial biodiversity is mainly based on manipulative experiments (Truchy and others 2020), where both biodiversity and environmental variation are minimized (van der Plas 2019). As a result, these studies might not accurately anticipate how global environmental change will alter the microbial biodiversity effects on the functioning of real-world ecosystems.
Intermittent rivers and ephemeral streams (IRES) are widespread examples of freshwater systems exposed to recurrent abiotic stress, that is, drying (Datry and others 2014; Mora-Gó mez and others 2020), and are now expanding in scope as a result of climate change and water extraction (Dö ll and Schmied 2012; Koutroulis and others 2019). Due to their global extension and temporal dynamics, IRES have a strong influence on global carbon processing and greenhouse gas emissions (Datry and others 2018;von Schiller and others 2019). Previous research has shown that increased drying reduces organic matter decomposition (Abril and others 2016; Datry and others 2018; Arias-Real and others 2020; Truchy and others 2020) and alters microbial biodiversity, biomass and activity (Gonçalves and others 2016;Duarte and others 2017;others 2019, 2020). In addition, there is now unequivocal evidence that biodiversity enhances the stability of ecosystem processes through time and that biodiversity buffers ecosystems against environmental variations (Pascoal and others 2010;van Rooijen and others 2015;Tredennick and others 2017). However, it remains unclear whether the underlying mechanisms explaining changes in organic matter decomposition and microbial biomass production are related to stress-induced biodiversity changes, indirect abiotic effects on species performance or their joint effects (Baert and others 2018). Thus, understanding how microbial biodiversity mediates drying impacts on organic matter processing and microbial biomass production is essential for predicting future variations in global carbon dynamics and its transfer to higher trophic levels in aquatic food webs.
Among microbial communities, fungal decomposers (that is, aquatic hyphomycetes) are the key drivers of organic matter decomposition in fluvial systems others 2007, 2010). Moreover, these organisms constitute an essential trophic link in aquatic food webs because they immobilize important nutrients, such as nitrogen and phosphorus, and thus improve palatability and nutritional quality of decaying organic matter (for example, leaf litter and wood debris) for invertebrate consumers (Kuehn 2016; Arias-Real and others 2018). As aquatic fungi are adapted to the abiotic conditions of running waters (Read and others 1992), drying alters their decomposition capacity through desiccation (Foulquier and others 2015) and chemical stress (Medeiros and others 2009). In addition, no-flow conditions (that is, stagnation or drying) prevent fungal propagule dispersal from unfavourable conditions (Chauvet and others 2016). However, specialized adaptations allow some aquatic fungi to occupy a range of stagnant or semi-aquatic habitats with recurrent drying periods (Lusk 2008;Cornut and others 2014;Ghate and Sridhar 2015), suggesting potential adaptations to cope with flow intermittence or desiccation stress have developed (Chauvet and others 2016).
Current knowledge of the effects of drying on the activity of aquatic fungi is based on manipulative experiments and shows that reduced fungal richness (a-diversity) alters community composition (b-diversity) and enzymatic activity (Duarte and others 2017; Mora-Gó mez and others 2018). Two main mechanisms (resistance and resilience) have been proposed to explain how biological communities respond to drying (Datry and others 2014), though these mechanisms have remained unexplored for microbial communities. Resistance mechanisms should occur when organisms are specialized to different portions of the stress gradient, giving rise to species turnover patterns over Drying Effects on Ecosystem Functioning the dryness gradient (Gutié rrez-Cá novas and others 2013). In contrast, resilience mechanisms are supported when organisms cannot cope with drying stress and need to recolonize after rewetting, thus developing nested subsets of species over the intermittence gradient (Chester and Robson 2011;Datry and others 2014;Aspin and others 2018).
Here, we used both observational and manipulative experiments to investigate how fungal biodiversity responds to and mediates the impacts of drying on two ecosystem processes: (i) organic matter decomposition and (ii) fungal biomass accrual, as a functional measure and proxy for fungal production. Our approach combines the realism and ecological complexity of an observational study of 15 streams along a wide flow-intermittence gradient with a controlled microcosm experiment, where we tested the individual and joint effects of fungal richness (two levels: low and high) and drying intensity (permanent flow, short dry period with rewetting, long dry period without rewetting) on both ecosystem processes. First, based on observational data, we analysed how fungal communities respond to different aspects of drying by exploring changes in fungal richness (a-diversity) and taxonomic composition (b-diversity and its turnover and nestedness components). Second, using both observational and experimental data, we quantified how fungal biodiversity (fungal richness) mediated ( Figure S1) and buffered the effects of drying on organic matter decomposition and associated fungal biomass accrual. Specifically, we tested the following predictions: (i) increased drying will reduce fungal richness and modify community composition; (ii) changes in community composition in response to drying will arise through species turnover, reflecting long-term adaptation and resistance mechanisms at the community level; (iii) drying will reduce organic matter decomposition and fungal biomass accrual due to a reduction in fungal richness; and (iv) fungal richness will buffer the negative impacts of drying on organic matter decomposition and fungal biomass accrual.

Field Experiment
We conducted a field experiment in 15 low-order streams over a gradient of flow intermittence. These watercourses belong to different tributaries in eight river basins of Mediterranean climate across Catalonia (NE Spain). The studied streams have orders between three and four over an alti-tudinal range of 100 to 655 m a.s.l. (Appendix S1; Table S1). For each stream, we characterized drying, environmental descriptors, fungal richness, organic matter decomposition and fungal biomass accrual, as proxy of fungal production. By using temperature and water level data loggers, we characterized different aspects of drying at annual and recent scales based on the daily variation in streambed temperature in lotic and lentic habitats, which allowed us to infer water presence during the 12 months preceding biological sampling (February 2016 to February 2017; additional methodological details are available in Appendix S2). Annual drying aspects included information on the annual drying duration (zero-flow total; ZFT) and frequency (number of zero-flow periods; ZFP). Antecedent drying aspects included the drying duration of the most recent dry period (zeroflow last; ZFL) and the number of days since the last rewetting event (rewetting, hereafter termed RE) ( Figure 1) (Arias-Real and others 2020). During the study period, accumulated precipitation during the rewetting months preceding biological sampling in 2016 represented average conditions of the last 20 years (Cañ edo-Argü elles and others 2020; http://www.meteocat.es).
In situ environmental features were characterized three times (February 2016, September 2016 and February 2017) at each stream location when surface water was present. Conductivity, water temperature, pH and dissolved oxygen (± 1 ls cm -1 , ± 0.1°C, ± 0.005 pH and ± 0.1 mg L -1 , respectively) were measured using a portable probe (YSI Professional Plus Multiparameter Instrument, USA). We further collected water samples to quantify the concentrations of dissolved inorganic nitrogen (DIN: N-nitrate + N-nitrite + N-ammonium) and soluble reactive phosphorous (SRP) (Appendix S3).
Fungal communities were sampled in February 2017 from foams collected within 100 m stretches in each stream. We identified all conidia to the species level (Appendix S4). Presence/absence data were reported for each species.
To quantify organic matter decomposition in the lotic habitats of each stream, we deployed ten sticks of Populus canadensis wood (15 9 2 9 0.2 cm) for 335 days (Arroita and others 2012). During this period, we collected the wood sticks twice (that is, after 90 days and at the end of the experiment) and calculated temperature-corrected decay rates (degree days, dd -1 ) (Stout 1989) by subtracting initial and final ash-free weights and using an exponential decomposition model (Petersen and Cummins 1974) (Appendix S5).
The fungal biomass on each stick was determined based on the ergosterol concentration (Gessner 2020) assuming a conversion factor of 5.5 mg of ergosterol per gram of fungal mycelium (Gessner and Chauvet 1993). We expressed these final values in mg of fungal biomass per gram of dry mass (Appendix S6).

Microcosm Experiment
We conducted a microcosm experiment to assess individual and joint direct effects of fungal biodiversity and drying intensity on organic matter decomposition and fungal biomass accrual. To represent differences in richness and composition of fungal species, we selected two streams for microbial conditioning of leaf litter based on our previous results of the field study (see above; Appendix S7): one stream of permanent flow with higher species richness (mean ± standard error = 12 ± 0.4; n = 10) and one stream of intermittent flow with lower species richness (5 ± 0.6; n = 10). All the species present in the low richness treatment were also included in the high richness treatment, with the exception of a single, rare species, so we can assume that richness treatment represents diversity rather than composition effects on ecosystem functioning. Both are third-order streams with siliceous bedrock, meaning that despite their different flow regimes, the physicochemical characteristics (that is, water temperature, nitrates, nitrites, ammonium and soluble reactive phosphorous) were similar in both stream locations (Appendix S8).
In autumn 2016, freshly abscised black poplar leaves (Populus nigra L.) were collected from the riparian area of the permanent stream and dried at room temperature until use. Microbial colonization was achieved by immersing sets of dried leaves (10-12 leaves) enclosed in fine-mesh bags (0.5 mm mesh) in early January 2017 in each stream (23 mesh bags per stream), covering 100 m reaches (Arsuffi and Suberkropp 1984;Suberkropp and Arsuffi 1984). After 20 days, leaf bags were retrieved and transported to the laboratory, where the leaves were washed and cut into 600 discs per stream (16 mm diameter), avoiding the veins, by means of a cork borer. We characterized the initial fungal communities on leaves that were previously conditioned in the two streams (Appendix S7).

Microcosm Set-up
Microcosms consisted of 100-ml Erlenmeyer flasks, each containing 15 leaf discs conditioned in both streams and 50 ml of the respective filtered stream water. In addition, we crossed richness treatments (low and high) with three flow-intermittence treatments ( Figure 2): Treatment 1 simulated permanent flow during 42 days; treatment 2 simulated intermittent flow with a short zero flow, dry period of 28 days and then a rewetting of 14 days with Figure 1. Example of the metric calculation of the annual drying aspects and the antecedent drying phase variables used in this study. ZFT is annual drying duration (the number of total zero-flow days), ZFP is annual drying frequency (the number of zero-flow periods), ZFL is the duration (days) of the most recent zero-flow period, and RE is the number of days between flow resumption and sampling (modified from Arias-Real and others 2020). filtered stream water; and treatment 3 simulated an intermittent flow with a longer zero flow, dry period of 42 days and no rewetting. We used 10 replicates per each flow-intermittence and fungal richness treatment (n = 60).
Microcosms were incubated at 14°C under a 12 h light/12 h dark photoperiod and continuously aerated, as described above. Microcosms during permanent flow or rewetting events contained filtered stream water, which was renewed in every three days.
Once the experiment ended, we estimated organic matter decomposition and fungal biomass accrual. As a proxy of organic matter decomposition for each replicate and treatment, we calculated the percentage of leaf dry mass loss (hereafter termed leaf mass loss) as the difference between the initial (T0) and final (T1) leaf dry mass. The initial dry mass of leaves was determined by weighing five previously lyophilized leaf discs from each stream (10 replicates). As an indicator of fungal biomass accrual on leaves, we determined the ergosterol concentration in the leaf discs (Appendix S6). To determine the initial fungal biomass following leaf conditioning, another set of five leaf discs from each stream (five replicates) was frozen at -80°C and processed.

Fungal Community Responses to Drying
First, to select the most important environmental descriptor of fungal richness that accounts for nonhydrological abiotic variation, we performed Pearson correlations between fungal richness and climatic, geomorphologic, land-use and water chemistry variables. We chose altitude as it showed the only significant association with the highest correlation coefficient (r = 0.54, p value = 0.019); the rest of environmental factors having weaker, non-significant correlations (ranging, r = -0.39 to 0.36) (Table S2).
To explore the fungal richness responses to drying and environmental variation, we used linear regression models and a multi-model inference approach (Burnham and Anderson 2002). First, to reduce distribution skewness before analysis, the ZFL and decay rates (k degree days, dd -1 ) were squared-root transformed, and the fungal biomass accrual was log-transformed. The drying metrics and altitude were z-standardized (mean = 0, SD = 1). Then, we built seven separate regression models including models with only one predictor (either one drying aspect or altitude) and others including one drying aspect plus altitude (Tables S3  and S4). We excluded the drying aspect representing time since last rewetting (RE) because it Figure 2. Design of manipulative experiments to explore the joint effects of fungal biodiversity and drying intensity on ecosystem processes. Drying intensity treatments: i permanent flow, ii short zero-flow, dry period with rewetting, and iii long zero-flow, dry period. T0 and T1 correspond to the beginning and end of the microcosm experiment, respectively. Each microcosm contained 15 leaf discs, with ten replicates per treatment.
showed a high collinearity with drying duration (ZFT) (r P =|0.84|) and did not represent a continuous descriptor (bimodal, non-continuous distribution). As a result, all predictor combinations had a low degree of collinearity (variance inflation factor £ 2; Table S3) (Zuur and others 2010). Second, we ranked the seven alternative models based on their second-order Akaike information criterion (AICc) for small sample sizes and retained those with a difference of AICc £ 2. To assess the explanatory capacity and relative likelihood of each model, we also derived the total and partitioned explained variance (R 2 ) (Hoffman and Schadt 2016) and Akaike weights (w i ).
To explore which mechanisms explained community responses (resistance vs. resilience), we modelled the relationship between beta diversity components (overall, species turnover and nestedness dissimilarity components) and drying distance (Euclidean distance based on annual drying duration) using Mantel tests corrected by spatial autocorrelation through Moran spectral randomization (MSR; Crabot and others 2019). The MSR correction removed the spurious spatial dependence from our Euclidean drying distance, providing a correlation value that reflected the net intermittence importance. We partitioned beta diversity (Sørensen dissimilarity index) into species turnover (Simpson dissimilarity index) and nestedness-resultant dissimilarity components using the betapart R package (Baselga 2010;Baselga and Orme 2012). A higher importance of species turnover would suggest resistance mechanisms in response to drying, while a higher relevance of the nestednessresultant component would indicate resilience response mechanisms.

Exploring How Fungal Biodiversity Mediates the Impacts of Drying Ecosystem Functioning
We used both field and manipulative data to quantify how fungal biodiversity (fungal richness) mediated the effects of drying on ecosystem functioning (organic matter decomposition and fungal biomass accrual). We considered fungal biomass accrual as a functional measure that can be utilized as a proxy of fungal production (Newell and Fallon 1991;Gessner 1997). First, as an initial exploratory step and using field data, we ran linear regression models to assess the relationship between fungal richness and both organic matter decomposition and associated fungal biomass. Second, to quantify how fungal richness mediated the effects of drying on ecosystem functioning, we used a piecewise structural equation modelling (SEM) approach (piecewiseSEM package, Lefcheck 2016) to analyse the field data. SEM is a causal inference tool used to examine the complex networks settled in natural ecosystems, since several influences and responses can be analysed simultaneously (Grace and others 2010). Therefore, our SEM allows us to investigate whether the fungal biodiversity effects found in simple regression models are consistent when controlling for the effects of the different drying aspects and altitude. Our four theoretical models include direct (fungal richness) and indirect causal relationships (environmental factors) on ecosystem functioning. For each ecosystem process, indirect effects were tested for either a drying aspect (ZFT, ZFP, ZFL) or for altitude. Path coefficients were fitted using the maximum likelihood algorithm. Overall model fit was assessed through the Fisher's C-test, whose small and non-significant values (p value > 0.05) indicate a good fit of the model (Shipley 2013). Given that our sample size (n = 15) only allowed us to test two pathways (environment-fungal richness-ecosystem functioning), we could not test the direct relationship between environmental factors and ecosystem processes in the SEMs ( Figure S1). To have an estimation of their direct effects and importance, we ran linear regressions for each ecosystem process using only one predictor at a time.
Third, to evaluate the individual and joint effects of fungal richness and drying on ecosystem processes under manipulative conditions (n = 60), we used linear models and a multi-model inference approach. For each process, we fitted two models including a single predictor (either fungal richness or drying), one additive model including both (combined additive effect of fungal richness and drying) and one model including both single terms plus their interaction (interactive effect of fungal richness and drying). Based on their AICc values, we ranked these four models and retained those with an AICc £ 2 with respect to the first ranked model, and we partitioned the explained variance by each predictor. Finally, for the model ranked first, we performed post hoc pairwise comparisons with a Bonferroni correction. For the interaction, we performed it only at each level of drying, including both levels of richness (six comparisons).
For all models, we assessed residuals to verify linear model assumptions of normality and homoscedasticity (Zuur and others 2010). All statistical analyses were performed using R statistical software version 3.4.1 (R Development Core Team 2011).

RESULTS
The studied streams covered a steep gradient of intermittence, from permanent streams (that is, absence of zero-flow events, Table S5) to intermittent streams with long zero-flow periods (that is, 340 zero-flow days, Table S5). Dissolved oxygen varied from 5.3 to 9.2 mg L -1 , conductivity varied from 164 to 713.7 lS cm -1 , DIN varied from 0.42 to 6.17 mg L -1 , and SRP varied from 0.01 to 1.73 mg L -1 . We found a total of 74 fungal species in the 15 study sites (richness range: 13-31, mean = 20.8).

Fungal Community Responses to Drying
Of all possible models, the model that included annual drying duration (ZFT) and altitude best explained the patterns of fungal species richness (Tables S4 and S6). Annual drying duration (ZFT) had a negative effect on fungal richness (Figure 3a), whereas richness increased with higher altitude values. Annual drying frequency (ZFP) and the duration of preceding dry event (ZFL) had negative effects on fungal richness but showed weaker negative effects (less negative regression coefficient) and lower predictive capacities. The percentage of variance explained by the model ranking first was 58.6% (Table S6). Drying duration (represented by ZFT) explained about 26.9% of the total variance and altitude explained a higher proportion (ca. 35.4%).
Overall, 92.7% of the beta diversity dissimilarity was due to species turnover, while nestedness had a much lower contribution (7.2%) ( Figure S2). Communities that experienced different annual numbers of zero-flow days tended to have higher overall dissimilarity (Mantel r = 0.43; p = 0.008) and greater species turnover (Mantel r = 0.42; p = 0.016). In contrast, the relationship between nestedness-resultant dissimilarity and drying distance was weak and non-significant (Mantel r = -0.19; p = 0.892).

Exploring How Fungal Biodiversity Mediates the Impacts of Drying on Ecosystem Functioning
For the field data set, linear regression models showed that fungal richness had a positive and significant effect on organic matter decomposition (0.62 ± 0.22; p = 0.015; R 2 = 33.1%) and fungal biomass accrual (0.77 ± 0.18; p < 0.001; R 2 = 55.8%) (Figure 3b, c). Our SEM results based on field data showed that a positive relationship between fungal richness and organic matter decomposition or fungal biomass accrual occurred even when considering the indirect effects of drying aspects and altitude ( Figure 4a, Table S7). Of which, only ZFL and altitude had significant indirect effects on ecosystem processes, through negative ( -0.55 ± 0.23; p = 0.034) and positive (0.59 ± 0.22; p = 0.019) effects on fungal richness, respectively ( Figure 4b, Table S7). Among environmental direct effects, only ZFP and altitude had significant effects on ecosystem processes. The direct effect of fungal richness (organic matter decomposition R 2 = 37.9%; fungal biomass accrual R 2 = 58.9%) was generally more explanatory than the direct effects of drying aspects and altitude (Figure 4c), although ZFP was the most explanatory variable of organic matter decomposition (R 2 = 41.9%).
When focusing on manipulative data, the additive model including fungal richness and drying best explained organic matter decomposition (Tables S8 and S9). Both variables had individual significant effects on organic matter decomposition, suggesting an additive and proportional effect of fungal richness (R 2 = 19.2%) and drying treatment (R 2 = 18.1%). Higher fungal richness always had a positive effect and similar patterns on organic matter decomposition across the three drying treatments when compared to lower richness (mean difference: 0.10; p = 0.009; Figure 5a).
Drying treatments also had a significant, negative effect on organic matter decomposition (Table 1) when comparing permanent treatment and drying treatment with a long zero-flow period (mean difference: -0.12; p = 0.034).
For fungal biomass accrual, the model ranked first included both significant individual and joint effects (Table 1, Tables S8 and S9), suggesting that the fungal richness effects on fungal biomass accrual changed across the flow-intermittence treatments (interaction, p < 0.001, R 2 = 8.5, Table 1). The drying treatment (R 2 = 72.2) explained more variance than did the fungal richness treatment (R 2 = 8.2). Post hoc analyses showed that fungal biomass accrual was significantly higher in the high richness treatments of the short dry treatment (mean difference: 0.66; p = 0.007) and the long dry treatment (mean difference: 1.58; p = 0.013) than in the respective low richness treatments (Figure 5b). However, we did not find significant differences between richness levels in the permanent treatment (mean difference: -0.15; p = 0.999).

DISCUSSION
Our results showed that an increase in drying duration led to reduced fungal richness, compositional changes explained by species turnover and lower rates of organic matter decomposition and b Figure 4. Example of SEM paths showing indirect (drying, total zero-flow days) and direct effects (fungal richness) on ecosystem processes (organic matter decomposition and fungal biomass (a) (Table S7 includes full results). Ric: fungal richness, ZFT: zeroflow total, ZFP: zero-flow periods, ZFL: length of the antecedent zero-flow period. Alt: Altitude. Solid arrows represent positive significant relationships, while broken arrows represent negative significant effects (*p < 0.05; ***p < 0.001). R 2 denotes the proportion of explained variance for each response variable. Standardized coefficients of direct effects of richness, drying aspects and altitude on ecosystem processes (b). Percentage of ecosystem processes' variance explained by direct effects of richness, drying aspects and altitude (c). Standardized coefficients and explained variance of richness direct effects were obtained from SEM analysis, while those for drying aspects and altitude were obtained through linear regression analysis. associated fungal biomass accrual. In addition, our results demonstrated, using both observational and experimental approaches, that fungal richness mediated and buffered the negative effects of drying duration on freshwater ecosystem functioning.
In the context of anthropogenic global change and biodiversity loss, our results suggest that the loss of microbial biodiversity will threaten the functioning of river ecosystems and reduce the capacity of ecosystems to cope with further environmental change.

Drying Reduces Fungal Richness and Drives Species Turnover
In agreement with our first prediction, drying reduced fungal richness (alpha diversity) and caused compositional changes (beta diversity). One of the novelties of our work was in identifying which drying aspect was the most important driver of real-world fungal communities. Among all drying aspects, the total number of zero-flow days was the most relevant variable even when considering background non-hydrological environmental variability and other competing drying aspects such as frequency of drying or rewetting. Previous manipulative experiments also found that drying duration was a key factor affecting fungal richness, taxonomic composition and enzymatic activity (Bruder and others 2011; Gonçalves and others 2016; Duarte and others 2017; Arroita and others 2018), but some exception to this pattern also occurred (Truchy and others 2020). Our results contrast with the lower importance of hydrology in driving bacterial diversity (Gionchetta and others 2020). The fact that total drying duration was more important for aquatic fungi than drying frequency or recent aspects of drying could be explained by their capacity to recover quickly as a result of their short life cycles and their adaptations to flowing waters, such as their conidium shape or their rapid germination (Read and others 1992;Grimmett and others 2013). For example, in our study, 12 out of 15 sites had surface water for more than 30 days before sampling. Moreover, it has been demonstrated that even during long dry periods, some flash storms can rapidly stimulate and restore microbial activity (Bruder and others 2011;Foulquier and others 2015). This occurs mainly because fungal propagules can survive in the subsurface or hyporheic zones as a result of their constant physicochemical conditions or in leaf packs during long-term zero-flow periods, thus contributing to rapid recovery when flow resumes (Marxen and others 2010; Cornut and others 2014; Ghate and Sridhar 2015; Chauvet and others 2016). Regarding non-hydrological environmental variability, previous studies have revealed that the growth, activity and composition of microbes are highly sensitive to changes in abiotic characteristics such as water temperature, dissolved nutrients or oxygen concentrations (Artigas and others 2008; Jabiol and others 2013; Chauvet and others 2016). In our study, with the exception of altitude, these factors were of minor importance, probably, because our field design aimed to reduce non-hydrological variability. Altitude has been recognized as an important factor in structuring fungal communities in streams (Chauvet 1991;Pascoal and others 2005) probably due to its influence on humidity, temperature control and substratum availably related to changes in riparian vegetation along altitudinal gradients.
Our results showed that compositional changes were explained by species turnover, supporting our second prediction. This compositional pattern suggested that resistance mechanics rather than resilience-related adaptations explained how aquatic fungi evolved to cope with drying (Datry and others 2014). These findings support studies suggesting that aquatic fungi have physiological and functional adaptations that have emerged over evolutionary time in response to recurrent and predictable patterns of desiccation (Belliveau and Bä rlocher 2005;Baschien and others 2006). In addition, some authors have proposed that some Drying Effects on Ecosystem Functioning aquatic fungi could have a dual life cycle, including a terrestrial phase as an endophyte with some dormant structures or in roots exposed to water, which could be seen as desiccation-resistance life strategy adaptations that allow survival in IRES (Lusk 2008;Bä rlocher 2009;Sridhar 2009). Nevertheless, our compositional changes in response to drying differed from those found for other organisms, such as aquatic macroinvertebrates, where community responses to drying (that is, nestedness) were largely due to resilience rather than resistance mechanisms (Corti and Drummond 2011;Datry 2012;Datry and others 2014). These contrasting results could be related to the different dispersal and resistance capacities of fungi and macroinvertebrates. For instance, macroinvertebrates can actively disperse by flying or can be carried by wind, so they can escape and later colonize habitats when conditions are favourable (Bogan and others 2013). The fact that aquatic fungi are intimately associated with organic matter substrates (Chauvet and others 2016) reinforces the idea that resistance and specialization mechanisms should explain compositional changes.
We are aware that the use of conidia to identify fungal species and to assess the responses to drying might have underrepresented those species producing few conidia under the studied environmental conditions and, particularly, in response to previous drying. Although this issue might have affected to some degree our beta diversity patterns, we believe that the effect should be minor considering that aquatic fungi recover their metabolic and reproductive capacity in the presence of flowing water (Mora-Gó mez and others 2018). Future studies using both morphological and molecular identification techniques will help to further clarify this issue (Fernandes and others 2015).

Fungal Biodiversity Mediates Flow-Intermittence Impacts on Ecosystem Functioning
Our results showed that drying duration (ZFT) had negative effects on ecosystem processes through alterations in fungal richness, supporting our third prediction. Fungal richness also seems to mediate the effects of environmental change over altitudinal patterns, but not the effects of drying frequency (ZFP) or the duration of the antecedent drying period (ZFL). Interestingly, our results also detected direct effects of drying frequency on both ecosystem processes that were not to be mediated by fungal richness, which suggests either a direct influence on fungal performance or indirect effects mediated by unmeasured biodiversity dimensions (for example, species composition, functional diversity, keystone species) (Xiao and others 2020).
Previous observational and manipulative studies have focused on directs effects of environmental stressors on ecosystem functioning, ignoring if fungal biodiversity could mediate stressor effects (Gulis and Suberkropp 2004;Woodward and others 2012;Noel and others 2016;Canhoto and others 2017). Thus, fungal biodiversity emerged as a key aspect to maintain functional rivers and streams. More generally, these findings align with those found for other organisms across aquatic and terrestrial ecosystems in response to chemical stressors (Beaumelle and others 2020) and aridity (Delgado-Baquerizo and others 2016). However, this pattern does not seem to be a universal mechanism since some stressors, such as nutrient enrichment, can produce direct changes in ecosystem functioning, which are not mediated by biodiversity (Beaumelle and others 2020). In this line, we also detected direct effects of ZFP on both ecosystem processes that were not to be mediated by fungal richness, which suggests a potential direct influence on fungal performance. In these cases, environmental changes can also impact ecosystem functioning through changes in species performance, with biodiversity being potentially less important.
The results of our manipulative data supported our fourth prediction by showing that higher fungal richness buffered the impacts of drying on ecosystem processes. The types of mechanisms are explained by facilitative interactions or complementarity among microbial decomposers (Gessner and others 2010). For example, fungi facilitate the penetration of other decomposers, such as bacteria, into leaf or wood tissues, where both potentially increase the decomposition rate, or species with complementary enzymes could present different activity patterns in response to environmental conditions (De Boer and others 2005;Tiunov and Scheu 2005;Duarte and others 2006). In addition, diverse communities tend to have a wider representation of ecological and functional responses to stressors, which make them more resistant to environmental change (McLean and others 2019). Furthermore, drought-resistant fungi could decompose organic matter less efficiently because of the higher energy expenditure on mechanisms to cope with desiccation stress, as occurs with other warming, acidic or osmotic stress (Medeiros and others 2009;Bierschenk and others 2012;others 2016, 2017). We hope these findings stimulate future research exploring the role of fungal functional diversity on mediating their bio-logical responses to stress and the causal mechanisms underlying the effects of biodiversity on ecosystem functioning.
Our study reinforces the need to protect freshwater ecosystems against ongoing degradation and rapid biodiversity loss as a result of global change (Reid and others 2019). For example, forested streams and other detrital-based systems depend on fungal activity to transfer energy and nutrients from leaf material to higher trophic levels (Gessner and others 2010). Environmental stressors that reduce fungal biodiversity can compromise ecosystem processes that sustain aquatic food webs. In addition, widespread freshwater degradation can jeopardize the capacity of ecosystems to maintain ecosystem functioning in the light of future impacts, such as increasing drying and temperature as a result of climate change.
In summary, our study contributes to a better understanding of the mechanisms through which abiotic stressors alter the functioning of freshwater ecosystems by underscoring the crucial role of fungal biodiversity. We also provide empirical support indicating that diverse communities can sustain higher levels of ecosystem functioning even when they are exposed to drying, enhancing their capacity to cope with ongoing and future environmental change.

AC KNOWLEDGEMENT S
We gratefully acknowledge Anna Romaní and Rachel Stubbington for constructive suggestions on earlier versions of the manuscript and the field assistance of Veró nica Granados. We would like to thank Amy Burgin, Benjamin A. Sikes and one anonymous reviewer for constructive suggestions on earlier versions of the manuscript. This work was funded by the Ministry of Economy, Industry and Competitiveness of Spain through projects: CGL2014-58760-C3-1-R and CGL2017-88640-C2-2-R. CG-C was supported by a ''Juan de la Cierva-Incoporació n'' contract (MINECO, IJC2018-036642-I) and by the European Regional Development Fund (COMPETE2020 and PT2020) and the Portuguese Foundation for Science and Technology, through the Centre of Molecular and Environmental Biology strategic program UID/BIA/ 04050/2019 (POCI-01-0145-FEDER-007569) and PTDC/CTA-AMB/31245/2017 project.
DATA AVAILABI LI TY https://github.com/Arias-Real/fungal_diversity_me diates_drying_impacts; https://doi.org/10.34810/da ta124 OPEN ACCESS This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit h ttp://creativecommons.org/licenses/by/4.0/.