<div dir="ltr"><div><div><div><br></div>Thank you for your email. And, I apologize that my question framing wasn't right. <br><br></div>I can read those text files. I wanted to know about reading files for only some particular stations which is listed in a separate text file. <br><br></div><div>There might be years in which that particular station data is not present and if present every year dimension of the data is different. But, I wanted to save all the data under the same variable in (hour,day,year) format. <br><br></div><div>Now, I have an idea how to handle it. <br></div><div><br></div><div>Thanks,<br></div><div>Soumik<br></div><div><div><div><div><br><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 11, 2017 at 6:36 AM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></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>Did you look at NCL IO examples:<br> <a href="https://www.ncl.ucar.edu/Applications/read_ascii.shtml" target="_blank">https://www.ncl.ucar.edu/<wbr>Applications/read_ascii.shtml</a><br></div><div>We create these pages for users to look at.<br><br>===<br></div><div><br></div><div>There is nothing 'special' about these ascii/text files.<br><br></div>After unzipping, these are simple files<br><br>2016 01 01 00 52 -36 10120 230 30 -9999 -9999 -9999<br>2016 01 01 01 45 -40 10122 90 30 -9999 -9999 -9999<br><div>[snip]<br></div><div> ncol = 12<br></div><div><pre> dasc = "./" ; input directory for ascii files
fid = "<a class="m_-5476106385392135353gmail-file" href="ftp://ftp.ncdc.noaa.gov/pub/data/noaa/isd-lite/2016/013470-99999-2016.gz" target="_blank">*2016</a>" ; a unique identifier for files
fasc = systemfunc ("cd "+ dasc+" ; ls "+fid)<br> pasc = dasc+fasc<br></pre><pre> nfil = dimsizes(fasc)<br></pre><pre> do nf=0,nfil-1<br></pre><pre> ; You can now read the file via "asciiread".
nrows = <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/numAsciiRow.shtml" target="_blank"><strong>numAsciiRow</strong></a>(pasc(nf)) ; contributed.ncl
data := <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/asciiread.shtml" target="_blank"><strong>asciiread</strong></a>(pasc,(/nrows,ncols/)<wbr>,"float")
data@_FillValue = -9999.0<br></pre><pre> yyyy := toint( data(:,0) )<br><br></pre><pre>etc<br></pre><pre> end do<br><br>===<br></pre><pre>Please read the section:<br><br><b>How to read multiple ASCII files into one variable in NCL</b>.<br><br></pre><pre>Good luck<br></pre></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Jul 10, 2017 at 6:28 PM, Soumik Basu <span dir="ltr"><<a href="mailto:sbasu@alaska.edu" target="_blank">sbasu@alaska.edu</a>></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"><div><div><div><div>Hi,<br><br></div>I am wondering if there is any example in NCL showing how to read noaa isd-lite dataset and link the data to the list of stations. <br><br><a href="ftp://ftp.ncdc.noaa.gov/pub/data/noaa/isd-lite/" target="_blank">ftp://ftp.ncdc.noaa.gov/pub/da<wbr>ta/noaa/isd-lite/</a><br><br></div>Thank you in advance for any help. <br><br></div>Thanks,<br></div>Soumik<br clear="all"><div><div><div><div><div><div><br>-- <br><div class="m_-5476106385392135353m_-2753386862720728094gmail_signature"><div dir="ltr"><div><div>-- </div><div>"Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning." - Albert Einstein</div><div><br></div><div>******************************<wbr>******************************<wbr>******************************<wbr>********</div><div>Dr. Soumik Basu</div><div>Post Doctoral Fellow, International Arctic Research Center, UAF, Fairbanks, AK, USA</div><div>Nanjing University of Information Science and Technology, Nanjing, China</div><div>PhD in Atmospheric Sciences</div><div>M.Sc. in Atmospheric Sciences</div><div>Email: <a href="mailto:suvro05@gmail.com" target="_blank">suvro05@gmail.com</a></div><div>website: <a href="http://soumikbasu.weebly.com/" target="_blank">http://soumikbasu.weebly.com/</a></div><div><br></div><div>******************************<wbr>******************************<wbr>******************************<wbr>*********</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"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div>-- </div><div>"Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning." - Albert Einstein</div><div><br></div><div>**************************************************************************************************</div><div>Dr. Soumik Basu</div><div>Post Doctoral Fellow, International Arctic Research Center, UAF, Fairbanks, AK, USA</div><div>Nanjing University of Information Science and Technology, Nanjing, China</div><div>PhD in Atmospheric Sciences</div><div>M.Sc. in Atmospheric Sciences</div><div>Email: <a href="mailto:suvro05@gmail.com" target="_blank">suvro05@gmail.com</a></div><div>website: <a href="http://soumikbasu.weebly.com/" target="_blank">http://soumikbasu.weebly.com/</a></div><div><br></div><div>***************************************************************************************************</div></div></div></div>
</div>