Re: PointDataAdapter(..)

Hi Garrett-

"Campbell, Garrett" wrote:
> 
> I am new to VISAD and the JPYTON interface to it.
> 
> I have obtained a pyton script to plot wind vectors.  It even works
> getting data from an adde server.
> 
> Now I want to make some modifications.
> 
> In particular I wanted to read an additional parameter from the adde
> source
> 
> original code:
> request
> "adde://suomi.ssec.wisc.edu/pointdata?group=cimssp&descr=wndgoese&parm=l
> at lon dir spd pw&select='LAT 40 60;LON 90
> 110'&num=all&pos="+str(position)
> print request
> 
> data = PointDataAdapter(request).getData()
> 
> I wanted to add something to get the time of the wind vectors:
> 
> request
> "adde://suomi.ssec.wisc.edu/pointdata?group=cimssp&descr=wndgoese&parm=l
> at lon dir spd pw itim&select='LAT 40 60;LON 90
> 110'&num=all&pos="+str(position)
> print request
> 
> data = PointDataAdapter(request).getData()
> 
> here is the result
> adde://suomi.ssec.wisc.edu/pointdata?group=cimssp&descr=wndgoese&parm=la
> t lon di
> r spd pw itim&select='LAT 40 60;LON 90 110'&num=all&pos=6
> Unknown unit: HMS for ITIM

What this says is that HMS is an unknown unit.  A RealType
was created, but it has null units.  HMS is a fabricated
number, not a time unit.  An integer of the form HHMMSS is
really only stored that way so humans can read it but does
not relate to any real unit of time.  Additionally, for
a complete time, you'd need the date which probably has
the form CCYYDDD which again is not a valid date specification,
but a convenience form for humans to read.  I've not come
up with a good clean way to handle times stored as strings
represented by integers.

> Traceback (innermost last):
>   File "<console>", line 1, in ?
>   File "goesemidwest.py", line 18, in ?
> AttributeError: instance of 'visad.FieldImpl' has no attribute
> '__call__'

I have no clue as to what is happening here.  Are you sure you
only changed the ADDE request line?  If you send me the entire
script, I could check further (or at least line 18).
 
> This looks like data was send back from the server with HMS information,
> but VISAD was not able to understand it.

It just didn't like the unit.  The data values are fine.
 
> my guess is that I need to define a new dataType(HMS)

no, see above.
 
> More fundamentally, I need to know how to find out the documentation for
> PointDataAdapter and dataType definitions.
> The VISAD tutorials give some nice examples, but they do not seem to
> point to full documentation of VISAD and
> the JPYTON script interface.

Well, you could try reading the VisAD Programmer's Reference
linked off the VisAD homepage, but that would probably make
your head hurt.  The Tutorials are the best source of docs
on how to use the library.  For individual classes, you
could look at the javadocs or source. For the ADDE request
specifications,  these are documented in the javadoc for 
edu.wisc.ssec.mcidas.adde.AddeURLConnection.  Select
clauses are exactly as you would specify in the McIDAS
commands.  If you have specific questions about the
params for the request, contact me directly (since most
on the visad-list have probably never heard of McIDAS or
ADDE).

> Thanks for any information.
> 
> G. Garrett Campbell Ph. D.
> Cooperative Institute for Research in the Atmosphere
> Colorado State University
> Ft. Collins, CO, USA
> 970 491 8497
> campbell@xxxxxxxxxxxxxxxxxx

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
*************************************************************


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