Re: units: hPa, m.s-1 how to add to list

Hi Garrett-

"Campbell, Garrett" wrote:
> 
> I am trying to read some point data sets from an adde server.
> The units for two of the fields hPa and m.s-1 are not in the VISAD
> conventional
> unit list.

hPa and m.s-1 are handled by the visad.data.units package.
The PointDataAdapter uses the visad.jmet.MetUnits class to
map McIDAS unit specifications to valid VisAD Unit specifications.
For example, in McIDAS, pressure has a unit string of "MB", but
that would not be parsed to millibars using
visad.data.units.Parser.parse().  Even "mb" would not be
millibars - it is millibits.  The correct specification would
be "mbar" or "hPa".  MetUnits.makeSymbol() also handled common
"meteorological" units like "mph" for miles per hour, which
would normally be parsed as milliphots (ph = phot).

So, I'm not sure what you mean when you say they are not
in the conventional unit list.  Do you mean CommonUnit?

> How would I add them so that the data will read in with the
> PointDataAdapter
> 
> here is the jython script
> 
> request= "adde://???/pointdata?group=???A&descr=???&parm=lat lon dir spd  pw 
> itim tlat tlon&select='LAT 40 60;LON 90 110'&num=all&pos=1"
> print request
> 
> data = PointDataAdapter(request).getData()

The PointDataAdapter will not do any unit conversion so if you
are trying to specify that in the request, it won't work.  In ADDE,
that is all handled on the client side and that has not been
implemented (nor am I sure it will be) on any of the ADDE
reading classes.

I don't think your whole script got through in the message,
so if there is something I'm missing, let me know.

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: