[gradsusr] cdiff error

syairah atiqah atiq syairahatiqah at yahoo.com
Fri Jun 16 02:04:06 EDT 2017


Dear expert,
I'm trying to write the below formula into grads window using cdiff function and its error:

Now we calculate dθ/dp  using center finite difference method in log pressure coordinate as follows. Note that we need zonal mean of dθ/dp  to calculate the vertical component of EP flux and it does not matter whether we first calculate zonal mean of θ and the differentiate of differential first and then calculate zonal mean because the differentiation is linear and the divisor p is same for all longitudes. So to avoid large computation it is advisable to first calculate zonal mean of theta and then do the following step for equation (2)
θp=dθ/dp = 1/p * dθ/d(log(p))= 1/p * (θ(n+1)-θ(n-1))/(logp(n+1)-lodp(n-1))                                          (2)
In grads:ga-> 'define ptheta=cdiff(ttheta,lev)/cdiff(lev,lev)'
Error from CDIFF:  Invalid dimension argument
  2nd argument must be X, Y, Z, T or EOperation Error:  Error from cdiff function  Error ocurred at column 1DEFINE error:  Invalid expression.
I'm also try another way but still error:ga-> define ptheta=(cdiff(ttheta,z)/cdiff(lev,z))                                                                       Error from CDIFF:  Specified dimension non varying                                                                      Operation Error:  Error from cdiff function                                                                              Error ocurred at column 2                                                                                             DEFINE error:  Invalid expression.        


Anyone can help me?
Thank you and really appreciate it
Regards,AtiqahPostgraduate University Malaya,Malaysia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20170616/5c6bcc3d/attachment.html 


More information about the gradsusr mailing list