[gradsusr] Invalid Operand error while using script of temperature Inversion
James T. Potemra
jimp at hawaii.edu
Thu Apr 5 03:06:22 EDT 2012
Sushant:
In the line
'set z' z
put a space between the quote and the first z, i.e.,
'set z 'z
Jim
On 4/4/12 9:02 PM, sushant puranik wrote:
> 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
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120404/ac2006a8/attachment-0003.html
More information about the gradsusr
mailing list