Learn R Programming

PowerSDI (version 1.0.0)

Reference: Calculate the SPI and SPEI Using a Reference Data Source

Description

Calculates the Standardised Precipitation Index (SPI) and Standardised Precipitation-Evapotranspiration Index (SPEI) using a reference data source.

Usage

Reference(ref, distr = "GEV", PEMethod = "HS", TS = 4L)

Value

A data frame with five columns

  • rain,

  • potential evapotranspiration,

  • difference between rainfall and potential evapotranspiration,

  • SPI calculated at the time scale selected by the user, and

  • SPIE calculated at the time scale selected by the user

Arguments

ref

A data frame with the variables required for calculating the SDIs. See refHS or refPM as examples.

distr

A character variable (“GEV” or “GLO”) defining which distribution is used to calculate the SPEI. Default is “GEV”.

PEMethod

A character variable (“HS” or “PM”) defining the potential evapotranspiration method. Default is “HS”.

TS

Time scale on the “quart.month” basis (whole values between 1 and 96). Default is 4.

Examples

Run this code

Reference(ref = refHS, distr = "GEV", PEMethod = "HS", TS = 4)

Run the code above in your browser using DataLab