DisagSimul {HyetosMinute}R Documentation

Disaggregate daily rainfall depths into sorter time intervals (with daily input)

Description

This function enables the disaggregation of daily rainfall series into hourly or sub-hourly rainfall series. This is similar to DisagSimul.test function. The difference is that the input file contains only daily values. This is the usual case for the model application. It cannot provide any means for testing.

Usage

DisagSimul(TimeScale=1,BLpar=list(lambda,phi,kappa,alpha,v,mx,sxmx),
CellIntensityProp=list(Weibull=FALSE,iota=NA),
RepetOpt=list(DistAllowed=0.1,FacLevel1Rep=20,
MinLevel1Rep=50,TotalRepAllowed=5000),
NumOfSequences=10,
Statistics=list(print=TRUE,plot=TRUE),
ImportHistData=list(file="histdata.txt",FileContent=c("WetDays","AllDays"),
DaysPerSeason=31,na.values="NA"),
ExportSynthData=list(exp=FALSE,file="SynthData.txt",
FileContent=c("WetDays","AllDays")),PlotHyetographs=FALSE,RandSeed=NULL)

Arguments

TimeScale

A positive number that specifies the time scale at which the daily values are to be disaggregated. Please make sure that for the argument TimeScale the units are hours (h). The default value is 1, meaning that the daily rainfall depths are going to be disaggregated into hourly depths. For sub-hourly time scales, use subdivisions of hour. For instance, to disaggregate daily rainfall into 1 minute depths use 1/60, 1/30 for 2 minute, 1/6 for 10 minute etc. See Examples for further information.

BLpar

List of the Bartlett-Lewis model parameters. See Details for further information.

CellIntensityProp

List of arguments that specifies the distribution of cell intensity. See Details for further information.

RepetOpt

List of parameters specifying the disaggregation algorithm behavior. See Details for further information.

NumOfSequences

A positive integer that specifies the number of clusters of wet days to be disaggregated. To disaggregate all clusters, set a large number (e.g., 1000). Default is NumOfSequences=10.

Statistics

List of logical variables (TRUE/FALSE) that indicates whether the main statistical characteristics of historical and disaggregated data should be printed or plotted. If print=TRUE (the default) the statistics are printed and if plot=TRUE (the default) the statistics are also plotted. See Details for further information.

ImportHistData

List of parameters that specifies the import of historical rainfall depths from an external file. See Details for important special features of ImportHistData parameters.

ExportSynthData

List of parameters that specifies the export of disaggregated rainfall depths to an output file. See Details for important special features of ExportSynthData parameters.

PlotHyetographs

A logical variable (TRUE/FALSE) that indicates whether original and synthetic hyetographs is to be plotted. See Details for further information. Default is PlotHyetographs=FALSE.

RandSeed

An integer value for the random number generator. If it is equal to NULL, then a random seed is not inserted.

Details

The function DisagSimul enables the disaggregation of daily rainfall into hourly or sub-hourly rainfall depths. It uses the Bartlett-Lewis rainfall model as a background stochastic model for hourly or sub-hourly rainfall generation. Then, it uses repetitions to derive a synthetic rainfall series that resembles the given series at the daily scale and, then, an appropriate adjusting procedure, namely the proportion adjusting procedure, to make the generated series fully consistent with the given daily series. For more detailed information on the disaggregation scheme, see the list of references.

The statistics of the generated series can be either printed or displayed graphically. Additionally, the disaggregated series and the synthetic hyetograph of each cluster of wet days can be exported to an output file.

Bartlett-Lewis model description

Argument BLpar is a list that specifies the Bartlett-Lewis rectangular pulse model parameters. The general assumptions of the Bartlett-Lewis rectangular pulse model (Rodriguez-Iturbe et Al., 1987, 1988) are:

  1. Storm origins t_i occur following a Poisson process with rate λ (argument lambda).

  2. Cell origins t_{ij} occur following a Poisson process with rate β.

  3. Cell arrivals terminate after a time v_i exponentially distributed with parameter γ.

  4. Each cell has a duration w_{ij} exponentially distributed with parameter η.

  5. Each cell has a uniform intensity X_{ij} with a specified distribution.

In the original version of the model (Bartlett-Lewis Rectangular Pulse Model), the parameters associated with cells are assumed constant among different storms.

In the modified version (random parameter Bartlett-Lewis model), the parameter η is randomly varied from storm to storm according to a gamma distribution with shape parameter α (argument alpha) and scale parameter ν (argument v). Subsequently, parameters β and γ also vary so that the ratios κ=β/η (argument kappa) and φ=γ/η (argument phi) are constant.

HyetosMinute package implements also the Random Parameter Bartlett-Lewis Rectangular Pulse Model with dependent intensity-duration (Kaczmarska et al., 2014) that allows μ_x to vary in proportion to the cell duration parameter, η, so as the ratio ι=μ_x/η (argument iota) is kept constant.

The distribution of the cell intensity X_{ij} is typically assumed exponential with mean μ_x. Alternatively, it can be assumed two-parameter gamma distribution with mean μ_x and standard deviation σ_x. The package also supports Weibull distribution for cell intensity with mean μ_x and shape parameter.

Thus, in its most simplified version the model uses five parameters, namely λ, β, γ, η and μ_x (or equivalently λ, κ, φ, η and μ_x) and in its most enriched version seven parameters, namely λ, κ, φ, α, ν, μ_x, σ_x. Normally, one parameter set corresponds to one month but it can be also correspond to a season of e.g. three months or even the whole year.

HyetosMinute package supports both the original and the random model version with exponential, gamma or Weibull intensities. By default, the random model is assumed. To implement the original model version with constant parameter η, set argument alpha greater than 100 and insert the value of parameter η in argument v.

To implement the random model with with dependent intensity-duration, set the value of ratio ι=μ_x/η in argument iota.

To implement exponential or gamma distribution for cell intensity then set argument Weibull in CellIntensityProp list as FALSE. To implement the exponential distribution set mean μ_x in argument mx and the ratio μ_x/σ_x (argument sxmx) equals to 1. If the argument sxmx is not equal to 1 then the gamma distribution is assumed with a specific ratio sxmx.

To implement Weibull distribution, then set argument weibTF equal to TRUE. In this case, the intensity follows the Weibull distribution with mean μ_x (argument mx) and shape parameter (put in argument sxmx).

In the case of random model with with dependent intensity-duration and exponential distribution, set the value of ratio ι=μ_x/η in argument iota, argument mx as NA and argument sxmx equals to 1. To implement gamma distribution, set argument mx as NA and specify the ratio μ_x/σ_x (argument sxmx). To implement Weibull distribution set argument mx as NA and specify the shape parameter in argument sxmx.

Please make sure that for parameters μ_x and σ_x the length units are millimeters (mm) and for parameters λ, ν, μ_x and σ_x the time units are days (d).

Disaggregation scheme options

Argument RepetOpt is a list of parameters that specifies any changes to the default values of disaggregation repetition scheme.

The scheme incorporates four levels of repetition. The number of Level 1 repetitions is determined by multiplying the FacLevel1Rep by the number of attempts to establish an appropriate sequence of wet days (Level 0 repetitions, which is not given by the user but rather is determined by the program). In this manner, the more the number of required Level 0 repetitions is, the more the number of Level 1 repetitions, and the less the number of Level 2 repetitions, will be. This results in a faster algorithm. The number of allowed Level 1 repetitions cannot be set lower than MinLevel1Rep. The total number of Level 1 and Level 2 repetitions cannot exceed the TotalRepAllowed.

In the case that the model is not able to establish an appropriate sequence of wet days (Level 0 repetitions) after a large number of repetitions (10*TotalRepAllowed), then NA values are returned. NA values are also returned in the case that the system is not able to obtain cell intensities with the desired properties (Level 1 repetitions). The wet days that were not disaggregated successfully are excluded from the statistical analysis.

DistAllowed

A positive number that specifies the distance used to judge whether synthetic daily depths resemble the real ones. Default is DistAllowed=0.1.

FacLevel1Rep

A positive number that specifies the factor for Level 1 repetitions. Default is FacLevel1Rep=20.

MinLevel1Rep

A positive integer that specifies the minimum number of Level 1 repetitions. Default is FacLevel1Rep=50.

TotalRepAllowed

A positive integer that specifies the total repetitions. Default is TotalRepAllowed=5000.

Argument Statistics is a list of logical variables (TRUE/FALSE) that indicates whether the main statistical characteristics of synthetic data are to be printed or plotted. The statistics are computed and printed if print=TRUE. Additionally, if plot=TRUE bar plots and auto-correlation function plots are produced on screen devices.

Read daily data from file

Argument ImportHistData is a list of parameters specifying the features of input file that contains the daily rainfall depths to be disaggregated. This file must have a specific format (see examples).

file

A character string that specifies the name of the file or connection of the daily rainfall data that is imported. The input files are text files with the ".txt" extension (e.g. file="histdata.txt").

FileContent

A character string that indicates if dry days (with zero rainfall depths) are also contained in the input file. If FileContent=c("WetDays") the input file contains only the daily rainfall depths of wet days. If FileContent=c("AllDays") the input file contains the daily rainfall depths of wet and dry days. Default is DailyValues=c("WetDays").

DaysPerSeason

A positive integer, typically 30 or 31, that specifies the number of days of the month or season of the input data. Default is DaysPerSeason=31.

na.values

A character vector of strings which are to be interpreted as NA values. Default is na.values="NA".

The input file must not contain any header lines or the Bartlett-Lewis model parameters.

The three first columns of the input file determine the dates of the data. The first column corresponds to the "Day", the second column corresponds to the "Month" and the third column corresponds to the "Year". The fourth column contains the daily values (mm).

The "Year" field in the input file does not necessarily correspond to a real year. Thus, the sequence of years could be 1, 2, ..., or 49, 50, ..., instead of 1949, 1950, ... .

The "Day" and "Month" fields in the input file do not necessarily correspond to a real month. A "Month" can well be a season containing e.g. three months or even the whole year. In the latter case the number of days of month should be set to 366 and the "Day" field should be the Julian number of the date.

Export synthetic data to file

Argument ExportSynthData is a list of parameters that specifies the features of output file if synthetic data is to be exported to a text file. The output file has similar structure as the input file. The output file always contains the synthetic rainfall depths listed in increasing order of date.

exp

A logical variable (TRUE/FALSE) that indicates whether synthetic rainfall depths should be written to an output file. If exp=TRUE, synthetic data are exported to a text file. Default is exp=FALSE.

file

A character string that specifies the name of the file or connection where the rainfall data is to be exported. The output files are text files with the ".txt" extension (e.g. file="SynthData.txt").

FileContent

A character string indicating whether dry days will be also written in the output file. If FileContent=c("WetDays") the output file will contain only the rainfall depths of wet days. If FileContent=c("AllDays") the output file will contain the rainfall depths of wet and dry days. Default is DailyValues=c("WetDays").

DaysPerSeason

A positive integer, typically 30 or 31, that specifies the number of days of the month or season of the output data. Default is DaysPerSeason=31.

Argument PlotHyetographs is a logical variable (TRUE/FALSE) indicating whether original and synthetic hyetographs is to be plotted. If PlotHyetographs=TRUE, hyetographs of different sequences (clusters) of wet days are exported as PDF files, in the chosen working directory. The name of each external pdf file corresponds to the starting date of disaggregated cluster.

The examples below and the used parameters are indicative. Subsequently, new parameters for the Bartlett-Lewis model should be estimated for other datasets.

Value

A list with the following components:

Disaggregated rainfall depths

A list of matrices containing the disaggregated rainfall depths of each cluster of wet days.

Statistics

A list of matrices containing the main statistics of all data values, wet day values and wet hour values. The statistics are printed if print=TRUE. See Details for further information.

The statistics are plotted on screen device if plot is TRUE.

The disaggregated rainfall depths are exported to a text file, if exp is TRUE. See Details for further information.

The historical and synthetic hyetograph of each cluster of wet days are plotted, if PlotHyetographs is TRUE. See Details for further information.

Author(s)

Kossieris Panagiotis pkossier@central.ntua.gr

References

The methodology of HyetosMinute and details of its application are described in:

For Bartlett-Lewis rectangular pulse rainfall model the user is referenced to:

For disaggregation by adjusting procedures the user is referenced to:

Find older versions of Hyetos at http://itia.ntua.gr/en/softinfo/3/

See Also

SequentialSimul, DisagSimul.test

Examples

# Example 1: Disaggregate daily rainfall into hourly values
# with the random parameter Bartlett-Lewis gamma model
# Import daily time series from "HistDailyData.txt" file

# To load the data set "HistDailyData" use
data(HistDailyData)

# To export the daily rainfall depths of "HistDailyData"
# data set in the chosen working directory use
write.table(HistDailyData,file="HistDailyData.txt",sep="\t",
            quote=FALSE,row.names=FALSE,col.names=FALSE)

# To disaggregate the daily rainfall depths of first 5 clusters of wet days use
ex21 <- DisagSimul(TimeScale=1,BLpar=list(lambda=0.569748,phi=0.048387,kappa=0.5996395,
alpha=7.2933199,v=0.052517913,mx=30.4825,sxmx=32.391/30.4825),CellIntensityProp=list(Weibull=FALSE,
iota=NA),RepetOpt=list(DistAllowed=0.1,FacLevel1Rep=20,MinLevel1Rep=50,
TotalRepAllowed=5000),NumOfSequences=5,Statistics=list(print=TRUE,plot=FALSE),
ExportSynthData=list(exp=TRUE,FileContent=c("AllDays"),file="HistDailyData_Disag.txt"),
ImportHistData=list(file="HistDailyData.txt",na.values="NA",FileContent=c("AllDays"),
DaysPerSeason=30),PlotHyetographs=FALSE,RandSeed=5)

# Example 2: Disaggregate daily rainfall into 10-min values
# with the random parameter Bartlett-Lewis model
# Import daily time series from "HistDailyData2.txt" file

# To load the data set "HistDailyData2" use
data(HistDailyData2)

# To export the daily rainfall depths of "HistDailyData2" data set
# in the chosen working directory use
write.table(HistDailyData2,file="HistDailyData2.txt",sep="\t",
            quote=FALSE,row.names=FALSE,col.names=FALSE)

# To disaggregate the daily rainfall depths of first 5 clusters of wet days use
x22 <- DisagSimul(TimeScale=1/6,BLpar=list(lambda=0.9396,phi=0.0568,kappa=1.05819,
alpha=2.69519,v=0.006282916666,mx=24.33408,sxmx=1),CellIntensityProp=list(Weibull=FALSE,
iota=NA),RepetOpt=list(DistAllowed=0.1,FacLevel1Rep=20,MinLevel1Rep=50,
TotalRepAllowed=5000),NumOfSequences=5,Statistics=list(print=TRUE,plot=FALSE),
ExportSynthData=list(exp=TRUE,FileContent=c("WetDays"),file="HistDailyData2_Disag.txt"),
ImportHistData=list(file="HistDailyData2.txt",na.values="NA",
FileContent=c("WetDays"),DaysPerSeason=31),
PlotHyetographs=FALSE,RandSeed=5)


[Package HyetosMinute version 2.1 Index]