Changeset 5158 for LMDZ6/branches/Amaury_dev/libf/phylmdiso/lmdz_cv30.F90
- Timestamp:
- Aug 2, 2024, 2:12:03 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmdiso/lmdz_cv30.F90
r5141 r5158 5 5 ! Parameters for convectL, iflag_con=30: 6 6 ! (includes - microphysical parameters, 7 ! 7 ! - parameters that control the rate of approach 8 8 ! to quasi-equilibrium) 9 ! 9 ! - noff & minorig (previously in input of convect1) 10 10 !------------------------------------------------------------ 11 11 … … 322 322 qsnk(i) = qs(i, nk(i)) 323 323 #ifdef ISO 324 doixt=1,ntraciso324 DO ixt=1,ntraciso 325 325 xtnk(ixt,i) = xt(ixt,i, nk(i)) 326 326 enddo … … 531 531 clw(i, k) = 0.0 ! convect3 532 532 #ifdef ISO 533 doixt=1,ntraciso533 DO ixt=1,ntraciso 534 534 xtclw(ixt,i,k) = 0.0 535 535 enddo … … 626 626 #ifdef ISO 627 627 ! calcul de zfice 628 doi=1,len628 DO i=1,len 629 629 zfice(i) = 1.0-(t(i,icbs(i))-pxtice)/(pxtmelt-pxtice) 630 630 zfice(i) = MIN(MAX(zfice(i),0.0),1.0) … … 632 632 ! calcul de la composition du condensat glace et liquide 633 633 634 doi=1,len634 DO i=1,len 635 635 clw_k(i)=clw(i,icbs(i)) 636 636 tg_k(i)=t(i,icbs(i)) 637 doixt=1,ntraciso637 DO ixt=1,ntraciso 638 638 xt_k(ixt,i)=xt(ixt,i,nk(i)) 639 639 enddo … … 642 642 WRITE(*,*) 'cv30_routine undilute1 573: avant condiso' 643 643 WRITE(*,*) 't(1,1)=',t(1,1) 644 doi=1,len644 DO i=1,len 645 645 CALL iso_verif_positif(t(i,icbs(i))-Tmin_verif, & 646 646 'cv30_routines 654') 647 647 enddo 648 648 IF (iso_HDO.gt.0) THEN 649 doi=1,len649 DO i=1,len 650 650 IF (qnk(i).gt.ridicule) THEN 651 651 CALL iso_verif_aberrant(xt_k(iso_hdo,i)/qnk(i), & … … 667 667 zfice(1),zxtice(1,1),zxtliq(1,1),len) 668 668 #endif 669 doi=1,len670 do ixt = 1, ntraciso669 DO i=1,len 670 DO ixt = 1, ntraciso 671 671 xtclw(ixt,i,icbs(i))= zxtice(ixt,i)+zxtliq(ixt,i) 672 672 xtclw(ixt,i,icbs(i))=max(0.0,xtclw(ixt,i,icbs(i))) … … 678 678 679 679 IF (iso_eau.gt.0) THEN 680 doi=1,len680 DO i=1,len 681 681 CALL iso_verif_egalite_choix(xtclw(iso_eau,i,icbs(i)), & 682 682 clw(i,icbs(i)),'cv30_routines 577',errmax,errmaxrel) … … 684 684 endif !if (iso_eau.gt.0) THEN 685 685 #ifdef ISOTRAC 686 doi=1,len686 DO i=1,len 687 687 CALL iso_verif_traceur(xtclw(1,i,k),'cv30_routines 603') 688 688 enddo … … 796 796 797 797 #ifdef ISO 798 doi=1,len798 DO i=1,len 799 799 zfice(i) = 1.0-(t(i,icb(i)+1)-pxtice)/(pxtmelt-pxtice) 800 800 zfice(i) = MIN(MAX(zfice(i),0.0),1.0) 801 801 ! CALL calcul_zfice(tp(i,icb(i)+1),zfice) 802 802 enddo !do i=1,len 803 doi=1,len803 DO i=1,len 804 804 clw_k(i)=clw(i,icb(i)+1) 805 805 tg_k(i)=t(i,icb(i)+1) … … 807 807 CALL iso_verif_positif(tg_k(i)-Tmin_verif,'cv30_routines 750') 808 808 #endif 809 doixt=1,ntraciso809 DO ixt=1,ntraciso 810 810 xt_k(ixt,i)=xt(ixt,i,nk(i)) 811 811 enddo … … 814 814 WRITE(*,*) 'cv30_routines 739: avant condiso' 815 815 IF (iso_HDO.gt.0) THEN 816 doi=1,len816 DO i=1,len 817 817 CALL iso_verif_aberrant(xt_k(iso_hdo,i)/qnk(i), & 818 818 'cv30_routines 725') … … 820 820 endif !if (iso_HDO.gt.0) THEN 821 821 #ifdef ISOTRAC 822 doi=1,len822 DO i=1,len 823 823 CALL iso_verif_traceur(xtclw(1,i,k),'cv30_routines 738') 824 824 enddo … … 833 833 zfice(1),zxtice(1,1),zxtliq(1,1),len) 834 834 #endif 835 doi=1,len836 doixt = 1, ntraciso835 DO i=1,len 836 DO ixt = 1, ntraciso 837 837 xtclw(ixt,i,icb(i)+1)=zxtice(ixt,i)+zxtliq(ixt,i) 838 838 xtclw(ixt,i,icb(i)+1)=max(0.0,xtclw(ixt,i,icb(i)+1)) … … 842 842 #ifdef ISOVERIF 843 843 !WRITE(*,*) 'DEBUG ISO B' 844 doi=1,len844 DO i=1,len 845 845 IF (iso_eau.gt.0) THEN 846 846 CALL iso_verif_egalite_choix(xtclw(iso_eau,i,icb(i)+1), & … … 1036 1036 #ifdef ISO 1037 1037 ! initialisation des champs compresses: 1038 dok=1,nd1039 doi=1,nloc1038 DO k=1,nd 1039 DO i=1,nloc 1040 1040 IF (essai_convergence) THEN 1041 1041 else … … 1044 1044 ! convergence 1045 1045 endif !f (negation(essai_convergence)) THEN 1046 doixt=1,ntraciso1046 DO ixt=1,ntraciso 1047 1047 xt(ixt,i,k)=0.0 1048 1048 xtclw(ixt,i,k)=0.0 … … 1077 1077 th(nn, k) = th1(i, k) 1078 1078 #ifdef ISO 1079 doixt = 1, ntraciso1079 DO ixt = 1, ntraciso 1080 1080 xt(ixt,nn,k)=xt1(ixt,i,k) 1081 1081 xtclw(ixt,nn,k)=xtclw1(ixt,i,k) … … 1121 1121 iflag(nn) = iflag1(i) 1122 1122 #ifdef ISO 1123 doixt=1,ntraciso1123 DO ixt=1,ntraciso 1124 1124 xtnk(ixt,nn) = xtnk1(ixt,i) 1125 1125 enddo … … 1131 1131 #ifdef ISOVERIF 1132 1132 IF (iso_eau.gt.0) THEN 1133 dok = 1, nd1134 do i = 1, nloc1133 DO k = 1, nd 1134 DO i = 1, nloc 1135 1135 !WRITE(*,*) 'i,k=',i,k 1136 1136 CALL iso_verif_egalite_choix(xtclw(iso_eau,i,k),clw(i,k), & … … 1141 1141 enddo 1142 1142 endif !if (iso_eau.gt.0) THEN 1143 dok = 1, nd1144 doi = 1, nn1143 DO k = 1, nd 1144 DO i = 1, nn 1145 1145 CALL iso_verif_positif(q(i,k),'compress 1004') 1146 1146 enddo … … 1272 1272 DO k = minorig + 1, nl 1273 1273 DO i = 1, ncum 1274 ! ori 1274 ! ori IF(k.ge.(icb(i)+1))THEN 1275 1275 IF (k>=(icbs(i)+1)) THEN ! convect3 1276 1276 tg = t(i, k) 1277 1277 qg = qs(i, k) 1278 ! debug 1278 ! debug alv=lv0-clmcpv*(t(i,k)-t0) 1279 1279 alv = lv0 - clmcpv*(t(i,k)-273.15) 1280 1280 1281 1281 ! First iteration. 1282 1282 1283 ! ori 1283 ! ori s=cpd+alv*alv*qg/(rrv*t(i,k)*t(i,k)) 1284 1284 s = cpd*(1.-qnk(i)) + cl*qnk(i) & ! convect3 1285 1285 +alv*alv*qg/(rrv*t(i,k)*t(i,k)) ! convect3 1286 1286 s = 1./s 1287 ! ori 1287 ! ori ahg=cpd*tg+(cl-cpd)*qnk(i)*t(i,k)+alv*qg+gz(i,k) 1288 1288 ahg = cpd*tg + (cl-cpd)*qnk(i)*tg + alv*qg + gz(i, k) ! convect3 1289 1289 tg = tg + s*(ah0(i)-ahg) 1290 ! ori 1291 ! debug 1290 ! ori tg=max(tg,35.0) 1291 ! debug tc=tg-t0 1292 1292 tc = tg - 273.15 1293 1293 denom = 243.5 + tc 1294 1294 denom = max(denom, 1.0) ! convect3 1295 ! ori 1295 ! ori IF(tc.ge.0.0)THEN 1296 1296 es = 6.112*exp(17.67*tc/denom) 1297 ! ori 1298 ! ori 1299 ! ori 1297 ! ori else 1298 ! ori es=exp(23.33086-6111.72784/tg+0.15215*log(tg)) 1299 ! ori endif 1300 1300 qg = eps*es/(p(i,k)-es*(1.-eps)) 1301 1301 ! qg=max(0.0,qg) ! C Risi … … 1303 1303 ! Second iteration. 1304 1304 1305 ! ori 1306 ! ori 1307 ! ori 1305 ! ori s=cpd+alv*alv*qg/(rrv*t(i,k)*t(i,k)) 1306 ! ori s=1./s 1307 ! ori ahg=cpd*tg+(cl-cpd)*qnk(i)*t(i,k)+alv*qg+gz(i,k) 1308 1308 ahg = cpd*tg + (cl-cpd)*qnk(i)*tg + alv*qg + gz(i, k) ! convect3 1309 1309 tg = tg + s*(ah0(i)-ahg) 1310 ! ori 1311 ! debug 1310 ! ori tg=max(tg,35.0) 1311 ! debug tc=tg-t0 1312 1312 tc = tg - 273.15 1313 1313 denom = 243.5 + tc 1314 1314 denom = max(denom, 1.0) ! convect3 1315 ! ori 1315 ! ori IF(tc.ge.0.0)THEN 1316 1316 es = 6.112*exp(17.67*tc/denom) 1317 ! ori 1318 ! ori 1319 ! ori 1317 ! ori else 1318 ! ori es=exp(23.33086-6111.72784/tg+0.15215*log(tg)) 1319 ! ori endif 1320 1320 qg = eps*es/(p(i,k)-es*(1.-eps)) 1321 1321 ! qg=max(0.0,qg) ! C Risi 1322 1322 1323 ! debug 1323 ! debug alv=lv0-clmcpv*(t(i,k)-t0) 1324 1324 alv = lv0 - clmcpv*(t(i,k)-273.15) 1325 1325 ! PRINT*,'cpd dans convect2 ',cpd … … 1345 1345 #ifdef ISO 1346 1346 ! calcul de zfice 1347 doi=1,ncum1347 DO i=1,ncum 1348 1348 zfice(i) = 1.0-(t(i,k)-pxtice)/(pxtmelt-pxtice) 1349 1349 zfice(i) = MIN(MAX(zfice(i),0.0),1.0) 1350 1350 enddo 1351 doi=1,ncum1351 DO i=1,ncum 1352 1352 clw_k(i)=clw(i,k) 1353 1353 tg_k(i)=t(i,k) … … 1356 1356 !WRITE(*,*) 'cv30_routine 1259: avant condiso' 1357 1357 IF (iso_HDO.gt.0) THEN 1358 doi=1,ncum1358 DO i=1,ncum 1359 1359 CALL iso_verif_aberrant(xtnk(iso_hdo,i)/qnk(i), & 1360 1360 'cv30_routines 1231') … … 1362 1362 endif !if (iso_HDO.gt.0) THEN 1363 1363 IF (iso_eau.gt.0) THEN 1364 doi=1,ncum1364 DO i=1,ncum 1365 1365 CALL iso_verif_egalite(xtnk(iso_eau,i),qnk(i), & 1366 1366 'cv30_routines 1373') 1367 1367 enddo 1368 1368 endif !if (iso_HDO.gt.0) THEN 1369 doi=1,ncum1369 DO i=1,ncum 1370 1370 IF ((iso_verif_positif_nostop(qnk(i)-clw_k(i), & 1371 1371 'cv30_routines 1275').EQ.1).OR. & … … 1381 1381 enddo !do i=1,ncum 1382 1382 #ifdef ISOTRAC 1383 doi=1,ncum1383 DO i=1,ncum 1384 1384 CALL iso_verif_traceur(xtnk(1,i),'cv30_routines 1251') 1385 1385 enddo !do i=1,ncum … … 1397 1397 zfice(1),zxtice(1,1),zxtliq(1,1),ncum) 1398 1398 #endif 1399 doi=1,ncum1400 doixt=1,ntraciso1399 DO i=1,ncum 1400 DO ixt=1,ntraciso 1401 1401 xtclw(ixt,i,k)=zxtice(ixt,i)+zxtliq(ixt,i) 1402 1402 xtclw(ixt,i,k)=max(0.0,xtclw(ixt,i,k)) … … 1405 1405 #ifdef ISOVERIF 1406 1406 IF (iso_eau.gt.0) THEN 1407 do i=1,ncum1407 DO i=1,ncum 1408 1408 CALL iso_verif_egalite_choix(xtclw(iso_eau,i,k), & 1409 1409 clw(i,k),'cv30_routines 1223',errmax,errmaxrel) … … 1411 1411 endif !if (iso_eau.gt.0) THEN 1412 1412 #ifdef ISOTRAC 1413 doi=1,ncum1413 DO i=1,ncum 1414 1414 CALL iso_verif_traceur(xtclw(1,i,k),'cv30_routines 1275') 1415 1415 enddo … … 1984 1984 1985 1985 #ifdef ISO 1986 doj=1,nd1987 dok=1,nd1988 doi=1,ncum1989 doixt =1,ntraciso1986 DO j=1,nd 1987 DO k=1,nd 1988 DO i=1,ncum 1989 DO ixt =1,ntraciso 1990 1990 xtent(ixt,i,k,j)=xt(ixt,i,j) 1991 1991 xtelij(ixt,i,k,j)=0.0 … … 2074 2074 !WRITE(*,*) 'cv30_routines tmp 2078' 2075 2075 #endif 2076 doil=1,ncum2076 DO il=1,ncum 2077 2077 zfice(il) = 1.0-(t(il,j)-pxtice)/(pxtmelt-pxtice) 2078 2078 zfice(il) = MIN(MAX(zfice(il),0.0),1.0) 2079 2079 IF( (i.ge.icb(il)).AND.(i.le.inb(il)).AND. & 2080 2080 (j.ge.(icb(il)-1)).AND.(j.le.inb(il)))THEN 2081 doixt=1,ntraciso2081 DO ixt=1,ntraciso 2082 2082 ! xtrti(ixt)=xt(ixt,il,1)-xtep(ixt,il,i)*xtclw(ixt,il,i) ! le 7 mai: on supprime xtep 2083 2083 xtrti(ixt,il)=xt(ixt,il,1)-ep(il,i)*xtclw(ixt,il,i) … … 2090 2090 ! : / ( cpd*(bf2-1.0)/lv(il,j) ) 2091 2091 2092 doixt = 1, ntraciso2092 DO ixt = 1, ntraciso 2093 2093 ! total mixing ratio in the mixtures before precipitation: 2094 2094 xtent(ixt,il,i,j)=sij(il,i,j)*xt(ixt,il,i) & … … 2107 2107 t(1,j),zfice(1),zxtice(1,1),zxtliq(1,1),ncum) 2108 2108 #ifdef ISOVERIF 2109 doil=1,ncum2109 DO il=1,ncum 2110 2110 CALL iso_verif_traceur(xt(1,il,i),'cv30_routines 1967') 2111 2111 IF( (i.ge.icb(il)).AND.(i.le.inb(il)).AND. & … … 2118 2118 #endif 2119 2119 #endif 2120 doil=1,ncum2121 doixt = 1, ntraciso2120 DO il=1,ncum 2121 DO ixt = 1, ntraciso 2122 2122 xtelij(ixt,il,i,j)=zxtice(ixt,il)+zxtliq(ixt,il) 2123 2123 enddo !do ixt = 1, ntraciso … … 2143 2143 ! : option_traceurs 2144 2144 IF (option_tmin.ge.1) THEN 2145 do il=1,ncum2145 DO il=1,ncum 2146 2146 ! WRITE(*,*) 'cv3 tmp 1991 il,i,j,xtent(:,il,i,j),', 2147 2147 ! : 'tcond(il),rs(il,j)=', … … 2161 2161 seuil_tag_tmin) 2162 2162 endif !if (option_traceurs.EQ.17) THEN 2163 doixt=1+niso,ntraciso2163 DO ixt=1+niso,ntraciso 2164 2164 xtent(ixt,il,i,j)=xtres(ixt) 2165 2165 enddo … … 2167 2167 enddo !do il=1,ncum 2168 2168 #ifdef ISOVERIF 2169 do il=1,ncum2169 DO il=1,ncum 2170 2170 CALL iso_verif_traceur(xtent(1,il,i,j),'cv30_routines 1996') 2171 2171 CALL iso_verif_traceur(xtelij(1,il,i,j),'cv30_routines 1997') … … 2180 2180 #ifdef ISOVERIF 2181 2181 ! WRITE(*,*) 'cv30_routines 2050: avant condiso' 2182 doil=1,ncum2182 DO il=1,ncum 2183 2183 IF ((i.ge.icb(il)).AND.(i.le.inb(il)).AND. & 2184 2184 (j.ge.(icb(il)-1)).AND.(j.le.inb(il))) THEN … … 2251 2251 sij(il, i, i) = 0.0 2252 2252 #ifdef ISO 2253 doixt = 1, ntraciso2253 DO ixt = 1, ntraciso 2254 2254 xtent(ixt,il,i,i)=xt(ixt,il,nk(il))-ep(il,i)*xtclw(ixt,il,i) 2255 2255 ! xtent(ixt,il,i,i)=xt(ixt,il,nk(il))-xtep(ixt,il,i)*xtclw(ixt,il,i) … … 2285 2285 seuil_tag_tmin) 2286 2286 endif !if (option_traceurs.EQ.17) THEN 2287 doixt=1+niso,ntraciso2287 DO ixt=1+niso,ntraciso 2288 2288 xtent(ixt,il,i,i)=xtres(ixt) 2289 2289 enddo 2290 2290 #ifdef ISOVERIF 2291 doixt=1,niso2291 DO ixt=1,niso 2292 2292 CALL iso_verif_egalite_choix(xtres(ixt),xtent(ixt,il,i,i), & 2293 2293 'cv30_routines 2102',errmax,errmaxrel) … … 2484 2484 sij(il, i, i) = 0.0 2485 2485 #ifdef ISO 2486 doixt = 1, ntraciso2486 DO ixt = 1, ntraciso 2487 2487 ! xtent(ixt,il,i,i)=xt(ixt,il,1)-xtep(ixt,il,i)*xtclw(ixt,il,i) 2488 2488 xtent(ixt,il,i,i)=xt(ixt,il,1)-ep(il,i)*xtclw(ixt,il,i) … … 2518 2518 seuil_tag_tmin) 2519 2519 endif ! if (option_traceurs.EQ.17) THEN 2520 doixt=1+niso,ntraciso2520 DO ixt=1+niso,ntraciso 2521 2521 xtent(ixt,il,i,i)=xtres(ixt) 2522 2522 enddo 2523 2523 #ifdef ISOVERIF 2524 doixt=1,niso2524 DO ixt=1,niso 2525 2525 CALL iso_verif_egalite_choix(xtres(ixt),xtent(ixt,il,i,i), & 2526 2526 'cv30_routines 2318',errmax,errmaxrel) … … 2583 2583 !c--debug 2584 2584 #ifdef ISOVERIF 2585 doim = 1, nd2586 dojm = 1, nd2587 doil = 1, ncum2585 DO im = 1, nd 2586 DO jm = 1, nd 2587 DO il = 1, ncum 2588 2588 IF (iso_eau.gt.0) THEN 2589 2589 CALL iso_verif_egalite_choix(xtelij(iso_eau,il,im,jm), & … … 2606 2606 ! seulement a la fin on taggue le condensat 2607 2607 IF (option_cond.ge.1) THEN 2608 doim = 1, nd2609 dojm = 1, nd2610 do il = 1, ncum2608 DO im = 1, nd 2609 DO jm = 1, nd 2610 DO il = 1, ncum 2611 2611 ! colorier le condensat en un tag specifique 2612 doixt=niso+1,ntraciso2612 DO ixt=niso+1,ntraciso 2613 2613 IF (index_zone(ixt).EQ.izone_cond) THEN 2614 2614 xtelij(ixt,il,im,jm)=xtelij(index_iso(ixt),il,im,jm) … … 2626 2626 enddo !do jm = 1, nd 2627 2627 enddo !do im = 1, nd 2628 doim = 1, nd2629 do il = 1, ncum2628 DO im = 1, nd 2629 DO il = 1, ncum 2630 2630 ! colorier le condensat en un tag specifique 2631 doixt=niso+1,ntraciso2631 DO ixt=niso+1,ntraciso 2632 2632 IF (index_zone(ixt).EQ.izone_cond) THEN 2633 2633 xtclw(ixt,il,im)=xtclw(index_iso(ixt),il,im) … … 2790 2790 #ifdef ISO 2791 2791 rpprec(il,i)=rp(il,i) 2792 doixt=1,ntraciso2792 DO ixt=1,ntraciso 2793 2793 xtp(ixt,il,i)=xt(ixt,il,i) 2794 2794 xtwater(ixt,il,i)=0.0 … … 2869 2869 wdtraina(il, i) = wdtrain(il)/grav ! Pa 26/08/10 RomP 2870 2870 #ifdef ISO 2871 doixt=1,ntraciso2871 DO ixt=1,ntraciso 2872 2872 ! xtwdtrain(ixt,il)=grav*xtep(ixt,il,i)*m(il,i)*xtclw(ixt,il,i) 2873 2873 xtwdtrain(ixt,il)=grav*ep(il,i)*m(il,i)*xtclw(ixt,il,i) … … 2890 2890 wdtraina(il, i) = wdtrain(il)/10. ! Pa 26/08/10 RomP 2891 2891 #ifdef ISO 2892 doixt=1,ntraciso2892 DO ixt=1,ntraciso 2893 2893 ! xtwdtrain(ixt,il)=10.0*xtep(ixt,il,i)*m(il,i)*xtclw(ixt,il,i) 2894 2894 xtwdtrain(ixt,il)=10.0*ep(il,i)*m(il,i)*xtclw(ixt,il,i) … … 2910 2910 ! precip mixed drafts computed from: xtawat/xtelij = awat/elij 2911 2911 IF (elij(il,j,i).NE.0.0) THEN 2912 doixt=1,ntraciso2912 DO ixt=1,ntraciso 2913 2913 xtawat(ixt)=xtelij(ixt,il,j,i)*(awat/elij(il,j,i)) 2914 2914 xtawat(ixt)=amax1(xtawat(ixt),0.0) … … 2916 2916 !! xtawat(ixt)=amin1(xtawat(ixt),xtelij(ixt,il,j,i)) !security.. 2917 2917 else 2918 doixt=1,ntraciso2918 DO ixt=1,ntraciso 2919 2919 xtawat(ixt)=0.0 2920 2920 enddo !do ixt=1,niso … … 2934 2934 wdtrain(il) = wdtrain(il) + grav*awat*ment(il, j, i) 2935 2935 #ifdef ISO 2936 doixt=1,ntraciso2936 DO ixt=1,ntraciso 2937 2937 xtwdtrain(ixt,il)=xtwdtrain(ixt,il) & 2938 2938 +grav*xtawat(ixt)*ment(il,j,i) … … 2942 2942 wdtrain(il) = wdtrain(il) + 10.0*awat*ment(il, j, i) 2943 2943 #ifdef ISO 2944 doixt=1,ntraciso2944 DO ixt=1,ntraciso 2945 2945 xtwdtrain(ixt,il)=xtwdtrain(ixt,il) & 2946 2946 +10.0*xtawat(ixt)*ment(il,j,i) … … 3213 3213 ! verif des inputs a appel stewart 3214 3214 ! WRITE(*,*) 'cv30_routines 2842 tmp: appel de appel_stewart' 3215 do il=1,ncum3215 DO il=1,ncum 3216 3216 IF (i.le.inb(il) .AND. lwork(il)) THEN 3217 3217 IF (iso_eau.gt.0) THEN … … 3253 3253 ! WRITE(*,*) 'cv30_routines 2864 tmp: sortie de appel_stewart' 3254 3254 ! verif des outputs de appel stewart 3255 doil=1,ncum3255 DO il=1,ncum 3256 3256 IF (i.le.inb(il) .AND. lwork(il)) THEN 3257 do ixt=1,ntraciso3257 DO ixt=1,ntraciso 3258 3258 CALL iso_verif_noNAN(xtp(ixt,il,i),'cv30_unsat 3382') 3259 3259 CALL iso_verif_noNAN(xtwater(ixt,il,i),'cv30_unsat 3381') … … 3300 3300 3301 3301 ! equivalent isotopique de rp(il,i)=amin1(rp(il,i),rs(il,i)) 3302 doil=1,ncum3302 DO il=1,ncum 3303 3303 IF (i.lt.inb(il) .AND. lwork(il)) THEN 3304 3304 IF (rpprec(il,i).gt.rs(il,i)) THEN … … 3307 3307 stop 3308 3308 endif 3309 doixt=1,ntraciso3309 DO ixt=1,ntraciso 3310 3310 xtp(ixt,il,i)=xtp(ixt,il,i)/rpprec(il,i)*rs(il,i) 3311 3311 xtp(ixt,il,i)=max(0.0,xtp(ixt,il,i)) 3312 3312 enddo !do ixt=1,niso 3313 3313 #ifdef ISOVERIF 3314 do ixt=1,ntraciso3314 DO ixt=1,ntraciso 3315 3315 CALL iso_verif_noNaN(xtp(ixt,il,i),'cv3unsat 2641') 3316 3316 enddo !do ixt=1,niso … … 3348 3348 WRITE(*,*) 'nl=',nl,'nd=',nd,'; ncum=',ncum 3349 3349 #ifdef ISOVERIF 3350 doi=1,nl !nl3351 doil=1,ncum3350 DO i=1,nl !nl 3351 DO il=1,ncum 3352 3352 IF (iso_eau.gt.0) THEN 3353 3353 ! WRITE(*,*) 'cv30_routines 2767:i,il,lwork(il),inb(il)=', … … 3545 3545 ! WRITE(*,*) 'cv30_routines 3082: entree dans cv3_yield' 3546 3546 ! en cam debug 3547 doixt = 1, ntraciso3547 DO ixt = 1, ntraciso 3548 3548 xtprecip(ixt,il)=0.0 3549 3549 xtVprecip(ixt,il,nd+1)=0.0 … … 3563 3563 nqcond(il, i) = 0.0 ! cld 3564 3564 #ifdef ISO 3565 doixt = 1, ntraciso3565 DO ixt = 1, ntraciso 3566 3566 fxt(ixt,il,i)=0.0 3567 3567 xtVprecip(ixt,il,i)=0.0 … … 3574 3574 fq_evapprecip(il,i)=0.0 3575 3575 fq_ddft(il,i)=0.0 3576 doixt = 1, niso3576 DO ixt = 1, niso 3577 3577 fxt_fluxmasse(ixt,il,i)=0.0 3578 3578 fxt_detrainement(ixt,il,i)=0.0 … … 3610 3610 3611 3611 #ifdef ISO 3612 doixt = 1, ntraciso3612 DO ixt = 1, ntraciso 3613 3613 xtprecip(ixt,il)=wt(il,1)*sigd*xtwater(ixt,il,1) & 3614 3614 *86400.*1000./(rowl*grav) ! en mm/jour … … 3648 3648 precip(il) = wt(il, 1)*sigd*water(il, 1)*8640. 3649 3649 #ifdef ISO 3650 doixt = 1, ntraciso3650 DO ixt = 1, ntraciso 3651 3651 xtprecip(ixt,il)=wt(il,1)*sigd*xtwater(ixt,il,1)*8640. 3652 3652 enddo … … 3677 3677 vprecip(il, k) = wt(il, k)*sigd*water(il, k)/grav 3678 3678 #ifdef ISO 3679 doixt=1,ntraciso3679 DO ixt=1,ntraciso 3680 3680 xtVPrecip(ixt,il,k) = wt(il,k)*sigd & 3681 3681 *xtwater(ixt,il,k)/grav … … 3685 3685 vprecip(il, k) = wt(il, k)*sigd*water(il, k)/10. 3686 3686 #ifdef ISO 3687 doixt=1,ntraciso3687 DO ixt=1,ntraciso 3688 3688 xtVPrecip(ixt,il,k) = wt(il,k)*sigd & 3689 3689 *xtwater(ixt,il,k)/10.0 … … 3759 3759 #ifdef ISO 3760 3760 ! juste Mp et evap pour l'instant, voir plus bas pour am 3761 doixt = 1, ntraciso3761 DO ixt = 1, ntraciso 3762 3762 fxt(ixt,il,1)= & 3763 3763 0.01*grav*mp(il,2)*(xtp(ixt,il,2)-xt(ixt,il,1))*work(il) & … … 3773 3773 fq_fluxmasse(il,1)=fq_fluxmasse(il,1) & 3774 3774 +0.01*grav*am(il)*(rr(il,2)-rr(il,1))*work(il) 3775 doixt = 1, ntraciso3775 DO ixt = 1, ntraciso 3776 3776 ! fxt_fluxmasse(ixt,il,1)=fxt_fluxmasse(ixt,il,1) & 3777 3777 ! & +0.01*grav*am(il)*(xt(ixt,il,2)-xt(ixt,il,1))*work(il) ! deplace … … 3822 3822 dqreste_tmp= 0.01*grav*mp(il, 2)*(rp(il,2)-rr(il,1))*work(il)*delt + & 3823 3823 sigd*0.5*(evap(il,1)+evap(il,2))*delt 3824 doixt = 1, ntraciso3824 DO ixt = 1, ntraciso 3825 3825 dxreste_tmp= 0.01*grav*mp(il,2)*(xtp(ixt,il,2)-xt(ixt,il,1))*work(il)*delt & 3826 3826 +sigd*0.5*(xtevap(ixt,il,1)+xtevap(ixt,il,2))*delt … … 3856 3856 ! formulation habituelle qui avait toujours marche de 2006 a 3857 3857 ! decembre 2017. 3858 do ixt = 1, ntraciso3858 DO ixt = 1, ntraciso 3859 3859 fxt(ixt,il,1)=fxt(ixt,il,1) & 3860 3860 +0.01*grav*am(il)*(xt(ixt,il,2)-xt(ixt,il,1))*work(il) … … 3898 3898 #ifdef ISOTRAC 3899 3899 CALL iso_verif_traceur_justmass(fxt(1,il,1),'cv30_routine 3417') 3900 doixt=1,ntraciso3900 DO ixt=1,ntraciso 3901 3901 xtnew(ixt)=xt(ixt,il,1)+delt*fxt(ixt,il,1) 3902 3902 enddo … … 3936 3936 3937 3937 #ifdef ISO 3938 doixt = 1, ntraciso3938 DO ixt = 1, ntraciso 3939 3939 fxt(ixt,il,1)=0.1*mp(il,2)*(xtp(ixt,il,2)-xt(ixt,il,1))*work(il) & 3940 3940 +sigd*0.5*(xtevap(ixt,il,1)+xtevap(ixt,il,2)) … … 3950 3950 fq_fluxmasse(il,1)=fq_fluxmasse(il,1) & 3951 3951 +0.1*am(il)*(rr(il,2)-rr(il,1))*work(il) 3952 doixt = 1, niso3952 DO ixt = 1, niso 3953 3953 fxt_fluxmasse(ixt,il,1)=fxt(ixt,il,1) & 3954 3954 +0.1*am(il)*(xt(ixt,il,2)-xt(ixt,il,1))*work(il) … … 3978 3978 CALL iso_verif_traceur_justmass(fxt(1,il,1), & 3979 3979 'cv30_routine 3417') 3980 doixt=1,ntraciso3980 DO ixt=1,ntraciso 3981 3981 xtnew(ixt)=xt(ixt,il,1)+delt*fxt(ixt,il,1) 3982 3982 enddo … … 4027 4027 4028 4028 #ifdef ISO 4029 doixt = 1, ntraciso4029 DO ixt = 1, ntraciso 4030 4030 fxt(ixt,il,1)=fxt(ixt,il,1) & 4031 4031 +0.01*grav*work(il)*ment(il,j,1)*(xtent(ixt,il,j,1)-xt(ixt,il,1)) … … 4039 4039 q_detrainement(il,1)=q_detrainement(il,1) & 4040 4040 +0.01*grav*work(il)*ment(il,j,1)*qent(il,j,1) 4041 doixt = 1, niso4041 DO ixt = 1, niso 4042 4042 fxt_detrainement(ixt,il,1)=fxt_detrainement(ixt,il,1) & 4043 4043 +0.01*grav*work(il)*ment(il,j,1)*(xtent(ixt,il,j,1)-xt(ixt,il,1)) … … 4061 4061 #ifdef ISOTRAC 4062 4062 CALL iso_verif_traceur_justmass(fxt(1,il,1),'cv30_routine 3417') 4063 doixt=1,ntraciso4063 DO ixt=1,ntraciso 4064 4064 xtnew(ixt)=xt(ixt,il,1)+delt*fxt(ixt,il,1) 4065 4065 enddo … … 4087 4087 4088 4088 #ifdef ISO 4089 doixt = 1, ntraciso4089 DO ixt = 1, ntraciso 4090 4090 fxt(ixt,il,1)=fxt(ixt,il,1) & 4091 4091 +0.1*work(il)*ment(il,j,1)*(xtent(ixt,il,j,1)-xt(ixt,il,1)) … … 4099 4099 q_detrainement(il,1)=q_detrainement(il,1) & 4100 4100 +0.1*work(il)*ment(il,j,1)*qent(il,j,1) 4101 doixt = 1, niso4101 DO ixt = 1, niso 4102 4102 fxt_detrainement(ixt,il,1)=fxt_detrainement(ixt,il,1) & 4103 4103 +0.1*work(il)*ment(il,j,1)*(xtent(ixt,il,j,1)-xt(ixt,il,1)) … … 4121 4121 #ifdef ISOTRAC 4122 4122 CALL iso_verif_traceur_justmass(fxt(1,il,1),'cv30_routine 3462') 4123 doixt=1,ntraciso4123 DO ixt=1,ntraciso 4124 4124 xtnew(ixt)=xt(ixt,il,1)+delt*fxt(ixt,il,1) 4125 4125 enddo … … 4269 4269 k_tmp=0.01*grav*dpinv*amp1(il)*delt 4270 4270 kad_tmp=0.01*grav*dpinv*ad(il)*delt 4271 doixt = 1, ntraciso4271 DO ixt = 1, ntraciso 4272 4272 R_tmp=(xt(ixt,il,i)+k_tmp*xt(ixt,il,i+1)+kad_tmp*xt(ixt,il,i-1)) & 4273 4273 /(rr(il,i)+k_tmp*rr(il,i+1)+kad_tmp*rr(il,i-1)) … … 4292 4292 enddo ! do ixt = 1, ntraciso 4293 4293 #ifdef DIAGISO 4294 doixt = 1, niso4294 DO ixt = 1, niso 4295 4295 fxt_fluxmasse(ixt,il,i)=fxt(ixt,il,i) 4296 4296 enddo … … 4298 4298 else !if (dq_tmp/rr(il,i).lt.-0.9) THEN 4299 4299 ! ancienne formulation 4300 doixt = 1, ntraciso4300 DO ixt = 1, ntraciso 4301 4301 fxt(ixt,il,i)= & 4302 4302 0.01*grav*dpinv*(amp1(il)*(xt(ixt,il,i+1)-xt(ixt,il,i)) & … … 4304 4304 enddo 4305 4305 #ifdef DIAGISO 4306 doixt = 1, niso4306 DO ixt = 1, niso 4307 4307 fxt_fluxmasse(ixt,il,i)=fxt_fluxmasse(ixt,il,i)+ & 4308 4308 0.01*grav*dpinv*(amp1(il)*(xt(ixt,il,i+1)-xt(ixt,il,i)) & … … 4317 4317 fr(il,i),'cv30_routines 3226',errmax,errmaxrel) 4318 4318 endif !if (iso_eau.gt.0) THEN 4319 doixt=1,niso4319 DO ixt=1,niso 4320 4320 CALL iso_verif_noNAN(fxt(ixt,il,i),'cv30_routines 3229') 4321 4321 enddo … … 4336 4336 #ifdef ISOTRAC 4337 4337 CALL iso_verif_traceur_justmass(fxt(1,il,1),'cv30_routine 3626') 4338 doixt=1,ntraciso4338 DO ixt=1,ntraciso 4339 4339 xtnew(ixt)=xt(ixt,il,i)+delt*fxt(ixt,il,i) 4340 4340 enddo … … 4363 4363 4364 4364 #ifdef ISO 4365 doixt = 1, ntraciso4365 DO ixt = 1, ntraciso 4366 4366 fxt(ixt,il,i)= & 4367 4367 0.1*dpinv*(amp1(il)*(xt(ixt,il,i+1)-xt(ixt,il,i)) & … … 4373 4373 +0.1*dpinv*(amp1(il)*(rr(il,i+1)-rr(il,i)) & 4374 4374 -ad(il)*(rr(il,i)-rr(il,i-1))) 4375 doixt = 1, niso4375 DO ixt = 1, niso 4376 4376 fxt_fluxmasse(ixt,il,i)=fxt_fluxmasse(ixt,il,i)+ & 4377 4377 0.1*dpinv*(amp1(il)*(xt(ixt,il,i+1)-xt(ixt,il,i)) & … … 4386 4386 fr(il,i),'cv30_routines 3252',errmax,errmaxrel) 4387 4387 endif !if (iso_eau.gt.0) THEN 4388 doixt=1,niso4388 DO ixt=1,niso 4389 4389 CALL iso_verif_noNAN(fxt(ixt,il,i),'cv30_routines 3229') 4390 4390 enddo … … 4406 4406 #ifdef ISOTRAC 4407 4407 CALL iso_verif_traceur_justmass(fxt(1,il,1),'cv30_routine 3674') 4408 doixt=1,ntraciso4408 DO ixt=1,ntraciso 4409 4409 xtnew(ixt)=xt(ixt,il,i)+delt*fxt(ixt,il,i) 4410 4410 enddo … … 4460 4460 ! d'ou le nouveau traitement ci-dessous. 4461 4461 IF (elij(il,k,i).gt.0.0) THEN 4462 doixt = 1, ntraciso4462 DO ixt = 1, ntraciso 4463 4463 xtawat(ixt)=awat*(xtelij(ixt,il,k,i)/elij(il,k,i)) 4464 4464 ! xtawat(ixt)=amax1(xtawat(ixt),0.0) ! pas necessaire … … 4470 4470 CALL iso_verif_egalite(awat,0.0,'cv30_yield 3779') 4471 4471 #endif 4472 doixt = 1, ntraciso4472 DO ixt = 1, ntraciso 4473 4473 xtawat(ixt)=0.0 4474 4474 enddo … … 4497 4497 4498 4498 #ifdef ISO 4499 doixt = 1, ntraciso4499 DO ixt = 1, ntraciso 4500 4500 fxt(ixt,il,i)=fxt(ixt,il,i) & 4501 4501 +0.01*grav*dpinv*ment(il,k,i) & … … 4511 4511 q_detrainement(il,i)=q_detrainement(il,i) & 4512 4512 +0.01*grav*dpinv*ment(il,k,i)*qent(il,k,i) 4513 doixt = 1, niso4513 DO ixt = 1, niso 4514 4514 fxt_detrainement(ixt,il,i)=fxt_detrainement(ixt,il,i) & 4515 4515 +0.01*grav*dpinv*ment(il,k,i) & … … 4525 4525 fr(il,i),'cv30_routines 3325',errmax,errmaxrel) 4526 4526 endif !if (iso_eau.gt.0) THEN 4527 doixt=1,niso4527 DO ixt=1,niso 4528 4528 CALL iso_verif_noNAN(fxt(ixt,il,i),'cv30_routines 3328') 4529 4529 enddo … … 4567 4567 #ifdef ISOTRAC 4568 4568 CALL iso_verif_traceur_justmass(fxt(1,il,i),'cv30_routine 3784') 4569 doixt=1,ntraciso4569 DO ixt=1,ntraciso 4570 4570 xtnew(ixt)=xt(ixt,il,i)+delt*fxt(ixt,il,i) 4571 4571 enddo … … 4587 4587 4588 4588 #ifdef ISO 4589 doixt = 1, ntraciso4589 DO ixt = 1, ntraciso 4590 4590 fxt(ixt,il,i)=fxt(ixt,il,i) & 4591 4591 +0.1*dpinv*ment(il,k,i) & … … 4600 4600 q_detrainement(il,i)=q_detrainement(il,i) & 4601 4601 +0.1*dpinv*ment(il,k,i)*qent(il,k,i) 4602 doixt = 1, niso4602 DO ixt = 1, niso 4603 4603 fxt_detrainement(ixt,il,i)=fxt_detrainement(ixt,il,i) & 4604 4604 +0.1*dpinv*ment(il,k,i) & … … 4615 4615 fr(il,i),'cv30_routines 3350',errmax,errmaxrel) 4616 4616 endif !if (iso_eau.gt.0) THEN 4617 doixt=1,niso4617 DO ixt=1,niso 4618 4618 CALL iso_verif_noNAN(fxt(ixt,il,i),'cv30_routines 3353') 4619 4619 enddo … … 4633 4633 #ifdef ISOTRAC 4634 4634 CALL iso_verif_traceur_justmass(fxt(1,il,i),'cv30_routine 3828') 4635 doixt=1,ntraciso4635 DO ixt=1,ntraciso 4636 4636 xtnew(ixt)=xt(ixt,il,i)+delt*fxt(ixt,il,i) 4637 4637 enddo … … 4687 4687 ,i)-v(il,i)) 4688 4688 #ifdef ISO 4689 doixt = 1, ntraciso4689 DO ixt = 1, ntraciso 4690 4690 fxt(ixt,il,i)=fxt(ixt,il,i) & 4691 4691 +0.01*grav*dpinv*ment(il,k,i)*(xtent(ixt,il,k,i)-xt(ixt,il,i)) … … 4699 4699 q_detrainement(il,i)=q_detrainement(il,i) & 4700 4700 +0.01*grav*dpinv*ment(il,k,i)*qent(il,k,i) 4701 doixt = 1, niso4701 DO ixt = 1, niso 4702 4702 fxt_detrainement(ixt,il,i)=fxt_detrainement(ixt,il,i) & 4703 4703 +0.01*grav*dpinv*ment(il,k,i)*(xtent(ixt,il,k,i)-xt(ixt,il,i)) … … 4714 4714 WRITE(*,*) 'q,qe=',rr(il,i),qent(il,k,i) 4715 4715 bx=0.01*grav*dpinv*ment(il,k,i)*(qent(il,k,i)-rr(il,i)) 4716 doixt=1,niso4716 DO ixt=1,niso 4717 4717 xtbx(ixt)=0.01*grav*dpinv*ment(il,k,i)*(xtent(ixt,il,k,i)-xt(ixt,il,i)) 4718 4718 enddo 4719 4719 endif 4720 doixt=1,niso4720 DO ixt=1,niso 4721 4721 CALL iso_verif_noNaN(fxt(ixt,il,i),'cv30_yield 4351') 4722 4722 enddo … … 4727 4727 fr(il,i),'cv30_routines 3408',errmax,errmaxrel) 4728 4728 endif !if (iso_eau.gt.0) THEN 4729 doixt=1,niso4729 DO ixt=1,niso 4730 4730 CALL iso_verif_noNAN(fxt(ixt,il,i),'cv30_routines 3411') 4731 4731 enddo … … 4767 4767 #ifdef ISOTRAC 4768 4768 CALL iso_verif_traceur_justmass(fxt(1,il,i),'cv30_routine 3921') 4769 doixt=1,ntraciso4769 DO ixt=1,ntraciso 4770 4770 xtnew(ixt)=xt(ixt,il,i)+delt*fxt(ixt,il,i) 4771 4771 enddo … … 4788 4788 4789 4789 #ifdef ISO 4790 doixt = 1, ntraciso4790 DO ixt = 1, ntraciso 4791 4791 fxt(ixt,il,i)=fxt(ixt,il,i) & 4792 4792 +0.1*dpinv*ment(il,k,i)*(xtent(ixt,il,k,i)-xt(ixt,il,i)) … … 4800 4800 q_detrainement(il,i)=q_detrainement(il,i) & 4801 4801 +0.1*dpinv*ment(il,k,i)*qent(il,k,i) 4802 doixt = 1, niso4802 DO ixt = 1, niso 4803 4803 fxt_detrainement(ixt,il,i)=fxt_detrainement(ixt,il,i) & 4804 4804 +0.1*dpinv*ment(il,k,i)*(xtent(ixt,il,k,i)-xt(ixt,il,i)) … … 4819 4819 fr(il,i),'cv30_routines 3433',errmax,errmaxrel) 4820 4820 endif !if (iso_eau.gt.0) THEN 4821 doixt=1,niso4821 DO ixt=1,niso 4822 4822 CALL iso_verif_noNAN(fxt(ixt,il,i),'cv30_routines 3436') 4823 4823 enddo … … 4838 4838 #ifdef ISOTRAC 4839 4839 CALL iso_verif_traceur_justmass(fxt(1,il,i),'cv30_routine 3972') 4840 doixt=1,ntraciso4840 DO ixt=1,ntraciso 4841 4841 xtnew(ixt)=xt(ixt,il,i)+delt*fxt(ixt,il,i) 4842 4842 enddo … … 4890 4890 i))-mp(il,i)*(vp(il,i)-v(il,i-1)))*dpinv 4891 4891 #ifdef ISO 4892 doixt = 1, niso4892 DO ixt = 1, niso 4893 4893 fxt(ixt,il,i)=fxt(ixt,il,i) & 4894 4894 +0.5*sigd*(xtevap(ixt,il,i)+xtevap(ixt,il,i+1)) & … … 4904 4904 +0.01*grav*(mp(il,i+1)*(rp(il,i+1)-rr(il,i))-mp(il,i) & 4905 4905 *(rp(il,i)-rr(il,i-1)))*dpinv 4906 doixt = 1, niso4906 DO ixt = 1, niso 4907 4907 fxt_evapprecip(ixt,il,i)=fxt_evapprecip(ixt,il,i) & 4908 4908 +0.5*sigd*(xtevap(ixt,il,i)+xtevap(ixt,il,i+1)) … … 4914 4914 4915 4915 #ifdef ISOVERIF 4916 doixt=1,niso4916 DO ixt=1,niso 4917 4917 CALL iso_verif_noNaN(xt(ixt,il,i),'cv30_yield 4514') 4918 4918 CALL iso_verif_noNaN(fxt(ixt,il,i),'cv30_yield 4515') … … 4985 4985 IF ((option_traceurs.NE.6).AND.(option_traceurs.NE.19)) THEN 4986 4986 ! facile: on fait comme l'eau 4987 doixt = 1+niso,ntraciso4987 DO ixt = 1+niso,ntraciso 4988 4988 fxt(ixt,il,i)=fxt(ixt,il,i) & 4989 4989 +0.5*sigd*(xtevap(ixt,il,i)+xtevap(ixt,il,i+1)) & … … 5013 5013 5014 5014 ! ajout deja de l'evap 5015 doixt = 1+niso,ntraciso5015 DO ixt = 1+niso,ntraciso 5016 5016 fxt(ixt,il,i)=fxt(ixt,il,i) & 5017 5017 +0.5*sigd*(xtevap(ixt,il,i)+xtevap(ixt,il,i+1)) … … 5022 5022 5023 5023 IF (option_traceurs.EQ.6) THEN 5024 doiiso = 1, niso5024 DO iiso = 1, niso 5025 5025 5026 5026 ixt_ddft=itZonIso(izone_ddft,iiso) … … 5047 5047 ! cas entrainant: faire attention 5048 5048 5049 doiiso = 1, niso5049 DO iiso = 1, niso 5050 5050 fxtqe(iiso)=0.01*grav*dpinv* & 5051 5051 (mp(il,i+1)*(xtp(iiso,il,i+1)-xt(iiso,il,i)) & … … 5068 5068 -xt(ixt_ddft,il,i)-xt(ixt_revap,il,i) 5069 5069 IF (Xe(iiso).gt.ridicule) THEN 5070 doizone=1,nzone5070 DO izone=1,nzone 5071 5071 IF ((izone.NE.izone_revap).AND. & 5072 5072 (izone.NE.izone_ddft)) THEN … … 5097 5097 endif 5098 5098 #endif 5099 doizone=1,nzone5099 DO izone=1,nzone 5100 5100 IF ((izone.NE.izone_revap).AND. & 5101 5101 (izone.NE.izone_ddft)) THEN … … 5118 5118 else !if (mp(il,i).gt.mp(il,i+1)) THEN 5119 5119 ! cas detrainant: pas de problemes 5120 doixt=1+niso,ntraciso5120 DO ixt=1+niso,ntraciso 5121 5121 fxt(ixt,il,i)=fxt(ixt,il,i) & 5122 5122 +0.01*grav*(mp(il,i+1)*(xtp(ixt,il,i+1)-xt(ixt,il,i)) & … … 5138 5138 ! cam verif 5139 5139 #ifdef ISOVERIF 5140 doixt=1,niso5140 DO ixt=1,niso 5141 5141 CALL iso_verif_noNAN(fxt(ixt,il,i),'cv30_routines 3496') 5142 5142 enddo … … 5191 5191 ! WRITE(*,*) 'tmp cv3_yield 4224: i,il=',i,il 5192 5192 CALL iso_verif_traceur_justmass(fxt(1,il,i),'cv30_routine 4107') 5193 doixt=1,ntraciso5193 DO ixt=1,ntraciso 5194 5194 xtnew(ixt)=xt(ixt,il,i)+delt*fxt(ixt,il,i) 5195 5195 enddo … … 5225 5225 i))-mp(il,i)*(vp(il,i)-v(il,i-1)))*dpinv 5226 5226 #ifdef ISO 5227 doixt = 1, ntraciso5227 DO ixt = 1, ntraciso 5228 5228 fxt(ixt,il,i)=fxt(ixt,il,i) & 5229 5229 +0.5*sigd*(xtevap(ixt,il,i)+xtevap(ixt,il,i+1)) & … … 5235 5235 IF (option_traceurs.NE.6) THEN 5236 5236 ! facile: on fait comme l'eau 5237 doixt = 1+niso,ntraciso5237 DO ixt = 1+niso,ntraciso 5238 5238 fxt(ixt,il,i)=fxt(ixt,il,i) & 5239 5239 +0.5*sigd*(xtevap(ixt,il,i)+xtevap(ixt,il,i+1)) & … … 5244 5244 else !if (option_traceurs.NE.6) THEN 5245 5245 ! taggage des ddfts: voir blabla + haut 5246 doixt = 1+niso,ntraciso5246 DO ixt = 1+niso,ntraciso 5247 5247 fxt(ixt,il,i)=fxt(ixt,il,i) & 5248 5248 +0.5*sigd*(xtevap(ixt,il,i)+xtevap(ixt,il,i+1)) … … 5255 5255 ! WRITE(*,*) 'delt*fxt(ixt_ddft,il,i)=',delt*fxt(ixt_ddft,il,i) 5256 5256 ! WRITE(*,*) 'xt(iso_eau,il,i)=',xt(iso_eau,il,i) 5257 doiiso = 1, niso5257 DO iiso = 1, niso 5258 5258 ixt_poubelle=itZonIso(izone_poubelle,iiso) 5259 5259 ixt_ddft=itZonIso(izone_ddft,iiso) … … 5285 5285 +0.1*(mp(il,i+1)*(rp(il,i+1)-rr(il,i))-mp(il,i) & 5286 5286 *(rp(il,i)-rr(il,i-1)))*dpinv 5287 do ixt = 1, niso5287 DO ixt = 1, niso 5288 5288 fxt_evapprecip(ixt,il,i)=fxt_evapprecip(ixt,il,i) & 5289 5289 +0.5*sigd*(xtevap(ixt,il,i)+xtevap(ixt,il,i+1)) … … 5297 5297 5298 5298 #ifdef ISOVERIF 5299 doixt=1,niso5299 DO ixt=1,niso 5300 5300 CALL iso_verif_noNaN(fxt(ixt,il,i),'cv30_yield 5083') 5301 5301 enddo … … 5329 5329 #ifdef ISOTRAC 5330 5330 CALL iso_verif_traceur_justmass(fxt(1,il,i),'cv30_routine 4172') 5331 doixt=1,ntraciso5331 DO ixt=1,ntraciso 5332 5332 xtnew(ixt)=xt(ixt,il,1)+delt*fxt(ixt,il,1) 5333 5333 enddo … … 5431 5431 5432 5432 #ifdef ISO 5433 doixt = 1, ntraciso5433 DO ixt = 1, ntraciso 5434 5434 xtbx(ixt)=0.01*grav*ment(il,inb(il),inb(il)) & 5435 5435 *(xtent(ixt,il,inb(il),inb(il)) & … … 5472 5472 5473 5473 #ifdef ISO 5474 doixt = 1, ntraciso5474 DO ixt = 1, ntraciso 5475 5475 xtbx(ixt)=0.1*ment(il,inb(il),inb(il)) & 5476 5476 *(xtent(ixt,il,inb(il),inb(il)) & … … 5492 5492 +bx*(ph(il,inb(il))-ph(il,inb(il)+1)) & 5493 5493 /(ph(il,inb(il)-1)-ph(il,inb(il))) 5494 doixt = 1, niso5494 DO ixt = 1, niso 5495 5495 fxt_detrainement(ixt,il,inb(il))= & 5496 5496 fxt_detrainement(ixt,il,inb(il))-xtbx(ixt) … … 5503 5503 ! cam verif 5504 5504 #ifdef ISOVERIF 5505 doixt=1,niso5505 DO ixt=1,niso 5506 5506 CALL iso_verif_noNaN(fxt(ixt,il,inb(il)),'cv30_yield 5083') 5507 5507 enddo … … 5560 5560 CALL iso_verif_traceur_justmass(fxt(1,il,inb(il)), & 5561 5561 'cv30_routine 4364b') 5562 doixt=1,ntraciso5562 DO ixt=1,ntraciso 5563 5563 xtnew(ixt)=xt(ixt,il,inb(il))+delt*fxt(ixt,il,inb(il)) 5564 5564 enddo … … 5598 5598 #ifdef ISO 5599 5599 frsum(il)=0.0 5600 doixt=1,ntraciso5600 DO ixt=1,ntraciso 5601 5601 fxtsum(ixt,il)=0.0 5602 5602 bxtsum(ixt,il)=0.0 … … 5617 5617 5618 5618 frsum(il)=frsum(il)+fr(il,i) 5619 doixt=1,ntraciso5619 DO ixt=1,ntraciso 5620 5620 fxtsum(ixt,il)=fxtsum(ixt,il)+fxt(ixt,il,i) 5621 5621 bxtsum(ixt,il)=bxtsum(ixt,il)+fxt(ixt,il,i) & … … 5636 5636 #ifdef ISO 5637 5637 IF (abs(csum(il)).gt.0.0) THEN 5638 doixt=1,ntraciso5638 DO ixt=1,ntraciso 5639 5639 fxt(ixt,il,i)=bxtsum(ixt,il)/csum(il) 5640 5640 enddo 5641 5641 else !if (frsum(il).gt.ridicule) THEN 5642 5642 IF (abs(frsum(il)).gt.0.0) THEN 5643 doixt=1,ntraciso5643 DO ixt=1,ntraciso 5644 5644 fxt(ixt,il,i)=fr(il,i)*fxtsum(ixt,il)/frsum(il) 5645 5645 enddo … … 5649 5649 stop 5650 5650 else !if (abs(fr(il,i))*delt.gt.ridicule) THEN 5651 doixt=1,ntraciso5651 DO ixt=1,ntraciso 5652 5652 fxt(ixt,il,i)=0.0 5653 5653 enddo … … 5666 5666 #ifdef ISO 5667 5667 #ifdef ISOVERIF 5668 doi=1,nl5669 doil=1,ncum5670 doixt=1,ntraciso5668 DO i=1,nl 5669 DO il=1,ncum 5670 DO ixt=1,ntraciso 5671 5671 CALL iso_verif_noNAN(fxt(ixt,il,i),'cv30_yield 3826') 5672 5672 enddo … … 5675 5675 #endif 5676 5676 #ifdef ISOVERIF 5677 doi=1,nl5677 DO i=1,nl 5678 5678 ! WRITE(*,*) 'cv30_routines temp 3967: i=',i 5679 doil=1,ncum5679 DO il=1,ncum 5680 5680 ! WRITE(*,*) 'cv30_routines 3969: il=',il 5681 5681 ! WRITE(*,*) 'cv30_routines temp 3967: il,i,inb(il),ncum=', … … 5737 5737 #ifdef ISOVERIF 5738 5738 ! verif finale des tendances: 5739 doi=1,nl5740 doil=1,ncum5739 DO i=1,nl 5740 DO il=1,ncum 5741 5741 IF (iso_eau.gt.0) THEN 5742 5742 CALL iso_verif_egalite_choix(fxt(iso_eau,il,i), & … … 6246 6246 epmax_diag1(idcum(i))=epmax_diag(i) ! epmax_cape 6247 6247 #ifdef ISO 6248 doixt = 1, ntraciso6248 DO ixt = 1, ntraciso 6249 6249 xtprecip1(ixt,idcum(i))=xtprecip(ixt,i) 6250 6250 enddo … … 6279 6279 ! RomP <<< 6280 6280 #ifdef ISO 6281 doixt = 1, ntraciso6281 DO ixt = 1, ntraciso 6282 6282 fxt1(ixt,idcum(i),k)=fxt(ixt,i,k) 6283 6283 xtVPrecip1(ixt,idcum(i),k)=xtVPrecip(ixt,i,k) … … 6299 6299 #ifdef ISO 6300 6300 #ifdef DIAGISO 6301 dok=1,nl6302 do i=1,ncum6301 DO k=1,nl 6302 DO i=1,ncum 6303 6303 water1(idcum(i),k)=water(i,k) 6304 6304 qp1(idcum(i),k)=qp(i,k) … … 6310 6310 fq_evapprecip1(idcum(i),k)=fq_evapprecip(i,k) 6311 6311 fq_fluxmasse1(idcum(i),k)=fq_fluxmasse(i,k) 6312 doixt = 1, ntraciso6312 DO ixt = 1, ntraciso 6313 6313 xtwater1(ixt,idcum(i),k)=xtwater(ixt,i,k) 6314 6314 xtp1(ixt,idcum(i),k)=xtp(ixt,i,k) … … 6321 6321 enddo 6322 6322 enddo 6323 do i=1,ncum6323 DO i=1,ncum 6324 6324 epmax_diag1(idcum(i))=epmax_diag(i) 6325 6325 enddo … … 6384 6384 6385 6385 IF (coef_epmax_cape.gt.1e-12) THEN 6386 doi=1,ncum6386 DO i=1,ncum 6387 6387 epmax_diag(i)=epmax-coef_epmax_cape*sqrt(cape(i)) 6388 dok=1,nl6388 DO k=1,nl 6389 6389 ep(i,k)=ep(i,k)/epmax*epmax_diag(i) 6390 6390 ep(i,k)=amax1(ep(i,k),0.0) … … 6394 6394 6395 6395 ! On recalcule hp: 6396 dok=1,nl6397 doi=1,ncum6398 6399 6396 DO k=1,nl 6397 DO i=1,ncum 6398 hp_bak(i,k)=hp(i,k) 6399 enddo 6400 6400 enddo 6401 dok=1,nlp6402 doi=1,ncum6403 6404 6401 DO k=1,nlp 6402 DO i=1,ncum 6403 hp(i,k)=h(i,k) 6404 enddo 6405 6405 enddo 6406 dok=minorig+1,nl6407 doi=1,ncum6406 DO k=minorig+1,nl 6407 DO i=1,ncum 6408 6408 IF((k.ge.icb(i)).AND.(k.le.inb(i)))THEN 6409 6409 hp(i,k)=h(i,nk(i))+(lv(i,k)+(cpd-cpv)*t(i,k))*ep(i,k)*clw(i,k) … … 6412 6412 enddo !do k=minorig+1,n 6413 6413 ! WRITE(*,*) 'cv30_routines 6218: hp(1,20)=',hp(1,20) 6414 do i=1,ncum6415 dok=1,nl6414 DO i=1,ncum 6415 DO k=1,nl 6416 6416 IF (abs(hp_bak(i,k)-hp(i,k)).gt.0.01) THEN 6417 6417 WRITE(*,*) 'i,k=',i,k
Note: See TracChangeset
for help on using the changeset viewer.