Ind function and do loops

From: Karen A. Kosiba (kakosiba AT purdue.edu)
Date: Tue Feb 15 2005 - 16:04:43 MST


Hello,

This is a follow up to a previous email of mine regarding ignoring indices. I
can ignore indices using the ind function when it lies outside of a do loop,
but when I embed the ind function in a do loop, I get several fatal errors and
the do loop cannot continue. This is problematic because I need to create
multiple (1D) arrays, using an outter do loop. Below is a subset of my
script. Any help would be greatly appreciated!

        do j=0,5
                r(j)=j*(De/2)
                RR(j) = r(j)/12.49135
                RAZ(j) = r(j)/(MidRVal*.01623)

                angle = new((/20/),float)
                azAngle = new((/20/),float)
                vel_circle = new((/20/),float)
                aVec = new((/20/),float)
                bVec = new((/20/),float)
                cVec = new((/20/),float)
                aVecSq = new((/20/),float)
                bVecSq = new((/20/),float)

                do i=0,19
                        angle(i) = (2*3.14*i)/20
                        rr(i) = dim_rMid+RR(j)*sin(angle(i))
                        az(i) = dim_azMid+RAZ(j)*cos(angle(i))

                        azAngle(i) = az(floattoint(az(i)))
                        azAngle(i) = azAngle(i)*(3.14/180)

                        vel_circle(i) = vel(floattoint(az(i)),floattoint(rr
(i)))*.01

                        k=ind(.not.ismissing(vel_circle))

                        aVec(k) = sin(angle(k)-azAngle(k))
                        bVec(k) = cos(angle(k)-azAngle(k))
                        cVec(k) = vel_circle(k)-15*cos(1.4-azAngle(k))

                        aVecSq(k) = (aVec(k))^2
                        bVecSq(k) = (bVec(k))^2

                end do

end do

Thanks,
Karen A. Kosiba

********************************
Karen A. Kosiba
Graduate Student
Purdue University, Dept. of EAS
********************************
_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Wed Feb 16 2005 - 08:01:50 MST