<div dir="ltr">Hello Shea<div><br></div><div>Thank you for your reminding.</div><div>I have solved this problem.</div><div><br></div><div>Here is my code:</div><div><div>begin</div><div>;file = (/&quot;bst_kilo_2015&quot;, &quot;bst_etau_2015&quot;/)</div><div>; read ascii data------------------------------------------------------</div><div>lines<span class="gmail-Apple-tab-span" style="white-space:pre">                                        </span>= asciiread(&quot;./bst_etau_2015&quot;,-1,&quot;string&quot;)</div><div><br></div><div>; read  data</div><div>delimiter<span class="gmail-Apple-tab-span" style="white-space:pre">                                </span>= &quot; &quot;</div><div>international_no<span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>= str_get_field(lines(0),2, delimiter)</div><div>number_of_dataline_str<span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>= str_get_field(lines(0),3, delimiter) </div><div>number_of_dataline<span class="gmail-Apple-tab-span" style="white-space:pre">                        </span>= toint(number_of_dataline_str)</div><div>name<span class="gmail-Apple-tab-span" style="white-space:pre">                                        </span>= str_get_field(lines(0),8, delimiter)</div><div>date<span class="gmail-Apple-tab-span" style="white-space:pre">                                        </span>= str_get_field(lines(1:number_of_dataline+1), 1, delimiter)</div></div><div><br></div><div>Here is my data form:</div><div><div>66666 1517  046 0017 1517 1 0                 KILO              20151013</div><div>15090118 002 7 237 1801  945     090     20060 0040 20150 0100          </div><div>15090200 002 5 240 1798  950     080     90060 0060 10150 0120          </div><div>15090206 002 5 244 1794  950     080     90060 0060 80150 0120          </div><div>15090212 002 5 246 1791  965     070     90060 0060 80150 0120          </div><div>15090218 002 5 246 1785  965     070     80070 0050 70150 0120          </div><div>15090300 002 5 247 1782  965     070     80070 0050 90150 0150          </div><div>15090306 002 5 246 1781  965     070     80070 0050 90150 0150          </div><div>15090312 002 5 244 1777  965     070     80070 0050 90150 0150          </div><div>15090318 002 5 241 1775  965     070     80070 0050 90150 0150          </div><div>15090400 002 5 238 1771  970     065     70100 0060 70180 0120          </div><div>15090406 002 5 236 1766  970     065     70100 0060 70200 0120          </div></div><div><br></div><div>When I run the script, such error appeared:</div><div><div>fatal:Subscript out of range, error in subscript #0</div><div>fatal:An error occurred reading lines</div><div>fatal:[&quot;Execute.c&quot;:8575]:Execute: Error occurred at or near line 19 in file best_track_plot.ncl</div></div><div><br></div><div>The problem is at &quot;number_of_dataline+1&quot;.</div><div><br></div><div>Thank you.</div><div><br></div><div>Tao</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 7, 2016 at 11:25 PM, Dennis Shea <span dir="ltr">&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Not enough information:  What was the error message?<br><br></div><div>Also, including the, say, first 5 lines of the field being read would be useful.<br><br></div><div>Regards<br></div><br></div><br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Dec 7, 2016 at 3:56 AM, Tao Lu <span dir="ltr">&lt;<a href="mailto:hakufu.asano@gmail.com" target="_blank">hakufu.asano@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Dear ncl-talk<div><br></div><div>I wrote some codes to use str_get_field()</div><div>------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>----------------------------</div><div><div>number_of_dataline<span class="m_-2614303474947785261m_-608685218396013680gmail-Apple-tab-span" style="white-space:pre-wrap">                         </span>= toint(number_of_dataline_str)</div><div>print (number_of_dataline)</div><div>name<span class="m_-2614303474947785261m_-608685218396013680gmail-Apple-tab-span" style="white-space:pre-wrap">                                        </span>= str_get_field(lines(0),8, delimiter)</div><div><span style="background-color:rgb(255,153,0)">date</span><span class="m_-2614303474947785261m_-608685218396013680gmail-Apple-tab-span" style="white-space:pre-wrap">                                               </span>= str_get_field(lines(1:<span style="background-color:rgb(255,153,0)">number_o<wbr>f_dataline+1</span>), 1, delimiter)</div><div>------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>-----------------------------</div><div>Error occurred at &quot;date&quot;.</div><div><br></div><div>Could you give me some advice?</div><div><br></div><div>Yours sincerely,</div><div>Tao</div><div><br></div>-- <br><div class="m_-2614303474947785261m_-608685218396013680gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div style="font-size:12.8px"><span style="font-size:12.8px">******************************<wbr>************************</span><br></div><div style="font-size:12.8px"><span style="font-size:12.8px">盧 涛 (ル タオ) </span><span style="font-family:arial,helvetica,sans-serif;font-size:small">修士課程2年</span><br style="font-size:12.8px"><p style="font-size:12.8px;margin:0px"><font face="arial, helvetica, sans-serif" size="2">〒<span lang="EN-US">112-8551 </span>東京都文京区春日<span lang="EN-US">1-13-27</span></font></p><p style="font-size:12.8px;margin:0px"><font face="arial, helvetica, sans-serif" size="2">中央大学理工学研究科都市環境学専攻</font></p><p style="font-size:12.8px;margin:0px"><font face="arial, helvetica, sans-serif" size="2">河川・水文<span lang="EN-US"><span lang="EN-US"><span lang="EN-US">研究</span></span><span lang="EN-US"><span lang="EN-US">室</span></span></span></font><span style="font-family:arial,helvetica,sans-serif;font-size:small">(山田正教授)</span></p></div><div style="font-size:12.8px"><p style="font-size:12.8px;margin:0px"><font face="arial, helvetica, sans-serif" size="2"><span lang="EN-US"><br></span></font></p><p style="font-size:12.8px;margin:0px"><font face="arial, helvetica, sans-serif" size="2"><span lang="EN-US">TEL: 03-3817-3406;   </span></font><span style="font-family:arial,helvetica,sans-serif;font-size:small">Phone: 070-2188-7509</span></p>Email1: <a href="mailto:mail%3Amet.yamos@gmail.com" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">hakufu.asano@gmail.com</a><br style="font-size:12.8px">Email2: <a href="mailto:mail%3Ayamoto@civil.chuo-u.ac.jp" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">lutao@civil.chuo-u.ac.<wbr>jp</a><br style="font-size:12.8px"><span style="font-size:12.8px">******************************<wbr>*************************</span></div><div style="font-size:12.8px"><span style="font-size:small;font-family:arial">******************************</span><span style="font-size:small;font-family:arial"><wbr>************************</span><br></div><div><span style="font-size:small;font-family:arial">Tao Lu    (M. Eng)</span></div><div><span style="font-family:arial,helvetica,sans-serif;font-size:12.8px">Laboratory of River Engineering and Hydrology,</span><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial">Dept. of Civil and Environmental Engineering,</span><br style="font-family:arial;font-size:small"><span style="font-family:arial,helvetica,sans-serif;font-size:12.8px">Graduate School of Science and Engineering,</span><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial">Chuo University</span><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial"> </span><br style="font-family:arial;font-size:small">1-13-27<span style="font-size:small;font-family:arial">,Kasuga,Bunkyo-ku,Tokyo</span><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial">112-8551, Japan</span><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial">TEL: </span>03-3817-1805<font face="arial, helvetica, sans-serif" size="2"><span lang="EN-US">;   </span></font><span style="font-family:arial,helvetica,sans-serif;font-size:small">Phone: 070-2188-7509</span><br style="font-family:arial;font-size:small"><span style="font-size:12.8px">Email1: </span><a href="mailto:mail%3Amet.yamos@gmail.com" style="font-size:12.8px;color:rgb(17,85,204)" target="_blank">hakufu.asano@gmail.com</a><br style="font-size:12.8px"><span style="font-size:12.8px">Email2: </span><a href="mailto:mail%3Ayamoto@civil.chuo-u.ac.jp" style="font-size:12.8px;color:rgb(17,85,204)" target="_blank">lutao@civil.chuo-u.ac.<wbr>jp</a><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial">******************************</span><span style="font-size:small;font-family:arial"><wbr>***********************</span><span style="font-size:12.8px"><br></span></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div>
<br></div></div>______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">******************************************************</span><br></div><div style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">盧 涛 (ル タオ) </span><span style="font-family:arial,helvetica,sans-serif;font-size:small">修士課程2年</span><br style="font-size:12.8000001907349px"><p style="font-size:12.8000001907349px;margin:0px"><font size="2" face="arial, helvetica, sans-serif">〒<span lang="EN-US">112-8551 </span>東京都文京区春日<span lang="EN-US">1-13-27</span></font></p><p style="font-size:12.8000001907349px;margin:0px"><font size="2" face="arial, helvetica, sans-serif">中央大学理工学研究科都市環境学専攻</font></p><p style="font-size:12.8000001907349px;margin:0px"><font size="2" face="arial, helvetica, sans-serif">河川・水文<span lang="EN-US"><span lang="EN-US"><span lang="EN-US">研究</span></span><span lang="EN-US"><span lang="EN-US">室</span></span></span></font><span style="font-family:arial,helvetica,sans-serif;font-size:small">(山田正教授)</span></p></div><div style="font-size:12.8000001907349px"><p style="font-size:12.8000001907349px;margin:0px"><font size="2" face="arial, helvetica, sans-serif"><span lang="EN-US"><br></span></font></p><p style="font-size:12.8000001907349px;margin:0px"><font size="2" face="arial, helvetica, sans-serif"><span lang="EN-US">TEL: 03-3817-3406;   </span></font><span style="font-family:arial,helvetica,sans-serif;font-size:small">Phone: 070-2188-7509</span></p>Email1: <a href="mailto:mail%3Amet.yamos@gmail.com" style="color:rgb(17,85,204);font-size:12.8000001907349px" target="_blank">hakufu.asano@gmail.com</a><br style="font-size:12.8000001907349px">Email2: <a href="mailto:mail%3Ayamoto@civil.chuo-u.ac.jp" style="color:rgb(17,85,204);font-size:12.8000001907349px" target="_blank">lutao@civil.chuo-u.ac.jp</a><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">*******************************************************</span></div><div style="font-size:12.8000001907349px"><span style="font-size:small;font-family:arial">******************************</span><span style="font-size:small;font-family:arial">************************</span><br></div><div><span style="font-size:small;font-family:arial">Tao Lu    (M. Eng)</span></div><div><span style="font-family:arial,helvetica,sans-serif;font-size:12.8px">Laboratory of River Engineering and Hydrology,</span><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial">Dept. of Civil and Environmental Engineering,</span><br style="font-family:arial;font-size:small"><span style="font-family:arial,helvetica,sans-serif;font-size:12.8px">Graduate School of Science and Engineering,</span><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial">Chuo University</span><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial"> </span><br style="font-family:arial;font-size:small">1-13-27<span style="font-size:small;font-family:arial">,Kasuga,Bunkyo-ku,Tokyo</span><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial">112-8551, Japan</span><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial">TEL: </span>03-3817-1805<font size="2" face="arial, helvetica, sans-serif"><span lang="EN-US">;   </span></font><span style="font-family:arial,helvetica,sans-serif;font-size:small">Phone: 070-2188-7509</span><br style="font-family:arial;font-size:small"><span style="font-size:12.8px">Email1: </span><a href="mailto:mail%3Amet.yamos@gmail.com" style="font-size:12.8px;color:rgb(17,85,204)" target="_blank">hakufu.asano@gmail.com</a><br style="font-size:12.8px"><span style="font-size:12.8px">Email2: </span><a href="mailto:mail%3Ayamoto@civil.chuo-u.ac.jp" style="font-size:12.8px;color:rgb(17,85,204)" target="_blank">lutao@civil.chuo-u.ac.jp</a><br style="font-family:arial;font-size:small"><span style="font-size:small;font-family:arial">******************************</span><span style="font-size:small;font-family:arial">***********************</span><span style="font-size:12.8px"><br></span></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>