[ncl-talk] Calculate divergent wind component on a non-global grid
Jack Ogaja
jack.ogaja at gmail.com
Thu Oct 1 06:50:16 MDT 2015
Hi Bo,
1) Assuming that your limited area grid is a Regular, Fixed or Fixed-Offset(e.g. with rotated coordinates) grid, you can use the function “uv2dv_cfd()” to calculate the divergence(div). However, you have to be careful with the definitions/positions of the wind components on the grid - whether staggered or non-staggered.
2) Calculating velocity potential(Chi) and divergent wind component in a limited area domain is however an endeavor.
i) First, you cannot define wind field from velocity potential(Chi) alone, you also need the stream-function(Psi). That means you have to calculate the vorticity(vr) as well using the function “uv2vr_cfd()” assuming conditions in (1)
i.e. from Helmholtz theorem, you end up with two elliptic equations
Laplace(Psi)= vr (a)
Laplace(Chi)= div (b)
ii) In a global domain equations (a) and (b) are ‘not bound to’ any boundary condition. However, in a limited area domain the equations are coupled by the boundary conditions and should be solved simultaneously.
i.e. if you consider wind field(V) decomposed into non-divergent and irrotational components as,
V=k x grad(Psi)+grad(Chi) (c)
then, for Chi and Psi to satisfy equation (c) at the boundaries you need the normal and tangential wind components each of which involves derivatives of both Chi and Psi.
Equations (a) and (b) are commonly solved using successive over-relaxation(SOR) method, but any elliptic solver can be applied with a properly defined boundary condition.
I can only suggest that you write your own solver for equations (a) and (b) in c++ or fortran or whatever program language you deem suitable and call it in ncl using WRAPIT script - https://www.ncl.ucar.edu/Document/Tools/WRAPIT.shtml. If you don’t want to go all the way to write your own program, there are even efficient direct solver subroutines specifically “hwscrt()” and “hwsssp()” from the “FISHPACK” library - https://www2.cisl.ucar.edu/legacy/fishpack/documentation, which you can “wrap” in ncl as well.
Jack.
> On 01 Oct 2015, at 03:57, Dong, Bo <bdong at albany.edu> wrote:
>
> Hi All,
>
> As I'm trying to calculate the divergence and divergent wind component, I found a few functions such as dv2uvf, dv2ufg. However, all these functions require that U and V wind on a global grid. I'm wondering that for regional data, how can I compute the divergence, velocity potential and divergent wind component on a non-global grid? Thanks.
>
> regards,
> Bo
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151001/2d53dbd4/attachment.html
More information about the ncl-talk
mailing list