[gradsusr] cdiff error

syairah atiqah atiq syairahatiqah at yahoo.com
Wed Jun 14 22:45:08 EDT 2017


Dear experts,
I try to write equation below in grads. However, the grads come out error.
Here the equation that I try to use:
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)And this is the way I wrote above equation in grads:ga-> sdfopen E:\IMPORTANT\temp_uv_nlev.nc
ga-> define ttheta=ave(t,lon=60,lon=90,-b)/pow(lev/1000,0.286)
ga-> define dtheta=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.ga-> define dtheta=1/lev(cdiff(ttheta,log(lev))/cdiff(log(lev),log(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.
Can anyone help me. How the correct way to write the cdiff?Thank you in advance.
Regards,AtiqahPostgraduate student University Malaya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20170615/dade6fde/attachment.html 


More information about the gradsusr mailing list