<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;"> 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;"> ........</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 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 data of the 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;"> ;</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;"> filename1=systemfunc("ls /public/home/huanglei/cmaqdata/2016*/Caotan.csv")</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;"><span class="Apple-tab-span" style="white-space: pre;">        </span> time_al= new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> oth_al = new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> xa_al = new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> tc_al = new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> bj_al = new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> xy_al = new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> wn_al = new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> ya_al = 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> hz_al = new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> yl_al = new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> ak_al = 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> sl_al = new((/29,24/),float,"No_FillValue")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> do i=0,28</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;"> ;---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;"> lines = asciiread(filename1[i],-1,"string")</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> nlines = dimsizes(lines)-1 ; 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;"> ;</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> ; Start reading in the fields we care about:</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> ; The first line is a header, so skip this.</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;"> delim = ","</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> time = str_get_field(lines(1:25),1,delim) </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> oth = str_get_field(lines(1:25),2,delim) </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> xa = str_get_field(lines(1:25),3,delim) </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> tc = str_get_field(lines(1:25),4,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> bj = str_get_field(lines(1:25),5,delim) </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> xy = str_get_field(lines(1:25),6,delim) </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> wn = str_get_field(lines(1:25),7,delim) </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> ya = 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> hz = str_get_field(lines(1:25),9,delim) </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> yl = str_get_field(lines(1:25),10,delim) </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> ak = str_get_field(lines(1:25),11,delim) </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> sl = 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;"> <span class="Apple-tab-span" style="white-space: pre;">        </span></div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> time_al(i,:)= time <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> oth_al(i,:) = oth </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span> xa_al(i,:) = xa </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span> tc_al(i,:) = tc </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span> bj_al(i,:) = bj </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span> xy_al(i,:) = xy </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span> wn_al(i,:) = 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> ya_al(i,:) = ya </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> hz_al(i,:) = tc </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span> yl_al(i,:) = bj </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span> ak_al(i,:) = xy </div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"><span class="Apple-tab-span" style="white-space: pre;">                        </span> sl_al(i,:) = 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> 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;"> 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> 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> 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> 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> 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> 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> wn_all=ndtooned(wn_al)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> 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> 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> yl_all=ndtooned(ya_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> 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> 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;"> 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;"> ; 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;"> 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> 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> 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> 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> 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> wn_avg=avg(wn_all)</div><div style="font-family: 'lucida Grande', Verdana, 'Microsoft YaHei'; line-height: 23.7999992370605px;"> 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> 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> ya_avg=avg(ya_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> 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> 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> 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> 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;"> How can I slove the problem?</div></div>