/[lmdze]/trunk/Sources/phylmd/FCTTRE.f
ViewVC logotype

Contents of /trunk/Sources/phylmd/FCTTRE.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 207 - (show annotations)
Thu Sep 1 10:30:53 2016 UTC (7 years, 8 months ago) by guez
File size: 2550 byte(s)
New philosophy on compiler options.

Removed source code for thermcep = f. (Not used in LMDZ either.)

1 module FCTTRE
2
3 ! From phylmd/FCTTRE.inc, version 1.2, 2004/06/22 11:45:32
4
5 ! This module includes the thermodynamical functions for the cycle
6 ! 39 ECMWF physics package. Consistent with "SUPHEC_M" basic
7 ! physical constants, assuming the partial pressure of water vapour
8 ! is given by a first order Taylor expansion of "Qs(T)" with respect
9 ! to temperature, using constants in "yoethf_m".
10
11 ! Probably from Buck, 1981, Journal of Applied Meteorology, volume
12 ! 20, number 12, page 1527.
13
14 implicit none
15
16 contains
17
18 elemental REAL function FOEEW(T, ICE)
19
20 use yoethf_m, only: R3LES, R3IES, R4LES, R4IES
21 use SUPHEC_M, only: rtt
22
23 REAL, intent(in):: T
24 logical, intent(in):: ICE ! else liquid
25
26 !-----------------------
27
28 FOEEW = exp(merge(R3IES / (T - R4IES), R3lES / (T - R4lES), ice) &
29 * (T - RTT))
30
31 end function FOEEW
32
33 !******************************************
34
35 REAL function FOEDE(T, ICE, P5ARG, QS, PCOARG)
36
37 use yoethf_m, only: R4LES, R4IES
38
39 REAL, intent(in):: T
40 logical, intent(in):: ICE ! else liquid
41 real, intent(in):: P5ARG, QS, PCOARG
42
43 !-----------------------
44
45 FOEDE = QS * PCOARG * P5ARG / (T - merge(R4IES, R4lES, ice))**2
46
47 end function FOEDE
48
49 !******************************************
50
51 elemental REAL function qsats(t)
52
53 REAL, intent(in):: T
54
55 !-----------------------
56
57 qsats = 100. * 0.622 &
58 * 10.**(2.07023 - 0.00320991 * t - 2484.896 / t + 3.56654 * LOG10(t))
59
60 end function qsats
61
62 !******************************************
63
64 elemental REAL function qsatl(t)
65
66 REAL, intent(in):: T
67
68 !-----------------------
69
70 qsatl = 100. * 0.622 * 10.**(23.8319 - 2948.964 / t &
71 - 5.028 * LOG10(t) - 29810.16 * EXP(- 0.0699382 * t) &
72 + 25.21935 * EXP(- 2999.924 / t))
73
74 end function qsatl
75
76 !******************************************
77
78 REAL function dqsats(t, qs)
79
80 use SUPHEC_M, only: RLVTT, rcpd
81
82 REAL, intent(in):: T, qs
83
84 !-----------------------
85
86 dqsats = RLVTT / RCPD * qs * (3.56654/t &
87 +2484.896*LOG(10.)/t**2 - 0.00320991*LOG(10.))
88
89 end function dqsats
90
91 !******************************************
92
93 REAL function dqsatl(t, qs)
94
95 use SUPHEC_M, only: RLVTT, rcpd
96
97 REAL, intent(in):: T, qs
98
99 !-----------------------
100
101 dqsatl = RLVTT / RCPD * qs * LOG(10.) * (2948.964 / t**2 - 5.028 &
102 / LOG(10.) / t + 25.21935 * 2999.924 / t**2 * EXP(- 2999.924 / t) &
103 + 29810.16 * 0.0699382 * EXP(- 0.0699382 * t))
104
105 end function dqsatl
106
107 end module FCTTRE

  ViewVC Help
Powered by ViewVC 1.1.21