[gradsusr] cdiff error
Davide Sacchetti
davide.sacchetti at arpal.gov.it
Fri Jun 16 03:22:31 EDT 2017
at least two problems:
1) cdiff cannot be performed against "lev" (you should use "z")
2) cdiff(lev,z) it's ok but you need z varying, otherwise it doesn't
work
Bye bye
Davide
Il giorno ven, 16/06/2017 alle 06.04 +0000, syairah atiqah atiq ha
scritto:
> 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 E
> Operation Error: Error from cdiff function
> Error ocurred at column 1
> DEFINE 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,
> Atiqah
> Postgraduate University Malaya,
> Malaysia
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
More information about the gradsusr
mailing list