NCAR / ncl

The NCAR Command Language (NCL) is a scripting language for the analysis and visualization of climate and weather data.

Home Page:http://www.ncl.ucar.edu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

systemfunc_ncl reading nc files

cicy996 opened this issue · comments

commented

Dear all,

I am trying to readingsome 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.
So please help me how to choose the files from number 15 to 29.

Thank you very much!
Chang

try this:
import glob
file=glob.glob(r'191001_201910[15:29].nc')
for f in file:

commented

try this:
import glob
file=glob.glob(r'191001_201910[15:29].nc')
for f in file:

Thanks for your reply.
But really sorry that I used ncl rather than python to read files.

omg,I didn't notice,sry

commented

Solved:
https://mailman.ucar.edu/pipermail/ncl-talk/2021-April/018077.html

Thanks a lot. This issue got solved.