Re: strange behavior

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue, 26 Jun 2007 13:06:15 -0600

I can not test your user defined function because you did not include it.
However, the built-in function mixhum_ptrh worked just fine
with multiple calls.

ncl 1> p = 1000.
ncl 2> tk = 18. + 273.15
ncl 3> rh = 46.5
ncl 4> print(mixhum_ptrh (p, tk, rh, 2))
ncl 5> print(mixhum_ptrh (p, tk, rh, 2))
ncl 6> print(mixhum_ptrh (p, tk, rh, 2))

Each returned: 0.005982457 kg/kg ==> ~ 6g/kg

Mateus da Silva Teixeira wrote:
> Dear NCL users,
>
> I'm having a strange behavior of mixhum_ptrh function and my
> user-defined function. Both functions give the specific humidity given
> temperature, pressure and relative humidity. I printed their results to
> compare them, but I'm getting this:
>
> ncl 1> p = 1000.
> ncl 2> tk = 18. + 273.15
> ncl 3> rh = 46.5
> ncl 4> print(qSpec(tk,rh,p)+" "+mixhum_ptrh (p, tk, rh, 2))
> (0) 5.96583e-05 -0.00771059
> ncl 5> print(qSpec(tk,rh,p)+" "+mixhum_ptrh (p, tk, rh, 2))
> (0) nan -7.65217e-05
> ncl 6> print(qSpec(tk,rh,p)+" "+mixhum_ptrh (p, tk, rh, 2))
> (0) -1.73974 -7.72574e-07
> ncl 7> print(qSpec(tk,rh,p)+" "+mixhum_ptrh (p, tk, rh, 2))
> (0) 1.86416e-06 8.26161e-10
>
> As you can see, the values isn't the same in successive calls.
> I'm using NCL 4.3.0.
>
> Do someone already seen this?
>
> Thanks,
>
> Mateus
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jun 26 2007 - 13:06:15 MDT

This archive was generated by hypermail 2.2.0 : Wed Jun 27 2007 - 09:47:23 MDT