calculate_SPEI_MECC: Function to calculate SPEI

calculate_SPEI_MECCR Documentation

Function to calculate SPEI

Description

Function to calculate SPEI

Usage

calculate_SPEI_MECC(
  Date,
  Precipitation,
  ETP,
  scale = 3,
  year_bounds = c(1900, 2019),
  fill_gaps = F
)

Arguments

Date

series of dates (daily) to be of the time series.

Precipitation

series of daily precipitation (mm)

ETP

series of minimum daily potential evapotranspiration (mm), preferably obtained with 'calculate_ETP_daily_MECC()'

scale

integer, the number of months for accumulation computation

year_bounds

vector with two integer values, the years of beginning and end of analysis

fill_gaps

Boolean value. Indicates if the SPEI will be calculated based on the raw data (with gaps) or with the gap-filled deficit series.

Details

Note that the function exports two SPEI columns. One called 'SPEI', containing the calculated values of SPEI and with eventual NA values, due to missing data, and a second called 'SPEI_filled', where missing deficit (P-ETP) values were filled with the average value of deficit for the respective month over the time series.


pedroalencar1/DroughtSDF documentation built on May 8, 2023, 6:58 p.m.