Re: station data / gridded data

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Mon, 17 Jul 2006 11:53:42 -0600

Hi Mike,

I believe you could do this:

temp = ringwidth
temp = ringwidth@_FillValue
do gg = 0,dimsizes(ringwidth&tsite)-1
    do hh = 0,dimsizes(ringwidth&time)-1
       temp(gg,hh) = (/ sfct(hh,{lat(gg)},{lon(gg)}) /)
    end do
end do

While do loops in NCL are inefficient, double or even triple do loops do
not cause that big of a time hit in most cases...
Adam

Michael Notaro wrote:
> I have 2180 tree ring sites with lat(0:2179) and lon(0:2179)
> and ringwidth(0:2179,0:99) for (site,time).
>
> I also have a gridded dataset with sfct(0:99,0:359,0:719)
> for (time,lat,lon) and lato(0:359) for the latitudes and lono(0:719)
> for the longitudes.
>
> For each tree ring site, I want to find within which lat/lon box in the
> gridded dataset that it lies and use that sfct. What is the
> fastest way to do this, avoiding too many do loops?
>
> Thanks,
> Mike
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
--------------------------------------------------------------
Adam Phillips			             asphilli_at_ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000	  http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jul 17 2006 - 11:53:42 MDT

This archive was generated by hypermail 2.2.0 : Mon Jul 17 2006 - 14:09:20 MDT