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

Home » Public Forums » archive » equal lat long grid
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
equal lat long grid [message #48327] Fri, 07 April 2006 08:43 Go to previous message
Pawan is currently offline  Pawan
Messages: 9
Registered: April 2006
Junior Member
Hi all,

I was trying to convert my unequal size lat long data into equal size
lat long (grid) data.

Here is code that I am using. I was wondering if someone could give me
some idea on improving this. I have almost 2 M data points and this
code is taking more than 12 hour to do the job.

thanks,
pawan

;; Gridding data
;output arrays to store the data

mean_aot = fltarr(241,721) ; to store mean
std_aot = fltarr(241,721) ; to store stdev
min_aot = fltarr(241,721) ; to store min
max_aot = fltarr(241,721) ; to store max
cnt = fltarr(241,721)

starttime=systime(0)
for i = 0,240 do begin
lat = i * 0.5 - 60
for j = 0,720 do begin
lon = j * 0.5 - 180

res = where((param(6,*) gt (lat-0.25) and $
param(6,*) le (lat+0.25)) and $
(param(5,*) gt (lon-0.25) and $
param(5,*) le (lon+0.25)) and $
(param(25,*) ge 0. and param(25,*) le 5.) and $
param(10,*) gt 0. and $
param(17,*) gt 0., count)

if(count gt 0) then begin
mean_aot(i,j) = mean(param(17,res))
cnt(i,j) = count
std_aot(i,j) = 0.
if (count gt 1) then begin
std_aot(i,j) = stddev(param(17,res))
endif

;
printf,2,format='(7f10.3)',lat,lon,mswf(i,j),maot(i,j),cnt(i ,j),std_swf,std_aot

endif

endfor
print,lat
endfor
endtime=systime(0)
close,2
print,'Start Time :',starttime
print,'End Time :',endtime
end
[Message index]
 
Read Message
Read Message
Previous Topic: Re: equal lat long grid
Next Topic: IDL calling Fortran

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

Current Time: Wed Oct 08 17:38:13 PDT 2025

Total time taken to generate the page: 0.00433 seconds