Re: anyone has "indgen_array.pro"? [message #60667 is a reply to message #60666] |
Tue, 27 May 2008 09:56  |
wgallery
Messages: 32 Registered: December 1998
|
Member |
|
|
On May 27, 12:17 pm, Likun <Likun.W...@gmail.com> wrote:
> Hi, All:
>
> I am using lonlat2reg.pro to process my data. The code stopped
> somewhere and needed the program called
> "indgen_array". Anyone knows where I can access to it?
>
> Thank you in advance,
>
> glon = indgen_array(nlon, nlat, /lon) * dlon + lon0[0] + dlon /
> 2.
> glat = indgen_array(nlon, nlat, /lat) * dlat + lat0[0] + dlat /
> 2.
>
> Likun~
Likun,
It can be found in the same place as lonlat2reg.pro and is part of
Peter Alberts map_image package found at:
http://wew.met.fu-berlin.de/idl/
However, that link appears to be dead so here is indgen_array.pro.
Bill Gallery
-----------------------
function indgen_array, x_size, y_size, $
latitude = latitude, longitude = longitude
;IDL> print, indgen_array(3, 4, /lat)
; 0 0 0
; 1 1 1
; 2 2 2
; 3 3 3
;IDL> print, indgen_array(3, 4, /lon)
; 0 1 2
; 0 1 2
; 0 1 2
; 0 1 2
if keyword_set(longitude) then begin
xxx = indgen(x_size)
yyy = intarr(y_size) + 1
endif
if keyword_set(latitude) then begin
xxx = intarr(x_size) + 1
yyy = indgen(y_size)
endif
return, yyy ## xxx
end
|
|
|