passing variable error [message #66258] |
Sun, 26 April 2009 18:01 |
xiao zhang
Messages: 81 Registered: June 2008
|
Member |
|
|
Sorry, the second post today, I want to pass some variable to a
function from the main program. The variable passed successful in the
first step of the loop but failed in the second step. why is that?
hmmm.........
;main:
for j=0,step-1 do begin
.......
ustars=stars(su,sv,stemp,sp,sdes,stempchange,levels,zs)
ustar=ustars(0)
thetastar=ustars(1)
tempzs=ustars(2)
elasf=ustars(3)
print,'ustar = ',ustar
print,'thetastar = ',thetastar
rustar(j) = ustar
rthetastar(j)= thetastar -------------------------works
here
; help,ustar,thetastar -------------------------they
are floating point
rPBLheight(j+1)=pblheight(thetastar,ustar,tempzs,levels,PBLh eight
(j),stemp)
; does not work here........ in this function
endfor
this is the beginning of the function:
function pblheight,thetastar,ustar,tempzs,levels,PBLheight,stemp
return,pblheight
Thank you very much :P
|
|
|