<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Thank you very much Stephen, but my version of GrADS (v2 windows xp) does not recognize the WRITE command. Are you using a newer or older version than the version 2?</DIV>
<DIV>Thank you again for your support. I appreciate it!</DIV>
<DIV>teddy <BR><BR></DIV>
<DIV>
<DIV><STRONG>web: <A href="http://personal.ecu.edu/tla0923/HOME.html" target=_blank rel=nofollow>http://personal.ecu.edu/tla0923/HOME.html</A></STRONG></DIV>
<DIV><STRONG>"To move quickly, go alone. To move far, go</STRONG> <STRONG><EM><FONT color=#ff0000>together</FONT></EM>."</STRONG></DIV>
<DIV><STRONG>African Proverb </STRONG><STRONG> *</STRONG></DIV></DIV>
<DIV><STRONG></STRONG> </DIV><BR><BR>--- On <B>Wed, 1/7/09, Stephen R McMillan <I><smcmillan@PLANALYTICS.COM></I></B> wrote:<BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">From: Stephen R McMillan <smcmillan@PLANALYTICS.COM><BR>Subject: Re: GrADS output to textfile?<BR>To: GRADSUSR@LIST.CINECA.IT<BR>Date: Wednesday, January 7, 2009, 1:35 AM<BR><BR>
<DIV id=yiv1087039344><BR><FONT face=sans-serif size=2>Teddy,</FONT><BR><FONT face=sans-serif size=2>The fwrite command produces binary, not text output. To produce ascii text output of what you're currently displaying, use 'set gxout print'. You control the output with 'set prnopts....' Display your data, then write to file using the write command. Here's a simple example (assuming file is open and appropriately dimensioned):</FONT><BR><BR><FONT face=sans-serif size=2>'set gxout print'</FONT><BR><FONT face=sans-serif size=2>'set prnopts %0.1f 10 1'</FONT><BR><FONT face=sans-serif size=2>'d air-273.16'</FONT><BR><FONT face=sans-serif size=2>dummy=write('c:/temp/output.txt',result)</FONT><BR><BR><FONT face=sans-serif size=2>Your output might look something like this:</FONT><BR><FONT face="Courier New" size=2>Printing Grid -- 77 Values -- Undef = 32766</FONT><BR><FONT face="Courier New" size=2>11.1 10.7 8.4 9.0 12.9 15.4 16.3 17.1
17.5 17.5 </FONT><BR><FONT face="Courier New" size=2>17.6 8.3 8.6 7.0 6.3 8.2 10.3 11.7 12.4 13.0 </FONT><BR><FONT face="Courier New" size=2>13.8 13.9 7.0 7.8 6.8 4.2 3.1 4.7 7.0 7.9</FONT><BR><FONT face="Courier New" size=2>-2.2 0.1 2.4 3.2 3.5 0.8 0.2 -2.3 -4.3 -4.7</FONT><BR><BR><FONT face="Courier New" size=2>You could also output one grid value at a time without using 'set gxout print' and 'set prnopts.' </FONT><FONT face=sans-serif size=2>The opengrads cookbook listing you referenced goes </FONT><FONT face="Courier New" size=2>into more detail on the above and alternate methods. Additional references:</FONT><BR><FONT face=sans-serif size=2>set gxout print: http://grads.iges.org/grads/gadoc/gradcomdsetgxout.html</FONT><BR><FONT face=sans-serif size=2>set prnopts: http://grads.iges.org/grads/gadoc/gradcomdsetprnopts.html</FONT><BR><FONT face=sans-serif size=2>write command:
http://grads.iges.org/grads/gadoc/script.html#intrinsic</FONT><BR><BR><FONT face=sans-serif size=2>Stephen McMillan</FONT><BR><BR><BR><BR><BR>
<TABLE width="100%">
<TBODY>
<TR vAlign=top>
<TD width="40%"><FONT face=sans-serif size=1><B>Teddy Allen <teddyallen@YAHOO.COM></B></FONT><BR><FONT face=sans-serif size=1>Sent by: GRADSUSR@LIST.CINECA.IT</FONT>
<DIV><FONT face=sans-serif size=1>01/06/2009 05:36 PM</FONT>
<TABLE border=1>
<TBODY>
<TR vAlign=top>
<TD bgColor=white>
<DIV align=center><FONT face=sans-serif size=1>Please respond to<BR>teddyallen@yahoo.com</FONT></DIV></TR></TBODY></TABLE><BR></DIV>
<TD width="59%">
<TABLE width="100%">
<TBODY>
<TR vAlign=top>
<TD>
<DIV align=right><FONT face=sans-serif size=1>To</FONT></DIV>
<TD><FONT face=sans-serif size=1>GRADSUSR@LIST.CINECA.IT</FONT>
<TR vAlign=top>
<TD>
<DIV align=right><FONT face=sans-serif size=1>cc</FONT></DIV>
<TD>
<TR vAlign=top>
<TD>
<DIV align=right><FONT face=sans-serif size=1>Subject</FONT></DIV>
<TD><FONT face=sans-serif size=1>GrADS output to textfile?</FONT></TR></TBODY></TABLE><BR>
<TABLE>
<TBODY>
<TR vAlign=top>
<TD>
<TD></TR></TBODY></TABLE><BR></TR></TBODY></TABLE><BR><BR>
<TABLE width="100%">
<TBODY>
<TR vAlign=top>
<TD width="100%"><FONT size=3>Dear GrADS users,</FONT><BR><FONT size=3>I have seen traces of information leading to the creation of .txt files from GrADS output generated from NetCDF files. Unfortunately, I am having a bit of trouble trying to accomplish this. One method says to:</FONT><BR><FONT size=3> </FONT><BR><FONT size=3>'set gxout fwrite'</FONT><BR><FONT size=3>'set fwrite file.txt'</FONT><BR><FONT size=3>'d [variable]'</FONT><BR><FONT size=3>'disable fwrite'</FONT><BR><FONT size=3> </FONT><BR><FONT size=3>While another points to a script from the cookbook: </FONT><A href="http://cookbooks.opengrads.org/index.php?title=Recipe-002:_Saving_GrADS_variable_data_to_a_text_file" target=_blank rel=nofollow><FONT color=blue size=3><U>http://cookbooks.opengrads.org/index.php?title=Recipe-002:_Saving_GrADS_variable_data_to_a_text_file</U></FONT></A><BR><FONT size=3> </FONT><BR><FONT size=3> </FONT><BR><FONT size=3>I also try
:</FONT><BR><FONT size=3>set gxout fwrite</FONT><BR><FONT size=3>d [variable]</FONT><BR><FONT size=3>disable fwrite</FONT><BR><FONT size=3> </FONT><BR><FONT size=3>GrADS then sends an output to my hard-drive, but it is not in an ascii .txt format.</FONT><BR><FONT size=3>Does anybody have a simple method to produce text output files from GrADS? I am not having any success in the above options. I am using GrADS 2.0 on a windows XP system. </FONT><BR><FONT size=3> </FONT><BR><FONT size=3>Thank you very much.</FONT><BR><FONT size=3>Sincerely,</FONT><BR><FONT size=3>teddy </FONT><BR><BR><BR><FONT size=3> </FONT><BR><FONT size=3><B>web: </B></FONT><A href="http://personal.ecu.edu/tla0923/HOME.html" target=_blank rel=nofollow><FONT color=blue size=3><B><U>http://personal.ecu.edu/tla0923/HOME.html</U></B></FONT></A><BR><FONT size=3><B>"To move quickly, go alone. To move far, go</B></FONT><FONT color=red size=3><B>together</B></FONT><FONT
size=3><B>."</B></FONT><BR><FONT size=3><B>African Proverb *</B></FONT><BR><FONT size=3> </FONT></TR></TBODY></TABLE><BR><BR><BR><BR>***************************************************<BR>The information contained in this e-mail message is intended only for the use of the recipient(s) named above and may contain information that is
privileged, confidential, and/or proprietary. If you are not the intended recipient, you may not review, copy or distribute this message. If you have received this communication in error, please notify the sender immediately by e-mail, and delete the original message.<BR>***************************************************<BR></DIV></BLOCKQUOTE></td></tr></table><br>