source: trunk/src/dew_temp_airt_rel_humidity_jv.pro

Last change on this file was 203, checked in by pinsard, 10 years ago

fix thanks to coding rules

  • Property svn:executable set to *
  • Property svn:keywords set to Id URL
File size: 1.2 KB
Line 
1;+
2;
3; =============================
4; dew_temp_airt_rel_humidity_jv
5; =============================
6;
7; .. function:: dew_temp_airt_rel_humidity_jv(t, td)
8;
9;     :param t: air temperature in degC
10;     :param td: dew point temperature in degC
11;
12; SEE ALSO
13; ========
14;
15; EXAMPLES
16; ========
17;
18; .. code-block:: idl
19;
20;    t = +todo+
21;    td = +todo+
22;    result = dew_temp_airt_rel_humidity_jv(t, td)
23;
24; TODO
25; ====
26;
27; hard coded directory - usage of ${PROJECT_ID}
28;
29; coding rules
30;
31; EVOLUTIONS
32; ==========
33;
34; $Id$
35;
36; $URL$
37;
38; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
39;
40;   * minimal header
41;
42; - pbk 2008
43;
44;   * creation
45;
46;-
47function dew_temp_airt_rel_humidity_jv, t,td
48;
49if (not keyword_set(t)) then t=28            ; air temperature in degC
50if (not keyword_set(td)) then td=23           ; dew point temperature in degC
51es0=6.11        ; reference saturation vapor pressure (hPa)
52;
53; calculating fields.  First saturation vapor pressure (Es) and
54; actual vapor pressure are calculated.  The ratio (E/Es)*100
55; gives the relative humidity
56;
57e=es0*10^(7.5*td/(237.7+td))
58es=es0*10^(7.5*t/(237.7+T))
59;
60rh=(e/es)*100
61;print, 'RH = ',rh
62;
63return, rh
64;
65end
Note: See TracBrowser for help on using the repository browser.