Changeset 3496
- Timestamp:
- May 10, 2019, 12:17:35 PM (6 years ago)
- Location:
- LMDZ6/trunk/libf/phylmd
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/concvl.F90
r3197 r3496 13 13 !RomP >>> 14 14 !! . da,phi,mp,dd_t,dd_q,lalim_conv,wght_th) 15 da, phi, mp, phii, d1a, dam, sij, clw, elij, &! RomP15 da, phi, mp, phii, d1a, dam, sij, qta, clw, elij, &! RomP 16 16 dd_t, dd_q, lalim_conv, wght_th, & ! RomP 17 17 evap, ep, epmlmMm, eplaMm, & ! RomP 18 wdtrainA, wdtrain M, wght, qtc, sigt, &18 wdtrainA, wdtrainS, wdtrainM, wght, qtc, sigt, & 19 19 tau_cld_cv, coefw_cld_cv, & ! RomP+RL, AJ 20 20 !RomP <<< … … 80 80 ! eplaMm-----output-R 81 81 ! wdtrainA---output-R 82 ! wdtrainS---output-R 82 83 ! wdtrainM---output-R 83 84 ! wght-------output-R … … 134 135 REAL, DIMENSION(klon,klev), INTENT(OUT) :: d1a, dam 135 136 REAL, DIMENSION(klon,klev,klev),INTENT(OUT) :: sij, elij 137 REAL, DIMENSION(klon,klev), INTENT(OUT) :: qta 136 138 REAL, DIMENSION(klon,klev), INTENT(OUT) :: clw 137 139 REAL, DIMENSION(klon,klev), INTENT(OUT) :: dd_t, dd_q … … 139 141 REAL, DIMENSION(klon,klev), INTENT(OUT) :: eplaMm 140 142 REAL, DIMENSION(klon,klev,klev), INTENT(OUT) :: epmlmMm 141 REAL, DIMENSION(klon,klev), INTENT(OUT) :: wdtrainA, wdtrain M143 REAL, DIMENSION(klon,klev), INTENT(OUT) :: wdtrainA, wdtrainS, wdtrainM 142 144 ! RomP <<< 143 145 REAL, DIMENSION(klon,klev), INTENT(OUT) :: wght !RL … … 437 439 !! evap,ep,epmlmMm,eplaMm, ! RomP 438 440 da, phi, mp, phii, d1a, dam, sij, wght, & ! RomP+RL 439 clw, elij, evap, ep, epmlmMm, eplaMm, &! RomP+RL440 wdtrainA, wdtrain M, qtc, sigt, &441 qta, clw, elij, evap, ep, epmlmMm, eplaMm, & ! RomP+RL 442 wdtrainA, wdtrainS, wdtrainM, qtc, sigt, & 441 443 tau_cld_cv, coefw_cld_cv, & ! RomP,AJ 442 444 !AC!+!RomP+jyg -
LMDZ6/trunk/libf/phylmd/cv3_mixscale.F90
r1992 r3496 13 13 include "cv3param.h" 14 14 15 INTEGER nloc, ncum, na 15 !inputs: 16 INTEGER, INTENT (IN) :: ncum, na, nloc 17 REAL, DIMENSION (nloc, na), INTENT (IN) :: m 18 !input/outputs: 19 REAL, DIMENSION (nloc, na, na), INTENT (INOUT) :: ment 20 21 !local variables: 16 22 INTEGER i, j, il 17 REAL ment(nloc, na, na), m(nloc, na)18 23 19 DO j = 1, nl 20 DO i = 1, nl 21 DO il = 1, ncum 22 ment(il, i, j) = m(il, i)*ment(il, i, j) 24 DO j = 1, nl 25 DO i = 1, nl 26 DO il = 1, ncum 27 ment(il, i, j) = m(il, i)*ment(il, i, j) 28 END DO 23 29 END DO 24 30 END DO 25 END DO26 31 27 32 -
LMDZ6/trunk/libf/phylmd/cv3_routines.F90
r3492 r3496 35 35 36 36 include "cv3param.h" 37 include "cvflag.h" 37 38 include "conema3.h" 38 39 … … 125 126 tlcrit=-55.0 126 127 CALL getin_p('tlcrit',tlcrit) 128 ejectliq=0. 129 CALL getin_p('ejectliq',ejectliq) 130 ejectice=0. 131 CALL getin_p('ejectice',ejectice) 132 cvflag_prec_eject = .FALSE. 133 CALL getin_p('cvflag_prec_eject',cvflag_prec_eject) 127 134 qsat_depends_on_qt = .FALSE. 128 135 CALL getin_p('qsat_depends_on_qt',qsat_depends_on_qt) 136 adiab_ascent_mass_flux_depends_on_ejectliq = .FALSE. 137 CALL getin_p('adiab_ascent_mass_flux_depends_on_ejectliq',adiab_ascent_mass_flux_depends_on_ejectliq) 129 138 130 139 WRITE (*, *) 't_top_max=', t_top_max … … 172 181 173 182 include "cv3param.h" 183 include "cvflag.h" 174 184 175 185 !inputs: … … 292 302 USE mod_phys_lmdz_transfert_para, ONLY : bcast 293 303 USE add_phys_tend_mod, ONLY: fl_cor_ebil 304 USE print_control_mod, ONLY: prt_level 294 305 IMPLICIT NONE 295 306 … … 519 530 END DO 520 531 ENDIF 532 IF (prt_level .GE. 10) THEN 533 print *,'cv3_feed : iflag(1), pfeed(1), plcl(1), wghti(1,k) ', & 534 iflag(1), pfeed(1), plcl(1), (wghti(1,k),k=1,10) 535 ENDIF 521 536 522 537 ! ------------------------------------------------------------------- … … 1108 1123 tnk, qnk, gznk, hnk, t, q, qs, gz, & 1109 1124 p, ph, h, tv, lv, lf, pbase, buoybase, plcl, & 1110 inb, tp, tvp, clw, hp, ep, sigp, buoy, frac) 1125 inb, tp, tvp, clw, hp, ep, sigp, buoy, & 1126 frac_a, frac_s, qpreca, qta) 1111 1127 USE print_control_mod, ONLY: prt_level 1112 1128 IMPLICIT NONE … … 1156 1172 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: ep, sigp, hp 1157 1173 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: buoy 1158 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: frac ! ice fraction 1174 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: frac_a, frac_s 1175 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: qpreca 1176 REAL, DIMENSION (nloc, nd), INTENT (OUT) :: qta 1159 1177 1160 1178 !local variables: … … 1162 1180 REAL smallestreal 1163 1181 REAL tg, qg, dqgdT, ahg, alv, alf, s, tc, es, esi, denom, rg, tca, elacrit 1182 REAL :: phinu2p 1164 1183 REAL als 1165 1184 REAL :: qsat_new, snew 1166 1185 REAL, DIMENSION (nloc,nd) :: qi 1186 REAL, DIMENSION (nloc,nd) :: ha ! moist static energy of adiabatic ascents 1187 ! taking into account precip ejection 1188 REAL, DIMENSION (nloc,nd) :: hla ! liquid water static energy of adiabatic ascents 1189 ! taking into account precip ejection 1190 REAL, DIMENSION (nloc,nd) :: qcld ! specific cloud water 1167 1191 REAL, DIMENSION (nloc,nd) :: qhsat ! specific humidity at saturation 1168 1192 REAL, DIMENSION (nloc,nd) :: dqhsatdT ! dqhsat/dT 1193 REAL, DIMENSION (nloc,nd) :: frac ! ice fraction function of envt temperature 1194 REAL, DIMENSION (nloc,nd) :: qps ! specific solid precipitation 1195 REAL, DIMENSION (nloc,nd) :: qpl ! specific liquid precipitation 1169 1196 REAL, DIMENSION (nloc) :: ah0, cape, capem, byp 1170 1197 LOGICAL, DIMENSION (nloc) :: lcape 1171 1198 INTEGER, DIMENSION (nloc) :: iposit 1199 REAL :: denomm1 1172 1200 REAL :: by, defrac, pden, tbis 1173 1201 REAL :: fracg … … 1196 1224 END DO 1197 1225 1226 1198 1227 ! ===================================================================== 1199 1228 ! --- FIND THE REST OF THE LIFTED PARCEL TEMPERATURES … … 1211 1240 qnk(i)*(lv0-clmcpv*(tnk(i)-273.15)) + gznk(i) 1212 1241 END DO 1242 ! 1243 ! Ice fraction 1244 ! 1245 IF (cvflag_ice) THEN 1246 DO k = minorig, nl 1247 DO i = 1, ncum 1248 frac(i, k) = (Tx - t(i,k))/(Tx - Tm) 1249 frac(i, k) = min(max(frac(i,k),0.0), 1.0) 1250 END DO 1251 END DO 1252 ! Below cloud base, set ice fraction to cloud base value 1253 DO k = 1, nl 1254 DO i = 1, ncum 1255 IF (k<icb(i)) THEN 1256 frac(i,k) = frac(i,icb(i)) 1257 END IF 1258 END DO 1259 END DO 1260 ELSE 1261 DO k = 1, nl 1262 DO i = 1, ncum 1263 frac(i,k) = 0. 1264 END DO 1265 END DO 1266 ENDIF ! (cvflag_ice) 1267 1213 1268 1214 1269 DO k = minorig, nl 1215 1270 DO i = 1,ncum 1271 ha(i,k) = ah0(i) 1272 hla(i,k) = hnk(i) 1273 qta(i,k) = qnk(i) 1274 qpreca(i,k) = 0. 1275 frac_a(i,k) = 0. 1276 frac_s(i,k) = frac(i,k) 1277 qpl(i,k) = 0. 1278 qps(i,k) = 0. 1216 1279 qhsat(i,k) = qs(i,k) 1280 qcld(i,k) = max(qta(i,k)-qhsat(i,k),0.) 1281 IF (k <= icb(i)+1) THEN 1282 qhsat(i,k) = qnk(i)-clw(i,k) 1283 qcld(i,k) = clw(i,k) 1284 ENDIF 1217 1285 ENDDO 1218 1286 ENDDO … … 1347 1415 !---------------------------------------------------------------------------- 1348 1416 ! 1349 ! Ice fraction1350 !1351 DO k = minorig + 1, nl1352 DO i = 1, ncum1353 frac(i, k) = (Tx - t(i,k))/(Tx - Tm)1354 frac(i, k) = min(max(frac(i,k),0.0), 1.0)1355 END DO1356 END DO1357 ! Below cloud base, set ice fraction to cloud base value1358 DO k = 1, nl1359 DO i = 1, ncum1360 IF (k<icb(i)) THEN1361 frac(i,k) = frac(i,icb(i))1362 END IF1363 END DO1364 END DO1365 1366 1417 DO k = minorig + 1, nl 1367 1418 DO i = 1,ncum … … 1376 1427 IF (k>=(icbs(i)+1)) THEN ! convect3 1377 1428 tg = tp(i, k) 1378 IF (tg .gt. Tx ) THEN1429 IF (tg .gt. Tx .OR. .NOT.cvflag_ice) THEN 1379 1430 es = 6.112*exp(17.67*(tg - 273.15)/(tg + 243.5 - 273.15)) 1380 1431 qg = eps*es/(p(i,k)-es*(1.-eps)) … … 1386 1437 ENDIF 1387 1438 IF (qsat_depends_on_qt) THEN 1388 dqgdT = dqgdT*(1.-q nk(i))/(1.-qg)**21389 qg = qg*(1.-q nk(i))/(1.-qg)1439 dqgdT = dqgdT*(1.-qta(i,k-1))/(1.-qg)**2 1440 qg = qg*(1.-qta(i,k-1))/(1.-qg) 1390 1441 ENDIF 1391 ahg = (cpd + (cl-cpd)*q nk(i))*tg + lv(i,k)*qg - &1392 lf(i,k)*frac(i,k)*(q nk(i) - qg) + gz(i,k)1442 ahg = (cpd + (cl-cpd)*qta(i,k-1))*tg + lv(i,k)*qg - & 1443 lf(i,k)*frac(i,k)*(qta(i,k-1) - qg) + gz(i,k) 1393 1444 Tp(i,k) = tg + (ah0(i) - ahg)/ & 1394 (cpd + (cl-cpd)*q nk(i) + (lv(i,k)+frac(i,k)*lf(i,k))*dqgdT)1445 (cpd + (cl-cpd)*qta(i,k-1) + (lv(i,k)+frac(i,k)*lf(i,k))*dqgdT) 1395 1446 !! print *,'undilute2 iterations k, Tp(i,k), ah0(i), ahg ', & 1396 1447 !! k, Tp(i,k), ah0(i), ahg … … 1401 1452 IF (k>=(icbs(i)+1)) THEN ! convect3 1402 1453 tg = tp(i, k) 1403 IF (tg .gt. Tx ) THEN1454 IF (tg .gt. Tx .OR. .NOT.cvflag_ice) THEN 1404 1455 es = 6.112*exp(17.67*(tg - 273.15)/(tg + 243.5 - 273.15)) 1405 1456 qg = eps*es/(p(i,k)-es*(1.-eps)) … … 1408 1459 qg = eps*esi/(p(i,k)-esi*(1.-eps)) 1409 1460 ENDIF 1410 IF (qsat_depends_on_qt) THEN 1411 qg = qg*(1.-qnk(i))/(1.-qg) 1412 ENDIF 1413 clw(i, k) = qnk(i) - qg 1461 IF (qsat_depends_on_qt) THEN 1462 qg = qg*(1.-qta(i,k-1))/(1.-qg) 1463 ENDIF 1464 qhsat(i,k) = qg 1465 END IF ! (k>=(icbs(i)+1)) 1466 END DO ! i = 1, ncum 1467 DO i = 1, ncum 1468 IF (k>=(icbs(i)+1)) THEN ! convect3 1469 clw(i, k) = qta(i,k-1) - qhsat(i,k) 1414 1470 clw(i, k) = max(0.0, clw(i,k)) 1415 tvp(i, k) = max(0., tp(i,k)*(1.+q g/eps-qnk(i)))1471 tvp(i, k) = max(0., tp(i,k)*(1.+qhsat(i,k)/eps-qta(i,k-1))) 1416 1472 ! print*,tvp(i,k),'tvp' 1417 1473 IF (clw(i,k)<1.E-11) THEN … … 1421 1477 END IF ! (k>=(icbs(i)+1)) 1422 1478 END DO ! i = 1, ncum 1479 ! 1480 IF (cvflag_prec_eject) THEN 1481 DO i = 1, ncum 1482 IF (k>=(icbs(i)+1)) THEN ! convect3 1483 ! Specific precipitation (liquid and solid) and ice content 1484 ! before ejection of precipitation !!jygprl 1485 elacrit = elcrit*min(max(1.-(tp(i,k)-T0)/Tlcrit, 0.), 1.) !!jygprl 1486 !!!! qcld(i,k) = min(clw(i,k), elacrit) !!jygprl 1487 qcld(i,k) = min(clw(i,k), elacrit*(1.-qta(i,k-1))/(1.-elacrit)) !!jygprl 1488 phinu2p = qhsat(i,k-1) + qcld(i,k-1) - (qhsat(i,k) + qcld(i,k)) !!jygprl 1489 qpl(i,k) = qpl(i,k-1) + (1.-frac(i,k))*phinu2p !!jygprl 1490 qps(i,k) = qps(i,k-1) + frac(i,k) *phinu2p !!jygprl 1491 qi(i,k) = (1.-ejectliq)*clw(i,k)*frac(i,k) + & !!jygprl 1492 ejectliq*(qps(i,k-1) + frac(i,k)*(phinu2p+qcld(i,k))) !!jygprl 1493 !! 1494 ! ===================================================================================== 1495 ! Ejection of precipitation from adiabatic ascents if requested (cvflag_prec_eject=True): 1496 ! Compute the steps of total water (qta), of moist static energy (ha), of specific 1497 ! precipitation (qpl and qps) and of specific cloud water (qcld) associated with precipitation 1498 ! ejection. 1499 ! ===================================================================================== 1500 ! 1501 ! Verif 1502 qpreca(i,k) = ejectliq*qpl(i,k) + ejectice*qps(i,k) !!jygprl 1503 frac_a(i,k) = ejectice*qps(i,k)/max(qpreca(i,k),smallestreal) !!jygprl 1504 frac_s(i,k) = (1.-ejectliq)*frac(i,k) + & !!jygprl 1505 ejectliq*(1. - (qpl(i,k)+(1.-frac(i,k))*qcld(i,k))/max(clw(i,k),smallestreal)) !!jygprl 1506 ! 1507 denomm1 = 1./(1. - qpreca(i,k)) 1508 ! 1509 qta(i,k) = qta(i,k-1) - & 1510 qpreca(i,k)*(1.-qta(i,k-1))*denomm1 1511 ha(i,k) = ha(i,k-1) + & 1512 ( qpreca(i,k)*(-(1.-qta(i,k-1))*(cl-cpd)*tp(i,k) + & 1513 lv(i,k)*qhsat(i,k) - lf(i,k)*(frac_s(i,k)*qcld(i,k)+qps(i,k))) + & 1514 lf(i,k)*ejectice*qps(i,k))*denomm1 1515 hla(i,k) = hla(i,k-1) + & 1516 ( qpreca(i,k)*(-(1.-qta(i,k-1))*(cpv-cpd)*tp(i,k) - & 1517 lv(i,k)*((1.-frac_s(i,k))*qcld(i,k)+qpl(i,k)) - & 1518 (lv(i,k)+lf(i,k))*(frac_s(i,k)*qcld(i,k)+qps(i,k))) + & 1519 lv(i,k)*ejectliq*qpl(i,k) + (lv(i,k)+lf(i,k))*ejectice*qps(i,k))*denomm1 1520 qpl(i,k) = qpl(i,k)*(1.-ejectliq)*denomm1 1521 qps(i,k) = qps(i,k)*(1.-ejectice)*denomm1 1522 qcld(i,k) = qcld(i,k)*denomm1 1523 qhsat(i,k) = qhsat(i,k)*(1.-qta(i,k))/(1.-qta(i,k-1)) 1524 END IF ! (k>=(icbs(i)+1)) 1525 END DO ! i = 1, ncum 1526 ENDIF ! (cvflag_prec_eject) 1527 ! 1423 1528 END DO ! k = minorig + 1, nl 1424 1529 ! 1425 1530 !---------------------------------------------------------------------------- 1426 1531 ! 1427 ELSE ! (icvflag_Tpa == 2) ELSE IF(icvflag_Tpa == 1)1532 ELSE IF (icvflag_Tpa == 0) THEN! (icvflag_Tpa == 2) ELSE IF(icvflag_Tpa == 1) 1428 1533 ! 1429 1534 !---------------------------------------------------------------------------- … … 1587 1692 !---------------------------------------------------------------------------- 1588 1693 ! 1589 ENDIF ! (icvflag_Tpa == 2) ELSEIF (icvflag_Tpa == 1) ELSE 1694 ENDIF ! (icvflag_Tpa == 2) ELSEIF (icvflag_Tpa == 1) ELSE (icvflag_Tpa == 0) 1590 1695 ! 1591 1696 !---------------------------------------------------------------------------- … … 1872 1977 IF (cvflag_ice) THEN 1873 1978 ! 1979 IF (cvflag_prec_eject) THEN 1980 !! DO k = minorig + 1, nl 1981 !! DO i = 1, ncum 1982 !! IF ((k>=icb(i)) .AND. (k<=inb(i))) THEN 1983 !! frac_s(i,k) = qi(i,k)/max(clw(i,k),smallestreal) 1984 !! frac_s(i,k) = 1. - (qpl(i,k)+(1.-frac_s(i,k))*qcld(i,k))/max(clw(i,k),smallestreal) 1985 !! END IF 1986 !! END DO 1987 !! END DO 1988 ELSE ! (cvflag_prec_eject) 1874 1989 DO k = minorig + 1, nl 1875 1990 DO i = 1, ncum … … 1877 1992 !jyg< frac computation moved to beginning of cv3_undilute2. 1878 1993 ! kept here for compatibility test with CMip6 version 1879 frac(i, k) = 1. - (t(i,k)-243.15)/(263.15-243.15) 1880 frac(i, k) = min(max(frac(i,k),0.0), 1.0) 1881 hp(i, k) = hnk(i) + (lv(i,k)+(cpd-cpv)*t(i,k)+frac(i,k)*lf(i,k))* & 1882 ep(i, k)*clw(i, k) 1994 frac_s(i, k) = 1. - (t(i,k)-243.15)/(263.15-243.15) 1995 frac_s(i, k) = min(max(frac_s(i,k),0.0), 1.0) 1883 1996 END IF 1884 1997 END DO 1885 1998 END DO 1886 ! Below cloud base, set ice fraction to cloud base value 1887 !! DO k = 1, nl 1888 !! DO i = 1, ncum 1889 !! IF (k<icb(i)) THEN 1890 !! frac(i,k) = frac(i,icb(i)) 1891 !! END IF 1892 !! END DO 1893 !! END DO 1999 ENDIF ! (cvflag_prec_eject) ELSE 2000 DO k = minorig + 1, nl 2001 DO i = 1, ncum 2002 IF ((k>=icb(i)) .AND. (k<=inb(i))) THEN 2003 !! hp(i, k) = hnk(i) + (lv(i,k)+(cpd-cpv)*t(i,k)+frac_s(i,k)*lf(i,k))* & !!jygprl 2004 !! ep(i, k)*clw(i, k) !!jygprl 2005 hp(i, k) = hla(i,k-1) + (lv(i,k)+(cpd-cpv)*t(i,k)+frac_s(i,k)*lf(i,k))* & !!jygprl 2006 ep(i, k)*clw(i, k) !!jygprl 2007 END IF 2008 END DO 2009 END DO 1894 2010 ! 1895 2011 ELSE ! (cvflag_ice) … … 2576 2692 SUBROUTINE cv3_unsat(nloc, ncum, nd, na, ntra, icb, inb, iflag, & 2577 2693 t, rr, rs, gz, u, v, tra, p, ph, & 2578 th, tv, lv, lf, cpn, ep, sigp, clw, &2694 th, tv, lv, lf, cpn, ep, sigp, clw, frac_s, qpreca, frac_a, qta , & !!jygprl 2579 2695 m, ment, elij, delt, plcl, coef_clos, & 2580 2696 mp, rp, up, vp, trap, wt, water, evap, fondue, ice, & 2581 2697 faci, b, sigd, & 2582 wdtrainA, wdtrain M) ! RomP2698 wdtrainA, wdtrainS, wdtrainM) ! RomP 2583 2699 USE print_control_mod, ONLY: prt_level, lunout 2584 2700 IMPLICIT NONE … … 2598 2714 REAL, DIMENSION (nloc, na), INTENT (IN) :: gz 2599 2715 REAL, DIMENSION (nloc, nd), INTENT (IN) :: u, v 2600 REAL tra(nloc, nd, ntra) 2601 REAL p(nloc, nd), ph(nloc, nd+1) 2602 REAL, DIMENSION (nloc, na), INTENT (IN) :: ep, sigp, clw 2716 REAL, DIMENSION (nloc, nd, ntra), INTENT(IN) :: tra 2717 REAL, DIMENSION (nloc, nd), INTENT (IN) :: p 2718 REAL, DIMENSION (nloc, nd+1), INTENT (IN) :: ph 2719 REAL, DIMENSION (nloc, na), INTENT (IN) :: ep, sigp, clw !adiab ascent shedding 2720 REAL, DIMENSION (nloc, na), INTENT (IN) :: frac_s !ice fraction in adiab ascent shedding !!jygprl 2721 REAL, DIMENSION (nloc, na), INTENT (IN) :: qpreca !adiab ascent precip !!jygprl 2722 REAL, DIMENSION (nloc, na), INTENT (IN) :: frac_a !ice fraction in adiab ascent precip !!jygprl 2723 REAL, DIMENSION (nloc, na), INTENT (IN) :: qta !adiab ascent specific total water !!jygprl 2603 2724 REAL, DIMENSION (nloc, na), INTENT (IN) :: th, tv, lv, cpn 2604 2725 REAL, DIMENSION (nloc, na), INTENT (IN) :: lf … … 2613 2734 REAL, DIMENSION (nloc, na), INTENT (OUT) :: mp, rp, up, vp 2614 2735 REAL, DIMENSION (nloc, na), INTENT (OUT) :: water, evap, wt 2615 REAL, DIMENSION (nloc, na), INTENT (OUT) :: ice, fondue, faci 2736 REAL, DIMENSION (nloc, na), INTENT (OUT) :: ice, fondue 2737 REAL, DIMENSION (nloc, na), INTENT (OUT) :: faci ! ice fraction in precipitation 2616 2738 REAL, DIMENSION (nloc, na, ntra), INTENT (OUT) :: trap 2617 2739 REAL, DIMENSION (nloc, na), INTENT (OUT) :: b … … 2621 2743 ! Distinction des wdtrain 2622 2744 ! Pa = wdtrainA Pm = wdtrainM 2623 REAL, DIMENSION (nloc, na), INTENT (OUT) :: wdtrainA, wdtrain M2745 REAL, DIMENSION (nloc, na), INTENT (OUT) :: wdtrainA, wdtrainS, wdtrainM 2624 2746 2625 2747 !local variables 2626 2748 INTEGER i, j, k, il, num1, ndp1 2749 REAL smallestreal 2627 2750 REAL tinv, delti, coef 2628 2751 REAL awat, afac, afac1, afac2, bfac … … 2631 2754 REAL ampmax, thaw 2632 2755 REAL tevap(nloc) 2633 REAL lvcp(nloc, na), lfcp(nloc, na) 2634 REAL h(nloc, na), hm(nloc, na) 2635 REAL frac(nloc, na) 2636 REAL fraci(nloc, na), prec(nloc, na) 2756 REAL, DIMENSION (nloc, na) :: lvcp, lfcp 2757 REAL, DIMENSION (nloc, na) :: h, hm 2758 REAL, DIMENSION (nloc, na) :: ma 2759 REAL, DIMENSION (nloc, na) :: frac ! ice fraction in precipitation source 2760 REAL, DIMENSION (nloc, na) :: fraci ! provisionnal ice fraction in precipitation 2761 REAL, DIMENSION (nloc, na) :: prec 2637 2762 REAL wdtrain(nloc) 2638 2763 LOGICAL lwork(nloc), mplus(nloc) … … 2641 2766 ! ------------------------------------------------------ 2642 2767 IF (prt_level .GE. 10) print *,' ->cv3_unsat, iflag(1) ', iflag(1) 2768 2769 smallestreal=tiny(smallestreal) 2643 2770 2644 2771 ! ============================= … … 2660 2787 !! RomP >>> 2661 2788 wdtrainA(:,:) = 0. 2789 wdtrainS(:,:) = 0. 2662 2790 wdtrainM(:,:) = 0. 2663 2791 !! RomP <<< … … 2715 2843 END DO 2716 2844 2845 ! 2846 ! Get adiabatic ascent mass flux 2847 ! 2848 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2849 IF (adiab_ascent_mass_flux_depends_on_ejectliq) THEN 2850 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2851 !!! Warning : this option leads to water conservation violation 2852 !!! Expert only 2853 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2854 DO il = 1, ncum 2855 ma(il, nlp) = 0. 2856 ma(il, 1) = 0. 2857 END DO 2858 2859 DO i = nl, 2, -1 2860 DO il = 1, ncum 2861 ma(il, i) = ma(il, i+1)*(1.-qta(il,i))/(1.-qta(il,i-1)) + m(il, i) 2862 END DO 2863 END DO 2864 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2865 ELSE ! (adiab_ascent_mass_flux_depends_on_ejectliq) 2866 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2867 DO il = 1, ncum 2868 ma(il, nlp) = 0. 2869 ma(il, 1) = 0. 2870 END DO 2871 2872 DO i = nl, 2, -1 2873 DO il = 1, ncum 2874 ma(il, i) = ma(il, i+1) + m(il, i) 2875 END DO 2876 END DO 2877 2878 ENDIF ! (adiab_ascent_mass_flux_depends_on_ejectliq) ELSE 2879 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2717 2880 2718 2881 ! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ … … 2739 2902 ! *** calculate detrained precipitation *** 2740 2903 2741 DO il = 1, ncum 2742 IF (i<=inb(il) .AND. lwork(il)) THEN 2743 IF (cvflag_grav) THEN 2744 wdtrain(il) = grav*ep(il, i)*m(il, i)*clw(il, i) 2745 wdtrainA(il, i) = wdtrain(il)/grav ! Pa RomP 2746 ELSE 2747 wdtrain(il) = 10.0*ep(il, i)*m(il, i)*clw(il, i) 2748 wdtrainA(il, i) = wdtrain(il)/10. ! Pa RomP 2749 END IF 2750 END IF 2751 END DO 2904 2905 DO il = 1, ncum 2906 IF (i<=inb(il) .AND. lwork(il)) THEN 2907 wdtrain(il) = grav*ep(il, i)*m(il, i)*clw(il, i) 2908 wdtrainS(il, i) = wdtrain(il)/grav ! Ps jyg 2909 !! wdtrainA(il, i) = wdtrain(il)/grav ! Ps RomP 2910 END IF 2911 END DO 2752 2912 2753 2913 IF (i>1) THEN … … 2757 2917 awat = elij(il, j, i) - (1.-ep(il,i))*clw(il, i) 2758 2918 awat = max(awat, 0.0) 2759 IF (cvflag_grav) THEN 2760 wdtrain(il) = wdtrain(il) + grav*awat*ment(il, j, i) 2761 wdtrainM(il, i) = wdtrain(il)/grav - wdtrainA(il, i) ! Pm RomP 2762 ELSE 2763 wdtrain(il) = wdtrain(il) + 10.0*awat*ment(il, j, i) 2764 wdtrainM(il, i) = wdtrain(il)/10. - wdtrainA(il, i) ! Pm RomP 2765 END IF 2919 wdtrain(il) = wdtrain(il) + grav*awat*ment(il, j, i) 2920 wdtrainM(il, i) = wdtrain(il)/grav - wdtrainS(il, i) ! Pm jyg 2921 !! wdtrainM(il, i) = wdtrain(il)/grav - wdtrainA(il, i) ! Pm RomP 2766 2922 END IF 2767 2923 END DO … … 2769 2925 END IF 2770 2926 2927 IF (cvflag_prec_eject) THEN 2928 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2929 IF (adiab_ascent_mass_flux_depends_on_ejectliq) THEN 2930 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2931 !!! Warning : this option leads to water conservation violation 2932 !!! Expert only 2933 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2934 IF ( i > 1) THEN 2935 DO il = 1, ncum 2936 IF (i<=inb(il) .AND. lwork(il)) THEN 2937 wdtrainA(il,i) = ma(il, i+1)*(qta(il, i-1)-qta(il,i))/(1. - qta(il, i-1)) ! Pa jygprl 2938 wdtrain(il) = wdtrain(il) + grav*wdtrainA(il,i) 2939 END IF 2940 END DO 2941 ENDIF ! ( i > 1) 2942 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2943 ELSE ! (adiab_ascent_mass_flux_depends_on_ejectliq) 2944 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2945 IF ( i > 1) THEN 2946 DO il = 1, ncum 2947 IF (i<=inb(il) .AND. lwork(il)) THEN 2948 wdtrainA(il,i) = ma(il, i+1)*(qta(il, i-1)-qta(il,i)) ! Pa jygprl 2949 wdtrain(il) = wdtrain(il) + grav*wdtrainA(il,i) 2950 END IF 2951 END DO 2952 ENDIF ! ( i > 1) 2953 2954 ENDIF ! (adiab_ascent_mass_flux_depends_on_ejectliq) ELSE 2955 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2956 ENDIF ! (cvflag_prec_eject) 2957 2771 2958 2772 2959 ! *** find rain water and evaporation using provisional *** … … 2774 2961 2775 2962 2963 IF (cvflag_ice) THEN !!jygprl 2964 DO il = 1, ncum !!jygprl 2965 IF (i<=inb(il) .AND. lwork(il)) THEN !!jygprl 2966 frac(il, i) = (frac_a(il,i)*wdtrainA(il,i)+frac_s(il,i)*(wdtrainS(il,i)+wdtrainM(il,i))) / & !!jygprl 2967 max(wdtrainA(il,i)+wdtrainS(il,i)+wdtrainM(il,i),smallestreal) !!jygprl 2968 fraci(il, i) = frac(il, i) !!jygprl 2969 END IF !!jygprl 2970 END DO !!jygprl 2971 END IF !!jygprl 2972 2776 2973 DO il = 1, ncum 2777 2974 IF (i<=inb(il) .AND. lwork(il)) THEN … … 2779 2976 wt(il, i) = 45.0 2780 2977 2781 IF (cvflag_ice) THEN2782 frac(il, inb(il)) = 1. - (t(il,inb(il))-243.15)/(263.15-243.15)2783 frac(il, inb(il)) = min(max(frac(il,inb(il)),0.), 1.)2784 fraci(il, inb(il)) = frac(il, inb(il))2785 ELSE2786 CONTINUE2787 END IF2788 2978 2789 2979 IF (i<inb(il)) THEN … … 2802 2992 rp(il, i) = 0.5*(rp(il,i)+rr(il,i)) 2803 2993 END IF 2804 fraci(il, i) = 1. - (t(il,i)-243.15)/(263.15-243.15)2805 fraci(il, i) = min(max(fraci(il,i),0.0), 1.0)2994 !! fraci(il, i) = 1. - (t(il,i)-243.15)/(263.15-243.15) 2995 !! fraci(il, i) = min(max(fraci(il,i),0.0), 1.0) 2806 2996 rp(il, i) = max(rp(il,i), 0.0) 2807 2997 rp(il, i) = amin1(rp(il,i), rs(il,i)) … … 3230 3420 t, rr, t_wake, rr_wake, s_wake, u, v, tra, & 3231 3421 gz, p, ph, h, hp, lv, lf, cpn, th, th_wake, & 3232 ep, clw, m, tp, mp, rp, up, vp, trap, &3422 ep, clw, qpreca, m, tp, mp, rp, up, vp, trap, & 3233 3423 wt, water, ice, evap, fondue, faci, b, sigd, & 3234 3424 ment, qent, hent, iflag_mix, uent, vent, & … … 3240 3430 !! tls, tps, ! useless . jyg 3241 3431 qcondc, wd, & 3242 ftd, fqd, q nk, qtc, sigt, tau_cld_cv, coefw_cld_cv)3432 ftd, fqd, qta, qtc, sigt, tau_cld_cv, coefw_cld_cv) 3243 3433 3244 3434 USE print_control_mod, ONLY: lunout, prt_level … … 3280 3470 REAL, DIMENSION (nloc, na, na, ntra), INTENT (IN) :: traent 3281 3471 REAL, DIMENSION (nloc, nd), INTENT (IN) :: tv, tvp, wghti 3282 REAL,INTENT(IN) :: tau_cld_cv, coefw_cld_cv 3472 REAL, DIMENSION (nloc, nd), INTENT (IN) :: qta 3473 REAL, DIMENSION (nloc, na),INTENT(IN) :: qpreca 3474 REAL, INTENT(IN) :: tau_cld_cv, coefw_cld_cv 3283 3475 ! 3284 3476 !input/output: … … 3309 3501 REAL :: ax, bx, cx, dx, ex 3310 3502 REAL :: cpinv, rdcp, dpinv 3503 REAL :: sigaq 3311 3504 REAL, DIMENSION (nloc) :: awat 3312 3505 REAL, DIMENSION (nloc, nd) :: lvcp, lfcp ! , mke ! unused . jyg … … 3326 3519 REAL, DIMENSION (nloc) :: sument 3327 3520 REAL, DIMENSION (nloc, nd) :: sigment, qtment ! cld 3328 REAL, DIMENSION (nloc) :: qnk3329 3521 REAL sumdq !jyg 3330 3522 ! … … 3437 3629 END DO 3438 3630 3631 ! - Adiabatic ascent mass flux "ma" and cloud base mass flux "cbmf" 3632 !----------------------------------------------------------------- 3633 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 3634 IF (adiab_ascent_mass_flux_depends_on_ejectliq) THEN 3635 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 3636 !!! Warning : this option leads to water conservation violation 3637 !!! Expert only 3638 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 3639 DO il = 1, ncum 3640 ma(il, nlp) = 0. 3641 ma(il, 1) = 0. 3642 END DO 3643 DO k = nl, 2, -1 3644 DO il = 1, ncum 3645 ma(il, k) = ma(il, k+1)*(1.-qta(il, k))/(1.-qta(il, k-1)) + m(il, k) 3646 cbmf(il) = max(cbmf(il), ma(il,k)) 3647 END DO 3648 END DO 3649 DO k = 2,nl 3650 DO il = 1, ncum 3651 IF (k <icb(il)) THEN 3652 ma(il, k) = ma(il, k-1) + wghti(il,k-1)*cbmf(il) 3653 ENDIF 3654 END DO 3655 END DO 3656 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 3657 ELSE ! (adiab_ascent_mass_flux_depends_on_ejectliq) 3658 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 3659 !! Line kept for compatibility with earlier versions 3439 3660 DO k = 2, nl 3440 3661 DO il = 1, ncum … … 3445 3666 END DO 3446 3667 3668 DO il = 1, ncum 3669 ma(il, nlp) = 0. 3670 ma(il, 1) = 0. 3671 END DO 3672 DO k = nl, 2, -1 3673 DO il = 1, ncum 3674 ma(il, k) = ma(il, k+1) + m(il, k) 3675 END DO 3676 END DO 3677 DO k = 2,nl 3678 DO il = 1, ncum 3679 IF (k <icb(il)) THEN 3680 ma(il, k) = ma(il, k-1) + wghti(il,k-1)*cbmf(il) 3681 ENDIF 3682 END DO 3683 END DO 3684 3685 ENDIF ! (adiab_ascent_mass_flux_depends_on_ejectliq) ELSE 3686 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 3687 ! 3447 3688 ! print*,'cv3_yield avant ft' 3448 3689 ! am is the part of cbmf taken from the first level … … 3581 3822 !*** Compute convective mass fluxes upwd and dnwd *** 3582 3823 3824 ! 3825 ! ================================================= 3826 ! upward fluxes | 3827 ! ------------------------------------------------ 3828 ! 3583 3829 upwd(:,:) = 0. 3584 3830 up_to(:,:) = 0. 3585 3831 up_from(:,:) = 0. 3586 dnwd(:,:) = 0. 3587 dn_to(:,:) = 0. 3588 dn_from(:,:) = 0. 3589 ! 3590 ! ================================================= 3591 ! upward fluxes | 3592 ! ------------------------------------------------ 3832 ! 3833 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 3834 IF (adiab_ascent_mass_flux_depends_on_ejectliq) THEN 3835 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 3836 !! The decrease of the adiabatic ascent mass flux due to ejection of precipitation 3837 !! is taken into account. 3838 !! WARNING : in the present version, taking into account the mass-flux decrease due to 3839 !! precipitation ejection leads to water conservation violation. 3840 ! 3841 ! - Upward mass flux of mixed draughts 3842 !--------------------------------------- 3843 DO i = 2, nl 3844 DO j = 1, i-1 3845 DO il = 1, ncum 3846 IF (i<=inb(il)) THEN 3847 up_to(il,i) = up_to(il,i) + ment(il,j,i) 3848 ENDIF 3849 ENDDO 3850 ENDDO 3851 ENDDO 3852 ! 3853 DO j = 3, nl 3854 DO i = 2, j-1 3855 DO il = 1, ncum 3856 IF (j<=inb(il)) THEN 3857 up_from(il,i) = up_from(il,i) + ment(il,i,j) 3858 ENDIF 3859 ENDDO 3860 ENDDO 3861 ENDDO 3862 ! 3863 ! The difference between upwd(il,i) and upwd(il,i-1) is due to updrafts ending in layer 3864 !(i-1) (theses drafts cross interface (i-1) but not interface(i)) and to updrafts starting 3865 !from layer (i-1) (theses drafts cross interface (i) but not interface(i-1)): 3866 ! 3867 DO i = 2, nlp 3868 DO il = 1, ncum 3869 IF (i<=inb(il)+1) THEN 3870 upwd(il,i) = max(0., upwd(il,i-1) - up_to(il,i-1) + up_from(il,i-1)) 3871 ENDIF 3872 ENDDO 3873 ENDDO 3874 ! 3875 ! - Total upward mass flux 3876 !--------------------------- 3877 DO i = 2, nlp 3878 DO il = 1, ncum 3879 IF (i<=inb(il)+1) THEN 3880 upwd(il,i) = upwd(il,i) + ma(il,i) 3881 ENDIF 3882 ENDDO 3883 ENDDO 3884 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 3885 ELSE ! (adiab_ascent_mass_flux_depends_on_ejectliq) 3886 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 3887 !! The decrease of the adiabatic ascent mass flux due to ejection of precipitation 3888 !! is not taken into account. 3889 ! 3890 ! - Upward mass flux 3891 !------------------- 3593 3892 DO i = 2, nl 3594 3893 DO il = 1, ncum … … 3613 3912 ENDDO 3614 3913 ENDDO 3615 !!DO i = 2, nl 3616 !! DO j = i+1, nl !! Permuter les boucles i et j 3914 ! 3617 3915 DO j = 3, nl 3618 3916 DO i = 2, j-1 … … 3636 3934 ENDDO 3637 3935 ENDDO 3936 3937 3938 ENDIF ! (adiab_ascent_mass_flux_depends_on_ejectliq) ELSE 3939 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 3940 3638 3941 ! 3639 3942 ! ================================================= 3640 3943 ! downward fluxes | 3641 3944 ! ------------------------------------------------ 3945 dnwd(:,:) = 0. 3946 dn_to(:,:) = 0. 3947 dn_from(:,:) = 0. 3642 3948 DO i = 1, nl 3643 3949 DO j = i+1, nl … … 3650 3956 ENDDO 3651 3957 ! 3652 !!DO i = 2, nl3653 !! DO j = 1, i-1 !! Permuter les boucles i et j3654 3958 DO j = 1, nl 3655 3959 DO i = j+1, nl … … 4423 4727 !!!! 4424 4728 !!!! ENDDO 4729 4730 !! DO i = 1, nlp 4731 !! DO il = 1, ncum 4732 !! ma(il, i) = 0 4733 !! END DO 4734 !! END DO 4735 !! 4736 !! DO i = 1, nl 4737 !! DO j = i, nl 4738 !! DO il = 1, ncum 4739 !! ma(il, i) = ma(il, i) + m(il, j) 4740 !! END DO 4741 !! END DO 4742 !! END DO 4743 4744 !jyg< (loops stop at nl) 4745 !! DO i = nl + 1, nd 4746 !! DO il = 1, ncum 4747 !! ma(il, i) = 0. 4748 !! END DO 4749 !! END DO 4750 !>jyg 4751 4752 !! DO i = 1, nl 4753 !! DO il = 1, ncum 4754 !! IF (i<=(icb(il)-1)) THEN 4755 !! ma(il, i) = 0 4756 !! END IF 4757 !! END DO 4758 !! END DO 4759 4425 4760 !----------------------------------------------------------- 4426 4761 ENDIF !(.NOT.ok_optim_yield) !| … … 4447 4782 !>jyg 4448 4783 4449 DO i = 1, nlp4450 DO il = 1, ncum4451 ma(il, i) = 04452 END DO4453 END DO4454 4455 DO i = 1, nl4456 DO j = i, nl4457 DO il = 1, ncum4458 ma(il, i) = ma(il, i) + m(il, j)4459 END DO4460 END DO4461 END DO4462 4463 !jyg< (loops stop at nl)4464 !! DO i = nl + 1, nd4465 !! DO il = 1, ncum4466 !! ma(il, i) = 0.4467 !! END DO4468 !! END DO4469 !>jyg4470 4471 DO i = 1, nl4472 DO il = 1, ncum4473 IF (i<=(icb(il)-1)) THEN4474 ma(il, i) = 04475 END IF4476 END DO4477 END DO4478 4784 4479 4785 ! cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc … … 4562 4868 ! 14/01/15 AJ delta n'a rien à faire là... 4563 4869 DO il = 1, ncum ! cld 4564 IF (wa(il,i)>0.0 .AND. iflag(il)<=1) & ! cld 4870 !! IF (wa(il,i)>0.0 .AND. iflag(il)<=1) & ! cld 4871 !! siga(il, i) = mac(il, i)/(coefw_cld_cv*wa(il, i)) & ! cld 4872 !! *rrd*tvp(il, i)/p(il, i)/100. ! cld 4873 !! 4874 !! siga(il, i) = min(siga(il,i), 1.0) ! cld 4875 sigaq = 0. 4876 IF (wa(il,i)>0.0 .AND. iflag(il)<=1) THEN ! cld 4565 4877 siga(il, i) = mac(il, i)/(coefw_cld_cv*wa(il, i)) & ! cld 4566 *rrd*tvp(il, i)/p(il, i)/100. ! cld 4567 4568 siga(il, i) = min(siga(il,i), 1.0) ! cld 4878 *rrd*tvp(il, i)/p(il, i)/100. ! cld 4879 siga(il, i) = min(siga(il,i), 1.0) ! cld 4880 sigaq = siga(il,i)*qta(il,i-1) ! cld 4881 ENDIF 4569 4882 4570 4883 ! IM cf. FH … … 4578 4891 sigment(il,i)=sument(il)*tau_cld_cv/(ph(il,i)-ph(il,i+1)) ! cld 4579 4892 sigment(il, i) = min(1.e-4+sigment(il,i), 1.0 - siga(il,i)) ! cld 4580 qtc(il, i) = (siga(il,i)*qnk(il)+sigment(il,i)*qtment(il,i)) & ! cld 4893 !! qtc(il, i) = (siga(il,i)*qta(il,i-1)+sigment(il,i)*qtment(il,i)) & ! cld 4894 qtc(il, i) = (sigaq+sigment(il,i)*qtment(il,i)) & ! cld 4581 4895 /(siga(il,i)+sigment(il,i)) ! cld 4582 4896 sigt(il,i) = sigment(il, i) + siga(il, i) 4583 4897 4584 ! qtc(il, i) = siga(il,i)*q nk(il)+(1.-siga(il,i))*qtment(il,i) ! cld4898 ! qtc(il, i) = siga(il,i)*qta(il,i-1)+(1.-siga(il,i))*qtment(il,i) ! cld 4585 4899 ! print*,'BIGAUSSIAN CONV',siga(il,i),sigment(il,i),qtc(il,i) 4586 4900 … … 4871 5185 do k=1,nl 4872 5186 do i=1,ncum 4873 4874 5187 hp(i,k)=h(i,k) 5188 enddo 4875 5189 enddo 4876 5190 -
LMDZ6/trunk/libf/phylmd/cv3a_uncompress.F90
r2481 r3496 10 10 asupmaxmin, & 11 11 da, phi, mp, phi2, d1a, dam, sigij, & ! RomP+AC+jyg 12 clw, elij, evap, ep, epmlmMm, eplaMm, & ! RomP13 wdtrainA, wdtrain M, &! RomP12 qta, clw, elij, evap, ep, epmlmMm, eplaMm, & ! RomP+jyg 13 wdtrainA, wdtrainS, wdtrainM, & ! RomP 14 14 qtc, sigt, & 15 15 epmax_diag, & ! epmax_cape … … 24 24 asupmaxmin1, & 25 25 da1, phi1, mp1, phi21, d1a1, dam1, sigij1, & ! RomP+AC+jyg 26 clw1, elij1, evap1, ep1, epmlmMm1, eplaMm1, & ! RomP27 wdtrainA1, wdtrain M1, &! RomP26 qta1, clw1, elij1, evap1, ep1, epmlmMm1, eplaMm1, & ! RomP+jyg 27 wdtrainA1, wdtrainS1, wdtrainM1, & ! RomP 28 28 qtc1, sigt1, & 29 29 epmax_diag1) ! epmax_cape … … 75 75 REAL, DIMENSION (nloc, nd), INTENT (IN) :: d1a, dam !RomP 76 76 REAL, DIMENSION (nloc, nd, nd), INTENT (IN) :: sigij !RomP 77 REAL, DIMENSION (nloc, nd), INTENT (IN) :: qta !jyg 77 78 REAL, DIMENSION (nloc, nd), INTENT (IN) :: clw !RomP 78 79 REAL, DIMENSION (nloc, nd, nd), INTENT (IN) :: elij !RomP … … 81 82 REAL, DIMENSION (nloc, nd), INTENT (IN) :: eplamM !RomP+jyg 82 83 REAL, DIMENSION (nloc, nd), INTENT (IN) :: qtc, sigt !RomP 83 REAL, DIMENSION (nloc, nd), INTENT (IN) :: wdtrainA, wdtrain M !RomP84 REAL, DIMENSION (nloc, nd), INTENT (IN) :: wdtrainA, wdtrainS, wdtrainM !RomP 84 85 85 86 ! outputs: … … 111 112 REAL, DIMENSION (len, nd), INTENT (OUT) :: d1a1, dam1 !RomP !RomP 112 113 REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: sigij1 !RomP 114 REAL, DIMENSION (len, nd), INTENT (OUT) :: qta1 !jyg 113 115 REAL, DIMENSION (len, nd), INTENT (OUT) :: clw1 !RomP 114 116 REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: elij1 !RomP … … 117 119 REAL, DIMENSION (len, nd), INTENT (OUT) :: eplamM1 !RomP+jyg 118 120 REAL, DIMENSION (len, nd), INTENT (OUT) :: qtc1, sigt1 !RomP 119 REAL, DIMENSION (len, nd), INTENT (OUT) :: wdtrainA1, wdtrain M1 !RomP121 REAL, DIMENSION (len, nd), INTENT (OUT) :: wdtrainA1, wdtrainS1, wdtrainM1 !RomP 120 122 121 123 … … 175 177 d1a1(idcum(i), k) = d1a(i, k) !RomP 176 178 dam1(idcum(i), k) = dam(i, k) !RomP 179 qta1(idcum(i), k) = qta(i, k) !jyg 177 180 clw1(idcum(i), k) = clw(i, k) !RomP 178 181 evap1(idcum(i), k) = evap(i, k) !RomP … … 180 183 eplamM1(idcum(i), k) = eplamM(i, k) !RomP+jyg 181 184 wdtrainA1(idcum(i), k) = wdtrainA(i, k) !RomP 185 wdtrainS1(idcum(i), k) = wdtrainS(i, k) !RomP 182 186 wdtrainM1(idcum(i), k) = wdtrainM(i, k) !RomP 183 187 qtc1(idcum(i), k) = qtc(i, k) … … 300 304 d1a1(:, 1:nl) = d1a(:, 1:nl) !RomP 301 305 dam1(:, 1:nl) = dam(:, 1:nl) !RomP 306 qta1(:, 1:nl) = qta(:, 1:nl) !jyg 302 307 clw1(:, 1:nl) = clw(:, 1:nl) !RomP 303 308 evap1(:, 1:nl) = evap(:, 1:nl) !RomP … … 305 310 eplamM1(:, 1:nl) = eplamM(:, 1:nl) !RomP+jyg 306 311 wdtrainA1(:, 1:nl) = wdtrainA(:, 1:nl) !RomP 312 wdtrainS1(:, 1:nl) = wdtrainS(:, 1:nl) !RomP 307 313 wdtrainM1(:, 1:nl) = wdtrainM(:, 1:nl) !RomP 308 314 qtc1(:, 1:nl) = qtc(:, 1:nl) -
LMDZ6/trunk/libf/phylmd/cv3p2_closure.F90
r2502 r3496 23 23 include "cvthermo.h" 24 24 include "cv3param.h" 25 include "cvflag.h" 25 26 include "YOMCST2.h" 26 27 include "YOMCST.h" -
LMDZ6/trunk/libf/phylmd/cv3p_mixing.F90
r2905 r3496 1 1 SUBROUTINE cv3p_mixing(nloc, ncum, nd, na, ntra, icb, nk, inb, & 2 ph, t, rr, rs, u, v, tra, h, lv, lf, frac, q nk, &2 ph, t, rr, rs, u, v, tra, h, lv, lf, frac, qta, & 3 3 unk, vnk, hp, tv, tvp, ep, clw, sig, & 4 4 Ment, Qent, hent, uent, vent, nent, & … … 29 29 INTEGER, DIMENSION (nloc), INTENT (IN) :: icb, inb, nk 30 30 REAL, DIMENSION (nloc, nd), INTENT (IN) :: sig 31 REAL, DIMENSION (nloc), INTENT (IN) :: qnk, unk, vnk 31 REAL, DIMENSION (nloc), INTENT (IN) :: unk, vnk 32 REAL, DIMENSION (nloc, nd), INTENT (IN) :: qta 32 33 REAL, DIMENSION (nloc, nd+1), INTENT (IN) :: ph 33 34 REAL, DIMENSION (nloc, nd), INTENT (IN) :: t, rr, rs … … 173 174 .AND. (j<=inb(il))) THEN 174 175 175 rti = qnk(il) - ep(il, i)*clw(il, i) 176 !! rti = qnk(il) - ep(il, i)*clw(il, i) 177 rti = qta(il,i-1) - ep(il, i)*clw(il, i) 176 178 bf2 = 1. + lv(il, j)*lv(il, j)*rs(il, j)/(rrv*t(il,j)*t(il,j)*cpd) 177 179 !jyg(from aj)< … … 219 221 Sij(il, i, j) = amax1(0.0, Sij(il,i,j)) 220 222 Sij(il, i, j) = amin1(1.0, Sij(il,i,j)) 223 ELSE IF (j > i) THEN 224 IF (prt_level >= 10) THEN 225 print *,'cv3p_mixing i, j, Sij given by the no-precip eq. ', i, j, Sij(il,i,j) 226 ENDIF 221 227 END IF ! new 222 228 END DO … … 248 254 !!! Ment(il,i,i)=m(il,i) 249 255 Ment(il, i, i) = 1. 250 Qent(il, i, i) = qnk(il) - ep(il, i)*clw(il, i) 256 !! Qent(il, i, i) = qnk(il) - ep(il, i)*clw(il, i) 257 Qent(il, i, i) = qta(il,i-1) - ep(il, i)*clw(il, i) 251 258 uent(il, i, i) = unk(il) 252 259 vent(il, i, i) = vnk(il) … … 332 339 IF (i>=icb(il) .AND. i<=inb(il)) THEN 333 340 lwork(il) = (nent(il,i)/=0) 334 rti = qnk(il) - ep(il, i)*clw(il, i) 341 !! rti = qnk(il) - ep(il, i)*clw(il, i) 342 rti = qta(il,i-1) - ep(il, i)*clw(il, i) 335 343 !jyg< 336 344 IF (cvflag_ice) THEN … … 462 470 lwork(il)) THEN 463 471 IF (Sij(il,i,j)>0.0) THEN 464 rti = qnk(il) - ep(il, i)*clw(il, i) 472 !! rti = qnk(il) - ep(il, i)*clw(il, i) 473 rti = qta(il,i-1) - ep(il, i)*clw(il, i) 465 474 Qmixmax(il) = Qmix(Sjmax(il)) 466 475 Qmixmin(il) = Qmix(Sjmin(il)) … … 590 599 lwork(il)) THEN 591 600 IF (Sij(il,i,j)>0.0) THEN 592 rti = qnk(il) - ep(il, i)*clw(il, i) 601 !! rti = qnk(il) - ep(il, i)*clw(il, i) 602 rti = qta(il,i-1) - ep(il, i)*clw(il, i) 593 603 !!! Ment(il,i,i) = m(il,i)*abs(Qmixmax(il)*(1.-Sjmax(il)) 594 604 Ment(il, i, i) = abs(Qmixmax(il)*(1.-Sjmax(il))+Rmixmax(il) - & … … 659 669 ! cc Ment(il,i,i)=m(il,i) 660 670 Ment(il, i, i) = 1. 661 Qent(il, i, i) = qnk(il) - ep(il, i)*clw(il, i) 671 !! Qent(il, i, i) = qnk(il) - ep(il, i)*clw(il, i) 672 Qent(il, i, i) = qta(il,i-1) - ep(il, i)*clw(il, i) 662 673 uent(il, i, i) = unk(il) 663 674 vent(il, i, i) = vnk(il) -
LMDZ6/trunk/libf/phylmd/cv3param.h
r3492 r3496 7 7 !------------------------------------------------------------ 8 8 9 logical ok_homo_tend 10 logical ok_optim_yield 11 logical ok_entrain 12 logical ok_convstop 13 logical ok_intermittent 14 logical qsat_depends_on_qt 9 integer flag_epKEorig, flag_wb 10 integer cv_flag_feed 15 11 integer noff, minorig, nl, nlp, nlm 16 integer cv_flag_feed17 integer flag_epKEorig,flag_wb18 12 real sigdz, spfac 19 13 real pbcrit, ptcrit … … 28 22 real delta 29 23 real betad 24 real ejectliq 25 real ejectice 30 26 31 27 COMMON /cv3param/ sigdz, spfac & … … 40 36 ,wbmax & 41 37 ,delta, betad & 38 ,ejectliq, ejectice & 42 39 ,flag_epKEorig & 43 40 ,flag_wb, cv_flag_feed & 44 ,noff, minorig, nl, nlp, nlm & 45 ,ok_convstop, ok_intermittent & 46 ,ok_optim_yield & 47 ,ok_entrain & 48 ,ok_homo_tend & 49 ,qsat_depends_on_qt 41 ,noff, minorig, nl, nlp, nlm 50 42 !$OMP THREADPRIVATE(/cv3param/) 51 43 -
LMDZ6/trunk/libf/phylmd/cva_driver.F90
r3435 r3496 25 25 !! elij1,evap1,ep1,epmlmMm1,eplaMm1, & ! RomP 26 26 da1, phi1, mp1, phi21, d1a1, dam1, sigij1, wghti1, & ! RomP, RL 27 clw1, elij1, evap1, ep1, epmlmMm1, eplaMm1, &! RomP, RL28 wdtrainA1, wdtrain M1, qtc1, sigt1, tau_cld_cv, &27 qta1, clw1, elij1, evap1, ep1, epmlmMm1, eplaMm1, & ! RomP, RL 28 wdtrainA1, wdtrainS1, wdtrainM1, qtc1, sigt1, tau_cld_cv, & !!jygprl 29 29 coefw_cld_cv, & ! RomP, AJ 30 30 epmax_diag1) ! epmax_cape … … 124 124 ! of dimension ND, defined at same grid levels as T, Q, QS and P. 125 125 126 ! wdtrainA1 Real Output precipitation detrained from adiabatic draught; 126 ! wdtrainA1 Real Output precipitation ejected from adiabatic draught; 127 ! should be used in tracer transport (cvltr) 128 ! wdtrainS1 Real Output precipitation detrained from shedding of adiabatic draught; 127 129 ! used in tracer transport (cvltr) 128 130 ! wdtrainM1 Real Output precipitation detrained from mixed draughts; … … 248 250 249 251 ! RomP >>> 250 REAL, DIMENSION (len, nd), INTENT (OUT) :: wdtrainA1, wdtrain M1 ! precipitation sources (extensive)252 REAL, DIMENSION (len, nd), INTENT (OUT) :: wdtrainA1, wdtrainS1, wdtrainM1 ! precipitation sources (extensive) 251 253 REAL, DIMENSION (len, nd), INTENT (OUT) :: mp1 ! unsat. mass flux (staggered grid) 252 254 REAL, DIMENSION (len, nd), INTENT (OUT) :: da1 ! detrained mass flux of adiab. asc. air (extensive) … … 258 260 REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: sigij1 ! mass fraction of env. air in mixed draughts (intensive) 259 261 REAL, DIMENSION (len, nd, nd), INTENT (OUT) :: elij1! cond. water per unit mass of mixed draughts (intensive) 262 REAL, DIMENSION (len, nd), INTENT (OUT) :: qta1 ! total water per unit mass of the adiab. asc. (intensive) 260 263 REAL, DIMENSION (len, nd), INTENT (OUT) :: clw1 ! cond. water per unit mass of the adiab. asc. (intensive) 261 264 !JYG,RL … … 467 470 REAL tv_wake(nloc, nd) 468 471 REAL clw(nloc, nd) 472 REAL, DIMENSION(nloc, nd) :: qta, qpreca !!jygprl 469 473 REAL dph(nloc, nd) 470 474 REAL pbase(nloc), buoybase(nloc), th(nloc, nd) … … 477 481 REAL cin(nloc) 478 482 REAL m(nloc, nd) 483 REAL mm(nloc, nd) 479 484 REAL ment(nloc, nd, nd), sigij(nloc, nd, nd) 480 485 REAL qent(nloc, nd, nd) … … 494 499 REAL, DIMENSION(len,nd) :: wt, water, evap 495 500 REAL, DIMENSION(len,nd) :: ice, fondue, b 496 REAL, DIMENSION(len,nd) :: frac , faci501 REAL, DIMENSION(len,nd) :: frac_a, frac_s, faci !!jygprl 497 502 REAL ft(nloc, nd), fq(nloc, nd) 498 503 REAL ftd(nloc, nd), fqd(nloc, nd) … … 523 528 524 529 ! RomP >>> 525 REAL wdtrainA(nloc, nd), wdtrain M(nloc, nd)530 REAL wdtrainA(nloc, nd), wdtrainS(nloc, nd), wdtrainM(nloc, nd) !!jygprl 526 531 REAL da(len, nd), phi(len, nd, nd) 527 532 REAL epmlmMm(nloc, nd, nd), eplaMm(nloc, nd) … … 615 620 tvp(:, :) = 0. !ym missing init, need to have a look by developpers 616 621 tv(:, :) = 0. !ym missing init, need to have a look by developpers 617 622 618 623 DO il = 1, len 619 624 cin1(il) = -100000. … … 636 641 qtc1(:, :) = 0. 637 642 wdtrainA1(:, :) = 0. 643 wdtrainS1(:, :) = 0. 638 644 wdtrainM1(:, :) = 0. 639 645 da1(:, :) = 0. … … 646 652 sigij1(:, :, :) = 0. 647 653 elij1(:, :, :) = 0. 654 qta1(:,:) = 0. 648 655 clw1(:,:) = 0. 649 656 wghti1(:,:) = 0. … … 906 913 p, ph, h, tv, lv, lf, pbase, buoybase, plcl, & 907 914 inb, tp, tvp, clw, hp, ep, sigp, buoy, & 908 frac )915 frac_a, frac_s, qpreca, qta) !!jygprl 909 916 END IF 910 917 … … 915 922 tnk, qnk, gznk, t, q, qs, gz, & 916 923 p, dph, h, tv, lv, & 917 inb, inbis, tp, tvp, clw, hp, ep, sigp, frac )924 inb, inbis, tp, tvp, clw, hp, ep, sigp, frac_s) 918 925 END IF 919 926 … … 923 930 PRINT *, 'cva_driver -> cv3_epmax_cape' 924 931 call cv3_epmax_fn_cape(nloc,ncum,nd & 925 , ep,hp,icb,inb,clw,nk,t,h,hnk,lv,lf,frac &932 , ep,hp,icb,inb,clw,nk,t,h,hnk,lv,lf,frac_s & 926 933 , pbase, p, ph, tv, buoy, sig, w0,iflag & 927 934 , epmax_diag) … … 941 948 PRINT *, 'cva_driver -> cv3p_mixing' 942 949 CALL cv3p_mixing(nloc, ncum, nd, nd, ntra, icb, nk, inb, & ! na->nd 943 ph, t, q, qs, u, v, tra, h, lv, lf, frac, qnk, & 950 !! ph, t, q, qs, u, v, tra, h, lv, lf, frac, qnk, & 951 ph, t, q, qs, u, v, tra, h, lv, lf, frac_s, qta, & !!jygprl 944 952 unk, vnk, hp, tv, tvp, ep, clw, sig, & 945 953 ment, qent, hent, uent, vent, nent, & … … 1021 1029 PRINT *, 'cva_driver -> cv3_mixing' 1022 1030 CALL cv3_mixing(nloc, ncum, nd, nd, ntra, icb, nk, inb, & ! na->nd 1023 ph, t, q, qs, u, v, tra, h, lv, lf, frac , qnk, &1031 ph, t, q, qs, u, v, tra, h, lv, lf, frac_s, qnk, & 1024 1032 unk, vnk, hp, tv, tvp, ep, clw, m, sig, & 1025 1033 ment, qent, uent, vent, nent, sigij, elij, ments, qents, traent) 1026 1034 CALL zilch(hent, nloc*nd*nd) 1027 1035 ELSE 1028 CALL cv3_mixscale(nloc, ncum, nd, ment, m) 1036 !!jyg: Essais absurde pour voir 1037 !! mm(:,1) = 0. 1038 !! DO i = 2,nd 1039 !! mm(:,i) = m(:,i)*(1.-qta(:,i-1)) 1040 !! ENDDO 1041 mm(:,:) = m(:,:) 1042 CALL cv3_mixscale(nloc, ncum, nd, ment, mm) 1029 1043 IF (debut) THEN 1030 1044 PRINT *, ' cv3_mixscale-> ' … … 1062 1076 t_wake, q_wake, qs_wake, gz, u, v, tra, p, ph, & 1063 1077 th_wake, tv_wake, lv_wake, lf_wake, cpn_wake, & 1064 ep, sigp, clw, &1078 ep, sigp, clw, frac_s, qpreca, frac_a, qta, & !!jygprl 1065 1079 m, ment, elij, delt, plcl, coef_clos, & 1066 1080 mp, qp, up, vp, trap, wt, water, evap, fondue, ice, & 1067 1081 faci, b, sigd, & 1068 wdtrainA, wdtrainM) ! RomP 1082 !! wdtrainA, wdtrainM) ! RomP 1083 wdtrainA, wdtrainS, wdtrainM) !!jygprl 1069 1084 ! 1070 1085 IF (prt_level >= 10) THEN … … 1075 1090 evap(igout,k), fondue(igout,k) 1076 1091 ENDDO 1077 Print *, 'cva_driver after cv3_unsat: wdtrainA, wdtrain M '1092 Print *, 'cva_driver after cv3_unsat: wdtrainA, wdtrainS, wdtrainM ' !!jygprl 1078 1093 DO k = 1,nd 1079 write (6, '(i4, 2(1x,e13.6))'), &1080 k, wdtrainA(igout,k), wdtrain M(igout,k)1094 write (6, '(i4,3(1x,e13.6))'), & 1095 k, wdtrainA(igout,k), wdtrainS(igout,k), wdtrainM(igout,k) !!jygprl 1081 1096 ENDDO 1082 1097 ENDIF … … 1112 1127 t, q, t_wake, q_wake, s_wake, u, v, tra, & 1113 1128 gz, p, ph, h, hp, lv, lf, cpn, th, th_wake, & 1114 ep, clw, m, tp, mp, qp, up, vp, trap, &1129 ep, clw, qpreca, m, tp, mp, qp, up, vp, trap, & 1115 1130 wt, water, ice, evap, fondue, faci, b, sigd, & 1116 1131 ment, qent, hent, iflag_mix, uent, vent, & … … 1121 1136 !! tls, tps, & ! useless . jyg 1122 1137 qcondc, wd, & 1123 ftd, fqd, qnk, qtc, sigt, tau_cld_cv, coefw_cld_cv) 1138 !! ftd, fqd, qnk, qtc, sigt, tau_cld_cv, coefw_cld_cv) 1139 ftd, fqd, qta, qtc, sigt, tau_cld_cv, coefw_cld_cv) !!jygprl 1140 ! 1141 ! Test conseravtion de l'eau 1124 1142 ! 1125 1143 IF (debut) THEN … … 1142 1160 t, q, u, v, & 1143 1161 gz, p, ph, h, hp, lv, cpn, & 1144 ep, clw, frac , m, mp, qp, up, vp, &1162 ep, clw, frac_s, m, mp, qp, up, vp, & 1145 1163 wt, water, evap, & 1146 1164 ment, qent, uent, vent, nent, elij, & … … 1187 1205 asupmaxmin, & 1188 1206 da, phi, mp, phi2, d1a, dam, sigij, & ! RomP 1189 clw, elij, evap, ep, epmlmMm, eplaMm, &! RomP1190 wdtrainA, wdtrain M, & ! RomP1207 qta, clw, elij, evap, ep, epmlmMm, eplaMm, & ! RomP 1208 wdtrainA, wdtrainS, wdtrainM, & ! RomP 1191 1209 qtc, sigt, epmax_diag, & ! epmax_cape 1192 1210 iflag1, kbas1, ktop1, & … … 1199 1217 Plim11, plim21, asupmax1, supmax01, & 1200 1218 asupmaxmin1, & 1201 da1, phi1, mp1, phi21, d1a1, dam1, sigij1, & ! RomP1202 clw1, elij1, evap1, ep1, epmlmMm1, eplaMm1, & ! RomP1203 wdtrainA1, wdtrain M1,& ! RomP1219 da1, phi1, mp1, phi21, d1a1, dam1, sigij1, & ! RomP 1220 qta1, clw1, elij1, evap1, ep1, epmlmMm1, eplaMm1, & ! RomP 1221 wdtrainA1, wdtrainS1, wdtrainM1, & ! RomP 1204 1222 qtc1, sigt1, epmax_diag1) ! epmax_cape 1205 1223 ! -
LMDZ6/trunk/libf/phylmd/cvflag.h
r3492 r3496 4 4 logical cvflag_grav 5 5 logical cvflag_ice 6 logical ok_optim_yield 7 logical ok_entrain 8 logical ok_homo_tend 9 logical ok_convstop 10 logical ok_intermittent 11 logical cvflag_prec_eject 12 logical qsat_depends_on_qt 13 logical adiab_ascent_mass_flux_depends_on_ejectliq 6 14 integer icvflag_Tpa 7 15 8 COMMON /cvflag/ icvflag_Tpa, cvflag_grav, cvflag_ice 16 COMMON /cvflag/ icvflag_Tpa, & 17 cvflag_grav, cvflag_ice, & 18 ok_optim_yield, & 19 ok_entrain, & 20 ok_homo_tend, & 21 ok_convstop, ok_intermittent, & 22 cvflag_prec_eject, & 23 qsat_depends_on_qt, & 24 adiab_ascent_mass_flux_depends_on_ejectliq 9 25 !$OMP THREADPRIVATE(/cvflag/) -
LMDZ6/trunk/libf/phylmd/phys_local_var_mod.F90
r3489 r3496 416 416 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: pmflxr, pmflxs 417 417 !$OMP THREADPRIVATE(pmflxr, pmflxs) 418 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: wdtrainA, wdtrain M419 !$OMP THREADPRIVATE(wdtrainA, wdtrain M)418 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: wdtrainA, wdtrainS, wdtrainM 419 !$OMP THREADPRIVATE(wdtrainA, wdtrainS, wdtrainM) 420 420 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: da, mp 421 421 !$OMP THREADPRIVATE(da, mp) … … 428 428 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: ev 429 429 !$OMP THREADPRIVATE(ev) 430 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: qtaa 431 !$OMP THREADPRIVATE(qtaa) 430 432 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: clw 431 433 !$OMP THREADPRIVATE(clw) … … 791 793 ! Deep convective variables used in phytrac 792 794 ALLOCATE(pmflxr(klon, klev+1), pmflxs(klon, klev+1)) 793 ALLOCATE(wdtrainA(klon,klev),wdtrain M(klon,klev))795 ALLOCATE(wdtrainA(klon,klev),wdtrainS(klon,klev),wdtrainM(klon,klev)) 794 796 ALLOCATE(dnwd(klon, klev), upwd(klon, klev) ) 795 797 ALLOCATE(ep(klon,klev)) ! epmax_cape … … 801 803 ALLOCATE(ev(klon,klev) ) 802 804 ALLOCATE(elij(klon,klev,klev) ) 805 ALLOCATE(qtaa(klon,klev) ) 803 806 ALLOCATE(clw(klon,klev) ) 804 807 ALLOCATE(epmlmMm(klon,klev,klev), eplaMm(klon,klev) ) … … 1082 1085 1083 1086 DEALLOCATE(pmflxr, pmflxs) 1084 DEALLOCATE(wdtrainA, wdtrain M)1087 DEALLOCATE(wdtrainA, wdtrainS, wdtrainM) 1085 1088 DEALLOCATE(upwd, dnwd) 1086 1089 DEALLOCATE(ep) … … 1092 1095 DEALLOCATE(ev ) 1093 1096 DEALLOCATE(elij ) 1097 DEALLOCATE(qtaa ) 1094 1098 DEALLOCATE(clw ) 1095 1099 DEALLOCATE(epmlmMm, eplaMm ) -
LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90
r3486 r3496 1526 1526 TYPE(ctrl_out), SAVE :: o_clwcon = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 1527 1527 'clwcon', 'Convective Cloud Liquid water content', 'kg/kg', (/ ('', i=1, 10) /)) 1528 TYPE(ctrl_out), SAVE :: o_Mipsh = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 1529 'Mipsh', 'mass flux shed from adiab. ascents', 'kg/m2/s', (/ ('', i=1, 10) /)) 1528 1530 TYPE(ctrl_out), SAVE :: o_Ma = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 1529 'Ma', 'undilute adiab updraft ', 'kg/m2/s', (/ ('', i=1, 10) /))1531 'Ma', 'undilute adiab updraft mass flux', 'kg/m2/s', (/ ('', i=1, 10) /)) 1530 1532 TYPE(ctrl_out), SAVE :: o_dnwd = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 1531 1533 'dnwd', 'saturated downdraft', 'kg/m2/s', (/ ('', i=1, 10) /)) … … 1591 1593 TYPE(ctrl_out), SAVE :: o_wdtrainA = ctrl_out((/ 4, 5, 10, 4, 10, 10, 11, 11, 11, 11 /), & 1592 1594 'wdtrainA', 'precipitation from AA', '-', (/ ('', i=1, 10) /)) 1595 TYPE(ctrl_out), SAVE :: o_wdtrainS = ctrl_out((/ 4, 5, 10, 4, 10, 10, 11, 11, 11, 11 /), & 1596 'wdtrainS', 'precipitation from shedding of AA', '-', (/ ('', i=1, 10) /)) 1593 1597 TYPE(ctrl_out), SAVE :: o_wdtrainM = ctrl_out((/ 4, 5, 10, 4, 10, 10, 11, 11, 11, 11 /), & 1594 1598 'wdtrainM', 'precipitation from mixture', '-', (/ ('', i=1, 10) /)) 1595 1599 TYPE(ctrl_out), SAVE :: o_Vprecip = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 1596 1600 'Vprecip', 'precipitation vertical profile', '-', (/ ('', i=1, 10) /)) 1601 TYPE(ctrl_out), SAVE :: o_qtaa = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 1602 'qtaa', 'specific total water in adiabatic ascents', 'kg/kg', (/ ('', i=1, 10) /)) 1603 TYPE(ctrl_out), SAVE :: o_clwaa = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 1604 'Clwaa', 'specific condensed water in adiabatic ascents', 'kg/kg', (/ ('', i=1, 10) /)) 1597 1605 TYPE(ctrl_out), SAVE :: o_ftd = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), & 1598 1606 'ftd', 'tend temp due aux descentes precip', '-', (/ ('', i=1, 10) /)) -
LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90
r3489 r3496 73 73 o_uwat, o_vwat, & 74 74 o_ptop, o_fbase, o_plcl, o_plfc, & 75 o_wbeff, o_convoccur, o_cape_max, o_upwd, o_ep,o_epmax_diag, o_Ma, & 75 o_wbeff, o_convoccur, o_cape_max, o_upwd, o_ep,o_epmax_diag, & 76 o_Mipsh, o_Ma, & 76 77 o_dnwd, o_dnwd0, o_ftime_deepcv, o_ftime_con, o_mc, & 77 78 o_prw, o_prlw, o_prsw, o_s_pblh, o_s_pblt, o_s_lcl, & … … 88 89 o_wake_s, o_wake_deltat, o_wake_deltaq, & 89 90 o_wake_omg, o_dtwak, o_dqwak, o_dqwak2d, o_Vprecip, & 90 o_ftd, o_fqd, o_wdtrainA, o_wdtrainM, & 91 o_qtaa, o_Clwaa, & 92 o_ftd, o_fqd, o_wdtrainA, o_wdtrainS, o_wdtrainM, & 91 93 o_n2, o_s2, o_proba_notrig, & 92 94 o_random_notrig, o_ale_bl_stat, & … … 232 234 delta_tsurf, & 233 235 wstar, cape, ema_pcb, ema_pct, & 234 ema_cbmf, M a, fm_therm, ale_bl, alp_bl, ale, &236 ema_cbmf, Mipsh, Ma, fm_therm, ale_bl, alp_bl, ale, & 235 237 alp, cin, wake_pe, wake_dens, wake_s, wake_deltat, & 236 238 wake_deltaq, ftd, fqd, ale_bl_trig, albsol1, & … … 273 275 kh ,kh_x ,kh_w , & 274 276 cv_gen, wake_h, & 275 wake_omg, d_t_wake, d_q_wake, Vprecip, &276 wdtrainA, wdtrain M, n2, s2, proba_notrig, &277 wake_omg, d_t_wake, d_q_wake, Vprecip, qtaa, Clw, & 278 wdtrainA, wdtrainS, wdtrainM, n2, s2, proba_notrig, & 277 279 random_notrig, & 278 280 alp_bl_det, alp_bl_fluct_m, alp_bl_conv, & … … 1058 1060 1059 1061 CALL histwrite_phy(o_upwd, upwd) 1062 CALL histwrite_phy(o_Mipsh, Mipsh) 1060 1063 CALL histwrite_phy(o_Ma, Ma) 1061 1064 CALL histwrite_phy(o_dnwd, dnwd) … … 1242 1245 ! etendue a iflag_con=3 (jyg) 1243 1246 CALL histwrite_phy(o_Vprecip, Vprecip) 1247 CALL histwrite_phy(o_qtaa, qtaa) 1248 CALL histwrite_phy(o_clwaa, clw) 1244 1249 CALL histwrite_phy(o_wdtrainA, wdtrainA) 1250 CALL histwrite_phy(o_wdtrainS, wdtrainS) 1245 1251 CALL histwrite_phy(o_wdtrainM, wdtrainM) 1246 1252 ENDIF !(iflag_con.EQ.3.or.iflag_con.EQ.30) -
LMDZ6/trunk/libf/phylmd/phys_state_var_mod.F90
r3479 r3496 202 202 REAL,ALLOCATABLE,SAVE :: ema_pcb(:), ema_pct(:) 203 203 !$OMP THREADPRIVATE(ema_pcb,ema_pct) 204 REAL,ALLOCATABLE,SAVE :: Ma(:,:) ! undilute upward mass flux 204 REAL,ALLOCATABLE,SAVE :: Mipsh(:,:) ! mass flux shed from adiab. ascents 205 !$OMP THREADPRIVATE(Mipsh) 206 REAL,ALLOCATABLE,SAVE :: Ma(:,:) ! undilute upward mass flux 205 207 !$OMP THREADPRIVATE(Ma) 206 208 REAL,ALLOCATABLE,SAVE :: qcondc(:,:) ! in-cld water content from convect … … 541 543 ALLOCATE(ema_pcb(klon), ema_pct(klon)) 542 544 ! 545 ALLOCATE(Mipsh(klon,klev)) 543 546 ALLOCATE(Ma(klon,klev)) 544 547 ALLOCATE(qcondc(klon,klev)) … … 699 702 deallocate(ema_cbmf) 700 703 deallocate(ema_pcb, ema_pct) 701 deallocate(M a, qcondc)704 deallocate(Mipsh, Ma, qcondc) 702 705 deallocate(wd, sigd) 703 706 deallocate(cin, ALE, ALP) -
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r3491 r3496 172 172 ! Deep convective variables used in phytrac 173 173 pmflxr, pmflxs, & 174 wdtrainA, wdtrain M, &174 wdtrainA, wdtrainS, wdtrainM, & 175 175 upwd, dnwd, & 176 176 ep, & … … 182 182 ev, & 183 183 elij, & 184 qtaa, & 184 185 clw, & 185 186 epmlmMm, eplaMm, & … … 559 560 ! Variables li\'ees \`a la poche froide (jyg) 560 561 561 REAL mip(klon,klev) ! mass flux shed by the adiab ascent at each level 562 !! REAL mipsh(klon,klev) ! mass flux shed by the adiab ascent at each level 563 !! Moved to phys_state_var_mod 562 564 ! 563 565 REAL wape_prescr, fip_prescr … … 2629 2631 pmflxs(:,:) = 0. 2630 2632 wdtrainA(:,:) = 0. 2633 wdtrainS(:,:) = 0. 2631 2634 wdtrainM(:,:) = 0. 2632 2635 upwd(:,:) = 0. … … 2644 2647 elij(:,:,:)=0. 2645 2648 ev(:,:)=0. 2649 qtaa(:,:)=0. 2646 2650 clw(:,:)=0. 2647 2651 sij(:,:,:)=0. … … 2780 2784 rain_con, snow_con, ibas_con, itop_con, sigd, & 2781 2785 ema_cbmf,plcl,plfc,wbeff,convoccur,upwd,dnwd,dnwd0, & 2782 Ma,mip ,Vprecip,cape,cin,tvp,Tconv,iflagctrl, &2786 Ma,mipsh,Vprecip,cape,cin,tvp,Tconv,iflagctrl, & 2783 2787 pbase,bbase,dtvpdt1,dtvpdq1,dplcldt,dplcldr,qcondc,wd, & 2784 2788 ! RomP >>> 2785 2789 !! . pmflxr,pmflxs,da,phi,mp, 2786 2790 !! . ftd,fqd,lalim_conv,wght_th) 2787 pmflxr,pmflxs,da,phi,mp,phi2,d1a,dam,sij, clw,elij, &2791 pmflxr,pmflxs,da,phi,mp,phi2,d1a,dam,sij,qtaa,clw,elij, & 2788 2792 ftd,fqd,lalim_conv,wght_th, & 2789 2793 ev, ep,epmlmMm,eplaMm, & 2790 wdtrainA, wdtrainM,wght_cvfd,qtc_cv,sigt_cv, &2794 wdtrainA, wdtrainS, wdtrainM,wght_cvfd,qtc_cv,sigt_cv, & 2791 2795 tau_cld_cv,coefw_cld_cv,epmax_diag) 2792 2796
Note: See TracChangeset
for help on using the changeset viewer.