[ncl-talk] Fwd: Errors in file opening

Arka Banerjee arka354deb at gmail.com
Fri Dec 22 01:51:33 MST 2017


Now this is the error coming after using fbiinread.


Datadir=("/home/arkadeb/Arka/GMFD/GSMap/")
diri=Datadir
all_files=systemfunc("ls " + diri + "gsmap_nrt*")
print(all_files)
n_files=dimsizes(all_files)
print(n_files)
do n=0, n_files-1, 1
filename=all_files(n)
print(filename)
fn=fbiinread(filename,0,-1,"float")
;print(fn)
;end do

errors are below:

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
fatal:Undefined identifier: (fbiinread) is undefined, can't continue
fatal:["Execute.c":8640]:Execute: Error occurred at or near line 16 in file
Gsmap.ncl





On Fri, Dec 22, 2017 at 2:12 PM, Arka Banerjee <arka354deb at gmail.com> wrote:

> I also earlier make the same question to them. I already see the page link
> : https://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml
>
> From where it is clear that addfiles/addfile cant be use for dat files.
> But I got one sample example following my question which gives
> addfile option inside.
>
> I am testing with fbiinread now as you mentioned and will inform you.
>
> Thanks,
> Arka
>
> On Fri, Dec 22, 2017 at 2:06 PM, Guido Cioni <guidocioni at gmail.com> wrote:
>
>> 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/9aa14961/attachment.html>


More information about the ncl-talk mailing list