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

[IDV #WFK-575798]: Attempting to utilize formula in IDV



Hi Eddie,

The problem is that many of those variables are on different vertical levels, 
and also the
units are incompatible. In order to fix this, you need to make use of the 
noUnit and
make2D jython functions, like so:

(noUnit(make2D(MUCAPE))/1000)*(make2D(noUnit(SRH))/100)*noUnit(sqrt((make2D(u10)-make2D(u500))**2+(make2D(v10)-make2D(v500))**2)/20)

It's ugly, but it works.

Cheers,

Sean

> Full Name: Eddie Dixon
> Email Address: address@hidden
> Organization: Plymouth State university
> Package Version: 3.0b2 build date:2011-08-19 07:06 UTC
> Operating System: Windows 7
> Hardware: Java: home: C:\Program Files\IDV_3.0b2\jre version: 1.6.0_20 
> j3d:1.5.2 fcs (build4)
> Description of problem: Creating display: Color-Shaded Plan View
> visad.TypeException: visad.TypeException: FunctionType.binary: types don't 
> match
> FunctionType.binary: types don't match
> 
> I am attempting to get IDV to calculate a Supercell Composite Formula 
> (Thompson et. al 2004) for landfalling tropical systems (in this case, 
> Hurricane Katrina.) I do not understand what this error I get means, after I 
> have typed in the formula as listed below.
> 
> Formula: SCP = 
> (MUCAPE/1000)*(SRH/100)*((sqrt(((u10-u500)**2)+((v10-v500)**2)))/20)
> 
> MUCAPE and SRH are self-explanatory. For the other variables:
> 
> u10 = u wind at height above ground (10m)
> 
> u500 = u wind at isobaric (500 mb)
> 
> v10 = v wind at height above ground
> 
> v500 = v wind at isobaric
> 
> 
> When I tell the computer to plot the formula, all I get is the enclosed error.
> 
> 
> ******************
> Stack trace:
> visad.TypeException: FunctionType.binary: types don't match
> at visad.FunctionType.binary(FunctionType.java:283)
> at visad.DataImpl.binary(DataImpl.java:138)
> at visad.DataImpl.multiply(DataImpl.java:205)
> at visad.DataImpl.__mul__(DataImpl.java:1407)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.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._pyx102.f$0(<string>:1)
> at org.python.pycode._pyx102.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.unidata.data.DerivedDataChoice.getData(DerivedDataChoice.java:764)
> at ucar.unidata.data.DataChoice.getData(DataChoice.java:637)
> at ucar.unidata.data.DataInstance.getData(DataInstance.java:243)
> at ucar.unidata.data.DataInstance.getData(DataInstance.java:207)
> at ucar.unidata.data.grid.GridDataInstance.init(GridDataInstance.java:205)
> at ucar.unidata.data.grid.GridDataInstance.<init>(GridDataInstance.java:162)
> at ucar.unidata.data.grid.GridDataInstance.<init>(GridDataInstance.java:143)
> at 
> ucar.unidata.idv.control.PlanViewControl.doMakeDataInstance(PlanViewControl.java:1511)
> at 
> ucar.unidata.idv.control.DisplayControlImpl.initializeDataInstance(DisplayControlImpl.java:3084)
> at 
> ucar.unidata.idv.control.DisplayControlImpl.setData(DisplayControlImpl.java:3066)
> at ucar.unidata.idv.control.PlanViewControl.setData(PlanViewControl.java:642)
> at ucar.unidata.idv.control.PlanViewControl.init(PlanViewControl.java:473)
> at 
> ucar.unidata.idv.control.DisplayControlImpl.init(DisplayControlImpl.java:1333)
> at 
> ucar.unidata.idv.control.DisplayControlImpl.init(DisplayControlImpl.java:1034)
> at ucar.unidata.idv.ControlDescriptor.initControl(ControlDescriptor.java:986)
> at ucar.unidata.idv.ControlDescriptor$1.run(ControlDescriptor.java:911)
> at ucar.unidata.util.Misc$3.run(Misc.java:1091)
> 
> 
> 

Ticket Details
===================
Ticket ID: WFK-575798
Department: Support IDV
Priority: Normal
Status: Open