Dear all,
According to the documentation the NCL function mixhum_ptrh to calculate
the mixing ratio or specific humidity from pressure, temperature and
relative humidity (see
https://www.ncl.ucar.edu/Document/Functions/Built-in/mixhum_ptrh.shtml).
There is a flag, iswat, to select mixing ratio (iswit = 1) or specific
humidity (iswit = 2). However, we think that with iswit = 1 actually the
specific humidity is calculated, instead of the mixing ratio.
We looked at the source code from version 6.2.0. The calculations
performed in .ni/src/lib/nfpfort/mixhum_ptrh.f are:
DATA T0,EP,ONEMEP,ES0,A,B/273.15D0,0.622D0,0.378D0,6.11D0,
+ 17.269D0,35.86D0/
EST = ES0*EXP((A* (TK-T0))/ (TK-B))
QST = (EP*EST)/ (P-ONEMEP*EST)
c mix ratio
QW = QST* (RH*.01D0)
c ?specific hum?
IF (ISWIT.EQ.2) THEN
QW = QW/ (1.D0+QW)
END IF
Here EST is the vapour pressure at saturation and QST is the specific
humidity at saturation. And hence, the QW that is calculated is
(approximately) the specific humidity because of the ONEMEP correction,
while the code outputs it as the mixing ratio. The subsequent step to
calculate specific humidity, if ISWIT = 2, is then also not correct,
because QW is already specific humidity and not the mixing ratio.
Better still it would be to first calculate the vapour pressure E as RH
= 100*E/EST and then calculate specific humidity (Q) and mixing ratio
(W) using (same symbols as in code):
Q = (EP*E) / (P-ONEMEP*E)
W = (EP*E) / (P-E)
Please let me know what you think,
Bert
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jul 03 02:54:04 2014
This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:46 MDT