Regridding Efficiently?

From: <Tom.Gross_at_nyahnyahspammersnyahnyah>
Date: Wed, 30 Aug 2006 14:17:06 -0400

Regridding is a common task and NCL has a dozen methods. But I can't
figure out how to do it
efficiently. I have 2-d arrays of longitude and latitude which are
messy curvilinear grids. I had to treat them as one-d scatter data
points, so I use nnpnt. Is there a way to save the spatial wieghts
which are used for the regridding so they don't have to be re-calculated
for each field inside my do loop:

do namtime = 0, dimtime-1

  itime=namtime+ifrctime
  out->frc_time(itime)=nam_time(namtime);

  nnpntinit( lon_nam1,lat_nam1,ndtooned(uwind(namtime,:,:)));
  uw= nnpnt(lon_rho1,lat_rho1);
  out->Uwind(itime,:,:) =doubletofloat(onedtond( uw, dimsrho))

  nnpntinit( lon_nam1,lat_nam1,ndtooned(vwind(namtime,:,:)));
  uw= nnpnt(lon_rho1,lat_rho1);
  out->Vwind(itime,:,:) =doubletofloat(onedtond( uw, dimsrho))
  
 end do

thanks,
Tom Gross

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Aug 30 2006 - 12:17:06 MDT

This archive was generated by hypermail 2.2.0 : Fri Sep 01 2006 - 09:10:57 MDT