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

Home » Public Forums » archive » Interpolation/gridding on a sphere?
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: interpolation/gridding [message #59366 is a reply to message #4672] Thu, 20 March 2008 08:54 Go to previous messageGo to previous message
Spon is currently offline  Spon
Messages: 178
Registered: September 2007
Senior Member
On Mar 20, 12:20 pm, kishore1...@gmail.com wrote:
> On Mar 20, 5:45 am, wfz...@bjmb.gov.cn wrote:
>
>
>
>> On 3月20日, 上午4时36分, kishore1...@gmail.com wrote:
>
>>> Hi,
>
>>> I need some help about the IDL interpolation or gridding function.
>>> I have two data sets, both data sets are longitude x latitude wise in
>>> this one is regular and another is irregular wise. I will give example
>>> then you will get clear idea about my problem.
>
>>> Data1: irregular data1 set
>>> longitude1=[10.5,21.4,0.51,170.45,.......]= 600 points
>>> latitude1=[12.5,0.2,12.2,-10.2,-5.5,.......]= 600 points
>>> date1 =[21.32.12.45.13.45.2.34.1.23.]= 600 points
>
>>> Data2: regular grid model data sets (97 x 48)
>>> longitude2=[0.0,3.75,7.5,11.25......] = 97
>>> latitude2= [-87.15,-83.47,-79.77...] = 48
>>> data2= [97 x 48]
>
>>> I want to interpolate/grid the model(Data2) values to the nearest
>>> longitude1 x latitude1 (data1) sets.
>>> How to interpolate the model (data2) values to the data1 values.
>
>>> I am awaiting for your reply,
>
>>> Thanking you,
>
>>> Kishore
>
>> Hi,
>> I have some experience in griddata and interpolation.
>> I think you can griddata on data2 to make it become a new grid at
>> 600*600 points,and to have a look at the new grid data, which will be
>> a array of 600 *600, its value is near data1 or not.
>> just my person idea.
>
> Hi,
> Thanks for your idea, if a made a grid points 600 x 600 then how to
> get the nearest point to data1, because data1 is irregular grid.
>
> Kishore

Hi,

you should be able to grid to an irregular grid by calling GRIDDATA
with the /GRID, XOUT & YOUT keywords:

e.g.
grid = griddata(longitude2, latitude2, data2, /sphere, /degree, $
missing = !values.f_nan, $
/grid, xout = longitude1, yout = latitude1)

Hope this helps,
Chris
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Questions on the subject of Interpolation
Next Topic: Re: Need GOES Image Expert

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

Current Time: Sun Oct 12 17:26:20 PDT 2025

Total time taken to generate the page: 0.39845 seconds