subdailyrain: Estimate sub-daily rainfall from daily rainfall

Description Usage Arguments Details Value References Examples

Description

subdailyrain estimate sub-daily rainfall using Bartlett-Lewis rectangular pulse rainfall model.

Usage

1
2
subdailyrain(rain, BLest, dailyvals = 24, dlim = 0.2, maxiter = 1000,
  splitthreshold = 0.2, trace = TRUE)

Arguments

rain

a vector time-series of rainfall

dailyvals

the number of rainfall values required for each day (i.e. 24 for hourly).

BLpar

a data.frame of Bartlett-Lewis parameters as returned by findBLpar().

Details

The function is based on the Bartlett-Lewis Rectangular Pulse model described by Rodriguez-Iturbe (1987 & 1988). The model has six parameters (see findBLpar()) and is characterized as a particular form of clustering process in which each cluster of rainfall events (hereafter storms) consists of one or more rainfall cells being generated in the start of the process. The parameters of BLpar governs the frequency of storms, the start and end of rainfall events associated with each storms, the intensity of rainfall associated with storms variation in the duration of storms, and can be used to generate data for any time-interval. Since these vary seasonally, or by month, it is wise to generate sb-daily data seperately for each month using different parameter estimates.

Singificant element sof the coding have been borrowed from from the HyetosMinute package, and the library must be loaded and attached, i.e. ‘library(HyetosMinute)’ as the function calls C++ code included with the package. The package is not available on CRAN and must be obtained or installed directly from here: http://www.itia.ntua.gr/en/softinfo/3/.

Value

A matrix with length(rain) rows and dailyvals columns of sub-daily rainfall.

References

Rodriguez-Iturbe I, Cox DR & Isham V (1987) Some models for rainfall based on stochastic point processes. Proc. R. Soc. Lond., A 410: 269-288.

Rodriguez-Iturbe I, Cox DR & Isham V (1988) A point process model for rainfall: Further developments. Proc. R. Soc. Lond., A 417: 283-298.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# =========================================== #
# ~~~ Generate hourly data for March 2015 ~~~ #
# =========================================== #
# ~~~~ Get paramaters for March
tme <- as.POSIXlt(dailyrain$obs_time)
marchrain <- dailyrain$precipitation[which(tme$mon + 1 == 3)]
BLpar <- findBLpar(marchrain) # Takes ~ 30 seconds
# ~~~~ Generate hourly data for March 2015
sel <- which(tme$mon + 1 == 3 & tme$year + 1900 == 2015)
march2015 <- dailyrain$precipitation[sel]
hourly <- subdailyrain(march2015, BLpar)
# ~~~~ Plots comparing hourly and daily / 24 data
o <- as.vector(t(matrix(rep(c(1:31), 24), nrow = 31, ncol = 24)))
marchhfd <- march2015[o] / 24
hourlyv <-as.vector(t(hourly))
dd <- c(1:(31 * 24)) / 24
plot(hourlyv ~ dd, type = "l", ylim = c(0, max(hourlyv)),
     xlab = "Decimal day", ylab = "Rain (mm / hr)", col = "red")
par(new = T)
plot(marchhfd ~ dd, type = "l", ylim = c(0, max(hourlyv)),
     xlab = "", ylab = "", col = "blue", lwd = 2)

ilyamaclean/ecohydrotools documentation built on June 10, 2019, 5:45 a.m.