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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 103 - (hide annotations)
Fri Aug 29 13:00:05 2014 UTC (9 years, 9 months ago) by guez
Original Path: trunk/phylmd/FCTTRE.f
File size: 2587 byte(s)
Renamed module cvparam to cv_param. Deleted procedure
cv_param. Changed variables of module cv_param into parameters.

In procedures cv_driver, cv_uncompress and cv3_uncompress, removed
some arguments giving dimensions and used module variables klon and
klev instead.

In procedures gradiv2, laplacien_gam and laplacien, changed
declarations of local variables because klevel is not always klev.

Removed code for nudging surface pressure.

Removed arguments pim and pjm of tau2alpha. Added assignment of false
to variable first.

Replaced real argument del of procedures foeew and FOEDE by logical
argument.

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

  ViewVC Help
Powered by ViewVC 1.1.21