Re: To add row and column headings to an ascii file

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Oct 23 2012 - 10:02:48 MDT

See "Method 2" at:

http://www.ncl.ucar.edu/Applications/o-ascii.shtml

This uses sprintf and sprinti to create formatted strings. You can easily add an additional element to "lines" to add some headers.

I believe "Method 1" should be easier, but this will only be in the 6.1.0 release.

--Mary

On Oct 19, 2012, at 4:10 AM, Noel Aloysius wrote:

> Hi NCL,
>
> I want to add row and column heading to a 5x30 matrix and write an ascii output. The write_matrix function works well if I just want to write only the numbers.
>
> How can I write the file with the row and column headings?
>
> Here is how I write the ascii file now,
>
> opt = True
> opt@fout = diro + "pr_extreme_values_count.txt"
> system("rm -f " + opt@fout) ; delete existing file
> write_matrix(transpose(Plarge_ens),"12f12.4",opt)
>
>
> Thanks,
> Noel
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Oct 23 10:02:59 2012

This archive was generated by hypermail 2.1.8 : Tue Oct 23 2012 - 11:10:04 MDT