[ncl-talk] Do Loop Overwriting Array

Zach Rieck zrr817 at gmail.com
Fri May 3 10:54:57 MDT 2019


To Whom it May Concern-

I'm running into an issue where my do loop seems to be overwriting instead
of storing values from files sequentially 26 times like it's meant to.
Essentially, I have 26 files with similar names I want to pull in precip
values from. I have 2 arrays defined that have the specific dates for each
file (date 1 and date 2) and what I want is for i to loop through each file
and import (1st loop) and then loop through i again to build an array of
precip values (2nd loop).

The issue is that the 1st loop seems to be only storing the 26th file,
which I believe is because it is overwriting for some reason. Because of
this, the 2nd loop breaks my code since the queries I have written are
outside the scope of the array. Is there a way to preventing this from
overwriting so that I can add all 26 files and then query them 1 by 1 to
pull in precipitation values?

Thanks for all the help with my questions, I really appreciate it!

Respectfully,

-Zach Rieck
zrr817 at gmail.com
(513)-502-5652
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190503/b572a619/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Comparrison.ncl
Type: application/octet-stream
Size: 4837 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190503/b572a619/attachment.obj>


More information about the ncl-talk mailing list