*2.2. Data and Data Management*

The daily maximum and minimum temperatures and the daily rainfall data of the study area for the period from 1985–2016 were obtained from the Agricultural Research Council (ARC) meteorological database and the South African Weather Service (SAWS). In this study, an agricultural year is defined from July to June of the following year. This allows the presentation of the growing period from October to April of the following year as a continuous record.

Meteorological data with the smallest number of missing data values (≤5%) were selected from stations within the municipality The UK method was used for the infilling of daily Tmax and Tmin values because of the technique's ability to accommodate the differences in altitude and its local effects. Missing rainfall data were estimated using the modified Inverse Distance Weighting method (IDWm), which allows for the influence of elevation on rainfall [41,42], missing rainfall, Tmin and Tmax values were less than 10% of the total data set, which satisfies the world meteorological organization (WMO) criteria for a robust climatic data analysis. Only stations with a complete data set having a duration of not less than 30 years were used for IDWm (Table 1).

Maize yield data (tons ha<sup>−</sup>1) for the Setsoto Municipality for the period between 1985 and 2016 were obtained from the South African Department of Agriculture, Forestry and Fisheries [43] for the four areas except for Ficksberg where data were only available for 1985–2005. Most of the statistical analyses were computed using quantum XL 2016 and JASP 0.9.0.1 statistical software. Collection and availability of temperature, rainfall and yield data are very limited in South Africa due to the lack of infrastructure and compliance, this is a common problem especially in SSA. It would have been ideal if these data could have been used together with other variables e.g., measurements of evaporation and radiation but again these data are not collected by the South African Weather Service nor by the farmer's unions.

The self-calibrating PDSI (Sc-PDSI) was calculated using monthly temperature and precipitation. A detailed description of the fairly complex calculation of the Palmer index consisting of five steps is published in several journals [21,44–46]. The Sc-PDSI accounts for all the constants contained in the PDSI and includes a methodology in which the constants are calculated dynamically based upon the characteristics present at each station location. The self-calibrating nature of Sc-PDSI is developed for each station and changes based upon the climate regime of the location. It has wet and dry scales. The index was calculated for three decades as well as for the entire data set from 1985–2016. According to Palmer [44], the range of the monthly index time series is between −4 and +4. Negative (positive) PDSI values indicate dry (wet) periods, while those near-zero presume a state that is close to the average rainfall. The Palmer hydrological drought index (PHDI), is used to assess

long-term moisture supply. The Sc-PDSI was calculated using a program developed by researchers in URL https://github.com/Sibada/scPDSI.
