Re: Unable to get GRIDDATA Function to Work Properly [message #77214] |
Wed, 17 August 2011 04:40 |
Klemen
Messages: 80 Registered: July 2009
|
Member |
|
|
>> I haven't done it, but based on the help page I'd guess that you might
>> want to use /SPHERE and /DEGREE.
>
>> -Jeremy.
>
> Those seemed like reasonable suggestions, but unfortunately they did
> nothing for me =(
Ty it again. Use a combination of TRIANGULATE and GRIDDATA - an
example below (with a link to discussion about reprojection). But be
aware - this might be very slow if working with large datasets. If you
don't have many points to interploate it would make sense to select
the area around each point and use only the closest points for
interpolation. You can of course use also some other method instead
of /NEAREST_NEIGHBOR.
Cheers, Klemen
TRIANGULATE, lon, lat, trg, SPHERE=sphere, /DEGREES, FVALUE=testgrid
mygrid = GRIDDATA(lon, lat, m_testgrid, /SPHERE, /DEGREES, /
NEAREST_NEIGHBOR, TRIANGLES = trg, /GRID, XOUT=[-115.0], YOUT=[35.0])
http://groups.google.com/group/comp.lang.idl-pvwave/browse_t hread/thread/688e9587fa29ecb7/2f7820d787d6047f?hl=en&lnk =gst&q=#2f7820d787d6047f
|
|
|
Re: Unable to get GRIDDATA Function to Work Properly [message #77216 is a reply to message #77214] |
Tue, 16 August 2011 17:29  |
Jon
Messages: 4 Registered: April 2011
|
Junior Member |
|
|
On Aug 16, 10:32 am, Jeremy Bailin <astroco...@gmail.com> wrote:
> On 8/15/11 10:01 PM, Jon wrote:
>
>
>
>> Hello IDL'ers
>
>> I'm trying to do some interpolation with the GRIDDATA function.
>
>> I have a regular lon/lat grid spanning the globe, consisting of values
>> that are either 0 or 1. I am trying to interpolate these values to an
>> irregular lon/lat grid spanning much of the U.S.
>
>> Trouble is, no matter what I do, I cannot get the routine to give me a
>> 1, where they clearly should exist. For a simple example, on my global
>> grid, all points surrounding -115 W, 35 N are 1, but when I run (where
>> testGrid is my global grid):
>
>> myGrid = GRIDDATA(Lon, Lat, testGrid, /GRID, XOUT=[-115.0],
>> YOUT=[35.0])
>
>> I get a 0. Shouldn't this routine interpolate a value of 1 at this
>> point?
>
>> Thanks,
>> JonR
>
> I haven't done it, but based on the help page I'd guess that you might
> want to use /SPHERE and /DEGREE.
>
> -Jeremy.
Those seemed like reasonable suggestions, but unfortunately they did
nothing for me =(
|
|
|
Re: Unable to get GRIDDATA Function to Work Properly [message #77225 is a reply to message #77216] |
Tue, 16 August 2011 09:32  |
Jeremy Bailin
Messages: 618 Registered: April 2008
|
Senior Member |
|
|
On 8/15/11 10:01 PM, Jon wrote:
> Hello IDL'ers
>
> I'm trying to do some interpolation with the GRIDDATA function.
>
> I have a regular lon/lat grid spanning the globe, consisting of values
> that are either 0 or 1. I am trying to interpolate these values to an
> irregular lon/lat grid spanning much of the U.S.
>
> Trouble is, no matter what I do, I cannot get the routine to give me a
> 1, where they clearly should exist. For a simple example, on my global
> grid, all points surrounding -115 W, 35 N are 1, but when I run (where
> testGrid is my global grid):
>
> myGrid = GRIDDATA(Lon, Lat, testGrid, /GRID, XOUT=[-115.0],
> YOUT=[35.0])
>
> I get a 0. Shouldn't this routine interpolate a value of 1 at this
> point?
>
> Thanks,
> JonR
I haven't done it, but based on the help page I'd guess that you might
want to use /SPHERE and /DEGREE.
-Jeremy.
|
|
|