<div dir="ltr"><div><br></div><div>Thanks for the response, </div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-25 13:13 GMT-05:00 Jeff Duda <span dir="ltr">&lt;<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Try this command, but without any loop:<br><br>&#39;set t 1 10&#39;<br></div>&#39;define dayrad = 2.78e-4*sum(SSRsfc,t-0,t+2)&#39;<br><br>That will give you the sum, but based on the index increment you use (tt+3), you will instead just get a 24-hour sum updated every 12 hours. To get the time series you want, you may have to define a separate array for each day and write each to either the same file or a different file. This may seem tedious or prolific, but the loop you have will do the trick with some minor alterations:<span><br><br><div>tt=1</div><div>while( tt &lt;= 10) </div><div><br></div><div>&#39;set t &#39;tt</div><div><br></div></span><div>&#39;define dayrad&#39;tt&#39;= 2.78e-4*sum(SSRsfc, t=&#39;tt&#39;,t=&#39;tt+2&#39;)&#39;</div><span><div><br></div><div>&#39;set gxout print&#39;</div><div><br></div><div>&#39;d dayrad&#39;tt<br></div></span><div>*To eliminate the possibility of a crash resulting from using too much memory, undefine each array after printing it<br></div><div>&#39;undefine dayrad&#39;tt<br></div><div><br></div><div>tt=tt+3</div><div>endwhile</div><br></div>See if either of these strategies gives you what you want.<br><br>Jeff Duda<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Sun, Jan 25, 2015 at 11:48 AM, Rabah Hachelaf <span dir="ltr">&lt;<a href="mailto:r.hachelaf@gmail.com" target="_blank">r.hachelaf@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div>Hi Grads users,</div><div><br></div><div>i have this small scripts to transform every 12 hours radiation into daily data by summing. but my new variable &quot;dayrad&quot; saves just the last iteration.</div><div>my request is how to save all data calculated in dayrad variable into a time-dependent variable.</div><div><br></div><div>Thanks for help.</div><div><br></div><div><br></div><div><div>&#39;open rad.ctl&#39;</div><div>tt=1</div><div>while( tt &lt;= 10) </div><div><br></div><div>&#39;set t &#39;tt</div><div><br></div><div>&#39;define dayrad= 2.78e-4*sum(SSRsfc, t=&#39;tt&#39;,t=&#39;tt+2&#39;)&#39;</div><div><br></div><div>&#39;set gxout print&#39;</div><div><br></div><div>&#39;d dayrad&#39;</div><div><br></div><div>tt=tt+3</div><div>endwhile</div></div><span><font color="#888888">-- <br><div><div dir="ltr"><div>Rabah <br></div><br></div></div>
</font></span></div>
<br></div></div>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">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><span><font color="#888888"><br><br clear="all"><br>-- <br><div>Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br></div>
</font></span></div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">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"><div><br></div>-- <br><div><div dir="ltr"><div>------------------------------</div>Cordialement,<br>Best regards,<br>Rabah Hachelaf <br>     ____   <br>    (       )<br>   (        )                       <br>  (___ __)                      <br>   /////////      <br><br></div></div>
</div></div>