[ncl-talk] Question concerning listing files

Dennis Shea shea at ucar.edu
Mon Nov 21 08:51:29 MST 2016


Maybe:

Date = "20130208"

all_files = systemfunc ("ls nam*"+Date+"*grb"")  ; GRIB file in current
directory

On Mon, Nov 21, 2016 at 7:28 AM, Barry Lynn <barry.h.lynn at gmail.com> wrote:

> Hello:
>
> On: https://www.ncl.ucar.edu/Applications/addfiles.shtml
>
> there is the command:
>
> all_files = *systemfunc* <https://www.ncl.ucar.edu/Document/Functions/Built-in/systemfunc.shtml> ("ls /fs/cgd/data0/casguest/CLASS/ann*.nc")
>
> I want to include a variable in the all_files line.
>
> Date = "20130208"
>
> all_files = systemfunc ("ls 20130208/nam*grb"")
>
> Such that it includes the variable "Date."
>
> --> all_files = systemfunc ("ls Date + "nam*grb"")
>
> However, the line immediately above gives an syntax error and anything
> else I have tried is the same.
>
> Thank you,
>
> Barry
>
>
> --
> Barry H. Lynn, Ph.D
> Senior Lecturer,
> The Institute of the Earth Science,
> The Hebrew University of Jerusalem,
> Givat Ram, Jerusalem 91904, Israel
> Tel: 972 547 231 170
> Fax: (972)-25662581
>
> C.E.O, Weather It Is, LTD
> Weather and Climate Focus
> http://weather-it-is.com
> Jerusalem, Israel
> Local: 02 930 9525
> Cell: 054 7 231 170
> Int-IS: x972 2 930 9525
> US 914 432 3108
>
> _______________________________________________
> 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/20161121/28b7d7b1/attachment.html 


More information about the ncl-talk mailing list