Re: [idvusers] IDV formula for gradient of scalar field

Hi Stu-

Stuart Wier wrote:

I need to make an IDV formula to make the gradient of a 2d scalar field (a new 2d vector field), and also the magnitude of the gradient as a new scalar field. Anyone know how to do that offhand?

You can use the grad(S) python procedure in the module
to compute the gradient.  Use the mag(V) procedure to compute the
magnitude of the resulting vector:


You can use the Grid->Define a grid diagnostic Formula to
try this on the fly, or create a formula.

All the jython procedures are documented at:

(I just noticed that the mag function on that page is not formatted
correctly.  I'll fix that for a future release).

Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307