CSIcalc: Calculate CSI values from salinity object

Description Usage Arguments Value Examples

Description

Calculate monthly CSI values from salinity object for a set of sites over a range of scales.

Usage

1
CSIcalc(sal, scale = 24, lmode = FALSE)

Arguments

sal

data.frame with Year and Month timestamp columns, with columns of site salinity values. Generally created by one of the CSIimport_ family functions.

scale

integer representing the scale at which the CSI will be computed. For example, a value of six would imply that data from the current month and of the past five months will be used for computing the CSI value for a given month.

lmode

logical. If true, L-moments are used in calculating alpha and beta parameters of gamma distribution as per SPEI package and Vicente-Serrano et al., 2010. If false (default), no L-moments are used, and gamma distribution parameters are caluclated directly from the observed data as per National Drought Mitigation Center (http://drought.unl.edu/MonitoringTools/DownloadableSPIProgram.aspx) and McKee et al., 1993.

Value

A 3D array of CSI values with dimensions of number of months covered, scale of months analysed (typically 1-24), and number of sites.

Examples

1
2
3
4
# Data file with Year and Month columns
data_path <- system.file("extdata", "Monthly_Coastal_EDEN.csv", package = "CSI")
sal <- CSIimport_monthly(data_path)
csi <- CSIcalc(sal)

USGS-EDEN/CSI documentation built on Oct. 11, 2019, 11:57 p.m.