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 #59036 is a reply to message #59035] Tue, 04 March 2008 09:43 Go to previous messageGo to previous message
wgallery is currently offline  wgallery
Messages: 32
Registered: December 1998
Member
On Mar 4, 12:05 pm, David Fanning <n...@dfanning.com> wrote:
> 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.")

My mistake: I removed /sphere everywhere except in the posted article.
[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 13:09:35 PDT 2025

Total time taken to generate the page: 0.79823 seconds