# [IDV #LNV-521517]: IDV functiontype.binary: types dont match error

• Subject: [IDV #LNV-521517]: IDV functiontype.binary: types dont match error
• Date: Wed, 17 Oct 2018 12:56:59 -0600

```> Creating display: Contour Plan View
> match
> FunctionType.binary: types don't match
>
> Hello, my name is Michelle. I am working in IDV for my senior research
> project and can not get past this error that I am getting. I entered a
> definition statement within the jython library, which can be seen below.
> When I try to plot the smv (which I will be using within a different more
> complex equation to find the significant tornado parameter) it comes up
> with the error above. I know that the first five lines works, because I
> tried plotting the ws, and it worked. So it has to be something wrong
> within the sixth line of code. Any help would be greatly appreciated, I
> have exhausted all the other help I could get and we couldn't figure it out.
>
> def    StormMotionVector(v,u)
> """compute storm motion vector from v and u wind components"""
> vsqrd= v875*v875
> usqrd= u875*u875
> ws= sqrt(usqrd+vsqrd)
> smv= asin(v/ws)*(180/3.14)
> return smv
>
> Thank you,
> Michelle Spencer
>
>
Hi Michelle,

I am guessing u875 is the u component of wind at 875mb. If so, the formula I
enter:

def StormMotionVector(v,u):
"""compute storm motion vector from v and u wind components"""
vsqrd= v*v
usqrd= u*u
ws= sqrt(usqrd+vsqrd)
smv= asin(v/ws)*(180/3.14)
return smv

has no problem to create the display. You only need to specify the level when
the popup window
for the variable v and u.

Yuan

Ticket Details
===================
Ticket ID: LNV-521517
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.

```