Description Usage Arguments Value Note Author(s) See Also Examples
View source: R/ComprehensiveTemperatureGenerator.R
The Comprehensive Temperature Generator
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ComprehensiveTemperatureGenerator(station = c("T0001", "T0010", "T0099"),
Tx_all, Tn_all, mean_climate_Tn = NULL, mean_climate_Tx = NULL,
Tx_spline = NULL, Tn_spline = NULL, year_max = 1990,
year_min = 1961, leap = TRUE, nmonth = 12, verbose = TRUE,
p = 1, type = "none", lag.max = NULL, ic = "AIC",
activateVARselect = FALSE, year_max_sim = year_max,
year_min_sim = year_min, mean_climate_Tn_sim = NULL,
mean_climate_Tx_sim = NULL, Tn_spline_sim = NULL,
Tx_spline_sim = NULL, onlygeneration = FALSE, varmodel = NULL,
normalize = TRUE, type_quantile = 3, sample = NULL,
extremes = TRUE, option = 2, yearly = FALSE, yearly_sim = yearly,
n_GPCA_iteration = 0, n_GPCA_iteration_residuals = n_GPCA_iteration,
exogen = NULL, exogen_sim = exogen, is_exogen_gaussian = FALSE,
exogen_all = NULL, exogen_all_col = station, nscenario = 1,
seed = NULL, noise = NULL)
|
station |
see respective input parameter on |
Tx_all, Tn_all, mean_climate_Tn, mean_climate_Tx, Tx_spline, Tn_spline |
see respective input parameter on |
year_max, year_min, leap, nmonth, verbose |
see respective input parameter on |
p, type, lag.max, ic, activateVARselect |
see respective input parameter on |
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_Tn_sim |
monthly averaged daily minimum temperatures for the simulated scenario and used by the random generator . Default is |
mean_climate_Tx_sim |
monthly averaged daily maximum temperatures for the simulated scenario and used by the random generator . Default is |
Tn_spline_sim |
daily timeseries (from the first day of |
Tx_spline_sim |
daily timeseries (from the first day of |
onlygeneration |
logical variable. If |
varmodel |
the comprehensinve VAR model as a |
normalize, sample, extremes |
see |
type_quantile |
see |
option |
integer value. If 1, the generator works with minimun and maximum temperature, if 2 (default) it works with the average value between maximum and minimum temparature and the respective daily thermal range. |
yearly |
logical value. If |
yearly_sim |
logical value. If |
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) |
exogen |
data frame or matrix containing the (normalized or not) exogenous variables (predictors) for the recorded (calibration) period. Default is |
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 |
exogen_all |
data frame containing exogenous variable formatted like |
exogen_all_col |
vector of considered columns of |
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:
input
list of variables returned by setComprehensiveTemperatureGeneratorParameters
var
varest object containing the used VAR model (if useVAR is true), NULL
(otherwise)
output
list variables returned by generateTemperatureTimeseries
(i.e. generated timeseries)
It pre-processes series and generates multi-site temperature fields by using setComprehensiveTemperatureGeneratorParameters
,getVARmodel
and generateTemperatureTimeseries
. Detailed examples can be viewed of this function in this presentation.
Emanuele Cordano, Emanuele Eccel
setComprehensiveTemperatureGeneratorParameters
, generateTemperatureTimeseries
,generateTemperatureTimeseries
,splineInterpolateMonthlytoDailyforSeveralYears
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | data(trentino)
set.seed(1222) # set the seed for random generations!
year_min <- 1961
year_max <- 1990
year_min_sim <- 1982
year_max_sim <- 1983
n_GPCA_iter <- 5
n_GPCA_iteration_residuals <- 5
p <- 1
vstation <- c("B2440","B6130","B8570","B9100","LAVIO","POLSA","SMICH","T0001",
"T0010","T0014","T0018","T0032","T0064","T0083","T0090","T0092",
"T0094","T0099","T0102","T0110","T0129","T0139","T0147","T0149",
"T0152","T0157","T0168","T0179","T0189","T0193","T0204","T0210",
"T0211","T0327","T0367","T0373")
## Not Run: the call to ComprehensiveTemperatureGenerator 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 <-ComprehensiveTemperatureGenerator(station=vstation[16],
# Tx_all=TEMPERATURE_MAX,Tn_all=TEMPERATURE_MIN,year_min=year_min,year_max=year_max,
# p=p,n_GPCA_iteration=n_GPCA_iter,n_GPCA_iteration_residuals=n_GPCA_iteration_residuals,
# sample="monthly",year_min_sim=year_min_sim,year_max_sim=year_max_sim)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.