upscale2d: Upscaling Neighborhood Verification on a 2-d Verification Set

View source: R/Hoods2d.R

upscale2dR Documentation

Upscaling Neighborhood Verification on a 2-d Verification Set

Description

Perform upscaling neighborhood verification on a 2-d verification set.

Usage

upscale2d(object, time.point = 1, obs = 1,
                 model = 1, levels = NULL, max.n = NULL, smooth.fun =
                 "hoods2dsmooth", smooth.params = NULL, rule = ">=",
                 verbose = FALSE)

## S3 method for class 'upscale2d'
plot(x, ... )

## S3 method for class 'upscale2d'
print(x, ...)

Arguments

object

list object of class “SpatialVx”.

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

character string giving the threshold rule to be applied. See help file for thresholder function for more information.

verbose

logical, should progress information be printed to the screen?

x

list object of class “upscale2d” as returned by upscale2d.

...

optional arguments to the image.plot function from package fields. Can also include the argument type, which must be one of “all”, “gss”, “ts”, “bias” or “rmse”.

Details

Upscaling is performed via neighborhood smoothing. Here, a boxcar kernel is convolved (using the convolution theorem with FFT's) to obtain an average over the nearest n^2 grid squares at each grid point. This is performed on the raw forecast and verification fields. The root mean square error (RMSE) is taken for each threshold (Yates et al., 2006; Ebert, 2008). Further, binary fields are obtained for each smoothed field via thresholding, and frequency bias, threat score ts) and equitable threat score (ets) are calculated (Zepeda-Arce et al., 2000; Ebert, 2008).

Value

upscale2d returns a list of class “upscale2d” with components:

rmse

numeric vector giving the root mean square error for each neighborhood size provided by object.

bias,ts,ets

numeric matrices giving the frequency bias, ts and ets for each neighborhood size (rows) and threshold (columns).

Author(s)

Eric Gilleland

References

Ebert, E. E. (2008) Fuzzy verification of high resolution gridded forecasts: A review and proposed framework. Meteorol. Appl., 15, 51–64. doi:10.1002/met.25

Yates, E., Anquetin, S., Ducrocq, V., Creutin, J.-D., Ricard, D. and Chancibault, K. (2006) Point and areal validation of forecast precipitation fields. Meteorol. Appl., 13, 1–20.

Zepeda-Arce, J., Foufoula-Georgiou, E., Droegemeier, K. K. (2000) Space-time rainfall organization and its role in validating quantitative precipitation forecasts. J. Geophys. Res., 105(D8), 10,129–10,146.

See Also

hoods2d, kernel2dsmooth, kernel2dmeitsjer, fft

Examples

x <- matrix( 0, 50, 50)
x[ sample(1:50,10), sample(1:50,10)] <- rexp( 100, 0.25)
y <- kernel2dsmooth( x, kernel.type="disk", r=6.5)
x <- kernel2dsmooth( x, kernel.type="gauss", nx=50, ny=50, sigma=3.5)

hold <- make.SpatialVx( x, y, thresholds = seq(0.01,1,,5), field.type = "random")

look <- upscale2d( hold, levels=c(1, 3, 20) )
look

par( mfrow = c(4, 2 ) )
plot( look )

## Not run: 
data( "geom001" )
data( "geom000" )
data( "ICPg240Locs" )

hold <- make.SpatialVx( geom000, geom001, thresholds = c(0.01, 50.01),
    loc = ICPg240Locs, projection = TRUE, map = TRUE, loc.byrow = TRUE,
    field.type = "Precipitation", units = "mm/h",
    data.name = "Geometric", obs.name = "geom000", model.name = "geom001" )

look <- upscale2d(hold, levels=c(1, 3, 9, 17, 33, 65, 129, 257),
    verbose=TRUE)

par( mfrow = c(4, 2 ) )

plot(look )
look <- upscale2d(hold, q.gt.zero=TRUE, verbose=TRUE)
plot(look)
look <- upscale2d(hold, verbose=TRUE)
plot(look)


## End(Not run)

SpatialVx documentation built on Nov. 10, 2022, 5:56 p.m.