Resilience of food sufficiency to future climate and societal changes

4 University of Potsdam, Germany 5 Aalto University, Finland 6 Stockholm Resilience Centre, Sweden *Authors co-lead this work. ° corresponding author: ​ chweil@stanford.edu Abstract Producing sufficient food to meet rising demand is a precondition for resilience of the global food system in the face of climate and societal changes. Leveraging machine learning techniques, we project total caloric yields, aggregating 100 crops and assuming crop mix adaptation to climate, soil and management conditions. We then estimate terrestrial caloric sufficiency considering population growth, diets, and production driven by climate, agricultural management, and cropland expansion under five climate change and socio-economic scenarios (SSPs). We show that global caloric sufficiency is likely to decrease, despite increased food production, because those gains are outweighed by population growth and higher animal products consumption. Caloric sufficiency decreases for most countries. Among countries facing hunger today, most remain vulnerable, and around 25 countries, mostly in Africa, become more


Introduction
Global food demand is expected to rise, potentially doubling by 2050 1,2 . Given that more than a billion people currently are undernourished and at least twice as many suffer from micronutrient deficiencies 3 , growing demand raises serious food security concerns. For the first time in 40 years, global food insecurity is on the rise 4 and these trends are expected to be aggravated by the combined impacts of growing demand and changing climate 5 which is already affecting crop yields 6 .
Food security depends not only on the quantity of food available, but also equity in food access and distribution, food safety and stability of these conditions over time. Resilience of food systems, here defined as the capacity to navigate disturbances while still retaining fundamental functions and properties 7 , is crucial to ensure these multiple dimensions of food security are met under increasingly uncertain conditions. Food systems resilience is also multi-dimensional [8][9][10] and can be affected by a wide variety of ecological to socio-economic factors, among which crop diversity, equity in food access and decision power, governance, trade, social justice and management of natural capital have key roles in building long-term food security and resilience, from determining access to food, to supporting diverse diets, agricultural landscapes and alternative food production systems (such as aquaculture 8 ).
Nevertheless, the capacity of societies worldwide to ensure global food security is highly dependent on the biophysical resilience of food production landscapes and their capacity to provide sufficient food under changing conditions. In this paper we focus on food availability over time as a critical component of resilience. Indeed, Thus, we complement analyses that focus on institutional aspects of food system resilience with a focus on the biophysical aspect of resilience, exploring caloric sufficiency implications of the adaptation strategy of modifying local crop choices to adapt to new growing conditions. Caloric sufficiency -caloric supply relative to demand -provides a coarse and imperfect but useful indicator of food availability, and analyzing changes in caloric sufficiency (direction, magnitude and consistency across scenarios) provides helpful indications on the food system's ability to deliver food security over time. We thus interpret it in conjunction with existing national food security indicators, revealing vulnerable areas for further examination.
To simulate such adaptation of crop mixes to new climate and growing conditions, we aggregate 100 nutritionally-relevant crops to estimate total caloric yields without specifying which specific crops comprise this yield. Instead of identifying crop-specific, empirical relationships between climate and yield, our model calculates the overall ability of a location to produce calories in given growing conditions (climate, soil,etc). Leveraging machine learning approaches and spatially-explicit yield data, we project local production, which, divided by the demand from future population and expected diets, provides estimates of caloric sufficiency. Resilience of caloric sufficiency to climate and societal changes is assessed by the direction and approximate magnitude of change in caloric sufficiency, across different scenarios changes in climate and society -the Shared Socioeconomic Pathways (SSPs 9 ), which help us envision consequences of different resilience strategies.
The combined effects of climate change and technology on future yields are not well understood. Recent studies diverge widely, with projected yields ranging from drastic decline due to climate change 11 to larger yield-enhancing impact s from technological improvements 14 . We f 10 us on biophysical terrestrial food production capacity in the absence of technological breakthroughs; our novel modeling approach estimates total yields based on climate, soil and management condition which have not otherwise been accounted for in the crop yields projections of the SSPs 9 . Our findings fall within the range of existing projections, which vary substantially: comparable forward-looking studies project changes in global yield within this timeframe of -5% to +13% 16 , -5% to +47% 17 ,~+1% 18 , ±20% 19 . Some studies focused on climate change find consistent declines (-10% 20,21 to almost -30% 11 ). When accounting for prospective technology developments and CO2 fertilization, most studies project increases in global yields, varying from +23% 22 to +50% 23,24 , though these effects vary by region and crop 16,25,26 and include declines of -55% for maize 25 . Projections extrapolating past trends fall in the same order of magnitude, with increases of +30% to +50% 23,24,27,28 . Similar trends are found with sustainable intensification, focusing on irrigation (+24-37% 29 ) , nutrient management (+45-70% 30 ), optimizing cropland allocation 31 or technology 10 . However, the vast majority of these studies do not account for the fact that water resources are quickly becoming scarce 32 , and those who do find more conservative results (e.g Beltran-Peña et al. 33 find similar results to ours under SSP1 but project declining production in SSP2 and SSP3). Future work is necessary on this topic to assess where current stressors to food security would potentially be compounded by lack of water availability.

Large decline in Global Caloric Sufficiency
We calculate global caloric sufficiency to be 1.96 currently, and yet about one out of nine people is undernourished 4 . At a global scale, terrestrial caloric sufficiency measures the ability of land to produce sufficient food for the world's population, accounting for losses and feed (Methods eq.1). Mathematically, a ratio of 1 means supply matches demand, but because a perfect distribution and access to food is unrealistic, an adequate caloric sufficiency must be higher than 1. Changes in the caloric sufficiency ratio indicate whether the overall food system is expected to become more or less strained by total production capacity.
Global caloric sufficiency is projected to drop consistently (i.e., in every scenario) because demand from a growing population 34 eating more animal products 35 outweighs increases in production ( Table 1). The largest decline (-40%) in caloric sufficiency is seen in the regional rivalry scenario (SSP3) because of its steep growth in population, reaching nearly 10 billion by 2050, exacerbated by both increased consumption of animal products and a small decrease in our projected yields. However, even in this scenario, caloric sufficiency at the global scale remains above 1. Global caloric sufficiency is projected to be highest under fossil-fueled development (SSP5), closely followed by the middle ground (SSP2) and the sustainability (SSP1) pathways, though it still declines by about 30% from its current value.  34 , and diet 35 were used to project terrestrial food production and demand. Specifically, climate forcing and management projections (fertilizer use, irrigation and GDP per capita 37 as a proxy for agricultural industrialization) were used to model yields. Four different global circulation models (GCMs) were used to translate each climate forcing scenario into gridded projections of climate variables (seasonal and annual, normal and extreme precipitation and temperature). The SSPs have been widely used by the research and policy communities and were developed to cover a wide range of possible futures 38 , from an inclusive "sustainability" scenario (SSP1) to a capitalist vision of geo-engineered, globalized, "fossil-fueled development" (SSP5) 12 . Population and diet datasets are at national resolution, and all others are at 5 arcmin. The diet column shows total calories provided by livestock and proportion of livestock products in diet, globally (though distributions by countries of consumption vary per scenario). The right side of the table presents our findings for each of the five SSPs showing that global caloric sufficiency drops in all scenarios but remains above 1. National caloric sufficiency drops below 1 in numerous countries in all scenarios. These results are explained by the following columns: production increases globally because cropland expands in all scenarios. However, this increase in food supply is outweighed by demand, which is driven by population growth and dietary changes: people are projected to eat more animal products in the future, so the food/feed split is adjusted accordingly when calculating caloric sufficiency.

Caloric Sufficiency decreases consistently in most countries
Caloric sufficiency is also relevant at a country level, as this is the scale at which most trade and geopolitical decisions are made. More than half of countries see their caloric sufficiency decrease in every scenario while 102 of 160 countries assessed see their caloric sufficiency decrease in most scenarios. The number of countries with caloric sufficiency under 1 in the future increases by almost 50%, regardless of scenario (Table 1). National caloric sufficiency shows a significant positive correlation with most recent information on trade independency 39 (Pearson correlation coefficient r= +0.61), Global Food Security Index (GFSI) 40 (r=+0.34), and nutrition 41 (r=-0.25 with malnutrition). This indicates that countries with higher caloric sufficiency are less dependent on trade and less prone to malnutrition and food security issues.
We group countries empirically following eight narratives reflecting their caloric sufficiency levels, trends and current trade situation ( Table 2, Fig 2). We identify additional potential risk by considering current national income, trade dependence 39 16 , the columns displaying the number of countries per category indicate variability when grouping countries based on caloric sufficiencies calculated with UN population projections 45 . Trade independency is calculated as the share of net imports relative to the entire food supply 41 . See Table S2 for details on classification tree and the full list of countries per category. The shaded yellow bar highlights the critical caloric sufficiency threshold around 1 with a +/-0.2 tolerance. The geographic distribution of these countries is shown in (B), and the graph in (C) shows how these groups relate to most recent information about import independency, the Global Food Security Index (GFSI), adequate nutrition (1-undernutrition), water security, and income level (GNI). Axis scale refers to caloric sufficiency, while the other metrics are scaled from 0 to 1 (details in Methods). In (C), future caloric sufficiency is averaged across SSPs and the mean values across countries in each category is displayed. The same figure with standard deviation can be found in Fig. S8. Color legend applies to 3 subfigures.

Most vulnerable countries: low yields & growing population
Countries that have low caloric sufficiency today and see it decrease either consistently across scenarios, or to levels that fall below 1 by 2050 in at least one scenario, are classified as most vulnerable . On average, sufficiencies of these 35 countries drop from 0.75 to 0.5; Botswana, Norway, Portugal, Russia most also depend on trade. Over half of low income countries fall into this category (Table  S2).
Several of these most vulnerable countries in terms of caloric sufficiency are already vulnerable in other ways. Niger, Pakistan and India bear extra water security risk in addition to high malnutrition ( Fig 2C). In India, Angola and Niger, increases in yields are far outweighed by population increases. Declines in caloric sufficiency are most extreme in the Philippines, Madagascar, Nigeria, Togo and Malawi (all falling from~1.1 to~0.5), which all have significant levels of malnutrition today. Many countries in Subsaharan Africa have sufficiencies falling below 0.6, especially under SSP3, which projects large population growth, and likely may be exacerbated by lack of trade, international cooperation and technology transfer inherent to this regional rivalry scenario.
Countries where sufficiency is well above 1 today but is projected to drop below this threshold (within a margin of error of 0.2) are newly vulnerable to risks of food demand outweighing domestic supply. These are countries where sufficiency consistently drops and either falls below 1 in at least one scenario, or remains consistently around 1 (±0.2), with sufficiencies dropping on average from 1.8 to 1.1 and as low as 0.3 (in Benin). This category includes countries of all income groups, though it is dominated by middle income countries. Among these 24 countries, some stand out as more endangered , like Sudan, which already faces high levels of malnutrition and water security threat. Uzbekistan, and, to a lesser extent, Burkina Faso, Mexico and China also have water security concerns. High dependence on imports is an additional vulnerability for Tajikistan, Senegal, Luxembourg, UK, and Mexico.
Major population growth (often more than doubling) explains caloric sufficiency declines in Africa (Benin, Burkina Faso, Ivory Coast, Guinea, Sudan, Senegal, Sierra Leone, Tanzania, Zambia). While China, Indonesia and Bolivia stay on the upper side of the "danger zone" (1-1.2), Burkina Faso, Zambia and Malaysia are the countries where sufficiency declines the most, dropping from a current sufficiency of~2 or 3 to around 1 or less, especially in scenarios with the most population growth.

Declining sufficiency of exporters puts importers at risk
Exporters are defined as countries with initial caloric sufficiency higher than 3 and trade independence higher than 0.8. They are high or upper-middle income countries, with the exception of Ukraine (lower middle income). They also unsurprisingly tend to have high GFSI (>0.55), high nutrition (malnutrition <5%), and much l ess land area facing water depletion (water security index >0.65). The world's largest exporters (USA, Brazil, France, Denmark including Greenland, Canada, Argentina, Uruguay) see their caloric sufficiency decrease, on average from 6 to 5 ( Fig. 2A), though some see more drastic declines (e.g, by half for Australia, due to a projected doubling population). Although they are all still comfortable in caloric sufficiency, these declines could mean reductions in export volumes, which would likely affect the countries that import from them, especially those with lower trade independence. This is a good example of the risks associated with a highly interconnected global food system, as described in Liu 43 , Nyström 44 et al.
Most importers , countries that are currently very reliant on food imports ( trade_independency_index <0.1), see their caloric sufficiency decrease or remain unchanged. These countries typically already have fairly low caloric sufficiency to begin with (86% are under 1.5, with a minimum of 0.13 for Djibouti; only Montenegro is above 2), reflecting their dependence on trade. Though trade patterns could evolve, there is a clear trend of caloric sufficiency declining for exporters and not increasing for importers. A decline in sufficiency of exporter countries might decrease the volume of food exported, and even though most importers are high or upper-middle income, with GFSI>0.7, they may find it difficult to meet demand, under such trade patterns. For example, Singapore is highly dependent on Malaysia for food imports, and Malaysia's sufficiency is projected to decrease by 0.84 on average. Rough approximations of future trade status based on GDP and caloric sufficiency suggest fewer countries will be able to export while many more will need to import (see Fig S9 ). In addition, strong barriers to trade in the regional rivalry (SSP3) scenario would put importers at risk.

Less vulnerable countries are of milder concern
Countries we consider to be of milder concern are those currently vulnerable but improving in terms of caloric sufficiency, or conversely countries with declining sufficiency but consistently remaining above 1, as well as countries whose future sufficiencies are very sensitive to differences between SSPs and thus where targeted policies may make a strong difference.
Four countries with an original situation similar to the most vulnerable countries (sufficiency ≤1.1) are projected to improve slightly. These vulnerable but improving countries include Morocco and Peru, where cropland and productivity increase while population stagnates. In Equatorial Guinea, the jump in sufficiency is due to a dramatic projected increase in both cropland and yields.
Twenty-eight countries are decreasing but not as vulnerable : their sufficiency, initially above 2, decreases in some scenarios, though never drops below 1. On average, their sufficiency decreases from 3.1 to reach 2.2. Most of these countries have relatively high GFSI (>0.5), high to middle income, and low (<10%) malnutrition. Among them is Germany, for which sufficiency drops from 2.8 to around 2.3 because of decreasing productivity as temperatures increase beyond the optimal range (see Fig. S4). Also a few countries with lower income (Chad, Mali, Somalia), lower GFSI (these, plus Laos), and more malnutrition (these, plus East Timor, Papua New Guinea). Some of those are sensitive to scenario-specific assumptions, such as Turkey where sufficiency increases under SSP2 which assumes a vast cropland expansion, or Venezuela, Nicaragua, Mali, Papua New Guinea, Somalia or Chad where sufficiency falls close to 1 in the worst scenario.
Fifteen countries are highly variable across scenarios. Among these is South Africa, where sufficiency decreases slightly in most scenarios but rises above 4 (from 1.7) in SSP3 due to a projected tripling of cropland, extending on coastlands and in the East of the country.
Conversely, Sweden's sufficiency increases slightly from its initial value of 3 in all scenarios except in SSP5, where a projected doubling of population leads to sufficiency almost dropping by half. Cambodia drops in SSP3 due to population increase. Switzerland stays around its initial value of 1.4, except in SSP5 where it drops below 1 due to population increase coupled with declining yields.These examples might indicate the existence of thresholds or assumptions that are critical to caloric sufficiency in these countries. In these cases, targeted policies might be effective.

A few improving countries benefit from cropland expansion
Lastly, seventeen countries are classified as most resilient among the narratives we identified. Dramatic increases in cropland areas are projected to occur in some African countries (Lesotho, Botswana, Swaziland) as well as in higher latitude countries (Norway, Russia particularly in Siberia), resulting in higher caloric sufficiency. Similarly, in Tunisia, caloric sufficiency increases (from a very low starting point of 0.65) due to productivity increases (with increase in GDP) coupled with the projected large cropland expansion on the edge of the Sahara.
The conditions leading to projections of increased resilience may not be reliable: cropland expansion projected in the SSPs is quite hypothetical, projecting agriculture even in sandy areas. Furthermore, several of these countries (Libya, Tunisia, Iran) are already experiencing serious threat of water scarcity, with more than 50% of their land area already facing water depletion. Results suggesting that yields will increase due to management may be misleading because the irrigation projections used to model yields do not account for water availability, though they are the best available data for these scenarios. Additionally, low trade independence in Botswana, Norway, Portugal, Tunisia may lead these countries to face the same challenges described above for importers .

Drivers of Caloric Sufficiency (Sensitivity analysis)
To evaluate the sensitivity of future caloric sufficiency, and subsequent country groupings by narratives, we replicated our results using variations in the projected drivers of demand, production (Fig 3) and system efficiency (Fig S10). With an additional billion people, global caloric sufficiency drops only about 0.1 (-0.09 to -0.14), suggesting that our results are fairly robust to population projections. Using 9 newer, higher population projections 45 reduces caloric sufficiencies (Fig 3A), except in countries where population growth does not follow the global trend (which explains the spike in Argentina, Norway and Singapore and the drop for Mexico under SSP3 with Jones' population projections) .
Country groupings remain relatively stable, with most (116) countries maintaining their classification. Fewer countries see consistent increases in caloric sufficiency, 4 additional countries become most vulnerable , and caloric sufficiency consistently falls below 1 for 16 additional countries (Fig 3E). Caloric sufficiency is also sensitive to demographic assumptions; our simplification using age and gender-agnostic caloric requirements may lead to an underestimate of~0.1 in global caloric sufficiency in most countries, especially those with younger populations (Table S5).
Regarding diets, increasing consumption of livestock products by half globally (to~30% of diet) would reduce caloric sufficiency more than an additional billion people would, while cutting livestock consumption by half (to~10%) would increase global caloric sufficiency by almost~0. 16. Reducing food waste could lead to comparable gains, as the sensitivity of caloric sufficiency to food waste closely mirrors diets ( Fig S10 ). However, neither diets nor food waste are large enough overall drivers for reductions to maintain current levels of caloric sufficiency.
Global caloric sufficiency increases by~0.1 for every 9% increase in yields or every +3% expansion in cropland (Table S3, Fig 3C,D). To keep global caloric sufficiency the same as today given changes in other drivers, an increase in yields of 60% (SSP5) to 100% (SSP3) would be necessary. Country groupings are more sensitive to variations in projected yields (Fig 3H), in a range consistent with comparable studies (yields dropping -35% 11 to increasing +75% 10 ), and cropland (Fig 3G), up to +20%. Unsurprisingly, the larger increases in yields and cropland augment the number of countries categorized as increasing sufficiency while decreasing those categorized as newly vulnerable and of mild concern . Higher yields increase caloric sufficiency, slightly for most groups and strongly for exporters , which generally have more cropland (as Argentina in Fig 3D).
A combination of these factors could theoretically lead to keeping caloric sufficiency at its current level, e.g., in SSP2, improving yields by 34%, cutting food waste in half and reducing livestock products in diets by 33% (see also Table S3). However, this sensitivity analysis does not explore the feasibility of these changes.

Discussion
Building on the most recent high resolution data available, combining 15 data sources, and leveraging machine learning approaches, we investigated the caloric sufficiency implications of a crop mix adaptation narrative given future environmental and societal changes. This study attempts to project general direction and magnitude of food production and demand, without optimizing diets or specific crop choices. Our data-driven global modeling is limited by data gaps 56 and resulting simplifications (e.g., generalizations made in the development of the SSPs, not accounting for CO2 fertilization, water depletion, soil degradation nor climate shocks such as droughts), and would benefit from improved fine-scale food production data, more detailed analysis of observed crop mix adaptation behaviors, improved understanding of climate change impacts on yields, and societal, environmental and economic feedbacks such as changing trade patterns.
Across the scenarios considered, which were designed to represent a wide range of possible futures, we find the projected direction and magnitude of changes in caloric sufficiency to be surprisingly consistent, and relatively robust to uncertainty. We find that most countries already facing hunger remain vulnerable in the face of future caloric sufficiency; for 9 out of 10 countries in which more than 10% of the population is currently undernourished, caloric sufficiency is projected to decrease in most scenarios. For the remaining countries, change in caloric sufficiency is variable across scenarios, and never consistently increases. High income countries are not spared; most (75%) see a decrease in sufficiency in at least one scenario. Half of high-income countries actually find their sufficiency decrease in all scenarios, echoing previous findings projecting declining food security scores in higher income countries 26 . We also identify 15 countries highly variable across SSPs, suggesting that targeted policies may have substantial impact.
Declining global and domestic caloric sufficiencies suggests that adapting the choice of crops grown locally will be insufficient to feed a growing population in a changing climate. Under our scenarios, and in line with a recent comparable study 33 assuming sustainable intensification and including water depletion, global production is projected to increase, but not as fast as the growing population's food demand. Resilience strategies beyond sole adaptation of crop mixes will be needed to avoid declines in domestic caloric sufficiency in most countries. This conclusion suggests that more than just crop mix adaptation is needed, and resonates with recent work calling for a food system transformation 46,47 , and even revolution 48 . To keep global caloric sufficiency constant, major changes will be necessary, acting on demand, production, system efficiency or, most likely, a combination of these drivers. While assessing the feasibility of such interventions is beyond the scope of this research, our results complement recent work 2,49 finding that combining dietary changes 50-52 , food waste reduction 53 , optimizing cropland, water and nutrient management 30 could feed the 2050 population while remaining within planetary boundaries. Improving availability of fine-scale food production data, as well as our understanding of climate change impacts on yields, are important to apprehend the consequences of different coping, adaptation and transformation strategies for the food system.

Caloric yields model: data sources and pre-processing
In our novel yields modeling approach, the response variable is the aggregated crop yields of 100 nutritionally relevant crops (excluding forage, sugar, cash crops and oils. Full list in Text S1b) in calories per hectare, built from the dataset compiled by Monfreda et al. 15 , which provides sub-national agricultural statistics of yields and area harvested for 175 crops circa the year 2000 (1997)(1998)(1999)(2000)(2001)(2002)(2003)(2004). It is the most recent data available with this level of detail in terms of crop species, and at such a fine resolution. All model inputs listed below are at the same resolution (5 arcmin), unless otherwise stated. We aggregated these 100 crop yields in weight into a single aggregated caloric yield, using crops' caloric content from the FAO's food supply balance sheets (following the methods used in Johnson et al. 54 , similarly to the work of West et al. 55 ). Though this dataset is not exact at this fine resolution, it is the best approximation available, and thus informative for the coarse projections this paper presents.
The climate input data is acquired from Worldclim v1.4 36 and consists of 12 bioclimatic variables capturing annual values, seasonality and variability of temperature and precipitation, as well as altitude and climate. These projections are available for 4 representative concentration pathways (RCPs), we used the closest corresponding RCP for each SSP. To account for global circulation models (GCMs) variability, we approximated a climate ensembling methods by modeling yields for each SSP with 4 different GCMs' climate data chosen based on data availability (GISS-E2-R, HadGEM2 ES, MIROC-ESM and CCSM4), and then averaged the 4 caloric yields output maps. Topographic variables (altitude and slope) are also obtained from this source.
To account for management practices, we added fertilization application rates and irrigation in fraction of crop area irrigated 13 , per crop type (perennial, annual C3, C4, nitrogen fixing). In addition, GDP per capita 37 captures effects of agriculture industrialization as well as socio-economic factors such as technology or capital investment. GDP per capita by country is categorized using quantiles to create 6 bins such that each contains a fixed amount of the data (10%, 15%, 25%, 25%, 15%, 10%) to follow natural breaks of distribution . The reasoning behind categorizing this variable is the following: (a) we only account for adaptation here, thus no technological advances beyond the scope of what is known today, therefore we do not wish to extrapolate the trend of higher yields with higher GDP beyond the best technology as is available today, and (b) tree-based models such as our random forest approach tend to perform poorly to project on data points outside of the training distribution. Binning the GDP reduced the points outside of convex hull to very few (see section Modeling below and Fig. S2).
Eight soil variables considered in the GAEZ assessment 56 to be influencing crop performance were also included. These indices, with 4 to 7 classes, were linearly normalized. Soil degradation is likely to further impact yields, but is complex to model and current research did not provide clear conclusions 57 nor could projections of soil quality for 2050 be found. Hence, soil degradation is not accounted for in this study and left for further improvements.
The above datasets were combined, converting from gridded rasters to tabular formats with Python 3.7 and GDAL 2.4.1. All continuous inputs were standardized. The model is trained on about 1 million (n=906 770) pixels including cropland (out of the 3 million pixels on land), excluding all information on their geographical location to avoid data leakage.
Current cropland extent is extracted from the European Space Agency's Climate Change Initiative dataset 58 reporting land use globally, at 10 arcseconds for 2015. Future cropland projections were drawn from the Land-Use Harmonization 2 project 13 , which provides 15 arcminute resolution continuous data of aggregate land-use change. For each SSP, these were downscaled to the 10 arcsecond resolution of the ESA LULC map using a downscaling algorithm based on the spatial allocation approach 59 . This approach allocated the aggregate (coarse LUH2 grid-cell) level change to specific high resolution grid-cells based on adjacency to each other LULC class as well as physical suitability variables. These fine scale land use maps were aggregated (as %cropland) to 5 arcminutes to match the other datasets.

Modeling aggregated caloric yields
Though existing crop models were used by SSPs framework, projected yields don't account for climate change 9 , are often (at least partly) based on demand, and at a much coarser scale ( See Text S2: SSPs Yields Projections) . We propose a new approach consistent across scenarios that embeds the crop mix adaptation assumption by considering total caloric yield. This approach innovates beyond past modeling approaches of crop-specific responses to climate change 11,16-22 by predicting total caloric yields, aggregating across all crop types from the outset, which sidesteps the need to predict exact crop mixes, implicitly assuming upfront some degree of crop mix adaptation.
This study does not explore potential more complex behavioral responses, economic or environmental feedbacks, or likelihood of farmers to adapt to future conditions. We assume that farmers will grow what grows best -to the extent that they currently do -given climate, soil and societal conditions on their landscape. This translates to aggregating all nutritionally-relevant crops' yields, and to assuming that the crop mix will be consistent given climate and societal conditions. In other words, we take a coarser picture of the total caloric yields of all nutritionally-relevant crops, thus embedding the adaptation assumption (i.e. that farmers will adapt the crop mix to be relevant to new climate and societal conditions). In line with this adaptation assumption, our approach does not venture to include other changes or innovations, such as technological breakthroughs (though we do account for new places using the best technology available today).
To ensure the validity of aggregating all crops' caloric yields and modeling directly the total caloric yield , we verify that pixels with similar inputs (i.e. similar climate, soil and management conditions) will result in similar aggregated caloric yields. To prove this, we use the euclidean distance (equivalent to L2 norm) on standardized inputs to capture the dissimilarity between points. Sampling 4 million pixels pairs (with a set of 2000 randomly selected pixels, each associated with 2000 others), we find a strong positive Pearson correlation (+0.91, p-value 2.02e-43 ), on euclidean distances up to the 0.95 quantile (highest distances, thus very unsimilar points are not relevant to evaluate the impact of dissimilarity in inputs on distance in aggregated yields). In other words, the differences in caloric yields increases with the differences between inputs points, i.e. similar points have similar aggregated caloric yields. See also Fig. S1.
A random forest approach with the gradient-boosting framework, implemented by the library xgboost 14 was chosen for its effectiveness and scalability, training on a dataset of aggregated crop yields on~1 million cropland pixels (n=906 770) of size 5 arcmin with the 31 features described above, capturing climate, management and soil conditions. This model results in R 2 = 0.95 on unseen data and an error of less than 1% when re-predicting the baseline total production. The model error (RMSE = 1.06e9 calories per hectare) represents approximately 15% of the current yields (~7e9 calories per hectare), which is in line with previous work (e.g Ray et al. 11 report RMSE values ranging from 9 to 20% of the current yields across different crops). In addition to the aggregation of crops translating the adaptation assumption, there are two novelties in this approach: (a) we include a wider range of input variables than existing studies. Mueller et al. 30 expanded on the set used by Lobell et al. 60 by including fertilizer application and irrigation in a climate-bin based method, but did not include soils data or socioeconomic variables; (b) the scale at which the regression is run is finer than existing global analyses. Specifically, we do not aggregate our data (e.g., by administrative region) and instead consider each pixel separately; this requires more computation time, but captures more climate spatial variability.
Nevertheless, this approach has three mains caveats: (1) Due to lack of available input data for the wide range of features considered (bioclimatic variables, irrigation and fertilizers), the model cannot be validated against more recent (albeit coarser resolution) data on crop yields. However, we hold out a random set of 10% pixels as validation, to assess the performance of the model on unseen data and find satisfying performance on this subset: R 2 =0.95, RMSE=1.06e+9 calories per hectare. (2) Distributions of future set (2050) and test set (part of 2000) are different, while extrapolating out of sample is not the strength of tree-based models. However, we find that points outside of the convex hull of the training dataset represent only < 3% of the points in 18 out of the 20 scenarios (< 2% in 12, and a maximum of 5.73% for SSP 5 under HadGem climate model) mostly in South Sahara due to an increase in temperatures (see Fig. S2 for the change in distributions in each scenario).
(3) Furthermore, climate change impacts on yields are accounted for through precipitation and temperature change, we do not account for CO 2 fertilization, not for nutritional contents of crops decreasing with CO 2 increasing.
Our results are coherent with existing yields projections when aggregated to caloric production. Projections accounting for prospective technology developments or CO2 fertilization find that yields will continue to grow by 2050 61 , though at a slower rate than in the past 23,24,62 , recent studies also show climate change has a net-negative impact on agricultural yields 11,63 , although the effect varies by crop and region 23,60,64 (see also main text).

Caloric Sufficiency Calculation
Equation 1 : Caloric sufficiency uses SSPs' assumptions of population 34 and dietary changes 35 , assuming system losses and relative amount of fish in diets (1.5%) stay constant. It accounts for changing feed/food split. ADER stands for average daily energy requirement. Our approach does not account for changes in age/gender/cultural dietary requirements. Text S4 provides details.
Terrestrial caloric sufficiency is the ratio of supply over demand. Terrestrial supply corresponds to the calories available from crops and livestock, using constant feed conversion factor and system losses 65 (both calculated for baseline year, see Text S4), taking into account change in diets (proportion of livestock products by country). Terrestrial demand excludes the proportion of nutritional requirements satisfied by fish, assuming it will remain constant, i.e that there will be more fish available overall, based on projections including aquaculture 2,66 .
As for data sources, supply data for the current year comes from Monfreda et al. 15 for crops yields and from FAO Commodity Balance Sheets 67 for livestock. Future yields are modeled based on the Monfreda et al. dataset as detailed in the section above while future livestock supply is based on demand, with feed conversion factor kept constant, also derived from FAO based on data from baseline year (2000). Current demand data is derived from the same FAO source. Future demand is calculated by multiplying SSPs population projections from Jones 34 (downscaled and adjusted to finer most recent data GPW 68 , see Text S3) with average daily caloric requirement 69 . The assumptions on future consumption (proportion of livestock products in diets) are reported at national scale from Bodirsky et al. 35 . Text S4 provides detailed equations.
Calories are used as a proxy for diet sufficiency, informing nutritional sufficiency but certainly not providing a full view of it. This study does not take into account local or cultural differences in diets, nor does it calculate the demand for precise demographical nutritional requirements -though we do investigate sensitivity to the latter simplification (see Table S5, and section Sensitivity Analysis below). In our model, diets are not optimized for health or sustainability. We include changes in future livestock consumption 35 , and the remainder of future diets reflects current choices, modified locally to the extent that farmers adapted crop mixes. Finally,, our caloric sufficiency estimates may be overestimated because we do not account for the fact that nutritional contents of crop decrease with CO 2 increasing, but also conversely assumes no transformative innovation beyond the scope of what is implemented at baseline year.

Results in perspective of current food security indicators
Because the baseline "current" crop production data we use is relatively dated (circa 2000), we supplement our caloric sufficiency calculations with more recent data available at national scales. Specifically: (1) For Water security , we use a water depletion index accounting for seasonal and dry-year water scarcity 42 ; water scarcity is not taken into account in our model (neither precipitation from WorldClim, nor irrigation data from the SSPs take water depletion into account). This categorical dataset at original resolution of 5 arcmin was aggregated in a single metric by country as the percent area in any of the depleted category (seasonally or annually).
(2) Malnutrition is defined here as the prevalence of underweight children under 5 41 . We use the most recent value available for each country (between 2000 and 2016) and found it negatively correlated (-0.25) with caloric sufficiency circa 2000.
(3) The Global Food Security Index (GFSI) 40 captures food security for 113 countries, accounting for affordability, availability, quality & safety and natural resources, including financial, political social and trade/supply chain risks. It is available from 2014 to 2018, we use the most recent value and found it positively correlated (+0.34) with caloric sufficiency circa 2000.
(4) Trade independency captures the independency of a country from imports in relation to its total food supply, in terms of calories. Kummu et al. 39 estimate it as the share of net imports of the entire food supply in a given year. Similarly to the other indices, it is scaled between 0 and 1, so that 0 represents a case when food supply is fully dependent on imports, while 1 represents high net-exports (exports are equal or more than national food supply). We use the most recent values in 2013 and found them highly correlated (+0.61) with caloric sufficiency circa 2000.
(5) Countries' income groups from World Bank's classification 70 based on their GNI (Gross national income) per capita captures relative wealth. We use the most recent value (2018) of GNI, and the 4 groups: low, lower middle, upper middle and high income. These datasets are joined by countries with national caloric sufficiency (where we had data for 166 countries), resulting in 160 countries with available information. Countries' projected caloric sufficiency trends were carefully analyzed, in light of the related metrics described leading to grouping countries empirically based on similarity of their current and projected situation. This results in the categories described in Table 2 (and detailed in Table S2).

Sensitivity analysis of caloric sufficiency and storylines
Sensitivity analysis of global and national caloric sufficiencies, and of the grouping of countries per narratives are conducted for cropland expansion, yields, population, diets, food waste and feed-to-food conversion rate. To assess the robustness of our results to these drivers, we vary their projected values within a meaningful range, in all scenarios, and re-compute caloric sufficiencies and country groupings accordingly (Fig 3 and Fig S10).
For population (Fig 3A,E), we directly use the 9 UN population scenarios available at national scales 32 , joined with the SSPs to be consistent to their population narratives and assumptions in terms of fertility, mortality and migration (see Text S3). For diets (Fig 3B,F), we distorted the country-level proportion of livestock products in diets, from 50% to 150% of their projected values, sampled at 25% increments (i.e multiplying projected diets by [.5, .75, .1.25, .1.5]).
For system efficiency (Fig S10), we vary the proportion of system losses (%Food_waste_2050 in the equations for caloric sufficiency from Text S4) from 50% to 150% of its projected value, sampled at 25% increments, in line with the ranges found in literature 65 . The same approach is applied to the feed to food ratio, capturing animal products conversion efficiency.
Based on the UN population projections detailed by demographics 45 , we also replicated caloric sufficiency calculations with age and gender-specific caloric requirements (detailed ADERs from FAO 71 ) , under SSP2 assumptions and using UN medium fertility population projections for 2050.
Author contributions CW, JJ and BCK conceptualized the crop yields model; CW and LM ensured statistical validity of the approach; JJ and CW acquired the data; CW and RC implemented the approach, CW analyzed the data. CW, CQ and MJ conceptualized the caloric sufficiency modeling. KB, BB, MK and AP contributed to data acquisition. CW conducted the data analysis and KB, MK, BCK and DR supported interpreting the results. CW led the writing of the manuscript.

Data availability
The datasets generated during and/or analysed during the current study are available in the Zenodo data repository: https://zenodo.org/record/3643209#.X-Nn16pKiHE