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

Diff of /trunk/phylmd/FCTTRE.f90

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.3  
changed lines
  Added in v.39

  ViewVC Help
Powered by ViewVC 1.1.21