subroutine chleng(x,y,n) * ******************************************************** * check the equal-distanced condition between neighbouring * points by calculating the deviation from the mean * ******************************************************** integer n,j double precision x(0:8192),y(0:8192),dist(8192) double precision h,hp,err,ave common/gridsz/h,hp ave = 0.D0 err = 0.D0 do 10 j=1,n dist(j) = dsqrt( (x(j)-x(j-1))**2 + + (y(j)-y(j-1))**2 ) ave = ave + dist(j) 10 continue ave = ave*h do 20 j=1,n err = err + (dist(j)-ave)**2 20 continue err = dsqrt(err*h) print *,'equal distance error = ',err end