| sidfex.evaluate | R Documentation |
Compute various types of errors of SIDFEx forecasts relative to observations and, if applicable, ensemble spread.
sidfex.evaluate(obs = NULL, fcst, do.speedangle = TRUE, ens.stats.na.rm = TRUE, do.multifcst.stats = TRUE, multifcst.stats.na.rm = TRUE, data.path = NULL, verbose = TRUE)
obs |
a list with SIDFEx observations as returned by |
fcst |
a list with SIDFEx forecasts as returned by |
do.speedangle |
a logical value specifying whether relative speed and angle errors shall be computed in addition to great-circle distance and lon-lat errors. |
ens.stats.na.rm |
a logical value specifying whether to remove NAs before statistics are computed across ensemble members. |
do.multifcst.stats |
a logical value specifying whether statistics across all elements of |
multifcst.stats.na.rm |
a logical value specifying whether to remove NAs before statistics are computed across forecast elements. |
data.path |
|
verbose |
a logical value specifying whether to produce warnings in |
If fcst is a list with SIDFEx forecasts as returned by sidfex.read.fcst, the return value is a list with elements ens.merge (inherited from fcst), evaluate.arguments (to document the logical values specified for do.speedangle and do.multifcst.stats), res.list, and optionally multifcst.stats if do.multifcst.stats=TRUE and length(fcst$res.list)>1. The element res.list holds one element for each corresponding element in fcst$res.list, with various types of forecast errors listed below. If fcst is a single forecast element, only a single list with the types of forecast errors is returned.
Forecast errors are computed for all Nts timesteps in fcst and, if the respective element of fcst is an ensemble, for all Nens ensemble members individually. If provided, multifcst.stats has four elements per element of res.list (except results for individual members) with the mean, st.dev (standard deviation), st.err (standard error), and median across the elements of res.list.
The errors provided are listed in the following. Those with 'individual' or 'spread' in their names are provided only for forecast elements composed of an ensemble.
ens.mean.gc.dist |
a numeric vector of length |
ens.mean.lat.err |
a numeric vector of length |
ens.mean.lon.err |
a numeric vector of length |
ens.individual.gc.dist |
an |
ens.individual.lat.err |
an |
ens.individual.lon.err |
an |
ens.individual.gc.dist.mean |
a numeric vector of length |
ens.individual.lat.err.mean |
a numeric vector of length |
ens.individual.lat.err.meanabs |
a numeric vector of length |
ens.individual.lon.err.mean |
a numeric vector of length |
ens.individual.lon.err.meanabs |
a numeric vector of length |
ens.spread.gc.dist |
a numeric vector of length |
ens.spread.lat |
a numeric vector of length |
ens.spread.lon |
a numeric vector of length |
If do.speedangle, additionally the following types are included:
ens.mean.relspeed |
a numeric vector of length |
ens.mean.angle |
a numeric vector of length |
ens.individual.relspeed |
an |
ens.individual.angle |
an |
ens.individual.relspeed.mean |
a numeric vector of length |
ens.individual.angle.mean |
a numeric vector of length |
ens.individual.angle.meanabs |
a numeric vector of length |
Based on several spheRlab and SIDFEx functions.
To recompute multi-forecast statistics for a subset of the forecasts already evaluated with sidfex.evaluate (this function), use sidfex.evaluate.subset afterwards.
Helge Goessling
sidfex.read.fcst, sidfex.read.obs, sidfex.evaluate.subset
# Load the forecast data index
index = sidfex.load.index()
# Select a subset containing one specific forecast ensemble
subind = sidfex.fcst.search.extractFromTable(gid = "ecmwf001" , tid = "300234063991680", iy = 2019, idoy = c(1,65))
# Read the forecasts
fcst = sidfex.read.fcst(subind)
# Remap these seasonal-range forecasts to the first ten days only
fcst.remapped = sidfex.remaptime.fcst(fcst,newtime.DaysLeadTime=0:10)
# Compute forecast errors
errs = sidfex.evaluate(fcst = fcst.remapped)
# Show structure of errs
str(errs)
# Recompute multi-forecast statistics for small subset of forecasts
errs.sub = sidfex.evaluate.subset(eval.res = errs, keep = c(1,3))
# Show structure of errs.sub
str(errs.sub)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.