[ncl-talk] adding multiple files
Dawit Abebe
dawit.kan at gmail.com
Sat Apr 1 07:40:56 MDT 2017
Dear NCL users,
I’m having a challenge to add multiple files to NCL. I’m intending to work on monthly files ranging from 1901 - 2014. I tried the command below but failed.
Command used
diri = "./"
ncl 29> files = systemfunc("ls *.nc")
ncl 30> f = addfiles(diri+files, "r")
Return message for all files
warning:_NclOpenFile: Can not open file <pre_199501_mondat.nc>; file format not supported or file is corrupted
The command and return for single file seems working as showed bellow:
ncl 10> diri = "./"
ncl 11> fili = "pre_201412_mondat.nc"
ncl 12> f = addfile(diri+fili, "r")
ncl 13> prc = f->pre
ncl 14> printVarSummary(prc)
Variable: prc
Type: double
Total Size: 288 bytes
36 values
Number of Dimensions: 3
Dimensions and sizes: [time | 1] x [lat | 4] x [lon | 9]
Coordinates:
time: [41987..41987]
lat: [3.75..5.25]
lon: [36.75..40.75]
Number Of Attributes: 5
correlation_decay_distance : 450
long_name : precipitation
units : mm/month
missing_value : 9.96920996839e+36
_FillValue : 9.96920996839e+36
Where is my problem?
Thanks
Dawit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170401/00c5facb/attachment.html
More information about the ncl-talk
mailing list