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

Eduardo Agosta Scarel eduardo.agosta at GMAIL.COM
Mon Jun 23 15:02:27 EDT 2008


Ulrike,

The function cdiff works as a horizontal plane differental, not vertical,
for qhich it needs equal space grid points. Also when you use it probably
you should need to convert the x and y direction into spherical
differential arcs  as:

'define dy = cdiff(lat*1000.0,y) * 3.1416/180'
'define dx = cdiff(lon*1000.0,x) * 3.1416/180'
'define dvx = cdiff(vinterp,x)'
 'define duy = cdiff(uinterp,y)'
'define zeta = ((dvx / (cos(lat*3.1416/180) * dx)) -
(duay / dy))/(6.37e6)'
'define zeta =  (dvx/dx-duy/dy)'

for instance.




2008/6/23 Ulrike Wissmeier <ulrike at meteo.physik.uni-muenchen.de>:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20080623/88eea2c6/attachment.html 


More information about the gradsusr mailing list