Description Usage Arguments Value Author(s) See Also Examples
View source: R/distribPrecip.R
MESH requires all forcing data to have the same time interval, which prevents the use of precipitation data reported at lower frequencies than the model time step. This function distributes low-freqency precipitation (e.g. daily) according to a set of high frequency precipitation (e.g. hourly). The high-frequency values are summed to have the same time intervals as the low-frequency data. The ratios of low/high freqency precipitations are determined for each time step, and these ratios are multiplied by the high-frequency data. Where the high-frequency total precipitation is zero, the low-frequency data is spread evenly over the high-frequency interval.
1 2 3 4 5 6 | distribPrecip(
LFprecip = NULL,
HFprecip = NULL,
zero_missing_HF = TRUE,
period_threshold = 48
)
|
LFprecip |
Required. A data frame of low temporal frequency (e.g. daily)
precipitation. The first column must be a POSIXct date/time called
|
HFprecip |
Required. A data frame of high temporal frequency
(e.g. hourly) precipitation. The first column must be a POSIXct date/time
called |
zero_missing_HF |
Optional. If |
period_threshold |
Length of maximum infilled period in hours.
Sequences of missing low-frequency values exceeding this length will be set
to |
Returns a data frame of the adjusted high-frequency precipitation,
with the variables datetime
and distributedP
.
Note that the last date/time in the returned data corresponds to the final
value in the low-frequency data.
Kevin Shook
1 2 3 4 | ## Not run: distributed <- distribPrecip(myPrecip[, c(1, 5)],
adjacentP)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.