Introduction

A growing body of research has documented the impact of human activities on insect populations at local (e.g., secondary succession, pesticides) and global (e.g., desertification, global warming) scales1,2,3. Among these stressors, global warming is one of the most pervasive anthropogenic stressors, together with habitat loss and invasive species, with implications for insects that we are just starting to understand4,5. However, measuring global warming effects on insect population trends is difficult, as the signal is usually confounded by natural changes in communities due to myriad ecological interactions, and climate variables that change daily, seasonally, and yearly (e.g., El Niño Southern Oscillation-ENSO, among others6). Despite these methodological difficulties, a decline in insect abundance in some areas of the globe is almost certain6,7,8,9.

Beyond species monitoring, forecasting community responses to natural and human perturbations is emerging as an important aim in ecology10. But the analysis of long-term ecological datasets, collected at different points in time, or time-correlated data, leads to new and unique problems in statistical modeling and inference. One of these issues lies in the length of the time series. While more data is always preferable, a time series should at least be long and frequent enough to capture the phenomena of interest. However, collecting ecological datasets within the time scales forecasters require is challenging. In ecology, time series nowadays are usually less than 20 observations long, even when many models require at least 50 observations for accurate estimation11. For example, datasets interested in year-long dynamics require weekly data for at least one year (i.e., 52 weeks;12). Nonetheless, researchers exploring the extent of insect declines around the globe have considered decade-long cycles such as ENSO, the North Atlantic Oscillation, and the Pacific Decadal Oscillation6,8,13,14.

To date, the extent and magnitude of insect declines in tropical regions, with few long-term insect monitoring schemes, is inconclusive3,4,5,6,7,15. Between 1981 and 2014, Barro Colorado Island (BCI), a tropical forest in Panama, experienced increases of 0.36 °C in mean annual temperature and 17.9% in mean annual precipitation16; furthermore, increases of 2–4 °C in air temperature by 2080 are projected for Panama17. One way these long-term temperature increases may affect insect communities is through increased liana abundance and flower production16, which in turn increase forest floor temperatures due to increasing tree mortality, with potentially large impacts on arthropod-rich soil ecosystems4. Ants (Hymenoptera: Formicidae) are a key candidate to monitor in space and time, being important for the maintenance and functioning of many soil ecosystems18. In a global warming experiment on BCI, an increase of 2–4 °C in air temperature (like those expected for the island), increased worker recruitment to baits from ant genera with increased heat tolerance19. Whether these effects are already impacting ant communities in BCI is unknown. Still, long-term datasets on tropical ant populations comparing more than two sampling points in time are few20. To ameliorate this problem, the Smithsonian Tropical Research Institute has been monitoring arthropods on BCI since 1990, in different programs (e.g., the Environmental Science Program, and the STRI Arthropod Monitoring Program) and using various protocols and collection methodologies4,15,21. The Arthropod Monitoring Program, established in 2009, aims to detect long-term changes and forecast future trends in the abundance and composition of focal arthropod communities in BCI, driven primarily by climatic cycles and changes, as opposed to short-term stochastic changes. Preliminary results in this tropical site have found myriad patterns across insect taxa22,23,24 and highlighted a set of morphological traits related to dispersal capabilities (e.g., smaller size;21) and physiological traits related to weather sensitivity (sensitivity to avg. monthly precipitation;5) that may predispose to population decline.

Here, we explore the temporal responses of tropical male ant production to short- and long-term changes in climatic variables in BCI. Together with gynes, males are a critical component of colony reproduction, and investment in males usually occurs among large and healthy colonies, a condition that is difficult to measure with catches of worker ants in more traditional pitfall or Winkler traps. Male ants also complement surveys of workers, augmenting measures of richness particularly from hard to sample strata, such as for subterranean communities. Because ants are ectotherms, we generally expect a positive relationship between temperature and ant production, via increases in total male production per species (without increases in colony abundance), or increases in colony abundance, or both. Furthermore, as important soil predators, ants should also respond positively to rainfall, which, together with temperature, determines forest productivity12,18. To achieve these goals, we first studied the temporal dynamics of a novel 16-year male ant dataset from Panama (a) by testing for long-term changes in male ant assemblage composition flying during wet and dry seasons. In this forest, previous research has documented distinct ant assemblages flying during these two seasons12. However, no study has assessed how the composition of these season-specific male assemblages changes with time20. We then used a Seasonal Autoregressive Integrated Moving Average with Exogenous Regressors (SARIMAX) to (b) evaluate long-term relationships between male ant production (i.e., the summed incidence of male species across traps) and environmental variables (ENSO, temperature, rainfall, and relative humidity). Finally, (c) we evaluated if the strong ENSO event of 2015 changed the relationship between environmental variables and ant production. Together, these analyses allowed us to (d) forecast ant incidence over five years after the end of our survey and (e) estimate probable changes in ant production given different probabilistic future scenarios of weather variables.

Materials and methods

Study site

This study was conducted on Barro Colorado Island, a lowland seasonal wet forest (09° 09′ 19″ N, 079° 50′ 15″ W). BCI is a 1500-ha island formed in 1914 when the Chagres River was flooded from the surrounding area. Dry seasons usually extend from December to April and receive less than 300 mm of the 2600 mm of annual rainfall. The annual average daily maximum air temperature is 26.3 °C. During the dry season, some tree species lose their leaves, increasing litterfall25, and days are usually 1 °C hotter than during the rest of the year, due to direct sunlight exposure26. We provide in Appendix 1 specific information about sample location coordinates.

Male ant collection

Samples originate from the Environmental Science Program at the Smithsonian Tropical Research Institute (STRI). Ten Malaise traps (model of Townes27) were set in the Southeast corner of the 50 ha BCI ForestGEO plot16, each being at least 200 m distant from each other28. Traps were surveyed weekly for 16 years, from 2002 until 2017. For this work, we extracted male ants from the material collected (97.75% of all ant specimens) during two weeks in the peak of the dry season (between February and April) and during two weeks in the peak of the wet season (in July–August) of each year. To identify these peaks, we reviewed historic records of weather variables and identified weeks that were both in new moon and distant from the start/end of the dry/wet seasons, respectively. We identified males to species level using morphological and molecular characters. First, all male ants were sorted into species or morphospecies levels using standard morphological keys29 and the ant reference collection of the ForestGEO Arthropod Initiative. We identified a subset of specimens (318 specimens from 155 species/morphospecies) using DNA barcodes, a piece of 658 bp of the mitochondrial Cytochrome Oxidase I (COI) gene. These sequences were compared against a larger database of 2,738 ant sequences from 440 species with available barcode identification numbers (BINs) currently barcoded for the island. Laboratory work was performed in collaboration with the International Barcode of Life Consortium30. Sequences are freely available in the Barcode of Life [BOLD] platform, www.boldsystems.org, under project BCIFO and dataset DS-BASSET12;30. We confirmed the identification of our specimens by building Neighbor-Joining trees with Kimura 2-Parameter distances. When no binomial name was available, we used BINs (please see Ratnasingham & Hebert30) as provisional nomenclature.

Ethics statement

Collections of insects (including ants) in Barro Colorado Island are permitted under the general agreement of STRI and the government of Panama and do not require ethical committee approval as covered under the SMITHSONIAN DIRECTIVE 605 of August 11, 2014.

Environmental variables

Climatological data such as the maximum and minimum temperature, precipitation, evapotranspiration, and relative humidity were collected daily in BCI (exact location: “El Claro”) during the study period, and provided by STRI (https://biogeodb.stri.si.edu/physical_monitoring/research/barrocolorado). Missing values in this data series (29%) were filled with a Stineman imputation31 using the R package imputeTS32. In short, the Stineman imputation fills in missing data based on the values of neighboring data points, considering the shape and trend of the time series. This method can improve the accuracy of analyses and predictions based on the data. Additionally, global climatic indices such as the sea surface temperature (ENSO 3.4) and the Oceanic Niño Index (ONI) were extracted monthly for the study period (National Center for Atmospheric Research; https://climatedataguide.ucar.edu).

Because male ant collections and environmental variables were obtained with different periodicities (i.e., collections were taken bi-weekly at wet and dry season peaks, but environmental variables were taken daily or monthly), they were homogenized and transformed into a biannual time series, based on the dates of ant collections. Cumulative values of maximum and minimum temperature, precipitation, evapotranspiration, and relative humidity were calculated by summing the daily values of the week preceding the sample date. Then, for a season estimate, we added the values of the two collection weeks for that season. For ENSO 3.4 and ONI, the average of the monthly values was used. We also added to the model lagged variables with values taken at one and two previous seasons. Appendix 2 details the climatic variables used in the model.

Incidence of male ants

Using malaise traps to catch flying male ants can neither ensure that all males of a given species in a sample are from the same colony, nor that males from a single colony will fall in only one trap. Moreover, mating ecology among ant species differs broadly in terms of the abundance of flying reproductives produced by each colony of each species. Therefore, in this study, we assume that malaise traps are independent sampling units, and we use conservatively male incidence (i.e., presence/absence of males of individual ant species in a trap) as a measure of male production. Mathematically, the variable \({I}_{ijkl}\) represents the incidence of ant species i in trap j of season k in year l. i.e., \({I}_{ijkl}=1\) if ant species i is in trap j in season k of year l; and \({I}_{ijkl}=0\) otherwise, where j = 1, 2, …, 10, k = {wet, dry}; and l = 2002, 2003, …., 2017. The incidence of species i in season k of year l, is given as:

$${I}_{kl}\left(i\right)={\sum }_{j=1}^{10} {I}_{ijkl}$$
(1)

Therefore, the seasonal incidence of each ant species ranges from 0 to 20, as it can maximally occur in all 10 Malaise samples, in both surveyed weeks for the seasons. Thus, the total incidence in season k of year l, is given by the sum of each species’ incidence in season k of year l:

$${I}_{kl}={\sum }_{i=1}^{98} {I}_{kl}\left(i\right)$$
(2)

where 98 is the total number of species abundant enough for analysis, this is eliminating singletons and doubletons (for details, see descriptive results below).

Seasonal differences across time

We first assessed differences in male production across the 16-year dataset between dry and wet seasons. For this, we used a non-metric multidimensional scaling method (NMDS;33) in the R library vegan34. The NMDS is an ordination technique that represents assemblages as points in a low-dimensional space, such that the relative dissimilarity among assemblages is represented by the relative distances separating them. The Bray–Curtis distance was used as a measure of similarity. We assumed that the ordination accurately represents the dissimilarity among samples when Stress values were < 0.2. To assess the significance of the differences in male assemblage composition across seasons, we used an analysis of similarity (ANOSIM; also available in vegan,35). ANOSIM tests the null hypothesis that within-season similarity in male assemblage composition equals between-season similarity. ANOSIM provides a test statistic R, with values close to 1 meaning full dissimilarity among groups. Monte-Carlo randomizations, using seasons as group labels, were also used to test the hypothesis that within-group similarities were higher than would be expected by chance alone. The significance was set at P values < 0.05.

Then, for each season, we evaluated the long-term temporal trend (the presence or lack of directionality) and supra-annual seasonality (the presence or lack of changes with return) of the changes in assemblage composition over time35,36,37. These statistics were calculated using an STL Loess (Seasonal Trend Decomposition using Locally Estimated Scatterplot Smoothing) regression from distance measures (using Euclidean distances) between time points (sampling years). Loess works by fitting a curve to the data using a weighted average of neighboring data points, with the weight of each point decreasing as its distance from the point being estimated increases. STL Loess is a popular time series decomposition method that separates a time series into its supra-annual seasonality, trend, and residual components. A time series without trend indicates that an assemblage presents no change in composition with time (i.e., non-directional). Positive significant trends indicate assemblage with divergent temporal trajectories (directional) in composition. Negative significant trends indicate assemblages with convergent temporal trajectories (directional). On the other hand, the supra-annual seasonal component (shape of a wavy pattern) allows us to check if the rate of directional change exhibits a repeating pattern or cycle over time (change with return, according to Matthews et al.37). The residual component reveals the amount of unexplained variation (or noise) in the data. Small residual values indicate that the seasonal and trend components accurately describe the time series36. This analysis was done in R, with the “codyn”35 library and “stl” function in the stats package38.

How are environmental variables affecting long-term changes in ant incidence? The SARIMAX model

Our objective was to investigate the long-term patterns of male assemblages, specifically the correlation between climatic variables as explanatory variables and male ant production as the dependent variable. Two extensions of generalized linear models and generalized additive models have been used to model ant abundance (as a response variable dependent on time) in the past, namely generalized linear mixed models (GLMM;39,40) and generalized additive mixed models (GAMM;22). These methodologies handle temporal data by including in the specification of the model the presence of autocorrelation in the errors. However, in most cases, what happened at time t-1 is a good predictor of what will happen at time t, so estimating regression models at different points in time involves the inclusion of the lagged dependent variable as a predictor. Including a lagged dependent variable in a mixed model leads to severe bias and inconsistency of the estimators because it violates the assumption of independence between the predictor variables and the error term41. As an alternative, dynamic models with independent variables, among them Seasonal Auto-Regressive Integrated Moving Average (SARIMAX) models42, have been proposed as a rigorous methodology for the identification, estimation, diagnosis, and forecasting of univariate time series data. Therefore, we constructed a SARIMAX model, as described by Korstanje43. SARIMAX models a series of data points in a time-ordered progression and controls for the seasonal dependence of variables, i.e., environmental variables that change according to the season (dry or rainy season;44). A SARIMAX model can be specified when an adequate representation of the stochastic structure of the error term requires an autoregressive integrated moving average modeling (ARIMA). SARIMAX models make the following assumptions in the time series data: a) Stationarity; b) Seasonality; c) No Autocorrelation of residuals; d) No multicollinearity. Please refer to the Appendix 3 for definitions of these terms and further details about SARIMAX assumptions as well as the SARIMAX model’s specification approach. This analysis was done with the EViews Software (https://www.eviews.com).

Are strong ENSO events influencing the relationship of environmental variables with ant incidence? The Chow test

We used a Chow test to test for the presence of a structural break, which is an unexpected change over time in the parameters of a multiple regression model due to any major historical event46. In our case, we tested if a strong ENSO event, that peak in the wet season of 2015 turned into a breaking point, causing an unexpected change in the effects of climatological variables on male ant incidence. The Chow test splits the sample into two sub-periods (before and after the event) in time, estimating the parameters for each of the sub-periods, and then tests the null hypothesis: no breaks at specified breakpoints exists, therefore the two sub-periods are similar, using F-statistics.

The time range used for the analysis is from the dry season of 2003 to the wet season of 2017, and all the regressors (climate variables) in the model were considered together for potential changes in their relationships with the total incidence across the breakpoints. Chow tests are usually done together with SARIMAX because if the regression coefficients are different, indicating a structural break in the dataset, then two SARIMAX models would be necessary (one for each sub-period). As with SARIMAX, the Chow test analysis was done in EViews. Further details of the Chow test are given in Appendix 3.

Forecasting ant production over time

Using SARIMAX models, we forecasted ant production over time while accounting for seasonal patterns and the influence of exogenous variables. The model must first be trained on historical data (in our case, until the year 2017) to expose patterns and correlations between the variables. The forecasting method includes the following steps:

  1. I.

    Providing historical data (including exogenous factors) up to the last observed point, in our case, this is 5 years after 2017 (i.e., 2022);

  2. II.

    Generating point forecasts of the variable of interest for the required future time points using the estimated parameters and historical data;

  3. III.

    Creating confidence intervals around the point forecasts to estimate the uncertainty or variability of the forecasts;

  4. IV.

    Repeating the forecasting process for multiple future time points to obtain a forecast trajectory.

The goodness-of-fit resulting from the forecasting is interpreted in conjunction with three metrics: The R-squared (R2), mean absolute error (MAE) and root mean squared error (RMSE). The RMSE value represents the average amount by which the predictions of the model deviate from the actual values. It is measured in the same units as the dependent variable, making it easily interpretable. However, RMSE can be influenced by the scale of the dependent variable, and it may not capture certain types of prediction errors well, such as outliers or systematic deviations. MAE measures the average absolute difference between the predicted values and the actual values. It provides a similar interpretation as RMSE but without squaring the errors. This analysis was done in EViews.

Monte Carlo simulation

We created a Monte Carlo simulation to estimate the probable changes in ant incidence given different scenarios (or shocks) of climatic variables. The Monte Carlo simulation is a mathematical technique that allows us to quantitatively account for risks in forecasting and decision-making. At its core, the Monte Carlo simulation uses random samples of climatological parameters to explore the behavior of complex systems. Here, we used the historical behavior of climatological variables to determine their tendency, standard deviation, variance, and mean values. For each climatological variable, we analyzed different ‘shocks in level’, a shock corresponding to the mean of the observed distribution plus each of 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, and 5 standard deviations. Then, we generate probabilistic scenarios based on the SARIMAX model to establish how these shocks in the climatological variables affect the incidence of ants over time. This analysis was done using several system-based functions in R.

Results

Our collections from 2002 to 2017 yielded 14,170 males of 155 ant species. Male ants tended to fly more in the dry seasons and were on average twice as species-rich (46.6 ± 15.3 vs. 23.4 ± 10.9 species) and abundant (625.4 ± 382.5 vs. 299.3 ± 301.2 individuals) than in wet seasons. Mayaponera arhuaca (with 3,812 individuals), Ectatomma ruidum (3,229), Typhlomyrmex ADE3065 (863), Probolomyrmex ACH1131 (843) and Strumigenys AAP2320 (493) were the five most abundant species in the survey. Species abundant in the dry seasons were M. arhuaca (3319) E. ruidum (786) P. ACH1131 (725), Mayaponera constricta (427), and S. AAP2320 (390). Species abundant in the wet seasons were E. ruidum (2443), T. ADE3065 (495) M. arhuaca (493), P. ACH1131 (118), and S. AAP2320 (103). A large percentage (33.5%) were rare species, with 37 species scored as singletons and 15 as doubletons. Twelve species were only found in the wet season, among them Carebara urichi and E. tuberculatum occurred in this season with the most abundance (28 and 11 individuals, respectively). Sixty-one species were only found in the dry season, among them Octostruma amrishi and Apterostigma ACH1151 occurred in this season with the most abundance (40 and 31 individuals, respectively).

All subsequent analyses were done with a subset of the database (n = 98 species) after eliminating singletons and doubletons in the 16-year time frame. A full list of species and their abundance per year/season is provided in Appendix 2.

Seasonal differences across time

The NMDS analysis depicted differences in the assemblage composition between dry and wet seasons (Fig. 1, Stress = 0.155). The ANOSIM analysis indicated that these differences in assemblage composition were significant (R = 0.60; p < 0.001). We then looked at the trajectories of wet and dry assemblages in the NMDS across time. For wet (Fig. 2A,C) and dry (Fig. 2B,D) seasons the smoothed trend line constructed by the STL Loess-based indicated positive directional changes in assemblages and the supra-annual seasonal component showed change with return, which was more pronounced in the dry season. Furthermore, the amplitude of the supra-annual seasonal component in both wet and dry seasons did not rise with time, showing that the recurrent fluctuation pattern (of approximately 4 years) in assemblage similarity did not increase with time (Fig. 2E,F).

Fig. 1
figure 1

NMDS of male ant assemblages across seasons. NMDS depicting differences in male ant assemblage composition in the wet and dry seasons from 2002 until 2017.

Fig. 2
figure 2

Trajectories of wet and dry male ant assemblages across time. (A,B) Inter-year assemblage similarity (Euclidean distance), (C,D) a smoothed trend line constructed by the STL Loess, (E,F) the supra-annual seasonal component, and (G,H) residuals are shown for wet and dry seasons.

How are environmental variables affecting long-term changes in ant incidence? The SARIMAX model

Our SARIMAX model showed that expected male ant production is influenced by several factors. First, under the assumption that other conditions remain constant, a higher maximum temperature accumulated over the season was associated with a lower ant incidence (contemporary effect, coef. = − 23.885, p < 0.001). A higher accumulated minimum temperature from the same season in the previous year was associated with a higher incidence of ants (legacy effect = 2, coef. = 15.246, p = 0.003). A higher relative humidity accumulated from the same season in the previous year was associated with a lower incidence of ants (legacy effect = 2, coef. =  − 1.316, p = 0.031). Similarly, higher evapotranspiration accumulated in the previous season was associated with a lower incidence of ants (differentiated series, legacy effect = 1, coef. =  − 4.209, p < 0.001). Finally, the increase in sea temperature (ENSO 3.4) had a positive influence on ant incidence (contemporary effect, coefficient = 40.667, p < 0.001). Appendix 2 includes additional figures showing the variation in main climatic variables over the years as well as a table showing correlations between these variables.

Are strong 2006 and 2015 ENSO events changing the relationship of environmental variables with ant incidence? The Chow test

ENSO events did not change fundamentally the production of male ants before and after it occurred (Chow breakpoint test, 2015 wet season, F = 0.441, p = 0.814).

Forecasting ant incidence over time

Using the SARIMAX model, we forecasted male ant production for the five years after 2017, up until 2022, when year-long climate variables were available (Fig. 3). The model’s performance was high, and the model effectively captured variations in the data (R2 = 0.75, MAE = 36.8, RMSE = 47.31).

Fig. 3
figure 3

Forecast of ant incidence with SARIMAX model. The black line is the observed male incidence (a measure of male production). The light blue line represents the point forecasts (with 95% confidence intervals) during past (before 2017, when our survey ended) and future (5 years after 2017) time.

Monte Carlo simulation

Estimations of probable changes in male ant production given different scenarios (or shocks) of climatic variables with Monte Carlo simulation (Fig. 4) showed that on average and assuming that other factors remain constant, a one-degree Celsius increase in the maximum temperature leads to a decrease in the incidence of ant flying by an average of 28 units. This implies that the projected increase of 1.5 °C by the year 2030 (IPCC47) could potentially reduce the incidence of ant flying by 55% (red text in sub-Fig. 4B). Furthermore, variations in all other variables had significant impacts on male ant production. For instance, an increase of one Celsius degree during an ENSO event resulted in the average increase (production) of 40 male ants. Similarly, a one percentage point increase in relative humidity led to an average decrease of 1.30 male ants. Additionally, a one-degree Celsius increase in the minimum temperature caused an average increase of 15 male ants. Lastly, a one-centimeter increase in evapotranspiration resulted in an average decrease of 4 male ants.

Fig. 4
figure 4

Montecarlo simulations. Probabilistic scenarios for (estimated) male ant production—the sum of male incidence for all species per season, given stressed (shocks) environmental variables in the SARIMAX model. (A) Relative humidity vs. incidence. For example, an increase of 6.32% in relative humidity resulted in a decrease in the production of 17 male ants. (B) Stressed temperature vs. incidence. A projected increase of 1.5 °C by the year 2030 (IPCC47) could potentially reduce the incidence of ant flying by 55%. (C) Minimum temperature vs. incidence. (D) Evapotranspiration vs. incidence. (E) ENSO 3.4 vs. incidence.

Discussion

As expected, assemblages of male ants flying during the wet and dry seasons were significantly different. Seasonal effects on ant assemblages are widespread for tropical ant assemblages48,49, especially in seasonally dry forests11, varying both in temperature and precipitation regimes50 across the year. Nonetheless, to our knowledge, this is the first study looking at long-term (16 years) variability in season-level changes in tropical ant communities, and the second to determine a small directional change in species composition with time (as we found for wet assemblages)20. When looking at other insects, the scant available literature on tropical insects suggests that these remain stable over time (see Lamarre et al.4 for a review). Some cases of long-term population-level dynamics for individual species have been reported for bees23, and one study on tiger moths in BCI suggests that some species populations are locally increasing5. Similar studies in temperate regions have been more conclusive in linking changes in the abundance of ant genera52,53 to 20-year temperature increments and activity density of arthropods54,55 to year-round fluctuation in temperature. Interestingly, both wet and dry season assemblages showed a 4-year supra-annual cycle and suggest that the composition of male assemblages in BCI remains stable, even when measurable levels of stochastics variability exist51, a pattern similar to those by Welti et al.8 for grasshopper communities in temperate prairies (Kansas, USA).

In this study, ENSO had limited power to explain male ant incidence beyond its direct effects on ENSO years. The importance of ENSO in community-level patterns has also been questioned by Roubik et al.23 for bees. As in Roubik et al.23, we suggest that we are in an early stage of understanding how ENSO events interact with limiting factors affecting ant abundance, but the results also attest to the resilience of ant communities to stand extreme events, which are expected to increase with global warming. SARIMAX allowed us to use past changes in male assemblage structure for forecasting future insect abundance. Ecological forecasting can be useful for the development of early warning systems interested in detecting population trends of threatened, endangered, keystone, or common species and detecting the early decline of habitat suitability65,66. Together, with other modeling techniques, previous studies have proven sensitive to environmental variables and are increasingly used by land managers to monitor ecosystem conditions66,67.

Ecologists are just starting to document global warming effects in tropical forests3,4. Improved datasets and analytical frameworks suggest that the cascading effects of human stressors (which include increased temperature) in arthropod communities are difficult, but not impossible, to disentangle6,9. These effects can be direct, as ectotherm physiology responds quickly to increases in magnitude and variability of weather variables68. But the effects can also be indirect and may include bottom-up regulation of insect biomass triggered by changes in the amount and balance of nutrients of primary (plant) production54, among others. Our modeling approach found evidence for the former and the results demonstrated a strong link between male ant production and contemporary weather conditions, even when legacy responses of weather conditions of previous seasons and years were also important56. While maximum temperature was detrimental to male ant production, we also found a positive relationship between minimum temperature and male ant production, a pattern consistent with broader positive links between ant abundance and temperature across latitudinal or altitudinal gradients61. These results are also different from those observed in other taxa such as mutilid bees by Añino et al. in Panama (59; increase with average monthly temperature and decrease with rainfall), and butterflies in the eastern extreme of the Amazon Basin by Araujo et al. (60; weak links between temperature and rainfall). However, all these studies included geographic variability in their design, and shorter study periods (i.e., < 6 years). The high dependence of flying ants on weather conditions found in this study may result from at least two factors4. First, the low seasonality of tropical regions is thought to result in the evolution of insect species with narrower thermal limits57,58,62. Tropical ants may be closer to their thermal limits, beyond which muscular coordination can be disrupted or lost63. Second, tropical ants may have in general lower desiccation resistance to drought or variation in rainfall, even when variability exists among different forest strata (canopy vs. litter,64). Together, we conclude that the effects of climate change may soon represent a bigger threat to tropical insects than habitat degradation63,69,70.