Re: [idvusers] Calculating areas of contoured data

Sure.

>From the JPythonMethods collection of routines (part of the VisAD
Jython library...see
http://www.ssec.wisc.edu/visad-docs/javadoc/visad/python/JPythonMethods.html)

1. make a grid of "area" using a = createAreaField(f)
    this computes the area around each grid point for your original
data field, f.

2. from your original grid, create a list of points that lie within
the contour, perhaps using
      p = findWithinRange(f, min, max)
    this returns an array of indecies of the points that are within
the range (min:max)

3. use computeSum(a, p) to compute the sum of the "area" values that
meet the criteria in #2

You'll have to be careful to use 2D data, so "slice2D()" might be
needed on your original data field.

Hope that gets you started....

tom



On Mon, Sep 28, 2015 at 1:11 PM, Alexa Van Eaton
<alexa.vaneaton@xxxxxxxxx> wrote:
> Hello IDV users,
>
> Has anyone explored calculating the area of a 2-D contour in IDV. There was
> a suggestion that it would be theoretically possible to apply a maskGrid
> formula in the IDV above a certain threshold, then calculate the area
> inside the closed curve...
>
> All the best
>
> Alexa
> _______________________________________________
> idvusers mailing list
> idvusers@xxxxxxxxxxxxxxxx
> For list information, to unsubscribe, visit: 
> http://www.unidata.ucar.edu/mailing_lists/



-- 
Tom Whittaker
Researcher-Emeritus
Honorary Fellow
Space Science and Engineering Center
University of Wisconsin-Madison
Madison, WI USA



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