I'm running version 2.0.a9<br><br><br>Dan<br><div class="gmail_quote">On Sun, Feb 12, 2012 at 10:49 PM, Arlindo da Silva <span dir="ltr"><<a href="mailto:arlindo.dasilva@gmail.com">arlindo.dasilva@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Which version of grads is this?<br>
<br>
Sent from my iPhone<br>
<div class="HOEnZb"><div class="h5"><br>
On Feb 11, 2012, at 11:06 PM, Dan Leins <<a href="mailto:theedge981@gmail.com">theedge981@gmail.com</a>> wrote:<br>
<br>
> All,<br>
><br>
> I have a GrADS script I use, among other things, to calculate run total precip over my model domain throughout my model run (output format is grib2). I create images of numerous fields on an hourly basis (say 72hrs worth for example), so I produce 72 runtotal precip images. As the script runs and iterates through a loop, my code to calculate the runtotal looks like this:<br>
><br>
> 'define runtotal=sum(apcpsfc.1, t=2, t='dis_t')'<br>
> 'display runtotal'<br>
><br>
> where dis_t is the hour I am currently working on.<br>
><br>
> My script works fine and fast early on, but slows down over time. Naturally, I assume the amount of time it takes to 'sum' hours of precip will increase as I get further into my run. However, if I kill and restart my script at an arbitrary time (dis_t=60) for example, this calculation speeds right back up again. Likewise if I comment out this portion of my script, the rest of my script moves along at the same pace the entire time. I'm thinking some resources aren't being released properly while the script is running since the problem seems to go away if I kill/restart my script.<br>
><br>
> Is there a more efficient way to calculate a runtotal than the method shown above? I've been careful to undefine any variables after each iteration of my loop so I don't think that's a factor.<br>
><br>
> Any help would be great!<br>
> Thanks,<br>
> Dan Leins<br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> gradsusr mailing list<br>
> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</div></div></blockquote></div><br>