Compute precipitation indices over a time series.

precip_indices(object, timeseries = FALSE, intervals = NULL)

Arguments

object

an object of class chirps as provided by get_chirps

timeseries

logical, FALSE for a single point time series observation or TRUE for a time series based on intervals

intervals

integer no lower than 5, for the days intervals when timeseries = TRUE

Value

A dataframe with precipitation indices:

MLDS

maximum length of consecutive dry day, rain < 1 mm (days)

MLWS

maximum length of consecutive wet days, rain >= 1 mm (days)

R10mm

number of heavy precipitation days 10 >= rain < 20 mm (days)

R20mm

number of very heavy precipitation days rain >= 20 (days)

Rx1day

maximum 1-day precipitation (mm)

Rx5day

maximum 5-day precipitation (mm)

R95p

total precipitation when rain > 95th percentile (mm)

R99p

total precipitation when rain > 99th percentile (mm)

Rtotal

total precipitation (mm) in wet days, rain >= 1 (mm)

SDII

simple daily intensity index, total precipitation divided by the number of wet days (mm/days)

References

Aguilar E., et al. (2005). Journal of Geophysical Research, 110(D23), D23107.
https://doi.org/10.1029/2005JD006119

Kehel Z., et al. (2016). In: Applied Mathematics and Omics to Assess Crop Genetic Resources for Climate Change Adaptive Traits (eds Bari A., Damania A. B., Mackay M., Dayanandan S.), pp. 151–174. CRC Press.

Examples

# \donttest{ lonlat <- data.frame(lon = c(-55.0281,-54.9857), lat = c(-2.8094, -2.8756)) dates <- c("2017-12-15", "2017-12-31") dt <- get_chirps(lonlat, dates)
#> Getting your request...
# take the indices for the entire period precip_indices(dt, timeseries = FALSE)
#> id date lon lat index value #> <int> <date> <dbl> <dbl> <chr> <dbl> #> 1: 1 2017-12-15 -55.03 -2.81 MLDS 5.00 #> 2: 1 2017-12-15 -55.03 -2.81 MLWS 2.00 #> 3: 1 2017-12-15 -55.03 -2.81 R10mm 3.00 #> 4: 1 2017-12-15 -55.03 -2.81 R20mm 1.00 #> 5: 1 2017-12-15 -55.03 -2.81 Rx1day 37.69 #> --- #> 16: 2 2017-12-15 -54.99 -2.88 Rx5day 75.08 #> 17: 2 2017-12-15 -54.99 -2.88 R95p 37.54 #> 18: 2 2017-12-15 -54.99 -2.88 R99p 37.54 #> 19: 2 2017-12-15 -54.99 -2.88 Rtotal 128.86 #> 20: 2 2017-12-15 -54.99 -2.88 SDII 18.41
# take the indices for periods of 7 days precip_indices(dt, timeseries = TRUE, intervals = 7)
#> id date lon lat index value #> <int> <date> <dbl> <dbl> <chr> <dbl> #> 1: 1 2017-12-15 -55.03 -2.81 MLDS 3.00 #> 2: 1 2017-12-15 -55.03 -2.81 MLWS 2.00 #> 3: 1 2017-12-15 -55.03 -2.81 R10mm 2.00 #> 4: 1 2017-12-15 -55.03 -2.81 R20mm 0.00 #> 5: 1 2017-12-15 -55.03 -2.81 Rx1day 13.69 #> --- #> 36: 2 2017-12-22 -54.99 -2.88 Rx5day 65.70 #> 37: 2 2017-12-22 -54.99 -2.88 R95p 37.54 #> 38: 2 2017-12-22 -54.99 -2.88 R99p 37.54 #> 39: 2 2017-12-22 -54.99 -2.88 Rtotal 65.70 #> 40: 2 2017-12-22 -54.99 -2.88 SDII 21.90
# }