[gradsusr] Invalid Operand error while using script of temperature Inversion

sushant puranik sushantpuranik at gmail.com
Thu Apr 5 03:02:43 EDT 2012


Hi
I am trying to find the inversion layer with the help of following script

'reinit'
'sdfopen D:/ECMWF_Monthly_Mean_data/jun2010Temp.nc'
'clear'
count = 1
while (count <=120)
  'clear'
  'set grads off'
  'set t 'count
  'q time'
date=subwrd(result,3)
hour=substr(date,1,3)
day=substr(date,4,2)
month=substr(date,6,3)
year=substr(date,9,10)
date_str=hour' 'day'/'month'/'year
*'set csmooth on'
'set lat 10'
'set lon 60'
'set map 1 1 6'
'set line 1 1 1'
'enable print temp'
z = 1
while (z <=12)
'set z' z
lev=subwrd(result,4)
'define tmp1=t(z='z')'
'define tmp2=t(z='z+1')'
'define inver=tmp2-tmp1'
'd inver'
inversion=subwrd(result,4)
if inversion>0
*  say "inversion in time  "tt " in level "lev
res=write(hfile,'inversion in'  tt'  in level 'lev mb)
endif
z=z+1
endwhile
count = count + 4
endwhile
'clear'


But while running this script in GrADS it shows error message

 SET error: Invalid operand
  Operand = z1
SET error: Invalid operand
  Operand = z2
SET error: Invalid operand
  Operand = z3
SET error: Invalid operand
  Operand = z4
SET error: Invalid operand
  Operand = z5
SET error: Invalid operand
  Operand = z6
SET error: Invalid operand
  Operand = z7
SET error: Invalid operand
  Operand = z8
SET error: Invalid operand
  Operand = z9
SET error: Invalid operand
  Operand = z10
SET error: Invalid operand
  Operand = z11
SET error: Invalid operand
  Operand = z12
Metafile already open
SET error: Invalid operand
  Operand = z1
SET error: Invalid operand
  Operand = z2
SET error: Invalid operand
  Operand = z3
SET error: Invalid operand
  Operand = z4
SET error: Invalid operand
  Operand = z5
SET error: Invalid operand
  Operand = z6
SET error: Invalid operand
  Operand = z7
SET error: Invalid operand
  Operand = z8
SET error: Invalid operand
  Operand = z9
SET error: Invalid operand
  Operand = z10
SET error: Invalid operand
  Operand = z11
SET error: Invalid operand
  Operand = z12
ga->


Anybody has suggestion over this issue?

Thanks in advance


Sushant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120405/0b18f21a/attachment-0003.html 


More information about the gradsusr mailing list