Package 'SPIChanges'

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] , Graciela R. Sobierajski [aut] , Leticia L. Martins [aut] , Adam H. Sparks [aut]
Maintainer: Gabriel Constantino Blain <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0.9000
Built: 2025-03-08 05:18:58 UTC
Source: https://github.com/gabrielblain/spichanges

Help Index


Daily Rainfall Amounts

Description

Daily rainfall amounts recorded in millimetre in Campinas state of Sao Paulo, Brazil.

Usage

CampinasRain

Format

CampinasRain

A dataframe with 2 columns and 16071 rows:

Date

Date

Rain

Daily rainfall amounts recorded in millimetre in Campinas state of Sao Paulo, Brazil

...

Source

https://psl.noaa.gov/


Coordinates for Entire Brazil

Description

This dataset provides coordinates for Brazil at a spatial resolution of 0.5 x 0.5 degrees.

Usage

lonlat

Format

lonlat

A matrix with 2841 rows and 2 columns:

lon

Longitude in decimal degrees

lat

Latitude in decimal degrees

...

Source

Data generated using information from the Instituto Brasileiro de Geografia e Estatística (IBGE). For more information, visit: https://www.ibge.gov.br/


Changes in Drought Events in Brazil (1980-2024)

Description

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.

Usage

Map

Format

Map

A matrix with 2841 rows and 18 columns:

lon

Longitude in decimal degrees

lat

Latitude in decimal degrees

SummerModerate

Percentage change in moderate drought events in Summer

SummerSevere

Percentage change in severe drought events in Summer

SummerExtreme

Percentage change in extreme drought events in Summer

SummerModel

The selected gamma-based model in Summer

AutumnModerate

Percentage change in moderate drought events in Autumn

AutumnSevere

Percentage change in severe drought events in Autumn

AutumnExtreme

Percentage change in extreme drought events in Autumn

AutumnModel

The selected gamma-based model in Autumn

WinterModerate

Percentage change in moderate drought events in Winter

WinterSevere

Percentage change in severe drought events in Winter

WinterExtreme

Percentage change in extreme drought events in Winter

WinterModel

The selected gamma-based model in Winter

SpringModerate

Percentage change in moderate drought events in Spring

SpringSevere

Percentage change in severe drought events in Spring

SpringExtreme

Percentage change in extreme drought events in Spring

SpringModel

The selected gamma-based model in Spring

...

Source

Generated using the SPIChanges() function applied to rainfall data obtained from NOAA PSL (https://psl.noaa.gov/).


Rainfall Aggregated at the 4-quasi week time scale

Description

Rainfall amounts aggregated using TSaggreg(). Campinas state of Sao Paulo, Brazil.

Usage

rainTS4

Format

rainTS4

A matrix with 4 columns and 576 rows:

Year

Year

Month

Month

quasiWeek

Four quasi-weekly periods in each month

rain.at.TS4

Rainfall amounts aggregated at TS equal to four

...

Source

https://psl.noaa.gov/


Detect trends and quantify their effect on the probability of SPI values occurring

Description

Detect trends and quantify their effect on the probability of SPI values occurring

Usage

SPIChanges(rain.at.TS, only.linear = "Yes")

Arguments

rain.at.TS

A 4-column matrix generated with TSaggreg(). No other objects are accepted.

  • 1st column is years (YYYY),

  • 2nd is the months (1 to 12),

  • 3rd is the quasiWeeks (1 to 4),

  • and 4th is the rainfall totals accumulated at a time scale.

only.linear

A character string value (Yes or No) defining if the function must consider only linear models (Yes) or linear and non-linear models (No). Default is Yes.

Value

A list object with:

data.week

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.

model.selection

The generalized additive model that best fits the rainfall series

Changes.Freq.Drought

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.

Statistics

Year to year changes in the expected frequency of moderate to extreme, severe to extreme and extreme drought events.

data.week

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.

model.selection

The generalized additive model that best fits the rainfall series

Changes.Freq.Drought

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.

Statistics

Year to year changes in the expected frequency of moderate, severe and extreme drought events.

Examples

rainTS4 <- rainTS4
Changes_SPI <- SPIChanges(rain.at.TS=rainTS4, only.linear = "yes")

Aggregates daily rainfall totals at quasi-week time scales

Description

Aggregates daily rainfall totals at quasi-week time scales

Usage

TSaggreg(daily.rain, start.date, TS = 4L)

Arguments

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.

Value

A matrix with rainfall amounts aggregated at the time scale selected by the user

Examples

daily.rain <- CampinasRain[,2]
rainTS4 <- TSaggreg(daily.rain=daily.rain,start.date="1980-01-01",TS=4)