Hello,
Today, I found a bug of funtion "mixhum_ptrh" (http://www.ncl.ucar.edu/Document/Functions/Built-in/mixhum_ptrh.shtml).
On the website,
p = 1000. ; hPa
tk = 18. + 273.15 ; K
rh = 46.5 ; %
q = mixhum_ptrh (p, tk, rh, 2) ; q = 5.9e-3 (kg/kg)
q = mixhum_ptrh (p, tk, rh,-2) ; q = 5.9 ( g/kg)
Actually, mixhum_ptrh (p, tk, rh,-2) return 6.01846.
I checked the source code of this funtion "mixhum_ptrh", and I found a bug:
Line 46 of Fortran source code "mixhum_ptd.f", should be IF (ABS(ISWIT).EQ.2) THEN.
So, when the value of iswit equal to -2, the function of "mixhum_ptrh" will return wrong values.
Best Regards,
Yongjie Huang
HUANG Yongjie
Key Laboratory of Cloud-Precipitation Physics and Severe Storm(LACS),
Chinese Academy of Sciences
Email Address: huangyj@mail.iap.ac.cn OR huangynj@gmail.com
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:46 MDT