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