# Re: Computing divergence and curl of vector fields; WRF NCL scripts?

From: Tom Kilpatrick <thomaski_at_nyahnyahspammersnyahnyah>
Date: Mon Mar 28 2011 - 19:40:48 MDT

See below for the helpful response from wrfhelp...

On Mon, Mar 28, 2011 at 3:16 PM, wrfhelp <wrfhelp@ucar.edu> wrote:

> The correct c grid should look like:
>
> v
> u T u
> v
>
> For the C grid, the T point is where all mass fields are located, and there
> is nothing at the corners of
> the grid. When you do compute vorticity and divergence, they should fall on
> the mass points
> since dx is the grid distance between u and u, and v and v. Your
> definitions of divergence and vorticity
> are correct.
>
> Right now, NCL doesn't have the function to compute divergence, and there
> is a function where
> you can obtain absolute vorticity (avo) - but I have a feeling that is not
> done this way and it seems
> that it is computed over two grid boxes.
>
> wrfhelp
>
>
> On Mar 27, 2011, at 10:34 PM, Tom Kilpatrick wrote:
>
> I have a question about computing the divergence and curl of 2D vector
>> fields (eg low-level winds) on the WRF lambert grid. After reading a bit of
>> Haltiner & Williams 1980 I am wondering if the following is correct. For a
>> horizontal vector field with components (A,B) in the x- and y-directions on
>> the lambert grid, then the divergence is given by
>>
>> m^2 * [ d/dx(A/m) + d/dy(B/m) ]
>>
>> and the curl is
>>
>> m^2 * [ d/dx(B/m) - d/dy(A/m) ],
>>
>> where m is the map factor. The above formulae could be used to compute the
>> divergence at the theta (mass) points and the curl at the '+' pts on the
>> C-grid:
>>
>> th u th
>> v + v
>> th u th
>>
>> One could then average the '+' pts to get the curl at the interior
>> mass-pts.
>>
>> If the above is correct it might be helpful if there were built-in NCL
>> functions to do this. My apologies if there already are, but I couldn't find
>> anything on the site, and searching through the ncl-talk archives, it looks
>> other users have similar questions. Note that uv2dv_cfd, uv2vr_cfd don't
>> work for the lambert grid.
>>
>> Thanks,
>> Tom Kilpatrick
>>
>>
>>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 28 19:40:55 2011

This archive was generated by hypermail 2.1.8 : Tue Apr 05 2011 - 09:01:21 MDT