Directory: | ./ |
---|---|
File: | phys/evappot.f90 |
Date: | 2022-01-11 19:19:34 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 13 | 13 | 100.0% |
Branches: | 14 | 14 | 100.0% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | 480 | SUBROUTINE evappot(klon,nbsrf,ftsol,pplay,cdragh, & | |
2 | & t_seri,q_seri,u_seri,v_seri,evap_pot) | ||
3 | |||
4 | IMPLICIT NONE | ||
5 | |||
6 | ! | ||
7 | ! $Header$ | ||
8 | ! | ||
9 | ! ATTENTION!!!!: ce fichier include est compatible format fixe/format libre | ||
10 | ! veillez � n'utiliser que des ! pour les commentaires | ||
11 | ! et � bien positionner les & des lignes de continuation | ||
12 | ! (les placer en colonne 6 et en colonne 73) | ||
13 | ! | ||
14 | ! | ||
15 | ! A1.0 Fundamental constants | ||
16 | REAL RPI,RCLUM,RHPLA,RKBOL,RNAVO | ||
17 | ! A1.1 Astronomical constants | ||
18 | REAL RDAY,REA,REPSM,RSIYEA,RSIDAY,ROMEGA | ||
19 | ! A1.1.bis Constantes concernant l'orbite de la Terre: | ||
20 | REAL R_ecc, R_peri, R_incl | ||
21 | ! A1.2 Geoide | ||
22 | REAL RA,RG,R1SA | ||
23 | ! A1.3 Radiation | ||
24 | ! REAL RSIGMA,RI0 | ||
25 | REAL RSIGMA | ||
26 | ! A1.4 Thermodynamic gas phase | ||
27 | REAL RMO3,RMCO2,RMC,RMCH4,RMN2O,RMCFC11,RMCFC12 | ||
28 | REAL R,RMD,RMV,RD,RV,RCPD,RCPV,RCVD,RCVV | ||
29 | REAL RKAPPA,RETV, eps_w | ||
30 | ! A1.5,6 Thermodynamic liquid,solid phases | ||
31 | REAL RCW,RCS | ||
32 | ! A1.7 Thermodynamic transition of phase | ||
33 | REAL RLVTT,RLSTT,RLMLT,RTT,RATM | ||
34 | ! A1.8 Curve of saturation | ||
35 | REAL RESTT,RALPW,RBETW,RGAMW,RALPS,RBETS,RGAMS | ||
36 | REAL RALPD,RBETD,RGAMD | ||
37 | ! | ||
38 | COMMON/YOMCST/RPI ,RCLUM ,RHPLA ,RKBOL ,RNAVO & | ||
39 | & ,RDAY ,REA ,REPSM ,RSIYEA,RSIDAY,ROMEGA & | ||
40 | & ,R_ecc, R_peri, R_incl & | ||
41 | & ,RA ,RG ,R1SA & | ||
42 | & ,RSIGMA & | ||
43 | & ,R ,RMD ,RMV ,RD ,RV ,RCPD & | ||
44 | & ,RMO3 ,RMCO2 ,RMC ,RMCH4 ,RMN2O ,RMCFC11 ,RMCFC12 & | ||
45 | & ,RCPV ,RCVD ,RCVV ,RKAPPA,RETV, eps_w & | ||
46 | & ,RCW ,RCS & | ||
47 | & ,RLVTT ,RLSTT ,RLMLT ,RTT ,RATM & | ||
48 | & ,RESTT ,RALPW ,RBETW ,RGAMW ,RALPS ,RBETS ,RGAMS & | ||
49 | & ,RALPD ,RBETD ,RGAMD | ||
50 | ! ------------------------------------------------------------------ | ||
51 | !$OMP THREADPRIVATE(/YOMCST/) | ||
52 | ! | ||
53 | ! $Id: YOETHF.h 2799 2017-02-24 18:50:33Z jyg $ | ||
54 | ! | ||
55 | ! ATTENTION!!!!: ce fichier include est compatible format fixe/format libre | ||
56 | ! veillez n'utiliser que des ! pour les commentaires | ||
57 | ! et bien positionner les & des lignes de continuation | ||
58 | ! (les placer en colonne 6 et en colonne 73) | ||
59 | ! | ||
60 | !* COMMON *YOETHF* DERIVED CONSTANTS SPECIFIC TO ECMWF THERMODYNAMICS | ||
61 | ! | ||
62 | ! *R__ES* *CONSTANTS USED FOR COMPUTATION OF SATURATION | ||
63 | ! MIXING RATIO OVER LIQUID WATER(*R_LES*) OR | ||
64 | ! ICE(*R_IES*). | ||
65 | ! *RVTMP2* *RVTMP2=RCPV/RCPD-1. | ||
66 | ! *RHOH2O* *DENSITY OF LIQUID WATER. (RATM/100.) | ||
67 | ! | ||
68 | REAL R2ES, R3LES, R3IES, R4LES, R4IES, R5LES, R5IES | ||
69 | REAL RVTMP2, RHOH2O | ||
70 | REAL R5ALVCP,R5ALSCP,RALVDCP,RALSDCP,RALFDCP,RTWAT,RTBER,RTBERCU | ||
71 | REAL RTICE,RTICECU,RTWAT_RTICE_R,RTWAT_RTICECU_R,RKOOP1,RKOOP2 | ||
72 | LOGICAL OK_BAD_ECMWF_THERMO ! If TRUE, then variables set by rrtm/suphec.F90 | ||
73 | ! If FALSE, then variables set by suphel.F90 | ||
74 | COMMON /YOETHF/R2ES, R3LES, R3IES, R4LES, R4IES, R5LES, R5IES, & | ||
75 | & RVTMP2, RHOH2O, & | ||
76 | & R5ALVCP,R5ALSCP,RALVDCP,RALSDCP, & | ||
77 | & RALFDCP,RTWAT,RTBER,RTBERCU, & | ||
78 | & RTICE,RTICECU,RTWAT_RTICE_R,RTWAT_RTICECU_R,RKOOP1,& | ||
79 | & RKOOP2, & | ||
80 | & OK_BAD_ECMWF_THERMO | ||
81 | |||
82 | !$OMP THREADPRIVATE(/YOETHF/) | ||
83 | ! | ||
84 | ! $Header$ | ||
85 | ! | ||
86 | ! | ||
87 | ! ATTENTION!!!!: ce fichier include est compatible format fixe/format libre | ||
88 | ! veillez n'utiliser que des ! pour les commentaires | ||
89 | ! et bien positionner les & des lignes de continuation | ||
90 | ! (les placer en colonne 6 et en colonne 73) | ||
91 | ! | ||
92 | ! ------------------------------------------------------------------ | ||
93 | ! This COMDECK includes the Thermodynamical functions for the cy39 | ||
94 | ! ECMWF Physics package. | ||
95 | ! Consistent with YOMCST Basic physics constants, assuming the | ||
96 | ! partial pressure of water vapour is given by a first order | ||
97 | ! Taylor expansion of Qs(T) w.r.t. to Temperature, using constants | ||
98 | ! in YOETHF | ||
99 | ! ------------------------------------------------------------------ | ||
100 | REAL PTARG, PDELARG, P5ARG, PQSARG, PCOARG | ||
101 | REAL FOEEW, FOEDE, qsats, qsatl, dqsats, dqsatl | ||
102 | LOGICAL thermcep | ||
103 | PARAMETER (thermcep=.TRUE.) | ||
104 | ! | ||
105 | FOEEW ( PTARG,PDELARG ) = EXP ( & | ||
106 | & (R3LES*(1.-PDELARG)+R3IES*PDELARG) * (PTARG-RTT) & | ||
107 | & / (PTARG-(R4LES*(1.-PDELARG)+R4IES*PDELARG)) ) | ||
108 | ! | ||
109 | FOEDE ( PTARG,PDELARG,P5ARG,PQSARG,PCOARG ) = PQSARG*PCOARG*P5ARG & | ||
110 | & / (PTARG-(R4LES*(1.-PDELARG)+R4IES*PDELARG))**2 | ||
111 | ! | ||
112 | qsats(ptarg) = 100.0 * 0.622 * 10.0 & | ||
113 | & ** (2.07023 - 0.00320991 * ptarg & | ||
114 | & - 2484.896 / ptarg + 3.56654 * LOG10(ptarg)) | ||
115 | qsatl(ptarg) = 100.0 * 0.622 * 10.0 & | ||
116 | & ** (23.8319 - 2948.964 / ptarg & | ||
117 | & - 5.028 * LOG10(ptarg) & | ||
118 | & - 29810.16 * EXP( - 0.0699382 * ptarg) & | ||
119 | & + 25.21935 * EXP( - 2999.924 / ptarg)) | ||
120 | ! | ||
121 | dqsats(ptarg,pqsarg) = RLVTT/RCPD*pqsarg * (3.56654/ptarg & | ||
122 | & +2484.896*LOG(10.)/ptarg**2 & | ||
123 | & -0.00320991*LOG(10.)) | ||
124 | dqsatl(ptarg,pqsarg) = RLVTT/RCPD*pqsarg*LOG(10.)* & | ||
125 | & (2948.964/ptarg**2-5.028/LOG(10.)/ptarg & | ||
126 | & +25.21935*2999.924/ptarg**2*EXP(-2999.924/ptarg) & | ||
127 | & +29810.16*0.0699382*EXP(-0.0699382*ptarg)) | ||
128 | |||
129 | |||
130 | INTEGER :: klon, nbsrf | ||
131 | REAL, DIMENSION(klon,nbsrf) :: ftsol,evap_pot | ||
132 | REAL, DIMENSION(klon) :: pplay,t_seri,wind,q_seri,u_seri,v_seri,cdragh | ||
133 | |||
134 | INTEGER :: nsrf,i | ||
135 | 960 | REAL, DIMENSION(klon,nbsrf) :: qsat_ftsol | |
136 | 480 | REAL, DIMENSION(klon) :: rhos, norme_u | |
137 | REAL :: t_coup | ||
138 | |||
139 | t_coup=234. ! Quelle horreur !!!!! | ||
140 | |||
141 |
2/2✓ Branch 0 taken 1920 times.
✓ Branch 1 taken 480 times.
|
2400 | DO nsrf = 1, nbsrf |
142 |
2/2✓ Branch 0 taken 1908480 times.
✓ Branch 1 taken 1920 times.
|
1910880 | DO i = 1, klon |
143 |
2/2✓ Branch 0 taken 93621 times.
✓ Branch 1 taken 1814859 times.
|
1910400 | IF (ftsol(i,nsrf).LT.t_coup) THEN |
144 | 93621 | qsat_ftsol(i,nsrf) = qsats(ftsol(i,nsrf))/pplay(i) | |
145 | ELSE | ||
146 | 1814859 | qsat_ftsol(i,nsrf) = qsatl(ftsol(i,nsrf))/pplay(i) | |
147 | ENDIF | ||
148 | ENDDO | ||
149 | ENDDO | ||
150 | ! ========================================================== c | ||
151 | ! Calcul de l'evaporation Potentielle | ||
152 | |||
153 | |||
154 |
2/2✓ Branch 0 taken 477120 times.
✓ Branch 1 taken 480 times.
|
477600 | rhos(:) = pplay(:)/(RD*t_seri(:)) |
155 |
2/2✓ Branch 0 taken 477120 times.
✓ Branch 1 taken 480 times.
|
477600 | norme_u(:)=1.+sqrt(u_seri(:)*u_seri(:)+v_seri(:)*v_seri(:)) |
156 |
2/2✓ Branch 0 taken 1920 times.
✓ Branch 1 taken 480 times.
|
2400 | DO nsrf = 1, nbsrf |
157 |
2/2✓ Branch 0 taken 1908480 times.
✓ Branch 1 taken 1920 times.
|
1910880 | evap_pot(:,nsrf)=rhos(:)*cdragh(:)*norme_u(:)*(qsat_ftsol(:,nsrf)-q_seri(:)) |
158 | ENDDO | ||
159 | 480 | RETURN | |
160 | |||
161 | END | ||
162 |