Hello David,
I updated the program and now I don't have that weird error message.
Sometimes it helps just logging off and starting again!
I just sent another message including my updated program because I
noticed that I am not getting the Sx,Sy,Sz vectors with the values
that I should. I printed the Sx values and they are just a list of
numbers from 0 to n, where n coincides with the number of points where
the velocity is different from zero!
Do you know how can I define them so that they will only include the
coordinates at which Vx, Vy and Vz are different from zero?
Here it is: and as always, thank you for any feedback you can give me
on this one!!!
CHEERS, ADHARA
openr,q,'VOa.dat',/Get_Lun ;open files for reading
A=fltarr(6,90*360L) ;create arrays to hold data in files
readf,q,A ;read files into arrays
Free_Lun,q ;close files and clear logical unit assigned to each
file
Vx=fltarr(360,360,90) ;create 3 dimensional arrays to hold vector
data.
Vy=fltarr(360,360,90) ;the indices will be Vx(x,y,z)
Vz=fltarr(360,360,90)
factor = 0
For i = 0, 32399L Do Begin ;change here the number of records
ifneeded.
Vx(A(2,i)-1,A(1,i)-1,A(0,i)-1) = A(3,i)*10.0^factor
Vy(A(2,i)-1,A(1,i)-1,A(0,i)-1) = A(4,i)*10.0^factor
Vz(A(2,i)-1,A(1,i)-1,A(0,i)-1) = A(5,i)*10.0^factor
Endfor
Vxx=WHERE(Vx NE 0,count1)
Vyy=WHERE(Vy NE 0,count2)
Vzz=WHERE(Vz NE 0,count3)
sx=A[2,*]
sy=A[1,*]
sz=A[0,*]
Sx=where(Vxx NE 0)
Sy=where(Vyy NE 0)
Sz=where(Vzz NE 0)
PRINT, 'Subscripts of elements ne 0: ', Sx
vol = FLTARR(360, 360, 90)
WINDOW, XSIZE = 390, YSIZE = 400
Scale3, zr=[0,90], yr=[0,360], xr = [0,360]
flow3, Vx, Vy, Vz,SX=Reform(sx), SY=Reform(sy), SZ=Reform(sz)
END
David Fanning <davidf@dfanning.com> wrote in message news:<MPG.1b1a847abd8523e5989763@news.frii.com>...
> Adhara writes:
>
>> hello, So I followed the advice.... from the 32400 records that I
>> initially had, now all my coordinate arrays (sx,sy,sz) and velocity
>> arrays (vx,vy,vz) are of 521 records each (i.e. sxx, syy, szz and vxx,
>> vyy and vzz).
>>
>>
>> However, I am getting and error message that I have not been able to
>> fix...
>>
>> IDL> .COMPILE "C:\RSI\IDL55\lib\mycount.pro"
>> % Compiled module: $MAIN$.
>> IDL> .CONTINUE
>> % Type of FOR statement index variable <No name> may not be changed.
>> % Execution halted at: $MAIN$ 309
>> C:\RSI\IDL55\lib\mycount.pro
>>
>> How can I fix this?
>
> Well, this error occurs in line 309 of your main program.
> The program you are showing us only has 45 lines (and no
> apparent errors that I can see). Are you sure this is the
> program you are running? :-)
>
> What do you call the file this program is in? How do you
> make it run in IDL? That is, what IDL commands to you
> use to make it run?
>
> Cheers,
>
> David
|