<div dir="ltr">Also, there are a large number of examples of reading text (ascii files)<br><br><a href="https://www.ncl.ucar.edu/Applications/read_ascii.shtml">https://www.ncl.ucar.edu/Applications/read_ascii.shtml</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 8, 2018 at 12:11 PM, Toni Klemm <span dir="ltr"><<a href="mailto:toni-klemm@tamu.edu" target="_blank">toni-klemm@tamu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Sorry, there was a typo in my code, in the ListSetType command. Here it is again:<div><br></div><div><br></div><div><span class=""><div><span style="font-family:Courier">do year = [from],[to]</span><span class="m_-593402634074622235Apple-tab-span" style="font-family:Courier;white-space:pre-wrap">                    </span><span style="font-family:Courier">; years always have four digits</span></div><div><font face="Courier"><br></font></div><div><font face="Courier">  do month = 1,12</font></div><div><font face="Courier"><br></font></div><div><div style="font-family:Courier">    if (month .lt. 10) then</div><div style="font-family:Courier">      month_zero = "0" + month<span class="m_-593402634074622235Apple-tab-span" style="white-space:pre-wrap">              </span>; turns "1"..."9" into "01"..."09" to match filename structure</div><div style="font-family:Courier">    end if</div><div style="font-family:Courier"><br></div><div style="font-family:Courier">    if(month .gt. 9) then</div><div style="font-family:Courier">      month_zero = month<span class="m_-593402634074622235Apple-tab-span" style="white-space:pre-wrap">            </span>; leave “10”..."12" unchanged</div><div style="font-family:Courier">    end if</div></div><div><span style="font-family:Courier"><br></span></div><div><span style="font-family:Courier">    do day = 1,31</span></div><div><div style="font-family:Courier"><br></div><div style="font-family:Courier">      if (day .lt. 10) then</div><div style="font-family:Courier">        day_zero = "0" + day<span class="m_-593402634074622235Apple-tab-span" style="white-space:pre-wrap">             </span>; turns "1"..."9" into "01"..."09" to match filename structure</div><div style="font-family:Courier">      end if</div><div style="font-family:Courier"><br></div><div style="font-family:Courier">      if(hour .gt. 9) then</div><div style="font-family:Courier">        day_zero = day<span class="m_-593402634074622235Apple-tab-span" style="white-space:pre-wrap">                        </span>; leave "10…"31" unchanged</div><div style="font-family:Courier">      end if</div></div><div><br></div><div><span style="font-family:Courier">    </span><span style="font-family:Courier">  do hour = 0,23</span></div><div><font face="Courier"><br></font></div><div><font face="Courier"><div>        if (hour .lt. 10) then</div><div>          hour_zero = "0" + hour<span class="m_-593402634074622235Apple-tab-span" style="white-space:pre-wrap">       </span>; turns "1"..."9" into "01"..."09" to match filename structure</div><div>        end if</div><div><br></div><div>        if(hour .gt. 9) then</div><div>          hour_zero = hour<span class="m_-593402634074622235Apple-tab-span" style="white-space:pre-wrap">             </span>; leave "10…"23" unchanged</div><div>        end if</div></font></div><div><font face="Courier">     </font></div><div><br></div></span><div><span class=""><div><font face="Courier">       AOD_files = systemfunc("ls ~/your/file/directory/" + year + "/" + month_zero + "/" + day_zero + "/" + hour_zero + “_AOD.csv")</font></div><div><font face="Courier">       AOD_f = addfiles(AOD_files,"r")</font></div></span><div><font face="Courier">       ListSetType(AOD_f,"cat”)</font></div></div><span class=""><div><font face="Courier"><br></font></div><div><font face="Courier"><br></font></div><div><font face="Courier">...</font></div><div><font face="Courier">proceed with your analysis, e.g., dim_avg_n</font></div><div><font face="Courier">...</font></div><div><font face="Courier"><br></font></div><div><font face="Courier"><br></font></div><div><font face="Courier">      end do</font></div><div><font face="Courier">    end do</font></div><div><font face="Courier">  end do</font></div><div><font face="Courier">end do</font><br><div><br class="m_-593402634074622235webkit-block-placeholder"></div><div><div dir="auto" style="word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="word-wrap:break-word;line-break:after-white-space"><div><br></div></div></div></div></div></div></div></span><span class=""><div><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word;line-break:after-white-space"><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><br></font></div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><b>Toni Klemm, Ph.D.<br></b>Postdoctoral Research Associate</font></div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Department of Ecosystem Science and Management</div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">College of Agriculture and Life Sciences</div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Texas A&M University, College Station, TX</div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri">Contributor at the <a href="http://www.eccforum.org" target="_blank">Early Career Climate Forum</a><br><a href="http://www.toni-klemm.de" target="_blank">www.toni-klemm.de</a> | <a href="http://twitter.com/toniklemm" target="_blank">@toniklemm</a></font></div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><br></font></div><div style="color:rgb(0,0,0);font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><font face="Calibri"><br></font></div></div></div><br class="m_-593402634074622235Apple-interchange-newline"></div><br class="m_-593402634074622235Apple-interchange-newline"></div><br class="m_-593402634074622235Apple-interchange-newline"><br class="m_-593402634074622235Apple-interchange-newline">
</div>
</span><div><br><blockquote type="cite"><span class=""><div>On Aug 8, 2018, at 12:41 PM, Mauro Morichetti <<a href="mailto:s1073755@pm.univpm.it" target="_blank">s1073755@pm.univpm.it</a>> wrote:</div><br class="m_-593402634074622235Apple-interchange-newline"></span><div><div><div class="h5"><div style="word-wrap:break-word;line-break:after-white-space">Hi all,<div><br></div><div>based on the object, I am comparing a different wrfout with some AEREONET AOD data.</div><div><br></div><div>The AOD data are in csv format:</div><div><br></div><div>yyyy mm dd hh1 AOD</div><div>yyyy mm dd hh1 AOD<br><div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word;line-break:after-white-space"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">yyyy mm dd hh1 AOD<br class="m_-593402634074622235Apple-interchange-newline">…..</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">yyyy mm dd hh2 AOD</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">yyyy mm dd hh2 AOD</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">yyyy mm dd hh2 AOD</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">….</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">The values per hour have not the same interval (one hour can have 3 values and the other one can have 5 values etc.). </div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">I should need the hourly mean in order to compare with the wrfoutput, but I can not figure out how to solve the problem, any suggestions?</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Thanks,</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Mauro</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">---------</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Eng. Mauro Morichetti</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Department of Industrial Engineering and Mathematical Science<br>Marche Polytechnic University, Ancona, Italy<br><a href="mailto:m.morichetti@pm.univpm.it" target="_blank">m.morichetti@pm.univpm.it</a></div></div>
</div>
<br></div></div></div></div><span class="">______________________________<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" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br></span></div></blockquote></div><br></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>