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

Home » Public Forums » archive » Re: GRIDDATA woes
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: GRIDDATA woes [message #59038 is a reply to message #59037] Tue, 04 March 2008 09:05 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Bill Gallery writes:

> Ben,
>
> 1. There is an error in your routine to generate longitude.
>
> ;;lon = FINDGEN(nLon)/(nLon-1) * PS[0] + lonRange[0]
> lon = fINDGEN(nLon) * PS[0] + lonRange[0]
>
> Otherwise, lon has only two unique points
>
> 2. Try using the first form of grid_data: without /sphere:
>
> ;filter and reorder the data
> ;;GRID_INPUT, lon, lat, zValue, xyz, newZ, /SPHERE, /DEGREES, EPSILON
> = PS[0]/2.0
> GRID_INPUT, lon, lat, zValue, x1, y1, newZ, /DEGREES, EPSILON = PS[0]/
> 2.0
>
> ;build the triangulation
> ;;QHULL, xyz[0,*], xyz[1,*], tr, /DELAUNAY
> QHULL, x1, y1, tr, /DELAUNAY
>
> ;interpolate
> ;;Z = GRIDDATA(xyz[0,*], xyz[1,*], newZ, /SPHERE,/DEGREES, $
> Z = GRIDDATA(x1, y1, newZ, /SPHERE,/DEGREES, $
> METHOD = "NaturalNeighbor", MISSING = !VALUES.F_NAN, $
> XOUT = oLon, YOUT = oLat, TRIANGLES = tr )
>
> You will no longer get the dreaded "Triangle 0 not in counterclockwise
> order" error.

Well, actually, I *did* still get the error. And I continued to
get it until I removed the SPHERE keyword from GRIDDATA, too.
Has anyone, anywhere, gotten spherical triangles to work on anything?

I don't know what to say about this in my article, except
not to ever use the SPHERE keyword if you expect to use
these routines successfully. Any ideas?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Speeding up a call to the where function
Next Topic: GRIDDATA woes

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

Current Time: Sun Oct 12 01:04:47 PDT 2025

Total time taken to generate the page: 1.75385 seconds