Introduction

African rangelands harbour iconic wildlife, support the livelihoods of hundreds of millions of people through livestock pastoralism, and underpin a substantial fraction of the continent’s meat and milk production. Rangelands occupy between half and two thirds of Africa’s land area1,2, and are home to more than 60% of the continent’s ruminant livestock3,4. More than 200 million people in sub-Saharan Africa practise pastoralism5.

Most African rangelands experience low and often variable patterns of precipitation that present challenges to crop-based agriculture. Many pastoralist communities who rely on rangelands have developed resilient livestock systems, often involving highly mobile herds, to cope with and take advantage of this natural variability6,7. Nevertheless, forage productivity in rangelands depends to a large degree on climatic factors such as rainfall and temperature and is therefore potentially vulnerable to changing conditions under climate change.

Both precipitation variability and extremes are expected to increase under climate warming8,9,10. While global mean precipitation rates are expected to increase by only 1–2% per °C of warming11, both observational and modelling research suggest that the intensity of extreme precipitation events worldwide may increase by 6–7% per °C12,13,14. Within sub-Saharan Africa, models suggest that overall rainfall will increase under climate change scenarios, but that the sign of the change in many areas is uncertain and varies between regions15,16. In contrast, there is greater agreement that the variability and intensity of rainfall will increase across most of sub-Saharan Africa, with the region experiencing longer, more arid dry spells, punctuated by more frequent and more intense rainfall16,17,18. How these simultaneous changes affect vegetation productivity is not well understood.

Previous research has shown complex and context-specific links between precipitation variability and dryland primary productivity. Mean annual precipitation has long been known to control productivity19,20. However, the impact of greater variability depends on the climatic context, vegetation community composition and the degree of the variability19,21,22,23. While greater inter-annual variability has been generally associated with reduced productivity22,24, intra-annual variability has more complex effects, depending on the timing of precipitation, the vegetation type and the ambient rainfall regime21,25,26,27.

Process modelling and ecological theory indicate that these effects are mediated by the availability of root-zone soil moisture: plant growth is maximised when available moisture is maintained in a critical zone between the wilting point and field capacity25,27. Precipitation variability affects the temporal profile of soil moisture within and between years, as well as the degree to which rainfall infiltrates to deeper soil layers25,27,28. For example, heavier rain events can increase infiltration to deeper soil layers, but extremely heavy rain can increase water loss through run-off27. These processes are further modulated by soil texture, temperature, topography and vegetation, as well as the antecedent soil moisture at the time of a rain event21,27. How these interacting dynamics translate to ecosystem- or biome-level responses is not straightforward.

The complexity of these relationships has hindered attempts to generalise from experimental studies to a broader understanding of precipitation impacts at the continental scale21,27. For example, findings from rainfall manipulation experiments, which intercept and redistribute rainfall over experimental plots, can be difficult to generalise to larger spatial scales where vegetation, soil or other climatic factors may vary21. Similarly, most such manipulation experiments last for between one and four years23; however, plant physiological adaptation and changes in community composition can occur over many years or even decades, leading to differences between short- and long-term responses19,27.

At larger scales, dynamic global vegetation models (DGVMs) have been used to fill this role25,26,29. DGVMs can simulate vegetation response at large spatial and temporal scales to different rainfall regimes that can be precisely specified. Many different scenarios can be compared and their effects characterised, providing a valuable tool to explore alternative scenarios and probe causal pathways. However, the results are sensitive to the model chosen and to uncertainties in key model parameters, and different models can disagree widely30,31. Some studies have also found that process-based models tend to overestimate the role of total or mean rainfall in driving productivity differences, especially on annual timescales30,32. Analysis of observed, empirical datasets therefore remains important to test and validate model results.

A third approach is to infer general relationships from analysis of large, aggregated empirical datasets, such as field observations, eddy covariance measurements or remote sensing data22,24,32,33,34,35. This greatly increases the possible spatial and temporal scale of analysis, but the lack of controlled experimental settings makes it difficult to isolate the causal effect of any single variable21,27. As a result, most such studies have focused on one or two variables24,34,35,36. Furthermore, many such studies of precipitation variability have not fully accounted for potential confounders, such as total rainfall amount, air temperature or soil properties, which complicate interpretation22. Finally, most studies rely on simpler statistical tools such as ordinary least squares linear regression24,32,34,36 or pairwise statistical testing of grouped data22,35, neither of which readily allow for nonlinearities and asymmetries in vegetation response.

Here, we extend this third approach to address these limitations for application to dry rangelands in sub-Saharan Africa. We construct statistical models of vegetation productivity derived from remote sensing using multiple environmental covariates for three major land cover types commonly considered rangelands: grasslands, savannas and shrublands. This approach allows us to robustly evaluate the contribution of each dimension of environmental variability in different ecosystem types while controlling for confounding variables. We use generalised additive models (GAMs) to model the effects of precipitation amount, seasonality, intensity, and timing, as well as other environmental variables, on productivity across the continent, using gridded, remote sensing-derived datasets. GAMs are a semi-parametric, nonlinear extension of generalised linear models, where covariates are allowed to have smooth nonlinear relationships with the mean of the variables being modelled37. GAMs therefore allow flexible modelling of both linear and nonlinear relationships without the need to specify a priori the form of these relationships.

We focus on the role of precipitation variability, calculating seven relevant metrics (Table 1) from the Climate Hazards Group InfraRed Precipitation with Station observations (CHIRPS) daily precipitation dataset38. To explicitly account for potential confounding factors such as temperature, soil, and disturbance, we include gridded data on mean air temperature, soil properties and fire occurrence (see Methods). To measure productivity, we use the state-of-the-art gross primary productivity (GPP) dataset PML_V239,40. PML_V2 accounts for vegetation type, photosynthetic leaf area and stomatal response to atmospheric conditions, and has been shown to outperform other datasets against dryland eddy covariance flux tower measurements31,39. Figure 1 shows the spatial distribution of GPP and key environmental variables across the study region. See Supplementary Figs. S2S12 for maps of further covariates and scatter plots showing bivariate relationships.

Table 1 Summary of variables used in regression modelling. See Methods and Table 2 for details of calculation and datasets
Fig. 1: Spatial distribution of key variables across African rangeland ecosystems used as the study region (2001-2019 average values).
figure 1

a Mean annual gross primary productivity; b Mean annual precipitation; c Mean air temperature; d Modal land cover class. Grey regions indicate pixels masked due to land cover or aridity criteria.

In addition, the vegetation–rainfall relationship evaluated across spatial gradients is known to differ to that evaluated at a single location through time19,32. We address this dimension of timescale by comparing the role of both multi-year mean annual precipitation and the annual anomaly in contributing to observed GPP. Quantifying both these dimensions supports allows inferences about the likely response of dryland vegetation to environmental change.

Our results show the relative sign and magnitude of vegetation response to precipitation variability and other environmental drivers across the continent and identify important nonlinearities, thresholds, and interactions in that response. We find that GPP of grasslands and shrublands shows greater sensitivity to environmental variability than that of savannas. For all cover types, total precipitation remains the most important driver of GPP both across space and through time. Increased variability on multiple timescales has a small but consistent negative effect on vegetation; in particular, rainfall distributed in fewer, more intense events, as expected under climate change, tends to reduce productivity relative to rainfall distributed more evenly. We also show that higher temperatures substantially reduce productivity for a given rainfall for all land cover classes, especially in drier rangelands, highlighting the importance of rising temperatures in exacerbating plant water stress.

Results

Models for grassland and shrubland points explained GPP variability better than those of savannas. Using covariates alone (i.e., without including a separate spatial term), the model achieved adjusted R2 values of 0.75 and 0.78, respectively, compared to 0.58 for savannas (Supplementary Table S1). Adding a spatial term (a two-dimensional smooth of x-y coordinates) substantially improved the overall model fit in all cases by 10–15%, reflecting the spatial structure of the data. Diagnostic plots for model fit are shown in Supplementary Figs. S13S15. Since all covariate partial effects were found to be significant at a p < 0.001 level (reflecting the large size of the dataset), we used partial effect sizes to determine the relative importance of variables.

We show the effect of each covariate using partial effects plots, which show how the contribution of each term to predicted GPP (the y-axis) varies across the range of that variable (the x-axis). Figures 24 shows the mean of the partial effects of the covariates with the greatest effect sizes across the three models including the spatial term. The partial effects of the non-spatial models are not shown, since they may be biased by large-scale spatial patterns unrelated to the covariates, especially in parts of the covariate distribution with few data points. Since our models use a log-link, the predicted GPP is given by the exponent of the sum of the partial effects of variables. The y-axis values in Figs. 24 below thus indicate the proportional change in GPP for a given change in the x-axis. For example, a partial effect value of 1.5 represents a 50% greater expected GPP than for a value of 1, all other covariates remaining equal. Figures 2 and 3 show the six covariates with the strongest effects; full results are shown in Supplementary Figs. S16S21.

Fig. 2: GAM partial effect plots for the combined model.
figure 2

The y-axis scale represents the proportional increase or decrease in predicted GPP associated with a change in each covariate relative to its mean value. Curves represent the mean of three models with different degrees of complexity in the spatial term. Density plots above each sub-plot show the distribution of data points (pixels) for each covariate and land cover class. Curves are limited to the central 99% of the data range for each panel and cover type to reduce the impact of outlier values. Only curves with significant nonzero effect sizes are shown; see Supplementary Fig. S16 for full results. MAP Mean Annual Precipitation. Shaded areas represent the outer envelope of 95% confidence intervals from the three spatial models.

Fig. 3: GAM partial effect plots for three subsets of the data with different ranges of mean annual precipitation.
figure 3

The y-axis scale represents the proportional increase or decrease in predicted GPP associated with a change in each covariate relative to its mean value. Curves represent the mean of three models with different degrees of complexity in the spatial term. Curves are limited to the central 99% of the data range for each panel and cover type to reduce the impact of outlier values. Shaded areas represent the outer envelope of 95% confidence intervals from the three spatial models.

Fig. 4: GAM partial effect plots for inter-annual variability in precipitation.
figure 4

The y-axis scale represents the proportional increase or decrease in predicted GPP associated with a change in each covariate relative to its mean value. Curves represent the mean of three models with different degrees of complexity in the spatial term. Curves are limited to the central 99% of the data range for each panel and cover type to reduce the impact of outlier values. Shaded areas represent the outer envelope of 95% confidence intervals from the three spatial models.

Model results by land cover class

Different land cover classes exhibited distinct responses to environmental variability. Grasslands and shrublands tended to show stronger and steeper relationships with environmental parameters than savannas. For all cover classes, mean annual precipitation (MAP) and mean air temperature showed the strongest effect sizes across the dataset, with grasslands and shrublands (but not savannas) also strongly influenced by soil nitrogen. Grasslands showed a positive response to increasing MAP across the range, showing signs of plateauing above 1000 mm yr1. Shrublands showed equal or greater sensitivity to MAP differences up to around 500 mm yr−1, with very low confidence at higher MAP. Savannas showed a weaker positive response to MAP above 500 mm yr−1 (the range containing 99.4% of savanna points).

The annual precipitation anomaly had a positive and close to linear relationship with GPP for grasslands and savannas, with grasslands showing the greatest response and savannas the least. All else remaining equal, a grassland receiving 50% more than the mean rainfall had 28% higher GPP, while a 50% reduction in rainfall was associated with 26% lower GPP. Shrublands, in contrast, showed an asymmetric response, with similar slope to grasslands for negative anomalies but a reduced response to positive anomalies. Savannas showed the weakest relationship, albeit with steeper slopes as the absolute size of the anomalies increase.

Shrubland GPP was strongly affected by mean air temperature, with mean GPP at 30 °C less than one quarter of that at 20 °C. Savannas showed a consistent, but weaker, negative relationship, with GPP declining strongly above 28 °C. Grasslands, on the other hand, showed an inverted U-shape response to temperature, with an apparent optimum range between around 17 and 23 °C.

Precipitation intensity was the only intra-annual variability metric that showed a substantial effect size, and this varied among land cover classes. Both grasslands and savannas showed increased GPP at low intensities, with mean productivity at 5 mm day−1 11% and 14% greater, respectively, than at 10 mm day1. Shrublands showed lower sensitivity to precipitation intensity, with no comparable increase at very low intensity and only slightly lower GPP as intensity increased. The Unranked Gini index (UGi) had a slight positive effect on grasslands, but a neutral effect in shrublands and savannas (Supplementary Fig. S16). Rainy season length also had a slight positive effect in shrublands, but not noticeably in other land covers.

Within the range of the majority of the data, no substantial effects were seen for the prevalence of extreme rainfall (F95w) or fire occurrence for any land cover class (Supplementary Fig. S16).

Model results disaggregated by mean annual precipitation

The three land cover classes differed in mean annual precipitation, with shrublands on average receiving lower MAP than grasslands and savannas receiving higher MAP (Supplementary Fig. S10). To distinguish the effects of rainfall regime and land cover class, we therefore fitted sub-models to each land cover for three 400 mm MAP bins (Fig. 3). MAP-land cover combinations containing less than 0.1% of the whole dataset (shrublands with > 800 mm yr−1 and savannas at < 400 mm yr−1) were excluded, since they did not represent sufficiently large areas to support meaningful inferences.

Of the main variables considered, both mean air temperature and soil nitrogen showed effects on GPP that differed strongly across the MAP gradient regardless of land cover type. In the lowest rainfall bin (0–400 mm yr−1), shrublands and grasslands showed a strong negative response to temperature above 18 and 21 °C, respectively, with an increase from 20 °C to 30 °C associated with a 74–78% reduction in GPP. As MAP increased, the impact of temperature became less severe for all cover types: the average slope became shallower and the inflection point, above which steep declines in productivity were apparent, occurred at warmer temperatures. Savannas tended to have smaller responses than grass and shrublands up to around 28 °C, above which they showed steep declines.

A similar pattern was observed for soil nitrogen, with extremely strong relationships in the driest bin and smaller effects in wetter pixels. Again, savanna pixels showed a weaker response to soil nitrogen than grass and shrublands.

In contrast, the responses of each land cover class to annual precipitation anomaly, mean precipitation intensity and soil sand fraction were not substantially different between MAP bins. Grasslands consistently showed the greatest sensitivity to these variables, and savannas the least. However, since precipitation anomaly is defined as a percentage of the long-term mean annual precipitation, a constant slope as mean rainfall increases suggests a decreasing sensitivity to absolute annual differences.

Of the remaining variables, UGi showed a slight positive relationship for dry and intermediate grasslands and shrublands, while season length showed the strongest positive relationship for shrublands and wet grasslands (Supplementary Fig. S20). Fire occurrence had a slightly positive effect in the driest grasslands, diminishing as rainfall increased.

Inter-annual precipitation variability

We also assessed the effect on mean GPP of inter-annual precipitation variability, measured by the coefficient of variation of total precipitation in each year in the dataset (Fig. 4). Across all rainfall bins and land cover classes, there was not a clear or consistent effect of inter-annual CV except in the most variable environments (CV > 0.4). Above this value, both shrublands and grasslands showed a negative effect; no savanna areas in the dataset had CV values above this threshold.

Discussion

Overall, our results are broadly consistent with root zone soil moisture availability and plant water stress being the primary drivers of GPP differences. Total precipitation, mediated by soil texture, is the primary determinant of soil moisture replenishment. More infrequent, intense rainfall events may increase infiltration, but also increase water stress in the intervening periods27, leading overall to a small negative effect of intensity on mean GPP. Higher temperatures have a detrimental effect on GPP through increasing evapotranspiration, leading both to reduced soil moisture and plant physiological responses that reduce stomatal conductance, and ultimately by inhibiting photosynthesis41. Savannas, defined by the presence of trees with deeper and more complex root structures42, tend to be less sensitive to precipitation and temperature variability than grasslands or shrublands. However, we do not find evidence for strong effects of season length or of extreme rainfall events posited by some studies25,27,28, nor do we find that the driest ecosystems benefit from more variable rainfall. In the following sections, we examine each of these results in more detail.

Our analysis identified mean annual precipitation as a key predictor of average gross primary productivity across African rangelands. This confirms extensive previous research on the ecological importance of total precipitation in drylands20,43. For example, a recent study32 found that MAP explained 66% of the spatial variation in normalised difference vegetation index (NDVI) across global drylands. This reflects the importance of cumulative seasonal precipitation in controlling available soil moisture21,43.

Shrublands and grasslands showed the greatest sensitivity to MAP, while savanna GPP showed a smaller increase with MAP. This may reflect a feedback in savannas by which higher rainfall increases tree-grass competition. In drier savannas, trees tend to grow deeper roots and draw water from lower soil layers than grasses, while in wetter savannas, trees and grasses share shallow rooting depths44. In dry areas, trees may therefore be better able to access to more stable groundwater resources; in contrast, competition from grasses for soil moisture may reduce the ability of trees to benefit from higher rainfall in wetter savannas45,46.

Our results suggest a weakly asymmetric response to annual rainfall anomalies, with moderate negative anomalies having a stronger effect than moderate positive anomalies. The results of the binned analysis suggest that this effect is stronger for drier regions, and for shrublands and grasslands more than savannas. Taken together, this broadly supports previous findings of a concave-down relationship to annual rainfall, in which dry years harm plant productivity more than wet years enhance it21,22,35; however, the results suggest the asymmetry is small once mean annual precipitation and other factors are accounted for. The neutral or weakly negative relationship between inter-annual variability and mean GPP below a CV of 0.4 (Fig. 4) also suggests that this asymmetry is a minor driver of spatial patterns in mean GPP, in contrast to previous findings24,35. In addition, while some studies have suggested an opposite, concave-up effect in very dry grasslands22,24, our results do not support this rainfall-dependence, finding linear or concave-down relationships in all precipitation bins.

This result also does not support the double asymmetry model19 in the case of the semi-arid rangelands. This model posits that the increase in productivity in greater-than-average rainfall years is larger than the decrease in response to below-average rainfall years (positive asymmetry), but that this relationship is reversed in the case of extreme wet and dry events (negative asymmetry). While our analysis suggested a possible nonlinear response of grasslands and shrublands in the 400–800 mm yr−1 rainfall bin, in general we found no consistent evidence of a negative response to extreme wet years, suggesting that vegetation is generally able to take advantage of additional rainfall47.

Within-year variability had a secondary effect on GPP. We found that higher average rainfall intensity consistently reduced GPP for both grasslands and savannas, but less so for shrublands. This suggests that, for a given mean annual rainfall, GPP tends to be greater if that rainfall is distributed evenly over many wet days, rather than falling in a few events. This supports previous findings that primary productivity and rain use efficiency in grasslands are on average reduced as rainfall is repackaged in fewer, larger events, since this leads to larger fluctuations in soil moisture and longer periods where shallow soil layers can dry out28,33,48. Some studies have suggested that, in drier grasslands, this relationship may be reversed as heavier rainfall events are needed to infiltrate soils22,27,49; our findings do not support this, showing a consistent negative effect of intensity in pixels with MAP < 400 mm year−1. Overall, this result is consistent with a model in which precipitation intensity and frequency interact to control soil moisture: for most environments, receiving precipitation little and often through a growing season maximises the total time when near-surface soil moisture levels are sufficient to support plant growth25,28. A second possible mechanism involves plant responses. Fewer, heavier rain events imply greater intervening periods of higher vapour pressure deficit and solar radiation, both of which can cause isohydric plants to limit stomatal conductance50, thereby reducing GPP.

In contrast, other measures of variability showed weaker effects. Increasing temporal clustering of precipitation (UGi) across the year had a slight positive effect on grasslands, but a neutral effect in shrublands and savannas (Supplementary Fig. S16). Together with the result for intensity, this suggests concentration of rainfall in one distinct wet season allows greater utilisation of water than a more dispersed rainfall regime, but the effect is small compared to other metrics. Similarly, the proportion of precipitation arriving in extreme rainfall events (F95w) had a negligible effect on mean productivity. This is surprising given conceptual and empirical studies that suggested extreme rainfall would be associated with a loss of productivity28,51. However, extreme rainfall as conceived in most such studies is perhaps better captured by the metric of rainfall intensity; after accounting for average intensity, our result suggests that occasional very large events do not have a disproportionate effect on GPP.

High temperatures were robustly associated with reduced productivity across all three ecosystem types, with shrublands and grasslands more sensitive than savannas. The effect of temperature on all cover classes is stronger in the driest rangelands, suggesting that temperature primarily affects productivity through its impact on evapotranspiration and plant water stress. This supports the findings of Huang et al.52, who found that the effect of ambient temperature on plant water stress placed a stricter constraint on photosynthesis than the direct effects of leaf temperature on photosynthetic rates. High temperatures are associated with more rapid evaporation of soil moisture and with greater vapour pressure deficit, both of which can induce stomatal closure as a means of conserving water, reducing plants’ ability to take up CO2. Savanna and wet grassland GPP (MAP > 800 mm yr−1) appeared less sensitive to temperature at intermediate air temperatures, but dropped off sharply at mean temperatures above 28 °C. This may reflect a shift in the mechanism by which temperature affects GPP: at intermediate temperatures, water stress can be alleviated by higher rainfall or the deeper roots of savanna trees; at the warmest temperatures, however, the physiological impacts of high temperatures may limit photosynthesis regardless of moisture availability53.

Grasslands exhibited an inverted U-shaped response to temperature, with reduced productivity at both low and high temperatures compared to intermediate values. This apparent optimal range of mean annual air temperature for grasslands from 17 to 23 °C matches previous findings of ecosystem-level optimum photosynthetic temperatures52,53,54. Up to a point, warmer air temperatures tend to promote enzymatic and metabolic activity, enhancing photosynthetic rates; however, this is increasingly offset by the detrimental impact of higher temperatures on water stress, stomatal closure and ultimately enzyme inactivation54. This consistent response suggests that the capacity of grasslands to acclimate to climate warming by shifting their thermal optima53 may be limited unless accompanied by increases in rainfall.

Among non-climatic variables, soil nitrogen concentration had a strong positive relationship with productivity in grass and shrublands but only a weak effect in savannas. This implies that most shrublands and grasslands are somewhat nitrogen-limited55. Nitrogen had a greater effect in dry compared to wet rangelands, perhaps reflecting the role of nitrogen supply in increasing plant water use efficiency56. In contrast, the low influence of soil nitrogen in savannas likely reflects the prevalence of nitrogen-fixing leguminous trees such as Vachellia species (acacias) in African savannas, which improve nitrogen cycling and increase its availability to both trees and grasses even in nitrogen-poor soils57,58. In fact, it has been argued that the ability to fix nitrogen provides a competitive advantage in dry conditions primarily by improving water use efficiency59; the presence of leguminous trees may therefore also contribute to the observed insensitivity of savanna GPP to rainfall compared to grass and shrublands. An important caveat is that spatial estimates of soil nitrogen content were derived from a machine learning pipeline that included vegetation indices as well as geological, topographic and climatic predictors60, so these findings may require further verification.

Soil texture (sand fraction) had a consistent positive effect across land cover types and across the MAP gradient. This contrasts with other recent findings for dry grasslands61, but is consistent with the inverse-texture hypothesis for arid and semi-arid ecosystems: sandy soils allow more rapid infiltration of rainfall to the root zone, reducing bare soil evaporation and increasing the fraction of rainfall available to plants27,62,63. The weaker effect seen in savannas supports this interpretation, since deeper rooted trees are able to draw water from a wider range of soil depths than shallow-rooted grasses and forbs42.

Fire had a neutral effect overall but a slightly positive effect in dry grasslands. This suggests that fire may play a role in enabling grass productivity in these systems, perhaps by clearing dead material that is not readily decomposed in arid environments64,65,66. The lack of negative effects from fire also implies that rangeland ecosystems in fire-prone regions are sufficiently resilient to the effects of fire that the annual and multi-annual mean productivity are not substantially affected.

Our results have implications for the future of African rangelands under climate change. The Climate Model Intercomparison Project Phase 6 (CMIP6) ensemble of global climate models suggests that the climate of sub-Saharan Africa is likely to become warmer, wetter and more variable under climate change15,16. The strength and sign of these changes, however, varies by region and depends on the timescale and greenhouse gas emissions scenario considered. An analysis of 27 CMIP6 models15 forecast robust increases in average air temperature across sub-Saharan Africa by 2100, with a median increase across models of 1.4–4.4 °C, depending on the emissions scenario.

There is less consistency in forecasts for mean annual precipitation, with models disagreeing about the sign and magnitude of changes in total wet season precipitation16. The CMIP6 ensemble projects an overall increase in annual rainfall, with median values of 4.8–15.2% relative to the late 20th century for different emission scenarios15. However, this change is spatially variable: greater increases are predicted in the Sahel and East Africa, while much of Southern Africa is likely to experience reduced rainfall. Both fine and coarse-scale models nonetheless agree that precipitation is likely to become more variable, infrequent and intense across sub-Saharan Africa under climate change, with the strength and robustness of the change growing with cumulative CO2 emissions15,16,17,18.

The results presented here do not directly reflect how rangelands will respond to climate change. Vegetation response to climate change over years or decades will be the product of both short-term plant responses and slower changes in vegetation and soil composition, as well as local feedbacks not captured by broad-scale variables19. In addition, rising atmospheric CO2 will also affect plant metabolisms through CO2 fertilisation, leading to greater photosynthetic rates and improved water use efficiency relative to today67,68, as well as changes in vegetation composition towards woody plants69,70,71,72. All of these changes will affect ecosystem response to rainfall in ways not captured in this analysis.

However, certain inferences can be made from our results about the long-term ability of ecosystems to adapt to future climate regimes. First, this analysis suggests that total precipitation remains the most important constraint on gross primary productivity across African rangelands both across spatial gradients and from year to year. Forecasts of reduced rainfall in Southern Africa suggest a negative effect on GPP, while an increase in overall rainfall in dry regions such as the Sahel and the Horn of Africa could benefit mean vegetation growth. Yet, while the influence of changing mean rainfall remains uncertain, increased inter-annual variability will very likely increase the frequency of very high or very low productivity years. Second, the dramatic effect of temperature on GPP supports the idea that this may have a greater effect on rangeland GPP than changes in precipitation, and may place a limit on GPP that exceeds the capability of plants to adapt. The strengthening of this temperature constraint at lower mean precipitation also shows the vulnerability of drier rangelands to this increase in water stress, which may become a key mechanism limiting primary production under climate change. Third, the lower sensitivity of savanna regions to environmental conditions suggests that climatic shifts such as warming may be expected to affect grass and shrublands more than savannas, potentially leading to expansion of tree cover and other shifts in community composition. In particular, our findings suggest that nitrogen-fixing savanna trees may play an important role in enhancing the resilience of rangelands to climatic variability. Finally, the expected increase in average intensity of rainfall events can be expected to have a modest negative effect on rangeland GPP, most likely by increasing within-season water stress and reducing the number of growing days each year.

This research employed the flexibility of GAMs to identify robust patterns in large, gridded datasets of gross primary productivity and environmental covariates. Use of gridded datasets allows broad spatial coverage across Africa, including in regions where field or weather station data are scarce, and minimises the influence of local contextual factors. However, coarse-resolution datasets inherently average out local variations in vegetation productivity and other drivers, reducing the apparent variance in the data and overstating the extent to which productivity is determined by large-scale environmental variables (the modifiable areal unit problem73). In addition, the accuracy of GPP and rainfall datasets is limited by the relatively lower density of flux towers and rain gauges in Africa compared to some other regions74,75.

A similar challenge has been identified in the temporal domain regarding satellite-based precipitation datasets. Such datasets, including CHIRPS, are known to underestimate the magnitude of extreme rain events and perform better at estimating multi-day or monthly rainfall totals than daily values76,77. Gridded datasets may therefore lead to underestimation of short-term variability in precipitation or the fraction of precipitation falling in extreme events. While our study has suggested that these second-order processes have minor effects on GPP compared to total precipitation, temperature or soil nutrients, this could also be due to the limitations of CHIRPS in resolving individual precipitation events. Comparison with point weather station data could improve assessment of these dimensions at the cost of spatial coverage. However, CHIRPS has been shown to perform very well at estimating the longer-term rainfall totals (annual and multi-annual) for which we find the greatest effects in this study76,78,79,80, providing confidence in our main conclusions.

Our productivity dataset also has characteristics that potentially reduce the sensitivity of our analysis. PML_V2 has been shown to perform very well for multi-monthly or multi-annual mean values, as used here39; however, since GPP values are estimated primarily based on leaf area index and vapour pressure deficit, they may not capture shorter-term processes such as stomatal response to changing soil moisture81. As with precipitation data above, it is possible that such dynamic changes in plant GPP may underlie stronger responses to short-term variability that our analysis would be unable to detect. We recommend further studies evaluate the role of dataset selection on the inferences drawn from large-scale observational analysis.

By analysing the full dataset within a single model, our approach was unable to explore spatial differences in the relationships between precipitation and GPP and may not have fully captured differences between spatial and temporal responses to different dimensions of rainfall regimes. The large number of variables considered also limited our ability to explore interactions between factors such as soil texture and rainfall intensity, which may affect vegetation response. The timescale of our study meant we were also unable to consider the impact of particular extreme events, such as droughts, or the importance of legacy effects, by which unusually wet or dry periods can continue to influence vegetation response in subsequent years82. Future work applying this GAM framework on shorter timescales would allow more insight into these dynamic effects. In addition, partitioning other variables, such as precipitation intensity, between spatial mean values and annual anomalies may better illuminate short-term vegetation responses27.

Finally, it remains important to recognise that productivity is far from the only metric of importance for the health and ecosystem services provided by rangelands. Changes in plant community composition and available surface water are as important as vegetation growth for wildlife, livestock and pastoralist livelihoods83,84. In addition, variability of forage production, as well as the availability and nutritional quality of forage at key locations and times, are all critical to the resilience of rangeland pastoralism and wildlife populations85, none of which is captured by the annual mean. Lastly, the impact on wildlife and pastoralist communities will depend on the degree to which they prove resilient and able to adapt to rising variability due to climate change, which in turn depends on a wider set of ecological, social, economic and governance factors such as herbivore mobility, landscape connectivity, conflict and diversification of livelihoods86,87,88.

The aim of this study was to disentangle the effects of precipitation variability on rangeland productivity in the dry rangelands of sub-Saharan Africa. We used generalised additive models to quantify the links between gross primary productivity and multiple metrics of precipitation, temperature, and other environmental drivers across three major land cover classes. The flexibility and robustness of our modelling framework allowed us to assess simultaneously the influence of multiple environmental variables and to explicitly quantify nonlinearities, better reflecting the complexity of real ecosystems. We found that GPP in grasslands and dry shrublands was strongly influenced by climate and soil conditions, while savannas showed lower sensitivity to environmental variation. We confirmed that mean annual precipitation, mean air temperature and soil nutrient availability were the strongest predictors of GPP. We also found evidence of a secondary link between variability and GPP through the effects of inter-annual anomaly, rainfall intensity and inter-annual CV, as well as a substantial role of soil texture.

Overall, our results are consistent with a model in which vegetation productivity in African rangelands is determined primarily by the availability of soil moisture and minimisation of plant water stress, but where these effects play out differently in different land cover classes. Our findings suggest that rising temperatures and more variable rainfall will substantially affect GPP in African rangelands under future climate change, but that these effects will not be distributed evenly: dry grass and shrublands may be most at risk, while wetter grasslands and savannas with leguminous trees may show greater resilience to environmental change.

Methods

Study region

We analysed arid, semi-arid and dry sub-humid rangelands in Sub-Saharan Africa. We defined our study area with three spatial masks. First, we used the Global Aridity Index v2 dataset to exclude pixels with an aridity index of <0.05 (hyper-arid) or > 0.65 (humid)89, to focus on water-limited ecosystems that are widely used for pastoralist agriculture. Second, since our primary interest is the response of herbaceous rather than woody vegetation, we used the MODIS MCD12Q1 V6 500 m land cover product90 to select rangeland ecosystems, defined as International Geosphere-Biosphere Program land cover classes 6 to 10 (open and closed shrublands, open and woody savannahs, and grasslands). We further excluded pixels containing more than 25% cropland, built up land, snow/ice, wetland, mangrove or open water, or more than 50% trees, in the high-resolution European Space Agency WorldCover v100 10 m product for 202091. The remaining grid cells (N = 246,790) were used in the analysis. Of these, 99.6% were classed as Open Shrublands (16.6%, N = 41,690), Open Savannas (16.0%, N = 39,328) and Grasslands (67.0%, N = 164,888). We fitted separate models to each of these classes in order to explore the differences in response between vegetation types.

Datasets

Table 2 details the geospatial datasets used. To measure vegetation productivity, we used the PML_V2 dataset of gridded GPP estimates39,40. PML_V2 uses a coupled model of carbon and water fluxes in vegetation canopies to estimate GPP and evapotranspiration at 500 m resolution. GPP is estimated from MODIS-derived leaf area index, ambient CO2 concentration, land cover class and vapour pressure deficit from the Global Land Data Assimilation System v2.1, meaning it is relatively independent of our precipitation dataset.

Table 2 Spatial and temporal resolutions and extents of datasets used in the study

To calculate precipitation metrics, we used the Climate Hazards Group InfraRed Precipitation with Station observations (CHIRPS) daily precipitation dataset38. CHIRPS is derived from a synthesis of satellite and weather station data, achieves a relatively high spatial resolution (0.05°) and has been shown to outperform many other products in regions of sparse weather station coverage such as Sub-Saharan Africa, showing lower error and bias in estimating monthly, decadal and daily precipitation totals than other commonly applied datasets across multiple studies76,77,78,79,80,92,93,94.

We also examined the role of air temperature, fire frequency and soil properties in controlling productivity. For temperature, we used ERA5-Land monthly averaged air temperature95. For fire, we calculated average annual percentage burned of a pixel over the study period from MODIS MCD64A1.006 monthly burned area96. For soil variables, we extracted sand fraction, soil nitrogen and soil extractable phosphorus in the top 20 cm from the iSDAsoil dataset60. iSDAsoil is a 30-m gridded soil dataset for Africa produced using an ensemble of machine learning methods from 150,000 African soil samples and a range of environmental and remote sensing covariates. We did not include soil moisture as a covariate; since soil moisture is a key mediator of the effect of precipitation and soil texture on vegetation, including it would have been likely to bias the estimate of the effects of these variables97.

Defining the hydrological year for each pixel

Individual rainy seasons often fall across more than one calendar year. To account for this, and to minimise the influence of precipitation from one year on vegetation in the following year, we defined a mean hydrological year for each pixel in the study region. To do this, we calculated the mean onset date of the main rainy season in each pixel as described by Liebmann et al.98 and Dunning et al.99. First, the mean rainfall for each day in the calendar year across the study period was calculated for each pixel, \({Q}_{i}\), along with the overall daily mean rainfall \(\bar{Q}\). The mean climatological cumulative daily rainfall anomaly on each day of the calendar year, \(C\left(d\right)\), was then calculated:

$$C\left(d\right)={\sum}_{i=1}^{d}{Q}_{i}-\bar{Q}$$
(1)

\(C(d)\) forms a smooth annual curve in which periods of above-average rainfall days show a positive slope, and periods of below-average rainfall a negative slope. The onset date of the main rainy season is defined as one day following the minimum in this curve.

We define the start date of the hydrological year as 30 days prior to this onset date, to ensure seasons with early onsets are captured. See Supplementary Methods for more detail on how the hydrological year was defined.

Variable preparation

Annual values of GPP, precipitation variables, mean temperature and fire frequency were then calculated for the 365-day period beginning on the hydrological year start date for each pixel. Unless otherwise specified, equivalent values for the spatial model were calculated as the arithmetic mean of annual values over the study period.

All covariates were processed and resampled to the coordinate reference system and resolution of CHIRPS (0.05°) using an area-weighted mean approach in Google Earth Engine100. Variable rasters were further prepared and masked to the study area in R v4.3.1101 using the ‘tidyverse’102, ‘terra’103 and ‘sf’104 packages. Figures were prepared with the ‘tmap’105, ‘ggplot2’106, ‘gratia’107 and ‘patchwork’108 packages.

We initially calculated eleven metrics of precipitation designed to capture distinct dimensions of quantity, timing, intensity, and variability.

First, we decomposed total annual precipitation per grid cell into two components: long-term mean annual precipitation (MAP), calculated over the whole study period, and the annual precipitation anomaly, given as a percentage of the MAP.

Next, we calculate four metrics of precipitation timing and seasonality within the year:

  1. (i)

    The Unranked Gini index (UGi) of precipitation22, an index between 0 and 1 that quantifies the degree to which daily precipitation totals are clustered within the year.

  2. (ii)

    The average fraction of dry days per year.

  3. (iii)

    The average length of the rainy season(s) in days.

  4. (iv)

    The estimated deviation in rainy season onset date each year99.

See Supplementary Methods and Supplementary Fig. S1 for more details on how seasonal variables and the Unranked Gini index were calculated. We subsequently excluded the deviation in annual rainy season onset date, since (a) the algorithm failed to definitively identify onset dates in approximately 4% of the dataset and (b) exploratory analysis showed minimal relationship between season onset date and GPP.

We also calculate four metrics of extreme precipitation, based on indices defined by the Expert Team on Climate Change Detection and Indices109:

  1. (i)

    Intensity, the mean amount of precipitation falling on days with at least 1 mm of rainfall.

  2. (ii)

    F95 w, the fraction of total annual precipitation falling on extremely wet days, defined as those where precipitation exceeds the 95th percentile of all wet days in each year110.

  3. (iii)

    D10 mm and D30 mm, the average number of days per year exceeding 10 mm or 30 mm of precipitation.

Finally, we quantified the importance of inter-annual precipitation variability for multi-annual mean GPP by calculating the coefficient of variation of annual precipitation (or, equivalently, the standard deviation of the annual anomaly). This was used instead of annual anomaly in a secondary set of models predicting multi-annual mean GPP, in order to better understand the response of ecosystems to inter- as well as intra-annual variability. Supplementary Table S2 details the full set of variables considered.

Exploratory data analysis and covariate selection

We used Generalised Additive Models (GAMs) to predict mean GPP as a function of rainfall metrics and other environmental variables for each land cover class. GAMs are a semi-parametric extension of Generalised Linear Models in which the assumption of linearity is relaxed, and covariates are allowed to have smooth nonlinear relationships with the mean of the variables being modelled37. GAMs allow flexible modelling of both linear and nonlinear relationships without the need to specify a priori the form of these relationships. Each term is modelled as the sum of several simpler basis (e.g., polynomial) functions, such that an arbitrarily complex smooth function is produced.

GAMs can be sensitive to high degrees of concurvity, the nonlinear analogue of collinearity in linear models in which one covariate can be approximated by a smooth function of others. As with collinearity, high concurvity can lead to poorly constrained variable effects and inflated variances111,112. The fitting algorithms used in the ‘mgcv’ package37 are robust to moderate to severe concurvity112; nevertheless, we also calculated pairwise Spearman rank correlation coefficients (Supplementary Fig. S22) between covariates used in the multi-annual analysis. For any pair with correlation greater than 0.7, only one of the two was retained113. The analogous set of variables was also used for the annual model to aid comparison of results. The retained variables are reported in Table 1. We also calculated pairwise concurvity metrics for the final models and report them in Supplementary Figs. S2325.

Regression modelling

Statistical modelling was conducted in R using the ‘mgcv’ package version 1.8.4237,101. GAMs implemented in ‘mgcv’ avoid overfitting by penalising the degree of complexity in the non-linear terms37,114. We model GPP assuming a Gamma distribution with a log link, since GPP is a non-negative continuous variable, and since the variance of GPP was found to increase with the mean. The general form of the model is as follows:

$$\log \left({\mathbb{E}}\left({GPP}\right)\right)={\beta }_{0}+{\sum}_{i} \, {f}_{i}\left({X}_{i}\right){{{;}}} \, {GPP} \sim \Gamma (k,\theta )$$
(2)

where \({\mathbb{E}}\left({GPP}\right)\) is the conditional mean GPP, \({\beta }_{0}\) is a constant term and \({f}_{i}({x}_{i})\) is a smooth function of covariate \({x}_{i}\), and where \(\Gamma (k,\theta )\) is a gamma distribution with shape and scale parameters \(k\) and \(\theta\), respectively.

The smooth functions of the covariates were constructed using thin plate regression splines, which have been shown to perform well for both simple smooth and interaction terms115. We used the Restricted Maximum Likelihood method (REML) within the ‘mgcv::gam()’ function to estimate the optimal smoothing parameters for each term. For each term, we set the number of basis functions (the maximum amount of wiggliness) high enough to eliminate significant patterns in residuals as determined using the ‘mgcv::gam.check()’ function. This ensures that no part of associations between GPP and the covariates is missed.

Spatial or temporal autocorrelation in model residuals can violate the assumption of independence underlying model fitting, potentially leading to biased parameter estimates and falsely narrow confidence intervals116. In fitting the final models, we thus included a two-dimensional spatial smooth function of latitude and longitude to better account for underlying spatial structure in the GPP dataset. Models with different degrees of allowed complexity in the spatial term, including a model without the spatial smooth term, are reported, to explore the sensitivity of model results to the degree of spatial structure in the dataset. We also included a smooth term of year to account for temporal autocorrelation.

Interaction terms between the variables with the greatest effect sizes were also tested but did not increase the explanatory power of the models. To elucidate interactions between MAP and other variables, we thus fitted additional sub-models to the grid cells falling in three 400 mm yr−1 bins of precipitation (up to 1200 mm year−1). Savannas receiving < 400 mm yr1 and shrublands receiving > 800 mm yr−1 accounted for only 0.03% and 0.02% of the dataset, respectively, and were therefore excluded from modelling.