Last change
on this file since 67 was
50,
checked in by pinsard, 13 years ago
|
replace TROPFLUX by PROJECT
|
-
Property svn:executable set to
*
|
File size:
741 bytes
|
Rev | Line | |
---|
[6] | 1 | ;+ |
---|
| 2 | ; |
---|
| 3 | ; ============= |
---|
| 4 | ; rh_to_spechum |
---|
| 5 | ; ============= |
---|
| 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 | ; |
---|
[50] | 28 | ; hard coded directory - usage of ${PROJECT_ID} |
---|
[6] | 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 | ;- |
---|
[5] | 44 | function rh_to_spechum, rh,ta,P |
---|
| 45 | |
---|
| 46 | rhf=rh/100. |
---|
| 47 | qw=qsat(ta,P)/1000. |
---|
| 48 | |
---|
[6] | 49 | ; Air specific humidity (g/kg) |
---|
| 50 | q=(rhf*qw)/(1.-qw*(1-rhf))*1e3 |
---|
| 51 | |
---|
[5] | 52 | return, q |
---|
| 53 | |
---|
| 54 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.