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 griddiag.py module
to compute the gradient.  Use the mag(V) procedure to compute the
magnitude of the resulting vector:

mag(grad(S))

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:

http://www.unidata.ucar.edu/software/idv/docs/userguide/tools/JythonLib.html

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

Don
*************************************************************
Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
http://www.unidata.ucar.edu/staff/donm
*************************************************************



  • 2009 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the idvusers archives: