problems during loops

Jose Augusto Paixao Veiga jaugusto at CPTEC.INPE.BR
Thu Aug 17 10:22:39 EDT 2006


Hi dear users
I am triyng to write a very simple program using grads. The program is put
bellow

'reinit'
'open arc.ctl'

i=6
while (i>=6 & i<=360 )
'set t ' i
say time' 'i

'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)'

i=i+1
endwhile

the error message is:

tempo 6
Syntax Error:  Invalid dimension expression
  Expecting X/Y/Z/T/LAT/LON/LEV/TIME, found
  Variable name = ke
  Error ocurred at column 5
DISPLAY error:  Invalid expression
  Expression =
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)


In this case what could be done?

Thanks in advance for comments and help
José



More information about the gradsusr mailing list