[ncl-talk] asciiread
Ehsan Taghizadeh
ehsantaghizadeh at yahoo.com
Tue Oct 6 08:17:51 MDT 2020
Dears,I would like to read a ".csv" file including different fields. Some arrays have no data and are empty. May I ask how I handle this file? I've tried the following lines, but I got the following warning because of arrays with no data.
f = "ncl.csv" lnst = asciiread(f,-1,"string") delim = ","
;-Read fields pr = tofloat(str_get_field(lnst(1:),7, delim))
error:warning: tofloat: A bad value was passed to (string) tofloat, input strings must contain numeric digits, replacing with missing value
I've attached a sample input file and I'll be thankful if I hear from you.
Sincerely,Ehsan TaghizadehUniversity of Tehran, Iran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201006/40d49d6e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ncl.csv
Type: application/vnd.ms-excel
Size: 1635 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201006/40d49d6e/attachment.xlb>
More information about the ncl-talk
mailing list