[ncl-talk] Remove white-spaces from write_table output [SEC=UNCLASSIFIED]

Griffith Young griffith.young at bom.gov.au
Wed Aug 9 17:29:36 MDT 2017


This is not an NCL solution but it may suit your needs or be applicable elsewhere.

sed 's/ //g' infile.txt > outfile.txt

It is a global find and replace of all spaces in a file.

I mention this in the case where write_table() does not meet your needs.

Griff.

From: ncl-talk-bounces at ucar.edu [mailto:ncl-talk-bounces at ucar.edu] On Behalf Of Rabah Hachelaf
Sent: Thursday, 10 August 2017 7:14 AM
To: ncl-talk
Subject: [ncl-talk] Remove white-spaces from write_table output


Hello,
I am wounding why there is a systematic white-spaces between values although they are removed from the format specifier.
How can i remove white spaces from in this case.

Thank you


begin
outfile = "test.txt"
sounding_check = [/2,"99999","99999","99999","99999","99999","99999"/]
write_table(outfile,"a",sounding_check,"%2i%s%s%s%s%s%s")

end


output :
 2 99999 99999 99999 99999 99999 99999
--
------------------------------
Best regards,
Rabah Hachelaf

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170809/c08a1474/attachment.html 


More information about the ncl-talk mailing list