vertical gradient of vert.vorticity; cdiff(Expr,z)

Ulrike Wissmeier ulrike at METEO.PHYSIK.UNI-MUENCHEN.DE
Mon Jun 23 11:14:05 EDT 2008


Dear all,
in order to compute/plot the vertical gradient of vertical vorticity zeta, I
couldn't use the cdiff-function, as there seem to be problems with
cdiff(Expr,z). In the past (see archive) it was suggested to use “define
dExpr=Expr(z+1)-Expr(z-1)” instead of cdiff, however, that does not work for
my calculated vertical vorticity zeta either:

grads-script:
  'set lon 0 60'
  'set lat 0 60'
  'set z 0 30''

  'define dx = cdiff(lon*1000.0,x)'
  'define dy = cdiff(lat*1000.0,y)'
  'define dvx = cdiff(vinterp,x)'
  'define duy = cdiff(uinterp,y)'
  'define zeta =  (dvx/dx-duy/dy)'

  'set z 1 29'

  'define dzetaz = zeta(z+1)-zeta(z-1)'
  'define dzhz = zh(z+1)-zh(z-1)'

  'set lon 'lon''
  'display dzetaz/dzhz'

(where zh is the position of the vertical grid points z=1,2,3,...)

This gives the following error message:
  Syntax Error:  Invalid Operand
  'dzetaz' not a variable or function name
  Error ocurred at column 1
  DISPLAY error:  Invalid expression
  Expression = dzetaz/dzhz

I would be very glad if anyone can help,
thanks in advance,
Ulrike



More information about the gradsusr mailing list