problem in using natgrid_Wrap ...

From: Ufuk Utku Turuncoglu (BE) <u.utku.turuncoglu_at_nyahnyahspammersnyahnyah>
Date: Sun Feb 26 2012 - 07:24:35 MST

Hi,

I try to interpolate observational data into a regular lat-lon grid but
the code which is attached at the end of the mail gives error like,

fatal:Coordinate variables must be the same dimension as their dimension
fatal:No coordinate variable exists for dimension (y) in variable (fo)
fatal:Execute: Error occurred at or near line 6098 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl

fatal:Execute: Error occurred at or near line 213 in file wod_gridded.ncl

in the line of "natgrid_Wrap" call. Is it necessary to define coordinate
dimension for variable zo? Any suggestion would be helpful.

Regards,

--ufuk

--- CODE PART ---

   ;--- interpolate observations into grid ---
   do m = 0, 11
     do k = 0, nlev-1
       dum1 = ndtooned(temp(m,k,:,:))
       ind1 = ind(.not.ismissing(dum1))
       ind2 = ind_resolve(ind1, dimsizes(temp(m,k,:,:)))
       zo = dum1(ind1)
       xo = lon(ind2(:,1))
       yo = lat(ind2(:,0))
       dum2 = natgrid_Wrap(xo, yo, zo, lon, lat)
       salt(m,k,:,:) = dum2(lat|:,lon|:)
       ;--- delete variables ---
       delete(dum1)
       delete(dum2)
       delete(ind1)
       delete(ind2)
       delete(xo)
       delete(yo)
       delete(zo)
     end do
   end do

-----------------
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Feb 26 07:24:48 2012

This archive was generated by hypermail 2.1.8 : Mon Mar 05 2012 - 14:12:07 MST