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

[IDV #LKP-243429]: Error number 2



> oops. i meant to change the vea and veb  back to va and vb
> 
> 
> 
> On Monday, September 8, 2014 4:58 PM, JP Kalb <address@hidden> wrote:
> 
> 
> 
> Hi again,
> I am sorry if I keep writing but I am trying to work on a few different 
> aspects for a project i am working on.
> I wrote a new program but it is giving me a flatfield error.
> Here is the code:
> def bulkrich(cape,ua,ub):
> cap=make2D(noUnit(cape))
> va=make2D(noUnit(ua))
> vb=make2D(noUnit(ub))
> shear=.5*(((veb-vea)/5500)**2)
> if shear < 10:
> brn=0
> elif shear >= 10 and cap<500:
> brn=0
> else:
> brn=cap/shear
> return brn
> 

I don't see any problem of creating a display of this formula, just be sure to 
select one specific level for all cape, va and vb.


Yuan
> 
> On Friday, September 5, 2014 9:36 AM, Unidata IDV Support <address@hidden> 
> wrote:
> 
> 
> 
> > Sorry to bug again but I fixed that error and ran it without any errors but 
> > the display won't come up.
> >
> >
> 
> What is your final formula looks like?
> 
> 
> Yuan
> > On Thursday, September 4, 2014 1:55 PM, Unidata IDV Support 
> > <address@hidden> wrote:
> >
> >
> >
> > > This is my actual code
> > > with a=850 mb, b=700 mb and c=500
> mb
> > > def kindex(ta,tb,tc,humida,humidb):
> > > """determines the k-index with a being 850 mb b being 700 mb
> > > and c being 500 mb"""
> > > tempa=make2D(ta)
> > > tempb=make2D(tb)
> > > tempc=make2D(tc)
> > > ha=make2D(humida)
> > > hb=make2D(humidb)
> > > tda=tempa-((100.0-ha)/5.0)
> > > tdb=tempb-((100.0-hb)/5.0)
> > > kindex=(tempa-tempc)+tda-(tempb-ttdb)
> > >
> >
> > You probably need to use noUnit(a) somewhere in your formula and this 
> > function will solve the problem.
> >
> >
> > yuan
> > >
> > > On Thursday, September 4, 2014 12:21 PM, Unidata IDV Support 
> > > <address@hidden> wrote:
> > >
> > >
> > >
> > > > I am still getting the error although I did the make2D. It is saying 
> > > > Creating display: Color-Filled Contour Plan View
> > > > visad.UnitException: visad.UnitException
> > > > visad.UnitException
> > > >
> > > > What is UnitException?
> > >
> > > What is your formula?
> > >
> > > Yuan
> > > >
> > > >
> > >
> > On Thursday, September 4, 2014 10:05 AM, Unidata IDV Support 
> > <address@hidden> wrote:
> > > >
> > > >
> > > >
> > > > > Full Name: JP Kalb
> > > > > Email Address: address@hidden
> > > > > Organization: SJSU
> > > > > Package Version: 5.0u1 build date:2014-08-08 16:54 UTC
> > > > > Operating System: Windows 7
> > > > > Hardware: Java: home: C:\Program Files (x86)\IDV_5.0u1\jre version: 
> > > > > 1.7.0_51 j3d:1.6.0-pre9-daily-experimental daily
> > > > > Description of problem: Creating display: Color-Filled Contour Plan 
> > > > > View
> > > > > visad.UnitException: visad.UnitException
> > > > > visad.UnitException
> > > > > Got this while trying the equation
> > > > > (850T-500T)+850DP-(700T-700DP) but I had already made it calculate 
> > > > > the dewpoints.
> > > > >
> > > >
> > > > JP,
> > > > For both tickets, you can try this:
> > > >
> > > > (make2D(T850)-make2D(T500))+make2D(DP850)-(make2D(T700)-make2D(DP700))
> > > >
> > > > As the variable T and DP are both 3D, and the IDV will think the result 
> > > > of the formula as 3D and causing the
> problem.
> > > >
> > > >
> > > > Yuan
> > > > > ******************
> > > > > Stack trace:
> > > > > visad.UnitException
> > > > > at visad.RealType.binary(RealType.java:474)
> > > > > at visad.FunctionType.binary(FunctionType.java:270)
> > > > > at visad.FunctionType.binary(FunctionType.java:270)
> > > > > at visad.DataImpl.binary(DataImpl.java:141)
> > > > > 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: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.__sub__(PyObjectDerived.java:187)
> > > > > at org.python.core.PyObject._basic_sub(PyObject.java:2119)
> > > > > at org.python.core.PyObject._sub(PyObject.java:2105)
> > > > > at org.python.pycode._pyx113.kindex$1(<string>:8)
> > > > > at org.python.pycode._pyx113.call_function(<string>)
> > > > > at org.python.core.PyTableCode.call(PyTableCode.java:165)
> > > > > at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
> > > > > at org.python.core.PyFunction.function___call__(PyFunction.java:376)
> > > > > at org.python.core.PyFunction.__call__(PyFunction.java:371)
> > > > > at org.python.core.PyFunction.__call__(PyFunction.java:361)
> > > > > at org.python.pycode._pyx119.f$0(<string>:1)
> > > > > at org.python.pycode._pyx119.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:795)
> > > > > 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:206)
> > > > > at 
> > > > > ucar.unidata.data.grid.GridDataInstance.<init>(GridDataInstance.java:163)
> > > > > at 
> > > > > ucar.unidata.data.grid.GridDataInstance.<init>(GridDataInstance.java:144)
> > > > > at 
> > > > > ucar.unidata.idv.control.GridDisplayControl.doMakeDataInstance(GridDisplayControl.java:299)
> > > > > at 
> > > > > ucar.unidata.idv.control.DisplayControlImpl.initializeDataInstance(DisplayControlImpl.java:3278)
> > > > > at
> ucar.unidata.idv.control.DisplayControlImpl.setData(DisplayControlImpl.java:3234)
> > > > > at 
> > > > > ucar.unidata.idv.control.PlanViewControl.setData(PlanViewControl.java:664)
> > > > > at 
> > > > > ucar.unidata.idv.control.ContourPlanViewControl.setData(ContourPlanViewControl.java:195)
> > > > > at 
> > > > > ucar.unidata.idv.control.PlanViewControl.init(PlanViewControl.java:489)
> > > > > at 
> > > > > ucar.unidata.idv.control.DisplayControlImpl.init(DisplayControlImpl.java:1402)
> > > > > at 
> > > > > ucar.unidata.idv.control.DisplayControlImpl.init(DisplayControlImpl.java:1085)
> > > > > 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:1243)
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > Ticket Details
> > > > ===================
> > > > Ticket ID: LKP-243429
> > > > Department: Support IDV
> > > > Priority: Normal
> > > > Status: Closed
> > > >
> > >
> > >
> > > Ticket Details
> > > ===================
> > > Ticket ID: LKP-243429
> > > Department: Support IDV
> > > Priority: Normal
> > > Status:
> Open
> > >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: LKP-243429
> > Department: Support IDV
> > Priority: Normal
> > Status: Closed
> >
> 
> 
> Ticket Details
> ===================
> Ticket ID: LKP-243429
> Department: Support IDV
> Priority: Normal
> Status: Open
> 


Ticket Details
===================
Ticket ID: LKP-243429
Department: Support IDV
Priority: Normal
Status: Closed