Introduction
Biological diversity is crucial for ecosystem functioning (Mace et al., 2012) and varies spatially and temporally (Gaggiotti et al., 2018; González-Megías et al., 2007). However, the factors that drive biodiversity variation among different groups of organisms are not fully understood (González-Megías et al., 2007). Climate and anthropogenic activities, such as land use changes, influence biodiversity (Aguirre-Gutiérrez et al., 2017; Devictor et al., 2012; Fine, 2015). Understanding these effects is vital for better biodiversity management and protection.
Butterflies are among the most diverse insect orders globally (Kawahara & Breinholt, 2014). Despite this, conservation efforts for butterflies, particularly in the tropics, are limited. Increasing knowledge about their populations and the factors influencing them is crucial (Dunn, 2005; Sánchez-Bayo & Wyckhuys, 2019). Moths and butterflies rely heavily on plants and are sensitive to environmental factors like temperature, humidity, light, and habitat structure, which affect their life cycles and behaviors (Aguirre-Gutiérrez et al., 2017). Their sensitivity makes them excellent bioindicators. Butterflies’ presence, abundance, and diversity reflect ecosystem health and quality (Fleishman & Murphy, 2009; Oostermeijer & Van Swaay, 1998). Additionally, butterflies are easy to monitor due to their diurnal activity, abundance, and well-documented taxonomy, making them valuable for assessing biodiversity and environmental changes.
At the local level, elevation, habitat, and seasonality influence butterfly diversity (Aguirre-Gutiérrez et al., 2017; Camero & Calderón, 2007; Carrero et al., 2013; Monteagudo et al., 2001; Palacios & Constantino, 2006; Stephen & Sánchez, 2014). Diversity tends to decrease at higher elevations (Camero & Calderón, 2007; Carrero et al., 2013; Monteagudo-Sabaté et al., 2001). Landscape structure also impacts butterfly abundance and richness (Aguirre-Gutiérrez et al., 2017). It remains unclear whether slightly disturbed environments support greater diversity than more heavily disturbed ones (Concha-Bloomfield & Parra, 2006; Tobar & Ibrahim, 2010). Additionally, seasonality influences butterfly community structure, with higher diversity observed during months of higher rainfall (Braby, 1995; Grøtan et al., 2012; Spitzer et al., 1993). The influence of these factors may vary by site or taxonomic group, as different families or species may respond differently to local conditions. This variation highlights the importance of studying these factors at family and regional levels.
Studying butterfly population variation in tropical areas, considering environmental factors like habitat fragmentation, climate change, and seasonal fluctuations, can provide valuable insights into their conservation (Bonebrake et al., 2010; Bonebrake & Deutsch, 2012). The aim of this study was to examine the variation in butterfly richness and abundance across seasons (dry-wet), elevational gradients (1 200 to 1 800 m above sea level), and habitat types (grassland and riparian forest) in a mountain landscape in Costa Rica.
Materials and methods
The study was carried out in San Miguel de Grecia, Costa Rica (10°07’07.85” - N 84°17’30.24” W) (Fig. 1), in an elevational gradient from 1 200 to 1 800 meters above sea level, between the Vigía and El Monte rivers. The temperature ranges between 18º and 28°C (Solano & Villalobos, 1996); the rainy period occurs between May and November, and the dry period occurs between December and April (Municipalidad de Grecia, 2003; Instituto Meteorológico Nacional (IMN), 2018). The area is located in the lower montane humid forest life zone (Holdridge, 1967) on the Pacific side of the country. The site consists of extensive secondary forests, fragments of mature forests, crops (coffee, tomato, and chili), and livestock, which is thus a typical rural area.
We selected two types of habitats: grasslands and riparian forests. The riparian forest is characterized by vegetation on the river’s edge consisting of oak trees (Quercus sp.), Heliconia sp., and Melastomataceae. At 1 200 m, the vegetation is more deforested compared to similar forests at other elevations. During the dry season, the river continues to flow, but it decreases to 1 200 m and 1 800 m due to water extraction for agricultural irrigation and livestock use. The grasslands are dominated by grasses for cattle and other plants such as Solanum myriacanthum (Solanaceae), scattered custard apple trees (Annona cherimola), and fig trees (Ficus spp.). The landscape structure of this site is affected by seasonality since most of the herbs have considerably reduced foliage in the dry season.
We conducted fieldwork between February and September 2018. We established six sampling stations at three elevations: 1 200 m, 1 500 m, and 1 800 m. At each elevation, we selected two sites representing qualitatively distinct habitats: grasslands and riparian forest (Fig. 1). At each site, we established three transects per habitat (grasslands and riparian forest), resulting in six transects per elevation and 18 transects in total. Each transect measured 75 m in length and 4 m in width.
We conducted sampling on three consecutive days per month, with one day dedicated to sampling the transects at each elevation. Each sampling day started at 7:00 h and ended at 13:00 h, with 15 minutes of active observation per transect. At each transect, two people conducted qualitative observations and systematically collected data. The two individuals walked simultaneously along the transect, maintaining a separation of 2 meters to cover the 4-meter width. The observation time at each transect was 15 minutes, during which we recorded all relevant observations (e.g., species sighted, behavior). After completing a transect, we allocated 30 minutes to move to the following sampling site within the same elevation. In total, we sampled 18 hours per site (3 days of 6 hours each). Considering the six sites, the effective sampling time accumulated by the end of the study was 108 hours.
We used a butterfly net 2 m long and 0.5 m in diameter for capturing specimens. We placed two posts per transect, one at 0 m and the other at 75 m; we used a banana as an attractant (Baker & Baker, 1975), which was hung on each post a day before sampling. The bananas were left to ripen for two weeks before being used as bait. We trapped all butterflies encountered during the 15-minute round trip on the transect and temporarily placed them in a cloth bag. At the end of the sampling period, one individual of each species was retained for later identification in the Entomology Laboratory of the School of Biology, University of Costa Rica, using Lamas (2004), DeVries (1987), DeVries (1997), and Warren et al. (2013). At least one individual per species was vouchered in the Museo de Zoología at the Universidad de Costa Rica (MZCR).
We summarized the data by habitat, elevation, and season and estimated species richness and abundance for each condition. To compare the richness between elevations, habitats, and seasons, we used rarefaction analysis using Hill numbers of order 0, 1, 2 (Chao et al., 2014). To determine the effect of season, habitat, and elevation on the abundance and richness of butterfly species, both in the overall data and for each family, we used generalized linear models (GLM) with the Poisson distribution because the frequencies are low counts.
For the analysis of abundance by family, we selected only those families with more than 20 individuals and those with more than five species for the richness analysis. The significance of each variable (habitat, elevation, and season) was tested in the models using maximum likelihood tests. We analyzed the similarity of the structure of butterfly assemblages according to elevation, habitat, or seasonality using a Bray-Curtis similarity index. We plotted the distances using a non-metric multidimensional scaling (NMDS) ordination method. We performed all analyses using the R program (version 3.5.3) (R Development Core Team, 2022).
Results
We found 1 421 butterflies belonging to six families, 20 subfamilies, 96 genera, and 151 species. Nymphalidae was the best-represented family, with 936 individuals in 85 species and 55 genera (Supplementary information: Table 1). In contrast, the other families found were Pieridae, Hesperiidae, Lycaenidae, Papilionidae, and Riodinidae; each family had fewer than 250 individuals and fewer than 30 species. The most abundant species was Hermeuptychia hermes (Satyrinae), with 119 individuals, followed by Celastrina argiolus gozara (Lycaenidae), with 115 individuals. Only six species were recorded in all habitats and during all months sampled: Catasticta nimbice bryson, Dryas iulia, Heliconius clysonymus montanus, Heliconius erato petiverana, Hermeuptychia hermes, and Morpho helenor narcissus (Supplementary information: Table 1). Most species (133 species) showed a low abundance, between 1-10 individuals during all six months of sampling, while 16 species had abundances of more than 10 individuals (Fig. 2). For 57 species, there was only a single individual recorded during the entire sampling period (Fig. 2).
Table 1 Generalized linear models of the abundance and richness of butterflies according to habitat, altitudinal gradient, and season.
| Variable | Residual Desv. | Df | P (Chi) | |
| Abundance | H0 | 591.10 | 35 | |
| Habitat | 591.05 | 34 | 0.83 | |
| H0 | 591.6 | 35 | ||
| Season | 389.6 | 34 | < 0.001 | |
| Elevation | 351.31 | 32 | < 0.001 | |
| Richness | H0 | 313.39 | 35 | |
| Habitat | 313.23 | 34 | 0.99 | |
| H0 | 313.394 | 35 | ||
| Season | 112.313 | 34 | < 0.001 | |
| Elevation | 96.614 | 32 | < 0.001 |

Fig. 2 The frequency of individuals for each butterfly species ordered according to their abundance throughout the sampling period. Some species’ names are labeled to identify some points.
Abundance: The number of individuals found in each habitat was 706 for the riparian forest and 698 for the grassland. Butterfly abundance per transect was not significantly different between habitats (Table 1, Fig. 3A). We recorded 121 individuals of Lycaenidae in the riparian forest, mostly belonging to C. argiolus gozara. We found more individuals of Hesperiidae in the grassland than in the riparian forest (Fig. 4A). The most abundant family in both habitats was Nymphalidae, among which Heliconiinae was more abundant in the riparian forest. In contrast, Satyrinae with H. hermes was the dominant species in the grasslands (Fig. 5A). In addition, a dominance of Nymphalinae individuals was found in the grasslands (Fig. 5A).

Fig. 3 Distribution of the number of butterflies/transect according to habitat (A) and according to elevation and season (B).

Fig. 4 Abundance (A, B, C) and species richness (D, E, F) of butterflies by subfamilies according to habitat (A, D), season (B, E), and elevation (C, F). Subfamilies are ordered according to abundance (A, B, C) or species richness (D, E, F).

Fig. 5 Abundance (A, B, C) and species richness (D, E, F) of butterflies by subfamily of Nymphalidae according to habitat (A, D, season (B, E) and elevation (C, F). Subfamilies are ordered according to abundance (A, B, C) or species richness (D, E, F).
On the other hand, within the elevational gradient, we found the highest abundance (587 butterflies) at 1 200 m, followed by 433 individuals at 1 800 m, and 401 individuals at 1 500 m (Fig. 3B). Butterfly abundance per transect differed significantly between elevations (Table 1, Fig. 3B), with the lower elevation having the highest butterfly abundance. The family Lycaenidae was most abundant at 1 800 m, with 128 individuals, compared to the other two elevations, while we did not observe the families Papilionidae and Riodinidae at 1 500 m (Fig. 4C). In general, Nymphalidae was the most abundant family at all three elevations (Fig. 4C). Nymphalinae and Heliconiinae were most abundant at 1 200 m, Satyrinae at 1 500 m, and Danainae at 1 800 m. (Fig. 5C).
The abundance of butterflies was higher during the rainy than the dry months (Fig. 4B), with 972 individuals during the wet season and 449 during the dry season (Table 1, Fig. 3B). During both seasons, Nymphalidae was the family with a greater abundance. Lycaenidae was more abundant during the dry season (Fig. 4B). Conversely, within Nymphalidae, the subfamilies Apaturinae and Limenitidinae were absent during the dry season. (Fig. 5B). Satyrinae was the only subfamily that remained constant during the two seasons (Fig. 5B). Heliconiinae was the most abundant subfamily in the wet season, with 166 individuals, and Dryas iulia was the most abundant species (Fig. 4B). In the wet season, we recorded 142 individuals of the Ithomiini subfamily, and Ithomia heraldica was the most abundant species in this subfamily (Fig. 5B).
Nymphalidae, Lycaenidae, and Pieridae were the most abundant families (Fig. 4). However, only in Lycaenidae, habitat and elevation affected abundance (Table. 2, Fig. 6). Lycaenidae was significantly more abundant in high elevations near the river. In contrast, the abundance in the other sampling sites was very low (Fig. 6). Elevation also affected the abundance of Nymphalidae and Pieridae since we found more individuals at 1 200 m. However, habitat did not affect butterfly abundance in any elevation (Table. 2, Fig. 6).
Table 2 Generalized linear model of the abundance and richness by family butterflies according to season and elevation, for the most abundant families.
| Family | Variable | Residual Desv. | Df | P (Chi) | |
| Abundance | Nymphalidae | H0 | 556.01 | 35 | |
| Habitat | 552.16 | 34 | 0.050 | ||
| Elevation | 491.97 | 32 | < 0.001 | ||
| Lycaenidae | H0 | 411.12 | 35 | ||
| Habitat | 287.97 | 34 | < 0.001 | ||
| Elevation | 116.61 | 32 | < 0.001 | ||
| Pieridae | H0 | 232.04 | 35 | ||
| Habitat | 230.30 | 34 | 0.23 | ||
| Elevation | 218.12 | 32 | < 0.001 | ||
| Richness | Nymphalidae | H0 | 352.21 | 47 | |
| Habitat | 352.20 | 46 | 0.95 | ||
| Elevation | 345.60 | 44 | < 0.05 | ||
| Pieridae | H0 | 121.66 | 47 | ||
| Habitat | 121.20 | 46 | 0.49 | ||
| Elevation | 114.14 | 44 | < 0.05 |

Fig. 6 Distribution of the abundance of butterflies/transect/day of the Nymphalidae, Lycaenidae and Pieridae, according to elevation and habitat.
Species richness of butterflies: We found 110 species in the grassland compared to 113 species found in the riparian forest, indicating no significant effect of habitat on species richness (Table 1). Nymphalidae was the most diverse family in both habitats (Fig. 4D). In both the riparian forest and the grasslands, the second most diverse family was Pieridae (Fig. 4D). The subfamily Apaturinae was found only in grassland, while Satyrinae had more species in the riparian forest, although it was more abundant in the grassland (Fig. 5D).
In the elevational gradient, we found 94 species at the lowest elevation. In contrast, at 1 500 m and 1 800 m, we found 77 and 81 species, respectively, resulting in a significant effect of elevation on species richness (Table 1). We found higher species richness in Pieridae and Nymphalidae at 1 200 m. Furthermore, we did not find Riodinidae and Papilionidae species at 1 500 m. Still, there were more Lycaenidae species at 1 800 m (Fig. 4F). For all elevations, the family with the highest number of species was Nymphalidae (Fig. 4F). Within this family, Danainae was primarily found at medium and high elevations, while for Nymphalinae and Heliconiinae, more species were found at 1 200 m (Fig. 5F).
In the rainy season, we found 142 species, while 52 species were found in the dry season, indicating that seasonality influenced the species’ richness (Table 1). Pieridae and Nymphalidae showed greater abundance in the rainy season (Fig. 6). Nymphalidae had the highest number of species in both the rainy and dry seasons. Still, we did not find Apaturinae and Limenitidinae species during the dry season (Fig. 5E). Danainae was the most diverse subfamily during the rainy season (Fig. 5E).
According to the rarefaction analysis, in terms of total species, no significant difference was found between the riparian forest and grassland habitats (Fig. 7A). However, the grassland was richer in common and abundant species than the river, where there were more rare species (Fig. 7A). We observed 39 species in the river absent from the grassland, and 40 species in the grassland absent from the river. On the other hand, at 1800 m, we found rarer and less abundant species compared to the different elevations (Fig. 7B). Also, the most abundant and common species were found at 1200 m and 1500 m, with similar species richness at both elevations. In addition, there were significant differences in richness between the dry and rainy seasons (Fig. 7C), and we observed rarer species in the rainy season (Fig. 7C).

Fig. 7 Rarefaction curves of butterfly species according to habitat (A), elevational gradient (B), and season (C).
Regarding the species richness within the most diverse families, Nymphalidae had more species at 1 200 m than 1 800 m. However, species richness did not differ between habitats. Pieridae had more species at 1 200 m compared to the other elevations, with habitat having no significant effect on species richness (Table 2). The other four families identified in the sampling did not show differences in species richness with respect to elevation and habitat.
Seasonality was the variable with a more significant effect on the species composition of the butterfly assemblages (r2 = 0.51, p = 0.003). At the same time, we did not find an effect of habitat (r2 = 0.07, p = 0.51) or elevation (r2 = 0.25, p = 0.26) on the species composition of the butterfly assemblages (Fig. 8). The results were similar if we considered the abundance of the species (habitat: r2 = 0.13, p = 0.24; season: r2 = 0.52, p = 0.003; elevation: r2 = 0.18, p = 0.43).
Discussion
Compared to other larger sites in Costa Rica with similar habitats, we observed a high diversity of butterflies (Córdoba-Alfaro, 2011; DeVries, 1991; Tobar et al., 2006; Vega, 2012). Nymphalidae is one of the most diverse butterfly families (Chacón & Montero, 2007), which explains its prominence in this study, while Riodinidae and Papilionidae were observed with lower abundance. As Owen et al. (1972) mentioned, these families might have low abundance. However, more species could emerge with increased sampling efforts, as these two families have been previously recorded at this site (Murillo-Hiller, 2018).
Among the most abundant species, H. hermes stands out for using grasses (Poaceae) as a host plant (Janzen & Hallwachs, 2009), a major component of grasslands. We observed over 100 C. argiolus gozara (Lycaenidae) individuals in the riparian habitat, primarily during the dry season. This species has been reported as highly seasonal in Oregon, USA (Warren, 2005). We also observed male aggregations on mud and excrement and downstream migrations at the end of the dry season. Butterfly communities in tropical forests typically have high species richness but low abundance (Owen, 1971). In our study, 35.6% of the total sample consisted of species, with only one individual recorded throughout the study period. This pattern aligns with Pozo et al. (2008), who state that rare species determine monthly variation in species richness. Among the rare species observed, Forsterinaria neonympha, Dynamine paulina thalassina, and Pteronymia hara are rarely recorded in Costa Rican collections, highlighting the importance of studying new sites to detect range expansions.
No significant differences in butterfly diversity were found between habitats. The grassland contained features such as living fences and a rich diversity of herbaceous plants, which enhanced connectivity between forest fragments (Enrique-Tobar & Ibrahim, 2010; Ospina-López et al., 2015). This vegetation diversity provides reproduction and feeding sites for species more typical of riparian forests, such as Mechanitis menapis saturata (Ithomiini), which laid eggs on Solanum myricanthum (Solanaceae) in the grasslands.
The riparian forest is a highly heterogeneous habitat where the river’s dynamics modify vegetation, causing frequent light and temperature changes. These modifications may lead to greater specialization among species dependent on riparian flora, but they also support generalist species, contributing to higher butterfly diversity (Naiman & Decamps, 1997; Naiman et al., 1993). Species found only in the riparian forest include C. argiolus gozara, Apuelca maeonis, Atlides sp. (Lycaenidae), and Manataria hercyna maculata, among others.
Although no significant differences in richness and abundance were found, the exclusivity of species to each habitat suggests that landscape heterogeneity is crucial for maintaining biodiversity. Grasslands and riparian forests, with their unique species richness and abundance, contribute to increased taxonomic and functional diversity in the ecosystem. Disturbances, particularly in fragile habitats like riparian forests, can affect populations dependent on these areas.
Various abiotic factors influence species diversity along elevational gradients in the tropics and are complex (Monteagudo-Sabaté et al., 2001). The general trend is that species richness decreases with increasing elevation, though different taxonomic groups may exhibit independent variations (Andrade, 1998). We observed that Lycaenidae was more abundant at 1 800 m, where forest cover was higher, while Pieridae and Nymphalidae showed greater richness and abundance at 1 200 m.
We found that seasonality affects the abundance, and the diversity observed, with higher butterfly abundance during the rainy season and the highest species number recorded in July. This pattern has been observed in other neotropical regions (Checa, 2006; Checa et al., 2009; Pozo et al., 2008) and on the Pacific slope of Costa Rica (Janzen, 1993; Murillo-Hiller et al., 2019). During the dry season, many butterflies remain in the pupal stage, which is more drought-resistant (Janzen, 1993). The first rain triggers adult emergence, coinciding with increased foliage and resources for reproduction (Barth 1991; Frankie et al., 1976; Proctor et al., 1996; Williams-Linera & Meave, 2002). However, phenological patterns are usually complex and cannot be generalized since some species can show a greater abundance during the dry season or are unaffected by seasonality (Gilbert & Singer, 1975). Resource availability can vary for each species throughout the year, and some herbs produce more resources for butterflies during the rainy season (Fenner, 1998). This heterogeneity promotes the diversity and abundance of butterflies found at the sample sites throughout the year.
Climatological anomalies could influence butterfly populations (Srygley et al., 2010; Grøtan et al., 2014). Grøtan et al. (2014) observed that butterfly diversity had peaks in biannual cycles, affected by the abundance of plant resources, which in turn was affected by precipitation. During the present study, the phenomenon of La Niña influenced the weather conditions during the sampling period (Zhang et al., 2019). Among the effects that this phenomenon exerts is an increase in rainfall; consequently, the butterfly’s assemblage could vary in their phenology (Wallis DeVries et al., 2011; Wilson & Maclean, 2011).
This study highlights the importance of seasonality and elevation in monitoring populations, as these factors influence species distribution and conservation. We found higher butterfly abundance during the wet season and at lower elevations, with riparian forests and grasslands showing similar abundance. These findings underscore the critical need for effective conservation strategies that consider seasonal and elevational factors and the preservation of habitat diversity. Protecting areas such as riparian forests and grasslands is vital for maintaining butterfly populations and ensuring the resilience of these ecosystems in the face of climate change and habitat disturbances. Conservation efforts should focus on preserving landscape heterogeneity to support biodiversity and prevent the loss of species that depend on these unique habitats.
Ethical statement: the authors declare that they all agree with this publication and made significant contributions; that there is no conflict of interest of any kind; and that we followed all pertinent ethical and legal procedures and requirements. All financial sources are fully and clearly stated in the acknowledgments section. A signed document has been filed in the journal archives.











uBio 




