1 | !********************************************************************** |
---|
2 | ! Copyright 2016 * |
---|
3 | ! Andreas Stohl, Massimo Cassiani, Petra Seibert, A. Frank, * |
---|
4 | ! Gerhard Wotawa, Caroline Forster, Sabine Eckhardt, John Burkhart, * |
---|
5 | ! Harald Sodemann * |
---|
6 | ! * |
---|
7 | ! This file is part of FLEXPART-NorESM * |
---|
8 | ! * |
---|
9 | ! FLEXPART-NorESM is free software: you can redistribute it * |
---|
10 | ! and/or modify * |
---|
11 | ! it under the terms of the GNU General Public License as published by* |
---|
12 | ! the Free Software Foundation, either version 3 of the License, or * |
---|
13 | ! (at your option) any later version. * |
---|
14 | ! * |
---|
15 | ! FLEXPART-NorESM is distributed in the hope that it will be useful, * |
---|
16 | ! but WITHOUT ANY WARRANTY; without even the implied warranty of * |
---|
17 | ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
---|
18 | ! GNU General Public License for more details. * |
---|
19 | ! * |
---|
20 | ! You should have received a copy of the GNU General Public License * |
---|
21 | ! along with FLEXPART-NorESM. * |
---|
22 | ! If not, see <http://www.gnu.org/licenses/>. * |
---|
23 | !********************************************************************** |
---|
24 | |
---|
25 | |
---|
26 | Function dewpoint(TK,Q,P) |
---|
27 | !***************************************************************************** |
---|
28 | ! * |
---|
29 | ! This routine calculates dew point in kelvin * |
---|
30 | ! files from NorESM * |
---|
31 | ! * |
---|
32 | ! Author: * |
---|
33 | ! M. Cassiani 2016 * |
---|
34 | ! * |
---|
35 | ! * |
---|
36 | !***************************************************************************** |
---|
37 | ! * |
---|
38 | ! Variables: * |
---|
39 | ! TK temperatur in kelvin * |
---|
40 | ! Q specific humidity * |
---|
41 | ! P Surface pressure * |
---|
42 | !***************************************************************************** |
---|
43 | |
---|
44 | |
---|
45 | implicit none |
---|
46 | real(kind=4) :: TK,Q,P,es,t,e,dewpoint,a,b,c,dewpoint2 |
---|
47 | |
---|
48 | t=TK-273.15 !from kelvin to celsius |
---|
49 | if (t.gt.0) then !from Campbell and Norman introduction to environmental BioPhysics 1998 p. 41-43 |
---|
50 | !considering t<0 above ice t>0 above water |
---|
51 | a=611 !Pa |
---|
52 | b=17.502 ! |
---|
53 | c=240.97 ! |
---|
54 | else |
---|
55 | a=611 !Pa |
---|
56 | b=21.87 ! |
---|
57 | c=265.5 ! |
---|
58 | end if |
---|
59 | !es=a*exp(b*t/(t+c)) ! from Campbell and Norman, , springer verlag. |
---|
60 | !es=exp(53.67957-6473.7/(t+273.16)-4.8451*log(t+273.16)) !saturation pressure |
---|
61 | e=Q*P/0.622 !approximate partial pressure of water wapor in Pa, 0.622 is the ratio of molar mass of water and air |
---|
62 | !also (1-0.622)e was considered negligible compared to P. |
---|
63 | !u=e/es !relative humidity |
---|
64 | dewpoint=(c*log(e/a)/(b-log(e/a)))+273.15 !from Campbell and Norman, see above |
---|
65 | !dewpoint2=5.42*10**3/(log(2.53*10.**11*0.622/(Q*P))) !-273 !Rogers and Yau's "A Short Course in Cloud Physics" |
---|
66 | |
---|
67 | end |
---|