# [IDV #PAA-696617]: Error

• Subject: [IDV #PAA-696617]: Error
• Date: Wed, 29 Jul 2015 14:27:30 -0600

```JP,

Right off the bat, there are a few problems with this formula:

- var 'mr' is not defined anywhere as far as I can tell

- var 'w' is reassigned which is confusing; use a different variable name. And
argument 'vv' does not seem to be used

- var 'd' is assigned but never used

I would suggest cleaning up these problems, and see where you get.

Best,

Unidata IDV Support

> I was trying to use this equation:def cloudht925(gph,temp,rh,vv): import math
> ht=noUnit(make2D(gph))*3.28 t=noUnit(make2D(temp)) hum=noUnit(make2D(rh))
> w=noUnit(make2D(vv)) p0=1000.0 cp=1004.67 lv=2257 rd=287.05 rv=461.5
> es=6.11*math.exp((17.625*(t-273.15))/(t-30.11)) e=es*rh/100
> w=621.97*e/(925-e) expo=math.exp((lv*w)/(cp*t))
> num=-1.0*t*((p0**(rd/cp)/(925**(1+(rd/cp))))) denom=(hum/100)**(mr*rv/cp)
> b=expo*num/denom c=-6.67*b-0.667 d=c*-10*w if c<0: h=12000 elif w>-0.1:
> h=12000 else: h=ht return h
> JP Kalb
>
>
>
> On Tuesday, July 28, 2015 8:58 AM, Unidata IDV Support <address@hidden> wrote:
>
>
> JP,
>
> What were you doing when you got this error? It appears you were trying to
> apply
> a formula to some RR data. What is that formula?
>
> Best,
>
> Unidata IDV Support
>
>
> > Full Name: JP Kalb
> > Organization: SJSU/Self
> > Package Version: 5.1u2 build date:2015-04-27 16:07 UTC
> > Operating System: Windows 7
> > Hardware: Java: home: C:\Users\metr166\Documents\IDV_5.1u2\jre version:
> > 1.7.0_51 j3d:1.6.0-pre9-daily-experimental daily
> > Description of problem: Hi there,
> > I got this message as an error
> > "Creating display: Color-Shaded Plan View
> > TypeError: exp(): 1st arg can't be coerced to double"
> > when I was trying my code.
> >
> > ******************
> > Stack trace:
> > Traceback (most recent call last):
> > File "<string>", line 1, in <module>
> > File "<string>", line 13, in cloudht925
> > TypeError: exp(): 1st arg can't be coerced to double
> >
> >
> >
>
>
> Ticket Details
> ===================
> Ticket ID: PAA-696617
> Department: Support IDV
> Priority: Normal
> Status: Closed
>
>
>
>
>

Ticket Details
===================
Ticket ID: PAA-696617
Department: Support IDV
Priority: Normal
Status: Closed

```