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

Davide Sacchetti davide.sacchetti at arpal.gov.it
Thu Apr 5 06:51:56 EDT 2012


errors ...
1) 'set z' z -> 'set z 'z
2) 'define tmp1=t(z='z')' -> 'define tmp1=t(z=z+0)'
3) 'define tmp2=t(z='z+1')' -> 'define tmp2=t(z=z+1)'

suggestions:
1) avoid variables names as 'lev', 'z' ... they should be some way
reserved to grads environment
2) define works but when you are using it dimensions are all collapsed
into a single point ...


bye bye
davide

On Thu, 2012-04-05 at 15:38 +0530, sushant puranik wrote:
> Jim thankful for suggestion. I put space between 'set z' z
> But the error continues. 
> 
> Sushant
> 
>  
> On Thu, Apr 5, 2012 at 12:36 PM, James T. Potemra <jimp at hawaii.edu>
> wrote:
>         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
>         
>         _______________________________________________
>         gradsusr mailing list
>         gradsusr at gradsusr.org
>         http://gradsusr.org/mailman/listinfo/gradsusr
>         
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

-- 
--> Attenzione cambio indirizzo: davide.sacchetti at arpal.gov.it
--
Davide Sacchetti
Centro Funzionale Meteo Idrologico di Protezione Civile della Regione Liguria
ARPAL Unità Tecnica Complessa di livello Regionale
V.le Brigare Partigiane 2 16121 Genova (I)
tel: +39 010 6437535                    fax: +39 010 6437520
mail: davide.sacchetti at arpal.gov.it     web: www.meteoliguria.it





More information about the gradsusr mailing list