Habitat‐based biodiversity responses to macroclimate and edaphic factors in European fen ecosystems

Understanding large‐scale drivers of biodiversity in palustrine wetlands is challenging due to the combined effects of macroclimate and local edaphic conditions. In boreal and temperate fen ecosystems, the influence of macroclimate on biodiversity is modulated by hydrological settings across habitats, making it difficult to assess their vulnerability to climate change. Here, we investigate the influence of macroclimate and edaphic factors on three Essential Biodiversity Variables across eight ecologically defined habitats that align with ecosystem classifications and red lists. We used 27,555 vegetation plot samples from European fens to assess the influence of macroclimate and groundwater pH predictors on the geographic distribution of each habitat type. Additionally, we modeled the relative influence of macroclimate, water pH, and water table depth on community species richness and composition, focusing on 309 plant specialists. Our models reveal strong effects of mean annual temperature, diurnal thermal range, and summer temperature on biodiversity variables, with contrasting differences among habitats. While macroclimatic factors primarily shape geographic distributions and species richness, edaphic factors emerge as the primary drivers of composition for vascular plants and bryophytes. Annual precipitation exhibits non‐linear effects on fen biodiversity, with varying impact across habitats with different hydrological characteristics, suggesting a minimum requirement of 600 mm of annual precipitation for the occurrence of fen ecosystems. Our results anticipate potential impacts of climate warming on European fens, with predictable changes among habitat types and geographic regions. Moreover, we provide evidence that the drivers of biodiversity in boreal and temperate fens are closely tied to the ecological characteristics of each habitat type and the dispersal abilities of bryophytes and vascular plants. Given that the influence of macroclimate and edaphic factors on fen ecosystems is habitat specific, climate change research and conservation actions should consider ecological differentiation within functional IUCN ecosystems at continental and regional scales.


| INTRODUC TI ON
Within the IUCN Palustrine Wetland biome, boreal and temperate fens are globally recognized as an ecosystem functional group forming peatlands fed by minerogenic waters reliant on groundwater (Keith et al., 2020).The unique ecological characteristics of fen ecosystems render them vital reservoirs of biodiversity; however, they are seriously threatened in most of the regions where they occur (Janssen et al., 2016;Lamers et al., 2015).Besides the historical impact produced by agriculture and forestry (Balvanera et al., 2019), climate change and nitrogen deposition are expected to disrupt fen biodiversity by reducing their geographic extent (Essl et al., 2011), altering species composition (Weltzin et al., 2000), or shifting the niche of specialized taxa (Hájek et al., 2022).Climate warming has been related to local species extinctions in fens during the Holocene (Žák et al., 2002) and the Anthropocene (Hedwall et al., 2017), but the effect of macroclimatic drivers in the biogeographical patterns of these ecosystems is largely unknown.In conjunction with local and regional studies that support habitat protection and restoration (Keith et al., 2020;van Diggelen, 2018), we still lack a comprehensive understanding of the large-scale factors that regulate fen ecosystems and the risk of biodiversity loss due to climate change.To accomplish this, a valuable framework involves the evaluation of climatic drivers on Essential Biodiversity Variables (EBVs) like ecosystem distributions or species diversity, as they represent aggregated information of biodiversity and environmental observations (Pereira et al., 2013).
Globally, the distribution of fen ecosystems is related to the ecological dependence of their constituent species on a continuous supply of minerotrophic water under cool or cold macroclimatic conditions (Amon et al., 2002;Hájek et al., 2006).This explains why these ecosystems are mostly distributed in waterlogged soils in temperate and boreal bioclimatic regions.However, fens with cold-adapted species also occur in mountain refugia within regions characterized by warmer macroclimates, where they have become increasingly rare (Jimenez-Alfaro et al., 2012;Peterson-Smith et al., 2008).These regions host relict populations of fen specialists in peripheral macroclimatic zones where climate warming is anticipated to diminish their capacity to survive in local refugia provided by fen types with specific edaphic conditions (Fernández-Pascual & Correia-Álvarez, 2021;Horsák et al., 2018).
At the other side of the gradient, boreal regions host assemblages of fen specialists adapted to colder macroclimatic conditions which are also regulated by ecological and edaphic variation of fen types (Sallinen et al., 2023).Understanding the distribution of fen ecosystems and their macroecological drivers across habitats with different edaphic conditions is thus a necessary step for predicting the potential impacts of climate change on large scales.This goal may be approached by differentiating ecological typologies below the functional ecosystem level, thus supporting habitatspecific solutions to report biodiversity change and to delineate regional conservation strategies (Keith et al., 2022).
Assuming a local groundwater supply, research on specific fen habitats has shown that, under similar conditions of pH and water table depth, macroclimate shapes biogeographical patterns of species table depth on community species richness and composition, focusing on 309 plant specialists.Our models reveal strong effects of mean annual temperature, diurnal thermal range, and summer temperature on biodiversity variables, with contrasting differences among habitats.While macroclimatic factors primarily shape geographic distributions and species richness, edaphic factors emerge as the primary drivers of composition for vascular plants and bryophytes.Annual precipitation exhibits nonlinear effects on fen biodiversity, with varying impact across habitats with different hydrological characteristics, suggesting a minimum requirement of 600 mm of annual precipitation for the occurrence of fen ecosystems.Our results anticipate potential impacts of climate warming on European fens, with predictable changes among habitat types and geographic regions.Moreover, we provide evidence that the drivers of biodiversity in boreal and temperate fens are closely tied to the ecological characteristics of each habitat type and the dispersal abilities of bryophytes and vascular plants.Given that the influence of macroclimate and edaphic factors on fen ecosystems is habitat specific, climate change research and conservation actions should consider ecological differentiation within functional IUCN ecosystems at continental and regional scales.
climate change, edaphic factors, fens, habitat types, peatlands richness (Horsák & Cernohorsky, 2008) and composition (Jimenez-Alfaro et al., 2018;Miller et al., 2021).Understanding the biodiversity patterns of boreal and temperate fens in a comprehensive way should therefore consider the influence of macroclimatic factors on the biotic component across habitat types with distinct edaphic characteristics (Dodds et al., 2019;Horsák et al., 2018).Indeed, the ecological differentiation of boreal and temperate fens at large geographic scales has been widely approached by habitat classifications describing fen types with ecological differences along hydrological settings (Bedford & Godwin, 2003;Tanneberger et al., 2021).For example, European fens are classified by the European Nature Information System (EUNIS) using indicator specialists (mostly vascular plants and bryophytes) and ecological descriptors based on water pH and water table (Chytrý et al., 2020).The resulting habitat types served as operational units to categorize their IUCN status (risk of ecosystem collapse) at the continental level, assigning to all of them a threatened status-either vulnerable, endangered or critically endangered (Janssen et al., 2016).
Since fen habitat types are differentiated by distributional, ecological, and compositional properties (Malmer, 1986;Peterka et al., 2017), it is expected that environment-biodiversity relationships, and the conservation actions derived from such knowledge, will depend on the characteristics of each habitat type (Kambach et al., 2023), and the specific responses of dominant taxonomic groups (vascular plants and bryophytes) to large-scale gradients.Addressing this question is a pending challenge because most studies have focused on single habitats, single biodiversity levels, and relatively small spatial scales.The development of large-scale studies encompassing multiple habitats and regions has also been constrained by the lack of large-scale datasets containing accurate information on species composition and local edaphic factors.
Here, we analyze the largest dataset on fen communities available globally to investigate the influence of macroclimate and edaphic factors on three EBVs reflecting ecosystem distributions, taxonomic diversity, and community composition.We focused on eight fen habitat types defined by their ecological characteristics to address biodiversity assessment and conservation in Europe (Figure 1).The data encompass 27,555 vegetation plot records distributed in temperate and boreal regions along wide macroecological gradients.Our main aims are: (1) to evaluate the whole geographic extent of fen habitat types and the drivers of their large-scale distributions; and to disentangle the relative influence of temperature, precipitation, soil pH, and water table depth on local species richness (2) and composition (3) of plant specialists.We expect that the influence of macroclimate and edaphic factors will differ on specific fen habitats and taxonomic groups (vascular plants and bryophytes) in congruence with their known distribution patterns and ecological characteristics.Investigating the effects of those drivers on three EBVs within ecologically differentiated habitats will provide, for the first time, a comprehensive overview of biodiversity-environment relationships of fens at the continental scale.The findings will enhance our understanding of the potential effects of climate change and will identify the most vulnerable regions for the conservation of European fen ecosystems, with implications for assessing similar threats in other continents.

| Plant community data
We used a vegetation dataset compiled by the authors over the last 15 years from bibliographical sources, vegetation databases, and field sampling to represent the variability of European fens (Peterka et al., 2017).The data include 35,984 vegetation plots unequivocally assigned to fen ecosystems, recording the presence and abundance of vascular plants and bryophytes in defined sampling areas, together with geographic coordinates georeferenced to 1 km (Hájek et al., 2022).The nomenclature was harmonized with Euro+Med checklist (www.emplantbase.org)for vascular plants, Hill et al. (2013) for mosses, andFrey et al. (2006) for liverworts.The classification of plots into fen habitat types followed the EUNIS (www.eea.europa.eu/data-and-maps/data/eunis-habit at-class ifica tion-1) by using an algorithm implemented for the whole European vegetation (Chytrý et al., 2020).From an initial number of 11 EUNIS habitat types, we selected 27,555 vegetation plots assigned to eight types with a wide distribution in Europe (Figure S1), excluding three types with narrow geographic distributions: Palsa mires, Aapa mires, and relict mires of Sierra Nevada.For subsequent analyses, the dataset was randomly filtered to keep one single plot of the same habitat per cell of a 30 arc-second grid (see Section 2.3) to avoid oversampling of certain regions.Since most of the grid cells were originally represented by only one record, this filtering did not affect the analyses (see Table S1 for the sample sizes).
From a total of 1845 sampled species, we focused on 134 bryophytes and 182 vascular plants described as specialists of European fens in previous studies (Horsáková et al., 2018;Mucina et al., 2016;Peterka et al., 2017).Fen specialists were defined as species or aggregates of taxonomically related species that show their ecological optimum in fen ecosystems (Hájek et al., 2022).In an exploratory analysis, we evaluated the taxonomic composition of the whole dataset and the subset of specialists along the first axis of a detrended correspondence analysis (DCA) with "vegan" R package (Oksanen et al., 2016).This analysis showed similar patterns of habitat differentiation (Figure S2), with a slightly longer gradient for the subsets of specialists (DCA1 = 0.631 SD units) than for the full dataset (DCA1 = 0.597).We focused on specialists because they are the main indicators and threatened species of fen ecosystems (Janssen et al., 2016), while the diversity of generalists largely depends on the landscape matrix (Mendez-Castro et al., 2021) and they are more informative of adjacent communities rather than fens.

| Environmental data
For each vegetation plot, we extracted 19 bioclimatic variables from CHELSA 2.1 (Karger et al., 2017) at 30 arc-second resolution (c.0.8 × 0.8 km in Europe).We used a principal component analysis (PCA) to evaluate collinearity among the bioclimatic variables (Bio01-Bio19; Figure S3).The three main PCA axes (PC1-PC3) accounted for 84% of the total variance, with 44% for PC1, 24.3% for PC2, and 15.7% for PC3.We chose the variables with the highest contributions to the three PCA axes, selecting those uncorrelated to each other (Pearson's correlation coefficients <.75, Figure S4): annual precipitation (Bio12) with a main effect along PC1; mean annual temperature (Bio01) with a main effect along PC2; mean diurnal range (Bio02) with a unique effect along PC3; and mean temperature of the warmest quarter (Bio10) with effects along PC2 and PC3.
We also tested growing degree days from CHELSA and an index of aridity from Zomer et al. (2022), but they were correlated with the pre-selected variables (r > .8)and did not improve the subsequent analyses.
Edaphic factors were obtained from two sources to accommodate the spatial resolution of the response variables: (a) For modeling the distribution of habitat types (see next section), we used the European map of groundwater pH (Hájek et al., 2021)  values derived from the groundwater mineralization map were also available, we discarded them because of their correlation (r = .84)with groundwater pH; (b) For modeling species richness and composition at the plot level, we used values of water pH and water table depth calculated for each plot from direct measurements or imputation methods (Hájek et al., 2022).The water pH variable ("adjusted pH") combines pH and calcium to better explain the diversity and composition of fen species (Hájek et al., 2022;Plesková et al., 2016;Singh et al., 2019), while the water table depth variable is an index reflecting the water level of each plot by averaging the hydrological indicator values of co-occurring species as calculated by expert assessment.Since the water table depth was estimated from indicator values for the whole species composition, the resulting values for the response variable (specialists) were independent of the species used to calculate them (mostly generalists).Descriptive statistics for all variables in the dataset are shown in Table S2.

| Ecosystem distribution models
Distribution modeling of ecosystem types relies on expected relationships between known occurrences and ecological gradients to understand spatial distributions and their underlying drivers (Jimenez-Alfaro et al., 2018).This approach has been used for mapping the distribution of habitat types (Simensen et al., 2020) and it is also useful for estimating the area of occupancy when applying the IUCN red-list criteria for ecosystems (Comer et al., 2022).We calibrated distribution models with the coordinates assigned to each plot as presence (occurrence) data, using the uncorrelated macroclimatic variables (Bio01, Bio02, Bio10, and Bio12) and the layer of groundwater pH as predictors.
The models were computed with the "Biomod2" R package (Thuiller et al., 2022) by generating random pseudoabsences (out of presence grids) equaling the number of occurrences available for each habitat.To compare the potential effect of pseudoabsence random selection and different modeling techniques, we computed, for each habitat type, a series of models based on four algorithms, 10 pseudoabsence datasets, and a cross-validation test based on five replicates using 80% of the occurrences for calibration and the remaining 20% for evaluation.The selected algorithms were generalized linear models, generalized additive models, boosted regression trees (BRTs), and random forests.
The performance of the resulting 200 models was evaluated in relation to an ROC curve and the true skill statistic (TSS).Since we found a better performance of random forests in all cases (Figure S5), we used this method to compute the final models using all occurrences and 10 sets of random pseudoabsences.
Variable importance for each model was computed with the VarImp function in Biomod2, averaging the results for the 10 models.The final models were projected into predictive maps of habitat suitability as an estimate of the potential area of occupancy for each habitat type.

| Models on species richness and composition
We used BRTs to investigate the influence of macroclimate and edaphic factors on community species richness.BRTs use a machine-learning and non-parametric approach based on multiple bootstrapped decision trees that do not require prior assumptions, making them appropriate to model large-scale biodiversity data by reducing overfitting (Elith et al., 2008).Separate BRTs were computed for vascular plants and bryophytes for each habitat type, resulting in a total of 16 models.The number of specialists per plot was used as the response variable, filtering the data to plot sizes between 1 and 25 m 2 as an appropriate range to reduce sampling biases in fens (Peterka et al., 2020).The predictors included the selected macroclimatic variables (Bio01, Bio02, Bio10, and Bio12), the two edaphic factors (water pH and water table depth), and the plot size as a covariate.We used the gbm.step function in "dismo" R package (Hijmans et al., 2021) to determine the optimal number of trees and the highest cross-validated (k = 10) model fit, setting the learning rate to 0.01 and the bag fraction to 0.5.The residuals of the first series of BRTs showed spatial autocorrelation, with high values of Moran's I and significant effects at short and medium pairwise distances, as detected by correlog function in "pgirmess" R package (Giraudoux, 2022).To account for this effect, we used a residual autocovariate (RAC) approach to include a spatial factor calculated from the model residuals, using the autocovdistance function in the "spdep" R package (Bivand et al., 2013) with a neighborhood distance (in m) corresponding to the maximum distances of the data (from 6000 to 8000 km, depending on the habitat type) and an inverse weighting value (Bardos et al., 2015).The BRTs were then re-calculated with the autocovariate as another predictor.The residuals of the final models computed with the autocovariate did not show spatial autocorrelation, yet they preserved the relative influence and effects of the other predictors.
Model performance (% of explained deviance = 1 − (residual deviance/total deviance)) and relative contribution of each variable (in %) were obtained from the model outputs in "dismo" R package.
We used partial effect plots to interpret the marginal effects of all variables across the models.
We used generalized dissimilarity models (GDMs) to investigate the influence of the same macroclimatic and edaphic factors on the variation of community composition within each fen habitat type.
GDMs quantify the influence of environmental gradients on the taxonomical differences between pairs of sites, and they are especially suitable for modeling compositional dissimilarity from vegetation surveys (Mokany et al., 2022).We divided the filtered dataset into subsets of bryophytes and vascular plants (see Table S1 for the number of plots used).For each one of the 16 datasets (eight fen habitats × two taxonomic groups), the response variable was a dissimilarity matrix based on log-transformed values of species cover per plot.The predictors consisted of the same macroclimatic and edaphic variables previously used for modeling species richness.The GDMs were fitted with the "gdm" R package (Fitzpatrick et al., 2020) using three I-spline functions per predictor.We also added a variable accounting for the geographic distance among pairs of sites (a dissimilarity matrix based on Euclidean distances) to account for geographic effects with a spatial structure.
To estimate the relative importance of the predictor variables, we used the gdm.varImp function with 10 permutations per step until only significant variables (p < .05)were kept in the models.

| Ecosystem distribution models
For each habitat type, the Random Forest models reported the relative influence of macroclimatic variables and groundwater pH on fen distributions, together with predictive maps of the potential area of occupancy (Figure 2).In four habitats (EUNIS codes Q25, Q42, Q44, and Q45) the area of occupancy was mainly restricted to northern Europe, while the other four types were mainly projected not only in Central Europe but also in northern and southern regions.Mean annual temperature had the highest relative importance on six of eight fen habitat types, followed by thermal diurnal range and summer temperature.
The importance of thermal range was substantially low in calcareous quaking mires but relatively high in calcareous fens.Arctic-alpine rich fens, which are distributed in arctic and alpine mountains, were mainly driven by summer temperature.Although the effect of macroclimate on fen distributions was heterogeneous among habitat types, we found a general trend of maximum suitability with low-medium values of mean annual temperature and low values of summer temperature (Figure 3).

| Local species richness
The number of specialists per plot (hereafter, local richness) varied from 1 to 21 (mean 3.6 ± 2.5 SD) in bryophytes (N = 7905 plots), and from 1 to 29 (7.9 ± 4.7) in vascular plants (N = 9688).The final BRT models (computed for eight habitat types, bryophytes and vascular plants separately) explained between 40.4% and 87.4% of deviance (Table S3).In general, explained deviance was higher for macroclimatic rather than for edaphic drivers, with slightly larger differences for bryophytes than for vascular plants (Figure 4a).We also found variations in the relative importance and the effect of macroclimatic and edaphic factors among different habitats (Figure 4b, see Table S4 for the values and Figure S6 for partial effect plots).The influence of temperature on local richness was more pronounced for bryophytes than for vascular plants, with a general trend of increasing richness with lower annual or summer mean temperatures, and with lower diurnal thermal ranges.For bryophytes, the temperature diurnal range had the highest contribution on base-rich fens (habitats Q42, Q43, Q41, and Q45), in all cases with a positive effect.The habitats at the transition between acidic and base-rich fens, that is, intermediate Effects of macroclimatic predictors and groundwater pH on the distribution of fen habitat types in Europe.Individual plots show the predicted effect of environmental variables on the predicted suitability of each habitat type, as calculated from Ecosystem Distribution Models using presence data of vegetation plots and a Random Forest algorithm.Temperature is shown in degrees Celsius, annual precipitation in mm × 1000.
spring fens and calcareous quaking fens, were the most influenced by water table depth, with a decrease in local species richness with high water table.For vascular plants, the three temperature-related variables provided similar importance and a general decrease in richness with increasing temperature, except for intermediate spring fens (with opposite effect) and non-calcareous quaking mires (with non-linear effects).Edaphic factors had more importance for vascular plants than bryophytes, with stronger effects of poor fens and tall-sedge base-rich fens to soil water pH.Nevertheless, soil water pH had a generally positive effect on the local richness of bryophytes and vascular plants, irrespective of habitat types.The two habitats with expected high water tables (quaking mires, Q25 and Q44) had the strongest responses to water table depth in bryophytes and vascular plants, although their effects differed by habitat.Spatial effects, as accounted for by the autocovariate, were important on both bryophytes (average explained deviance of 20.0% ± 3.6, n = 8) and vascular plants (18.1% ± 2.9, n = 8).The covariate plot size had a positive effect on all habitat types (13.7% ± 7.2 in bryophytes, and 14.9% ± 6.8 in vascular plants).

| Species composition
The GDMs computed for taxonomic dissimilarities among plots explained between 6.8% and 30.5% of species composition (Table S1).
In contrast to the results on local richness, edaphic drivers were more important than macroclimatic factors in explaining species composition within most habitat types, especially in bryophytes (Figure 5a).
Compositional patterns of bryophytes had a lower impact on geographic distance (mean = 4.1% ± 1.8 SD, n = 8) compared to vascular plants (8.3% ± 6.4, n = 8).However, the relative importance of macroclimatic drivers, edaphic factors, and distance was unique to each F I G U R E 4 Relative importance of macroclimate, edaphic factors, plot size (area), and spatial effects on local species richness within European fen habitats.Relative importance is summarized for (a) groups of variables and (b) individual variables according to boosted regression trees computed with vegetation plots sampled for each habitat across Europe, for bryophytes and vascular plants separately.The signs inserted in (b) show whether the effect of each variable was interpreted as positive (+) or negative (−) in partial effect plots (Figure S6).Spatial effects were calculated with an autocovariate predictor to account for spatial autocorrelation and related factors.habitat type and taxonomic group (Figure 5b).Among macroclimatic factors, mean annual temperature was the most important variable for explaining species composition in 13 of 16 models, consistently for both bryophytes and vascular plants in the acidic fens (Q25, Q22, and Q24) and calcareous fens.Either thermal range or summer temperature were the most important variables in the other three models, and annual precipitation had limited or negligible importance in all habitat types.The importance of edaphic factors on species composition was highly variable among habitat types and between the subsets of bryophytes and vascular plants within the same habitat.Water table depth had higher importance than soil water pH in 11 of 16 models, especially in vascular plants.In contrast, the bryophytes were strongly influenced by water pH (more than any other variable) in intermediate fens, calcareous quaking mires, and arcticalpine rich fens.The importance of geographic distance on species composition was rather limited, except in the models computed for vascular plants in base-rich fens, like extremely rich fens and tallsedge rich fens.

| Habitat distributions and macroclimate
Our results align with the expectation that macroclimate can predict the potential area of occupancy for ecologically defined habitats, as demonstrated in previous studies (Hennekens, 2019;Jimenez-Alfaro et al., 2018).This approach can generate distribution maps that represent the presumed biogeographical characteristics of fen ecosystems at continental scales.Our models also provide information about the impact of macroecological drivers on the distribution of each fen habitat, serving as a valuable tool for anticipating the effects of climate change on a continental scale (Table 1).In general, we found that the distribution of most habitat types declined with increasing summer temperature, indicating that most fen types are geographically responsive to climate warming.An exception to this pattern was noted in tall-sedge rich fens, which can also be found in warm lowland regions if the water level remains sufficiently high and stable, displacing other base-rich fens under nutrient enrichment (Janssen et al., 2016).
The overall contribution of groundwater pH in predicting habitat distributions was surprisingly low, considering that pH and calcium generally discriminate fen habitat types (Hájek et al., 2006;Malmer, 1986;Peterka et al., 2017).This is partially explained not only by the higher number of macroclimatic variables used in the models but also by the spatial mismatch between the groundwater pH (calculated at 1 km 2 ) and the local scale in which fens are found.Indeed, different habitat types may co-occur in the same landscape, sometimes in local-scale successional stages (Singh et al., 2022), which are further facilitated by increasing summer temperature and precipitation (Vicherová et al., 2017).
We also found that the effect of mean annual temperature on habitat distributions was complex and non-linear, occasionally exhibiting unimodal trends with low suitability in the coldest regions.
This can be explained by the unsuitability of harsh winters and short vegetation periods for certain fen types, particularly poor fens, non-calcareous quaking fens, and tall-sedge rich fens.This finding aligns with results from the Alps, where Sphagnum fens showed a preference for warmer and drier locations compared to intermediate fens (Sekulová et al., 2013).All three abovementioned habitats are characterized by high productivity of fast-growing Sphagnum mosses and tall sedges and herbs.While Sphagnum mosses are absent in certain arctic regions, their spores can readily disperse (Sundberg & Sundberg, 2013), and their production and growth are boosted by air temperature (Bengtsson et al., 2021), leading to increased productivity and peat production during warm periods (Gajewski et al., 2001).Hence, climate warming can facilitate the expansion of Sphagnum fens in arctic and boreal regions, provided that water levels are sustained (Granlund et al., 2021), also increasing their capacity as a carbon sink (Magnan et al., 2022).Other habitats mainly associated with Central and northern Europe, like poor fens, intermediate fens and extremely rich fens, were positively influenced by thermal range, thus avoiding oceanic climates.A potential cause of this thermal range is the necessity to renew water saturation in the uppermost layers of peat during a cold night when evapotranspiration is less pronounced compared to a warm day (Neuhaeusl, 1975).Similarly, the lowest importance of thermal range was found in topogenic habitats, that is, quaking fens and tall-sedge rich fens, all of which are exposed to high water levels that promote buffering against thermal oscillations.
Precipitation consistently played a relevant role in predicting the distributions of most fen types, even when considering that we incorporated a larger number of temperature-related variables.Most predictions showed high suitability in mountain and/ TA B L E 1 Expected effects of climate warming on the biodiversity of fen habitat types in Europe.Changes in distribution (geographic extent), local species richness, and community composition were estimated from models computed for climate-biodiversity relationships after accounting for edaphic factors.CE, Central Europe; NE, northern Europe; SE, southern Europe.
↑ and ↓ indicate an increase or decrease in geographic extent or local species richness.
→ indicates expected changes in community composition., where the growing period is short and evapotranspiration is low, producing high moisture surplus from water catchment (Sallinen et al., 2023) or snow cover.On the other hand, poor fens and calcareous fens are rare in that region and their predicted suitability increases immediately after reaching the lowest precipitation values.Calcareous fens are absent from Lapland, likely due to edaphic reasons, such as the scarcity of highly calcium-rich sites.Conversely, in poor fens, the absence may be attributed to low Sphagnum productivity associated with low temperatures (Bengtsson et al., 2021).Arctic-alpine fens were the only habitat in which precipitation had low importance in their distribution, which can be explained by the predominant effect of temperature variables and the role of snow cover in local hydrology.We note that the occurrence of fen ecosystems is primarily determined by geomorphological factors at the landscape scale, thus our predictions must be interpreted in terms of large-scale distributions.Nonetheless, our results also suggest that a better understanding of macroclimatic drivers is achieved when we consider the hydrological settings of each habitat, especially when high-resolution information on local water catchments is lacking for the whole continent.

| Macroclimatic drivers of taxonomic diversity
Our models indicate that species richness in fens is strongly influenced by macroclimate, with a consistent decrease in response to high temperatures and thermal ranges, particularly in bryophytes (Table 1).This finding indicates higher biodiversity in cooler and less continental regions, as it is expected by general descriptions of boreal and temperate fen ecosystems.At the species level, the sensitivity of bryophytes to high temperatures has been related to physiological responses in respiration (Hao & Chu, 2021), absorption rate of toxic ions (Martins et al., 2004), tolerance to UV radiation (Martínez-Abaigar & Núñez-Olivera, 2022), or availability of free carbon dioxide for photosynthesis (Bain & Proctor, 1980).This explains why fens located in warm regions of southern Europe harbor fewer specialists than predicted from local factors (Horsáková et al., 2018).At the community level, this pattern has been linked to increasing competition pressure under higher temperatures, indicating a strong vulnerability of fen taxonomic diversity to climate warming in southern Europe (Hájek et al., 2022).
Interestingly, we found that the local richness of vascular plants increased with higher summer temperatures in habitat types linked to high water levels (Q24, Q44, and Q42) and in arctic-alpine rich fens.Consistent with the definition of these habitats, the buffer effect of stable water supplies may compensate for the impact of the warmest temperatures of the year, facilitating the recruitment of vascular plant specialists with lower sensitivity to warming.However, we also found that the number of specialists in intermediate fens and calcareous quaking fens decreases with medium-to-high values of water table depth, likely because they are partially dominated by semi-aquatic species (Horsák et al., 2018).The sensitivity to high water table was especially important on calcareous quaking fens, which are mostly dominated by brown mosses (e.g., Scorpodium scorpioides) with high sensitivity to water depth variation.These results suggest that the impact of a warming climate on local species richness will be contingent on the preservation of local water regimes, which are ultimately connected to the local hydrogeology that shapes the characteristics of each fen habitat.
Our results consistently demonstrate that increasing water pH has a positive effect on species richness, with a stronger impact on vascular plants than bryophytes, in agreement with the general expectation of pH regulation in fen ecosystems (Horsáková et al., 2018).The effect of water pH on species richness may be also explained by historical factors and local refugia (Hájek et al., 2007;Jimenez-Alfaro et al., 2012) or regional patterns linked to the island-like organization of fen ecosystems (Ottaviani et al., 2020), partially explaining the spatial effects observed for both bryophytes and vascular plants.We also found consistent effects of increasing local richness with plot size, but they were relatively minor when compared to macroecological and edaphic factors.Although plot area was mainly considered as a covariate to account for sampling biases, the general effects agree with previous research suggesting that reasonable plot variation has little influence on the diversity of local fen specialists (Peterka et al., 2020).However, certain habitats, particularly extremely rich fens, exhibit stronger area effects despite having similar ranges of plot sizes compared to other habitats.This suggests that other sources of variation, such as region-based sampling schemes, may have some correlation with plot sizes.However, this effect is nevertheless minor and does not interfere with the central question regarding macroclimatic and edaphic effects among habitats.

| Macroclimatic drivers of community composition
In contrast to the results for species richness, the dissimilarities in  (Hájek et al., 2011).In the warmest regions of southern Europe, postglacial dispersal limitation led to the presence of relict populations of vascular plants from habitats such as poor fens and calcareous fens (Horsáková et al., 2018;Peterka et al., 2022), and these populations have shown especial vulnerability to climate warming (Jiménez-Alfaro et al., 2016).Spatial distance was also a major driver of composition in extremely rich fens and tallsedge rich fens, in which the effect of macroclimate was negligible.
These fens are unevenly distributed in Central and northern Europe, and they are regarded as relicts (Horsák et al., 2015).Consequently, it is possible that they maintain relatively consistent microclimatic conditions at the local scale, thereby rendering the composition of vascular plants reliant on water table fluctuations and the ability of specialists to persist in isolated habitats.

| CON CLUS IONS
This study provides evidence of macroclimate and edaphic regulation of biodiversity in European fen habitats, indicating a predominant influence of temperature-related variables on EBVs.We demonstrated how warmer regions constrain the geographic extent of fen habitats, reducing the number of plant specialists, and changing their composition.In northern latitudes, warmer temperatures are expected to increase the relative dominance of Sphagnum species, likely shifting the composition to other fen types or to boreal bogs even under stable edaphic conditions (Granlund et al., 2021;Kolari et al., 2021).We also found that water table depth explains compositional variation in waterlogged fens, reducing the predictive value of annual precipitation, which is considered a major driver of fen communities (Jimenez-Alfaro et al., 2018).While there is evidence that large-scale temperature pat- Our study provides evidence that macroecological drivers of biodiversity in boreal and temperate fens are habitat-specific, offering a set of expectations regarding the impacts of climate warming on biodiversity across habitats and regions.The results were consistent with the ecological descriptions of the study habitats, supporting the idea that fen ecosystems can be subdivided into ecological units with predictable responses to large-scale factors.As recommended by the IUCN ecosystem classification (Keith et al., 2022), our findings support that the delineation of boreal and temperate fens at the global scale must be followed by the identification of ecological habitats as conservation targets.In Europe, the delineation of EUNIS habitat types seems consistent enough for interpreting macroecological drivers (Kambach et al., 2023).However, other classification systems will need to be tested in other continents and ecosystems.The combined effects of macroclimate and edaphic factors on fen habitats should be given particular attention, particularly in marginal distributions, and especially in northern and southern regions where major impacts to climate warming are expected.Fens are the most widespread peatlands on Earth, storing one-third of the global carbon present in the soil organic matter, yet their carbon sink function has been reversed by climate warming (Gallego-Sala et al., 2018).Due to human-driven reductions in area and fragmentation, fens have become more isolated than ever (Mendez-Castro et al., 2021), meaning that dispersal constraints, along with the added impact of climate warming, will significantly affect their biodiversity.The comprehensive effects of macroclimatic, edaphic, and spatial factors, as identified in this study, further suggest that the impact of climate change on fen biodiversity can be predictable by considering habitat variability and the different responses of bryophytes and vascular plants.
developed from field data and geospatial models for European fen ecosystems at the CHELSA grid resolution.Although water calcium F I G U R E 1 Ecological description of the European fen habitat types investigated in this study.All habitats correspond to the IUCN definition of boreal and temperate fen ecosystems (Keith et al., 2022), further classified into eight ecological types according to the EUNIS classification (https://eunis.eea.europa.eu/).Different habitat types reflect distinct ecological settings along the pH gradient (from acidic to base-rich fens) together with specific hydrological settings.Although many indicator species of habitats are bryophytes, only conspicuous vascular plants are represented in the figure.Design by Victor González García.
The most similar responses were observed among habitat types that F I G U R E 2 Variable relative importance and maps of the potential area of occupancy predicted for fen habitats in Europe.The maps reflect environmental suitability in grid cells of 0.8 km × 0.8 km modeled with a Random Forest algorithm.Numbers show the relative importance (from 0 to 1) obtained in each model for mean annual temperature (T ann ), thermal diurnal range (T range ), summer temperature (T s ), annual precipitation (P ann ) and groundwater pH (pH grw ).Map density plots (in gray) show the frequency distributions of suitability across latitude and longitude.Map color intensity reflects the predicted suitability across the predicted areas.Map coordinates are based on the European UTM ETRS89 projection.shared ecological affinities.For example, the distribution of the most acidic types (Q25 and Q22) showed a similar unimodal response to mean annual temperature, sharing with intermediate fens (also an acidic type) a preference for lower values of groundwater pH.Calcareous fens and arctic-alpine fens, which depend on calcareous springs, showed the highest suitability at low-medium temperatures and intermediate-high groundwater pH.The other habitat types had idiosyncratic responses to the predictors, although the distribution of calcareous quaking mires and extremely rich fens was linked to low annual and summer mean temperature, in agreement with their northern distribution (FigureS2).

F
Relative importance of macroclimate, edaphic factors, and geographic distance (distance) on community composition within eight European fen habitats.Relative importance (in %) is summarized for (a) groups of variables and (b) individual variables according to generalized dissimilarity models computed with vegetation plots sampled for each habitat across Europe, for bryophytes and vascular plants separately.Geographic distance reflects the Euclidean geographic distances among pairs of plots to account for spatial autocorrelation and related factors.
, with decreasing suitability in Mediterranean and steppe regions.Interestingly, all tested fen types exhibited an increase or a peak in suitability within the range of approximately 600 and 1200 mm of total annual precipitation.This indicates that irrespective of geomorphological settings, low-precipitation regions cannot maintain a continuous water supply during the whole year, explaining the limited presence of fens in Mediterranean climates(Jimenez-Alfaro et al., 2018).Nevertheless, the non-linear responses shown by annual precipitation suggest that other factors may be relevant in certain habitats and regions.For example, we found high suitability of quaking fens, intermediate fens, and tall-sedge rich fens in precipitation-poorest areas, despite the fact that these habitats are the most water-demanding among all fen ecosystems.The only region in Europe where these fens are abundant under such low precipitation is Lapland (northern Finland and adjacent areas) terns are correlated with local temperature in fens(Fernández-Pascual et al., 2015), the links between annual precipitation and local water conditions largely depend on local hydrogeological settings, which are further affected by direct human impacts.However, low precipitation can result in biodiversity changes by reducing water catchment, especially in southern regions with relict spring fens, where heatwaves and drought periods are anticipated to become more frequent.This becomes particularly critical when annual precipitation falls below 600 mm, which appears to be the minimum threshold required to maintain sufficient edaphic water for temperate and boreal fen ecosystems.Conservation actions aimed at mitigating the impacts of climate change on fens should, therefore, prioritize regions where precipitation and local water catchments are expected to decline, particularly in the regions with the lowest precipitation levels.