<div dir="ltr"><div class="gmail_default" style="font-size:small">Kunal,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I'm a little confused by what you are asking for. You said you wanted to extract all 30 days of data instantly, which is what the previous "addfiles" example was meant to show. You don't need a loop to extract all the data.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Did you actually try my suggestion of changing your script to use "addfiles" instead of "addfile"? If so, and you are still having a problem, then it would help to see the new version of your script.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Maybe my confusion is with what you want to do with the data after you extract all 30 days of data. Please be more specific if possible.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 30, 2017 at 10:19 PM, Kunal Bali <span dir="ltr"><<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</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><div>Dear Mary,<br><br></div>Thanks for the suggestions. <br></div>But still, it's extracting one file at a time, not extracting all the 30-day files separately of UK and NEP (as mentioned in the script). <br><span class="HOEnZb"><font color="#888888"><div><div><div><br><br></div></div></div></font></span><div class="gmail_extra"><span class="HOEnZb"><font color="#888888"><br clear="all"><div><div class="m_372109147063714032gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Kunal Bali<br></div><br><div><br></div><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div></font></span><div><div class="h5">
<br><div class="gmail_quote">On Fri, Mar 31, 2017 at 3:09 AM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@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 style="font-size:small">Kunal,</div><div style="font-size:small"><br></div><div style="font-size:small">You should be able to use "addfiles" to open all your files, and then read your data using the special [:] syntax:</div><div style="font-size:small"><br></div><div style="font-size:small"><div><font face="monospace, monospace"> dir = "/home/kunal/"</font></div><div><font face="monospace, monospace"> fnames = systemfunc("ls " + dir + "DAY_*.nc")</font></div><div><font face="monospace, monospace"> a = addfiles(fnames,"r")<br><span class="m_372109147063714032m_8302767070546682313gmail-s1"> data = a[:]</span><span class="m_372109147063714032m_8302767070546682313gmail-s2">-></span><span class="m_372109147063714032m_8302767070546682313gmail-s1">bcfire</span></font></div></div><div style="font-size:small"><br></div><div style="font-size:small">For more information see our addfiles examples page:</div><div style="font-size:small"><br></div><div><a href="http://www.ncl.ucar.edu/Applications/addfiles.shtml" target="_blank">http://www.ncl.ucar.edu/Applic<wbr>ations/addfiles.shtml</a><br></div><div><br></div><div>--Mary</div><div><br></div><div style="font-size:small"><p class="m_372109147063714032m_8302767070546682313gmail-p1"><span class="m_372109147063714032m_8302767070546682313gmail-s1"><br></span></p><p class="m_372109147063714032m_8302767070546682313gmail-p1"><span class="m_372109147063714032m_8302767070546682313gmail-s1"><br></span></p></div><div style="font-size:small"><br></div><div style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_372109147063714032h5">On Thu, Mar 30, 2017 at 12:42 PM, Kunal Bali <span dir="ltr"><<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</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="m_372109147063714032h5"><div dir="ltr"><div>Dear NCL users<br><br><br></div>I have the data of 30 days. I want to extract this data with the loop.The attached script is based on to extract the data of a single day. So it's a tedious job to extract all the 30 days data one by one. So could anyone tell me that how to start the loop in the attached file so the I can get 30 days extracted data instantly. <br><br>Thank You<br><br>Regards<span class="m_372109147063714032m_8302767070546682313HOEnZb"><font color="#888888"><br clear="all"><div><div><div><div class="m_372109147063714032m_8302767070546682313m_2756078572688045071gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Kunal Bali<br></div><br><div><br></div><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div>
</div></div></font></span></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></div></div></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>