<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"><<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>></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>'set t 1 10'<br></div>'define dayrad = 2.78e-4*sum(SSRsfc,t-0,t+2)'<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 <= 10) </div><div><br></div><div>'set t 'tt</div><div><br></div></span><div>'define dayrad'tt'= 2.78e-4*sum(SSRsfc, t='tt',t='tt+2')'</div><span><div><br></div><div>'set gxout print'</div><div><br></div><div>'d dayrad'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>'undefine dayrad'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"><<a href="mailto:r.hachelaf@gmail.com" target="_blank">r.hachelaf@gmail.com</a>></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 "dayrad" 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>'open rad.ctl'</div><div>tt=1</div><div>while( tt <= 10) </div><div><br></div><div>'set t 'tt</div><div><br></div><div>'define dayrad= 2.78e-4*sum(SSRsfc, t='tt',t='tt+2')'</div><div><br></div><div>'set gxout print'</div><div><br></div><div>'d dayrad'</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>