On Wed, Sep 28, 2011 at 12:56 AM, sushant puranik <span dir="ltr">&lt;<a href="mailto:sushantpuranik@gmail.com">sushantpuranik@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>Hi<br clear="all"></div><div>I am trying to make average of vorticity over four points as </div><div><br></div><div>set lev 850</div><div>define zeta=hcurl(uwnd,vwnd.2)</div><div>set lat 12.5</div><div>set lon 100</div>

<div>define z1=zeta</div><div>clear</div><div>set lat 10</div><div>set lon 100</div><div>define z2=zeta</div><div>clear</div><div><div>set lat 12.5</div><div>set lon 97.5</div><div>define z3=zeta</div><div>clear</div><div>

set lat 10</div><div>set lon 97.5</div><div>define z4=zeta</div><div>clear</div></div><div>define avez=(z1+z2+z3+z4)/4</div><div>d avez</div><div>write (testz.txt,te)</div><div><br></div><div><br></div><div>But the output file remains blank.<br>

</div><div><br></div><div>whats wrong with the script?</div><div><br></div></blockquote><div><br></div><div>What kind of script is this? Exec? Recall that write() is a gs script function, not something you call from the &quot;ga-&gt;&quot; command line. Read the section of the User&#39;s Guide on scripts:</div>
<div><br></div><div>     <a href="http://grads.iges.org/grads/gadoc/script.html#intro">http://grads.iges.org/grads/gadoc/script.html#intro</a></div><div><br></div></div><div>Make sure you define the variable &quot;te&quot; that you are writing to the file, and that the file name is a string.</div>
<div><br></div>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br>