<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Sujit,<div class=""><br class=""></div><div class="">The simplest way to open multiple wrfout files would be something like this:</div><div class=""><font face="Menlo" class="">files = systemfunc("ls wrfout_d01_2016-12*")</font></div><div class=""><font face="Menlo" class="">f = addfiles(files, "r")</font></div><div class=""><br class=""></div><div class="">This will load all files that begin with “<span style="font-family: Menlo;" class="">wrfout_d01_2016-12</span>” (in other words any file from December 2016).</div><div class=""><br class=""></div><div class="">If you want to include files from 2017 as well, you could run:</div><div class=""><div class=""><font face="Menlo" class="">files = systemfunc("ls wrfout_d01_2016-12* </font><span style="font-family: Menlo;" class="">wrfout_d01_2017*</span><span style="font-family: Menlo;" class="">")</span></div><div class=""><font face="Menlo" class="">f = addfiles(files, "r")</font></div></div><div class=""><br class=""></div><div class="">This will load all files that begin with “<span style="font-family: Menlo;" class="">wrfout_d01_2016-12</span>” or “<span style="font-family: Menlo;" class="">wrfout_d01_2017</span>” (in other words any file from December 2016 or all of 2017). </div><div class=""><br class=""></div><div class="">Alternatively, if you need more control over which files are selected, you could try something like this instead:</div><div class=""><div class=""><font face="Menlo" class="">files = systemfunc("ls wrfout_d01_2016-12-0[123]*")</font></div><div class=""><font face="Menlo" class="">f = addfiles(files, "r")</font></div><div class=""><br class=""></div></div><div class="">This loads all files that begin with “<span style="font-family: Menlo;" class="">wrfout_d01_2016-12-0</span>” and where the following character is 1, 2, or 3 (so just December 1 through 3).</div><div class=""><br class=""></div><div class="">Finally, you can also include time with the date in your “ls” command. For example, if you wanted all files from December 1 through 9 at 12:00:</div><div class=""><div class=""><font face="Menlo" class="">files = systemfunc("ls wrfout_d01_2016-12-0[0-9]_12:00:00")</font></div><div class=""><font face="Menlo" class="">f = addfiles(files, "r")</font></div></div><div class=""><br class=""></div><div class="">I hope this helps,</div><div class=""><br class=""></div><div class="">Kevin </div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 12, 2017, at 12:05 AM, Sujit Maji <<a href="mailto:sujit.cat@tropmet.res.in" class="">sujit.cat@tropmet.res.in</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi all,<br class=""><br class="">Have anyone tried to select wrfout*(WRF model output) files (as input to addfiles function in ncl) based on the date stamp on filename ?<br class=""><br class="">e.g. suppose filename is  wrfout_d01_2016-12-01_00:00:00 <br class=""><br class="">and <br class=""><br class="">I want to select files with dates later than 2016_12_01 (1st December 2016) in filename i.e. wrfout_d01_2016-12-02_00:00:00 or wrfout_d01_2016-12-03_00:00:00. <br class=""><br class=""><br class="">I don't have expertise in sed,awk or find utilities of GNU. That's why I asked.<br class=""><br class="">If anyone have tried please share any experience.<br class=""><br class="">Thanks and regards,<br class="">Sujit Maji<br class="">IITM Pune<br class="">_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class=""></div></div></blockquote></div><br class=""></div></body></html>