Hi Alexandra,
Dennis's suggestion of using Unix redirection is handy for dumping
general output to a file, but if you want to write specific data (as you
might in a 'print' statement), you can use asciiwrite or write_matrix -
this approach would allow you to write specific data to several files:
http://www.ncl.ucar.edu/Document/Functions/Built-in/asciiwrite.shtml
http://www.ncl.ucar.edu/Document/Functions/Built-in/write_matrix.shtml
To use asciiwrite for a 1D array or perhaps for a string:
filepath = "/home/whatever/project_a/"
filename = "foo.txt"
output = "This is what I want to print to a file"
asciiwrite(filepath+filename,output)
Jonathan
Alexandra Jonko wrote:
> Hello,
>
>
> in NCL, is there a way to use the "print" command to print to a text
> file instead of the screen? I've looked around in the documentation,
> but wasn't able to find info in this.
>
>
> Thanks,
>
> Alex
>
> --
> _______________________________________
>
> *Alexandra K Jonko*
> Graduate Student, PhD
> College of Oceanic and Atmospheric Sciences
> Oregon State University
> 104 COAS Admin Building, Corvallis, OR 97331
> phone : +1 541 737 5704
> fax : +1 541 737 2064
> _______________________________________
>
>------------------------------------------------------------------------
>
>_______________________________________________
>ncl-talk mailing list
>ncl-talk_at_ucar.edu
>http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Oct 10 2008 - 11:10:28 MDT
This archive was generated by hypermail 2.2.0 : Fri Oct 10 2008 - 11:23:39 MDT