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

[IDV #JUN-901571]: Functiontype.binary: types don't match error



> Hello Yuan,
> 
> Here are the definition statements that I have made within IDV's jython
> library.
> 
> def    StormMotionVector(v,u):
> """ compute storm motion vector from v and u wind components at 875mb
> """
> vsqrd= v*v
> usqrd= u*u
> ws= (sqrt(usqrd+vsqrd))
> smv= asin(v/ws)*(180/3.14)
> return smv
> 
> 
> def    StormRelativeWind(speed):
> """ compute storm relative wind from wind speed at 875 mb"""
> nspd= (make2D(speed*.75))
> return nspd
> 
> 
> def    StormRelativeVector(smv):
> """ compute storm relative vector from storm motion vector """
> nsmv= (make2D(smv - 30))
> if nsmv< 0:
> nsmv= (make2D(nsmv + 360))
> return nsmv
> 
> 
> def    UStormRelativeMotion(nspd,nsmv):
> """ compute u component of storm relative motion from storm relative
> wind and storm relative motion vector """
> usrm= (make2D(nspd*cos(nsmv)))
> return usrm
> 
> 
> def    VStormRelativeMotion(nspd,nsmv):
> """ compute v component of storm relative motion from storm relative
> wind and storm relative motion vector """
> vsrm= (make2D(nspd*sin(nsmv)))
> return vsrm
> 
> def    STPLCL(T,Td):
> """ compute STP portion of LCL from T and Td"""
> STPLCL= (make2D(2000-(125*(T-Td))/1000))
> if STPLCL< 1000:
> STPLCL= 1.0
> #elif STPLCL> 2000:
> #     STPLCL= 0.0
> else:
> STPLCL=STPLCL
> return STPLCL
> 
> #def    STPBWD(BWD):
> """compute STP ortion of BWD from speed875 and speed1000"""
> STPBWD= (make2D(BWD/20))
> if STPBWD> 30:
> STPBWD= 1.5
> #elif STPBWD< 12.5:
> #STPBWD= 0.0
> else:
> STPBWD=STPBWD
> return STPBWD

For this formula, what is the input of BWD?

Yuan
> 
> I have the elif statement portions and my STPBWD # because I could not get
> it to plot the elif statements or for the STPBWD to plot. I have also
> attached a screenshots of the various other formula names that I have for
> the project along with a couple examples of the formulas themselves.
> 
> I have managed to plot my STP by making sure to specify that I need the
> 1000hpa level for the LCL, but I am not getting the proper plot due to not
> being able to use the STPLCL definition and STPBWD statements in its
> entirety.
> 
> Any help and guidance would be great!
> 
> Thank you,
> Michelle
> 
> address@hidden> wrote:
> 
> > > Hello, this is Michelle Spencer again.
> > >
> > > Thank you for the prompt response to the previous inquiry that I had,
> > > I greatly appreciate it.
> > >
> > > I am having trouble plotting my Significant Tornado Parameter. I have
> > > written code into the jython library, and made numerous sub-formulas
> > > that I am trying to use in a final formula for my STP. When I attempt
> > > to plot my data for each individual component of the STP formula I have
> > > no problems.  My STP formula consists of a BWD formula, SRH formula,
> > > CAPE formula, and LCL formula. It appears that my LCL is what is giving
> > > me my error, because I can plot the BWD*SRH*CAPE just fine, but when I
> > > add in the *LCL I get the error described below. I am not sure how to
> > > fix this error in order to plot the STP, which is what I ultimately need
> > > for my research project. I'm not sure what all information you may need
> > > to help me fix my issue, so please let me know if you need anything.
> > >
> > > Thank you for any help you are able to provide,
> > >
> > > Michelle Spencer
 
 

Ticket Details
===================
Ticket ID: JUN-901571
Department: Support IDV
Priority: Normal
Status: Open
===================
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.