[2007] | 1 | SUBROUTINE concvl(iflag_clos, & |
---|
[5143] | 2 | dtime, paprs, pplay, k_upper_cv, & |
---|
| 3 | t, q, t_wake, q_wake, s_wake, u, v, tra, ntra, & |
---|
| 4 | Ale, Alp, sig1, w01, & |
---|
| 5 | d_t, d_q, d_qcomp, d_u, d_v, d_tra, & |
---|
| 6 | rain, snow, kbas, ktop, sigd, & |
---|
| 7 | cbmf, plcl, plfc, wbeff, convoccur, & |
---|
| 8 | upwd, dnwd, dnwdbis, & |
---|
| 9 | Ma, mip, Vprecip, & |
---|
| 10 | cape, cin, tvp, Tconv, iflag, & |
---|
| 11 | pbase, bbase, dtvpdt1, dtvpdq1, dplcldt, dplcldr, & |
---|
| 12 | qcondc, wd, pmflxr, pmflxs, & |
---|
| 13 | !RomP >>> |
---|
| 14 | !! . da,phi,mp,dd_t,dd_q,lalim_conv,wght_th) |
---|
| 15 | da, phi, mp, phii, d1a, dam, sij, qta, clw, elij, &! RomP |
---|
| 16 | dd_t, dd_q, lalim_conv, wght_th, & ! RomP |
---|
| 17 | evap, ep, epmlmMm, eplaMm, & ! RomP |
---|
| 18 | wdtrainA, wdtrainS, wdtrainM, wght, qtc, sigt, detrain, & |
---|
| 19 | tau_cld_cv, coefw_cld_cv, & ! RomP+RL, AJ |
---|
| 20 | !RomP <<< |
---|
| 21 | epmax_diag) ! epmax_cape |
---|
| 22 | ! ************************************************************** |
---|
| 23 | ! * |
---|
| 24 | ! CONCVL * |
---|
| 25 | ! * |
---|
| 26 | ! * |
---|
| 27 | ! written by : Sandrine Bony-Lena, 17/05/2003, 11.16.04 * |
---|
| 28 | ! modified by : * |
---|
| 29 | ! ************************************************************** |
---|
[1849] | 30 | |
---|
[1992] | 31 | USE dimphy |
---|
[2320] | 32 | USE infotrac_phy, ONLY: nbtr |
---|
[2201] | 33 | USE phys_local_var_mod, ONLY: omega |
---|
[5112] | 34 | USE lmdz_print_control, ONLY: prt_level, lunout |
---|
[5137] | 35 | USE lmdz_clesphys |
---|
[5140] | 36 | USE lmdz_conema3 |
---|
[5144] | 37 | USE lmdz_yoethf |
---|
| 38 | USE lmdz_yomcst |
---|
[5158] | 39 | USE lmdz_yomcst2 |
---|
| 40 | USE lmdz_cv3_inip, ONLY: cv3_inip |
---|
[5137] | 41 | |
---|
[1992] | 42 | IMPLICIT NONE |
---|
[5153] | 43 | INCLUDE "FCTTRE.h" |
---|
[5143] | 44 | ! ====================================================================== |
---|
| 45 | ! Auteur(s): S. Bony-Lena (LMD/CNRS) date: ??? |
---|
| 46 | ! Objet: schema de convection de Emanuel (1991) interface |
---|
| 47 | ! ====================================================================== |
---|
| 48 | ! Arguments: |
---|
| 49 | ! dtime--input-R-pas d'integration (s) |
---|
| 50 | ! s-------input-R-la vAleur "s" pour chaque couche |
---|
| 51 | ! sigs----input-R-la vAleur "sigma" de chaque couche |
---|
| 52 | ! sig-----input-R-la vAleur de "sigma" pour chaque niveau |
---|
| 53 | ! psolpa--input-R-la pression au sol (en Pa) |
---|
| 54 | ! pskapa--input-R-exponentiel kappa de psolpa |
---|
| 55 | ! h-------input-R-enthAlpie potentielle (Cp*T/P**kappa) |
---|
| 56 | ! q-------input-R-vapeur d'eau (en kg/kg) |
---|
[1334] | 57 | |
---|
[5143] | 58 | ! work*: input et output: deux variables de travail, |
---|
| 59 | ! on peut les mettre a 0 au debut |
---|
| 60 | ! ALE--------input-R-energie disponible pour soulevement |
---|
| 61 | ! ALP--------input-R-puissance disponible pour soulevement |
---|
[766] | 62 | |
---|
[5143] | 63 | ! d_h--------output-R-increment de l'enthAlpie potentielle (h) |
---|
| 64 | ! d_q--------output-R-increment de la vapeur d'eau |
---|
| 65 | ! rain-------output-R-la pluie (mm/s) |
---|
| 66 | ! snow-------output-R-la neige (mm/s) |
---|
| 67 | ! upwd-------output-R-saturated updraft mass flux (kg/m**2/s) |
---|
| 68 | ! dnwd-------output-R-saturated downdraft mass flux (kg/m**2/s) |
---|
| 69 | ! dnwd0------output-R-unsaturated downdraft mass flux (kg/m**2/s) |
---|
| 70 | ! Ma---------output-R-adiabatic ascent mass flux (kg/m2/s) |
---|
| 71 | ! mip--------output-R-mass flux shed by adiabatic ascent (kg/m2/s) |
---|
| 72 | ! Vprecip----output-R-vertical profile of total precipitation (kg/m2/s) |
---|
| 73 | ! Tconv------output-R-environment temperature seen by convective scheme (K) |
---|
| 74 | ! Cape-------output-R-CAPE (J/kg) |
---|
| 75 | ! Cin -------output-R-CIN (J/kg) |
---|
| 76 | ! Tvp--------output-R-Temperature virtuelle d'une parcelle soulevee |
---|
| 77 | ! adiabatiquement a partir du niveau 1 (K) |
---|
| 78 | ! deltapb----output-R-distance entre LCL et base de la colonne (<0 ; Pa) |
---|
| 79 | ! Ice_flag---input-L-TRUE->prise en compte de la thermodynamique de la glace |
---|
| 80 | ! dd_t-------output-R-increment de la temperature du aux descentes precipitantes |
---|
| 81 | ! dd_q-------output-R-increment de la vapeur d'eau du aux desc precip |
---|
| 82 | ! lalim_conv- |
---|
| 83 | ! wght_th---- |
---|
| 84 | ! evap-------output-R |
---|
| 85 | ! ep---------output-R |
---|
| 86 | ! epmlmMm----output-R |
---|
| 87 | ! eplaMm-----output-R |
---|
| 88 | ! wdtrainA---output-R |
---|
| 89 | ! wdtrainS---output-R |
---|
| 90 | ! wdtrainM---output-R |
---|
| 91 | ! wght-------output-R |
---|
| 92 | ! ====================================================================== |
---|
[879] | 93 | |
---|
[5143] | 94 | INTEGER, INTENT(IN) :: iflag_clos |
---|
| 95 | REAL, INTENT(IN) :: dtime |
---|
| 96 | REAL, DIMENSION(klon, klev), INTENT(IN) :: pplay |
---|
| 97 | REAL, DIMENSION(klon, klev + 1), INTENT(IN) :: paprs |
---|
| 98 | INTEGER, INTENT(IN) :: k_upper_cv |
---|
| 99 | REAL, DIMENSION(klon, klev), INTENT(IN) :: t, q, u, v |
---|
| 100 | REAL, DIMENSION(klon, klev), INTENT(IN) :: t_wake, q_wake |
---|
| 101 | REAL, DIMENSION(klon), INTENT(IN) :: s_wake |
---|
| 102 | REAL, DIMENSION(klon, klev, nbtr), INTENT(IN) :: tra |
---|
| 103 | INTEGER, INTENT(IN) :: ntra |
---|
| 104 | REAL, DIMENSION(klon), INTENT(IN) :: Ale, Alp |
---|
| 105 | !CR:test: on passe lentr et alim_star des thermiques |
---|
| 106 | INTEGER, DIMENSION(klon), INTENT(IN) :: lalim_conv |
---|
| 107 | REAL, DIMENSION(klon, klev), INTENT(IN) :: wght_th |
---|
[1992] | 108 | |
---|
[5143] | 109 | REAL, DIMENSION(klon, klev), INTENT(INOUT) :: sig1, w01 |
---|
[1992] | 110 | |
---|
[5143] | 111 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: d_t, d_q, d_qcomp, d_u, d_v |
---|
| 112 | REAL, DIMENSION(klon, klev, nbtr), INTENT(OUT) :: d_tra |
---|
| 113 | REAL, DIMENSION(klon), INTENT(OUT) :: rain, snow |
---|
[1992] | 114 | |
---|
[5143] | 115 | INTEGER, DIMENSION(klon), INTENT(OUT) :: kbas, ktop |
---|
| 116 | REAL, DIMENSION(klon), INTENT(OUT) :: sigd |
---|
| 117 | REAL, DIMENSION(klon), INTENT(OUT) :: cbmf, plcl, plfc, wbeff |
---|
| 118 | REAL, DIMENSION(klon), INTENT(OUT) :: convoccur |
---|
| 119 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: upwd, dnwd, dnwdbis |
---|
[1992] | 120 | |
---|
[5143] | 121 | !! REAL Ma(klon,klev), mip(klon,klev),Vprecip(klon,klev) !jyg |
---|
| 122 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: Ma, mip |
---|
| 123 | REAL, DIMENSION(klon, klev + 1), INTENT(OUT) :: Vprecip !jyg |
---|
| 124 | REAL, DIMENSION(klon), INTENT(OUT) :: cape, cin |
---|
| 125 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: tvp |
---|
| 126 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: Tconv |
---|
| 127 | INTEGER, DIMENSION(klon), INTENT(OUT) :: iflag |
---|
| 128 | REAL, DIMENSION(klon), INTENT(OUT) :: pbase, bbase |
---|
| 129 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: dtvpdt1, dtvpdq1 |
---|
| 130 | REAL, DIMENSION(klon), INTENT(OUT) :: dplcldt, dplcldr |
---|
| 131 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: qcondc |
---|
| 132 | REAL, DIMENSION(klon), INTENT(OUT) :: wd |
---|
| 133 | REAL, DIMENSION(klon, klev + 1), INTENT(OUT) :: pmflxr, pmflxs |
---|
[1992] | 134 | |
---|
[5143] | 135 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: da, mp |
---|
| 136 | REAL, DIMENSION(klon, klev, klev), INTENT(OUT) :: phi |
---|
| 137 | ! RomP >>> |
---|
| 138 | REAL, DIMENSION(klon, klev, klev), INTENT(OUT) :: phii |
---|
| 139 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: d1a, dam |
---|
| 140 | REAL, DIMENSION(klon, klev, klev), INTENT(OUT) :: sij, elij |
---|
| 141 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: qta |
---|
| 142 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: clw |
---|
| 143 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: dd_t, dd_q |
---|
| 144 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: evap, ep |
---|
| 145 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: eplaMm |
---|
| 146 | REAL, DIMENSION(klon, klev, klev), INTENT(OUT) :: epmlmMm |
---|
| 147 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: wdtrainA, wdtrainS, wdtrainM |
---|
| 148 | ! RomP <<< |
---|
| 149 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: wght !RL |
---|
| 150 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: qtc |
---|
| 151 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: sigt, detrain |
---|
| 152 | REAL, INTENT(OUT) :: tau_cld_cv, coefw_cld_cv |
---|
| 153 | REAL, DIMENSION(klon), INTENT(OUT) :: epmax_diag ! epmax_cape |
---|
[1992] | 154 | |
---|
[5143] | 155 | ! Local |
---|
| 156 | ! ---- |
---|
| 157 | REAL, DIMENSION(klon, klev) :: em_p |
---|
| 158 | REAL, DIMENSION(klon, klev + 1) :: em_ph |
---|
| 159 | REAL :: em_sig1feed ! sigma at lower bound of feeding layer |
---|
| 160 | REAL :: em_sig2feed ! sigma at upper bound of feeding layer |
---|
| 161 | REAL, DIMENSION(klev) :: em_wght ! weight density determining the feeding mixture |
---|
| 162 | REAL, DIMENSION(klon, klev + 1) :: Vprecipi !jyg |
---|
| 163 | !on enleve le save |
---|
| 164 | ! SAVE em_sig1feed,em_sig2feed,em_wght |
---|
[1992] | 165 | |
---|
[5143] | 166 | REAL, DIMENSION(klon) :: rflag |
---|
| 167 | REAL, DIMENSION(klon) :: plim1, plim2 |
---|
| 168 | REAL, DIMENSION(klon) :: ptop2 |
---|
| 169 | REAL, DIMENSION(klon, klev) :: asupmax |
---|
| 170 | REAL, DIMENSION(klon) :: supmax0, asupmaxmin |
---|
| 171 | REAL :: zx_t, zdelta, zx_qs, zcor |
---|
[5099] | 172 | |
---|
[5143] | 173 | ! INTEGER iflag_mix |
---|
| 174 | ! SAVE iflag_mix |
---|
| 175 | INTEGER :: noff, minorig |
---|
| 176 | INTEGER :: i, j, k, itra |
---|
| 177 | REAL, DIMENSION(klon, klev) :: qs, qs_wake |
---|
| 178 | !LF SAVE cbmf |
---|
| 179 | !IM/JYG REAL, SAVE, ALLOCATABLE :: cbmf(:) |
---|
| 180 | !!!$OMP THREADPRIVATE(cbmf)! |
---|
| 181 | REAL, DIMENSION(klon) :: cbmflast |
---|
[1992] | 182 | |
---|
| 183 | |
---|
[5143] | 184 | ! Variables supplementaires liees au bilan d'energie |
---|
| 185 | ! Real paire(klon) |
---|
| 186 | !LF Real ql(klon,klev) |
---|
| 187 | ! Save paire |
---|
| 188 | !LF Save ql |
---|
| 189 | !LF Real t1(klon,klev),q1(klon,klev) |
---|
| 190 | !LF Save t1,q1 |
---|
| 191 | ! Data paire /1./ |
---|
[1992] | 192 | REAL, SAVE, ALLOCATABLE :: ql(:, :), q1(:, :), t1(:, :) |
---|
[5143] | 193 | !$OMP THREADPRIVATE(ql, q1, t1) |
---|
[1992] | 194 | |
---|
[5143] | 195 | ! Variables liees au bilan d'energie et d'enthAlpi |
---|
[1992] | 196 | REAL ztsol(klon) |
---|
[2007] | 197 | REAL h_vcol_tot, h_dair_tot, h_qw_tot, h_ql_tot, & |
---|
[5143] | 198 | h_qs_tot, qw_tot, ql_tot, qs_tot, ec_tot |
---|
[2007] | 199 | SAVE h_vcol_tot, h_dair_tot, h_qw_tot, h_ql_tot, & |
---|
[5143] | 200 | h_qs_tot, qw_tot, ql_tot, qs_tot, ec_tot |
---|
| 201 | !$OMP THREADPRIVATE(h_vcol_tot, h_dair_tot, h_qw_tot, h_ql_tot) |
---|
| 202 | !$OMP THREADPRIVATE(h_qs_tot, qw_tot, ql_tot, qs_tot , ec_tot) |
---|
[2007] | 203 | REAL d_h_vcol, d_h_dair, d_qt, d_qw, d_ql, d_qs, d_ec |
---|
| 204 | REAL d_h_vcol_phy |
---|
| 205 | REAL fs_bound, fq_bound |
---|
| 206 | SAVE d_h_vcol_phy |
---|
[5143] | 207 | !$OMP THREADPRIVATE(d_h_vcol_phy) |
---|
[2007] | 208 | REAL zero_v(klon) |
---|
[1992] | 209 | CHARACTER *15 ztit |
---|
[2007] | 210 | INTEGER ip_ebil ! PRINT level for energy conserv. diag. |
---|
| 211 | SAVE ip_ebil |
---|
| 212 | DATA ip_ebil/2/ |
---|
[5143] | 213 | !$OMP THREADPRIVATE(ip_ebil) |
---|
[2007] | 214 | INTEGER if_ebil ! level for energy conserv. dignostics |
---|
| 215 | SAVE if_ebil |
---|
| 216 | DATA if_ebil/2/ |
---|
[5143] | 217 | !$OMP THREADPRIVATE(if_ebil) |
---|
| 218 | !+jld ec_conser |
---|
[1992] | 219 | REAL d_t_ec(klon, klev) ! tendance du a la conersion Ec -> E thermique |
---|
| 220 | REAL zrcpd |
---|
[5143] | 221 | !-jld ec_conser |
---|
| 222 | !LF |
---|
[1992] | 223 | INTEGER nloc |
---|
[5143] | 224 | LOGICAL, SAVE :: first = .TRUE. |
---|
| 225 | !$OMP THREADPRIVATE(first) |
---|
| 226 | INTEGER, SAVE :: itap, igout |
---|
| 227 | !$OMP THREADPRIVATE(itap, igout) |
---|
[1992] | 228 | |
---|
| 229 | IF (first) THEN |
---|
[5143] | 230 | ! Allocate some variables LF 04/2008 |
---|
[1992] | 231 | |
---|
[5143] | 232 | !IM/JYG allocate(cbmf(klon)) |
---|
| 233 | ALLOCATE (ql(klon, klev)) |
---|
| 234 | ALLOCATE (t1(klon, klev)) |
---|
| 235 | ALLOCATE (q1(klon, klev)) |
---|
[5099] | 236 | |
---|
[2824] | 237 | convoccur(:) = 0. |
---|
[5099] | 238 | |
---|
[1992] | 239 | itap = 0 |
---|
[5143] | 240 | igout = klon / 2 + 1 / klon |
---|
[1992] | 241 | END IF |
---|
[5143] | 242 | ! Incrementer le compteur de la physique |
---|
[1992] | 243 | itap = itap + 1 |
---|
| 244 | |
---|
[5143] | 245 | ! Copy T into Tconv |
---|
[1992] | 246 | DO k = 1, klev |
---|
| 247 | DO i = 1, klon |
---|
[2007] | 248 | Tconv(i, k) = t(i, k) |
---|
[1992] | 249 | END DO |
---|
| 250 | END DO |
---|
| 251 | |
---|
| 252 | IF (if_ebil>=1) THEN |
---|
| 253 | DO i = 1, klon |
---|
| 254 | ztsol(i) = t(i, 1) |
---|
| 255 | zero_v(i) = 0. |
---|
[524] | 256 | DO k = 1, klev |
---|
[1992] | 257 | ql(i, k) = 0. |
---|
| 258 | END DO |
---|
| 259 | END DO |
---|
| 260 | END IF |
---|
[524] | 261 | |
---|
[5143] | 262 | ! ym |
---|
[1992] | 263 | snow(:) = 0 |
---|
| 264 | |
---|
| 265 | IF (first) THEN |
---|
| 266 | first = .FALSE. |
---|
| 267 | |
---|
[5143] | 268 | ! =========================================================================== |
---|
| 269 | ! READ IN PARAMETERS FOR THE CLOSURE AND THE MIXING DISTRIBUTION |
---|
| 270 | ! =========================================================================== |
---|
[1992] | 271 | |
---|
| 272 | IF (iflag_con==3) THEN |
---|
[5143] | 273 | ! CALL cv3_inicp() |
---|
[5158] | 274 | CALL cv3_inip |
---|
[1992] | 275 | END IF |
---|
| 276 | |
---|
[5143] | 277 | ! =========================================================================== |
---|
| 278 | ! READ IN PARAMETERS FOR CONVECTIVE INHIBITION BY TROPOS. DRYNESS |
---|
| 279 | ! =========================================================================== |
---|
[1992] | 280 | |
---|
[5143] | 281 | ! c$$$ open (56,file='supcrit.data') |
---|
| 282 | ! c$$$ read (56,*) Supcrit1, Supcrit2 |
---|
| 283 | ! c$$$ close (56) |
---|
[1992] | 284 | |
---|
[2007] | 285 | IF (prt_level>=10) WRITE (lunout, *) 'supcrit1, supcrit2', supcrit1, supcrit2 |
---|
[1992] | 286 | |
---|
[5143] | 287 | ! =========================================================================== |
---|
| 288 | ! Initialisation pour les bilans d'eau et d'energie |
---|
| 289 | ! =========================================================================== |
---|
[1992] | 290 | IF (if_ebil>=1) d_h_vcol_phy = 0. |
---|
| 291 | |
---|
| 292 | DO i = 1, klon |
---|
| 293 | cbmf(i) = 0. |
---|
[5143] | 294 | !! plcl(i) = 0. |
---|
[1992] | 295 | sigd(i) = 0. |
---|
| 296 | END DO |
---|
[2853] | 297 | END IF !(first) |
---|
[1992] | 298 | |
---|
[5143] | 299 | ! Initialisation a chaque pas de temps |
---|
[1992] | 300 | plfc(:) = 0. |
---|
| 301 | wbeff(:) = 100. |
---|
| 302 | plcl(:) = 0. |
---|
| 303 | |
---|
| 304 | DO k = 1, klev + 1 |
---|
| 305 | DO i = 1, klon |
---|
[5143] | 306 | em_ph(i, k) = paprs(i, k) / 100.0 |
---|
[1992] | 307 | pmflxr(i, k) = 0. |
---|
| 308 | pmflxs(i, k) = 0. |
---|
| 309 | END DO |
---|
| 310 | END DO |
---|
| 311 | |
---|
| 312 | DO k = 1, klev |
---|
| 313 | DO i = 1, klon |
---|
[5143] | 314 | em_p(i, k) = pplay(i, k) / 100.0 |
---|
[1992] | 315 | END DO |
---|
| 316 | END DO |
---|
| 317 | |
---|
| 318 | |
---|
[5143] | 319 | ! Feeding layer |
---|
[1992] | 320 | |
---|
| 321 | em_sig1feed = 1. |
---|
[5143] | 322 | !jyg< |
---|
| 323 | ! em_sig2feed = 0.97 |
---|
[2253] | 324 | em_sig2feed = cvl_sig2feed |
---|
[5143] | 325 | !>jyg |
---|
| 326 | ! em_sig2feed = 0.8 |
---|
| 327 | ! Relative Weight densities |
---|
[1992] | 328 | DO k = 1, klev |
---|
| 329 | em_wght(k) = 1. |
---|
| 330 | END DO |
---|
[5143] | 331 | !CRtest: couche alim des tehrmiques ponderee par a* |
---|
| 332 | ! DO i = 1, klon |
---|
| 333 | ! do k=1,lalim_conv(i) |
---|
| 334 | ! em_wght(k)=wght_th(i,k) |
---|
| 335 | ! PRINT*,'em_wght=',em_wght(k),wght_th(i,k) |
---|
| 336 | ! END DO |
---|
| 337 | ! END DO |
---|
[1992] | 338 | |
---|
| 339 | IF (iflag_con==4) THEN |
---|
| 340 | DO k = 1, klev |
---|
| 341 | DO i = 1, klon |
---|
| 342 | zx_t = t(i, k) |
---|
[5143] | 343 | zdelta = max(0., sign(1., rtt - zx_t)) |
---|
| 344 | zx_qs = min(0.5, r2es * foeew(zx_t, zdelta) / em_p(i, k) / 100.0) |
---|
| 345 | zcor = 1. / (1. - retv * zx_qs) |
---|
| 346 | qs(i, k) = zx_qs * zcor |
---|
[1992] | 347 | END DO |
---|
| 348 | DO i = 1, klon |
---|
| 349 | zx_t = t_wake(i, k) |
---|
[5143] | 350 | zdelta = max(0., sign(1., rtt - zx_t)) |
---|
| 351 | zx_qs = min(0.5, r2es * foeew(zx_t, zdelta) / em_p(i, k) / 100.0) |
---|
| 352 | zcor = 1. / (1. - retv * zx_qs) |
---|
| 353 | qs_wake(i, k) = zx_qs * zcor |
---|
[1992] | 354 | END DO |
---|
| 355 | END DO |
---|
[2007] | 356 | ELSE ! iflag_con=3 (modif de puristes qui fait la diffce pour la convergence numerique) |
---|
[1992] | 357 | DO k = 1, klev |
---|
| 358 | DO i = 1, klon |
---|
| 359 | zx_t = t(i, k) |
---|
[5143] | 360 | zdelta = max(0., sign(1., rtt - zx_t)) |
---|
| 361 | zx_qs = r2es * foeew(zx_t, zdelta) / em_p(i, k) / 100.0 |
---|
[1992] | 362 | zx_qs = min(0.5, zx_qs) |
---|
[5143] | 363 | zcor = 1. / (1. - retv * zx_qs) |
---|
| 364 | zx_qs = zx_qs * zcor |
---|
[1992] | 365 | qs(i, k) = zx_qs |
---|
| 366 | END DO |
---|
| 367 | DO i = 1, klon |
---|
| 368 | zx_t = t_wake(i, k) |
---|
[5143] | 369 | zdelta = max(0., sign(1., rtt - zx_t)) |
---|
| 370 | zx_qs = r2es * foeew(zx_t, zdelta) / em_p(i, k) / 100.0 |
---|
[1992] | 371 | zx_qs = min(0.5, zx_qs) |
---|
[5143] | 372 | zcor = 1. / (1. - retv * zx_qs) |
---|
| 373 | zx_qs = zx_qs * zcor |
---|
[1992] | 374 | qs_wake(i, k) = zx_qs |
---|
| 375 | END DO |
---|
| 376 | END DO |
---|
| 377 | END IF ! iflag_con |
---|
| 378 | |
---|
[5143] | 379 | ! ------------------------------------------------------------------ |
---|
[1992] | 380 | |
---|
[5143] | 381 | ! Main driver for convection: |
---|
| 382 | ! iflag_con=3 -> nvlle version de KE (JYG) |
---|
| 383 | ! iflag_con = 30 -> equivAlent to convect3 |
---|
| 384 | ! iflag_con = 4 -> equivAlent to convect1/2 |
---|
[1992] | 385 | |
---|
| 386 | IF (iflag_con==30) THEN |
---|
| 387 | |
---|
[5160] | 388 | ! PRINT *, '-> cv_driver' !jyg |
---|
[2007] | 389 | CALL cv_driver(klon, klev, klevp1, ntra, iflag_con, & |
---|
[5143] | 390 | t, q, qs, u, v, tra, & |
---|
| 391 | em_p, em_ph, iflag, & |
---|
| 392 | d_t, d_q, d_u, d_v, d_tra, rain, & |
---|
| 393 | Vprecip, cbmf, sig1, w01, & !jyg |
---|
| 394 | kbas, ktop, & |
---|
| 395 | dtime, Ma, upwd, dnwd, dnwdbis, qcondc, wd, cape, & |
---|
| 396 | da, phi, mp, phii, d1a, dam, sij, clw, elij, & !RomP |
---|
| 397 | evap, ep, epmlmMm, eplaMm, & !RomP |
---|
| 398 | wdtrainA, wdtrainM, & !RomP |
---|
| 399 | epmax_diag) ! epmax_cape |
---|
[5160] | 400 | ! PRINT *, 'cv_driver ->' !jyg |
---|
[1992] | 401 | |
---|
| 402 | DO i = 1, klon |
---|
[2007] | 403 | cbmf(i) = Ma(i, kbas(i)) |
---|
[1992] | 404 | END DO |
---|
| 405 | |
---|
[5143] | 406 | !RL |
---|
[2007] | 407 | wght(:, :) = 0. |
---|
| 408 | DO i = 1, klon |
---|
| 409 | wght(i, 1) = 1. |
---|
| 410 | END DO |
---|
[5143] | 411 | !RL |
---|
[2007] | 412 | |
---|
[1992] | 413 | ELSE |
---|
| 414 | |
---|
[5143] | 415 | !LF necessary for gathered fields |
---|
[1992] | 416 | nloc = klon |
---|
[5143] | 417 | CALL cva_driver(klon, klev, klev + 1, ntra, nloc, k_upper_cv, & |
---|
| 418 | iflag_con, iflag_mix, iflag_ice_thermo, & |
---|
| 419 | iflag_clos, ok_conserv_q, dtime, cvl_comp_threshold, & |
---|
| 420 | t, q, qs, t_wake, q_wake, qs_wake, s_wake, u, v, tra, & |
---|
| 421 | em_p, em_ph, & |
---|
| 422 | Ale, Alp, omega, & |
---|
| 423 | em_sig1feed, em_sig2feed, em_wght, & |
---|
| 424 | iflag, d_t, d_q, d_qcomp, d_u, d_v, d_tra, rain, kbas, ktop, & |
---|
| 425 | cbmf, plcl, plfc, wbeff, sig1, w01, ptop2, sigd, & |
---|
| 426 | Ma, mip, Vprecip, Vprecipi, upwd, dnwd, dnwdbis, qcondc, wd, & |
---|
| 427 | cape, cin, tvp, & |
---|
| 428 | dd_t, dd_q, plim1, plim2, asupmax, supmax0, & |
---|
| 429 | asupmaxmin, lalim_conv, & |
---|
| 430 | !AC!+!RomP+jyg |
---|
| 431 | !! da,phi,mp,phii,d1a,dam,sij,clw,elij, & ! RomP |
---|
| 432 | !! evap,ep,epmlmMm,eplaMm, ! RomP |
---|
| 433 | da, phi, mp, phii, d1a, dam, sij, wght, & ! RomP+RL |
---|
| 434 | qta, clw, elij, evap, ep, epmlmMm, eplaMm, & ! RomP+RL |
---|
| 435 | wdtrainA, wdtrainS, wdtrainM, qtc, sigt, detrain, & |
---|
| 436 | tau_cld_cv, coefw_cld_cv, & ! RomP,AJ |
---|
| 437 | !AC!+!RomP+jyg |
---|
| 438 | epmax_diag) ! epmax_cape |
---|
[1992] | 439 | END IF |
---|
[5143] | 440 | ! ------------------------------------------------------------------ |
---|
[3197] | 441 | IF (prt_level>=10) WRITE (lunout, *) ' cva_driver -> cbmf,plcl,plfc,wbeff, d_t, d_q ', & |
---|
[5143] | 442 | cbmf(1), plcl(1), plfc(1), wbeff(1), d_t(1, 1), d_q(1, 1) |
---|
[1992] | 443 | |
---|
| 444 | DO i = 1, klon |
---|
[5143] | 445 | rain(i) = rain(i) / 86400. |
---|
[1992] | 446 | rflag(i) = iflag(i) |
---|
| 447 | END DO |
---|
| 448 | |
---|
| 449 | DO k = 1, klev |
---|
| 450 | DO i = 1, klon |
---|
[5143] | 451 | d_t(i, k) = dtime * d_t(i, k) |
---|
| 452 | d_q(i, k) = dtime * d_q(i, k) |
---|
| 453 | d_u(i, k) = dtime * d_u(i, k) |
---|
| 454 | d_v(i, k) = dtime * d_v(i, k) |
---|
[1992] | 455 | END DO |
---|
| 456 | END DO |
---|
| 457 | |
---|
[2824] | 458 | IF (iflag_con==3) THEN |
---|
[5143] | 459 | DO i = 1, klon |
---|
[2824] | 460 | IF (wbeff(i) > 100. .OR. wbeff(i) == 0 .OR. iflag(i) > 3) THEN |
---|
| 461 | wbeff(i) = 0. |
---|
[5143] | 462 | convoccur(i) = 0. |
---|
[2824] | 463 | ELSE |
---|
| 464 | convoccur(i) = 1. |
---|
| 465 | ENDIF |
---|
| 466 | ENDDO |
---|
| 467 | ENDIF |
---|
| 468 | |
---|
[1992] | 469 | IF (iflag_con==30) THEN |
---|
| 470 | DO itra = 1, ntra |
---|
[524] | 471 | DO k = 1, klev |
---|
| 472 | DO i = 1, klon |
---|
[5143] | 473 | !RL! d_tra(i,k,itra) =dtime*d_tra(i,k,itra) |
---|
[2007] | 474 | d_tra(i, k, itra) = 0. |
---|
[1992] | 475 | END DO |
---|
| 476 | END DO |
---|
| 477 | END DO |
---|
| 478 | END IF |
---|
| 479 | |
---|
[5143] | 480 | !!AC! |
---|
[1992] | 481 | IF (iflag_con==3) THEN |
---|
| 482 | DO itra = 1, ntra |
---|
[524] | 483 | DO k = 1, klev |
---|
| 484 | DO i = 1, klon |
---|
[5143] | 485 | !RL! d_tra(i,k,itra) =dtime*d_tra(i,k,itra) |
---|
[2007] | 486 | d_tra(i, k, itra) = 0. |
---|
[1992] | 487 | END DO |
---|
| 488 | END DO |
---|
| 489 | END DO |
---|
| 490 | END IF |
---|
[5143] | 491 | !!AC! |
---|
[524] | 492 | |
---|
[1992] | 493 | DO k = 1, klev |
---|
| 494 | DO i = 1, klon |
---|
| 495 | t1(i, k) = t(i, k) + d_t(i, k) |
---|
| 496 | q1(i, k) = q(i, k) + d_q(i, k) |
---|
| 497 | END DO |
---|
| 498 | END DO |
---|
[5143] | 499 | ! !jyg |
---|
[2306] | 500 | IF (iflag_con == 30 .OR. iflag_ice_thermo ==0) THEN |
---|
[5143] | 501 | ! --Separation neige/pluie (pour diagnostics) !jyg |
---|
[2306] | 502 | DO k = 1, klev !jyg |
---|
| 503 | DO i = 1, klon !jyg |
---|
[5143] | 504 | IF (t1(i, k)<rtt) THEN !jyg |
---|
[2306] | 505 | pmflxs(i, k) = Vprecip(i, k) !jyg |
---|
| 506 | ELSE !jyg |
---|
| 507 | pmflxr(i, k) = Vprecip(i, k) !jyg |
---|
| 508 | END IF !jyg |
---|
| 509 | END DO !jyg |
---|
| 510 | END DO !jyg |
---|
| 511 | ELSE |
---|
| 512 | DO k = 1, klev !jyg |
---|
| 513 | DO i = 1, klon !jyg |
---|
| 514 | pmflxs(i, k) = Vprecipi(i, k) !jyg |
---|
[5143] | 515 | pmflxr(i, k) = Vprecip(i, k) - Vprecipi(i, k) !jyg |
---|
[2306] | 516 | END DO !jyg |
---|
| 517 | END DO !jyg |
---|
| 518 | ENDIF |
---|
[524] | 519 | |
---|
[5143] | 520 | ! c IF (if_ebil.ge.2) THEN |
---|
| 521 | ! c ztit='after convect' |
---|
| 522 | ! c CALL diagetpq(paire,ztit,ip_ebil,2,2,dtime |
---|
| 523 | ! c e , t1,q1,ql,qs,u,v,paprs,pplay |
---|
| 524 | ! c s , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) |
---|
| 525 | ! c CALL diagphy(paire,ztit,ip_ebil |
---|
| 526 | ! c e , zero_v, zero_v, zero_v, zero_v, zero_v |
---|
| 527 | ! c e , zero_v, rain, zero_v, ztsol |
---|
| 528 | ! c e , d_h_vcol, d_qt, d_ec |
---|
| 529 | ! c s , fs_bound, fq_bound ) |
---|
| 530 | ! c END IF |
---|
[524] | 531 | |
---|
| 532 | |
---|
[5143] | 533 | ! les traceurs ne sont pas mis dans cette version de convect4: |
---|
[1992] | 534 | IF (iflag_con==4) THEN |
---|
| 535 | DO itra = 1, ntra |
---|
[524] | 536 | DO k = 1, klev |
---|
| 537 | DO i = 1, klon |
---|
[1992] | 538 | d_tra(i, k, itra) = 0. |
---|
| 539 | END DO |
---|
| 540 | END DO |
---|
| 541 | END DO |
---|
| 542 | END IF |
---|
[5143] | 543 | ! PRINT*, 'concvl->: dd_t,dd_q ',dd_t(1,1),dd_q(1,1) |
---|
[879] | 544 | |
---|
[1992] | 545 | DO k = 1, klev |
---|
| 546 | DO i = 1, klon |
---|
| 547 | dtvpdt1(i, k) = 0. |
---|
| 548 | dtvpdq1(i, k) = 0. |
---|
| 549 | END DO |
---|
| 550 | END DO |
---|
| 551 | DO i = 1, klon |
---|
| 552 | dplcldt(i) = 0. |
---|
| 553 | dplcldr(i) = 0. |
---|
| 554 | END DO |
---|
[1650] | 555 | |
---|
[1992] | 556 | IF (prt_level>=20) THEN |
---|
| 557 | DO k = 1, klev |
---|
[5143] | 558 | ! PRINT*,'physiq apres_add_con i k it d_u d_v d_t d_q qdl0',igout, & |
---|
| 559 | ! k,itap,d_u_con(igout,k) ,d_v_con(igout,k), d_t_con(igout,k), & |
---|
| 560 | ! d_q_con(igout,k),dql0(igout,k) |
---|
| 561 | ! PRINT*,'phys apres_add_con itap Ma cin ALE ALP wak t q undi t q', & |
---|
| 562 | ! itap,Ma(igout,k),cin(igout),ALE(igout), ALP(igout), & |
---|
| 563 | ! t_wake(igout,k),q_wake(igout,k),t_undi(igout,k),q_undi(igout,k) |
---|
| 564 | ! PRINT*,'phy apres_add_con itap CON rain snow EMA wk1 wk2 Vpp mip', & |
---|
| 565 | ! itap,rain_con(igout),snow_con(igout),ema_work1(igout,k), & |
---|
| 566 | ! ema_work2(igout,k),Vprecip(igout,k), mip(igout,k) |
---|
| 567 | ! PRINT*,'phy apres_add_con itap upwd dnwd dnwd0 cape tvp Tconv ', & |
---|
| 568 | ! itap,upwd(igout,k),dnwd(igout,k),dnwd0(igout,k),cape(igout), & |
---|
| 569 | ! tvp(igout,k),Tconv(igout,k) |
---|
| 570 | ! PRINT*,'phy apres_add_con itap dtvpdt dtvdq dplcl dplcldr qcondc', & |
---|
| 571 | ! itap,dtvpdt1(igout,k),dtvpdq1(igout,k),dplcldt(igout), & |
---|
| 572 | ! dplcldr(igout),qcondc(igout,k) |
---|
| 573 | ! PRINT*,'phy apres_add_con itap wd pmflxr Kpmflxr Kp1 Kpmflxs Kp1', & |
---|
| 574 | ! itap,wd(igout),pmflxr(igout,k),pmflxr(igout,k+1),pmflxs(igout,k), & |
---|
| 575 | ! pmflxs(igout,k+1) |
---|
| 576 | ! PRINT*,'phy apres_add_con itap da phi mp ftd fqd lalim wgth', & |
---|
| 577 | ! itap,da(igout,k),phi(igout,k,k),mp(igout,k),ftd(igout,k), & |
---|
| 578 | ! fqd(igout,k),lalim_conv(igout),wght_th(igout,k) |
---|
[1992] | 579 | END DO |
---|
| 580 | END IF !(prt_level.EQ.20) THEN |
---|
[879] | 581 | |
---|
[1992] | 582 | END SUBROUTINE concvl |
---|
| 583 | |
---|