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 
Switch to threaded view of this topic Create a new topic Submit Reply
Interpolation/gridding on a sphere? [message #4672] Wed, 12 July 1995 00:00 Go to next message
tmote is currently offline  tmote
Messages: 2
Registered: July 1995
Junior Member
I have a need to interpolate and grid climate data for the northern
hemisphere. I wish to know if anyone has IDL code to perform
interpolation across the surface of a sphere. Can the routines in the
IDL user's library be modified to accomplish this?

Thanks in advance.

Thomas L. Mote
tmote@unlinfo.unl.edu
Re: interpolation/gridding [message #59366 is a reply to message #4672] Thu, 20 March 2008 08:54 Go 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
Re: interpolation/gridding [message #59374 is a reply to message #4672] Thu, 20 March 2008 05:20 Go to previous message
kishore1818 is currently offline  kishore1818
Messages: 24
Registered: June 2007
Junior Member
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
Re: interpolation/gridding [message #59375 is a reply to message #4672] Thu, 20 March 2008 01:45 Go to previous message
wfzhao is currently offline  wfzhao
Messages: 11
Registered: March 2008
Junior Member
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.
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Oct 08 15:52:07 PDT 2025

Total time taken to generate the page: 0.00695 seconds