On Mar 4, 12:05 pm, David Fanning <n...@[EMAIL PROTECTED]
> 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/
> Se****e ma de ni thui. ("Perhaps thou speakest truth.")
My mistake: I removed /sphere everywhere except in the posted article.


|