Mike,
One way is to get a list of the files then loop through them:
fList = systemfunc("ls -1 *.nc")
nFiles = dimsizes(fList)
do iFile = 0, nFiles-1
a = addfile(fList(iFile),"r")
make your plot
delete(a)
end do
Josh
> Hi all,
> I was wondering if it is possible to loop my input files in an ncl
> script and if so, how would I go about doing so. I am working with 20
> sets of data and I need to make about 2 or more different plots per
> data set, so its a lot of plots. Ideally I would like to be able to
> set up a script that will plot one variable and it will loop through
> all my input files and make one plot per input file. Any help or
> information would be greatly appreciated. Thanks
>
> Mike Brown
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk@ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
------
Joshua Hacker
National Center for Atmospheric Research
Research Applications Laboratory
email: hacker@ucar.edu
voice: (303) 497 8188
fax: (303) 497 8401
_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2b29 : Wed Aug 03 2005 - 22:47:08 MDT