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