The Multivariate Environmental Similarity Surfaces (MESS) is an index that represents how similar a point in space is to a reference set of points, with respect to a set of predictor variables (Elith et al 2010). The function was first implemented as part of the Maxent software package, and is also available in the dismo package for R (see also here and here).
The latter works well on small and medium sized data sets. However, they take a long time to run on larger data sets, e.g., when working with 1km² raster grids covering eastern Africa. I therefore wrote a small R script to compute MESS in GRASS GIS. It uses R for part of the computations, but leaves the more demanding computations to GRASS. It should therefore be better able to handle large or very large raster layers.
As an exercise in writing add-ons for GRASS GIS, I decided to try to convert the script as a GRASS add-on. Quite an useful exercise as it did teach me some new things about bash scripting, about the limitations and possibilities of various GRASS modules and about integrating R and GRASS scripts. Oh, and that it really pays off asking questions on the GRASS-dev email list.
I might work on it a bit more at a later stage, I am sure there is a lot to improve, but by and large it works for me now (on Linux, I haven’t tested it on Windows). You can get the latest version from the GRASS add-ons SNV, see here. You can also find more information on my webpage here.
Reference:Elith J., Kearney M., & Phillips S. 2010. The art of modelling range-shifting species. Met. Ecol. Evol 1 :330-342. Free copy available here.