Temperature accounts for the biodiversity of a hyperdiverse group of insects in urban Los Angeles

The urban heat island effect is a worldwide phenomenon that has been linked to species distributions and abundances in cities. However, effects of urban heat on biotic communities are nearly impossible to disentangle from effects of land cover in most cases because hotter urban sites also have less vegetation and more impervious surfaces than cooler sites within cities. We sampled phorid flies, one of the largest, most biologically diverse families of true flies (Insecta: Diptera: Phoridae), at 30 sites distributed within the central Los Angeles Basin, where we found that temperature and the density of urban land cover are decoupled. Abundance, richness, and community composition of phorids inside urban Los Angeles were most parsimoniously accounted for by mean air temperature in the week preceding sampling. Sites with intermediate mean temperatures had more phorid fly individuals and higher richness. Communities were more even at urban sites with lower minimum temperatures and sites located further away from natural areas, suggesting that communities separated from natural source populations may be more homogenized. Species composition was best explained by minimum temperature. Inasmuch as warmer areas within cities can predict future effects of climate change, phorid fly communities are likely to shift nonlinearly under future climates in more natural areas. Exhaustive surveys of biotic communities within cities, such as the one we describe here, can provide baselines for determining the effects of urban and global climate warming as they intensify.

Because temperatures in cities match or exceed those expected under future climate change, researchers have suggested that thermal gradients within cities might allow us to predict biotic responses to the future climate warming [27,28]. Cities might be useful proxies for climate warming because urban heat has been in place for decades to centuries, and large-scale, controlled warming experiments in more natural areas are often impractical (but see [29,30]). However, urban heat might not be an appropriate proxy for broader climate warming because other aspects of urbanization might also have strong effects on species. Perhaps most importantly, land cover (impervious surfaces, vegetation) and urban heat tend to covary, making it impossible to separate their effects on biological processes. Hot urban environments often have more impervious surface, less vegetation cover, and lower vegetation complexity [31][32][33]. While researchers have used various useful approaches to determine effects of urban warming alone-e.g. laboratory chamber experiments [11,18]actually separating effects of land cover and temperature in the city could provide insight into whether biotic responses are more attributable to temperature or other aspects of urbanization. In coastal cities, urban temperatures are often decoupled from land cover, such that sites that are highly urbanized are not necessarily hotter than surrounding sites that are less urbanized because of winds entering from the coast [34]. This offers an experimental opportunity to separate the ecological effects of urbanization and temperature.
Insects are highly responsive to temperature, are a foundational component of terrestrial biodiversity, and provide a range of services and disservices within cities [35,36]. As insects are ectotherms, they have elevated metabolic and reproductive rates in response to warming until their thermal maxima are reached [14]. One of the most abundant animals in terrestrial environments are phorid flies [37,38], which are responsive to thermal conditions, but also feed on a wide range of resources and develop and occupy a tremendous variety of microhabitats [39]. Cities can support hyperdiverse communities of phorid flies, with dozens of species recently described from central Los Angeles [34,40]. With a small body size (0.4-6 mm) and presumably short dispersal distances, we would expect phorid fly biodiversity to finely track microclimatic conditions in the urban environment, relative to less ephemeral or larger-sized organisms.
Here, we evaluate the spatial and temporal predictors of phorid fly biodiversity within urban Los Angeles, CA, USA, hereafter we refer to as L.A. In L.A., urban temperatures are decoupled from land cover, allowing us to investigate the effects of impervious surface, vegetation cover, and temperature, in a system where these aspects of the urban environment are not highly correlated [41]. In this project, species were sampled exhaustively [42], and 30 new species of flies were described from L.A. from this dataset in 2015 [40]. We leveraged the complete documentation of this diverse group to determine the effects of urban land development and climate in a city where we found these variables are uniquely decoupled. We sampled phorid flies and site environmental conditions in 30 locations throughout a calendar year to evaluate biodiversity responses to thermal and urbanization gradients within the L.A. metropolitan area. By measuring temperature and moisture variables at a very fine scale to match the habitat occupied by the organisms [43], we achieve a biologically relevant understanding of how local climatic factors vary across an iconic urban habitat.

Methods (a) Study area
The L.A. metropolitan area is a highly urbanized region located at 34°N along the west coast of North America, which has experienced rapid population growth and associated land development over the past 100 years. The climate and flora are characteristically 'Mediterranean', and biomes that have given way to development include coastal sage scrub, chaparral, and oak woodlands. Some habitats have only small fragments remaining, including coastal dunes and wetlands [44]. The climate of locations within the city can vary substantially from one another, because of differences in distance from the ocean, elevation, intensity of urbanization, and vegetation [41]. The heterogeneity of the landscape makes predicting climatic differences among sites in L.A. particularly difficult [45,46], which reinforces the need for site-specific weather records to reliably compare sites.

(b) Study design and insect sampling procedures
We placed a series of Malaise traps [47] [42], who provide a detailed description of each site featured in the study. In a survey, participants whose homes were included in the study were asked if they used pesticides in their yards in areas close to where the traps were located. The survey revealed that none of the sites were treated with pesticides regularly, and only a few hosts used small quantities of pesticides for local control on rare occasions, such as neem oil on a few plants. We decided this incidental treatment would not appreciably affect biodiversity within the yards included in this study.
For each of 12 sampling periods (approx. the first week of each month in 2014), we collected and identified all phorid flies in samples to species, resulting in a total of 42 480 specimens. Vouchers are deposited in the LACM. Over this year of sampling, the fauna of 99 species was essentially sampled to completion, as richness estimators predicted that additional sampling would be expected to yield perhaps one additional new species [42]. We are confident that this sampling regime represents nearly all the species in this lineage and locality that would be captured using this sampling approach.

(c) Abiotic data collection and processing
We continuously recorded air temperature, soil temperature, and relative humidity at each site using a weather station adjacent to each trap (Onset HOBO U30 Station, Bourne, MA, USA). Additional details about abiotic data are in the electronic supplementary material.

i) Correlations between environmental and climatic predictors
To determine the relative contribution of urbanization and topography on microclimates across our study region, we used two simple linear models to test whether impervious surface and/or elevation were predictive of the mean average annual air temperature at our sampling sites. In each model, the mean average annual temperature was the response variable, and impervious surface or elevation was the sole predictor. We also evaluated whether differences in temperatures across sites were associated with a coastal effect from the Pacific Ocean. Our hypothesis was that urban sites further away from the coast would have warmer mean temperatures [48]. To test this, we also used a simple linear model, with distances from our sites to the Pacific shoreline as the predictor and mean average annual air temperature as the response variable.
(ii) Phorid fly abundance, richness, and evenness We first calculated four response variables that were each used as the responses in the modelling framework described below. First, we calculated the total number of individuals caught per trap per day (abundance), species richness, and Pielou evenness. Because the traps were in place for slightly different amounts of time during some sampling periods, we divided each response variable by the number of days a trap was left out, i.e. the total amount of time flies had access to a trap. One species, Megaselia agarici, constituted a substantial number of specimens in samples at many sites (and about one-quarter of all individuals collected). Therefore, we included total individuals of this species captured per trap per day as an additional response variable. (Many of the species in this study were only recently described and their biology remains poorly known, and the current state of knowledge [49] prevents us from using taxon-specific data, such as phylogeny, diet, as factors in the models described below.) As a preliminary step, we used model selection to minimize overfitting in the final models. Specifically, we used model selection to identify the most parsimonious independent variables describing effects of temperature, humidity, and urbanization on each response variable. For each response, we built a series of linear mixed effects models in the nlme package in R [50]. In each case below, we compared models with tightly correlated predictors describing similar aspects of the urban environment and selected the parameter in the model with the lowest AICc score to include in full models used for inference, i.e. to choose the response variable most closely associated with the response. For each response variable, we compared three sets of models. One set included mean RH (relative humidity), maximum RH, minimum RH, and no humidity predictor. The second set of models selected from included mean temperature, maximum temperature, minimum temperature, and no temperature predictor, and the final set compared mean soil temperature, mean maximum soil temperature, mean minimum soil temperature, and no temperature predictor. All climatic predictors represented average conditions one week before sampling to represent the conditions most likely to affect phenology [51]. We decided, depending on the shape of the response, whether to include a squared term to account for nonlinear responses of phorid flies to environmental variables. In all models built for final model 33  royalsocietypublishing.org/journal/rspb Proc. R. Soc. B 286: 20191818 selection, we included latitude, longitude, and distance to the nearest natural, protected area were included as fixed effects, and site was included as a random effect to account for repeated sampling of flies at each site. To account for the composition of the matrix surrounding each study site and to describe urbanization, we compared models that included impervious surface cover, NDVI-each measured at a 50 m buffer as described above-and neither of these (null model).
After selecting parameters for each response variable (species richness, M. agarici abundance, total abundance, and evenness), we built one full model for each, for a total of four models. In these models, we included each parameter chosen to represent urbanization, temperature, and humidity, along with latitude, longitude, and distance to the nearest natural area as fixed effects. Site was included as a random effect in all models. To determine if the effects of temperature depended on water availability, and vice versa, we included an interaction between the best temperature predictor and the best RH predictor; these were subsequently removed from all models because they were not significant. We did not include any interaction effects that were not associated with explicit a priori hypotheses, because these interaction effects often can be explained more directly by main effects of environmental variables, and including these variables would be redundant and reduce the power of analyses of our main effects. To determine if site proximity rather than environmental conditions may account for responses we observed, we performed an analysis to test if spatial autocorrelation was observed among sample sites. We examined the abundance of phorid flies by date, for every date where greater than 5 sites reported data, using Moran's I, applied to an inverse distance matrix of site coordinates as the weighting factor [52].

(iii) Community composition
In addition to the univariate community responses, we also conducted a non-metric multi-dimensional scaling (NMDS) analysis to examine patterns in community composition, and fit environmental vectors to gain insights into drivers of these patterns [53]. For this analysis, we used all captures of phorid flies at a given site, across the whole sampling period. We culled all singletons (species represented by a single sample throughout the entire study), a standard approach because the incidence of a singleton is indistinguishable from a spurious occurrence [54]. The NMDS was conducted on the Bray-Curtis distance calculated from the untransformed matrix of taxon-by-site using abundance values.
Environmental fit vectors were selected iteratively by comparing the fit statistics (Global R 2 and p-value) within a group of related and, auto-correlated, parameters (e.g. minimum, maximum, and mean air temperatures, etc.).

Results (a) Correlations between environmental variables and urbanization
Measured mean annual temperatures at our study sites were independent of impervious surface and elevation (figure 2; impervious surface: y = −129 + 9x, F 1,28 = 1.12, p = 0.30; elevation: y = −45 + 4.5x, F 1,28 = 0.02, p = 0.90), suggesting that neither urban land cover nor elevation drove urban temperatures. Therefore, we conclude that, while L.A. may have a large-scale urban heat island effect, other unknown factors drive temperatures at the local scale. As expected, NDVI tracked impervious surface, though these values were not closely related to the distance to natural areas (electronic supplementary material, figure S1). Contrary to expectations, temperatures measured at weather stations in urban backyards were not significantly associated with their distances from the coast (y = 1.90 + 1.83×10 −5 , F 1,28 = 0.48, p = 0.49).

(b) Mean and peak biotic responses
Abundance and richness of phorid fly communities throughout the city were best explained by air temperature (table 1  and figure 3). No other climatic parameters had significant predictive value, aside for a lesser effect of RH on species richness (table 1), and humidity slightly tracked temperature (electronic supplementary material, figure S3). Phorid fly abundance and richness responses to environmental conditions were nonlinear, with peaks at intermediate mean weekly temperatures (electronic supplementary material, figure S1). The factors affecting the abundance of the most common species, M. agarici, were the same factors affecting total abundance (table 1). The evenness of phorid fly communities was weakly explained by the mean minimum weekly temperature and distance to natural areas, such that phorid fly communities in areas with lower minimum temperatures and those that were further away from natural were more even (table 1).
Latitude and longitude were associated with abiotic conditions (electronic supplementary material, figures S4 and S5), but spatial autocorrelation was limited. Among all dates where sufficient data existed for autocorrelation analysis (10 dates), one date (week 6 of 2014) had significant spatial autocorrelation ( p = 0.037), suggesting that autocorrelation is rare in this system and may have been observed by chance. Thus, after we accounted for spatial similarity of sites using latitude and longitude as described above, no additional correction for spatial autocorrelation was needed.

(c) Community composition
The effects of NDVI and mean minimum weekly temperature on species composition were orthogonal, with a much greater effect of temperature ( figure 4). The mean minimum weekly

Discussion
We found that urbanization and climate are uniquely decoupled across the L.A. Basin. Consistent with an earlier study [41], urban land cover does not influence local temperatures at the fine scale of our sampling. Because of this decoupling, we were able to independently assess effects of local climate and urban land cover on phorid fly communities. We found that air temperature had the most robust influence on the assembly of the phorid fly community, but that different aspects of temperature were most closely associated with species abundance, richness, and evenness. Local impervious surface and vegetation cover (NDVI), which represent urbanization, did not outperform null models. We conclude that local climate, not urban land cover, is the strongest driver of phorid fly community assembly across L.A. Higher mean temperatures were associated with increased phorid fly richness, until around 20°C, where richness declined. We predicted that cooler sites would harbour more species because warmer areas would be associated with reduced persistence of heat-intolerant species. However, we find evidence that intermediate temperatures may support both heat-tolerant and -intolerant species, and thus most phorid species in L.A. Many of the species in our study (e.g. Megaselia halterata, M. nigra, and M. pleuralis) are probably introduced from areas of northern Europe with cooler thermal conditions than L.A., which could also account in part for the loss of abundance at higher mean temperatures. However, in general, the relative contributions of non-native and native species to the patterns we observed are unclear. While we know that many species of phorids in L.A. are native based on their species interactions and/or distributions (i.e. found only in certain parts of North America in well-studied groups), knowledge about phorid fly distributions is inadequate to inform us to what extent nonnative species contribute to the patterns we observe.
While species richness was tied to mean temperature, evenness was weakly explained by minimum temperature and distance to natural areas. The latter was included in the analysis because it is well established that some species have habitat requirements involving larger patches of land that are less urbanized. For example, the ant-decapitating guild of phorid flies are only found within and adjacent to natural areas because these are locations in L.A. where their hosts (species of Camponotus, Crematogaster, Liometopum, Neivamyrmex, Pheidole, and Solenopsis) are found. Elsewhere, the host ants are typically displaced by invasive Argentine ants [42,55]. We expected that species richness would drop with distance from natural areas, as certain native species would be removed from the species pool. Instead, we found that species evenness might be the result of a more complex process, in which communities become less even further from natural areas, but not because of the loss of species from communities-distance from natural areas did not predict richness-but rather because relative abundances may shift. Our results suggest that a subset of species may benefit from living further from natural areas, where perhaps there is less competition from species that may locally disperse into more urbanized environments from source populations in more natural areas. While we predict this may be the cause of less even communities further from natural, protected areas, further studies on population genomics and niche overlap of phorid flies are needed to determine mechanisms driving this pattern. In addition, sites with lower minimum temperatures support compositionally different and more even communities than areas with higher minimum temperatures. We may observe this pattern because a few species in the region have disproportionate fitness benefits from warmer minima.
Species richness was also higher at intermediate relative humidities, and we suspect this results from the benefits and drawbacks of wet climates for insects. Throughout the year, many species showed large spikes in abundance. Among those with known life histories (as listed in figure 4:   [56,57] estimated a single mushroom cap contained 500 larvae of M. marquezi. We suspect abundance peaks for these species are associated with the mass production of fungal sporophores in close proximity to our sampling area, which are common after rain. However, we also suspect that very wet climates may increase fungal disease incidence [58,59], such that highest phorid fly richness occurs at intermediate RH.
Urban landscapes are rarely designed to sustain biodiversity, though this is often an idealized goal informed by research [60]. At very high levels of heat, abundance and diversity decline, which is consistent with other studies suggesting that the urban heat island effect has negative effects on many species [14,15,61]. As the global temperature increases, many of the sites we sampled may also warm and therefore no longer support diverse phorid fly communities, though this will depend on how quickly phorid flies can adapt to changing thermal conditions. Even on short timescales, it is possible that the thermal limits of species have evolved, so that animals in the warmer parts of the city are capable of tolerating warmer conditions independent of ecotypic acclimation [62]. Given the rapid evolution of thermal tolerance in other arthropods [62][63][64], and the short generation times of phorid flies, rapid adaptation to climate change might be possible.
Our work was designed to test how the urban matrix surrounding sites in urban L.A. affects insect biodiversity. Our analyses suggest that temperature is a more important variable than surrounding urban land cover (impervious surface and NDVI densities) for determining fly abundance and richness. However, a more detailed analysis of the specific habitat types between potential source communities in protected, more natural sites and urban sites might reveal patterns we have not tested for. Specifically, we predict that if protected areas are source populations for urban fly biodiversity, protected areas and urban sites with more hospitable habitat between (more NDVI, for example) may have higher fly diversity. Assessing the specific land cover types between protected areas and urban sites is an important area for future studies. We also note that our study did not take into account plant species composition, including the amount of native versus non-native plant cover. Prior work has shown that the amount of native vegetation [65], vegetation complexity [66,67], and plant diversity [68] can drive urban insect diversity. Investigating plant species composition of the matrix around sites and intra-urban corridors among sites may help explain patterns in diversity that are not accounted for in our analyses.
Exhaustive biodiversity sampling has reaped substantial rewards in understanding how environmental change across space affects biodiversity [69,70]. While labour intensive, our approach created a foundational understanding of which species occur in the phorid fly community, a presumably informative subset of the entire insect community. Baseline knowledge of insect communities is a prerequisite for generating expected responses to continued global change. These data are rare, but sampling programmes like the one we describe here could be replicated in other cities to build baselines that allow us to determine how biotic change varies across background climates and habitat types. However, our robust sampling of the L.A. Basin relied on collaboration between scientists and the public. Members of the community hosted Malaise traps in their backyards, increasing the range of urban environments available for sampling, and, importantly, reducing the resources and labour required for this intensive sampling [71]. With continued public support, efforts such as ours could create long-term data for describing species' long-term responses to urbanization and climate change [72,73].