> I am trying to compute something like the following with NCL
>
> dq/dt + V.grad(q) + omega.dq/dp
>
> Where
>
> "d/dt" and "d/dp" are partial derivative
> "omega" is the vertical velocity
> "V" is the horizontal wind
> "q" is the quantity to derive
> "grad(q)" is the horizontal gradient of q
>
> There is a way to do it quickly with NCL?
> ---------------------------------
I'm not sure what you mean by "quickly".
Is there a ready made function for the equation of continuity ... no.
What type of grid is it? global [ regular or gaussian]
regional?
q(time,lev,lat,lon), omega(time,lev,lat,lon)
u(time,lev,lat,lon), v(time,lev,lat,lon)
p(lev)
time(time)
dqdt = center_finite_diff(q(lev|:,lat|:,lon|:,time|:),t,False,0)
dqdp = center_finite_diff(q(time|:,lat|:,lon|:,lev|:),p,False,0)
global gaussiam grid:
q_grad_lon = q ; create arrays to hold output, same size and type as input
q_grad_lat = q
; this procedure will overwrite
; values in T_grad_lon and T_grad_lat
gradsg (q, q_grad_lon, q_grad_lat)
====
V.grad(q) ==> u*q_grad_lon + v*q_grad_lat
omega*dqdp ==> omega*dqdp
====
http://www.ncl.ucar.edu/Document/Functions/Built-in/center_finite_diff.shtml
http://www.ncl.ucar.edu/Document/Functions/Built-in/gradsg.shtml
http://www.ncl.ucar.edu/Document/Functions/Built-in/gradsg.shtml
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Jul 21 2007 - 06:48:28 MDT
This archive was generated by hypermail 2.2.0 : Thu Jul 26 2007 - 16:42:26 MDT