[ncl-talk] fatal:["Execute.c":8575]:

Gus Correa gus at ldeo.columbia.edu
Mon Jun 12 13:52:51 MDT 2017


The error message:

 > fatal:asciiread: Unable to open input file (1973.txt)

indicates a problem with the input file "1973.txt",
not an actual NCL error.

That could be due to several things, for instance:

A) the file "1973.txt" doesn't exist;
B) the file "1973.txt" exists, but it is in a directory different from 
where you're running your NCL script;
C) the file "1973.txt" exists, but you don't have reading permissions.
D) the file "1973.txt" exists, but it is an empty file, or perhaps not
an ASCII file.

Things you could do as a quality control before you run the script:

1) As Marston suggested, do an "ls -l 1973.txt", to check if the file
exists in the NCL script directory, to see its size (i.e. if it is empty
or not), and to check the reading permissions.

2) Also, you can do "file 1973.txt" to see the file type (and whether it 
is ASCII).

3) If it is an ASCII file, "head 1973.txt" will show the
first 10 lines, which you may use to see if the file format
is what you expect it to be.

I hope this helps,
Gus Correa

On 06/12/2017 09:33 AM, Marston Johnston wrote:
> Hi,
> 
> It’s difficult to help with such little information.
> 
> You could check the path to the file and the file name you are passing 
> to NCL.
> 
> In many cases the error lies there. It is good practice in these cases 
> to print the full path and file name, copy and paste it in a terminal 
> and do a “ls …” check.
> NCL also has a file check function. You could use this function in the 
> script before opening the file.
> 
> /M
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Marston S. Johnston, PhD
> 
> Department of Earth Sciences
> 
> University of Gothenburg, Sweden
> 
> Email: marston.johnston at gu.se <mailto:marston.johnston at gu.se>
> 
> SkypeID: marston.johnston
> 
> Phone: +46-31-7864901
> 
> Only the fruitful thing is true!
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> *From: *<ncl-talk-bounces at ucar.edu> on behalf of "Wen.J.Qu" 
> <wen.j.qu at gmail.com>
> *Organization: *OUC
> *Reply-To: *<Wen.J.Qu at gmail.com>
> *Date: *Monday, 12 June 2017 at 15:21
> *To: *ncl-talk <ncl-talk at ucar.edu>
> *Cc: *"Shawn [Qu Wenjun]" <quwj at 163.com>
> *Subject: *[ncl-talk] fatal:["Execute.c":8575]:
> 
> Dear friends,
> 
> I am reaing some data into NCL, but encounter the following error.
> 
> Would you please give me some hint to fix it? Thanks a lot in advance.
> 
> Wenjun
> 
> fatal:asciiread: Unable to open input file (1973.txt)
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 46 in 
> file read_incontinue_sounding_calculate_ri_blh.ncl
> 
> ------------------------------------------------------------------------
> 
> Wen.J.Qu
> 
> 2017-06-12
> 
> _______________________________________________ ncl-talk mailing list 
> ncl-talk at ucar.edu List instructions, subscriber options, unsubscribe: 
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> 
> 
> 
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> 



More information about the ncl-talk mailing list