Re: loop optimization

From: Dennis Shea (shea AT XXXXXX)
Date: Fri Aug 27 2004 - 12:14:35 MDT


>
>I would like to optimize the following loop:
>
>sfc = new((/399,399/),float)
>do i=0,ix
> do j=0,iy
> sfc(i,j) = zin(minind(sqrt((lon(i,j)-xin)^2+(lat(i,j)-yin)^2)))
> end do
>end do
>
>xin, yin and zin are large 1d arrays. I have tried working on full 3d
>arrays using conform, but then I run out of memory.
>

Would the built-in function "triple2grid" work

  slp = triple2grid(xin,yin,zin, lon,lat, False)

_______________________________________________
ncl-talk mailing list
ncl-talk AT ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Fri Aug 27 2004 - 14:24:44 MDT