<div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">Hi:</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; All,I have write a script to read and calculate .csv data according to the "Reading csv"<span style="line-height: 1.5;">example on the NCL website,but it appears warning and fatal:</span></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><div style="line-height: 23.7999992370605px;">fatal:List subscripting used on non-list variable, can't continue</div><div style="line-height: 23.7999992370605px;">fatal:["Execute.c":8567]:Execute: Error occurred at or near line 37 in file csv_read.ncl</div><div><br></div></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp;........</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">.........</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">........</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">I think maybe there are some problems with the way my data stored,</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">I have 29 files which named with date like this:</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><div>
<img src="cid:F8416A17@55B5D06B.47956757.png"></div><div>Each file include some same named &nbsp;csv data:</div><div><div>
<img src="cid:BE4949AD@55B5D06B.47956757.png"><img style="line-height: 1.5;" src="cid:BE44186F@55B5D06B.47956757.png"></div></div><div><br></div><div>I can not figure a better way to read &nbsp;data of the &nbsp;Caotan.csv of the all date-files and calculate them,can anyone help me or give me some good idea?</div></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">This is my script:</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp;;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">begin</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp;filename1=systemfunc("ls /public/home/huanglei/cmaqdata/2016*/Caotan.csv")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp;&nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">        </span>&nbsp;time_al= new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp;oth_al = new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp;xa_al &nbsp;= new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp;tc_al &nbsp;= new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp;bj_al &nbsp;= new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp;xy_al &nbsp;= new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp;wn_al &nbsp;= new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp;ya_al &nbsp;= new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">        </span>&nbsp;hz_al &nbsp;= new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp;yl_al &nbsp;= new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp;ak_al &nbsp;= new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">        </span>&nbsp;sl_al &nbsp;= new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp;do i=0,28</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;---Read in file as array of strings so we can parse each line.</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; &nbsp;lines &nbsp;= asciiread(filename1[i],-1,"string")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; &nbsp;nlines = dimsizes(lines)-1 &nbsp; ; First line is a header</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; ;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; ; Start reading in the fields we care about:</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; ; The first line is a header, so skip this.</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; ;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; delim &nbsp; &nbsp; = ","</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; time = str_get_field(lines(1:25),1,delim) &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; oth &nbsp;= str_get_field(lines(1:25),2,delim) &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; xa &nbsp; = str_get_field(lines(1:25),3,delim) &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; tc &nbsp; = str_get_field(lines(1:25),4,delim) &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">        </span>&nbsp;&nbsp;bj &nbsp; = str_get_field(lines(1:25),5,delim) &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; xy &nbsp; = str_get_field(lines(1:25),6,delim) &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; wn &nbsp; = str_get_field(lines(1:25),7,delim) &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; ya &nbsp; = str_get_field(lines(1:25),8,delim)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">        </span>&nbsp;&nbsp;hz &nbsp; = str_get_field(lines(1:25),9,delim) &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; yl &nbsp; = str_get_field(lines(1:25),10,delim) &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; ak &nbsp; = str_get_field(lines(1:25),11,delim) &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; sl &nbsp; = str_get_field(lines(1:25),12,delim)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class="Apple-tab-span" style="white-space: pre;">        </span></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;time_al(i,:)= time &nbsp;<span class="Apple-tab-span" style="white-space: pre;">        </span></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;oth_al(i,:) = oth &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;xa_al(i,:) &nbsp;= xa &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;tc_al(i,:) &nbsp;= tc &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;bj_al(i,:) &nbsp;= bj &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;xy_al(i,:) &nbsp;= xy &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;wn_al(i,:) &nbsp;= wn &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;ya_al(i,:) &nbsp;= ya &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;hz_al(i,:) &nbsp;= tc &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;yl_al(i,:) &nbsp;= bj &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;ak_al(i,:) &nbsp;= xy &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;sl_al(i,:) &nbsp;= wn</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">        </span></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">        </span>&nbsp;end do</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time_all=ndtooned(time_al)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;oth_all=ndtooned(oth_al)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;xa_all=ndtooned(xa_al)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;tc_all=ndtooned(tc_al)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;bj_all=ndtooned(bj_al)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;xy_all=ndtooned(xy_al)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;wn_all=ndtooned(wn_al)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ya_all=ndtooned(xy_al)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;hz_all=ndtooned(wn_al)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;yl_all=ndtooned(ya_al) &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;ak_all=ndtooned(ak_al)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;sl_all=ndtooned(sl_al)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp;print(time_all)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; ; calculate the avg</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oth_avg=avg(oth_al)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;xa_avg=avg(xa_all)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;tc_avg=avg(tc_all)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;bj_avg=avg(bj_all)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;xy_avg=avg(xy_all)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;wn_avg=avg(wn_all)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ya_avg=avg(xy_all)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;hz_avg=avg(wn_all)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;ya_avg=avg(ya_all) &nbsp;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;ak_avg=avg(ak_all)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;sl_avg=avg(sl_all)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;ssx = hz_avg + ak_avg + sl_avg</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span>&nbsp;&nbsp;nsx = ya_avg + ya_avg</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;">end</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><br></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><div style="line-height: 23.7999992370605px;">My NCL version is 6.2.0.</div><div style="line-height: 23.7999992370605px;">&nbsp;How can I slove the problem?</div></div>