[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 |
---|
[5143] | 38 | USE lmdz_fcttre, ONLY: foeew, foede, qsats, qsatl, dqsats, dqsatl, thermcep |
---|
[5144] | 39 | USE lmdz_yomcst |
---|
[5137] | 40 | |
---|
[1992] | 41 | IMPLICIT NONE |
---|
[5143] | 42 | ! ====================================================================== |
---|
| 43 | ! Auteur(s): S. Bony-Lena (LMD/CNRS) date: ??? |
---|
| 44 | ! Objet: schema de convection de Emanuel (1991) interface |
---|
| 45 | ! ====================================================================== |
---|
| 46 | ! Arguments: |
---|
| 47 | ! dtime--input-R-pas d'integration (s) |
---|
| 48 | ! s-------input-R-la vAleur "s" pour chaque couche |
---|
| 49 | ! sigs----input-R-la vAleur "sigma" de chaque couche |
---|
| 50 | ! sig-----input-R-la vAleur de "sigma" pour chaque niveau |
---|
| 51 | ! psolpa--input-R-la pression au sol (en Pa) |
---|
| 52 | ! pskapa--input-R-exponentiel kappa de psolpa |
---|
| 53 | ! h-------input-R-enthAlpie potentielle (Cp*T/P**kappa) |
---|
| 54 | ! q-------input-R-vapeur d'eau (en kg/kg) |
---|
[1334] | 55 | |
---|
[5143] | 56 | ! work*: input et output: deux variables de travail, |
---|
| 57 | ! on peut les mettre a 0 au debut |
---|
| 58 | ! ALE--------input-R-energie disponible pour soulevement |
---|
| 59 | ! ALP--------input-R-puissance disponible pour soulevement |
---|
[766] | 60 | |
---|
[5143] | 61 | ! d_h--------output-R-increment de l'enthAlpie potentielle (h) |
---|
| 62 | ! d_q--------output-R-increment de la vapeur d'eau |
---|
| 63 | ! rain-------output-R-la pluie (mm/s) |
---|
| 64 | ! snow-------output-R-la neige (mm/s) |
---|
| 65 | ! upwd-------output-R-saturated updraft mass flux (kg/m**2/s) |
---|
| 66 | ! dnwd-------output-R-saturated downdraft mass flux (kg/m**2/s) |
---|
| 67 | ! dnwd0------output-R-unsaturated downdraft mass flux (kg/m**2/s) |
---|
| 68 | ! Ma---------output-R-adiabatic ascent mass flux (kg/m2/s) |
---|
| 69 | ! mip--------output-R-mass flux shed by adiabatic ascent (kg/m2/s) |
---|
| 70 | ! Vprecip----output-R-vertical profile of total precipitation (kg/m2/s) |
---|
| 71 | ! Tconv------output-R-environment temperature seen by convective scheme (K) |
---|
| 72 | ! Cape-------output-R-CAPE (J/kg) |
---|
| 73 | ! Cin -------output-R-CIN (J/kg) |
---|
| 74 | ! Tvp--------output-R-Temperature virtuelle d'une parcelle soulevee |
---|
| 75 | ! adiabatiquement a partir du niveau 1 (K) |
---|
| 76 | ! deltapb----output-R-distance entre LCL et base de la colonne (<0 ; Pa) |
---|
| 77 | ! Ice_flag---input-L-TRUE->prise en compte de la thermodynamique de la glace |
---|
| 78 | ! dd_t-------output-R-increment de la temperature du aux descentes precipitantes |
---|
| 79 | ! dd_q-------output-R-increment de la vapeur d'eau du aux desc precip |
---|
| 80 | ! lalim_conv- |
---|
| 81 | ! wght_th---- |
---|
| 82 | ! evap-------output-R |
---|
| 83 | ! ep---------output-R |
---|
| 84 | ! epmlmMm----output-R |
---|
| 85 | ! eplaMm-----output-R |
---|
| 86 | ! wdtrainA---output-R |
---|
| 87 | ! wdtrainS---output-R |
---|
| 88 | ! wdtrainM---output-R |
---|
| 89 | ! wght-------output-R |
---|
| 90 | ! ====================================================================== |
---|
[879] | 91 | |
---|
[5143] | 92 | INTEGER, INTENT(IN) :: iflag_clos |
---|
| 93 | REAL, INTENT(IN) :: dtime |
---|
| 94 | REAL, DIMENSION(klon, klev), INTENT(IN) :: pplay |
---|
| 95 | REAL, DIMENSION(klon, klev + 1), INTENT(IN) :: paprs |
---|
| 96 | INTEGER, INTENT(IN) :: k_upper_cv |
---|
| 97 | REAL, DIMENSION(klon, klev), INTENT(IN) :: t, q, u, v |
---|
| 98 | REAL, DIMENSION(klon, klev), INTENT(IN) :: t_wake, q_wake |
---|
| 99 | REAL, DIMENSION(klon), INTENT(IN) :: s_wake |
---|
| 100 | REAL, DIMENSION(klon, klev, nbtr), INTENT(IN) :: tra |
---|
| 101 | INTEGER, INTENT(IN) :: ntra |
---|
| 102 | REAL, DIMENSION(klon), INTENT(IN) :: Ale, Alp |
---|
| 103 | !CR:test: on passe lentr et alim_star des thermiques |
---|
| 104 | INTEGER, DIMENSION(klon), INTENT(IN) :: lalim_conv |
---|
| 105 | REAL, DIMENSION(klon, klev), INTENT(IN) :: wght_th |
---|
[1992] | 106 | |
---|
[5143] | 107 | REAL, DIMENSION(klon, klev), INTENT(INOUT) :: sig1, w01 |
---|
[1992] | 108 | |
---|
[5143] | 109 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: d_t, d_q, d_qcomp, d_u, d_v |
---|
| 110 | REAL, DIMENSION(klon, klev, nbtr), INTENT(OUT) :: d_tra |
---|
| 111 | REAL, DIMENSION(klon), INTENT(OUT) :: rain, snow |
---|
[1992] | 112 | |
---|
[5143] | 113 | INTEGER, DIMENSION(klon), INTENT(OUT) :: kbas, ktop |
---|
| 114 | REAL, DIMENSION(klon), INTENT(OUT) :: sigd |
---|
| 115 | REAL, DIMENSION(klon), INTENT(OUT) :: cbmf, plcl, plfc, wbeff |
---|
| 116 | REAL, DIMENSION(klon), INTENT(OUT) :: convoccur |
---|
| 117 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: upwd, dnwd, dnwdbis |
---|
[1992] | 118 | |
---|
[5143] | 119 | !! REAL Ma(klon,klev), mip(klon,klev),Vprecip(klon,klev) !jyg |
---|
| 120 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: Ma, mip |
---|
| 121 | REAL, DIMENSION(klon, klev + 1), INTENT(OUT) :: Vprecip !jyg |
---|
| 122 | REAL, DIMENSION(klon), INTENT(OUT) :: cape, cin |
---|
| 123 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: tvp |
---|
| 124 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: Tconv |
---|
| 125 | INTEGER, DIMENSION(klon), INTENT(OUT) :: iflag |
---|
| 126 | REAL, DIMENSION(klon), INTENT(OUT) :: pbase, bbase |
---|
| 127 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: dtvpdt1, dtvpdq1 |
---|
| 128 | REAL, DIMENSION(klon), INTENT(OUT) :: dplcldt, dplcldr |
---|
| 129 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: qcondc |
---|
| 130 | REAL, DIMENSION(klon), INTENT(OUT) :: wd |
---|
| 131 | REAL, DIMENSION(klon, klev + 1), INTENT(OUT) :: pmflxr, pmflxs |
---|
[1992] | 132 | |
---|
[5143] | 133 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: da, mp |
---|
| 134 | REAL, DIMENSION(klon, klev, klev), INTENT(OUT) :: phi |
---|
| 135 | ! RomP >>> |
---|
| 136 | REAL, DIMENSION(klon, klev, klev), INTENT(OUT) :: phii |
---|
| 137 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: d1a, dam |
---|
| 138 | REAL, DIMENSION(klon, klev, klev), INTENT(OUT) :: sij, elij |
---|
| 139 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: qta |
---|
| 140 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: clw |
---|
| 141 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: dd_t, dd_q |
---|
| 142 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: evap, ep |
---|
| 143 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: eplaMm |
---|
| 144 | REAL, DIMENSION(klon, klev, klev), INTENT(OUT) :: epmlmMm |
---|
| 145 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: wdtrainA, wdtrainS, wdtrainM |
---|
| 146 | ! RomP <<< |
---|
| 147 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: wght !RL |
---|
| 148 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: qtc |
---|
| 149 | REAL, DIMENSION(klon, klev), INTENT(OUT) :: sigt, detrain |
---|
| 150 | REAL, INTENT(OUT) :: tau_cld_cv, coefw_cld_cv |
---|
| 151 | REAL, DIMENSION(klon), INTENT(OUT) :: epmax_diag ! epmax_cape |
---|
[1992] | 152 | |
---|
[5143] | 153 | ! Local |
---|
| 154 | ! ---- |
---|
| 155 | REAL, DIMENSION(klon, klev) :: em_p |
---|
| 156 | REAL, DIMENSION(klon, klev + 1) :: em_ph |
---|
| 157 | REAL :: em_sig1feed ! sigma at lower bound of feeding layer |
---|
| 158 | REAL :: em_sig2feed ! sigma at upper bound of feeding layer |
---|
| 159 | REAL, DIMENSION(klev) :: em_wght ! weight density determining the feeding mixture |
---|
| 160 | REAL, DIMENSION(klon, klev + 1) :: Vprecipi !jyg |
---|
| 161 | !on enleve le save |
---|
| 162 | ! SAVE em_sig1feed,em_sig2feed,em_wght |
---|
[1992] | 163 | |
---|
[5143] | 164 | REAL, DIMENSION(klon) :: rflag |
---|
| 165 | REAL, DIMENSION(klon) :: plim1, plim2 |
---|
| 166 | REAL, DIMENSION(klon) :: ptop2 |
---|
| 167 | REAL, DIMENSION(klon, klev) :: asupmax |
---|
| 168 | REAL, DIMENSION(klon) :: supmax0, asupmaxmin |
---|
| 169 | REAL :: zx_t, zdelta, zx_qs, zcor |
---|
[5099] | 170 | |
---|
[5143] | 171 | ! INTEGER iflag_mix |
---|
| 172 | ! SAVE iflag_mix |
---|
| 173 | INTEGER :: noff, minorig |
---|
| 174 | INTEGER :: i, j, k, itra |
---|
| 175 | REAL, DIMENSION(klon, klev) :: qs, qs_wake |
---|
| 176 | !LF SAVE cbmf |
---|
| 177 | !IM/JYG REAL, SAVE, ALLOCATABLE :: cbmf(:) |
---|
| 178 | !!!$OMP THREADPRIVATE(cbmf)! |
---|
| 179 | REAL, DIMENSION(klon) :: cbmflast |
---|
[1992] | 180 | |
---|
| 181 | |
---|
[5143] | 182 | ! Variables supplementaires liees au bilan d'energie |
---|
| 183 | ! Real paire(klon) |
---|
| 184 | !LF Real ql(klon,klev) |
---|
| 185 | ! Save paire |
---|
| 186 | !LF Save ql |
---|
| 187 | !LF Real t1(klon,klev),q1(klon,klev) |
---|
| 188 | !LF Save t1,q1 |
---|
| 189 | ! Data paire /1./ |
---|
[1992] | 190 | REAL, SAVE, ALLOCATABLE :: ql(:, :), q1(:, :), t1(:, :) |
---|
[5143] | 191 | !$OMP THREADPRIVATE(ql, q1, t1) |
---|
[1992] | 192 | |
---|
[5143] | 193 | ! Variables liees au bilan d'energie et d'enthAlpi |
---|
[1992] | 194 | REAL ztsol(klon) |
---|
[2007] | 195 | REAL h_vcol_tot, h_dair_tot, h_qw_tot, h_ql_tot, & |
---|
[5143] | 196 | h_qs_tot, qw_tot, ql_tot, qs_tot, ec_tot |
---|
[2007] | 197 | SAVE 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 |
---|
| 199 | !$OMP THREADPRIVATE(h_vcol_tot, h_dair_tot, h_qw_tot, h_ql_tot) |
---|
| 200 | !$OMP THREADPRIVATE(h_qs_tot, qw_tot, ql_tot, qs_tot , ec_tot) |
---|
[2007] | 201 | REAL d_h_vcol, d_h_dair, d_qt, d_qw, d_ql, d_qs, d_ec |
---|
| 202 | REAL d_h_vcol_phy |
---|
| 203 | REAL fs_bound, fq_bound |
---|
| 204 | SAVE d_h_vcol_phy |
---|
[5143] | 205 | !$OMP THREADPRIVATE(d_h_vcol_phy) |
---|
[2007] | 206 | REAL zero_v(klon) |
---|
[1992] | 207 | CHARACTER *15 ztit |
---|
[2007] | 208 | INTEGER ip_ebil ! PRINT level for energy conserv. diag. |
---|
| 209 | SAVE ip_ebil |
---|
| 210 | DATA ip_ebil/2/ |
---|
[5143] | 211 | !$OMP THREADPRIVATE(ip_ebil) |
---|
[2007] | 212 | INTEGER if_ebil ! level for energy conserv. dignostics |
---|
| 213 | SAVE if_ebil |
---|
| 214 | DATA if_ebil/2/ |
---|
[5143] | 215 | !$OMP THREADPRIVATE(if_ebil) |
---|
| 216 | !+jld ec_conser |
---|
[1992] | 217 | REAL d_t_ec(klon, klev) ! tendance du a la conersion Ec -> E thermique |
---|
| 218 | REAL zrcpd |
---|
[5143] | 219 | !-jld ec_conser |
---|
| 220 | !LF |
---|
[1992] | 221 | INTEGER nloc |
---|
[5143] | 222 | LOGICAL, SAVE :: first = .TRUE. |
---|
| 223 | !$OMP THREADPRIVATE(first) |
---|
| 224 | INTEGER, SAVE :: itap, igout |
---|
| 225 | !$OMP THREADPRIVATE(itap, igout) |
---|
[1992] | 226 | |
---|
| 227 | include "YOMCST2.h" |
---|
| 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() |
---|
[1992] | 274 | CALL cv3_inip() |
---|
| 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 | |
---|
[5143] | 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 |
---|
| 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 | |
---|