[ncl-talk] how to separate data with tab using function write_matrix
Dennis Shea
shea at ucar.edu
Mon Apr 23 10:43:52 MDT 2018
https://www.ncl.ucar.edu/Document/Functions/Built-in/str_get_tab.shtml
*UNTESTED*: Lets say you want 10 numbers for each row with all numbers
preceded by a
*tab.*
*Note: *
*fout* String specifying the output file name. If not present, the data is
sent to standard out.
*The maximum length of fout is 96 characters.*
I think the fortran character variable is set at 96
*---*
tab = *str_get_tab*()
fmt = "10("+tab+",f7.1)" ; clarity
print("fmt="+fmt)
opt = True
opt at fout "./TEXT_with_TAB" ; "./test/text_with_tab/"
system("/bin/rm -f "+opt at fout) ; rm any pre-existing file
write_matrix (x, fmt, False)
Let ncl-talk know if this works.
THX
On Sun, Apr 22, 2018 at 8:20 PM, wen <wenguanhuan at 163.com> wrote:
> Hi all,
> I want to write a 2 dimensional data into a file using function
> write_matrix. I expect to separate data with character tab. How can I
> realize that? Hope you can help. Thank you!
>
>
>
>
> --
> Best regards,
> Guanhuan Wen
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180423/bd6e6c37/attachment.html>
More information about the ncl-talk
mailing list