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

Diff of /trunk/phylmd/FCTTRE.f

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

revision 102 by guez, Wed Mar 5 14:57:53 2014 UTC revision 103 by guez, Fri Aug 29 13:00:05 2014 UTC
# Line 13  module FCTTRE Line 13  module FCTTRE
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(T, DEL)    elemental REAL function FOEEW(T, DEL)
21    
22      use yoethf_m, only: R3LES, R3IES, R4LES, R4IES      use yoethf_m, only: R3LES, R3IES, R4LES, R4IES
23      use SUPHEC_M, only: rtt      use SUPHEC_M, only: rtt
24    
25      REAL, intent(in):: T      REAL, intent(in):: T
26      REAL, intent(in):: DEL ! 1 for ice, 0 for liquid      logical, intent(in):: DEL ! ice, else liquid
27    
28      !-----------------------      !-----------------------
29    
30      FOEEW = EXP((R3LES * (1. - DEL) + R3IES * DEL) * (T - RTT) &      FOEEW = exp(merge(R3IES / (T - R4IES), R3lES / (T - R4lES), del) &
31           / (T - (R4LES * (1. - DEL) + R4IES * DEL)))           * (T - RTT))
32    
33    end function FOEEW    end function FOEEW
34    
# Line 38  contains Line 38  contains
38    
39      use yoethf_m, only: R4LES, R4IES      use yoethf_m, only: R4LES, R4IES
40    
41      REAL, intent(in):: T, DEL      REAL, intent(in):: T
42        logical, intent(in):: DEL ! ice, else liquid
43      real, intent(in):: P5ARG, QS, PCOARG      real, intent(in):: P5ARG, QS, PCOARG
44    
45      !-----------------------      !-----------------------
46    
47      FOEDE = QS*PCOARG*P5ARG / (T-(R4LES*(1.-DEL)+R4IES*DEL))**2      FOEDE = QS * PCOARG * P5ARG / (T - merge(R4IES, R4lES, del))**2
48    
49    end function FOEDE    end function FOEDE
50    
51    !******************************************    !******************************************
52    
53    REAL function qsats(t)    elemental REAL function qsats(t)
54    
55      REAL, intent(in):: T      REAL, intent(in):: T
56    
57      !-----------------------      !-----------------------
58    
59      qsats = 100.0 * 0.622 &      qsats = 100. * 0.622 &
60           * 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))
61    
62    end function qsats    end function qsats
63    
64    !******************************************    !******************************************
65    
66    REAL function qsatl(t)    elemental REAL function qsatl(t)
67    
68      REAL, intent(in):: T      REAL, intent(in):: T
69    
70      !-----------------------      !-----------------------
71    
72      qsatl = 100.0 * 0.622 * 10.**(23.8319 - 2948.964 / t &      qsatl = 100. * 0.622 * 10.**(23.8319 - 2948.964 / t &
73           - 5.028 * LOG10(t) - 29810.16 * EXP(- 0.0699382 * t) &           - 5.028 * LOG10(t) - 29810.16 * EXP(- 0.0699382 * t) &
74           + 25.21935 * EXP(- 2999.924 / t))           + 25.21935 * EXP(- 2999.924 / t))
75    

Legend:
Removed from v.102  
changed lines
  Added in v.103

  ViewVC Help
Powered by ViewVC 1.1.21