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

Home » Public Forums » archive » Re: How to make IDL faster
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: How to make IDL faster [message #36772] Wed, 29 October 2003 01:35
Chris Lee is currently offline  Chris Lee
Messages: 101
Registered: August 2003
Senior Member
In article <eceee805.0310282135.5448e3af@posting.google.com>, "Park Kyung
Won" <parkkw@mail1.pknu.ac.kr> wrote:



> Hello
> I write message first time.
> If I want to compare trmm satellite data with ground point data, I used
> to this line.
> geo(0,207,2985) : trmm latitute
> geo(1,*,*) : trmm longitute
> lat : ground location(latitute)
> lon : ground location(longitute)
> rain : automatic weather system rainfall data highf(0,207,2985) : trmm
> brightness temperature data for i=0,207 do begin
> for j=1200,1700 do begin
> for k=0,di(0)-1 do begin
> if geo(0,i,j) gt lat(k)-0.04 and geo(0,i,j) lt lat(k)+0.04 and $
> geo(1,i,j) gt lon(k)-0.04 and geo(1,i,j) lt lon(k)+0.04 then begin
> printf,lun3,loc(k),lon(k),lat(k),rain1(k),rain(k),highf(0,i, j)
> endif
> endfor
> endfor
> endfor
> When I caculate 26 trmm data, I wait almost 2hour. How can I change this
> program?
> Help me.

Hi,
(Caveat: I don't know what 'k' is, but it looks unrelated to my solution.
:)

I'm not sure how much accuracy you might lose, but you could speed it up
by triangulating one grid onto the other. Assuming you have regular grids
on the ground


dlon=5 ;degrees
dlat=5;degrees

sat_on_ground=SPH_SCAT(reform(geo[1,*,*], 207*2895L), $
reform(geo[0,*,*],207*2895L), $
reform(highf[0,*,*], 207*2895L), $
gs=[dlon,dlat], bounds=[0,-90,360,90])

;sat_on_ground should be a regular grid with all of the points
interpolated onto it.

You probably need to alter that code, I assumed the satellite data was
consistent (in time for example). If the 2nd axis (207 points) of the
satellite data is orbit number,you might want to loop through SPH_SCAT 207
times using only the 3rd axis to make your grid, then you will have some
temporal resolution to your data.

Once you have the two data sets on the same grid, comparing should be
easier/faster.

Chris.
[Message index]
 
Read Message
Previous Topic: about contour
Next Topic: Trouble wih events

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

Current Time: Fri Oct 10 09:01:45 PDT 2025

Total time taken to generate the page: 1.44237 seconds