[ncl-talk] file selection
Daniel Barandiaran
dbarandiaran at gmail.com
Sat Aug 22 12:12:08 MDT 2015
Sorry, forgot to add ncl-talk to the receiver list, so reposting so
everyone gets my response.
addfiles(files(::3),"r")
sets the stride to 3 so every third file is opened.
On Aug 22, 2015 12:08 PM, "Daniel Barandiaran" <dbarandiaran at gmail.com>
wrote:
> If you do
> addfiles(files(::3),"r")
> then it will grab every third file.
> On Aug 22, 2015 11:33 AM, "Saurabh Singh" <saurabhsingh123op at gmail.com>
> wrote:
>
>>
>>
>> *NCL version : 6.3.0*
>> *OS: UBUNTU*
>>
>> 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:
>>
>> *files = systemfunc("ls -1 /media/cee2/cee2/1988knew/wrfout_d01_1988*") +
>> ".nc" a = addfiles(files,"r")* to select every 3-hourly files in the
>> directory ?
>>
>> --
>> With regards
>> Saurabh Kumar singh
>>
>> *P** : * *Please consider the environment before printing this e-mail*
>>
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150822/e03c2007/attachment.html
More information about the ncl-talk
mailing list