39 integer*4 :: i, nloc, nt
43 real*8 :: dist,dist_min
45 real*8,
dimension(nloc) :: xs, ys, zs
52 if (zs(i) .gt. elevation)
then
54 dist = dsqrt((xs(i) - xt)*(xs(i) - xt) + (ys(i) - yt)*(ys(i)
56 if (dist .lt. dist_min)
then
57 dist_min = dist; nt = i
subroutine get_nearest_node_pgm(nloc, xs, ys, zs, xt, yt, zt, nt, dist_min
Computes the nearest node with respet to (xt,yt,zt) starting from a given elevation.