Introduction

River ecosystems that recurrently cease to flow or dry up at some point in time and space (i.e. temporary rivers, TRs) occupy more than 50% of the global river network (Messager et al., 2021) and they are becoming more abundant due to global change (Döll & Schmied, 2012; Sauquet et al., 2021). TRs are common in Mediterranean climates (Bonada & Resh, 2013; Cid et al., 2017) where they experience seasonal and predictable floods and droughts (McElravy et al., 1989; Gasith & Resh, 1999). These ecosystems fluctuate between two main periods: dry and wet, in which TRs experience different hydrological conditions (Gallart et al., 2012; Bonada et al., 2020). During the dry period, TRs dry up or have disconnected pools that can persist throughout the summer, whereas during the wet period TRs flow and instream habitats include both riffles and pools. These changing instream conditions impose a strong environmental filter that directly controls the taxonomic and functional composition of invertebrate communities (Williams, 2006; Gallart et al., 2012). In Mediterranean TRs, drying usually starts in late spring and early summer, when an increase in water temperature and a decrease in oxygen concentrations eliminate many lotic taxa, such as mayflies (Ephemeroptera), stoneflies (Plecoptera) and caddisflies (Trichoptera), i.e. EPT (Boulton & Lake, 2008; Bonada & Resh, 2013). During the dry period, many EPT insects cannot tolerate the conditions in pools, whereas lentic taxa as dragonflies (Odonata), beetles (Coleoptera) and true bugs (Hemiptera), i.e. OCH, increase in relative abundance (Acuña et al., 2005; Bonada et al., 2020). Later, in Mediterranean river catchments that are fed by surface runoff, flow resumption is typically triggered by increased precipitation and runoff in the headwaters, which is sometimes intense enough to cause flash floods that swiftly transform channels from completely dry to flowing strongly (Jacobson et al., 2000; Cohen & Laronne, 2005).

Invertebrate community recovery upon rewetting depends on the temporal dynamics of drying events (including frequency and duration) and the river network connectivity (Larned et al., 2010; Bogan et al., 2015; Crabot et al., 2020). Within this context, resistance and resilience strategies play a key role in determining community assembly (Hershkovitz & Gasith, 2013; Bogan et al., 2017). Resistance strategies relate to the persistence of organisms in situ in dry habitats such as in the seedbank (Bohonak & Jenkins, 2003; Stubbington & Datry, 2013), and wet refuges such as isolated pools (Cid et al., 2020), whereas resilience strategies relate to the persistence of organisms ex situ and their subsequent colonisation via dispersal (Datry et al., 2014). The relative contribution of both strategies to community recovery upon rewetting is highly variable across regions and among river and disturbance types (Bonada et al., 2007a). Certain resistance strategies, such as the persistence of organisms in the hyporheic zone and its contribution to community recovery, may vary considerably depending on the river type (Dole-Olivier, 2011; Stubbington, 2012). Previous studies of aquatic invertebrate communities after rewetting in TRs across multiple climate types (e.g. arid: Stanley et al., 1994; temperate: Stubbington et al., 2009; Chester & Robson, 2011; Datry et al., 2012; tropical: Paltridge et al., 1997) have identified high richness of desiccation-tolerant taxa. In contrast, sediment rewetting experiments indicate that resistance strategies may play a negligible role in our study area (Folch, 2020). Resilience strategies can also be the main strategy for surviving the dry period in many regions (Fritz & Dodds, 2004; Acuña et al., 2005; Datry et al., 2014). This recolonisation via spatial dispersal can occur from perennial refuges including isolated water bodies as well as upstream and downstream reaches, by overland aerial dispersal (Bogan et al., 2015; Cañedo-Argüelles et al., 2015) or drift and active migration, respectively (Eveleens et al., 2019; Pařil et al., 2019).

The fragmentation of TR river networks by flow intermittence has different effects on the recolonisation of aquatic invertebrates depending on their dispersal abilities (Cañedo-Argüelles et al., 2015; Phillipsen et al., 2015; Sarremejane et al., 2017a; Crabot et al., 2020). Strong drifters show local dispersal that is highly dependent on network connectivity (Bogan & Boersma, 2012; Sarremejane et al., 2020a), whereas insects with a winged adult phase might rapidly recolonise rewetted habitats even if they are relatively isolated from the river network (Cañedo-Argüelles et al., 2015; Sarremejane et al., 2017b).

Overall, both local hydrological conditions and spatial connectivity can determine the taxonomic richness and functional diversity of aquatic invertebrate communities upon rewetting. Firstly, local hydrological conditions can constrain the number of taxa that inhabit a given site and filter certain ecological traits, therefore, affecting taxonomic and functional metrics. Several studies have shown that taxonomic and functional richness decline along a gradient of flow permanence (Bonada et al., 2007b; Schriever et al., 2015). Thus, taxonomic and functional richness may decrease in rewetted habitats as the length of the preceding dry phase increases. Also, rheophilic taxa such as EPT can be more common in TRs with greater connectivity to perennial reaches, where they are favoured by continuous flow (Arscott et al., 2010; Datry et al., 2014), whereas OCH can be more common in TRs with higher dry period durations because of their high affinity for pool habitats (Williams, 1996; Bonada et al., 2007b). Secondly, spatial connectivity can determine community assembly by affecting the capacity of dispersing invertebrates to reach suitable habitats (Heino et al., 2015; Cañedo-Argüelles et al., 2015; Sarremejane et al., 2017b). At high levels of spatial connectivity, species with strong dispersal abilities can colonise suitable habitats via mass effects and maintain viable populations throughout the river network, promoting their widespread dominance (Heino et al., 2015). Conversely, at highly isolated sites, dispersal limitation can lead stochastic processes to be the dominant influence on species distributions and thus community composition (Mykrä et al., 2007). Therefore, taxonomic richness can peak at intermediate levels of spatial connectivity (Mouquet & Loreau, 2003; Altermatt et al., 2013; Vanschoenwinkel et al., 2013).

In this study, we analysed the effects of local hydrological conditions and the relative importance of spatial connectivity on the composition of invertebrate communities approximately one month after rewetting in seven not impacted TRs in a Mediterranean river network. This time period is sufficient for aquatic invertebrate communities to assemble after flow resumption (Fowler, 2004; Vander Vorste et al., 2016), which usually occurs as floods in Mediterranean rivers (Cid et al., 2017). We used temperature data recorded continuously over 1.5 years to assess the temporal dynamics of drying events. Additionally, we analysed spatial connectivity using two metrics, one based on each site’s position in the river network (i.e. network connectivity), which influences recolonisation by drift, and one based on its proximity to nearby disconnected streams (i.e. streams that did not flow directly into each studied subcatchment), which affects overland dispersal. Our first hypothesis (H1) was that taxonomic and EPT richness and functional metrics would decrease linearly with frequency and duration of drying events, and increase over time after the resumption of flow. We expected OCH richness to show the opposite response to hydrological metrics since OCH could be more common in pool conditions. Secondly, we hypothesised (H2) a unimodal relationship between both taxonomic and functional metrics and spatial connectivity metrics. Our third hypothesis (H3) was that aquatic passive dispersal would be more important than aerial active dispersal for colonising rewetted habitats, because high river flows during rewetting could favour drift of organisms from upstream reaches (McArthur & Barnes, 1985; Paltridge et al., 1997).

Material and methods

Study area

The study was carried out in Sant Llorenç del Munt i l’Obac Natural Park, a protected area in the Vallès Occidental region (Catalonia, NE Spain) (Fig. 1a). The area has a Mediterranean climate, with irregular and heavy rainfall, mostly in winter, some rainfall in spring and autumn, and dry summers. The underlying geology is dominated by karst limestone, with highly permeable substrates. Therefore, during summer, surface flow in TRs persists for hours to days after rainfall. Almost all TRs within the park dry up during summer, either with disconnected pools or completely dry riverbeds. There are also several permanent streams in areas where discharge from karstic aquifers exists, with very low flows during summer. The TRs sampled belong to two main catchments that discharge to the Mediterranean Sea: the Besòs and the Llobregat.

Fig. 1
figure 1

Map of the sites in Sant Llorenç del Munt i l’Obac Natural Park, Spain (a). Site locations within each subcatchment, indicating the % flow intermittence for each site (b). Site codes are defined in the Fig. 2 caption

Invertebrate sampling and processing

We sampled seven TRs with similar instream conditions (Supplementary Table S1). Within them, we selected 32 sites which, based on previous studies (Rieradevall et al., 1999; Bonada et al., 2007b) and field observations, encompassed a wide hydrological gradient. Twenty-five sites were sampled approximately one month after rewetting, from the 18–21 November 2019, to ensure enough time for assembly of post-rewetting communities. A few weeks before sampling (from 21 to 23 October) intense rainfall and flash floods affected all of the sampled TRs (Supplementary Figs. 1, 2).

Each site consisted of a 100-m-long reach and was located 100–500 m from its nearest site. Invertebrates were collected by kick sampling with a 250-μm mesh net, covering all habitats in proportion to their occurrence. Samples were preserved in 96% ethanol. Invertebrates were counted and identified in the laboratory to the lowest practical taxonomic level, usually genus except for some Diptera (Supplementary Table S2). Three taxonomic metrics were calculated: total taxa richness (TRic), EPT richness and OCH richness.

Functional traits

We used eight biological traits (and 39 categories) to characterise the functional features of invertebrate communities: life-cycle features, reproduction, aquatic stages, dispersal mode, resistance forms, respiration, and locomotion and substrate relation (Tachet et al., 2010, Supplementary Table S3). These traits can be related to resistance and resilience to drying (e.g. Bonada et al., 2007b; Aspin et al., 2019; Belmar et al., 2019). Feeding habits and food types were excluded because they have no direct relationship to resistance or resilience to drying (Sarremejane et al., 2020a; Crabot et al., 2020), and body size was excluded because trait databases may show limited concordance with the true size distribution of specimens (Orlofske & Baird, 2014). Each genus was coded according to its affinity to each trait category using a fuzzy coding approach (Chevenet et al., 1994), from 0 for no affinity, to 3 for the strongest affinity, except for one trait, locomotion and substrate relation, which was coded from 0 to 5 (Supplementary Table S4). Trait information for Oligochaeta and Hydrachnidia was unavailable and, therefore, these taxa were excluded from trait analyses.

We quantified the relative proportion of the four major dispersal modes considered in invertebrates from freshwater ecosystems, i.e. aquatic passive, aquatic active, aerial passive and aerial active (Sarremejane et al., 2020b), using the database of Tachet et al. (2010). The proportion of aerial active and aquatic passive dispersers served to test H3.

Functional metrics

We used three matrices to characterise the functional space and to estimate the functional metrics of aquatic invertebrates: a taxon counts by site matrix (i.e. sites × taxa), a matrix containing the fuzzy-coded trait profile for each taxon (i.e. taxa × traits), and the resulting community-level matrix representing the mean trait profile for each site (i.e. sites × traits).

We defined the functional space as a multidimensional Euclidean space, and we performed a Principal Component Analysis (PCA) using the taxa × traits matrix to obtain a set of uncorrelated axes that represented the variability of the trait categories contained in that matrix (Gutiérrez-Cánovas et al., 2015). We retained the first three principal components, which were the significant ones resulting from the application of the broken stick rule (Jackson, 1993). These principal components constituted the dimensions of the functional space in which we quantified functional metrics, and we checked their homogeneity following the method described in Múrria et al. (2020). Then, we built several simulated binary matrices with one category per trait, following a random sampling based on the probability that each category was present in a randomly generated individual belonging to a genus. These matrices were projected into the generated functional space to create clouds of points that simulate the suite of potential trait combinations that comprise inter-and intra-genus functional variability. We then calculated three components of functional diversity at the whole-community level: functional richness (FRic), functional dispersion (FDis), and functional redundancy (FR), using the R packages ‘vegan’ (Oksanen et al., 2019) and ‘ade4’ (Dray & Dufour, 2007). FRic quantifies the filling of the functional space and was estimated as the hypervolume enclosing the functional space filled by the community (Villéger et al., 2008). FDis describes the distribution of taxa in functional space and was calculated by averaging the Euclidean distance from each simulated point to the community centroid (Laliberté & Legendre, 2010). FR quantifies the degree of functional space overlap among taxa in the functional space (Rosenfeld, 2002) and was calculated by summing the total overlap in the functional space between each taxon pair in a community (Gutiérrez-Canovas et al., 2015). FRic reaches higher values when taxa have contrasting trait profiles, FDis when there are taxa with trait profiles that differ greatly from the community mean values, and FR when many taxa are functionally similar. Finally, each functional metric was standardised by its maximum from all communities, so that index values ranged between 0 and 1 (Mouchet et al., 2010; Bruno et al., 2016).

Local hydrological conditions

Two temperature data loggers (HOBO Pendant® Temperature/Light logger) were installed from July 2018 to December 2019 in each site, one in a riffle and one in a pool, to monitor the flow intermittence, i.e. the proportion of zero-flow days for the entire data period. Loggers were set to log temperature at hourly intervals. We compared the diurnal temperature variation of loggers placed within the river with loggers hung from nearby trees to infer when a site was wet or dry (Gungle, 2006). First, we calculated the daily temperature range as the difference between the maximum and the minimum temperature. Then we fitted linear and sinusoidal regression models, being the former typical of loggers placed in perennial rivers and the latter typical of those installed in TRs (Supplementary Fig. 3). For each daily temperature range value, we calculated if it was closer to those predicted by the linear or the sinusoidal model. In the first case, we considered the site as wet, i.e. surface water was present, whereas in the latter, we considered the site as dry, i.e. surface water was absent or restricted to disconnected pools. We validated this approach using field observations and time-lapse photographs and found a prediction accuracy of 76%.

Due to data logger malfunction on very cold days and the loss of loggers washed out by floods, 44 of 69 loggers placed within the river had more missing values than recorded values. We filled in missing information about each site’s status (wet/dry) using a logistic regression model based on the channel slope, altitude, geology, as well as antecedent humidity, precipitation and temperature. These variables have a major influence on the hydrology of TRs (Cid et al., 2017; Datry et al., 2017). For humidity, precipitation and temperature, we computed summary measures for 14, 30, and 90-day periods. For each period, we summarised the daily measurements as the median, mean and slope of a linear regression model across all measurements recorded during that period. We excluded days with missing measurements in this aggregation step. Hence, for each data logger and day, we obtained a total of 27 statistics summarising changes in humidity, precipitation, and temperature (Supplementary Fig. 4), and combined these statistics with information on the river’s slope, altitude, and geology to yield a set of 30 variables used to predict a site’s status. The logistic regression model and the evaluation of its predictive performance are provided in Supplementary Appendix 1. We used the entire 1.5-year data period to calculate two metrics to characterise the temporal dynamics of drying events for each sample: the total duration of drying events (TotDur), which represents the total number of zero-flow days, and the frequency of drying events (TotNum), which represents the number of drying events. In addition, we calculated the number of days between the most recent rewetting and each sampling event (i.e. days since rewetting).

Spatial connectivity

We delimited the entire river network of the Sant Llorenç del Munt i l’Obac Natural Park using geospatial data. Then, the network was divided into subcatchments, which represented the most coherent river networks in the dataset, and each containing one or more TR. Using these subcatchments, we built a synthetic network taking the river confluences as nodes (Fig. 2) using the R package ‘igraph’ (Csardi & Nepusz, 2006), with each site assigned to its nearest node using the function ‘nn2’ in the R package ‘RANN’ (Arya et al., 2019). We calculated each node’s closeness centrality, to indicate the capacity of their position within the network to connect to other nodes (Freeman, 1979). We defined our TRs as directed networks with an upstream to downstream direction (i.e. dendritic network; Fig. 2). Therefore, we categorised closeness centrality by calculating the ‘out-closeness’ using the function ‘closeness’ in the package ‘igraph’. By considering the ‘out-closeness’ as our centrality metric we assume that a higher closeness value for a given site implies higher isolation (i.e. upstream reaches) within a network (Borthagaray et al., 2020). Closeness provides a solid proxy of dendritic network structure and can relate significantly to biodiversity in river networks at theoretical, experimental, observational and management levels (Estrada & Bodin, 2008; Economo & Keitt, 2010; Altermatt, 2013; Borthagaray et al., 2020). We used closeness to characterise the potential for recolonisation through the river network by small- to large-scale drift.

Fig. 2
figure 2

Synthetic network of the identified subcatchments, indicating sampled reaches (red nodes) within seven TRs and their corresponding values of closeness: a Sanana (SA), b Rellinars (R), c Vall d’Horta (H), d Castelló (CA), e Talamanca (T), f Mura (MU), and g Santa Creu (SC). River confluences are represented as network nodes and their links correspond to the directed network structure (upstream to downstream). Node size and colour represent closeness values

We calculated a spatial connectivity metric, ‘surrounding water’, to capture overland dispersal by flying adult insects. For each site, surrounding water represents the total length of streams that did not flow directly into the subcatchment where the site was located within a Euclidean distance of 1 km. We chose a 1 km distance because it can capture most invertebrate colonisation events (Tonkin et al., 2014). This metric incorporates streams that are not connected to each other through the river network, and therefore indicates dispersal across a landscape (Supplementary Fig. 5). We used ArcMap 10.0 (ESRI, 1999) to generate the corresponding buffers and to quantify the total length of nearby disconnected streams. In spite of its ecological relevance (Cañedo-Argüelles et al., 2015), we did not calculate the distance from each site to the nearest perennial site, due to a lack of detailed hydrological data for the stream network.

Modelling

The relationships between response variables (i.e. TRic, EPT and OCH richness, FRic, FR, and FDis) and predictor variables (days since rewetting, TotDur, TotNum, closeness, and surrounding water) were tested using linear mixed-effect models (LMM) by applying the function ‘lme’ included in the R package ‘nlme’ (Pinheiro et al., 2021), after validating the Gaussian distribution of the response variables. Each model included predictor variables as fixed effects and the river as a random effect to control for the potential non-independence of sites within TRs. We used the function ‘r.squaredGLMM’ in the R package ‘MuMIn’ (Bartoń, 2020) to calculate two goodness-of-fit measures: the marginal R2 (R2m), which indicates the variance explained by fixed effects, and the conditional R2 (R2c), which represents that explained by both fixed and random effects. Based on exploratory analyses to identify the best-fitting models, unimodal relationships were used between community metrics and closeness. Closeness was log-transformed to improve the fit with response variables and closeness values were represented inverted so that its graphical representation is more intuitive (higher values correspond to higher centrality). To test the significance of unimodal relationships, each model was fitted using the maximum likelihood (ML) to compare it to the associated null model with likelihood ratio tests (Luke, 2017), using the function ‘lrtest’ in the R package ‘lmtest’ (Zeileis & Hothorn, 2002).

We used a null model procedure to determine whether the relationships between taxonomic and functional richness differed from those expected by chance, and thus to indicate whether observed functional metric responses were driven by taxonomic richness or predictor variables (Villéger et al., 2008). Basing on the sites × taxa and taxa × trait matrices used to construct the functional space, we randomly reassigned functional traits to each taxon (99 simulations) to recalculate their relationships with predictor variables (Bruno et al., 2016). For each simulation, we used the same procedure as used for the data models: we calculated FRic, FR, and FDis and re-examined their relationship with the same predictors using LMM regressions to obtain the simulated intercepts and slopes for each relationship. All analyses were conducted in R version 4.1.0 (R Development Core Team, 2021).

Results

Community composition

We collected a total of 8334 organisms belonging to 86 taxa (Supplementary Table S2). Invertebrate communities varied in their TRic (mean ± SD: 21 ± 12 taxa; range: 36 taxa) and their total abundance (333 ± 308 organisms; range: 1081 organisms). Overall, the three most abundant orders were Diptera, Ephemeroptera and Plecoptera, representing 61.5, 21.6 and 8.5% of the total abundance, respectively. Diptera was also the most taxon-rich order (22 taxa), followed by Coleoptera (21 taxa; 2.5% abundance), Odonata (10 taxa; 1.3% abundance), Trichoptera (9 taxa; 1.4% abundance), Ephemeroptera (7 taxa) and Hemiptera (6 taxa; 1.3% abundance).

Local hydrological conditions

Flow intermittence varied along a gradient between < 1% to 66% across the seven TRs (Fig. 1b), being highest at SC2 (66%; TotDur: 339 days; TotNum: 25 events), and lowest at MU4 (0.2%; TotDur: 1 day; TotNum: 1 event). TotDur (mean ± SD) was 113 ± 105 days and TotNum was 11 ± 10 events (Table 1). The maximum period of consecutive dry days occurred at H5 (195 days), whereas T3 experienced the highest number of drying events (35) (Table 1). After the flood events (in late October 2019), all sites were wet. Some TRs, including H and SA, had already been flowing for approx. 50 days before the flash floods (Fig. 1b), whereas in SC flow resumed with the floods (days since rewetting: 26 ± 8 days) (Table 1). Days since rewetting ranged from 12 to 329 (70 ± 67 days), and although sites within the same TR were within < 500 m of each other (Fig. 1b), they experienced contrasting hydrological conditions, e.g. days since rewetting in T varied from 22 to 171 days at T3 and T1, respectively (Table 1 and Fig. 1b).

Table 1 Number of sites (N), the mean, standard deviation (SD), maximum (Max) and minimum (Min) number of days since rewetting, duration of drying events (TotDur), frequency of drying events (TotNum), closeness, and surrounding water

Taxonomic (i.e. TRic, EPT and OCH richness) and functional (i.e. FRic and FR) metrics were positively related to days since rewetting (R2m = 0.149–0.327; Fig. 3a, d, g, j, m) and negatively related to TotDur (R2m = 0.120–0.174; Fig. 3b, e, h, k, n) and TotNum (R2m = 0.159–0.264; Fig. 3c, f, i, l, o) (Table 2), although the decrease in EPT richness with increasing TotDur was not significant (P = 0.078). In contrast, FDis was not significantly related to any hydrological metric (Table 2 and Fig. 3p, q, r). FR was strongly explained by hydrological metrics regardless of the river identity (R2m = 0.174–0.327) (Table 2).

Fig. 3
figure 3

Relationships between both taxonomic (ai) and functional (jr) metrics and hydrological metrics (i.e. days since rewetting; duration of drying events, TotDur; frequency of drying events, TotNum). Solid lines represent the fitted LMM values (see Table 2). ac TRic taxonomic richness, df EPT Ephemeroptera, Plecoptera and Trichoptera richness, gi OCH Odonata, Coleoptera and Hemiptera richness, jl FRic functional richness, mo FR functional redundancy, pr FDis functional dispersion

Table 2 LMM results relating taxonomic and functional metrics to hydrological metrics as fixed effects and river as a random effect

Spatial connectivity

T, MU and SC had the largest number of nodes (895; Fig. 2e, f, g), highest mean Euclidean distance between nodes (mean ± SD: 8.82 ± 4.73 km) and lowest closeness values (1.27 × 10–6–1.31 × 10–6), indicating higher centrality and spatial connectivity (Table 1). In contrast, SA (Fig. 2a) and R (Fig. 2b) had the lowest number of nodes (133 and 110, respectively), lowest mean Euclidean distance between nodes (2.92 ± 1.45 km and 3.35 ± 1.89 km, respectively) and highest closeness values (6.18 × 10–5 and 9.91 × 10–5, respectively), indicating higher isolation (Table 1). Finally, H (Fig. 2c) and CA (Fig. 2d) had 328 nodes, a mean Euclidean distance between nodes of 5.10 ± 2.79 km, and intermediate closeness values (1.05 × 10–5 and 1.00 × 10–5, respectively) (Table 1). The total length of nearby disconnected streams (i.e. surrounding water) was highest at R (2.08 km) and SC (1.08 ± 0.53 km), and lowest at SA (0.07 ± 0.09 km) and MU (0.10 ± 0.10 km) (Table 1; Supplementary Fig. 5).

TRic, EPT and OCH richness showed significant unimodal relationships with closeness (R2m = 0.414–0.607; Fig. 4a, c, e), so did FRic and FR (R2m = 0.409 and 0.283, respectively; Fig. 4b, d) (Table 3). Closeness explained more variance in both taxonomic and functional metrics (R2m = 0.283–0.607) than any hydrological metric (R2m = 0.120–0.272). Also, FRic and FDis experienced a significant linear decrease with surrounding water (R2m = 0.434 and 0.165, Fig. 5b, f, respectively) (Table 3).

Fig. 4
figure 4

Relationships between taxonomic (a, c, e) and functional (b, d, f) metrics, dispersal trait categories (g, h) and closeness. Solid lines represent the fitted LMM values using unimodal relationships (see Table 3). Log-transformed closeness values were inverted so that higher values corresponded to a higher centrality (i.e. connectivity). Abbreviations (af) are defined in the Fig. 3 caption. g Aerial active = proportion of aerial active dispersers, and h Aquatic passive = proportion of aquatic passive dispersers

Table 3 LMM results relating taxonomic and functional metrics to spatial connectivity metrics as fixed effects and river as a random effect
Fig. 5
figure 5

Relationships between taxonomic (a, c, e) and functional (b, d, f) metrics, dispersal trait categories (g, h) and surrounding water (km). Solid lines represent the fitted LMM values (see Table 3). Abbreviations are defined in the Figs. 3 and 4 captions

Dispersal trait analysis

The proportion of aerial active and aquatic passive dispersers was not related to any hydrological metric (Table 2 and Supplementary Fig. 6) nor surrounding water (Fig. 5g, h). Similarly, none of the disperser groups showed a strong unimodal relationship with closeness (Fig. 4g, h), although the relationship was marginally significant for aerial dispersers (Table 3). Relationships between aerial passive and aquatic active dispersers and predictor variables are provided in Supplementary Figs. 6, 7 and Tables S5, S6.

Null models

For the significant relationships observed between functional metrics and predictor variables (Table 2, 3), null models revealed that the intercepts and slopes for the FRic models including hydrological metrics, closeness and surrounding water differed from null distributions (P < 0.05), suggesting non-randomness (Supplementary Fig. 8 and Table S7). In contrast, the intercepts and slopes for the FR and FDis models were comparable to the null distribution (P > 0.05), suggesting that the significant relationships found between FR and hydrological metrics and closeness, and the significant relationship between FDis and surrounding water were all driven by TRic (Supplementary Fig. 8 and Table S7).

Discussion

We found that both local hydrological conditions and network connectivity significantly affected invertebrate community composition after rewetting. Similarly, Cañedo-Argüelles et al. (2020) used a different but complementary approach (analysis of Bray–Curtis pairwise dissimilarities between communities) and found that both local hydrological conditions and spatial connectivity shaped invertebrate metacommunities in Mediterranean TR networks close to our study area. In addition, Crabot et al. (2020) found that local hydrological conditions influenced invertebrate beta diversity, but the effects depended on the spatial drying pattern (e.g. beta diversity was higher for basins with intermittent headwaters and perennial downstream reaches than for basins with perennial headwaters and intermittent downstream reaches). These patterns likely reflect a combination of strong abiotic filters associated with seasonal hydrological variability in TRs (Stubbington et al., 2017), and dispersal limitation associated with river network fragmentation by flow intermittence (Cañedo-Argüelles et al., 2015, 2020; Sarremejane et al., 2017a).

We also found a reduction in taxonomic and functional metrics as the frequency and duration of drying events increased, supporting our H1. Our results are consistent with previous studies focusing on the rewetting phase (e.g. Acuña et al., 2005; Doretto et al., 2020) and other analyses of richness patterns in TRs (e.g. Datry et al., 2014; Schriever et al., 2015; Sarremejane et al., 2020a; Crabot et al., 2021). Sites with lower TotDur may support richer communities including taxa with a wider range of trait profiles, which can colonise and persist in less stressful conditions, thus reducing the influence of environmental filtering (Bonada et al., 2007b; Leigh & Datry, 2017; Sánchez-Montoya et al., 2018). Similarly, a high frequency of drying events (i.e. high TotNum) can limit the maximum taxonomic and functional richness that a community can attain, because a high disturbance frequency prevents some taxa (e.g. K-strategists) from colonising and persisting (Schriever et al., 2015; Stubbington et al., 2017). Time since rewetting also influenced taxonomic and functional metrics, suggesting that the relatively long-term characteristics of drying regimes (here, TotDur and TotNum) and recent instream conditions both influence invertebrate community composition in TRs. In contrast, Arias-Real et al. (2021) found that the time since the last rewetting event had a minor effect on density and diversity metrics compared with the annual duration and frequency of drying events. This difference between Arias-Real et al. (2021) and or study could be related with the sampling period. Arias-Real et al. (2021) collected invertebrate samples just after the rainy season (February), whereas we collected them after rewetting (November). It is very likely that our study better captured the effects of the rewetting in terms of dispersal and colonisation, that could be lost to some extent in February when communities are stabilised and density-dependent processes (e.g. competition, predation) operate (Closs & Lake, 1994; Godoy et al., 2016). These findings highlight the importance of considering both recent and longer-term antecedent hydrological conditions (Sánchez-Montoya et al., 2018), especially in TRs with highly variable hydrological regimes, such as those in our semi-arid study area (Gallart et al., 2012).

Supporting our H1, EPT richness decreased with drying frequency (i.e. TotNum), likely because many EPT taxa are rheophiles and flow cessation and drying may prevent their persistence in TRs (Acuña et al., 2005; Williams, 2006; Sánchez-Montoya et al., 2018; Aspin et al., 2018). However, OCH richness also decreased significantly with TotDur and TotNum, partially rejecting our H1. After flow resumes, water flows through the river network, and lentic habitats which support high OCH richness in TRs (Williams, 1996; Bonada et al., 2007b) are less abundant. Moreover, sites with longer TotDur were more likely to dry fast without retaining lentic habitats, and thus did not have OCH populations that persisted after flow resumed.

Functional analyses revealed that invertebrate communities from TRs with lower TotDur and TotNum occupied a higher trait hypervolume (i.e. higher FRic) and had a higher number of taxa with similar traits (i.e. higher FR). These results suggest a lower impact of local species loss on functional diversity in less intermittent rivers, potentially supporting recovery of ecosystem functioning after disturbances such as drying events (Schriever et al., 2015). In contrast, at the most intermittent sites the loss of taxonomic diversity might have an impact in ecosystem functioning through a reduction or the loss of key ecological traits (Crabot et al., 2021). However, the relationships between FR and hydrological metrics should be taken with caution since they were significantly affected by differences in TRic, confirming that null models are essential to assess changes in FR due to the intimate relationship between taxonomic and functional richness.

As hypothesised in H2, we found a unimodal relationship between taxonomic metrics and the longitudinal connectivity of each site to the rest of the river network (i.e. closeness) that was usually not dependent on the river identity (i.e. small differences between R2m and R2c). In this study, closeness centrality captured the upstream–downstream relative position of the sites, which after a rewetting event is of great importance (Doretto et al., 2020). As all TRs were flooded during the same rainfall event, the identity of each TR lost relevance against the spatial isolation. The relevance of closeness has already been shown at larger landscape scales when assessing changes in species richness (Borthagaray et al., 2020). Interestingly, here this effect was detected at a smaller spatial scale, highlighting the potential of this metric for explaining diversity patterns in dendritic networks (Economo & Keitt, 2010; Carrara et al., 2012; Altermatt, 2013). Taxa richness may peak at intermediate levels of network connectivity (Altermatt et al., 2013; Vanschoenwinkel et al., 2013) or species dispersal (Mouquet & Loreau, 2003), and this unimodal relationship likely reflects the interplay between the effects of dispersal limitation at isolated sites and mass effects at well-connected sites (Heino et al., 2015; Brown et al., 2018). At intermediate connectivity levels, low dispersal limitation allows the species to track environmental gradients and, at the same time, communities are not homogenised by mass effects (Heino et al., 2015). Overall, this could lead to a higher niche occupancy and a higher number of taxa. However, unimodal relationships might vary depending on the spatial extent and resolution considered, the topology of the network and the spatial autocorrelation among environmental variables (Thompson et al., 2020). According to the metacommunity theory (Heino et al., 2015) and empirical studies (Brown & Swan, 2010; Tolonen et al., 2017), and taking the dispersal abilities of the studied organisms into consideration (Sarremejane et al., 2020b), mass effects should be operating at the spatial scale that we assessed (i.e. differences within streams and between nearby streams). Contrarily, our results suggest that dispersal limitation could take place at small spatial scales in river and stream networks fragmented by droughts (i.e. TRs). However, this message needs to be taken with caution since we sampled the communities only one month after rewetting, when no sufficient time might have elapsed to allow for mass effects.

Our surrounding water metric, which described the spatial connectivity based on the length of nearby disconnected streams, had a negligible effect on taxonomic richness and trait dispersal, except for a negative relationship with functional richness and functional dispersion that was significantly affected by differences in TRic. Thus, overland aerial dispersal seems to have a minor importance for community assembly after rewetting in the studied river network. Although overland dispersal can play a key role for community assembly in river networks that are fragmented by droughts (Cañedo-Argüelles et al., 2015; Razeng et al., 2016), the dispersal by drift and following the river network seems to be more important after the rewetting, when the whole network has been connected by floods. Accordingly, Doretto et al. (2020) reported that dispersal occurred mainly by drift through the river network in Alpine streams recovering from a dry period. Also, previous studies in perennial river networks showed that aquatic invertebrates disperse mainly following the river channel (Hughes, 2007; Brown & Swan, 2010; Rouquette et al., 2013). This could explain why we found no relationship between the spatial connectivity metrics and the relative abundance of aerial and aquatic dispersers (thereby rejecting our H3). The negative relationship between surrounding water with functional richness could be related with the fact that disconnected streams can promote the dispersal of strong flyers (e.g. Heteroptera and Odonata) that could dominate the communities through mass effects (Cañedo-Argüelles et al., 2015). However, additional studies covering a wider range of surrounding water are needed to validate this hypothesis.

Conclusion

This study advances our understanding on how aquatic invertebrate communities respond to the resumption of surface flow throughout river networks after periods of fragmentation by drying. We found that both hydrological conditions and spatial connectivity influenced the taxonomic richness and functional diversity of aquatic invertebrate communities. The main pathway for invertebrate recolonisation after rewetting was through the river network from upstream to downstream reaches. By characterising how network connectivity influences community composition after flow resumption in TRs, our results could inform conservation and management actions in these rivers, especially under future global change scenarios. For example, biodiversity conservation planning in TRs could be improved by quantifying the influence of spatial connectivity on recolonisation processes and identifying key refuges that serve as sources of colonists after rewetting.