<div dir="ltr"><div>The error message tell you that the error occurs at line 138<br><br>133 do i=0,numfiles-1<br>134 data := asciiread(files(i),-1,"string")<br>135 delim := ","<br>136 lat := stringtofloat(str_get_field(data,2, delim)) ; latitude values<br>137 lon := stringtofloat(str_get_field(data,3, delim)) ; longitude values<br>138 plot(i) = gsn_add_polyline(wks, map, lon, lat, gres)<br>139 end do<br><br></div><div>At line 102, you have<br><br>102 plot = new(4,graphic)<br></div><div><br></div><div>Well, if 'numfiles' > 4, you are out of bounds !!!<br><br>That should be:<br><br>plot = new(numfiles,graphic)<br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 14, 2016 at 11:49 AM, Black, Forrest (LARC-D318)[UNIVERSITIES SPACE RESEARCH ASSOCIATION] <span dir="ltr"><<a href="mailto:forrest.black@nasa.gov" target="_blank">forrest.black@nasa.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="#0563C1" vlink="#954F72" lang="EN-US">
<div class="m_8774764892986783743WordSection1">
<p class="MsoNormal">Hello all,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have a script where I am reading csv files. If I try to read more than 4 files, I get the error:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">fatal:Subscript out of range, error in subscript #0<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">fatal:["Execute.c":8575]:<wbr>Execute: Error occurred at or near line 138 in file traject1f.ncl<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">If I read 4 files or less it works fine. Does anyone know how to read more than 4 files? <u></u><u></u></p>
<p class="MsoNormal">I am using version 6.3.0.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></p><span class="HOEnZb"><font color="#888888">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Forrest <u></u><u></u></p>
</font></span></div>
</div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>