<div dir="ltr"><div>Hi Zach,</div><div><br></div><div>Looks like a couple of things going on:</div><div><br></div><div>i) There's this line in the docs for str_fields_count():</div><div><br></div><div>"
If one or more delimiters appear side-by-side in a string, then they
are treated as if they were just one delimiter."</div><div><br></div><div>So based of the 2nd line in the file (strs(1)), it return nfields as 10, rather than what I might have expected as 14.</div><div><br></div><div>ii) These two lines:</div><div> strend= ind(strs.eq.",,,,,,")<br> iLast = strend(0)</div><div><br></div><div>apparently there are no lines in the file with 6 consecutive commas, and "strend" comes back with one element, the _FillValue, which in this case is a really large negative number, and so "iLast" is then an invalid index.</div><div><br></div><div>Hope that helps...</div><div>Rick<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 18, 2019 at 7:47 PM Zach Rieck via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">To Whom it May Concern-<div><br></div><div>I'm running into an issue when I try importing this CSV file. The error I'm getting is a "subscript out of range" exec error on the line where first begin importing my data column by column, starting with the year.</div><div><br></div><div>I also get an error saying it cannot read my variable "strs" which is tied to my ascii import function. I've looked at it and I'm not sure why it's giving an error. The number of columns are well within the index I'm using and I'm using the right import function.</div><div><br></div><div>I've attached my code and data file for reference. Please let me know if there's anything I'm doing wrong or if there's a correction I can make.</div><div><br></div><div>Thanks in advance for the help!</div><div><br></div><div>Respectfully,</div><div> <div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;font-family:arial;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/1Wnl1Zte-PSKbr5MkINMQXF_w7EHmXxv3/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration-line:none;padding:1px 0px;border:medium none" target="_blank"><img style="vertical-align: bottom; border: medium none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="vertical-align:bottom;text-decoration:none">Cedar_Creek_Radiometer.csv</span></a><img style="opacity: 0.55; float: right; display: none;"></div><br clear="all"><div><div dir="ltr" class="gmail-m_-1700635762646533843gmail_signature"><div dir="ltr">-Zach Rieck<div><a href="mailto:zrr817@gmail.com" target="_blank">zrr817@gmail.com</a></div><div>(513)-502-5652</div></div></div></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>