[STATSGRASS] Re: spatial interpolation of rain data with few points

D G Rossiter stroink at twcny.rr.com
Mon Nov 10 07:47:24 EST 2003


Javier,

Your software error is probably because you don't have enough points to  
define the order of surface you want.  Remember, 3 points for a plane  
etc.

But on a more general note, I really wonder about interpolating from  
only four points!  There is just not enough data to support it.  IMHO  
the best you can do with 4 points is to use each one as the  
"representative" station of some region which you define based on  
physiography or other expert knowledge, delineating the region by hand.  
  Or if you want a mechanical solution, just create Theissen polygons  
(nearest neighbour). The resulting map in either case has a crisp  
boundary which of course is not realistic, but based on your state of  
knowledge, the most honest.

D. G. Rossiter
Department of Earth Systems Analysis
International Institute for Geo-Information Science and Earth  
Observation (ITC)
Hengelosestraat 99
PO Box 6, 7500 AA Enschede, The Netherlands
Phone:	+31-(0)53 4874 499
Fax:	+31-(0)53 4874 336
Mobile:  +31-(0)6 27 510 591
mailto:rossiter at itc.nl,  Internet: http://www.itc.nl/personal/rossiter


On Monday, November 10, 2003, at 11:01 AM,  
statsgrass-request at grass.itc.it wrote:

> Send statsgrass mailing list submissions to
> 	statsgrass at grass.itc.it
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://grass.itc.it/mailman/listinfo/statsgrass
> or, via email, send a message with subject or body 'help' to
> 	statsgrass-request at grass.itc.it
>
> You can reach the person managing the list at
> 	statsgrass-admin at grass.itc.it
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of statsgrass digest..."
>
>
> Today's Topics:
>
>    1. spatial interpolation of rain data with few points (javier  
> garcia - CEBAS)
>
> --__--__--
>
> Message: 1
> From: javier garcia - CEBAS <rn001 at cebas.csic.es>
> To: statsgrass at grass.itc.it
> Date: Mon, 10 Nov 2003 11:02:21 +0100
> Subject: [STATSGRASS] spatial interpolation of rain data with few  
> points
>
> Hi all,
>
> First of all, thanks all for your answer to a previous question
> (options(digits=n) is what I needed), and Roger B. for the description  
> of
> interpolation posibilities.
>
> But, about interpolation, I am having problems to get maps from a few  
> data
> points.
> I've got just four points representing rain gauged in four stations.
> I've tried to interpolate the values with the wrapper function  
> interp.new.G,
> in library(GRASS) of R, but there is an error because it seem that the
> minimum number of points should be 9.
> In the help I've found that the minimum is 4, not 9. (?):
>
> -----------------
> *** SDSF3P Error 1: NDP = 9 or less
>     MD =    1,  NDP =    4
> -----------------
>
> Could I change this minimum?
>
> In other way, I've tried to use another algorithm, to fit a trend  
> surface by
> least-squares, with library(spatial) and the function surf.ls.
> But there is also an errror (?):
> -------------------------
>> rainstations.s
>          east       north             id      str2
> 1 664304.8935 4227048.780  1   est7237
> 2 666504.8166 4215899.535  2   est7238
> 3 667467.0677 4217707.843  3   est7239
> 4 671555.4027 4230683.611  4   est7250
>> rain.tss
> Time Series:
> Start = 1
> End = 10
> Frequency = 1
>    est7237 est7238 est7239 est7250
>  1       0       0       0       0
>  2       0       0       0       0
>  3       0       0      17       0
>  4      47     103      78      73
>  5       0       0       0       0
>  6      35      40      34      82
>> library(spatial)
>> rain.kr <- as.list(x <- 0)
>> rain.maps <- as.list(x <- 0)
>> G$xlim
> [1] 651700 679700
>> G$ylim
> [1] 4214100 4242100
>> G$Nrow
> [1] 280
>> for (i in 1:end(rain.tss)[1]){
> rain.kr[[i]] <-
> surf.ls(2,rainstations.s$east,rainstations.s$north,rain.tss[i,])
> rain.maps[[i]] <-
> trmat(rain.kr[[i]],G$xlim[1],G$xlim[2],G$ylim[1],G$ylim[2],G$Nrow)
> }
>
> The answer to this is:
> Error in .trval(object, x, y) : NA/NaN/Inf in foreign function call  
> (arg 5)
> ----------------------------------
> I've also tried to find out the source of this error, but I can't find  
> it.
> Perhaps also the limited number of points?
>
> I guess you have realized I'm pretty new with R. In any case. I'm  
> stuck here.
> I must say that I've been able to resolve this, at last, sending the  
> points
> to GRASS and making the interpolation with s.to.rast, and although  
> there are
> some warning, I think that the result is satisfactory:
> ------------------------
>> sites.put2(G,data=rain.tss.temp,lname=paste("rain.map",i,sep=""),dims= 
>> c("east","north"),check=FALSE)
>> system(paste("s.surf.rst input=rain.map",i," maskmap=MASK npmin=4  
>> segmax=8
> elev=rain.map.temp",i,sep=""))
>> system(paste("r.mapcalc 'rain.map",i," =
> if(rain.map.temp",i,"<0,0,rain.map.temp",i,")'",sep=""))
> system(paste("g.remove rast=rain.map.temp",i,sep=""))
> ------------------------------------------------------------
> But as I haen't got much expertise in this field, I'm not sure if this  
> is a
> good method for this, nor can find out how to resolve the problems in  
> R.
>
> Could any of you, please, advise me about what method, included in R,  
> could I
> use with these little amount of points,
> or give me any hint about the source of these errors?
>
> Perhaps you know any references about analysis of rain event ? (I have  
> time
> series in four rain stations and perhaps there is some method to  
> analyse, not
> only spatial interpolation for every timestep, but also the movement  
> or the
> rain event considering the position of rain stations and desplacement  
> in time
> series)
>
> Any answer to any of the questions will be very good for me.
>
> Thanks all, and best wishes
>
> Javier Garcia
>
>
>
> --__--__--
>
> _______________________________________________
> statsgrass mailing list
> statsgrass at grass.itc.it
> http://grass.itc.it/mailman/listinfo/statsgrass
>
>
> End of statsgrass Digest
>
>




More information about the grass-stats mailing list