Skip to main content
Browse Subject Areas

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

Spatial patterns of species richness and nestedness in ant assemblages along an elevational gradient in a Mediterranean mountain range

  • Omar Flores ,

    Contributed equally to this work with: Omar Flores, Javier Seoane, Francisco M. Azcárate

    Roles Data curation, Formal analysis, Investigation, Methodology, Visualization, Writing – original draft

    Affiliations Department of Biogeography and Global Change, National Museum of Natural Sciences, Spanish National Research Council (MNCN-CSIC), Madrid, Spain, Terrestrial Ecology Group, Department of Ecology, Universidad Autónoma de Madrid, Madrid, Spain

  • Javier Seoane ,

    Contributed equally to this work with: Omar Flores, Javier Seoane, Francisco M. Azcárate

    Roles Conceptualization, Data curation, Formal analysis, Funding acquisition, Investigation, Methodology, Validation, Visualization, Writing – review & editing

    Affiliation Terrestrial Ecology Group, Department of Ecology, Universidad Autónoma de Madrid, Madrid, Spain

  • Violeta Hevia,

    Roles Investigation, Writing – review & editing

    Affiliation Social-Ecological Systems Laboratory, Department of Ecology, Universidad Autónoma de Madrid, Madrid, Spain

  • Francisco M. Azcárate

    Contributed equally to this work with: Omar Flores, Javier Seoane, Francisco M. Azcárate

    Roles Conceptualization, Funding acquisition, Investigation, Methodology, Project administration, Resources, Supervision, Writing – review & editing

    Affiliation Terrestrial Ecology Group, Department of Ecology, Universidad Autónoma de Madrid, Madrid, Spain



The study of biodiversity spatial patterns along ecological gradients can serve to elucidate factors shaping biological community structure and predict ecosystem responses to global change. Ant assemblages are particularly interesting as study cases, because ant species play a key role in many ecosystem processes and have frequently been identified as useful bioindicators.


Here we analyzed the response of ant species richness and assemblage composition across elevational gradients in Mediterranean grasslands and subsequently tested whether these responses were stable spatially and temporally. We sampled ant assemblages in two years (2014, 2015) in two mountain ranges (Guadarrama, Serrota) in Central Spain, along an elevational gradient ranging from 685 to 2390 m a.s.l.


Jackknife estimates of ant species richness ranged from three to 18.5 species and exhibited a hump-shaped relationship with elevation that peaked at mid-range values (1100–1400 m). This pattern was transferable temporally and spatially. Elevation was related to ant assemblage composition and facilitated separation of higher elevation assemblages (> 1700 m) from the remaining lower elevation species groups. Ant assemblages were nested; therefore species assemblages with a decreased number of species were a subset of the richer assemblages, although species turnover was more important than pure nestedness in all surveys. The degree of nestedness changed non-linearly as a cubic polynomial with elevation. These assembly patterns coincided more clearly over time than between the two study regions.


We suggest double environmental stressors typical of Mediterranean mountains explained species richness patterns: drought at low elevations and cold temperatures at high elevations likely constrained richness at both extremes of elevational gradients. The fact that species turnover showed a dominant role over pure nestedness suggested current ant assemblages were context-dependent and highly vulnerable to global change, which threatens the conservation of present day native ant communities, particularly at high elevations.


Predicting the response of biodiversity to the main drivers of global change has become a primary goal of modern ecology [13]. Consequently, the analysis of species richness and assembly patterns along latitudinal and altitudinal gradients provide clues to project possible effects of climate change on communities [4, 5]. The Mediterranean mountains are particularly suitable for this purpose, given a characteristic combination of high temperature and low water availability in summer (one to several months with drought limiting primary productivity), and irregular rainfall concentrating on autumn and spring. Overall, Mediterranean mountains present a progressively cooler and wetter environment at higher elevations while valleys suffer more severe summer drought conditions [6, 7]. In addition, the Mediterranean Basin will probably face particularly marked increases in aridity, temperature and frequency of extreme climatic events [810]; therefore it is critical to advance our knowledge of how communities respond to more severe abiotic factors.

Ants are diverse and ubiquitous, exhibit strong interspecific interactions, and perform many functional processes in ecosystems [11]; therefore, ants are considered a viable indicator group of ecosystem change by many community ecologists. Ants are also dominant terrestrial community members [12] and play an important role in plant community dynamics, acting as seed harvesters [13], dispersal agents [14], and influencing soil nutrient status and plant growth [15]. As predators, ants control herbivore abundance, drive relevant top-down effects, and are often used as biological control agents of insect pests and fungal pathogens [16]. Furthermore, ant distribution and abundance patterns provide information to address specific environmental management issues [17, 18]; consequently, ants are particularly useful bioindicators.

Previous research on ant diversity documented variable responses to altitudinal gradients, which showed a certain dependency on macroclimate. For instance, studies reporting monotonic decreases in species richness with elevation were frequent in temperate mountains [1921], while monotonic increases were observed in arid environments [22, 23]. Longino and Colwell [24] and Nowrouzi et al. [25] indicated more complex patterns in tropical climates, which often combined a monotonic decrease at high elevations with a plateau at low elevations. Mid-elevation peaks were reported in tropical areas [26, 27], although also frequent at other latitudes [28, 29]. These patterns were partially attributed to geometric constraints, such as the mid-domain effect and area availability [30, 31] or the Rapoport rescue effect [32]. However, the role of climatic factors, including temperature [1921] and water availability [22, 29, 33, 34] as direct drivers of ant diversity is also unequivocal. Moreover, several studies demonstrated these climatic variables also indirectly modulated ant diversity, for example, by affecting primary productivity [33, 3537].

Understanding how ant richness responds to altitudinal gradients is not sufficient to predict how environmental changes (e.g. rising temperatures) will affect species geographic ranges, because knowledge on species composition patterns is also required. Species assemblages and their distributions along ecological and geographical gradients result from species tolerances to climatic (abiotic) factors and biotic interactions, which interplay with niche evolution to determine community composition [3840]. Kodric-Brown and Brown [41] defined a structured community as one where the organization is not due to randomness [41], and all situations in which communities are not random can be explained by spatial turnover, nestedness, or combinations of both [42]. Nestedness of species assemblages occurs when site biotas with smaller species numbers are subsets of the biotas at richer sites [43, 44]. If environmental and habitat filtering (i.e., the sorting of species by abiotic factors and habitat types) and not interspecific competition is responsible for nestedness, most species can coexist. Therefore, under increasing temperatures, species could migrate or expand their distribution elsewhere from the species’ former range, without necessarily implying other resident species will be displaced by the newcomers. On the contrary, spatial turnover implies the replacement of some species by others, exhibiting gains and losses of species among locations [45]. This is a sign that some species cannot coexist, because of different climatic requirements, competitive exclusion, or both [42]. It is expected that global warming will shift ectotherm species ranges to higher altitudes where they could find temperatures within their fundamental niches, as have often been advanced for arthropods [4, 46]. Therefore, with spatial turnover patterns, species will migrate up an altitudinal gradient and those at higher altitudes might suffer a subsequent reduction in geographic distribution range, and even disappear from the area. However, Maguire et al. [47] acknowledged both processes and community patterns might vary with scale, and exhibit spatio-temporal variation, which raises concerns on our capacity to generalize the results based on local studies. Indeed, transferability of results is increasingly considered in analyzing the effects of global change on species distributions, although such efforts are rarer in studies of community patterns [4850].

In the present study, we explored patterns of ant species diversity and community composition in Mediterranean mountain grasslands, integrating spatio-temporal transferability. Specifically, we addressed the following questions: (1) what is the relationship between ant species richness and elevation; (2) how does elevation affect ant species composition; (3) what are the relative contributions of spatial turnover and nestedness in ant community composition; and (4) are our findings transferable spatially and temporally?


Study areas and sampling design

We studied grassland ant communities in two mountains in the larger Sistema Central range, Sierra de Guadarrama (reaching 2428 m a.s.l. at its highest peak, Peñalara: 40°51′01″N 3°57′17″O) and Sierra de la Serrota (maximum 2294 m a.s.l., Serrota: 40°29′57″N 5°04′43″O). The two mountains are ~ 100 km apart with similar climatic, geologic, and biotic characteristics. Mean annual temperatures range from ~ 14 ºC at 600 m to ~ 4 ºC at the summits, and mean annual rainfall ranges from 550 mm to 1500 mm, with severe summer drought [51, S1 Table]. Soil temperature decreases with elevation (R2 = 0.80, F1,16 = 62.23, P < 0.0001 for maximum temperatures and R2 = 0.96, F1,16 = 371.2, P < 0.0001 for minimum temperatures; own data based on temperature loggers buried at ground level during the sampling period in 2014, S3 Fig). Substrata are primarily composed of granites, and pasturelands are distributed along the complete elevational gradient, largely as the result of traditional livestock grazing.

Sample sites were interspersed along the elevational gradient trying to keep a difference in elevation of 100 m between consecutive sites. The closer sampling sites were at least 1 km apart. Sites faced southeast to southwest, had gentle slopes (< 5%), and were not heavily grazed nor affected by anthropogenic disturbance (i.e., they were not close to buildings or main paths). With this sampling restrictions, we strived to control the heterogeneity of sampling units by considering similar annual-dominated dry grasslands. We sampled 18 grasslands in 2014 (in Guadarrama range) and 12 in 2015 (a subset of six sites from the original sample in Guadarrama range and another six in Serrota range; S1 Table). On each grassland, we randomly placed a 4 x 3 grid of pitfall traps, 2.5 cm diameter x 5 cm deep, with 5 m spacing between traps, which were filled with a 3:1 ethanol/ monoethylene glycol mixture. Ant sampling was conducted once in each sampling period under stable anticyclonic conditions, in July, to take advantage of the seasonal ant activity peak during summer in Central Spain (Guadarrama: 17–23 July 2014 and 9–16 July 2015; Serrota: 1–8 July 2015) [52]. Traps were collected after one week and ant specimens were kept in ethanol, sorted in the laboratory and identified to species level with a binocular microscope, excluding the occasional winged ones, which could have dispersed from elsewhere.

Pitfall trapping is considered more objective and unbiased than other methods for sampling ground ants [53, 11]. Pitfall traps have been used successfully in other studies in central Spain to capture the complete local species pool and ant size ranges [52, 54, 55]. The Consejería de Medio Ambiente, Administración Local y Ordenación del Territorio of the Autonomous Community of Madrid granted official permits to accessing sites and trapping.

Statistical analyses

We examined the relationship between species richness, taxonomic composition, and nestedness of grassland ant communities with elevation (Fig 1). Our analytical strategy was to build descriptive models for the data gathered during the most intensive sampling in Guadarrama 2014 (n = 18 sites), and to validate the patterns detected with data gathered in a subset of the Guadarrama grasslands during 2015 (n = 6 sites, temporal validation) and with data gathered in the Serrota range during 2015 (n = 6 sites, spatial validation).

Fig 1. Analytical pathway followed in this study.

Three elements of ant diversity were assessed along an elevational gradient in Guadarrama and Serrota mountain ranges in Central Spain: species richness (estimated with jackknife), taxonomic composition (described with Bray-Curtis distances) and nestedness (described by indexes of nestedness). The relationships of these elements to elevation was inspected with ordination (non-metric multidimensional scaling) and models (generalized additive). Models were built with the primary dataset obtained in Guadarrama in 2014 and their predictions evaluated with smaller validation datasets.

Species richness.

First, we assessed the relationship between species richness and elevation. We estimated the species pool size at each locality with the incidence-based first order jackknife estimator, which is traditionally considered a robust method that render conservative estimates [56]. The relationship shape between estimates of richness and elevation was explored applying a generalized additive model (GAM) with Gaussian errors and a thin plate regression spline for elevation. GAMs are often used to explore the shape of the relationship between response (richness) and explanatory (elevation) variables, avoiding to impose a polynomial relationship beforehand [57, 58]. Models were built with data from Guadarrama 2014 sampling and validated with data from the Guadarrama 2015 and Serrota 2015 samplings. The mean absolute error of jackknife estimates predicted by the models was calculated to assess the constancy of species richness pattern between years and sites.

Taxonomic composition of assemblages.

We explored how species assemblages differed based on taxonomic composition by applying non-metric multidimensional scaling (NMDS) to the hemi-matrices of binary Bray-Curtis distances among grasslands derived from species occurrences in pitfall traps.

Nestedness patterns.

To assess assemblage nestedness among grasslands surveyed on each mountain and year we calculated the matrix temperature (T) [59] and the NODF (Nestedness metric based on Overlap and Decreasing Fill) [60]. While T has traditionally been the most commonly used metric for assessing overall nestedness [61], the more recent NODF index is claimed to exhibit more robust statistical properties, and separate contributions to nestedness of columns (due to species incidence) and rows (due to site composition) can be quantified [60, 62]. T decreases and NODF increases with nestedness.

The significance of nestedness indices was estimated by comparison with suitable binary null models, which were simulated by randomizing the original matrix transformed to presence/absence binary data. Two null models were built to encompass the range from maximally liberal (equitable) to maximally conservative (constrained) null models [63]. The first was an equiprobable model built by randomizing rows and columns and therefore maintaining only the number of species presences (‘r00’ algorithm). The second was a proportional resampling model constructed by constraining randomization to maintain row and column totals (site richness and species incidence, respectively), while using marginal column frequency to select species (‘quasiswap’ algorithm). Thus, the first null model was more liberal and only accounted for matrix fill (the incidence of the total species set), while the second null model was more stringent, because it imposed additional structure on the data, accounting for among-site differences (e.g. different carrying capacities) and among-species differences (e.g. different rarities). Subsequently, significant nestedness was attributed to variation in observed species richness or species incidence, if evaluated with the equiprobable model, or to variation beyond that observed, if evaluated with the proportional resampling model [64]. One thousand randomizations of the original matrix were applied.

The relative degree of nestedness, i.e. how much a grassland was nested within the set of sampled grasslands in the same geographic area and time period, was evaluated by a nestedness rank, according to T. Poorer grasslands, i.e. those having lower species diversity which were a subset of richer grasslands, were assigned higher ranks. These ranks were estimated as the ordinate in nestedness plots built with the T index, which were calculated as (k—0.5)/n for k = 1…, n rows (e.g. the bottom row in the graph, where k = 18 was the more nested site, which for the 2014 sampling in Guadarrama had a rank of (18–0.5)/18 = 0.97).

The shape of the relationship between nestedness and elevation during the 2014 sampling in Guadarrama (n = 18) was explored using GAM with Gaussian errors and a thin plate regression spline for elevation. This model was validated using Guadarrama 2015 data (temporal validation). A low mean absolute error of predicted ranks would suggest the nestedness rank of plots did not vary between years. Similarly, the model built with Guadarrama 2014 sampling data was validated using the Serrota 2015 data (spatial validation). A low mean absolute error of predicted ranks would suggest the nestedness rank of plots did not vary between regions.

The contributions of spatial turnover and nestedness to the distribution pattern in Guadarrama 2014 data were calculated using three beta diversity indices: Sørensen-based multiple-site dissimilarity (βSOR), Simpson-based multiple-site dissimilarity (βSIM), and nestedness-resultant multiple-site dissimilarity (βNES). βSIM accounts for spatial turnover and βNES integrates dissimilarity due to nestedness, while βSOR expresses the total dissimilarity between communities and equals the sum of βSIM and βNES [42]. P-values were estimated through the equiprobable (‘r00’) null model (the proportional resampling null model was not useful to assess this partitioning of beta diversity).

Statistical analyses were performed using R (v 3.5.0; R Core Team 2018) and specialized packages vegan (v. 2.5–1) [65], and betapart (1.5.0) [66].


We detected 37 species, all recorded in Guadarrama (35 in 2014 and 26 in 2015, 25 were shared between years) and 20 species in Serrota (all species shared with Guadarrama; note the different sample sizes). A total of 15 species were common among the three surveys (S1 Table).

Jackknife estimates of ant species richness in Guadarrama 2014 ranged from three (SE = 0) species in most of the highest grasslands to 18.5 (SE = 2.6) at intermediate elevations (Table 1). Estimates of richness related to elevation were positive below 1100 m a.s.l. and negative until a lower limit was reached at ca. 2000 m a.s.l. (Fig 2). Overall, richness exhibited a hump-shaped relationship with elevation, which we described using GAM with a spline for elevation, roughly equivalent to a third-order degree polynomial (equivalent df = 4.43, F = 16.01, P < 0.0001, D2 = 83.8%, Fig 2). This pattern of species richness was more similar between years than between mountain ranges (mean absolute errors of predictions were 1.4 species for Guadarrama 2015 data; and 2.6 species for Serrota 2015 data).

Fig 2. Relationship between first-order jackknife estimates of ant species richness (see Table 1) and elevation in dry grasslands of a Mediterranean range in central Spain.

Curve and 95% IC from GAM with Gaussian errors fit to the Guadarrama 2014 survey (black circles). Richness estimates for the surveys in Guadarrama 2015 (grey circles) and Serrota 2015 (open circles) were superimposed. Elevation values were slightly jittered to avoid overlap among some points.

Table 1. Observed and estimated species richness of ants in dry grasslands in central Spain.

A NMDS solution was built that satisfactorily summarized the Bray-Curtis distances among grasslands in both years and study regions (stress = 0.10, linear R2 between Bray-Curtis and NMDS distances = 0.95). This scaling separated grasslands roughly according to elevation, but not regions or years and suggested an elevation threshold of 1700 m a.s.l. was a suitable elevation to distinguish the two groups (Fig 3).

Fig 3. Non-metric multidimensional scaling (NMDS) of ant assemblages based on binary Bray-Curtis distances among grasslands calculated with species occurrences from pitfall traps in a Mediterranean range of central Spain.

Circles represent data from Guadarrama (black: year 2014, grey: year 2015) and Serrota (open circles) ranges. Symbol sizes are proportional to the elevation of sampling plots. As reference, circles are superimposed to a smooth elevation surface (estimated using a GAM of elevation on a bivariate spline of NMDS scores). The positions of some illustrative species are given as reference.

Ant species assemblages were nested, showing a pattern suggesting differences in species richness among localities were more important than differences in prevalence among species (nestedness among rows was higher than nestedness among columns, Table 2, S2 Table). Nestedness ranks for Guadarrama 2014 was described with a curvilinear term (spline) for elevation, roughly similar to a third-degree cubic polynomial (df = 3.89, F = 15.38, P < 0.0001, D2 = 85.6%, Fig 4). The subset of these grasslands sampled in 2015 maintained their nestedness ranks and the model transferred to 2015 data (mean absolute error of predicted ranks was 0.080, S1 Fig). The model did not transfer between study regions (mean absolute error of predicted ranks was 0.17, S2 Fig). Largely, nestedness increased with elevation, with the exception of the lowest and highest elevation grasslands.

Fig 4. Generalized additive model (GAM) of nestedness ranks (based on nestedness temperature (T) index) for elevation in ant species assemblages in dry grasslands of a Mediterranean range in central Spain.

Curve and 95% IC from GAM with Gaussian errors fit to the Guadarrama 2014 survey (black circles). Nestedness ranks for the Guadarrama 2015 (grey circles) and Serrota 2015 (open circles) surveys are superimposed. Low ranks indicate poorer species community richness, where species are a subset of richer species communities. Elevation values were slightly jittered to avoid overlap among some points.

Table 2. Nestedness indices for dry grassland ant assemblages in Guadarrama range.

Species turnover and nestedness were significant beta diversity components, although species turnover among grasslands was more important than pure nestedness of assemblages (βSOR = 0.88, βSIM = 0.79, βNES = 0.09, all P-values = 0.001). This relationship among beta diversity components did not vary among surveys (S3 Table).


Ant species richness, taxonomic composition and nestedness changed predictably with elevation in the Mediterranean mountains we investigated, exhibiting largely consistent patterns between years and among regions. These changes were more notable along mid-elevations and associated more clearly with differences of species richness among sites than with prevalence or abundance among species. To our knowledge, this is the first study specifically designed to describe ant community species richness and taxonomic composition responses to elevational changes in the Mediterranean Basin. However, we restricted our study to grasslands, therefore the results might not be a suitable model system for other habitat types. Notwithstanding, grasslands are among the ecosystems exhibiting greater economic and ecological relevance in the Mediterranean Basin [67, 68].

Species richness showed a hump-shaped relationship with elevation, peaking at ca. 1100 m a.s.l. This model depiction fit to the primary dataset (Guadarrama 2014), transferred adequately to the 2015 Guadarrama dataset, and also to the spatial validation dataset in the 2015 Serrota range. Despite geometric constraints as mid-domain effects were described to explain these curve types [30], more recent studies tended to downplay the importance of these mechanisms [24, 29, 67]. In fact, while mid elevation peaks in species diversity were reported as relatively common [28, 29], these observations are far from universal, suggesting regional factors play an important role in driving elevational patterns of species diversity. Interestingly, research showed monotonic increases in ant species richness were common in temperate climates [1921], where elevation was correlated with temperature. In arid climates, monotonic decreases were observed [22, 23], where hydric stress was ameliorated with altitude. Indeed, hydric stress and temperature are the two main elevational correlates in Mediterranean climates, with water availability limiting communities at low elevations, while at high elevations cold temperature stress is more important [6, 7]. This double constraint might drive a hump-shaped spatial pattern of ant species richness in Mediterranean mountains.

Most studies on ant communities reported species richness positively responded to temperature [1921, 24, 26, 27, 69, 70], but a number of findings also emphasized the role of water availability [22, 29, 33, 34, 71]. Cold temperatures can reduce local ant species richness by direct effects that limit ant activity, such as reduced foraging time [35, 72], and, at larger biogeographical scales, cold temperatures can also limit species pools by lowering speciation rates [69]. Azcárate et al. [72] reported low humidity, in turn, can limit colony activation by reducing foraging possibilities, and therefore constitutes a main environmental filter. Alternatively, temperature and water availability can facilitate ant species richness indirectly, these abiotic factors affecting primary productivity and therefore the range and abundance of resources ant colonies exploit [33, 3537]. Diversity-productivity hypothesis states that as productivity increases, so does the availability of energy and resources, so density and size of colonies also increase. These relationships should increase local species richness because the abundance of individuals lowers local extinction risks or may activate a sampling mechanism [73, 74]. In Mediterranean climates, primary productivity can be limited by cold temperatures and summer drought [75], so maximum primary productivity values likely occur at intermediate elevations, where summer drought is not too severe and temperatures are not too cold. Therefore, if species richness increases with primary productivity, a humped curve is also expected.

As anticipated, elevation also affected the taxonomic composition of ant communities. We observed a ca. 1700 m threshold separating high mountain ant species communities from those along the lower elevational gradient. This threshold seemed consistent among regions and between years. Furthermore, although nestedness was a significant component of beta diversity, most elevational shifts among communities were attributable to species turnover. This result suggested the communities with lowest ant species diversity (high mountain communities) were also the most unique in a regional context. The singularity of high elevation ant communities was previously observed in different biomes [22, 24, 34, 35], which reinforced the conservation value of the Mediterranean mountains reported for other taxa [7678].

The examination of community nestedness suggested current ant assemblages are context-dependent and likely highly vulnerable to global warming and other anthropogenic changes. This is because, first, species turnover exhibited a dominant role over pure nestedness, which indicated different and characteristic groups of ant species occurred along an elevational gradient, and at the very least, ant species community composition was distinct at high elevations (> 1700 m) (Fig 3). We want to emphasize that if species distributions followed gradually changing abiotic conditions (e.g. a decreasing temperature gradient with elevation), then we would expect a concomitant change in the taxonomic composition of ant assemblages, rather than the development of new, characteristic, species groups [42, 79]. It is also illuminating to consider that nestedness arises with contributions from differences among species and among sites [61]. Nestedness patterns elsewhere were explained as a simple sampling mechanism, where the smaller species group in less diverse, i.e. poorer communities were a subset of species in more diverse, i.e. richer communities, reportedly when the studied localities differed in resource availability (or productivity) and this factor determined species richness [74, 80]. However, this implied species attributes notably contributed to nestedness, because rarer species with small distributional ranges (often specialists or poor-dispersers) were not generally sampled by the least diverse, i.e. poorest communities, while the more common taxa exhibited a wide distributional range [63]. In our study, the least diverse communities were more nested than diverse ant communities, but nestedness among species was less important than among sites. We conclude the sampling mechanism did not fully explain the nested patterns in the ant communities we studied. We believe that habitat and abiotic filtering provide more plausible explanations for those patterns. However, we carefully controlled by design the habitat type (arid grasslands in gentle south facing slopes), which implied those habitat filters ─ if an integral component ─ should be fine grained. Nestedness patterns along the elevational gradient were temporally constant, but varied between mountain ranges, indicating ant community composition was spatially dependent. Finally, an historic explanation of current ant species distribution patterns in a landscape context is an important element to include. We studied a mountain range within the Mediterranean biome where major landscape changes have not occurred over the last thirty years. Extensive afforestation was conducted during 1950’s and a progressive abandonment of the region took place between the 1960’s and 1980’s. All of our study sites were covered by grasslands since at least 1975 (a long-term time series of aerial photographs may be accessed at the Statistical Institute of the Autonomous Community of Madrid: Therefore, we assume all of them are equally accessible from the regional species pool. However, we cannot disregard other time-related mechanisms, which might explain community composition, such as priority effects favoring one or more species, depending on their relative order of arrival to a site [81], or metapopulation dynamics involving local extinctions and recolonizations in periods beyond this two-year study [82].

Overall, species taxonomic composition varied non-linearly with elevation. The insufficiency of the sampling mechanism emphasizes that ant assemblages are highly vulnerable to global changes on climate and anthropogenic impacts, which might affect species at the habitat and/or community level. It is unlikely species’ range shifts that track environmental change will maintain current ant species community composition.

Supporting information

S1 Table. Ant species occurrences and environmental characteristics of sampling plots.

IDPlot: plot identification. Survey: G2014 for Guadarrama range in 2014, G2015 for Guadarrama range in 2015 and S2015 for Serrota range in 2015. For each sampling plot we give the elevation (in m), latitude and longitude (UTM, datum European 1950), mean annual rainfall (MeanAnnualRainfall) and air temperature (MeanAnnualTemperature) according to the Atlas Climático Digital de la Península Ibérica (, and maximum and minimum soil) temperatures during sampling periods measured with data loggers buried at ground level (MaximumWeekTemperatureSoil and MinimumWeekTemperatureSoil, respectively). Occurrence of the species in the plots is given in the following columns.


S2 Table. Nestedness indices for dry grassland ant assemblages in surveys from all study areas in central Spain.

Guadarrama range (-G2014- year 2014: 18 grasslands, 35 species; -G2015- year 2015: 6 grasslands, 26 species) and Serrota range (-S2015- year 2015: 6 grasslands, 20 species). Indices are Nestedness metric based on Overlap and Decreasing Fill (NODF), NODFr for rows (i.e., localities) and NODFc for columns (i.e., species) and matrix temperature (T). Numbers under headings for indices provide index values followed by P-values estimated by equiprobable (‘r00’) binary null models and proportional resampling (‘quasiswap’). Significant P-values (P < 0.05) are in bold face. Fill: matrix fill (sum of 1s/sum of cells).


S3 Table. Multiple-site dissimilarities of beta diversity.

Multiple-site dissimilarities accounting for the spatial turnover (βSIM) and the nestedness components (βNES) of beta diversity, and sum of both values (βSOR) for dry grassland ant assemblages in all study areas in central Spain. G2014: Guadarrama range 2014; G2015: Guadarrama range 2015; S2015: Serrota range 2015. P-values estimated by equiprobable binary null models (‘r00’) are given between parentheses. Significant P-values (P < 0.05) are in bold face.


S1 Fig. Temporal validation of the relationship between nestedness and elevation.

Generalized additive model (GAM) of nestedness ranks (based on nestedness temperature index) on elevation in ant assemblages from Guadarrama range (central Spain) fit to Guadarrama 2014 data and validated with Guadarrama 2015 data.


S2 Fig. Spatial validation of the relationship between nestedness and elevation.

Generalized additive model (GAM) of nestedness ranks (based on nestedness temperature index) on elevation in ant assemblages from Guadarrama range (central Spain) fit to Guadarrama 2014 data and validated with Serrota 2015 data.


S3 Fig. Relationships between temperature and elevation.

Linear regressions between elevation and mean annual (air) temperature (top left, R2 = 94%), maximum (soil) temperature (top right, R2 = 80%), minimum (soil) temperature (bottom left, R2 = 96%), and mean annual rainfall (bottom right, R2 = 91%). Regressions built for Guadarrama 2014 data (n = 18 sites, black circles). Data for Guadarrama 2015 (dark grey circles) and Serrota 2015 (white circles) are depicted as a reference. Temperatures measured in Celsius degrees and elevation in meters. Annual climatic data from the Digital Climatic Atlas of the Iberian Peninsula ( Soil temperatures measured for the sampling period (a week) with data loggers buried at ground level. Note that 2014 was cooler than 2015, in spite of which models for richness and nestedness built in 2014 validated well with data from 2015.



This study could not have been carried out without the enthusiastic support of students at Department of Ecology UAM (Cristina Rota, Víctor Pascual, Jesús Miranda, Celia Santos, Rubén Altozano, Inés Cueva) and friends (Montse Reina, Esperanza Iranzo, Aimara Planillo, Carlos Pérez Carmona) who helped with field and laboratory work. Dr. Xavier Espadaler helped with the identification of some problematic specimens.


  1. 1. Gilman SE, Urban MC, Tewksbury J, Gilchrist GW, Holt RD. A framework for community interactions under climate change. Trends in Ecology & Evolution. 2010;25(6):325–331.
  2. 2. Bellard C, Bertelsmeier C, Leadley P, Thuiller W, Courchamp F. Impacts of climate change on the future of biodiversity. Ecology Letters. 2012;15(4):365–377. pmid:22257223
  3. 3. Oliver TH, Morecroft MD. Interactions between climate change and land use change on biodiversity: attribution problems, risks, and opportunities. Wiley Interdisciplinary Reviews: Climate Change. 2014;5(3):317–335.
  4. 4. Wilson RJ, Gutiérrez D, Gutiérrez J, Montserrat VJ. An elevational shift in butterfly species richness and composition accompanying recent climate change. Global Change Biology. 2007;13:1873–1887.
  5. 5. Devictor V, Julliard R, Couvet D, Jiguet F. Birds are tracking climate warming, but not fast enough. Proceedings of the Royal Society B: Biological Sciences. 2008;275:2743–2748. pmid:18713715
  6. 6. Walter H, Breckle SW. Walter’s vegetation of the earth: the ecological systems of the geo-biosphere. 4th ed. Berlin. Springer; 2002.
  7. 7. Schöb C, Armas C, Guler M, Prieto I, Pugnaire FI. Variability in functional traits mediates plant interactions along stress gradients. Journal of Ecology. 2013;101(3):753–762.
  8. 8. Nogués-Bravo D, Araújo MB, Lasanta T, Moreno JIL. Climate change in Mediterranean mountains during the 21st century. AMBIO: A Journal of the Human Environment. 2008;37(4):280–285.
  9. 9. Intergovernmental Panel on Climate Change (IPCC) 2013. Climate Change 2013: The Physical Science Basis, Contribution of Working Group I to the Fifth Assessment Report of the Intergovernmental Panel on Climate Change. In Stocker TF et al., editors. Cambridge, UK. Cambridge University Press; 2013.
  10. 10. Benavides R, Escudero A, Coll L, Ferrandis P, Ogaya R, Gouriveau F, et al. Recruitment patterns of four tree species along elevation gradients in Mediterranean mountains: Not only climate matters. Forest Ecology and Management. 2016;360:287–296.
  11. 11. Majer JD, Alonso LE, Schultz TR. 1st ed. Agosti D, Majer JD, Alonso LE, Schultz TR, editors. Ants. Standard methods for measuring and monitoring biodiversity. Washington D.C.: Smithsonian Institution Press; 2000.
  12. 12. Cushman JH, Lawton JH, Manly BFJ. Latitudinal patterns in European ant assemblages: variation in species richness and body size. Oecologia. 1993;95:30–37. pmid:28313308
  13. 13. Azcárate FM, Arqueros L, Sánchez AM, Peco B. Seed and fruit selection by harvester ants, Messor barbarus, in Mediterranean grassland and scrubland. Functional Ecology. 2005;19:273–283.
  14. 14. Wolff A, Debussche M. Ants as seed dispersers in a Mediterranean old-field succession. Oikos. 1999;84(3):443–452.
  15. 15. Dean WRJ, Milton SJ, Klotz S. The role of ants nest-mounds in maintaining small-scale patchiness in dry grasslands in Central Germany. Biodiversity and Conservation. 1997;6:1293–1307.
  16. 16. Philpott SM, Armbrecht I. Biodiversity in tropical agroforest and the ecological role of ants and ant diversity in predatory function. Ecological Entomology. 2006;31(4):369–377.
  17. 17. Underwood EC, Fisher BL. The role of ants in conservation monitoring: If, when and how. Biological Conservation. 2006;132(2):166–182.
  18. 18. Schmidt FA, Ribas CR, Schoereder JH. How predictable is the response of ant assemblages to natural forestry recovery? Implications for their use as bioindicators. Ecological Indicators. 2013;24:158–166.
  19. 19. Machac A, Janda M, Dunn RR, Sanders NJ. Elevational gradients in phylogenetic structure of ant communities reveal the interplay of biotic and abiotic constraints on diversity. Ecography. 2011;34:364–371.
  20. 20. Reymond A, Purcell J, Cherix D, Guisan A, Pellissier L. Functional diversity decreases with temperature in high elevation ant fauna. Ecological entomology. 2013;38(4):364–373.
  21. 21. Kwon TS, Kim SS, Chun JH. Pattern of ant diversity in Korea: An empirical test of Rapoport's altitudinal rule. Journal of Asia-Pacific Entomology. 2014;17:161–167.
  22. 22. Sanders NJ, Moss J, Wagner D. Patterns of ant species richness along elevational gradients in an arid ecosystem. Global ecology and biogeography. 2003;12(2):93–102.
  23. 23. Orabi GM, Semida FM, Abdel-Dayem MS, Sharaf MR, Zalat SM. Diversity patterns of ants along an elevation gradient at St. Catherine Protectorate, South Sinai, Egypt: (Hymenoptera: Formicidae). Zoology in the Middle East. 2011;54(1):101–112.
  24. 24. Longino JT, Colwell RK. Density compensation, species composition, and richness of ants on a neotropical elevational gradient. Ecosphere. 2011;2(3):1–20.
  25. 25. Nowrouzi S, Andersen AN, Macfadyen S, Staunton KM, VanDerWal J, Robson SKA. Ant Diversity and Distribution along Elevation Gradients in the Australian Wet Tropics: The Importance of Seasonal Moisture Stability. PLoS ONE. 2016;11(4): e0153420. pmid:27073848
  26. 26. Munyai TC, Foord SH. Ants on a mountain: spatial, environmental and habitat associations along an altitudinal transect in a centre of endemism. Journal of Insect Conservation. 2012;16:677–695.
  27. 27. Munyai TC, Foord SH. Temporal Patterns of Ant Diversity across a Mountain with Climatically Contrasting Aspects in the Tropics of Africa. PLoS ONE. 2015;10(3): e0122035. pmid:25774670
  28. 28. Sanders NJ, Rahbek C. The patterns and causes of elevational diversity gradients. Ecography. 2012;35(1):1–3.
  29. 29. Szewczyk T, McCain CM. A Systematic Review of Global Drivers of Ant Elevational Diversity. PLoS ONE. 2016;11(5): e0155404. pmid:27175999
  30. 30. Colwell RK, Lees DC. The mid-domain effect: geometric constraints on the geography of species richness. Trends in Ecology & Evolution. 2000;15(2):70–76.
  31. 31. Sanders NJ. Elevational gradients in ant species richness: area, geometry, and Rapoport's rule. Ecography. 2002;25(1):25–32.
  32. 32. Stevens GC. The elevational gradient in altitudinal range: an extension of Rapoport's latitudinal rule to altitude. The American Naturalist. 1992;140(6):893–911. pmid:19426029
  33. 33. Botes A, McGeoch MA, Robertson HG, van Niekerk A, Davids HP, Chown SL. Ants, altitude and change in the northern Cape Floristic Region. Journal of Biogeography. 2006;33:71–90.
  34. 34. Smith MA, Hallwachs W, Janzen DH. Diversity and phylogenetic community structure of ants along a Costa Rican elevational gradient. Ecography. 2014;37(8):720–731.
  35. 35. Brühl CA, Mohamed M, Linsenmair KE. Altitudinal distribution of leaf litter ants along a transect in primary forests on Mount Kinabalu, Sabah, Malaysia. Journal of Tropical Ecology. 1999;15:265–277.
  36. 36. Kaspari M, O'Donnell S, Kercher JR. Energy, Density, and Constraints to Species Richness: Ant Assemblages along a Productivity Gradient. The American Naturalist. 2000;155(2):280–293. pmid:10686166
  37. 37. Gotelli NJ, Ellison AM. Biogeography at a regional scale: determinants of ant species density in New England bogs and forests. Ecology. 2002;83(6):1604–1609.
  38. 38. Lavergne S, Mouquet N, Thuiller W, Ronce O. Biodiversity and climate change: integrating evolutionary and ecological responses of species and communities. Annual Review of Ecology, Evolution and Systematics. 2010;41: 321–350.
  39. 39. Laiolo P, Seoane J, Illera JC, Bastianelli G, Carrascal LM, Obeso JR. The evolutionary convergence of avian lifestyles and their constrained coevolution with species' ecological niche. Proceedings of the Royal Society B: Biological Sciences. 2015;282(1821):20151808. pmid:26674945
  40. 40. Laiolo P, Seoane J, Obeso JR, Illera JC. Ecological divergence among young lineages favours sympatry, but convergence among old ones allows coexistence in syntopy. Global Ecology and Biogeography. 2017;26(5):601–608.
  41. 41. Kodric-Brown A, Brown JH. Highly structured fish communities in Australian desert springs. Ecology. 1993;74:1847–1855.
  42. 42. Baselga A. Partitioning the turnover and nestedness components of beta diversity. Global Ecology and Biogeography. 2010;19:134–143.
  43. 43. Wright DH, Reeves JH. On the meaning and measurement of nestedness of species assemblages. Oecologia. 1992;92:416–428. pmid:28312609
  44. 44. Ulrich W, Gotelli NJ. Null model analysis of species nestedness patterns. Ecology. 2007;88(7):1824–1831. pmid:17645028
  45. 45. Gaston KJ, Davies RG, Orme CDL, Olson VA, Thomas GH, Ding TS, et al. Spatial turnover in the global avifauna. Proceedings of the Royal Society B: Biological Sciences. 2007;274:1567–1574. pmid:17472910
  46. 46. Fielding CA, Whittaker JB, Butterfield JEL, Coulson JC. Predicting responses to climate change: the effect of altitude and latitude on the phenology of the Spittlebug Neophilaenus lineatus. Functional Ecology. 1999;13(1):65–73.
  47. 47. Maguire KC, Nieto-Lugilde D, Fitzpatrick MC, Williams JW, Blois JL. Modeling species and community responses to past, present and future episodes of climatic and ecological change. Annual Review of Ecology, Evolution and Systematics. 2015;46:343–368.
  48. 48. Kleinwächter M, Rickfelder T. Habitat models for a riparian carabid beetle: their validity and applicability in the evaluation of river bank management. Biodiversity and Conservation. 2007;16(11):3067–3081.
  49. 49. Duncan RP, Cassey P, Blackburn TM. Do climatic envelop models transfer? A manipulative test using dung beetle introductions. Proceedings of the Royal Society B: Biological Sciences. 2009;267:1449–1457.
  50. 50. Torres LG, Sutton PJH, Thompson DR, Delord K, Weimerskirch H, Sagar PM, et al. Poor transferability of species distribution models for a pelagic predator, the grey petrel, indicates constrasting habitat preferences across ocean basins. PLoS ONE. 2015;10(3): e0120014. pmid:25748948
  51. 51. i Casals MN, Pons X, i Nolla JMR. [Digital Climatic Atlas of the Iberian Peninsula. Methodology and applications in bioclimatology and geobotany] Bellaterra UAB; 2005. Spanish.
  52. 52. Azcárate FM, Peco B. Abandonment of grazing in a mediterranean grassland area: consequences for ant assemblages. Insect Conservation and Diversity. 2012;5:279–288.
  53. 53. Andersen AN. Sampling communities of ground-foraging ants: Pitfall catches compared with quadrat counts in an Australian tropical savanna. Australian Journal of Ecology. 1991;16:273–279.
  54. 54. Azcárate FM, Seoane J, Castro S, Peco B. Drove roads: Keystone structures that promote ant diversity in Mediterranean forest landscapes. Acta Oecologica. 2013;49:107–115.
  55. 55. Hevia V, Azcárate FM, Oteros-Rozas E, González JA. Exploring the role of transhumance drove roads on the conservation of ant diversity in Mediterranean agroecosystems. Biodiversity and Conservation. 2013;22:2567–2581.
  56. 56. Magurran AE. Measuring biological diversity. London: Blackwell; 2004.
  57. 57. Seoane J, Viñuela J, Díaz-Delgado R, Bustamante J. The effects of land use and climate on red kite distribution in the Iberian peninsula. Biological Conservation. 2003;111:401–414.
  58. 58. Zuur AF. 2012. A beginner’s guide to Generalized Additive Models with R. Newburgh, NY, USA: Highland Statistics Limited; 2012.
  59. 59. Rodríguez-Gironés MA, Santamaría L. A new algorithm to calculate the nestedness temperature of presence–absence matrices. Journal of Biogeography. 2006;33(5):924–935.
  60. 60. Almeida-Neto M, Guimarães P, Guimarães PR Jr, Loyola RD, Ulrich W. A consistent metric for nestedness analysis in ecological systems: reconciling concept and measurement. Oikos. 2008;117:1227–1239.
  61. 61. Ulrich W, Almeida-Neto M, Gotelli NJ. A consumer's guide to nestedness analysis. Oikos. 2009;118(1):3–17.
  62. 62. Ulrich W, Gotelli NJ. Pattern detection in null model analysis. Oikos. 2013;122(1):2–18.
  63. 63. Nolte D, Schuldt A, Gossner MM, Ulrich W, Assmann T. Functional traits drive ground beetle community structures in Central European forests: Implications for conservation. Biological Conservation. 2017;213:5–12.
  64. 64. Moore JE, Swihart RK. Toward ecologically explicit null models of nestedness. Oecologia. 2007;152(4):763–777. pmid:17370091
  65. 65. Oksanen J, Blanchet FG, Friendly M, Kindt R, Legendre P, McGlinn D, et al. Vegan: community ecology package R. Version 2.5–1 [software]. 2018 [cited 21 July 2018]. Available from:
  66. 66. Baselga A, Orme CDL. betapart: an R package for the study of beta diversity. Methods in Ecology and Evolution. 2012;3(5):808–812.
  67. 67. Joffre R, Rambal S, Ratte JP. The dehesa system of southern Spain and Portugal as a natural ecosystem mimic. Agroforestry Systems. 1999:45:57–79.
  68. 68. Bergmeier E, Petermann J, Schröder E. Geobotanical survey of wood-pasture habitats in Europe: diversity, threats and conservation. Biodiversity and Conservation. 2010;19:2995–3014.
  69. 69. Sanders NJ, Lessard JP, Fitzpatrick MC, Dunn RR. Temperature, but not productivity or geometry, predicts elevational diversity gradients in ants across spatial grains. Global Ecology and Biogeography. 2007;16(5):640–649.
  70. 70. Malsch AKF, Fiala B, Maschwitz U, Mohamed M, Nais J, Linsenmair KE. An analysis of declining ant species richness with increasing elevation at Mount Kinabalu, Sabah, Borneo. Asian Myrmecology. 2008;2:33–49.
  71. 71. Jenkins CN, Sanders NJ, Andersen AN, Arnan X, Brühl CA, Cerda X, et al. Global diversity in light of climate change: the case of ants. Diversity and Distributions. 2011;17:652–662.
  72. 72. Azcárate FM, Kovacs E, Peco B. Microclimatic Conditions Regulate Surface Activity in Harvester Ants Messor barbarus. Journal of Insect Behavior. 2007;20(3):315–329.
  73. 73. Seoane J, Laiolo P, Obeso JR. Abundance leads to more species, particularly in complex habitats: a test of the increased population size hypotheses in bird communities. Journal of Biogeography. 2017;44:556–566.
  74. 74. Storch D, Bohdalková E, Okie J. The more‐individuals hypothesis revisited: the role of community abundance in species richness regulation and the productivity–diversity relationship. Ecology Letters. 2018;21:920–937. pmid:29659144
  75. 75. Flexas J, Diaz-Espejo A, Gago J, Gallé A, Galmés J, Gulías J, et al. Photosynthetic limitations in Mediterranean plants: A review. Environmental and Experimental Botany. 2014;103:12–23.
  76. 76. Médail F, Quézel P. Biodiversity Hotspots in the Mediterranean Basin: Setting Global Conservation Priorities. Conservation Biology. 1999;13(6):1510–1513.
  77. 77. Sfenthourakis S, Legakis A. Hotspots of endemic terrestrial invertebrates in southern Greece. Biodiversity & Conservation. 2001;10(8):1387–1417.
  78. 78. Tellería JL. Distribution of the Red-backed Shrike Lanius collurio at its western range boundary: patterns and conservation prospects. Ardeola. 2018;65(2):221–232.
  79. 79. Baselga A. Determinants of species richness, endemism and turnover in European longhorn beetles. Ecography. 2008;31:263–271.
  80. 80. Evans KL, Warren PH, Gaston KJ. Species-energy relationships at the macroecological scale: a review of the mechanisms. Biological Reviews. 2005;80:1–25. pmid:15727036
  81. 81. Wilbur HM, Alford RA. Priority effects in experimental pond communities: responses of Hyla to Bufo and Rana. Ecology. 1985;66(4):1106–1114.
  82. 82. Hanski I. Metapopulation dynamics. Nature. 1998;396:41–49.