<br><br><div class="gmail_quote">On Tue, Feb 2, 2010 at 1:40 AM, Jason Snyder <span dir="ltr">&lt;<a href="mailto:jmssnyder@ucdavis.edu">jmssnyder@ucdavis.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>I tried the following with no success:</div>
<div> </div>
<div>&#39;sdfopen <a href="http://uwnd.2001.nc" target="_blank">uwnd.2001.nc</a>&#39;<div class="im"><br>&#39;sdfopen <a href="http://vwnd.2001.nc" target="_blank">vwnd.2001.nc</a>&#39;<br>&#39;set gxout shaded&#39;<br>&#39;set t 1&#39;<br>
</div>&#39;define uwnd=uwnd(t=1)&#39;<br>
i=2<div class="im"><br>count=1<br>While(i&lt;5)<br>    count=count+1<br>    say count<br>   &#39;set t &#39;i<br></div>   uwnd = uwnd - uwnd(i-1)<br>*    V.count=vwnd.2<br>*   &#39;d U.count&#39;<br>    i=i+1<br>endwhile<br>
</div>
<div>what am I doing wrong here?</div>
<div> </div>
<div>Thanks,</div>
<div> </div><font color="#888888">
<div>Jason<br></div></font><div><br></div></blockquote></div><br>You have to be very picky with your quotes.  If any part of any line in your script would be something you would type in at the console (in Grads) to do outside of a script, it needs to be in quotes.  That means any define, display, or set plotting environment commands.  You need to change the line <br>
<br>uwnd = uwnd - uwnd(i-1)    to<br><br>&#39;uwnd = uwnd - uwnd(t-&#39;i&#39;)&#39;     (&quot;i&quot; needs to be outside the quotes as you see it.  That way the Grads script will sub in an integer value for &quot;i&quot; and you&#39;ll get your t-1, t-2, etc)<br clear="all">
<br>-- <br>Jeff Duda<br>Iowa State University<br>Meteorology Graduate Student<br>3134 Agronomy Hall<br><a href="http://www.meteor.iastate.edu/~jdduda">www.meteor.iastate.edu/~jdduda</a><br>