[ncl-talk] Supported file types for asciiread
Ryan Connelly
rconne01 at gmail.com
Fri Apr 22 15:13:53 MDT 2016
Hi all,
Trying to read in sounding data that I have in a .txt file using the
asciiread function (
https://www.ncl.ucar.edu/Document/Functions/Built-in/asciiread.shtml):
f = addfile("../2016020512_sounding.asc","r")
data_obs = asciiread(f,-1,"string") % Loads text file
p_obs = tofloat(str_get_field(data_obs,1," ")) % Reads in first
column, which is pressure in hPa
etc...
But I get:
warning:["FileSupport.c":3026]:NCL does not know anything about file suffix
<txt>.
But NCL will try its best to figure out the file format.
fatal:An internal error has occurred. The file format requested does not
appear to be supported, could not open (../2016020500_sounding_OKX.txt)
fatal:Argument type mismatch on argument (0) of (asciiread) can not coerce
Even the examples on this page use .txt files, and I've tried .asc and .csv
with the same error message, so what is the problem here?
Ryan
--
Ryan Connelly
M.S. Student in Atmospheric Sciences, Stony Brook University
B.S. in Meteorology with Minors in Mathematics and GIS, Valparaiso
University
rconne01 at gmail.com
ryan.connelly at stonybrook.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160422/1dc95c7d/attachment.html
More information about the ncl-talk
mailing list