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

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

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

trunk/phylmd/FCTTRE.f revision 82 by guez, Wed Mar 5 14:57:53 2014 UTC trunk/Sources/phylmd/FCTTRE.f revision 207 by guez, Thu Sep 1 10:30:53 2016 UTC
# Line 13  module FCTTRE Line 13  module FCTTRE
13    
14    implicit none    implicit none
15    
   LOGICAL, PARAMETER:: thermcep= .TRUE.  
   
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      REAL, intent(in):: T
24      REAL, intent(in):: DEL ! 1 for ice, 0 for liquid      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)    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    
49    !******************************************    !******************************************
50    
51    REAL function qsats(t)    elemental REAL function qsats(t)
52    
53      REAL, intent(in):: T      REAL, intent(in):: T
54    
55      !-----------------------      !-----------------------
56    
57      qsats = 100.0 * 0.622 &      qsats = 100. * 0.622 &
58           * 10.**(2.07023 - 0.00320991 * t - 2484.896 / t + 3.56654 * LOG10(t))           * 10.**(2.07023 - 0.00320991 * t - 2484.896 / t + 3.56654 * LOG10(t))
59    
60    end function qsats    end function qsats
61    
62    !******************************************    !******************************************
63    
64    REAL function qsatl(t)    elemental REAL function qsatl(t)
65    
66      REAL, intent(in):: T      REAL, intent(in):: T
67    
68      !-----------------------      !-----------------------
69    
70      qsatl = 100.0 * 0.622 * 10.**(23.8319 - 2948.964 / t &      qsatl = 100. * 0.622 * 10.**(23.8319 - 2948.964 / t &
71           - 5.028 * LOG10(t) - 29810.16 * EXP(- 0.0699382 * t) &           - 5.028 * LOG10(t) - 29810.16 * EXP(- 0.0699382 * t) &
72           + 25.21935 * EXP(- 2999.924 / t))           + 25.21935 * EXP(- 2999.924 / t))
73    
# Line 99  contains Line 98  contains
98    
99      !-----------------------      !-----------------------
100    
101      dqsatl = RLVTT / RCPD * qs * LOG(10.) &      dqsatl = RLVTT / RCPD * qs * LOG(10.) * (2948.964 / t**2 - 5.028 &
102           * (2948.964/t**2-5.028/LOG(10.)/t &           / LOG(10.) / t + 25.21935 * 2999.924 / t**2 * EXP(- 2999.924 / t) &
103           +25.21935*2999.924/t**2*EXP(-2999.924/t) &           + 29810.16 * 0.0699382 * EXP(- 0.0699382 * t))
          +29810.16*0.0699382*EXP(-0.0699382*t))  
104    
105    end function dqsatl    end function dqsatl
106    

Legend:
Removed from v.82  
changed lines
  Added in v.207

  ViewVC Help
Powered by ViewVC 1.1.21