Learn R Programming

SpatialVx (version 0.1-5)

saller: Analyze Features in a Field (Image)

Description

Functions to analyze features in a field (image) in conjunction, e.g., with the FeatureSuite function.

Usage

saller(x, object, y = NULL, matches = NULL, d = NULL)

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

Arguments

x
For saller x is a list object returned by convthresh or other feature identification function that returns a list with components X.feats, Y.feats (themselves lists with owin class objects d
object
A list object of class FeatureSuitePrep as returned by FeatureSuitePrep providing information about the original fields. In the case of the summary method function, this is the returned object from saller<
y
(optional) if not NULL, it is used instead of x, and otherwise has the same stucture thereof. When used with FeatureSuite, one might want to merge objects in one or both fields before calling the analysis function. If so,
matches
Not used by saller function. If matching of features between fields is required, this will be a two-column matrix describing which features from the forecast (first column) match to those of the verificaiton field (second column).
d
(optional) the SAL (saller) method requires division by the longest distance between two border points. If NULL, this is taken to be simply the length of the longest side.
...
not used.

Value

  • saller returns a list with components:
  • Anumeric giving the amplitude component.
  • Lnumeric giving the lcoation component.
  • Snumeric giving the structure component.
  • the summary method function does not return anything.

Details

saller: Computes S, A, and L of the SAL method introduced by Wernli et al. (2008).

References

Wernli, H., Paulat, M., Hagen, M. and Frei, C. (2008) SAL--A novel quality measure for the verification of quantitative precipitation forecasts. Mon. Wea. Rev., 136, 4470--4487, doi:10.1175/2008MWR2415.1.

See Also

FeatureSuite, centroid.owin, connected, tiles, tess, deltamm

Examples

Run this code
data(ExampleSpatialVxSet)

x <- ExampleSpatialVxSet$vx
xhat <- ExampleSpatialVxSet$fcst

q <- mean( c(c(x[x>0]),c(xhat[xhat>0])), na.rm=TRUE)

hold <- FeatureSuitePrep("xhat", "x")
hold2 <- convthresh(hold, smoothpar=5, thresh=q)

N <- max(c(length(hold2$X.feats), length(hold2$Y.feats)), na.rm=TRUE)
par(mfrow=c(1,2))
image.plot(hold2$X.labeled, col=c("grey", rainbow(N)), zlim=c(0,N))
image.plot(hold2$Y.labeled, col=c("grey", rainbow(N)), zlim=c(0,N))

look <- saller(hold2, hold)   
summary(look)

data(pert000)
data(pert004)
hold <- FeatureSuitePrep("pert004", "pert000")
look <- convthresh( hold, smoothpar=10.5)
summary(look)
par( mfrow=c(1,2))
zl <- range(c(c(look$X.labeled),c(look$Y.labeled)),finite=TRUE)
image.plot(look$X.labeled, zlim=zl)
image.plot(look$Y.labeled, zlim=zl)

look2 <- deltamm( look, verbose=TRUE)
image.plot(look2$X.labeled)
image.plot(look2$Y.labeled)

Run the code above in your browser using DataLab