1 |
module FCTTRE |
module FCTTRE |
2 |
|
|
3 |
! From phylmd/FCTTRE.inc, version 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 cycle |
! This module includes the thermodynamical functions for the cycle |
6 |
! 39 ECMWF Physics package. Consistent with SUPHEC_M basic physics |
! 39 ECMWF physics package. Consistent with "SUPHEC_M" basic |
7 |
! constants, assuming the partial pressure of water vapour is given |
! physical constants, assuming the partial pressure of water vapour |
8 |
! by a first order Taylor expansion of Qs(T) with respect to |
! is given by a first order Taylor expansion of "Qs(T)" with respect |
9 |
! temperature, using constants in yoethf_m. |
! to temperature, using constants in "yoethf_m". |
|
! Probably from Buck, 1981, Journal of Applied Meteorology, 20, 1527. |
|
10 |
|
|
11 |
implicit none |
! Probably from Buck, 1981, Journal of Applied Meteorology, volume |
12 |
|
! 20, number 12, page 1527. |
13 |
|
|
14 |
LOGICAL, PARAMETER:: thermcep= .TRUE. |
implicit none |
15 |
|
|
16 |
contains |
contains |
17 |
|
|
18 |
REAL function FOEEW(T, DEL) |
elemental REAL function FOEEW(T, ICE) |
19 |
|
|
20 |
use yoethf_m, only: R3LES, R3IES, R4LES, R4IES |
use yoethf_m, only: R3LES, R3IES, R4LES, R4IES |
21 |
use SUPHEC_M, only: rtt |
use SUPHEC_M, only: rtt |
22 |
|
|
23 |
REAL, intent(in):: T, DEL |
REAL, intent(in):: T |
24 |
|
logical, intent(in):: ICE ! else liquid |
25 |
|
|
26 |
!----------------------- |
!----------------------- |
27 |
|
|
28 |
FOEEW = EXP((R3LES * (1. - DEL) + R3IES * DEL) * (T - RTT) & |
FOEEW = exp(merge(R3IES / (T - R4IES), R3lES / (T - R4lES), ice) & |
29 |
/ (T - (R4LES * (1. - DEL) + R4IES * DEL))) |
* (T - RTT)) |
30 |
|
|
31 |
end function FOEEW |
end function FOEEW |
32 |
|
|
33 |
!****************************************** |
!****************************************** |
34 |
|
|
35 |
REAL function FOEDE(T, DEL, P5ARG, QS, PCOARG) |
pure REAL function FOEDE(T, ICE, P5ARG, QS, PCOARG) |
36 |
|
|
37 |
use yoethf_m, only: R4LES, R4IES |
use yoethf_m, only: R4LES, R4IES |
38 |
|
|
39 |
REAL, intent(in):: T, DEL |
REAL, intent(in):: T |
40 |
|
logical, intent(in):: ICE ! else liquid |
41 |
real, intent(in):: P5ARG, QS, PCOARG |
real, intent(in):: P5ARG, QS, PCOARG |
42 |
|
|
43 |
!----------------------- |
!----------------------- |
44 |
|
|
45 |
FOEDE = QS*PCOARG*P5ARG / (T-(R4LES*(1.-DEL)+R4IES*DEL))**2 |
FOEDE = QS * PCOARG * P5ARG / (T - merge(R4IES, R4lES, ice))**2 |
46 |
|
|
47 |
end function FOEDE |
end function FOEDE |
48 |
|
|
|
!****************************************** |
|
|
|
|
|
REAL function qsats(t) |
|
|
|
|
|
REAL, intent(in):: T |
|
|
|
|
|
!----------------------- |
|
|
|
|
|
qsats = 100.0 * 0.622 & |
|
|
* 10.**(2.07023 - 0.00320991 * t - 2484.896 / t + 3.56654 * LOG10(t)) |
|
|
|
|
|
end function qsats |
|
|
|
|
|
!****************************************** |
|
|
|
|
|
REAL function qsatl(t) |
|
|
|
|
|
REAL, intent(in):: T |
|
|
|
|
|
!----------------------- |
|
|
|
|
|
qsatl = 100.0 * 0.622 * 10.**(23.8319 - 2948.964 / t & |
|
|
- 5.028 * LOG10(t) - 29810.16 * EXP(- 0.0699382 * t) & |
|
|
+ 25.21935 * EXP(- 2999.924 / t)) |
|
|
|
|
|
end function qsatl |
|
|
|
|
|
!****************************************** |
|
|
|
|
|
REAL function dqsats(t, qs) |
|
|
|
|
|
use SUPHEC_M, only: RLVTT, rcpd |
|
|
|
|
|
REAL, intent(in):: T, qs |
|
|
|
|
|
!----------------------- |
|
|
|
|
|
dqsats = RLVTT / RCPD * qs * (3.56654/t & |
|
|
+2484.896*LOG(10.)/t**2 - 0.00320991*LOG(10.)) |
|
|
|
|
|
end function dqsats |
|
|
|
|
|
!****************************************** |
|
|
|
|
|
REAL function dqsatl(t, qs) |
|
|
|
|
|
use SUPHEC_M, only: RLVTT, rcpd |
|
|
|
|
|
REAL, intent(in):: T, qs |
|
|
|
|
|
!----------------------- |
|
|
|
|
|
dqsatl = RLVTT / RCPD * qs * LOG(10.) & |
|
|
* (2948.964/t**2-5.028/LOG(10.)/t & |
|
|
+25.21935*2999.924/t**2*EXP(-2999.924/t) & |
|
|
+29810.16*0.0699382*EXP(-0.0699382*t)) |
|
|
|
|
|
end function dqsatl |
|
|
|
|
49 |
end module FCTTRE |
end module FCTTRE |