<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hello there,<br>
<br>
I think if you remove the "set t"i, you will get what you want. That way you don't fix time to some number (which is why you are getting a one dimensional plot for all iterations), your loop will still run and produce the difference you need for each iteration,
and the time variable will still be set for the variation in time you seek for all iterations. In other words, you don't need to set t to i before your next statement, the use of functional notation like in your difference statement should work independently
of setting the time dimension. However, I'll qualify that by stating I just learned of this functional capability, so someone should probably back me up.<br>
<br>
Mason <br>
<div style="font-family: Times New Roman; color: rgb(0, 0, 0); font-size: 16px;">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF809883"><font color="#000000" face="Tahoma" size="2"><b>From:</b> gradsusr-bounces@gradsusr.org [gradsusr-bounces@gradsusr.org] on behalf of Yi-Chih Huang [dscpln@gmail.com]<br>
<b>Sent:</b> Saturday, November 26, 2011 9:12 AM<br>
<b>To:</b> GrADS Users Forum<br>
<b>Subject:</b> Re: [gradsusr] the commands with variables change in a while loop online<br>
</font><br>
</div>
<div></div>
<div>Hello,<br>
<br>
I am trying to generate a diagram with time as y axis and longitude as x axis. Without the calculation of time, it is easy to generate such a diagram. When the calculations include time, what would the program looks like to generate the time-longitude
diagram? The following script only resulted in many one-dimensional diagrams.<br>
<br>
########################<br>
"set t 1 57"<br>
"set x 1 138"<br>
"set lat 23.46"<br>
"set parea 1.5 9.7 1 8.3"<br>
"set gxout shaded"<br>
i=2<br>
while (i<58)<br>
"set t "i<br>
"d rainnc(t="i") - rainnc(t="i-1")"<br>
i=i+1<br>
endwhile<br>
#######################<br>
<br>
Thanks much for your help,<br>
<br>
Yi-Chih<br>
</div>
</div>
</div>
</body>
</html>