R 101: use help() or ? to access the documentation. In this Notebook, you can also click on a bit of code and hit shift + tab.
As an example, try ?help to learn about the help function

You can find the full documentation here http://cran.r-project.org/web/packages/SpatialVx/SpatialVx.pdf. There is also an extended Tutorial by Eric Gilleland, which can be found here http://dx.doi.org/10.5065/4px3-5a05 .

R objects can be saved with save() and loaded with load(). Let's load some forecasts and observations!

Neighbourhood Verification: FSS

To try out the spatial verification methods, first put the data into a SpatialVx object:

Try out the neighbourhood verification, for example FSS. The thresholds were already set when we created the object, now just select the neighbourhood sizes (smoothing levels) and check out the results.

Dashed lines show the scores for a uniform forecast, dotted lines correspond to a random forecast.

Try out other models, or time steps, or neighbourhood sizes if you want.

Feature-based verification: SAL

https://doi.org/10.1175/2008MWR2415.1 , https://doi.org/10.1175/2009WAF2222271.1

First, let us try to find some features:

Features are detected by

  1. Smoothing the fields with a convolution Kernel
  2. Applying a threshold
  3. Finding connected regions above the threshold
  4. Discarding objects with fewer than min.size grid points

You can play with the threshold, min.size, and the smoothing strength (kernel size) smoothpar. Next, let us compute the SAL scores.

S and A range from $-2$ to $2$, the location score is in $[0,2]$. The scores indicate that the forecast is far too small-scaled or peaked ($S<<0$) and somewhat underestimates the amplitude. The location is apparently quite good, but this score is often not very informative for large domains with several discrete objects.

Try verifying a different forecast for this day, or look at another day.

Scale-separation: ISS

https://doi.org/10.1017/S1350482704001239

Careful though, for this score it makes a big difference whether your data was $2^n \times 2^n$ or not! Let's try it out.

Field deformation: Optical Flow following Keil & Craig 2009

Find a vector field that transports the predicted precipitation to the observed locations. Here, we use my implementation of the Pyramid matching algorithm used by the Displacement and Amplitude score (https://doi.org/10.1175/2009WAF2222247.1) .

Apart from some artifacts, the algorithm has smoothly shifted some of the misplaced precipitation to the observed locations. Let us look at the output of the function:

How much did each pixel move?

We could also look at the reverse problem of deforming the observation to the predicted locations:

Distance measures

For example https://doi.org/10.1175/WAF-D-10-05061.1

Scores can be computed based on the difference in these distance maps:

Careful, results could be sensitive to small features in otherwise empty regions.