Complementary mechanisms stabilize national food production

Ensuring the temporal stability of national food production is crucial for avoiding sharp drops in domestic food availability. The average stability of individual crop yields and asynchrony among crop yield fluctuations are two candidate mechanisms to stabilize national food production. However, the quantification of their respective influence on the stability of national food production is lacking, as is the identification of the factors regulating both mechanisms. Using yield data for 138 crops and 115 countries over a 50-year period, we first show that the stability of total national yield mostly relies on the fluctuations of the yield of crops covering the largest share of cropland. The average yield stability of these crops exert a stabilizing effect on national food production that is twice as important as the one of the asynchronous yield fluctuations among them. Climate variability reduces the stability of national food production by synchronizing yield fluctuations among crops and destabilizing the yield of individual crops. However, our results suggest that increasing crop diversity can counteract the synchronizing effects of climate variability by enhancing asynchronous dynamics among crops. Irrigation can promote the average stability of individual crop yields but cannot compensate for the destabilizing effect of climate variability. Considering both the response of each crop to climatic variations and the dynamics emerging from crop baskets will help agricultural policies to ensure stable food supply at the national level.

www.nature.com/scientificreports/ ('effective' diversity) and not simply on the total number of crops grown in a country. This suggests that fluctuations in the yield of crops covering a large share of national cropland area have a greater impact on the stability of total national yield than fluctuations in the yield of crops occupying only small areas 22 .
In this study, we quantify the respective role of the average stability of individual crop yields and asynchrony among crop yield fluctuations on national yield stability. Following Renard and Tilman 16 , we compute total national yield stability as the ratio between the mean national yield (i.e. the summed annual kilocalories harvested across all edible crops in a nation, divided by the total area [ha] harvested) and the year-to-year standard deviation of this ratio. Although calories are not the most limiting nutrients in terms of nutrition at the global scale 23 , using caloric yields allow us to compare the production of the different crops grown within each nation. We further test whether fluctuations of the yield of the most abundant crops have a greater impact on the stability of total national yield. To do so, we calculate the average stability of yields of individual crops and asynchrony among crop yield fluctuations using two measures of crop yield, one non-weighted, and the other for which the yield is weighted by the proportion of total cropland it occupies (see Methods). Similarly, we quantify crop diversity by both crop richness and the exponential of the Shannon diversity index (H′) that is a measure of the effective diversity 24 . H′ weights each crop in a nation by the proportion of total cropland it occupies so that the crops that are most produced in a country count more than the minor crops in the calculation of diversity (see Methods). Finally, we assess by which of these mechanisms climate variability, crop diversity and agricultural inputs affect the stability of national food production.

Results and discussion
We used structural equation models (SEMs) to disentangle the role of two stabilizing mechanisms (i.e. the average stability of individual crop yields and asynchrony) and three factors (i.e. climate variability, crop diversity and agricultural inputs) on national yield stability. We built two separate models, one based on crop richness, individual crop yield stability and asynchrony and the other based on these same indices weighted by the crop's share of total area harvested.
Our results reveal that the stability of national food production mainly depends on yield fluctuations of crops that cover a large proportion of the national harvested area. The model including the area-weighted measure of national crop yield explains 87% of the variance of national yield stability versus 48% for the model that does not account for differences in area planted for different crops (Fig. 1). This echoes recent findings showing that the fluctuations of the most largely produced crops have a larger weight on the stability of the total national food production 22 . Although crops with a lower share of cropland weight less in the process, their cultivation deliver other critical services for food security, for example by providing higher economic incomes or nutritional intakes 23,25 .
Both the average stability of individual crop yield and yield asynchrony have significant, stabilizing effects on total national yield when yields are weighted by the proportion of area harvested (Figs. 1, 2). Importantly, this finding indicates that both fluctuations in the yield of a single crop and the dynamics that occur between crop yield fluctuations must be considered to ensure stable food production. However, the influence of the average stability of individual crop yields was twice as important as the one of asynchrony (Fig. 1). Conversely, when crop's abundance is not accounted for, asynchrony has no significant effect on the stability of national yield ( Fig. 1), suggesting that yield gains in crops representing low share of area harvested cannot compensate for yield losses in the most abundant crops at the national scale.
Climate variability has been identified as a main determinant of national food production instability 16 . Our results show that this destabilizing effect arises not only from a negative effect of precipitation and temperature variability on the average stability of individual crop yields, as previously observed 1 , but also from a synchronization of individual crop yield fluctuations (Fig. 1). This brings novel evidence that climate is a main driver of the synchronization of the global production of major commodities 4 .
Previous studies have revealed the potential of crop diversity to increase the stability of crop production at the national scale 16,22 . Accordingly, we find a strong, positive effect of crop diversity on asynchrony (Fig. 3) that can largely counteract the synchronizing effect of climate variability (Fig. 1). This result indicates that asynchrony among the most abundant crops is the main process by which crop diversity stabilizes national food production 16 , confirming that the mechanisms invoked in BEF studies, classically conducted at local scales, can be extended to larger spatial scales 20,21 . However, whereas local-scale BEF studies often involve direct biotic interactions in driving asynchronous dynamics among species (e.g., ref. 19 ), our dataset at national scale does not allow considerations of the effects of crop-crop interactions. Further research will be needed to go beyond our correlative approach to better understand the links between crop diversity, asynchrony and yield stability at such a large scale. In particularly, the role of spatial heterogeneity in environmental conditions in shaping the distribution of crops and in generating spatial asynchronous dynamics among different crops merits deeper exploration 20,21 .
Investigating the role of agricultural inputs shows that greater use of irrigation stabilizes total national food production by increasing the average stability of crops that occupy the largest proportion of the national harvested area (Figs. 1, 4). This probably reflects the fact that the most important crops for food consumption and trade (e.g. rice, cereals, maize) are also the most irrigated 26 . However, the stabilizing effect of irrigation on the yields of these crops is by far lower than the destabilizing one of climate variability (Fig. 1). The selection of varieties that are less reliant on irrigation and more resistant to climate variability will consequently be important to ensure a higher stability of crop yields [27][28][29] . Finally, we find that nitrogen fertilisation weakly affects the stability of the total, national yield although it is negatively associated with the average stability of individual crop yields when crop's abundance is not accounted for (Fig. 1).
Ensuring the stability of food production at national level is becoming an increasingly important challenge for agricultural policies. Overall, our study reveals that both the average stability of individual crop yields and www.nature.com/scientificreports/ asynchrony in yield fluctuations among crops are important mechanisms to stabilize national food production in the face of climate variability. Promoting crop diversity at the national level might be a solution to promote multiple benefits, including greater stability of food production 16,22 , a diversified diet 30 and the reduction of the use of agricultural inputs 31 . However, not all baskets of crops can provide all of these services, and our results suggest that it is important to design crop diversification strategies in a way that promotes asynchronous yield fluctuations between crops, for example by selecting species with different responses to environmental fluctuations. Finally, while the national level is the one at which agricultural policies are made, working at such a large scale does not allow to fully capturing determinants of food supply at finer scales. Transposing our approach to smaller scales will provide a better understanding of the determinants of stable food production worldwide.

Materials and methods
National yield stability. We used the FAOSTAT database (http://www.fao.org/faost at, visited in September 2019) to obtain data on annual crop production (in tons) and area harvested (in hectares) from 1961 to 2010 for 138 crops in 91 populous nations. Following Renard and Tilman 16 , we accounted for differences among nations in data quality and excluded five nations, namely North Korea, Guinea, Kenya, Mozambique and Zambia, for which at least 20% of the data on area harvested or production were extrapolated by the FAO (see details in 16 ). We calculated for each nation and each year the total annual caloric yield (millions of kcal ha -1 ).
To do so, we first calculated the kcal production of each crop by multiplying the production of each crop by its commodity-specific kilocalorie conversion factor from the USDA Nutrient Database 32 . In doing so, we were able to compare the production of different crops. Then, we summed these kcal harvests across all crops and divided this value by the sum of harvested area for all crops. We calculated national yield stability (S) as the ratio of mean total annual caloric yield (µ T ) over its time-detrended standard deviation (σ T ) for fifty consecutive years (1961-2010). We accounted for a temporal trend of increasing total annual crop yield by implementing a loess regression between annual crop yield and years. σ T corresponds to the standard deviation of the residuals of this regression. Finally, we compared this stability index (largely used in the biodiversity-ecological functioning research, e.g. 14,16-18 ) with the resilience index used by Zampieri et al. 22 . Both indices were strongly correlated (r = 0.992), strengthening our findings. where Φ is the asynchrony of crop species based on annual caloric yield (millions of kcal ha −1 ) with σ 2 T the temporal variance of the time-detrended national yield and σ i the time-detrended standard deviation of each crop's annual kcal yield. The value of asynchrony varies between zero (perfect synchrony) and one (perfect asynchronous temporal fluctuations). with N being the total number of crops grown in a country each year.
The exponential form of the Shannon diversity index gives the effective crop diversity that is the number of crops representing an equal share of harvested area 24 . In other words, the exponential of the Shannon diversity index weighs all species by their frequency, without favouring either common or rare species 24 . We averaged  Agricultural inputs. We extracted the annual national application of nitrogen and the annual cropland area equipped for irrigation from the FAOSTAT database. Because Ireland, New Zealand and Netherlands use much of their fertilizers on pastures rather than croplands, we excluded these nations from our analysis. Similarly, we excluded Egypt because it has 100% of cropland equipped for irrigation. We calculated the annual rates of nitrogen application and irrigation per hectare by dividing their use by the total annual cropland area.
Climate variability. We used global gridded climatic data from the Climate Research Unit of the University of East Anglia 33 to compute the year-to-year variability of growing season precipitation and temperature for each country, both strongly affecting the stability of national food production 16 . From these data, we derived annual precipitation and temperature for each grid cell in a country by taking the sum of monthly precipitation and the mean of monthly temperature values weighted by the proportion of cropland in each grid cell 34 . We then computed the year-to-year coefficient of variation of cropland-based temperature and precipitation for each country.
Statistical analysis. We used structural equation models (SEMs) to evaluate how irrigation, intensity of use of nitrogen fertilizers and crop diversity affected national yield stability through changes in the average stability of yields of individual crops and asynchrony of yields. SEMs represent a powerful way to disentangle complex mechanisms controlling crop diversity-stability relationships, as previously done in natural ecosystems (e.g. 14,15,35,36 ). We set up two different structural equation models, one based on non-weighted indices of stability of individual crops and asynchrony, the other based on the same indices weighted by the proportion of total harvested area accounted for by each crop. We firstly considered the effects of agricultural inputs and crop diversity on the stability of national food production via the path of average yield stability. The second path quantified the indirect effects of agricultural inputs and crop diversity on national stability via their impacts on crop yield asynchrony. We also accounted for the direct effects of agricultural inputs and crop diversity on national yield stability. Finally, we controlled for the effects of climate variability on total, national yield stability, individual crop yield stability and yield asynchrony. SEMs were run with the lavaan R library 37 . We used the standardized estimates to compare the relative importance of the different paths. The model fit was evaluated using the Fisher C'score and its associated p values. Because the structural equation model assumes linear relationships between predictors and the dependent variable, we also plotted the relationships between total national yield stability and both asynchrony and average stability of individual crop yield to control for linearity (Fig. 2). Similarly, we investigated the relationships between crop diversity and asynchrony (Fig. 3), as well as between irrigation rate and the average stability of individual crop yield (Fig. 4).

Data availability
The sources of all data used in this study are referenced in the "Materials and methods" section and all raw data are freely accessible at the URLs provided. The datasets used for the analyses are available from the corresponding author upon request.