Re: [idvusers] Grid interpolation in IDV

Paul --

The simplest way to extract a value at a given lat/lon location might
be something like this (I'm assuming you're in the Jython Shell at
this point...):

1. a = selectData()
           [then pick your gridded field -- if it's 3D then you'll
need to use the "make2D()"
           function in the Jython library "Grid routines"]

2. assuming there is a "time" dimension, then do:
       b = a[0]

    (if you do a "print len(a)" and the answer is a small number, like
"1", then you likely have a time dimension...you can also do "print
whatTypes(a)" and get the details of the structure of 'a')

3. then (welcome to the World of VisAD):

      from visad.georef import LatLonTuple

4. now for each point do this:
       print b.evaluate( LatLonTuple( 43., -89.))

(using your own lat/lon values....)

tom

On Wed, Jan 2, 2013 at 11:45 PM, Paul Graham <meteorpaul@xxxxxxxxx> wrote:
> Hi Stuart,
>
> In hindsight, contours were not a good example of what I am wanting.  What I
> am wanting is to be able to interpolate gridded data sets, so I can put in a
> lat/lon and obtain a field value, preferably using a Jython method.  It
> would be good if IDV has a Jython method that could do this.
>
> Paul Graham
>

-- 
Tom Whittaker
University of Wisconsin-Madison
Space Science & Engineering Center (SSEC)
Cooperative Institute for Meteorological Satellite Studies (CIMSS)
1225 W. Dayton Street
Madison, WI  53706  USA
ph: +1 608 262 2759



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