waveIS: Intensity Scale (IS) Verification

View source: R/waveIS.R

waveISR Documentation

Intensity Scale (IS) Verification

Description

Intensity Scale (IS) verification based on Casat et al (2004) and Casati (2010).

Usage

waveIS(x, th = NULL, J = NULL, wavelet.type = "haar", levels
                 = NULL, max.n = NULL, smooth.fun = "hoods2dsmooth",
                 smooth.params = NULL, rule = ">=", verbose = FALSE,
                 ...)

## S3 method for class 'SpatialVx'
waveIS(x, th = NULL, J = NULL, wavelet.type = "haar", levels
                 = NULL, max.n = NULL, smooth.fun = "hoods2dsmooth",
                 smooth.params = NULL, rule = ">=", verbose = FALSE,
                 ..., time.point = 1, obs = 1, model = 1 )

## Default S3 method:
waveIS(x, th = NULL, J = NULL, wavelet.type = "haar", levels
                 = NULL, max.n = NULL, smooth.fun = "hoods2dsmooth",
                 smooth.params = NULL, rule = ">=", verbose = FALSE,
                 ...)

## S3 method for class 'waveIS'
plot(x, main1 = "X", main2 = "Y",
    which.plots = c("all", "mse", "ss", "energy"),
    level.label = NULL, ...)

## S3 method for class 'waveIS'
summary(object, ...)

Arguments

x

For waveIS either a list object of class “SpatialVx”, a two-component list giving the two fields to be compared (the verification field is assumed to be the first one) or a named list with components “X” and “Xhat” giving the two fields to be compared. list object returned by waveIS.

object

list object returned by waveIS.

main1, main2

character giving labels for the plots where main1 refers to the verification field and main2 to the forecast field.

which.plots

character vector naming one or more specific plots to do.

level.label

optional character vector to use for level names on the plot(s).

J

numeric integer giving the number of levels to use. If NULL and the field is dyadic, this will be log2(min(dim(X))), where X is a field from the verification set. If NULL and the field is not dyadic, then J is set equal to 4. Note that if the fields are not dyadic, the function will be much slower.

wavelet.type

character giving the name of the wavelet type to use as accepted by dwt.2d and modwt.2d.

th

list object with named components “X” and “Xhat” giving the thresholds to use for each field. If null, taken from teh thresholds attribute for “SpatialVx” objects.

time.point

numeric or character indicating which time point from the “SpatialVx” verification set to select for analysis.

obs, model

numeric indicating which observation/forecast model to select for the analysis.

levels

numeric vector giving the successive values of the smoothing parameter. For example, for the default method, these are the neighborhood lengths over which the levels^2 nearest neighbors are averaged for each point. Values should make sense for the specific smoothing function. For example, for the default method, these should be odd integers.

max.n

(optional) single numeric giving the maximum neighborhood length to use. Only used if levels are NULL.

smooth.fun

character giving the name of a smoothing function to be applied. Default is an average over the n^2 nearest neighbors, where n is taken to be each value of the levels argument.

smooth.params

list object containing any optional arguments to smooth.fun. Use NULL if none.

rule

If type is “binary”, return 0 when the rule applied to a grid point's value is not true in relation to the threshold value, and 1 elsewhere. If type is “replace.below”, then return replace.with wherever the rule is not true and return the original value otherwise. By default, it replaces values below the threshold with zero (hence its name), but if rule is, e.g., “<=”, then it will replace values above with zero; or whatever value is chosen for replace.with.

verbose

logical, should progress information be printed to the screen?

...

Not used by waveIS (or its method functions) or plot.waveIS. Only sort of used by summary.waveIS. One can put the argument silent=TRUE so that nothing is printed to the screen (useful if you just want the values calculated and stored without writing to the screen).

Details

This function applies various statistics to the detail fields (in wavelet space) of a discrete wavelet decomposition (DWT) of the binary error fields for a verification set. In particular, the statistics described in Casati et al (2004) and Casati (2010) are calculated. This function depends on the waverify2d or mowaverify2d function (depending on whether the fields are dyadic or not, resp.), which themselves depend on the dwt.2d and idwt.2d or modwt.2d and imodwt.2d functions.

See the references herein and the help files and references therein for dwt.2d and modwt.2d for more information on this approach, as well as Percival and Guttorp (1994) and Lindsay et al. (1996).

Value

A list object of class “waveIS” that contains the entire prep object passed in by obj, as well as additional components:

EnVx, EnFcst

J by q matrices giving the energy for the verification and forecast fields, resp., for each threshold (columns) and scale (rows).

MSE, SS

J by q matrices giving the mean square error and IS skill score for each threshold (column) and scale (rows).

Bias

numeric vector of length q giving the frequency bias of the original fields for each threshold.

plot.waveIS does not return any value. A plot is created on the current graphic device. summary.waveIS returns a list invisibly with the same components as returned by waveIS along with extra components:

MSEu, SSu, EnVx.u, EnFcst.u

length q numeric vectors giving the MSE, SS, and Vx and Fcst energy for each threshold (i.e., ignoring the wavelet decomposition).

MSEperc, EnVx.perc, EnFcst.perc

J by q numeric matrices giving percentage form of MSE, Vx Energy and Fcst Energy values, resp.

EnRelDiff

J by q numeric matrix giving the energy relative difference.

Author(s)

Eric Gilleland

References

Casati, B., Ross, G. and Stephenson, D. B. (2004) A new intensity-scale approach for the verification of spatial precipitation forecasts. Meteorol. Appl. 11, 141–154.

Casati, B. (2010) New Developments of the Intensity-Scale Technique within the Spatial Verification Methods Inter-Comparison Project. Wea. Forecasting 25, (1), 113–143, doi:10.1175/2009WAF2222257.1.

Lindsay, R. W., Percival, D. B. and Rothrock, D. A. (1996) The discrete wavelet transform and the scale analysis of the surface properties of sea ice. IEEE Transactions on Geoscience and Remote Sensing, 34 (3), 771–787.

Percival, D. B. and Guttorp, P. (1994) Long-memory processes, the Allan variance and wavelets. In Wavelets in Geophysics, Foufoula-Georgiou, E. and Kumar, P., Eds., New York: Academic, 325–343.

See Also

IS, int.scale.verify from package verification,

dwt.2d, modwt.2d, idwt.2d, imodwt.2d, hoods2d

thresholder

Examples

data( "UKobs6" )
data( "UKfcst6" )
data( "UKloc" )

hold <- make.SpatialVx( UKobs6, UKfcst6,
    thresholds = c(0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50),
    loc = UKloc, map = TRUE, field.type = "Rainfall", units = "mm/h",
    data.name = "Nimrod", obs.name = "UKobs6", model.name = "UKfcst6" )

look <- waveIS(hold, J=8, levels=2^(8-1:8), verbose=TRUE)
plot(look, which.plots="mse") 
plot(look, which.plots="ss")
plot(look, which.plots="energy")
summary(look)


SpatialVx documentation built on May 29, 2024, 9:31 a.m.