accumulation over time

Petr V. Sporyshev pvs at MAIN.MGO.RSSI.RU
Fri Mar 2 10:35:23 EST 2007


You could try something like this:

'set t 1 100'
'define avart=aave(var,global)'
'define avar=tloop(sum(avart,t=1,t+0))'
'set lon 1'
'set lat 1'
'd avar'

Good luck!
Peter

On Friday 02 March 2007 16:41, you wrote:
> Dear all,
>
> I want to accumulate area averages over time and plot them in a 2d plot.
> I so far manage to plot instantaneous averages :
>
> 'set t 1 100'
> 'define avar=aave(var,global)'
> 'set lon 1'
> 'set lat 1'
> 'd avar'
>
> but I want smth like
>
> loop over t: avar(t)=avar(t-1)+aave(var(t),global)
>
> I already tried to make use of "sum" and "tloop", but all I got was a
> timeseries of the sum of the t+(t-1) values, I have problems in saving the
> means in a way that I get t+(t-1)+(t-2)..+..
>
> I could solve the problem using any other plotting tool or fortran, but I
> am curious about how it works in GrADS.
> Does anybody know the solution?
>
> Thanks in advance
>
> Irene

--
________________________________________________________________

Dr. Petr V. Sporyshev
Voeikov Main Geophysical Observatory
7 Karbyshev str., St.Petersburg, 194021, Russia
Phone: +7-812-2978668   Fax: +7-812-2978661
E-mail: pvs at main.mgo.rssi.ru



More information about the gradsusr mailing list