[ncl-talk] loop_query

Mary Haley haley at ucar.edu
Thu Mar 30 15:39:24 MDT 2017


Kunal,

You should be able to use "addfiles" to open all your files, and then read
your data using the special [:] syntax:

  dir    = "/home/kunal/"
  fnames = systemfunc("ls " + dir + "DAY_*.nc")
  a      = addfiles(fnames,"r")
  data = a[:]->bcfire

For more information see our addfiles examples page:

http://www.ncl.ucar.edu/Applications/addfiles.shtml

--Mary






On Thu, Mar 30, 2017 at 12:42 PM, Kunal Bali <kunal.bali9 at gmail.com> wrote:

> Dear NCL users
>
>
> 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.
>
> Thank You
>
> Regards
> Kunal Bali
>
>
>
>
>
> _______________________________________________
> 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/20170330/ac6bfaed/attachment.html 


More information about the ncl-talk mailing list