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

Home » Public Forums » archive » 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 #59087 is a reply to message #59063] Wed, 05 March 2008 08:05 Go to previous messageGo to previous message
Kenneth Bowman is currently offline  Kenneth Bowman
Messages: 86
Registered: November 2006
Member
In article <MPG.223862e4a9bdefba98a2b0@news.frii.com>,
David Fanning <news@dfanning.com> wrote:

> In the code, lat is a 48-element vector that is irregularly
> spaced, lon is a 96-element vector, that is regularly
> spaced, except for the two end members, and sit is the
> 2D array I wish to resample. In this code, I am trying to
> resample to a 360x180 array, to make it consistent with other
> arrays I have available to me.
>
> nx = 360
> ny = 180
> slon = Scale_Vector(Findgen(nx), 0.5, 359.5)
> slat = Scale_Vector(Findgen(ny), Min(lat), Max(lat))
> x = Interpol(Findgen(N_Elements(lon)), lon, slon)
> y = Interpol(Findgen(N_Elements(lat)), lat, slat)
> xx = Rebin(x, nx, ny, /SAMPLE)
> yy = Rebin(Reform(y, 1, ny), nx, ny)

Usually these grids are (360 x 181), with longitudes from [0, 359] and
latitudes from [-90, 90], but you may have specific reasons for wanting
your particular set of lats and lons.

Ken
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: GRIDDATA woes
Next Topic: widget draw background color

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

Current Time: Sun Oct 12 00:43:23 PDT 2025

Total time taken to generate the page: 0.96163 seconds