[ncl-talk] Calculating d/dx and d/dy of a variable

Dennis Shea shea at ucar.edu
Thu Aug 16 07:58:39 MDT 2018


Gradients: zonal [ d()/dx ] and meridional [ d()/dy ]

[1]
WRF data are on a *regional * *curvilinear* grid.

[2]
NCL's *gradient calculation functions* require data to be on a *rectilinear*
grid.

[3]
Different functions should be used for global and regional rectilinear
grids.

For global grids, NCL's gradient calculation functions use *highly accurate*
spherical harmonics to calculate gradients
For regional grids, NCL's gradient calculation functions use centered
finite differences

[4]
NCL has no single function to directly calculate the zonal and meridional
gradients on a curvilinear grid.

[5]
You must (a) interpolate the WRF data to a rectilinear grid of about the
same resolution or, ?better? slightly higher resolution; (b) calculate the
gradients on the rectilinear grid using *grad_latlon_cfd
<http://www.ncl.ucar.edu/Document/Functions/Contributed/grad_latlon_cfd.shtml>*;
(c) reinterpolate from the rectilinear grid back onto the original WRF grid.

[6] See:
http://www.ncl.ucar.edu/Applications/ESMF.shtml
Examples 29 and 37
Here, the divergence was calculated [ *uv2dv_cfd ]
<http://www.ncl.ucar.edu/Document/Functions/Built-in/uv2dv_cfd.shtml>*but
you can use the* grad_latlon_cfd *function
*.*
===================================================================

http://www.ncl.ucar.edu/Applications/gradients.shtml
http://www.ncl.ucar.edu/Document/Functions/Contributed/grad_latlon_cfd.shtml


FYI only: global
http://www.ncl.ucar.edu/Document/Functions/Built-in/gradsg.shtml
http://www.ncl.ucar.edu/Document/Functions/Built-in/gradsf.shtml

HTH

On Thu, Aug 16, 2018 at 6:28 AM, Ty Buckingham <
ty.buckingham at manchester.ac.uk> wrote:

> Hi all,
>
> I'm probably overthinking this, but I'm struggling isolating the d/dx and
> d/dy of a variable (in my case, absolute vorticity from WRF output).
>
> Is there an easy way to compute this?
>
> Thanks
> Ty
>
> _______________________________________________
> 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/20180816/66ca1e2d/attachment.html>


More information about the ncl-talk mailing list