Description Usage Arguments Value Note Author(s) See Also Examples
View source: R/ComprehensivePrecipitationGenerator.R
The comprehensive Precipitation Generator
1 2 3 4 5 6 7 8 9 10 11 12 13 | ComprehensivePrecipitationGenerator(station = c("T0001", "T0010",
"T0099"), prec_all, mean_climate_prec = NULL, year_max = 1990,
year_min = 1961, leap = TRUE, nmonth = 12, cpf = NULL,
verbose = TRUE, p = 1, type = "none", lag.max = NULL,
ic = "AIC", activateVARselect = FALSE, exogen = NULL,
exogen_sim = NULL, is_exogen_gaussian = FALSE,
year_max_sim = year_max, year_min_sim = year_min,
mean_climate_prec_sim = NULL, onlygeneration = FALSE,
varmodel = NULL, type_quantile = 3, qnull = NULL, valmin = 0.5,
step = 0, n_GPCA_iteration = 0,
n_GPCA_iteration_residuals = n_GPCA_iteration, sample = NULL,
extremes = TRUE, exogen_all = NULL, exogen_all_col = station,
no_spline = FALSE, nscenario = 1, seed = NULL, noise = NULL)
|
station |
character vector of the IDs of the considered meteorological stations |
prec_all |
data frame containing daily precipitation of all meteorological stations. See |
mean_climate_prec |
a matrix containing monthly mean daily precipitation for the considered station. If it is |
year_max |
start year of the recorded (calibration) period |
year_min |
end year of the recorded (calibration) period |
leap |
logical variables. If it is |
nmonth |
number of months in one year (default is 12) |
cpf |
see |
verbose |
logical variable |
p, type, lag.max, ic, activateVARselect |
see respective input parameter on |
exogen |
data frame or matrix containing the (normalized or not) exogenous variables (predictors) for the recorded (calibration) period. |
exogen_sim |
data frame or matrix containing the (normalized or not) exogenous variables (predictors) for the simulation period. Default is |
is_exogen_gaussian |
logical value. If |
year_max_sim |
last year of the simulation period. Default is equal to |
year_min_sim |
first year of the simulation period. Default is equal to |
mean_climate_prec_sim |
a matrix containing monthly mean daily precipitation for the simulation period. If is |
onlygeneration |
logical value. If |
varmodel |
the comprehensinve VAR model as a |
type_quantile |
see |
step |
see |
n_GPCA_iteration |
number of iterations of Gaussianization process for data. Default is 0 (no Gaussianization) |
n_GPCA_iteration_residuals |
number of iterations of Gaussianization process for VAR residuals. Default is 0 (no Gaussianization) |
sample, extremes, qnull, valmin |
see |
exogen_all |
data frame containing exogenous variable formatted like |
exogen_all_col |
vector of considered columns of |
no_spline |
logical value. See |
nscenario |
number of generated scenarios for daily maximum and minimum temperature |
seed |
seed for stochastic random generation see |
noise |
stochastic noise to add for variabile generation. Default is |
A list of the following variables:
prec_mes
matrix containing measured daily precipitation (the data is copied by the measured data given as input for the period and the station considered for varmodel
estimation)
prec_spline
matrix containing climatic "spline-interpolated" daily preciptation from mean_climate_prec
data_prec
matrix containing normalized measured precipitation variable
prec_gen
matrix containing generated daily precipitation [mm]
prec_spline_sim
matrix containing climatic "spline-interpolated" daily preciptation from mean_climate_prec_sim
data_prec_gen
matrix containing normalized generated precipitation variable
mean_climate_prec
matrix containing monthly means of daily precipitation (historical scenario)
mean_climate_prec_sim
matrix containing monthly means of daily precipitation (predicted/simulated scenario)
var
a varest object containing the used VAR model
It pre-processes and generates a multi-site precipitation fields. It uses getVARmodel
. Detailed examples can be viewed of this function in this presentation.
Unfortunately, using this approach, the spatial correlations are underestimated. This is due to the persinstence of zeros in the precipitation records.
This problem is known in literature and can be solved in the future versions of RMAWGEN.
See the R code for further details
Emanuele Cordano, Emanuele Eccel
splineInterpolateMonthlytoDailyforSeveralYears
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | data(trentino)
set.seed(1222) # set the seed for random generations!
year_max <- 1990
year_min <- 1961
year_max_sim <- 1982
year_min_sim <- 1981
n_GPCA_iter <- 2
p <- 1
nscenario=1
station <- c("T0090","T0083")
## Not Run: the call to ComprehensivePrecipitationGenerator may elapse too
## long time (more than 5 eseconds) and is not executed by CRAN check.
## Please uncomment the following line to run the example on your own PC.
# generation00 <- ComprehensivePrecipitationGenerator(station=station,
# prec_all=PRECIPITATION,year_min=year_min,year_max=year_max,
# year_min_sim=year_min_sim,year_max_sim=year_max_sim,p=p,
# n_GPCA_iteration=n_GPCA_iter,n_GPCA_iteration_residuals=0,
# sample="monthly",nscenario=nscenario,no_spline=TRUE)
#
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.