Not sure why subwrd would be invalid unless you&#39;re running OpenGrads or something like that.  Anyway, check out the fprintf script, which is well documented here: <a href="http://cookbooks.opengrads.org/index.php?title=Recipe-002:_Saving_GrADS_variable_data_to_a_text_file">http://cookbooks.opengrads.org/index.php?title=Recipe-002:_Saving_GrADS_variable_data_to_a_text_file</a><br>
<br>Jeff Duda<br><br><div class="gmail_quote">On Thu, Oct 18, 2012 at 10:29 AM, Sagar Parajuli <span dir="ltr">&lt;<a href="mailto:psagar@utexas.edu" target="_blank">psagar@utexas.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Hi Jaykrishnan,<u></u><u></u></span></p><p class="MsoNormal">
<span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Thank you for your suggestion. I tried but in my version of grads 2.0.1, the functions subwrd and write are not recognized. Do you have any other way to write grads output to a .txt or ascii file?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Sincerely,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#e36c0a">Sagar Prasad Parajuli<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#e36c0a">Graduate Student/Research Assistant<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#e36c0a">University of Texas at Austin<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#e36c0a">Jackson School of Geosciences<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#e36c0a">1 University Station C1100, JGB 5.322<br>Austin, TX 78712<u></u><u></u></span></p><p class="MsoNormal">
<span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#e36c0a">Contact: <a href="mailto:psagar@utexas.edu" target="_blank"><span style="color:#e36c0a">psagar@utexas.edu</span></a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#e36c0a">Cell: 512 965 4093<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><img src="" alt="texas-longhorn-logo" border="0" height="40" width="80"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a> [mailto:<a href="mailto:gradsusr-bounces@gradsusr.org" target="_blank">gradsusr-bounces@gradsusr.org</a>] <b>On Behalf Of </b>Jayakrishnan P.R<br>
<b>Sent:</b> Thursday, October 18, 2012 12:55 AM<br><b>To:</b> GrADS Users Forum<br><b>Subject:</b> Re: [gradsusr] writing grads output to a *.txt file<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">
Dear Sagar,<u></u><u></u></p><div><p class="MsoNormal">           Try this...<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#222222">&#39;reinit&#39;<u></u><u></u></span></p>
</div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#222222">&#39;open trmm03.ctl&#39;<u></u><u></u></span></p></div><div><p class="MsoNormal" style="background:white">
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#222222">tt=1<u></u><u></u></span></p></div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#222222">while (tt&lt;=2920)<u></u><u></u></span></p>
</div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#222222">&#39;set lat 11&#39;<u></u><u></u></span></p></div><div><p class="MsoNormal" style="background:white">
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#222222">&#39;set lon 76.25&#39;<u></u><u></u></span></p></div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#222222">&#39;set t &#39;tt<u></u><u></u></span></p>
</div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#222222">&#39;d rr&#39;<u></u><u></u></span></p></div><div><p class="MsoNormal" style="background:white">
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#222222">te=subwrd(result,4)<u></u><u></u></span></p></div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#222222">w=write(&#39;sample.dat&#39;,te)<u></u><u></u></span></p>
</div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#222222">tt=tt+1<u></u><u></u></span></p></div><div><p class="MsoNormal" style="background:white">
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#222222">endwhile<u></u><u></u></span></p></div></div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#222222"><u></u> <u></u></span></p>
</div><div><p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#222222"><u></u> <u></u></span></p></div><div><p class="MsoNormal" style="background:white">
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#222222">Best of Luck.....<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></span></p></div><span class="HOEnZb"><font color="#888888"><div>
<div><p class="MsoNormal"><u></u> <u></u></p></div><p class="MsoNormal">-- <br>Sincerely<br>***********************************************<br>Jayakrishnan.P.R<br>CSIR-Senior Research Fellow<br>Department of Atmospheric Sciences<br>
Cochin University of Science and Technology (CUSAT), Cochin-682 016<br>Kerala, India.<br>Mob: 09895417565<br><br>***********************************************<u></u><u></u></p></div></font></span></div></div><br>_______________________________________________<br>

gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br><br>