In article <MPG.223862e4a9bdefba98a2b0@[EMAIL PROTECTED]
>,
David Fanning <news@[EMAIL PROTECTED]
> 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


|