Iago, The file to alter would be sem.c.
Maybe the output of a variogram cloud will be usefull to you: if you set the interval width to 0.0, gstat will calculate it for you. It reports distances for each point pair, separated up to the cutoff distance. Calculating distance standard deviations for classes, e.g. 0-100, 100-200, ..., 1500-1600 is a oneliner in S, given the distance vector d: > sqrt(sapply(split(d,seq(0,1600,100)),var)) 0 100 200 300 400 500 600 700 394.9884 394.3466 404.3336 409.8616 412.9203 405.2564 402.5049 410.8503 800 900 1000 1100 1200 1300 1400 1500 413.1563 404.7538 404.0039 401.1995 407.4277 407.1574 421.2969 406.9478 1600 404.9704 Best regards, -- Edzer