[ncl-talk] Errors in file opening

Guido Cioni guidocioni at gmail.com
Fri Dec 22 01:36:40 MST 2017


Again.. Don't open a new thread when new problems arise!

As already told you by Dennis you CAN'T open binary files with addfile. You
have to open them with fbiinread. Please read the documentation AND the
mail that we are writing to you.

Il 22 dic 2017 8:47 AM, "Arka Banerjee via ncl-talk" <ncl-talk at ucar.edu> ha
scritto:

> Hello user..
>
> I run the attached part in my script and getting the following error msgs;
>
> begin
>
> Datadir=("/home/GSMap/")
> diri=Datadir
> all_files=systemfunc("ls " + diri + "gsmap_nrt*")
> n_files=dimsizes(all_files)
> do n=0,n_files-1,1
> filename=all_files(n)
> fn=addfile(filename,"r")
> .......
> .......
>
> warning:_NclOpenFile: Can not open file </home/GSMap/gsmap_nrt.20100805.0600.dat>;
> file format not supported or file is corrupted
> warning:_NclOpenFile: Can not open file </home/GSMap/gsmap_nrt.20100805.0900.dat>;
> file format not supported or file is corrupted
> warning:_NclOpenFile: Can not open file </home/GSMap/gsmap_nrt.20100805.1200.dat>;
> file format not supported or file is corrupted
> warning:_NclOpenFile: Can not open file </home/GSMap/gsmap_nrt.20100805.1500.dat>;
> file format not supported or file is corrupted
> warning:_NclOpenFile: Can not open file </home/GSMap/gsmap_nrt.20100805.1800.dat>;
> file format not supported or file is corrupted
> warning:_NclOpenFile: Can not open file </home/GSMap/gsmap_nrt.20100806.2100.dat>;
> file format not supported or file is corrupted
>
> fatal:Could not coerce values for operation
> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 30 in
> file Gsmap.ncl
>
>
>
> print(filename) shows the following error msg for each files;
>
> Variable: filename
> Type: string
> Total Size: 8 bytes
>             1 values
> Number of Dimensions: 1
> Dimensions and sizes:   [1]
> Coordinates:
> (0)     /home/GSMap/gsmap_nrt.20100805.0600.dat
> warning:_NclOpenFile: Can not open file </home/GSMap/gsmap_nrt.20100805.0600.dat>;
> file format not supported or file is corrupted
>
>
>
> Please inform me how to fix it.
>
> Thanks,
> Arka
>
> _______________________________________________
> 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/20171222/ba2e4acc/attachment.html>


More information about the ncl-talk mailing list