Precipitation and tree cover gradients structure avian alpha diversity in North‐western Costa Rica

Changes in climate and land use are modifying biodiversity worldwide. Yet it remains unclear how both drivers interact to structure communities and determine patterns in taxonomic, phylogenetic and functional diversity at local scales. We focused on bird diversity and asked: how do precipitation and forest cover gradients interactively structure these elements of avian diversity?


| I NTRO D U C TI O N
Habitat conversion and climate change are eroding biodiversity globally. In the tropic s, conversion of forests to agriculture and climate drying are expected to cause drastic ecosystem-level changes (e.g., Malhi et al., 2008). Indeed, the conversion of forests to agricultural lands leads to non-random extirpation patterns across multiple taxa (Flynn et al., 2009;Newbold et al., 2015), including birds (Karp et al., 2012;Frishkoff et al.., 2014), bats (Cisneros, Fagan, & Willig, 2015;Frank, Frishkoff, Mendenhall, Daily, & Hadly, 2017) and amphibians (Nowakowski, Frishkoff, Thompson, Smith, & Todd, 2018). Likewise, changes in climate threaten and favour certain species over others (Thomas et al., 2004;Thuiller et al., 2011;Urban, 2015). Most studies on climate and land use changes have examined how they impact biodiversity individually, with comparatively fewer studies analysing their combined effects on biodiversity. Recent empirical work conducted on mammals (Brodie, 2016) and birds (Frishkoff et al., 2016;Jetz, Wilcove, & Do bson, 2007;Karp et al., 2018) has shown that climate and land us e change may favour the same species and homogenize communitie s at regional scales (i.e., beta diversity) more rapidly than previously anticipated.
Although there is increasing effort to understand how changes in climate and land use are shaping biodiversity at landscape scales, most studies have narrowly focused on taxonomic diversity (Kappelle, Vuuren, & Baas, 1999;Mendenhall, Karp, Meyer, Hadly, & Daily, 2014). Fewer studies compare the local extirpations of taxonomic groups to ch anges in functional or phylogenetic diversity (Cisneros et al., 2015), even though functional diversity may be most important for maintaining ecosystem functioning and services (Cadotte, Carscadden, & Mirotchnick, 2011;Diaz & Cabido, 2001).
Importantly, while beta diversity matters for global species conservation, alpha diversity is more relevant for the provisioning of many ecosystem services (e.g., pest control, pollination) (Kremen, 2005).
Moreover, species' abilities to adapt to new habitats are mediated through their trait s (e.g., physiological characteristics and dispersal abilities) and these traits often reflect the shared evolutionary history among speci es (Lee & Jetz, 2011). Thus, determining how functional and phyl ogenetic diversity at local scales behave with changing environmental conditions may enhance predictions of the biological consequences of global change.
Several studies have reported the contrasting responses of taxonomic, phylogenetic and functional diversity across environmental conditions such as precipitation and land use gradients (Chapman, Tobias, Edwards, & Davies, 2018;Meynard et al., 2011;Monnet et al., 2014;Seym our, Simmons, Joseph, & Slingsby, 2015). However, the aforementioned studies have looked at the effect of environmental conditions o n biodiversity independently, whereas the interactive effects b etween two or more environmental conditions on biodiversity rem ain understudied. Focusing on interactions between multiple envi ronmental conditions is non-trivial, because in reality, biological communities experience environmental changes that are not isolat ed from one another. In fact, analysing the synergistic effects of multiple environmental conditions is needed to predict biodiversit y loss into the future and avoid "ecological surprises" (Webster et al., 2017). For instance, communities can exhibit correlated responses to two or more environmental variables, which can either mitigate or exacerbate local extirpations from communities .
While interactions are important to document for taxonomic diversity, they may be especially critical for phylogenetic and functional diversity. Some argue that prioritizing phylogenetic diversity should be a central conservat ion goal (Witting & Loeschcke, 1995) because increasing phylogenetic diversity may also enhance essential ecosystem functions and services (Cadotte, Cardinale, & Oakley, 2008). This idea is based on the assumption that functional traits are phylogenetically conserved (Cavender-Bares, Kozak, Fine, & Kembel, 2009). Thus, distantly related species might contribute more to ecosystem functions and services, as opposed to close relatives by increasing the total functional capacity of the community (Cadotte et al., 2008). Additionally, functional diversity advocates assert practitioners should aim to maximize the biological diversity of forms and ecological roles, as functional groups are even more directly linked to ecosystem functions and services (Cadotte et al., 2011;D iaz et al., 2007;Mouillot, Graham, Villéger, Mason, & Bellwood, 2013) . Indeed, maximizing phylogenetic diversity will not necessarily lead to high functional diversity if traits are not conserved (Kelly, Grenyer, & Scotland, 2014;Mazel, Mooers, Riva, & Pennell, 2017).

Main conclusions:
Our findings suggest that taxonomic diversity was more sensitive to environmental gradients than functional and phylogenetic diversity. The lack of synergies between precipitation and forest cover gradients on alpha diversity, at least in this system, sim plifies the prospects of predicting future biodiversity change at local scales as our results suggest that climate change and land use act independently of one another.

K E Y W O R D S
binomial mixture models, community ecology, environmental changes, environmental gradients, functional diversity, Neotropical birds, phylogenetic diversity, taxonomic diversity From an empirical standpoint, results from studies comparing phylogenetic wi th functional diversity are highly mixed. For instance, a study o f Mediterranean birds showed that taxonomic diversity and funct ional diversity were higher in farmlands than in forests, but forest communities had higher phylogenetic diversity (Morelli, Benedetti , Perna, & Santolini, 2018). Whereas in Borneo, forest sites had hi gher taxonomic, phylogenetic and functional diversity of birds co mpared to oil palm plantations (Chapman et al., 2018). Contrast ing patterns of functional diversity are probably a result of trait selection, as well as usage of different functional diversity metrics (Petchey, Evans, Fishburn, & Gaston, 2007;Villéger, Mason, & Mouillot, 2008). Hence, more empirical studies evaluating the mismatch betwee n the dimensions of biodiversity across environmental conditions are needed. These studies are particularly important in South and Central American regions, where biodiversity has experienced a severe decline since 1970 (WWF, 2018).
Our core objective was to determine the prevalence and strength of interactions between climate (precipitation) and land use (local and landscape tree cover) on taxonomic, phylogenetic and functional diversity of Neotropical bird communities. Three questions guided our research: (a) How do multiple indices of bird diversity vary across precipitation and tree cover independently? (b) Do precipitation and forest cover interactively structure these elements of bird diversity, and if so, do they lead to synergies or antagonisms?
and (c) Do patterns of functional diversity mimic those of phylogenetic diversity? Here, we focused on precipitation as an indicator for climate because rainfall gradients appear central to determining avian distributions at regional and landscape scales (Frishkoff et al., 2016;. We predicted that dry climates act as a stronger filter on communities than wetter climates because few tropical species may have the necessary physiological tolerance for surviving dry and hot environments (Kozak & Wiens, 2007). Moreover, given that species traits tend to be phylogenetically conserved (Cavender-Bares et al., 2009), drier sites should hold less taxonomic, phylogenetic and functional diversity than wetter sites, as the species that thrive in dry sites may be close relatives that share traits enabling them to persist. Additionally, wetter sites have higher productivity than drier sites. Thus, if productivity increases sites' carrying capacity, then sites with high productivity may house more species (Murray-Tortarolo, Jaramillo, Maass, Friedlingstein, & Sitch, 2017). Therefore, we expected diversity to increase with rainfall. We also predicted that fewer species would be found in agriculture (i.e., sugar cane crops, melon/rice crop rotations and cattle pastures) than in forests because agriculture is less structurally complex and therefore offers fewer ecological opportunities than forests. Given that the species that are able to survive in agriculture are likely to be close relatives (Cavender-Bares et al., 2009) and share traits (Flynn et al., 2009), we expected lower phylogenetic and functional diversity in agriculture than would be expected if species were to be randomly lost. Moreover, we predicted that the interaction between dryness and agriculture would be synergistic on local diversity, because agricultural sites (regardless of climate) and dry sites (regardless of land use) tend to share species . Lastly, we expected F I G U R E 1 Map of the study area and the point count locations. In the left panel (a), all the farms (points) and protected areas (diamonds) are shown to vary along a precipitation gradient that ranges from 1.6 m total annual rainfall (red) to 2.8 m (yellow). The teal box outlines the farm shown in the right panel (b). In the top right corner (a), the location of the Nicoya peninsula (delineated by the yellow box) in Costa Rica is shown. Panel (b) depicts one example site (a sugarcane farm). We show how each farm or protected area had 6 point count locations. Each point count varied independently in terms of tree cover within local (50 m radius) and landscape scales (610 m radius). Here, local tree cover is depicted as the inner circles outlined in black, and landscape tree cover is depicted as the outer rings. The colour gradient indicates the percentage of tree cover ranging from 0% (orange) to 100% (lime green) that phylogenetic and functional diversity would be correlated because functional traits are likely to be phylogenetically conserved (Cavender-Bares et al., 2009).

| Study area and sampling locations
Our study was conducted in and around the Nicoya peninsula of North-western Costa Rica in the Guanacaste Province. This region is appropriate for studying the interactive effects of precipitation and tree cover gradients because annual precipitation varies from 1,500 to 3,500 mm in ca. 75 km (Figure 1a), with a diversity of crops (e.g., rice, sugarcane), pastures, and forests in the surrounding landscape.

| Bird surveys
The same expert ornithologist conducted all counts. All the forest-adjacent farm point counts (n = 120 point counts in 20 farms) were sampled during May, June, and July of 2016 and 2017. We sampled birds during these months when Nearctic migrants are absent, because resident and migratory species respond differently to the effects of climate and vegetation (Lindenmayer et al., 2019). Also, many of these migratory birds are only transient in these habitats, so they are not a fundamental component of bird communities along the gradient. Moreover, resident species enter their breeding seasons during these months (Stiles & Skutch, 1989). As a result, they vocalize more and are easier to detect. In 2017, we added the protected area sites (n = 30 point counts in five protected areas). Each year, half of the sites were sampled three times, while the other half were sampled only once. The observations started each day at sunrise and continued for the next 5 hr. Each point count was surveyed for 20 min. All 6 points on each farm or protected area were surveyed in one day. During each count, we recorded the number of individuals observed, the identity of the species, the time of day, the number of people (e.g., farm workers) observed at the point count, wind speed, distance to the nearest river, the date and noise (a binary variable indicating the presence or absence of loud noises like car alarms, barking dogs and chainsaws). Our binomial mixture model parameter estimates (see below) were informed by data from 2016 and 2017; however, to incorporate protected area sites, we analysed projected diversity trends for 2017 only.

| Tree cover at local and landscape scales
Tree cover data at local and landscape scales were hand-classified by drawing polygons around all trees within 1.5 km buffers of each site using recent Google Earth imagery (from 2013-2017). Tree cover classifications were verified from four vegetation plots at each of the point counts (n = 600 total). The detailed methodology for the vegetation plots is explained in Karp et al. (2018). With all the hand-drawn polygons and by using arcgis (ESRI), we quantified the proportion of tree cover within a 50 m radius, which we here call "tree cover at local scales." In addition, to measure landscape forest cover, we classified tree cover within concentric rings. The central circle always had a 50 m radius, and the outer rings had radii that ranged from 60 to 1,500 m by 10-m intervals (e.g., 60, 70, 80 m). Our model (see binomial mixture model section and Supplementary Material) showed that community composition was best explained by forest cover at 610 m (95% CI 530-720 m) ( Figure S1) Therefore, the percent tree cover in the outer ring of 610 m is what we call here "tree cover at landscape scales."

| Precipitation
We modelled spatial precipitation in the Nicoya peninsula from weather station data collected between 1921 and 2015 at 29 weather stations. Annual precipitation for the peninsula was modelled with a general additive mixture model with a spatial thin-plate spline. A detailed explanation is outlined in Karp et al. (2018).

| Binomial mixture model
We used a multispecies binomial mixture model to estimate the effects of precipitation and tree cover gradients on species abundances, while accounting for imperfect detection (Royle & Dorazio, 2008;Kéry & Schaub, 2012). We calculated the total number of observed individuals (Y i,j,k,t ) of each species (i) at each point count location (j) during each visit (k) in each year (t) assuming that: where N represents the true number of individuals, while P is the detection probability of an individual. Details on the equations for estimating detection probabilities and abundance of species are presented in the Supplementary Material.
We used Markov Chains (MCMC) to estimate full posterior distributions for all parameters in the model. We then randomly selected 500 posterior abundance estimates (for each species at each point count location) for subsequent analyses. We refer to these species and point count location specific abundances as "posterior communities" and analyse them to assess the likely composition of these communities, while acknowledging uncertainty related to detection and sampling error.

| Taxonomic, phylogenetic and functional diversity post hoc analyses
To assess taxonomic diversity, we calculated two metrics for each of the 500 posterior communities: species richness (Magurran, 2004) and Shannon's Index (Shannon, 1948), with the "vegan" package (Oksanen et al., 2015) in the statistical software R (R Development Core Team, 2008).
We calculated seven phylogenetic metrics that assessed phylogenetic diversity, clustering and variability for each of the 500 posterior communities by using 500 phylogenetic trees from BirdTree.org (Jetz, Thomas, Joy, Hartmann, & Mooers, 2012). The metrics were Faith's Phylogenetic Diversity (PD) (Faith, 1992) (Webb et al., 2002) and MNTD z-scores (SES.MNTD). All analyses were conducted with the "picante" package (Kembel et al., 2010) in R. More details on these analyses are presented in the supplementary material. Here, we mostly focus on PSV as this metric is largely unaffected by species richness (Helmus et al., 2007). In the Supplementary Material, we report results from the other metrics (see Table S2).
To measure functional diversity within the avian communities, we focused on traits expected to reflect bird resource use. The selected traits align with other studies that have measured functional diversity in birds (e.g., Petchey et al., 2007). We had four trait categories related to resource use that we weighted equally: foraging strata, foraging method, diet and foraging time. We used multidimensional functional diversity indices to estimate the functional diversity in these communities. Specifically, we calculated functional richness (FRic), functional divergence (FDiv), functional evenness (FEve) (Villéger et al., 2008) and functional dispersion (FDis) (Laliberté & Legendre, 2010). We calculated these metrics by using the dbFD function instituted in the "FD" package (Laliberté & Legendre, 2010) in R. Details on trait data and calculations of these indices are presented in the Supplementary Material. In the main text, we focus on FDis values as these are unaffected by species richness (Laliberté & Legendre, 2010).
For each one of the taxonomic, phylogenetic and functional diversity metrics, we calculated the mean values and standard deviations across the 500 communities. We then used such values in subsequent analyses to test our hypotheses.

| Excluding highly mobile species
Several bird species such as parrots, herons, vultures and raptors have large home ranges and perform long-distance daily movements between nesting, roosting and foraging areas (Dénes, Tella, & Beissinger, 2017). Their populations are challenging to survey because their detection probability depends on two factors: overlap between home range or territory and point count location, and presence during the survey, which is not always the case for these species as they temporarily emigrate from point count locations (Dénes et al., 2017). As highly mobile species, they also often violate one assumption of point count sampling, as in some cases point counts may not be independent from one another (Gomez, Robinson, Blackburn, & Ponciano, 2018). Violations of these assumptions may result in biased estimates of their abundance (Chandler, Royle, & King, 2011;. To test whether these birds were driving the trends when comparing the dimensions of biodiversity, we repeated all analyses excluding all highly mobile species. Specifically, we excluded the Anseriformes (ducks), Caprimulgiformes (nighthawks), Cathartiformes (vultures), Charadriiformes (herons and storks), Falconiformes (hawks and eagles), Pelecaniformes (pelicans), Psittaciformes (parrots and parakeets) and Strigiformes (owls).
In these test analyses, we had n = 114 species, as opposed to the n = 150 species detected in the point counts, which we used for the main analyses.

| Testing hypotheses
To examine the effects of total annual precipitation, tree cover at local scales (within 50 m) and tree cover at landscape scales (within 610 m) on the taxonomic, phylogenetic and functional diversity of Costa Rican bird communities, we used linear mixed-effect models (LMMs) (Zuur, Leno, Walker, Saveliev, & Smith, 2009) with a random intercept of site (i.e., name of farm or protected area). All predictor variables were scaled by subtracting the mean and dividing by the standard deviation. Diversity metrics were treated as dependent variables. For all taxonomic, phylogenetic and functional metrics, we averaged values of posterior communities and used mean values to test our hypotheses. We weighted models by the inverse variance of the metrics, calculated across the 500 posterior communities (Tingley & Beissinger, 2013). Mean values for all diversity metrics were regressed against linear and quadratic effects of precipitation, local tree cover, tree cover at landscape scales and possible two-way interactions between linear terms of those three variables (i.e., the full model). Model selection was determined through a backward selection process using likelihood ratio tests, evaluated against a chisquared distribution (Zuur et al., 2009). In the backward model selection, we always started with the full model. We respected hierarchy (i.e., kept a linear term if it was present in a significant interaction term) and checked residuals to ensure the models conformed to assumptions. Importantly, we conducted analyses three times: once with mean values for metrics of posterior communities including all species, a second time with posterior communities excluding highly mobile species and a third time with the raw bird-census data (including replicate as a random effect to account for the fact that some sites were sampled once vs. three times).
We did this to test for strong patterns that were either masked by detection problems (when using the raw data) or diluted through stochastic processes of nested uncertainty based on the performed calculations (when using posterior communities). We also did this to see whether the patterns were inflated by behaviour of highly mobile species. Here, we present results for analyses with posterior communities including all species, but the Supplementary Material contains information for analyses excluding highly mobile species in posterior communities (Table S3, Figure S2), and the results when conducting the analyses with the raw data (Table S4 and Figure S3).

| R E S U LT S
We observed 5,392 individuals from 150 bird species, 50 families and 20 orders during our point counts in 2017. The binomial mixture model indicated that detection varied between species, tree cover and replicates. After correcting for detection, the total number of individuals at all our sites was estimated to be 31,046 (see Table S1).
For instance, PSV rapidly declined with increasing precipitation and stabilized in wetter areas (quadratic term df = 1, χ 2 = 6.13, p < 0.05; linear term df = 1, χ 2 = 41.45, p < 0.001) but the magnitude of these declines was slight, suggesting little biological effect of precipitation on phylogenetic diversity in these communities (Figure 2d).
Moreover, precipitation had no significant effect on functional dispersion, suggesting that functional diversity was stable across the rainfall gradient (Figure 2g).

| Effects of tree cover on diversity metrics
Tree cover gradients affected both community structure and composition. First, species richness changed nonlinearly with tree cover within 50 m, reaching its maximum at intermediate levels (quadratic F I G U R E 2 Taxonomic, phylogenetic and functional bird diversity across precipitation and tree cover gradients at local and landscape scales. The top row indicates how species richness varied with precipitation (a), tree cover at local scales (within 50 m) (b) and tree cover at landscape scales (within 610 m) (c). The middle row shows how PSV (as a metric of phylogenetic diversity) changed with precipitation (d), local tree cover (e) and landscape context (f). The bottom row shows how functional dispersion (as a metric for functional diversity) changed with precipitation (g), local tree cover (h) and landscape context (i). Each point represents one community (i.e., one point count location, n = 150 in total) local tree cover term df = 1, χ 2 = 14.60, p < 0.001) (Figure 2b). As depicted in Figure 2b, the variance exhibited a funnel shape with increased variance towards higher local tree cover. But at the landscape scale best supported by the binomial mixture model (610 m, Figure S1), however, tree cover had the reverse effect on species richness: the lowest values were at intermediate forest cover (50%) with higher diversity values in extremely forested landscapes (quadratic landscape term df = 1, χ 2 = 10.50, p < 0.01; linear landscape term df = 1, χ 2 = 10.85, p < 0.0001) (Figure 2c). Phylogenetic diversity as measured with PSV significantly decreased with local tree cover (quadratic term df = 1, χ 2 = 33.01, p < 0.0001; linear term df = 1, χ 2 = 43.91, p < 0.0001) (Figure 2e), but as with precipitation, the effect size was minimal.

| Interactive effects of precipitation and tree cover on diversity metrics
Surprisingly, we did not detect significant interactions between precipitation and tree cover gradients on any metric of local bird diversity. For taxonomic diversity, posterior communities (estimated by the binomial mixture model) yielded no significant interactions; however, we did detect a positive interaction between local tree cover and precipitation in the raw data, such that diversity peaked at wetter, more forested sites (df = 1, χ 2 = 12.77, p < 0.001).
Interactive effects between tree cover at local and landscape scales did not affect taxonomic diversity; however, for phylogenetic diversity (PSV), we found interactive effects between tree cover at local and landscape scales (df = 1, χ 2 = 13.97, p < 0.001) but landscape-level tree cover was not significant (df = 1, χ 2 = 0.21, p = 0.64; Figure 2f). The interaction between local and landscape tree cover also had a positive effect on functional dispersion (df = 1, χ 2 = 9.32, p < 0.01), suggesting that the highest values of functional dispersion were only found in large patches of forests (i.e., when both the local forest cover and the landscape forest cover were greater than 75%) (Figure 3).

| Comparison across diversity metrics
All diversity metrics of the posterior communities behaved similarly compared to the metrics computed from raw data with respect to precipitation and tree cover gradients (Tables S2 and S4, Figure S3, Figure 2). For the posterior communities, we found a positive correlation between species richness and Shannon's Index (Pearson's r(148) = 0.58, p < 0.001) ( Figure S4).
To answer our fourth research question, we found that phylogenetic diversity was not positively correlated with functional dispersion. In fact, all metrics of phylogenetic diversity were negatively correlated with FDis, for example, PSV(r(148) = −0.41, p < 0.001) ( Figure 4 and S4).

| Results excluding the highly mobile species
We found consistent patterns in analyses of posterior communities with and without highly mobile species ( Figure S2). Specifically, taxonomic diversity trends of both analyses mimicked each other ( Figure   S2a,b,c). Phylogenetic diversity showed little variation across gradients, but after excluding these birds, we no longer found a negative trend for PSV with respect to local tree cover ( Figure S2e). Functional diversity was also positively affected by local tree cover at local and landscape scales, but the model predicted a negative quadratic effect of local tree cover on functional dispersion after excluding all highly mobile species (quadratic term df = 1 χ 2 = 41.13, p < 0.0001, linear term df = 1, χ 2 = 28.93, p < 0.0001, Table S3), versus a positive quadratic when all species were included (quadratic term df = 1, χ 2 = 23.73, p < 0.0001; linear term df = 1, χ 2 = 208.66, p < 0.0001).
In both analyses, the highest values of FDis were found in the most forested sites. Overall, the two analyses showed consistent results. All details on model fits can be found in Tables S2 and S3.

| D I S C U S S I O N
Climate drying and habitat conversion are major pressures on tropical biodiversity (Brodie, 2016;Karp et al., 2018). In this study, precipitation and tree cover gradients affected taxonomic, phylogenetic and functional diversity in different directions but were consistently additive (i.e., lack of interaction effects). Specifically, we showed that precipitation had a positive effect on species richness, but functional diversity was stable across the rainfall gradient, and phylogenetic diversity showed a slight downward trend with increased rainfall, although it had little biological meaning (i.e., phylogenetic diversity decreased with a rainfall slope close to 0). We also showed that species richness peaked at intermediate levels of local tree cover.
Meanwhile, phylogenetic diversity was stable across all levels of tree F I G U R E 3 Effects of tree cover on functional dispersion. Plot showing the interaction between local tree cover and tree cover at landscape scales and their effect on functional dispersion cover, and functional dispersion was highest in the most forested sites. Contrary to our expectations, interactive effects between climate and land use on bird diversity were absent in this system, and instead, interactions between local and landscape scale forest cover predominated.

| Precipitation and forest cover effects on taxonomic diversity
Regarding taxonomic diversity, patterns of species richness aligned with our predictions and followed classical expectations for tropical regions: species richness increased with rainfall. These findings are in keeping with other tropical studies, which suggest that dry climates are strong filters on bird communities (Graham, Parra, Rahbek, & McGuire, 2009;Seymour et al., 2015). Drier habitats exhibit greater temperature variability and lower water availability, which may impose high physiological barriers on species and restrict them from occupying certain habitats (Engelbrecht et al., 2007;Hawkins et al., 2003). With respect to tree cover gradients, we found that species richness followed an inverse quadratic pattern: it peaked at intermediate values of local tree cover (i.e., 50%, forest edges) and was lower at the extremes (0% and 100%). However, our data also showed high variability for species richness in the most forested sites at local scales. As depicted in Figure 1b, the variance exhibited a funnel shape with increased variance towards higher local tree cover.
These findings contradicted our predictions but supported studies that show the importance of secondary forests, forest edges and diversified farms for the maintenance of species diversity in the landscape (Blake & Loiselle, 2001;Chazdon et al., 2009;Cisneros et al., 2015;Daily, Ehrlich, & Sánchez-Azofeifa, 2001;Karp et al., 2012).
Our findings are consistent with the recruitment of habitat generalists in forest communities, because forest edges tend to host both forest and agricultural species (Lasky & Keitt, 2010;Owens & Bennett, 2000). The high variance of species richness at 100% local tree cover might also be explained by path dependence in bird community reassembly following forest recovery in Guanacaste. Between

| Precipitation and forest cover effects on phylogenetic diversity
Contrary to our predictions, precipitation and tree cover gradients did not have strong effects on phylogenetic diversity. Our data did not support the hypothesis that bird communities in agriculture or in dry areas were phylogenetically clustered. In fact, we observed the opposite trend, as phylogenetic diversity metrics trended downwards with increased precipitation and increased tree cover at local scales. In general, phylogenetic diversity metrics are sensitive to species that diverge early in the phylogenetic tree, which lead to higher phylogenetic divergence values (Mazel et al., 2016).
However, even when we excluded the highly mobile species that often represent basal clades (e.g., ducks and nighthawks) (Jetz et al., 2012), which were more common in agriculture than in forests, we still found that communities were as phylogenetically diverse

| Precipitation and forest cover effects on functional diversity
Annual precipitation had no effect on functional diversity in our study. To date, evidence of moisture gradients effects on avian functional diversity across taxa is mixed. Some show higher functional diversity (measured with Petchey's FD) along humidity gradients (Seymour et al., 2015), while others show no difference in functional diversity (measured as an adaptation of an index of species dissimilarity) across dry and wet sites (de Bello, Lepš, & Sebastià, 2006;. Our results echo the latter results, suggesting that in Neotropical birds, there is no evidence to support more niche differentiation among species in drier versus wetter sites. Mixed results of functional diversity are probably partially caused by variation in trait and metric selection. We used traits expected to reflect bird resource use, such as the types of resources used by each species, and the methods used to acquire them, following Petchey et al. (2007). However, we recognize that our results may differ if other traits are selected (Newbold et al., 2013).
We did find, however, that the interaction between tree cover gradients at local and landscape scales shaped functional dispersion.
As such, the highest values of functional diversity were found only in forest patches with >75% tree cover at both scales, suggesting that tree cover at local scales alone is not enough to maintain functionally diverse communities (Figure 3). These results supported our prediction and echoed similar studies (Flynn et al., 2009;Morelli et al., 2018), indicating that bird communities in forests may be characterized by high niche partitioning (Mason, Mouillot, Lee, & Wilson, 2005;Morelli et al., 2018). A possible explanation for this finding is that forests have higher habitat complexity than the other sampled habitats, which may allow greater structural niche partitioning among bird species (MacArthur, 1958). For instance, our forest sites had more vertical structure and a more complex understory composition than the agriculture sites . Thus, this relatively more complex vegetation might result in vertical stratification of birds, as has been observed Eastern Himalayan bird communities (Acharya & Vijayan, 2017). Importantly, these results were still observed after excluding the raptors, herons, vultures and others, which perform specific ecological functions (e.g., carnivores, scavengers). After excluding them, we found a different shape in the curve of FDis versus local tree cover (Figure 2e and S2e), but we found that in both cases the highest values for functional dispersion were at the most forested sites.

| Interactive effects of precipitation and forest cover on different dimensions of biodiversity
Interactive effects between precipitation and tree cover were less important for taxonomic, phylogenetic and functional diversity than we expected. Our results suggest that the effects of climate and land use are additive, not synergistic, at local scales since we did not find significant interactions between them. Our empirical results add evidence to the body of literature reporting additive effects of environmental changes on communities (e.g., Darling, McClanahan, & Côté, 2010). Our findings suggest that taxonomic diversity was more sensitive to environmental gradients than functional and phylogenetic diversity. Stable phylogenetic and functional diversity patterns across the rainfall gradient suggest that there are some similar ecological niches to be filled in both wet and dry sites and that close relatives can fill those niches. These findings contradict the expectation that dryness and forest cover are shaping dimensions of community alpha diversity in similar ways, because as shown here, the three dimensions of diversity show contrasting patterns in regard to both environmental gradients operating together.

| Implications for bird conservation
In our previous studies, we have shown that wet forest-affiliated birds are suffering the most from the combined impacts of land use and climate change at regional scales . Thus, if conservation goals were to focus on protecting functional dispersion (i.e., higher variance of ecological traits) or forest-affiliated birds, such as the Long-tailed Manakin (Chiroxiphia linearis, a highly iconic species for people in this region), then local conservation efforts in the Nicoya peninsula may focus on protecting large forest patches or in increasing connectivity among existing forest patches that ultimately increase tree cover at the landscape scale. Our recommendation is to ensure that reforestation efforts are done in collaboration so that they maximize benefits for biodiversity in the long term. By this we mean that they should be targeting the connection of isolated forest patches or increasing the size of the relatively larger forest patches to augment forest landscape cover. By doing so, we might not only increase habitat for forest birds but also for larger animals that are also threatened (e.g., jaguars Panthera onca, or white-lipped peccary, Tayassu pecari) (Leonardi, Amit, Watson, Gordillo, & Brenesia, 2010). We also found that in this study system, phylogenetic diversity did not vary strongly with landscape and precipitation gradients.
Thus, for this specific region, our results suggest that conservation efforts targeted at maximizing phylogenetic diversity are not a priority.

ACK N OWLED G EM ENTS
We thank landowners, SINAC's staff, the Obando family, E.