source: trunk/src/rh_to_spechum.pro @ 79

Last change on this file since 79 was 50, checked in by pinsard, 13 years ago

replace TROPFLUX by PROJECT

  • Property svn:executable set to *
File size: 741 bytes
Line 
1;+
2;
3; =============
4; rh_to_spechum
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; hard coded directory - usage of ${PROJECT_ID}
29;
30; coding rules
31;
32; EVOLUTIONS
33; ==========
34;
35; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
36;
37;   * minimal header
38;
39; - pbk 2008
40;
41;   * creation
42;
43;-
44function rh_to_spechum, rh,ta,P
45
46rhf=rh/100.
47qw=qsat(ta,P)/1000.
48
49; Air specific humidity (g/kg)
50q=(rhf*qw)/(1.-qw*(1-rhf))*1e3
51
52return, q
53
54end
Note: See TracBrowser for help on using the repository browser.