# Fires Drive Long-Term Environmental Degradation in the Amazon Basin
## 2 Materials and Methods
### Rainfall and Standardized Precipitation Index (SPI)  
For precipitation and SPI analysis, we used the CHIRPS dataset [61], developed by the United States Geological Survey and the Climate Hazards Group of the University of California, Santa Barbara. This dataset combines pentadal precipitation climatology, near-global geostationary thermal infrared satellite observations from the Climate Prediction Center (CPC) and National Climatic Data Center [62], rainfall fields from the atmospheric model of the NOAA Climate Forecast System (CFSv2) [63], and in situ rainfall observations [64; 65]. In this study, CHIRPS is used as there is a lack of temporal data from in situ stations throughout the Amazon Basin, and because of their availability from 1981 to the present at a spatial resolution of 0.05\({}^{\circ}\) (~5.3 km) at daily, pentads and monthly temporal resolutions for the near-globe.  
The standardized precipitation index (SPI) was developed by [PERSON] et al. [66] to quantify the deficit or excess rainfall at different time scales. To identify drought events in the time series, the results for this study were calculated on an annual scale (SPI-12) from 2001 to 2019. The SPI was calculated from the total cumulative rainfall over the 20-year period and then adjusted to a probability distribution function (PDF), which is transformed into a normal probability distribution function to change the average SPI value of a given location and period to zero [67; 68].  
To determine the SPI, a Gamma distribution defined by the PDF was initially used:  
\[f(x)=\ \frac{1}{\Gamma(a)\beta^{a}}x^{a-1}e^{-\frac{x}{\beta}} \tag{4}\]  
where \(\alpha\) (\(>\)0; dimensionless) is the shape parameter, \(\beta\) (\(>\)0; mm) is the scale parameter, \(x\) (\(>\)0; mm) is the total rainfall, and \(\Gamma\) (\(\alpha\)) is the Gamma function: \(\Gamma(a)=\int_{0}^{\infty}x^{a-1}e^{-x}dx\).  
All the parameters and the PDF Gamma were adjusted for the rainfall cumulative frequency distribution based on CHIRPS annual data. We calculated the \(\alpha\) and \(\beta\) parameters of the PDF Gamma for each year. The maximum-likelihood method was used to estimate the \(\alpha\) and \(\beta\) values [67; 68]. Parameters \(\alpha\) and \(\beta\) were calculated to identify the cumulative probability of an observed rain event for the adopted scale using the following:  
\[\mathrm{F}(x)=\int_{0}^{x}f(x)dx=\frac{1}{\Gamma(\alpha)\beta^{a}}\int_{0}^{x} x^{a-1}e^{-\frac{x}{\beta}}dx \tag{5}\]  
The annual SPI values were classified into wet and dry periods, as was done by [PERSON] et al. [66]. CHIRPS data were then used to quantify and apply statistical tests to the monthly and annual scales. To identify GPP anomalies as a function of the SPI, the data were adapted to equations used by [PERSON] et al. [69] (Equation (6)):  
\[\mathrm{GPPa}\ =\ \frac{\mathrm{X}_{\mathrm{GPP}}-\mathrm{\mu}_{\mathrm{GPP}}} {\sigma_{\mathrm{GPP}}},\ \mathrm{SPIa}\ =\ \frac{\mathrm{X}_{\mathrm{SPI}}-\mathrm{\mu}_{\mathrm{SPI}}}{\sigma_{\mathrm{SPI }}}, \tag{6}\]  
where \(\mathrm{X}_{\mathrm{GPP}}\) is the GPP value, \(\mathrm{\mu}_{\mathrm{SM}}\) is the average GPP value, and \(\sigma_{\mathrm{GPP}}\) is the standard deviation of GPP. The GPP values are estimated from the full data recording of the satellite observation period within the time series selected in this study. The same conditions apply for SPI.