[ncl-talk] formatted output (write_table)
ousmane ndiaye
ondiaye70 at gmail.com
Wed Sep 20 09:59:54 MDT 2017
hi,
I am reading a file with text and numbers and want to rewrite it with a
format i am using this program but it is not working
==
lines = asciiread("stat_station.csv",-1,"string")
nom = str_get_field(lines(0:),1,",")
idis=stringtofloat(str_get_field(lines(0:),2,","))
lon=stringtofloat(str_get_field(lines(0:),3,","))
lat=stringtofloat(str_get_field(lines(0:),4,","))
write_table("dat1.txt", "w", alist1, "%s %2.0f %5.1f %5.1f ")
==
any help
I want to rewrite to this output format :
BAKEL 1 -12.46666 14.9
BAMBEY -1 -16.46666 14.7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170920/6333587e/attachment.html>
More information about the ncl-talk
mailing list