[ncl-talk] adding multiple files
Dawit Abebe
dawit.kan at gmail.com
Sat Apr 1 08:24:31 MDT 2017
Dear Rick,
Thanks for the response. Let me figure out how to use the ftp.
Dawit
> On Apr 1, 2017, at 5:13 PM, Rick Brownrigg <brownrig at ucar.edu> wrote:
>
> Hi,
>
> It sounds like that one file in particular, "pre_199501_mondat.nc <http://pre_199501_mondat.nc/>", is corrupt. I note that it is not the same file as the single file instance that you cited, and I *think* NCL would have ingested all the files from 1901 up to the 199501 before throwing the error. Are you able to open the file with the ncl_filedump command, or any of the NCO/CDO operators? If you want to send it to our ftp site, I'll take a look at it (instructions below).
>
> Rick
>
>
> You can ftp larger datasets and files to:
>
> ftp ftp.cgd.ucar.edu <http://ftp.cgd.ucar.edu/>
> anonymous
> <use your email address for the password>
> cd incoming
> put ...
> put ...
> .
> .
> .
> quit
> Note that for security reasons, you cannot list the contents of this directory, and neither can we. We need to know the exact names of the files in order to retrieve them.
>
>
> On Sat, Apr 1, 2017 at 7:40 AM, Dawit Abebe <dawit.kan at gmail.com <mailto:dawit.kan at gmail.com>> wrote:
> 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 <http://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 <http://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
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170401/4bfb144a/attachment.html
More information about the ncl-talk
mailing list