[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20040319: Creating a vertical profile



>From: "Paul Gifford" <address@hidden>
>Organization: 
>Keywords: 200403190827.i2J8RdrV009672  IDV independent profile

Hi Paul-

>  I'm trying to create a vertical profile from a mapping of heights and
>values for a single spatial point.  I put something together but I obviously
>did it wrong since I'm getting an exception:
>
>************************
>ControlDescriptor.Creating display
>Invalid Units for timeSet
>visad.VisADException: Invalid Units for timeSet
>        at visad.DateTime.timeSetToArray(DateTime.java:493)
>        at
>ucar.unidata.data.grid.GridDataInstance.init(GridDataInstance.java:149)
>        at
>ucar.unidata.data.grid.GridDataInstance.<init>(GridDataInstance.java:113)
>        at
>ucar.unidata.idv.control.GridDisplayControl.doMakeDataInstance(GridDisplayCo
>ntrol.java:155)
>        at
>ucar.unidata.idv.control.DisplayControlImpl.setData(DisplayControlImpl.java:
>1096)
>        at
>ucar.unidata.idv.control.ProfileControl.setData(ProfileControl.java:199)
>        at
>ucar.unidata.idv.control.ProfileControl.init(ProfileControl.java:173)
>
> etc etc
>******************************

First, you found a bug (or really just bad coding), which I've fixed
so this exception won't be thrown.  

>I'm not sure why I'm getting this exception since time is not involed.  I
>guess it should be; I just don't know where.  So do you have any tips on
>taking a map of height->value and putting it in a form the ProfileControl
>can use?

The vertical profile control right now expects a grid that gets 
resampled to create the profile which is passed to the display.  That
grid would look like:

(lat,lon,alt) -> (value)

When the probe is moved, then it resamples to a grid of 
(alt -> value).  The only solution I could suggest would be
to create a 3D grid of:

(lat,lon,alt) -> value

and pass that in.  I'll ponder this a bit more and if I think
of a better solution, I'll let you know.  If the above doesn't
work, let me know.

Don
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publically available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.