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

[IDV #XDL-325595]: Error massage when evaluating or running new formula.



Hi Hamdan,

Try his Jython function instead:

def kindex(t850, t700, t500, dp850, dp700):
    """
    k-index according to https://en.wikipedia.org/wiki/K-index_(meteorology)    
    t850 - temperature at 850mb
    t700 - temperature at 700mb
    t500 - temperature at 500mb
    dewp850 - dewpoint at 850mb
    dewp700 - dewpoint at 700mb
    """
    temp850 = make2D(t850)
    temp700 = make2D(t700)
    temp500 = make2D(t500)
    dewp850 = make2D(dp850)
    dewp700 = make2D(dp700)
    kindex = (temp850 - temp500) + dewp850 - (temp700 - dewp700)
    return kindex

Please verify the k-index formula is correct.

Please see here for more information on creating Jython functions/methods and
referring to them with formulas:

https://www.unidata.ucar.edu/software/idv/docs/userguide/page_dataanalysis.html

Best,

Unidata IDV Support


> Full Name: Mr. Hamdan
> Email Address: address@hidden
> Organization: education, University
> Package Version: 5.4 build date:2017-05-18 16:06 UTC
> Operating System: Windows 7
> Hardware: Java: home: D:\IDV_5.4\jre version: 1.8.0_51 
> j3d:1.6.0-pre12-daily-experimental daily
> Description of problem:
> 
> Hi,
> 
> I have problem when i create a new formula of K-Index parameter from
> GFS 3D grib data and it gives an error massage written below:
> 
> Evaluating data choice
> Gridded3DSet.valueToGrid: ManifoldDimension must be 3
> 
> Please, how this problem can be solved? its important for my research.
> 
> Note that i use this formula (T850 - T500)+(Td850 - Tdd700)
> 
> Best regards
> Mr. Hamdan
> 
> ******************
> Stack trace:
> visad.SetException: Gridded3DSet.valueToGrid: ManifoldDimension must be 3
> at visad.Gridded3DSet.valueToGrid(Gridded3DSet.java:1070)
> at visad.Gridded3DSet.valueToGrid(Gridded3DSet.java:1055)
> at visad.Gridded3DSet.valueToIndex(Gridded3DSet.java:418)
> at visad.FlatField.resample(FlatField.java:4738)
> at visad.FlatField.binary(FlatField.java:2086)
> at visad.FieldImpl.binary(FieldImpl.java:847)
> at visad.DataImpl.binary(DataImpl.java:142)
> at visad.DataImpl.subtract(DataImpl.java:195)
> at visad.DataImpl.__sub__(DataImpl.java:1403)
> 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:478)
> at org.python.core.PyObject.__call__(PyObject.java:482)
> at org.python.core.PyMethod.__call__(PyMethod.java:141)
> at org.python.core.PyMethod.__call__(PyMethod.java:132)
> at org.python.core.PyObjectDerived.__sub__(PyObjectDerived.java:236)
> at org.python.core.PyObject._basic_sub(PyObject.java:2243)
> at org.python.core.PyObject._sub(PyObject.java:2229)
> at org.python.pycode._pyx94.f$0(<string>:1)
> at org.python.pycode._pyx94.call_function(<string>)
> at org.python.core.PyTableCode.call(PyTableCode.java:167)
> at org.python.core.PyCode.call(PyCode.java:18)
> at org.python.core.Py.runCode(Py.java:1386)
> at org.python.core.__builtin__.eval(__builtin__.java:497)
> at org.python.core.__builtin__.eval(__builtin__.java:501)
> at org.python.util.PythonInterpreter.eval(PythonInterpreter.java:251)
> at ucar.unidata.data.DerivedDataChoice.getData(DerivedDataChoice.java:807)
> at ucar.unidata.data.DataChoice.getData(DataChoice.java:598)
> at ucar.unidata.idv.JythonManager.evaluateDataChoice(JythonManager.java:1826)
> at ucar.unidata.idv.ui.FormulaDialog.evaluateInThread(FormulaDialog.java:1090)
> 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 ucar.unidata.util.Misc$2.run(Misc.java:1215)
> at ucar.unidata.util.Misc$3.run(Misc.java:1243)
> 
> 
> 


Ticket Details
===================
Ticket ID: XDL-325595
Department: Support IDV
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly 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.