Compute precipitation indices over a time series.
precip_indices(object, timeseries = FALSE, intervals = NULL)
object | an object of class |
---|---|
timeseries | logical, |
intervals | integer no lower than 5, for the days intervals when
timeseries = |
A dataframe with precipitation indices:
maximum length of consecutive dry day, rain < 1 mm (days)
maximum length of consecutive wet days, rain >= 1 mm (days)
number of heavy precipitation days 10 >= rain < 20 mm (days)
number of very heavy precipitation days rain >= 20 (days)
maximum 1-day precipitation (mm)
maximum 5-day precipitation (mm)
total precipitation when rain > 95th percentile (mm)
total precipitation when rain > 99th percentile (mm)
total precipitation (mm) in wet days, rain >= 1 (mm)
simple daily intensity index, total precipitation divided by the number of wet days (mm/days)
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.
# \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)#># 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# }