| Title: | Improves the Interpretation of the Standardized Precipitation Index Under Changing Climate Conditions |
|---|---|
| Description: | Improves the interpretation of the Standardized Precipitation Index under changing climate conditions. The package uses the nonstationary approach proposed in Blain et al. (2022) <doi:10.1002/joc.7550> to detect trends in rainfall quantities and to quantify the effect of such trends on the probability of a drought event occurring. |
| Authors: | Gabriel Constantino Blain [aut, cre] (ORCID: <https://orcid.org/0000-0001-8832-7734>), Graciela R. Sobierajski [aut] (ORCID: <https://orcid.org/0000-0002-7211-9268>), Leticia L. Martins [aut] (ORCID: <https://orcid.org/0000-0002-0299-3005>), Adam H. Sparks [aut] (ORCID: <https://orcid.org/0000-0002-0061-8359>) |
| Maintainer: | Gabriel Constantino Blain <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.1 |
| Built: | 2026-05-25 07:59:57 UTC |
| Source: | https://github.com/gabrielblain/spichanges |
Daily rainfall amounts recorded in millimetres in Campinas state of Sao Paulo, Brazil.
CampinasRainCampinasRain
CampinasRainA dataframe with 2 columns and 16071 rows:
Date
Daily rainfall amounts recorded in millimetre in Campinas state of Sao Paulo, Brazil
...
This dataset provides coordinates for Brazil at a spatial resolution of 0.5 x 0.5 degrees.
lonlatlonlat
lonlatA matrix with 2841 rows and 2 columns:
Longitude in decimal degrees
Latitude in decimal degrees
...
Data generated using information from the Instituto Brasileiro de Geografia e Estatística (IBGE). For more information, visit: https://www.ibge.gov.br/
This dataset provides the changes (in percentage) in Moderate to Extreme, Severe to Extreme, and Extreme Drought events across Brazil
for the four seasons (Summer, Autumn, Winter, and Spring) over the period 1980–2024.
The data were generated using the SPIChanges() function applied to rainfall data from NOAA PSL.
MapMap
MapA matrix with 2841 rows and 18 columns:
Longitude in decimal degrees
Latitude in decimal degrees
Percentage change in moderate drought events in Summer
Percentage change in severe drought events in Summer
Percentage change in extreme drought events in Summer
The selected gamma-based model in Summer
Percentage change in moderate drought events in Autumn
Percentage change in severe drought events in Autumn
Percentage change in extreme drought events in Autumn
The selected gamma-based model in Autumn
Percentage change in moderate drought events in Winter
Percentage change in severe drought events in Winter
Percentage change in extreme drought events in Winter
The selected gamma-based model in Winter
Percentage change in moderate drought events in Spring
Percentage change in severe drought events in Spring
Percentage change in extreme drought events in Spring
The selected gamma-based model in Spring
...
Generated using the SPIChanges() function applied to rainfall data obtained from NOAA PSL (https://psl.noaa.gov/).
Daily rainfall data from Oxford-UK (Radcliffe Observatory). Covers the period from January 1827 to January 2020. Belongs to Burt, Stephen (2020). Daily meteorological data from the Radcliffe Observatory (now Radcliffe Meteorological Station), from January 1815: updated to January 2020. figshare. Dataset.
OxfordRainOxfordRain
A data frame with 70523 rows and 1 column:
Precipitation in millimeters
<doi.org/10.6084/m9.figshare.11956239.v1>
Rainfall amounts aggregated using TSaggreg(). Campinas state of Sao Paulo, Brazil.
rainTS4rainTS4
rainTS4A matrix with 4 columns and 576 rows:
Year
Month
Four quasi-weekly periods in each month
Rainfall amounts aggregated at TS equal to four
...
Detect trends and quantify their effect on the probability of SPI values occurring
SPIChanges(rain.at.TS, only.linear = "Yes")SPIChanges(rain.at.TS, only.linear = "Yes")
rain.at.TS |
A 4-column matrix generated with
|
only.linear |
A character string value ( |
The SPIChanges() function implements a nonstationary parametric approach to detect
changes in precipitation patterns and assess their impact on the expected frequency
of Standardized Precipitation Index (SPI) values. It evaluates 16 candidate models
based on time-varying gamma distributions, which account for a broad range of linear
and nonlinear changes in both the mean and dispersion of the precipitation series.
Model selection is performed using the second-order Akaike Information Criterion (AICc), and the selected model is used to compute the cumulative probability of each precipitation amount under changing climate conditions. These nonstationary probabilities are then compared with those from the original, stationary SPI algorithm to identify whether the frequency of drought events has increased or decreased over time.
For detailed explanations of the gamma-based models and the model selection procedure, please refer to the README and Vignettes included in the package.
A list object with:
The Rainfall amounts, SPI, cumulative probability of the SPI values under the stationary approach, cumulative probability of the SPI values under the non-stationary approach, and the changes in the frequency of below zero SPI values caused by the changes in rainfall patterns.
The generalized additive model that best fits the rainfall series
changes in the frequency of zero precipitation, moderate to extreme, severe to extreme and extreme drought events,as categorized by the SPI classification system, caused by the changes in rainfall patterns. Changes in the precipitation amounts associated describing normal conditions is also shown.
Year to year changes in the expected frequency of moderate to extreme, severe to extreme and extreme drought events.
The Rainfall amounts, SPI, cumulative probability of the SPI values under the stationary approach, cumulative probability of the SPI values under the non-stationary approach, and the changes in the frequency of below zero SPI values caused by the changes in rainfall patterns.
The generalized additive model that best fits the rainfall series
changes in the frequency of zero precipitation, moderate, severe and extreme drought events, as defined by the SPI classification system, caused by the changes in rainfall patterns. Changes in the precipitation amounts associated describing normal conditions is also shown.
Year to year changes in the expected frequency of moderate, severe and extreme drought events.
rainTS4 <- rainTS4 Changes_SPI <- SPIChanges(rain.at.TS=rainTS4, only.linear = "yes")rainTS4 <- rainTS4 Changes_SPI <- SPIChanges(rain.at.TS=rainTS4, only.linear = "yes")
Aggregates daily rainfall totals at quasi-week time scales
TSaggreg(daily.rain, start.date, TS = 4L)TSaggreg(daily.rain, start.date, TS = 4L)
daily.rain |
Vector, 1-column matrix or data frame with daily rainfall totals. |
start.date |
Date at which the aggregation should start. Preferred formats are “YYYY-MM-DD”, “YYYY/MM/DD” but most any valid date format should work. |
TS |
Time scale on the quasiWeek basis (integer values between 1 and 96). Default is 4, which corresponds to the monthly time scale. |
This package adopts a quasi-weekly time step, dividing each month into four fixed periods:
days 1–7, 8–14, 15–21, and 22 through the end of the month. This approach ensures a
consistent total of 48 quasi-weekly intervals per year, regardless of the selected
aggregation time scale (TS).
For instance, when TS = 4 (representing a one-month backward-looking window), the
function computes cumulative precipitation totals over four consecutive quasi-weekly
periods. This aggregation is repeated across all 48 periods of each year, generating
a time series of aggregated precipitation values suitable for subsequent SPI estimation.
A matrix with rainfall amounts aggregated at the time scale selected by the user
daily.rain <- CampinasRain[,2] rainTS4 <- TSaggreg(daily.rain=daily.rain,start.date="1980-01-01",TS=4)daily.rain <- CampinasRain[,2] rainTS4 <- TSaggreg(daily.rain=daily.rain,start.date="1980-01-01",TS=4)