sidfex.evaluate.subset: Recompute Multi-Forecast Statistics for a Subset of Evaluated...

sidfex.evaluate.subsetR Documentation

Recompute Multi-Forecast Statistics for a Subset of Evaluated SIDFEx Forecasts

Description

Recompute multi-forecast statistics for a subset of already evaluated SIDFEx forecasts (various types of errors relative to observations and, if applicable, ensemble spread).

Usage

sidfex.evaluate.subset(eval.res = NULL, keep = NULL, do.multifcst.stats = TRUE, multifcst.stats.na.rm = TRUE)

Arguments

eval.res

a list with SIDFEx evaluation results as returned by sidfex.evaluate.

keep

a numeric vector with indices (length >= 2 and <= length(eval.res$res.list)) or a logical vector (length = length(eval.res$res.list)) specifying the subset of forecasts for which to recompute the multi-forecast statistics.

do.multifcst.stats

a logical value specifying whether statistics across all elements of fcst$res.list shall be computed. Will result in an error if the elements of eval.res$res.list do not have identical numbers of time steps. If FALSE, the subset of individual evaluation results is just extracted. See documentation of sidfex.evaluate for details.

multifcst.stats.na.rm

a logical value specifying whether to remove NAs before statistics are computed across forecast elements.

Value

a list with elements ens.merge (inherited from eval.res), evaluate.arguments (to document the logical values specified for do.speedangle (inherited from eval.res) 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.

See sidfex.evaluate for details, including all error types.

Note

Based on several spheRlab and SIDFEx functions.

Author(s)

Helge Goessling

See Also

sidfex.evaluate, sidfex.read.fcst, sidfex.read.obs

Examples

# 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)

helgegoessling/SIDFEx documentation built on March 15, 2024, 2:26 p.m.