I gave that a shot and still no luck. I'm somewhat at a loss as to why the performance degrades so much over time given this command.<div><br></div><div>Dan<br><br><div class="gmail_quote">On Sun, Feb 12, 2012 at 8:09 AM, Ricardo Hallak <span dir="ltr"><<a href="mailto:hallak@model.iag.usp.br">hallak@model.iag.usp.br</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#ffffff">
Hi Dan,
<br>
<br>maybe using:
<br>
<br>undefine runtotal
<br>
<br>after each iteration may help in the performance.
<br>
<br>Regards,
<br>Ricardo
<br>
<br><font><b>On Sat, 11 Feb 2012 21:02:18 -0700, Dan Leins wrote</b>
<br><div><div class="h5">> 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>
<br>
<br></div></div>Ricardo Hallak
<br>
<br>
Department of Atmospheric Sciences (DCA)
<br>
Institute of Astronomy, Geophysics and Atmospheric Sciences (IAG)
<br>
University of São Paulo (USP)
<br>
Rua do Matão, 1226 - Cidade Universitária - São Paulo SP 05508-900
<br>
Phone.: <a href="tel:%2B55%20%2811%29%203091-2850" value="+551130912850" target="_blank">+55 (11) 3091-2850</a>; 3091-4703
<br>
Fax: <a href="tel:%2B55%20%2811%29%203091-4714" value="+551130914714" target="_blank">+55 (11) 3091-4714</a>
<br>
<br>
</font>
</div>
<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>
<br></blockquote></div><br></div>