Description Usage Arguments Details Value Author(s) Examples
EITrans::EITrans is the main function for ensemble forecast calibration with the empirical inverse transform function method.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | EITrans(
ens,
ens_times,
ens_flts,
ens_times_train,
ens_times_test,
obs,
deltas,
infinity_estimators,
multipliers,
circular_ens = F,
pre_sorted = F,
save_intermediate = F,
optimize_lead_time = F
)
|
ens |
A 4-dimensional array for ensemble forecasts. Dimensions should be
|
ens_times |
A vector for ensemble forecast times. |
ens_flts |
A vector for ensemble forecast lead times. |
ens_times_train |
Training times from the ensemble forecast times. |
ens_times_test |
Testing times from the ensemble forecast times. |
obs |
A 3-dimensional array for observations that correspond to the
ensemble forecasts. Dimensions should be |
deltas |
A vector of deltas to experiment. It can also be a list with
|
infinity_estimators |
A vector of values to experiment for estimating
the ensemble spread. Or a list with named members |
multipliers |
A vector of values to experiment for adjusting the ensemble member offset. |
circular_ens |
Whether the ensemble forecast variable is circular. |
pre_sorted |
Whether the ensemble members are presorted. |
save_intermediate |
Whether to save intermediate data. |
optimize_lead_time |
Whether to calibrate each forecast lead time respectively. Theoretically, this would lead to better calibration results, but also significantly more computation because calibration needs to be evaluated per lead time. |
This function uses foreach
parallel mechanism. Parallelization is handled
by users creating the parallel backend. Please see examples. It is recommended
to use doSNOW
for handling the parallel backend.
A list with the calibrated ensemble forecasts and intermediate results.
Weiming Hu weiming@psu.edu
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 30 | ## Not run:
# Use doSNOW to launch parallel backend
library(doSNOW)
cl <- snow::makeCluster(4) # Use 4 cores
registerDoSNOW(cl)
# If you know a host file, you can also launch on remote server
nodefile <- Sys.getenv("PBS_NODEFILE")
nodes <- readLines(nodefile)
cl <- makeCluster(nodes, type = "SOCK")
registerDoSNOW(cl)
eitrans_results <- EITrans(
ens = ens$analogs,
ens_times = ens$test_times,
ens_flts = ens$flts,
ens_times_train = ens$test_times[1:(test_start - 366)],
ens_times_test = ens$test_times[test_start:test_end],
obs = ens$obs_aligned,
deltas = seq(-0.02, 0.044, by = 0.002),
infinity_estimators = seq(0.1, 0.5, by = 0.1),
multipliers = seq(0.1, 1.1, by = 0.1))
# If you are using doSNOW
stopCluster(cl)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.