Climate change alters impacts of extreme climate events on a tropical perennial tree crop

Anthropogenic climate change causes more frequent and intense fluctuations in the El Niño Southern Oscillation (ENSO). Understanding the effects of ENSO on agricultural systems is crucial for predicting and ameliorating impacts on lives and livelihoods, particularly in perennial tree crops, which may show both instantaneous and delayed responses. Using cocoa production in Ghana as a model system, we analyse the impact of ENSO on annual production and climate over the last 70 years. We report that in recent decades, El Niño years experience reductions in cocoa production followed by several years of increased production, and that this pattern has significantly shifted compared with prior to the 1980s. ENSO phase appears to affect the climate in Ghana, and over the same time period, we see corresponding significant shifts in the climatic conditions resulting from ENSO extremes, with increasing temperature and water stress. We attribute these changes to anthropogenic climate change, and our results illustrate the big data analyses necessary to improve understanding of perennial crop responses to climate change in general, and climate extremes in particular.


Supplementary Methods
Climate data acquisition ERA5 climate data was acquired from the Copernicus Climate Data Service using the CDS API in a custom python script. We acquired hourly data at 0.25°resolution between -3.5°to 1°l ongitude and 4.5°to 8.5°latitude, for the full period of the 1950 to 1978 preliminary back extension dataset, from 1979 to 2019 from the final release dataset, and 2019 to 2020 from the timely release dataset (accessed 2021-10-19) for the variables 2m temperature, total precipitation and evaporation as netcdf raster bricks. All variables were summarised by day for each grid cell, calculating the daily total for accumulating variables (precipitation and evaporation), and daily minimum, mean and maximum for temperature.
We defined Ghana's four climatological seasons as: minor wet, September and October; major dry, November -March; major wet, April -July; minor dry, August. All climate variables were then summarised over month and season, calculating total values for accumulating variables and minimum, mean and maximum for temperature. We calculated monthly Cumulative Water Deficit (CWD) for each ERA5 raster cell (Aragão et al 2007) based on monthly totals of precipitation and evaporation, resetting CWD to 0 for the wettest month for each cell or if rainfall exceeded twice the evaporation for a given month (Malhi et al., 2004a). Thus for each purchase year (Oct-Sep, see above) we generated 12 monthly and 4 seasonal values for each climatic metric. The minor wet season crosses the purchase year: we considered this as falling at the beginning of the purchase year rather than the end, as this has a more reasonable link to cocoa production. Finally, each climate metric was converted to anomalies by subtracting the mean value for the metric for a reference period, set to 1981-2010 to encompass only data from the final release ERA5 dataset. Mean values were computed across months and seasons to retain variation among months/seasons. The final dataset comprised climate data for the 70 cocoa purchase years 1950/51 to 2019/20.

Validation of the detrending approach
Supplementary Table 2 shows that for the vast majority of the individual time series within the district and regional datasets, the best fitting parameters for p (autoregression order), d (degree of differencing) and q (moving average) were equal to zero. While some individual time series do have non-zero values, this is to be expected by chance alone given the number of trials run, and the potential error generated by these data would only reduce the significance of downstream analyses.
For each dataset, a mixed effects model fitting production anomaly against the intercept with district or region as a random effect was determined to be singular with a tolerance of 0.0001, thus confirming that the detrending process removed sufficient variation between districts/regions.

ENSO-production relationships
We calculated cross-correlation between time series of detrended production and mamONI for the same purchase year and 12 delayed purchase years to identify potential instantaneous or delayed relationships between production and mamONI; these analyses show significant correlations at all years for the district dataset and several years including instantaneous for the regional dataset (Supplementary Figure 2).

ENSO-climate relationships
To examine climate impacts of ENSO with greater temporal resolution, we performed a cross-correlation on 3-monthly average ONI values against monthly temperature, precipitation and MWCD, including 36-month delays and leads. We observed that the climate of the purchase year prior to an El Niño is significantly cooler and wetter than average, with less drought, and vice-versa prior to a La Nina ( Supplementary Figures 3 and 4).
Supplementary Figure 1 shows the results of multiple regressions fitting temperature, precipitation and (maximum) climatological water deficit (month: CWD, season: MCWD) against mamONI, with time period ("past" or "recent") as an interaction, for each month.   (i.e. 1976 = purchase year 1976/77). Note that at the regional level, the two Western regions are considered one, but at the district level, districts are split between Western North and Western South regions.