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

Contents of /trunk/phylmd/FCTTRE.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 104 - (show annotations)
Thu Sep 4 10:05:52 2014 UTC (9 years, 8 months ago) by guez
File size: 2602 byte(s)
Removed procedure sortvarc0. Called sortvarc with an additional
argument resetvarc instead. (Following LMDZ.) Moved current time
computations and some printing statements from sortvarc to
caldyn. Could then remove arguments itau and time_0 of sortvarc, and
could remove "use dynetat0". Better to keep "dynetat0.f" as a gcm-only
file.

Moved some variables from module ener to module sortvarc.

Split file "mathelp.f" into single-procedure files.

Removed unused argument nadv of adaptdt. Removed dimension arguments
of bernoui.

Removed unused argument nisurf of interfoce_lim. Changed the size of
argument lmt_sst of interfoce_lim from klon to knon. Removed case when
newlmt is false.

dynredem1 is called only once in each run, either ce0l or gcm. So
variable nb in call to nf95_put_var was always 1. Removed variable nb.

Removed dimension arguments of calcul_fluxs. Removed unused arguments
precip_rain, precip_snow, snow of calcul_fluxs. Changed the size of
all the arrays in calcul_fluxs from klon to knon.

Removed dimension arguments of fonte_neige. Changed the size of all
the arrays in fonte_neige from klon to knon.

Changed the size of arguments tsurf and tsurf_new of interfsurf_hq
from klon to knon. Changed the size of argument ptsrf of soil from
klon to knon.

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 LOGICAL, PARAMETER:: thermcep = .TRUE.
17
18 contains
19
20 elemental REAL function FOEEW(T, DEL)
21
22 use yoethf_m, only: R3LES, R3IES, R4LES, R4IES
23 use SUPHEC_M, only: rtt
24
25 REAL, intent(in):: T
26 logical, intent(in):: DEL ! ice, else liquid
27
28 !-----------------------
29
30 FOEEW = exp(merge(R3IES / (T - R4IES), R3lES / (T - R4lES), del) &
31 * (T - RTT))
32
33 end function FOEEW
34
35 !******************************************
36
37 REAL function FOEDE(T, DEL, P5ARG, QS, PCOARG)
38
39 use yoethf_m, only: R4LES, R4IES
40
41 REAL, intent(in):: T
42 logical, intent(in):: DEL ! ice, else liquid
43 real, intent(in):: P5ARG, QS, PCOARG
44
45 !-----------------------
46
47 FOEDE = QS * PCOARG * P5ARG / (T - merge(R4IES, R4lES, del))**2
48
49 end function FOEDE
50
51 !******************************************
52
53 elemental REAL function qsats(t)
54
55 REAL, intent(in):: T
56
57 !-----------------------
58
59 qsats = 100. * 0.622 &
60 * 10.**(2.07023 - 0.00320991 * t - 2484.896 / t + 3.56654 * LOG10(t))
61
62 end function qsats
63
64 !******************************************
65
66 elemental REAL function qsatl(t)
67
68 REAL, intent(in):: T
69
70 !-----------------------
71
72 qsatl = 100. * 0.622 * 10.**(23.8319 - 2948.964 / t &
73 - 5.028 * LOG10(t) - 29810.16 * EXP(- 0.0699382 * t) &
74 + 25.21935 * EXP(- 2999.924 / t))
75
76 end function qsatl
77
78 !******************************************
79
80 REAL function dqsats(t, qs)
81
82 use SUPHEC_M, only: RLVTT, rcpd
83
84 REAL, intent(in):: T, qs
85
86 !-----------------------
87
88 dqsats = RLVTT / RCPD * qs * (3.56654/t &
89 +2484.896*LOG(10.)/t**2 - 0.00320991*LOG(10.))
90
91 end function dqsats
92
93 !******************************************
94
95 REAL function dqsatl(t, qs)
96
97 use SUPHEC_M, only: RLVTT, rcpd
98
99 REAL, intent(in):: T, qs
100
101 !-----------------------
102
103 dqsatl = RLVTT / RCPD * qs * LOG(10.) * (2948.964 / t**2 - 5.028 &
104 / LOG(10.) / t + 25.21935 * 2999.924 / t**2 * EXP(- 2999.924 / t) &
105 + 29810.16 * 0.0699382 * EXP(- 0.0699382 * t))
106
107 end function dqsatl
108
109 end module FCTTRE

  ViewVC Help
Powered by ViewVC 1.1.21