[ncl-talk] write_table and headers

Tabish Ansari tabishumaransari at gmail.com
Sat Jun 15 09:14:14 MDT 2019


Hi Alyce

You should do as follows:
write_table(file, "w", headers , "%s ") ; write the header first in the
empty file
write_table(file, "a", strings, "%s %f") ; append the file with data

Cheers

Tabish

Tabish U Ansari
PhD student, Lancaster Environment Center
Lancaster Univeristy
Bailrigg, Lancaster,
LA1 4YW, United Kingdom


On Sat, 15 Jun 2019 at 08:33, Alyce Sala Tenna <alsalte at gmail.com> wrote:

> Hello,
>
> New to NCL. What would be the reason why my headers won’t write with the
> write_table function?
> ; write table
> headers = [/" timestamp "," T2 "/]
> strings = [/time1,t1C/]
> file = “1hr_T2.txt”
> system("/bin/rm -f "+file)                              ; remove any
> pre-existing file
>
> write_table(file, "w", [/"moolort wrf data"/], "%s ")
> write_table(file, "a", [/"timestamp","T2"/], "%s %s ")
> write_table(file, "a", strings, "%s %f")
>
> Hope it’s any easy one!
>
> Many thanks
> Alyce
> _______________________________________________
> 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/20190615/cd8dfda8/attachment.html>


More information about the ncl-talk mailing list