source: trunk/src/rh_to_spechum.pro @ 109

Last change on this file since 109 was 97, checked in by pinsard, 13 years ago

suppress blank lines trailing blank

  • Property svn:executable set to *
File size: 936 bytes
RevLine 
[6]1;+
2;
[80]3; =================
4; rh_to_spechum.pro
5; =================
[6]6;
[12]7; .. function:: rh_to_spechum(rh,ta,P)
[6]8;
9;     :param rh: in %
10;     :param ta: air temperature in degC
[12]11;     :param P: pressure in hPa
[6]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;
[80]30; complete example
31;
32; SEE ALSO
33; ========
34;
35; called by :ref:`d2m_to_q2m_erai.pro`
36;
37; use :func:`qsat`
38;
[6]39; EVOLUTIONS
40; ==========
41;
[80]42; $Id$
43;
44; $URL$
45;
46; - fplod 20110811T130223Z aedon.locean-ipsl.upmc.fr (Darwin)
47;
48;   * add reference to qsat function
49;
[6]50; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
51;
52;   * minimal header
53;
54; - pbk 2008
55;
56;   * creation
57;
58;-
[5]59function rh_to_spechum, rh,ta,P
[97]60;
[5]61rhf=rh/100.
62qw=qsat(ta,P)/1000.
[97]63;
[6]64; Air specific humidity (g/kg)
65q=(rhf*qw)/(1.-qw*(1-rhf))*1e3
[97]66;
[5]67return, q
[97]68;
[5]69end
Note: See TracBrowser for help on using the repository browser.