<p dir="ltr">Sorry, forgot to add ncl-talk to the receiver list, so reposting so everyone gets my response.</p>
<p dir="ltr">addfiles(files(::3),&quot;r&quot;)</p>
<p dir="ltr">sets the stride to 3 so every third file is opened.</p>
<div class="gmail_quote">On Aug 22, 2015 12:08 PM, &quot;Daniel Barandiaran&quot; &lt;<a href="mailto:dbarandiaran@gmail.com">dbarandiaran@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">If you do<br>
addfiles(files(::3),&quot;r&quot;)<br>
then it will grab every third file.</p>
<div class="gmail_quote">On Aug 22, 2015 11:33 AM, &quot;Saurabh Singh&quot; &lt;<a href="mailto:saurabhsingh123op@gmail.com" target="_blank">saurabhsingh123op@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><b><br></b></div><div><b><br></b></div><div><b>NCL version : 6.3.0</b></div><div><b>OS: UBUNTU</b></div><div><br></div>I am working with hourly WRF files for an year to extract variables. i use add-files to add hourly files for an year. The problem is there are too many files in a year which makes the simulation very slow. in order to overcome this i want to select every 3rd file in the directory (i.e making extraction of 3 hourly files) . My problem is that , is there any way i can change my command:                         <div> <b>files = systemfunc(&quot;ls -1 /media/cee2/cee2/1988knew/wrfout_d01_1988*&quot;) + &quot;.nc&quot;<br>   a = addfiles(files,&quot;r&quot;)</b>  to select every 3-hourly files in the directory ?<br><div><br></div>-- <br><div><div dir="ltr"><font style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif" size="2"><span>With regards</span><span></span></font><font style="font-family:arial,helvetica,sans-serif" size="2"><span style="color:rgb(0,0,0)"><span><br></span></span></font><font style="font-family:arial,helvetica,sans-serif" size="2"><span style="color:rgb(0,0,0)"><span>Saurabh Kumar singh</span><span></span>
</span></font><br style="color:rgb(51,204,0)"><br><font style="color:rgb(102,102,102)" size="1"> <b><i><span style="font-family:Webdings" lang="EN-GB">P</span></i></b><b><i><span style="font-family:Tahoma,sans-serif" lang="EN-GB"> : </span></i></b><b><i><span style="font-family:Arial,sans-serif" lang="EN-GB"> </span></i></b><b><i><span style="font-family:Tahoma,sans-serif" lang="EN-GB">Please consider the environment before printing this e-mail</span></i></b> </font><br style="color:rgb(102,102,102)"><br><br><br></div></div>
</div></div>
<br>_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div>
</blockquote></div>