Last change
on this file since 80 was
80,
checked in by pinsard, 13 years ago
|
progress on humidity processing
|
-
Property svn:executable set to
*
|
File size:
932 bytes
|
Line | |
---|
1 | ;+ |
---|
2 | ; |
---|
3 | ; ================= |
---|
4 | ; rh_to_spechum.pro |
---|
5 | ; ================= |
---|
6 | ; |
---|
7 | ; .. function:: rh_to_spechum(rh,ta,P) |
---|
8 | ; |
---|
9 | ; :param rh: in % |
---|
10 | ; :param ta: air temperature in degC |
---|
11 | ; :param P: pressure in hPa |
---|
12 | ; |
---|
13 | ; :returns: Air specific humidity (g/kg) |
---|
14 | ; |
---|
15 | ; EXAMPLES |
---|
16 | ; ======== |
---|
17 | ; |
---|
18 | ; :: |
---|
19 | ; |
---|
20 | ; IDL> rh=+todo+ |
---|
21 | ; IDL> ta=+todo+ |
---|
22 | ; IDL> P=+todo+ |
---|
23 | ; IDL> result=rh_to_spechum(rh,ta,P) |
---|
24 | ; |
---|
25 | ; TODO |
---|
26 | ; ==== |
---|
27 | ; |
---|
28 | ; coding rules |
---|
29 | ; |
---|
30 | ; complete example |
---|
31 | ; |
---|
32 | ; SEE ALSO |
---|
33 | ; ======== |
---|
34 | ; |
---|
35 | ; called by :ref:`d2m_to_q2m_erai.pro` |
---|
36 | ; |
---|
37 | ; use :func:`qsat` |
---|
38 | ; |
---|
39 | ; EVOLUTIONS |
---|
40 | ; ========== |
---|
41 | ; |
---|
42 | ; $Id$ |
---|
43 | ; |
---|
44 | ; $URL$ |
---|
45 | ; |
---|
46 | ; - fplod 20110811T130223Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
47 | ; |
---|
48 | ; * add reference to qsat function |
---|
49 | ; |
---|
50 | ; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
51 | ; |
---|
52 | ; * minimal header |
---|
53 | ; |
---|
54 | ; - pbk 2008 |
---|
55 | ; |
---|
56 | ; * creation |
---|
57 | ; |
---|
58 | ;- |
---|
59 | function rh_to_spechum, rh,ta,P |
---|
60 | |
---|
61 | rhf=rh/100. |
---|
62 | qw=qsat(ta,P)/1000. |
---|
63 | |
---|
64 | ; Air specific humidity (g/kg) |
---|
65 | q=(rhf*qw)/(1.-qw*(1-rhf))*1e3 |
---|
66 | |
---|
67 | return, q |
---|
68 | |
---|
69 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.