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

[IDV #OBF-724386]: Layout Model Editor Issue



> Yuan,
> 
> Thank you for the support.  However, there is still an issue.
> 
> When I use your method, I do not get the error, but instead it calculates 
> values that cannot be real in this context.  All that is plotted on the 
> station layout points are the numbers 1 and 65??  Furthermore, when I try and 
> enter =pointPressure(ALTI, Altitude) in the Value parameter box, it gives me 
> the previous error of:
> 
> "making shapes
> Error generating symbol: =pointpressure(ALTI, Altitude)
> Real: Unit "null" must be convertable with Type default
> Unit "in"
> 
> Do you have any idea on what is going on here?  Station pressure values 
> should be between 700 - 1000 mb.
> 
> Thanks,
> 
> Patrick

Patrick,

     It looks like that we can not apply formula to the point data. The only 
suggestion I have is to save the data to CSV format and do the calculation 
outside the IDV.


Yuan
> ________________________________________
> From: Unidata IDV Support [address@hidden]
> Sent: Tuesday, July 24, 2012 9:46 PM
> To: Patrick C. Campbell
> Cc: address@hidden
> Subject: [IDV #OBF-724386]: Layout Model Editor Issue
> 
> > Full Name: Patrick Campbell
> > Email Address: address@hidden
> > Organization: University of Wyoming
> > Package Version: 3.0u2 build date:2012-02-10 17:21 UTC
> > Operating System: Windows 7
> > Hardware: Java: home: C:\Program Files\IDV_3.0u2\jre version: 1.6.0_20 
> > j3d:1.5.2 fcs (build4)
> > Description of problem: I am using the Mesowest chooser for station point 
> > text plots, and it gives variables such as altimeter setting (ALTI) and 
> > station altitude (Altitude).  I am trying to do the simple equation in the 
> > Layout Model Editor to convert to a station pressure, with the following 
> > formula:
> >
> > =(ALTI * ((288 - 0.0065 * Altitude)/288)**5.2561)*33.8639    This equation 
> > should give a station pressure in millibars, with altimeter in inHg and 
> > Altitude in meters.  This is indeed what is set.
> >
> > However, I get the following error:
> >
> > making shapes
> > Error generating symbol: =(ALTI * ((288 - 0.0065 *
> > Altitude)/288)**5.2561)*33.8639 Real: Unit "null"
> > must be convertable with Type default Unit "in"
> >
> > Clearly, IDV is having an issue with my units, but shouldn't it recognize 
> > the units should be millibars?  Is there a way around this?
> >
> > Thanks,
> >
> > Patrick
> >
> Patrick,
> What I am trying in the following step does work:
> 
> 1) I define a local jython function:
> #
> def pointPressure(ALTI, Altitude):
> return (ALTI * ((288 - 0.0065 * Altitude)/288)**5.2561)*33.8639
> 
> 2) in the layout model editor, I am changing the upper right corner value 
> symbol, in the Value parameter box, I enter pointPressure(ALTI, Altitude), 
> and the Unit box "Millibars", and so on..
> 
> 3) save the layout model
> 
> And I see no problem display the value, even though I am not sure if the 
> value is corrected or not.
> 
> Give it a try.
> 
> Yuan
> >
> > making shapes
> > Error generating symbol: =(ALTI * ((288 - 0.0065 * 
> > Altitude)/288)**5.2561)*33.8639 Real: Unit "null" must be convertable with 
> > Type default Unit "in"
> >
> > ******************
> > Stack trace:
> > visad.UnitException: Real: Unit "null" must be convertable with Type 
> > default Unit "in"
> > at visad.Real.<init>(Real.java:68)
> > at visad.Real.binary(Real.java:574)
> > at visad.DataImpl.binary(DataImpl.java:139)
> > at visad.DataImpl.multiply(DataImpl.java:205)
> > at visad.DataImpl.__mul__(DataImpl.java:1407)
> > at sun.reflect.GeneratedMethodAccessor95.invoke(Unknown Source)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> > at java.lang.reflect.Method.invoke(Unknown Source)
> > at 
> > org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
> > at 
> > org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204)
> > at org.python.core.PyObject.__call__(PyObject.java:404)
> > at org.python.core.PyObject.__call__(PyObject.java:408)
> > at org.python.core.PyMethod.__call__(PyMethod.java:124)
> > at org.python.core.PyMethod.__call__(PyMethod.java:115)
> > at org.python.core.PyObjectDerived.__mul__(PyObjectDerived.java:211)
> > at org.python.core.PyObject._basic_mul(PyObject.java:2229)
> > at org.python.core.PyObject._mul(PyObject.java:2215)
> > at org.python.pycode._pyx6737.f$0(<string>:1)
> > at org.python.pycode._pyx6737.call_function(<string>)
> > at org.python.core.PyTableCode.call(PyTableCode.java:165)
> > at org.python.core.PyCode.call(PyCode.java:18)
> > at org.python.core.Py.runCode(Py.java:1261)
> > at org.python.core.__builtin__.eval(__builtin__.java:484)
> > at org.python.core.__builtin__.eval(__builtin__.java:488)
> > at org.python.util.PythonInterpreter.eval(PythonInterpreter.java:190)
> > at 
> > ucar.visad.display.StationModelDisplayable.evaluateCode(StationModelDisplayable.java:2028)
> > at 
> > ucar.visad.display.StationModelDisplayable.makeShapes(StationModelDisplayable.java:1120)
> > at 
> > ucar.visad.display.StationModelDisplayable.makeShapesFromPointObsField(StationModelDisplayable.java:914)
> > at 
> > ucar.visad.display.StationModelDisplayable.makeNewDataWithShapes(StationModelDisplayable.java:697)
> > at 
> > ucar.visad.display.StationModelDisplayable.setStationData(StationModelDisplayable.java:441)
> > at 
> > ucar.unidata.idv.control.StationModelControl.loadData(StationModelControl.java:1718)
> > at 
> > ucar.unidata.idv.control.StationModelControl.setStationModel(StationModelControl.java:2234)
> > at 
> > ucar.unidata.idv.control.StationModelControl.handleChangedStationModel(StationModelControl.java:721)
> > at 
> > ucar.unidata.idv.control.StationModelControl.propertyChange(StationModelControl.java:702)
> > at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
> > at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
> > at 
> > ucar.unidata.util.ResourceManager.firePropertyChange(ResourceManager.java:771)
> > at ucar.unidata.util.ResourceManager.addUsers(ResourceManager.java:341)
> > at 
> > ucar.unidata.ui.symbol.StationModelCanvas.doSave(StationModelCanvas.java:670)
> > at 
> > ucar.unidata.ui.symbol.StationModelCanvas.doSave(StationModelCanvas.java:660)
> > at 
> > ucar.unidata.ui.symbol.PropertiesDialog.actionPerformed(PropertiesDialog.java:264)
> > at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
> > at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
> > at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
> > at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
> > at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
> > at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
> > at java.awt.Component.processMouseEvent(Unknown Source)
> > at javax.swing.JComponent.processMouseEvent(Unknown Source)
> > at java.awt.Component.processEvent(Unknown Source)
> > at java.awt.Container.processEvent(Unknown Source)
> > at java.awt.Component.dispatchEventImpl(Unknown Source)
> > at java.awt.Container.dispatchEventImpl(Unknown Source)
> > at java.awt.Component.dispatchEvent(Unknown Source)
> > at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
> > at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
> > at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
> > at java.awt.Container.dispatchEventImpl(Unknown Source)
> > at java.awt.Window.dispatchEventImpl(Unknown Source)
> > at java.awt.Component.dispatchEvent(Unknown Source)
> > at java.awt.EventQueue.dispatchEvent(Unknown Source)
> > at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
> > at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> > at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
> > at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> > at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> > at java.awt.EventDispatchThread.run(Unknown Source)
> >
> >
> > > Full Name: Patrick Campbell
> > Email Address: address@hidden
> > Organization: University of Wyoming
> > Package Version: 3.0u2 build date:2012-02-10 17:21 UTC
> > Operating System: Windows 7
> > Hardware: Java: home: C:\Program Files\IDV_3.0u2\jre version: 1.6.0_20 
> > j3d:1.5.2 fcs (build4)
> > Description of problem: I am using the Mesowest chooser for station point 
> > text plots, and it gives variables such as altimeter setting (ALTI) and 
> > station altitude (Altitude).  I am trying to do the simple equation in the 
> > Layout Model Editor to convert to a station pressure, with the following 
> > formula:
> >
> > =(ALTI * ((288 - 0.0065 * Altitude)/288)**5.2561)*33.8639    This equation 
> > should give a station pressure in millibars, with altimeter in inHg and 
> > Altitude in meters.  This is indeed what is set.
> >
> > However, I get the following error:
> >
> > making shapes
> > Error generating symbol: =(ALTI * ((288 - 0.0065 *
> > Altitude)/288)**5.2561)*33.8639 Real: Unit "null"
> > must be convertable with Type default Unit "in"
> >
> > Clearly, IDV is having an issue with my units, but shouldn't it recognize 
> > the units should be millibars?  Is there a way around this?
> >
> > Thanks,
> >
> > Patrick
> >
> >
> > making shapes
> > Error generating symbol: =(ALTI * ((288 - 0.0065 * 
> > Altitude)/288)**5.2561)*33.8639 Real: Unit "null" must be convertable with 
> > Type default Unit "in"
> >
> > ******************
> > Stack trace:
> > visad.UnitException: Real: Unit "null" must be convertable with Type 
> > default Unit "in"
> > at visad.Real.<init>(Real.java:68)
> > at visad.Real.binary(Real.java:574)
> > at visad.DataImpl.binary(DataImpl.java:139)
> > at visad.DataImpl.multiply(DataImpl.java:205)
> > at visad.DataImpl.__mul__(DataImpl.java:1407)
> > at sun.reflect.GeneratedMethodAccessor95.invoke(Unknown Source)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> > at java.lang.reflect.Method.invoke(Unknown Source)
> > at 
> > org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
> > at 
> > org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204)
> > at org.python.core.PyObject.__call__(PyObject.java:404)
> > at org.python.core.PyObject.__call__(PyObject.java:408)
> > at org.python.core.PyMethod.__call__(PyMethod.java:124)
> > at org.python.core.PyMethod.__call__(PyMethod.java:115)
> > at org.python.core.PyObjectDerived.__mul__(PyObjectDerived.java:211)
> > at org.python.core.PyObject._basic_mul(PyObject.java:2229)
> > at org.python.core.PyObject._mul(PyObject.java:2215)
> > at org.python.pycode._pyx6737.f$0(<string>:1)
> > at org.python.pycode._pyx6737.call_function(<string>)
> > at org.python.core.PyTableCode.call(PyTableCode.java:165)
> > at org.python.core.PyCode.call(PyCode.java:18)
> > at org.python.core.Py.runCode(Py.java:1261)
> > at org.python.core.__builtin__.eval(__builtin__.java:484)
> > at org.python.core.__builtin__.eval(__builtin__.java:488)
> > at org.python.util.PythonInterpreter.eval(PythonInterpreter.java:190)
> > at 
> > ucar.visad.display.StationModelDisplayable.evaluateCode(StationModelDisplayable.java:2028)
> > at 
> > ucar.visad.display.StationModelDisplayable.makeShapes(StationModelDisplayable.java:1120)
> > at 
> > ucar.visad.display.StationModelDisplayable.makeShapesFromPointObsField(StationModelDisplayable.java:914)
> > at 
> > ucar.visad.display.StationModelDisplayable.makeNewDataWithShapes(StationModelDisplayable.java:697)
> > at 
> > ucar.visad.display.StationModelDisplayable.setStationData(StationModelDisplayable.java:441)
> > at 
> > ucar.unidata.idv.control.StationModelControl.loadData(StationModelControl.java:1718)
> > at 
> > ucar.unidata.idv.control.StationModelControl.setStationModel(StationModelControl.java:2234)
> > at 
> > ucar.unidata.idv.control.StationModelControl.handleChangedStationModel(StationModelControl.java:721)
> > at 
> > ucar.unidata.idv.control.StationModelControl.propertyChange(StationModelControl.java:702)
> > at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
> > at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
> > at 
> > ucar.unidata.util.ResourceManager.firePropertyChange(ResourceManager.java:771)
> > at ucar.unidata.util.ResourceManager.addUsers(ResourceManager.java:341)
> > at 
> > ucar.unidata.ui.symbol.StationModelCanvas.doSave(StationModelCanvas.java:670)
> > at 
> > ucar.unidata.ui.symbol.StationModelCanvas.doSave(StationModelCanvas.java:660)
> > at 
> > ucar.unidata.ui.symbol.PropertiesDialog.actionPerformed(PropertiesDialog.java:264)
> > at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
> > at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
> > at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
> > at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
> > at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
> > at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
> > at java.awt.Component.processMouseEvent(Unknown Source)
> > at javax.swing.JComponent.processMouseEvent(Unknown Source)
> > at java.awt.Component.processEvent(Unknown Source)
> > at java.awt.Container.processEvent(Unknown Source)
> > at java.awt.Component.dispatchEventImpl(Unknown Source)
> > at java.awt.Container.dispatchEventImpl(Unknown Source)
> > at java.awt.Component.dispatchEvent(Unknown Source)
> > at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
> > at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
> > at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
> > at java.awt.Container.dispatchEventImpl(Unknown Source)
> > at java.awt.Window.dispatchEventImpl(Unknown Source)
> > at java.awt.Component.dispatchEvent(Unknown Source)
> > at java.awt.EventQueue.dispatchEvent(Unknown Source)
> > at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
> > at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
> > at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
> > at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> > at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
> > at java.awt.EventDispatchThread.run(Unknown Source)
> >
> >
> >
> 
> 
> Ticket Details
> ===================
> Ticket ID: OBF-724386
> Department: Support IDV
> Priority: Normal
> Status: Closed
> 
> 
> 


Ticket Details
===================
Ticket ID: OBF-724386
Department: Support IDV
Priority: Normal
Status: Closed