[ncl-talk] systenfunc_ncl reading files

Dennis Shea shea at ucar.edu
Mon Apr 19 09:32:40 MDT 2021


Likely,  there are better ways but the following should work

fnam159 = *systemfunc*("ls 191001_2019101[5-9].nc")
fnam209 = *systemfunc*("ls 191001_2019102[0-9].nc")

fnam = *array_append_record*
<http://www.ncl.ucar.edu/Document/Functions/Contributed/array_append_record.shtml>
(fnam159, fnam209, 0)
print(fnam)

===


On Mon, Apr 19, 2021 at 8:45 AM LIU Chang via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Dear all,
>
> I am trying to reading some netcdf files. These files names are
> 191001_20191015, 191001_20191016, ... 191001_20191029.
> When I code *files = systemfunc("ls "+diri+"191001_201910[15:29].nc")*
> It will print 191001_20191010, 191001_20191011, ... 191001_20191029.
> Would you mind helping me how to choose the files from number 15 to 29.
>
> Thank you very much!
> Chang
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210419/ec922e27/attachment.html>


More information about the ncl-talk mailing list