Re: Writing txt file

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Oct 08 2012 - 09:54:04 MDT

Hi Guilherme,

You didn't say exactly what the problem is. The script looks okay, but I can't execute it without the ASCII file, so I'm not sure what it's doing.

To run your script, you should use:

   ncl -Q -n media_diaris.ncl > fileout.txt

The "-Q" turns off the header stuff that gets echoed by NCL (like the version number, the copyright, etc), and the "-n" turns off those "(0)" characters at the beginning of each lilne.

Given that you are formatting each string differently, using "sprintf" is the correct way to go. "asciiwrite" only writes one line per row.

In NCL Version 6.1.0, you will be able to use "print_table":

http://www.ncl.ucar.edu/Document/Functions/Built-in/print_table.shtml

--Mary

On Oct 8, 2012, at 5:35 AM, Guilherme Martins wrote:

> Hi users,
>
> I want to write to txt file, but I don't get. I tried the asciiwrite, but it don't work. See the file in attach.
>
> Thanks,
>
> Guilherme.
>
> --
> Guilherme Martins
> http://guilhermemartins.hd1.com.br/
>
>
>
> <media_diaris.ncl>_______________________________________________
> 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 Mon Oct 8 09:54:11 2012

This archive was generated by hypermail 2.1.8 : Mon Oct 08 2012 - 15:54:16 MDT