Re: strange do loop problem

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed, 19 Dec 2007 09:57:26 -0700 (MST)

Hi Ozan,

I don't know if this was resolved, but I tried to reproduce this
myself without much luck.

Can you give us more information about what you are doing inside the
loop, and what the full dimensions of "data" are? If you can give us
the script and data so we can run it, that would be even better.

Thanks,

--Mary

On Fri, 14 Dec 2007, Dennis Shea wrote:

> Try
>
> iSize=dimsizes(data(:,0))
> do i=0,iSize-1
>
> Perhaps, NCL evaluates dimsizes(data(:,0)) on each iteration?
>
>
> ozan mert gokturk wrote:
>> Dear NCL users,
>>
>> I am having a weird situation with a do loop.
>>
>> I have a loop processing approximately 1,660,000 lines
>> of ascii file. When i write
>>
>> do i=0, dimsizes(data(:,0)) - 1
>>
>> and proceed, loop never seems to be ending.
>> "dimsizes(data(:,0))" equals 1,660,000. I have checked
>> it. On the other hand, if I write
>> do i=0, 1659999
>>
>> and proceed, do loop ends healthily!
>>
>> What could be the cause for this? Although I solved
>> the problem by entering the exact number of iterations
>> into the loop, I am not satisfied with my solution!!!
>>
>> Thanks for any idea...
>>
>> Ozan
>>
>>
>> ____________________________________________________________________________________
>> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it
>> now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
>
> --
> ======================================================
> Dennis J. Shea tel: 303-497-1361 |
> P.O. Box 3000 fax: 303-497-1333 |
> Climate Analysis Section |
> Climate & Global Dynamics Div. |
> National Center for Atmospheric Research |
> Boulder, CO 80307 |
> USA email: shea 'at' ucar.edu |
> ======================================================
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Dec 19 2007 - 09:57:26 MST

This archive was generated by hypermail 2.2.0 : Mon Dec 31 2007 - 09:18:02 MST