comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Random problem with Delaunay triangulation
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Random problem with Delaunay triangulation [message #55826] Tue, 11 September 2007 11:39
wgallery is currently offline  wgallery
Messages: 32
Registered: December 1998
Member
I am interpolating satellite data (lat, lon, temperature) from a
irregular grid to a regular lat, lon grid using:

pro get_gridded_temp_image, ....
.
.
.
grid_lat=findgen(31)*2.0+30.0 ;30 to 90 deg @2 deg
grid_lon=findgen(181)*2.0 ;0 to 360 deg @2 deg
qhull, x, y, tri, /delaunay, sphere = s
temp_grid = griddata( x, y, z, /sphere, /deg, $
/grid, xout = grid_lon, yout = grid_lat, $
method = 'NaturalNeighbor', $
triangles=tri, $
missing = !values.f_nan)

where x,y are longitude, latitude, and z is temperature (patterned
after Example 5 in the IDL help for griddata.pro)

Usually this procedure works fine, over thousands of different cases.
However, today I tried it and got the error message:

GRIDDATA: Triangle 652 not in counterclockwise order.
Execution halted at: GET_GRIDDED_TEMP_IMAGE 184

The ranges of the input variables are (mve is a routine that prints
the stats on a variable):

IDL> mve,x
Variable type mean std dev minimum
maximum n_elements NaN or I
Float 178.55 102.79 0.070000
358.05 (529) = 529 0
IDL> mve,y
Variable type mean std dev minimum
maximum n_elements NaN or I
Float 54.660 19.100 20.340
82.930 (529) = 529 0
IDL> mve,z
Variable type mean std dev minimum
maximum n_elements NaN or I
Float 214.63 9.7416 192.56
233.31 (529) = 529 0
IDL> mve, tri
Variable type mean std dev minimum
maximum n_elements NaN or Inf
Longword integer 249.43 149.12 0.00000
528.00 (3,966) = 2898 0


Note: I tried the routine sph_scat which is also advertised to regrid
on a sphere. However, the interpolated values are way off scale:

IDL> r=sph_scat(x,y,z,bounds=[0,30.0,360,90],gs=[2,2],bout=bout)
IDL> mve,r
Variable type mean std dev minimum
maximum n_elements NaN or Inf
Double float 208.09 96.313 -480.31
869.93 (181,31) = 5611 0


Any suggestions on how to trouble shoot, fix?

Thanks,

Bill Gallery
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: How to determine the WEIGHTS in MPFITFUN for distribution function fit?
Next Topic: Ambiguous keyword abbreviation error

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 00:07:29 PDT 2025

Total time taken to generate the page: 0.32056 seconds