3hourly data to daily data

John Guhin johnguhin at GMAIL.COM
Wed Feb 22 18:08:40 EST 2006


Thanks Arindam. It worked.  Is it possible to do such time mean for a 3D
data.  I wrote this script, but wrote only at one time.   Am I doing
something wrong?  Thanks in advance.
--------------------------------------------
'reinit'
'c'
'set gxout fwrite'
'set fwrite u_daily_3D.dat'
'open u.ctl'
'set lon 40 180'
'set lat -10 10'
t1=1
z1=1
while(z1<5)
'set z 'z1
while(t1<977)
'set t 't1
'd ave(u,t='t1',t='t1+7')'
t1=t1+8
endwhile
z1=z1+1
endwhile
------------------------------------------------------------------------


On 2/22/06, Arindam Chakraborty <arch at io.met.fsu.edu> wrote:
>
> Hi,
> Please change 'd ave(u,t=t1,t=t1+7)' to
> 'd ave(u,t='t1',t='t1+7')'
>
> because t1 is a script variable and should be outside the single
> quotes.
>
> --
>
> On Wed, 22 Feb 2006, John Guhin wrote:
>
> > Hi,
> >        I was wondering if someone can find the mistake. I am trying to
> > convert a 3 hourly data to daily data.
> > The original data is 3D.  any help will be appreciated.
> > ----------------------------------------------------------------------
> > * Program to write 3 hourly data to daily data
> > 'reinit'
> > 'c'
> > 'set gxout fwrite'
> > 'set fwrite u_daily.dat'
> > 'open u.ctl'
> > 'set lon 40 180'
> > 'set lat -10 10'
> > 'set lev 850'
> > t1=1
> > while(t1<977)
> > 'set t 't1
> > 'd ave(u,t=t1,t=t1+7)'
> > t1=t1+8
> > endwhile
>
> >  --------------------------------------------------------------------------------------------------
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20060222/1fea0bb8/attachment.html 


More information about the gradsusr mailing list