Description Usage Arguments Details Value Note Author(s) References See Also Examples
Calculate the contiguous rain area (CRA) for matched features.
1 2 3 4 5 
x 

type 
character string that must be one of “regular” or “fast”. See details section for more information. 
rotate 
logical, should the features also be rotated into alignement (in addition to their being translated)? 
loss 
character string naming a function to calculate the loss function when using 
loss.args 
list object with optional arguments for 
interp 
character string naming the interpolation method used in calls to 
method 
character string naming the numerical optimization method to use (see 
stages 
logical, if 
verbose 
logical, should progress information be printed to the screen? 
... 
Optional arguments to 
The contiguous rain area (CRA) spatial verification method was first introduced by Ebert and McBride (2000). After identifying features and matching them across fields using your favorite feature identification and feature matching functions, the method attempts to find an optimal rigid transformation between the matched features, and then applies the mean square error (MSE) breakdown given by:
MSE( total ) = MSE( displacement ) + MSE( volume ) + MSE( pattern ),
where MSE( displacement ) = MSE( total )  MSE( shifted ), and MSE( shifted ) is the MSE between the rigidly transformed forecast field and the observed one. MSE( volume ) is the squared bias (differences in means) between the rigidly transformed forecast and the observed field. MSE( pattern ) is the difference between MSE( shift ) and MSE( volume ). In the case of rotations with stages
= FALSE, these values are the same, but the displacement also incorporates the rotation. It is more complicated if this argument is TRUE. In this case, the values are as with its being FALSE, but some additional MSE breakdowns are given for the translation only situation, but MSE( volume ) and MSE( pattern ) are based on the translation and rotation together.
Finding the optimal rigid transformation between two features can be difficult. Two options are supplied here. The first (type
= “regular”) attempts to find the optimal rigid transformation according to a given loss function via numerical optimization of the loss function. The second (type
= “fast”) uses the image moments to find the distance between feature centroids (as the optimal translation) and difference between feature major axis angles (as the optimal rotation).
In general, Ebert and McBride (2000) only considered translations (not rotations), and it is unclear whether or not the addition of rotations is worthwhile.
Returns a matrix of class “craered” with named columns specifying the results for each feature match in the order they were supplied via the “matched” list object.
The rigid transformation is performed by the rigider
function, which is experimental at this stage in the game.
Eric Gilleland
Ebert, E. E. and McBride, J. L. (2000) Verification of precipitation in weather systems: determination of systematic errors. J. Hydrology, 239, 179–202.
Feature identification function: FeatureFinder
For some feature matching functions, see:
centmatch
, deltamm
, minboundmatch
For finding the optimal rigid transformations:
For rigidly transforming a field: rigidTransform
Twodimensional interpolation (useful because the transformations typically do not map exactly to a grid square):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37  x < y < matrix(0, 100, 100)
x[2:3,c(3:6, 8:10)] < 1
y[c(4:7, 9:10),c(7:9, 11:12)] < 1
x[30:50,45:65] < 1
y[c(22:24, 99:100),c(50:52, 99:100)] < 1
hold < make.SpatialVx( x, y, field.type = "contrived", units = "none",
data.name = "Example", obs.name = "x", model.name = "y" )
look < FeatureFinder(hold, smoothpar=0.5)
look2 < minboundmatch( look, type = "multiple", mindist = 20 )
look2 < MergeForce( look2 )
craer( look2, type = "fast", verbose = TRUE)
## Not run:
data( "pert000" )
data( "pert004" )
data( "ICPg240Locs" )
hold < make.SpatialVx( pert000, pert004,
loc = ICPg240Locs, projection = TRUE, map = TRUE, loc.byrow = TRUE,
field.type = "Precipitation", units = "mm/h",
data.name = "ICP Perturbed Cases", obs.name = "pert000",
model.name = "pert004" )
look < FeatureFinder(hold, smoothpar=10.5, thresh = 5)
plot(look)
look2 < minboundmatch(look, verbose = TRUE)
plot(look2)
craer( look2 )
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.