dear friendy, my problem was solved when I put everybody in parenthesis between ' ', like in <br> 'd 0.1*ke(t= 'i-5' )+0.2*ke(t= 'i-4' )+0.4*ke(t= 'i-3' )+ ....' <br> <br> thanks for your comments<br> José<br><br><b><i>Charles Seman <Charles.Seman@NOAA.GOV></i></b> escreveu:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Jose,<br><br>Could you try something like this?<br><br>'set t 6 360'<br>'define ke5 = 0.6*ke(t-2)+0.8*ke(t-1)+ke(t+0)+0.8*ke(t+1)+0.6*ke(t+2)'<br><br>I hope this helps,<br>Chuck<br><br>Jose Augusto Paixao Veiga wrote:<br>> Hi dear users<br>> I am triyng to write a very simple program using grads. The program is put<br>> bellow<br>><br>> 'reinit'<br>> 'open arc.ctl'<br>><br>> i=6<br>> while (i>=6 & i<=360 )<br>> 'set t ' i<br>> say time' 'i<br>><br>> 'd
0.6*ke(t='i'-2)+0.8*ke(t='i'-1)+ke(t='i')+0.8*ke(t='i'+1)+0.6*ke(t='i'+2)'<br>><br>> i=i+1<br>> endwhile<br>><br>> the error message is:<br>><br>> tempo 6<br>> Syntax Error: Invalid dimension expression<br>> Expecting X/Y/Z/T/LAT/LON/LEV/TIME, found<br>> Variable name = ke<br>> Error ocurred at column 5<br>> DISPLAY error: Invalid expression<br>> Expression =<br>> 0.1*ke(t=6-5)+0.2*ke(t=6-4)+0.4*ke(t=6-3)+0.6*ke(t=6-2)+0.8*ke(t=6-1)+ke(t=6)+0.8*ke(t=6+1)+0.6*ke(t=6+2)+0.4*ke(t=6+3)+0.2*ke(t=6+4)+0.1*ke(t=6+5)<br>><br>><br>> In this case what could be done?<br>><br>> Thanks in advance for comments and help<br>> José<br>><br><br>--<br><br>Please note that Charles.Seman@noaa.gov should be considered my NOAA<br>email address, not cjs@gfdl.noaa.gov.<br><br>********************************************************************<br> Charles Seman Charles.Seman@noaa.gov<br> U.S.
Department of Commerce / NOAA / OAR<br> Geophysical Fluid Dynamics Laboratory voice: (609) 452-6547<br> 201 Forrestal Road fax: (609) 987-5063<br> Princeton, NJ 08540-6649 http://www.gfdl.noaa.gov/~cjs/<br>********************************************************************<br><br>"The contents of this message are mine personally and do not reflect<br>any position of the Government or NOAA."<br></blockquote><br><p> 
<hr size=1>
<a href="http://us.rd.yahoo.com/mail/br/tagline/freeisp/*http://br.acesso.yahoo.com">Yahoo! Acesso Grátis</a> - Internet rápida e grátis. Instale o discador agora!