Changeset 5117 for LMDZ6/branches/Amaury_dev/libf/phylmd/cv30_routines.F90
- Timestamp:
- Jul 24, 2024, 4:23:34 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/cv30_routines.F90
r5116 r5117 206 206 ! @ do 200 k=2,nlp 207 207 ! @ do 190 i=1,len 208 ! @ if((hm(i,k).lt.work(i)). and.208 ! @ if((hm(i,k).lt.work(i)).AND. 209 209 ! @ & (hm(i,k).lt.hm(i,k-1)))THEN 210 210 ! @ work(i)=hm(i,k) … … 231 231 ! @ do 240 k=minorig+1,nl 232 232 ! @ do 230 i=1,len 233 ! @ if((hm(i,k).gt.work(i)). and.(k.le.ihmin(i)))THEN233 ! @ if((hm(i,k).gt.work(i)).AND.(k.le.ihmin(i)))THEN 234 234 ! @ work(i)=hm(i,k) 235 235 ! @ nk(i)=k … … 251 251 ! ------------------------------------------------------------------- 252 252 DO i = 1, len 253 IF (((t(i, nk(i))<250.0) .OR. (q(i, nk(i))<=0.0)) & ! @ & . or.(253 IF (((t(i, nk(i))<250.0) .OR. (q(i, nk(i))<=0.0)) & ! @ & .OR.( 254 254 ! p(i,ihmin(i)).lt.400.0 255 255 ! ) ) … … 296 296 ! @ do 290 k=minorig,nl 297 297 ! @ do 280 i=1,len 298 ! @ if((k.ge.(nk(i)+1)). and.(p(i,k).lt.plcl(i)))298 ! @ if((k.ge.(nk(i)+1)).AND.(p(i,k).lt.plcl(i))) 299 299 ! @ & icb(i)=min(icb(i),k) 300 300 ! @ 280 continue … … 302 302 ! @c 303 303 ! @ do 300 i=1,len 304 ! @ if((icb(i).ge.nlm). and.(iflag(i).eq.0))iflag(i)=9304 ! @ if((icb(i).ge.nlm).AND.(iflag(i).EQ.0))iflag(i)=9 305 305 ! @ 300 continue 306 306 … … 319 319 320 320 DO i = 1, len 321 ! @ if((icb(i).ge.nlm). and.(iflag(i).eq.0))iflag(i)=9321 ! @ if((icb(i).ge.nlm).AND.(iflag(i).EQ.0))iflag(i)=9 322 322 IF ((icb(i)==nlm) .AND. (iflag(i)==0)) iflag(i) = 9 323 323 END DO … … 683 683 ! oct3 ath = th(i,icb(i)-1) - dttrig 684 684 ! oct3 685 ! oct3 if (tdif.lt.dtcrit . or. ath.gt.ath1) THEN685 ! oct3 if (tdif.lt.dtcrit .OR. ath.gt.ath1) THEN 686 686 ! oct3 do 60 k=1,nl 687 687 ! oct3 sig(i,k) = beta*sig(i,k) - 2.*alpha*tdif*tdif … … 794 794 ! nn=0 795 795 ! do 101 i=1,len 796 ! IF(iflag1(i). eq.0)THEN796 ! IF(iflag1(i).EQ.0)THEN 797 797 ! nn=nn+1 798 798 ! tra(nn,k,j)=tra1(i,k,j) 799 ! endif799 ! END IF 800 800 ! 101 continue 801 801 ! 111 continue … … 1103 1103 ! inb(i)=k+1 1104 1104 ! capem(i)=cape(i) 1105 ! endif1106 ! endif1105 ! END IF 1106 ! END IF 1107 1107 ! 520 continue 1108 1108 ! 530 continue … … 1130 1130 ! capem(i)=cape(i) 1131 1131 ! byp(i)=(tvp(i,k+1)-tv(i,k+1))*dph(i,k+1)/p(i,k+1) 1132 ! endif1133 ! endif1132 ! END IF 1133 ! END IF 1134 1134 ! 520 continue 1135 1135 ! 530 continue … … 1153 1153 ! ori do 520 i=1,ncum 1154 1154 ! ori IF(cape(i).lt.0.0)lcape(i)=.FALSE. 1155 ! ori if((k.ge.(icb(i)+1)). and.lcape(i))THEN1155 ! ori if((k.ge.(icb(i)+1)).AND.lcape(i))THEN 1156 1156 ! ori by=(tvp(i,k)-tv(i,k))*dph(i,k)/p(i,k) 1157 1157 ! ori byp(i)=(tvp(i,k+1)-tv(i,k+1))*dph(i,k+1)/p(i,k+1) … … 1551 1551 ! do j=minorig,nl 1552 1552 ! do il=1,ncum 1553 ! IF( (i.ge.icb(il)). and.(i.le.inb(il)).and.1554 ! : (j.ge.(icb(il)-1)). and.(j.le.inb(il)))THEN1553 ! IF( (i.ge.icb(il)).AND.(i.le.inb(il)).AND. 1554 ! : (j.ge.(icb(il)-1)).AND.(j.le.inb(il)))THEN 1555 1555 ! traent(il,i,j,k)=sij(il,i,j)*tra(il,i,k) 1556 1556 ! : +(1.-sij(il,i,j))*tra(il,nk(il),k) 1557 ! endif1557 ! END IF 1558 1558 ! enddo 1559 1559 ! enddo … … 1571 1571 DO il = 1, ncum 1572 1572 IF ((i>=icb(il)) .AND. (i<=inb(il)) .AND. (nent(il, i)==0)) THEN 1573 ! @ IF(nent(il,i). eq.0)THEN1573 ! @ IF(nent(il,i).EQ.0)THEN 1574 1574 ment(il, i, i) = m(il, i) 1575 1575 qent(il, i, i) = rr(il, nk(il)) - ep(il, i) * clw(il, i) … … 1586 1586 ! do i=minorig+1,nl 1587 1587 ! do il=1,ncum 1588 ! if (i.ge.icb(il) . and. i.le.inb(il) .and. nent(il,i).eq.0) THEN1588 ! if (i.ge.icb(il) .AND. i.le.inb(il) .AND. nent(il,i).EQ.0) THEN 1589 1589 ! traent(il,i,i,j)=tra(il,nk(il),j) 1590 ! endif1590 ! END IF 1591 1591 ! enddo 1592 1592 ! enddo … … 1759 1759 ! do j=1,ntra 1760 1760 ! do il=1,ncum 1761 ! if ( i.ge.icb(il) . and. i.le.inb(il) .and. lwork(il)1762 ! : . and. csum(il,i).lt.m(il,i) ) THEN1761 ! if ( i.ge.icb(il) .AND. i.le.inb(il) .AND. lwork(il) 1762 ! : .AND. csum(il,i).lt.m(il,i) ) THEN 1763 1763 ! traent(il,i,i,j)=tra(il,nk(il),j) 1764 ! endif1764 ! END IF 1765 1765 ! enddo 1766 1766 ! enddo … … 2094 2094 END IF 2095 2095 2096 END IF ! i. eq.12096 END IF ! i.EQ.1 2097 2097 2098 2098 ! *** find mixing ratio of precipitating downdraft *** … … 2373 2373 ! : *(mp(il,2)*(trap(il,2,j)-tra(il,1,j)) 2374 2374 ! : +am(il)*(tra(il,2,j)-tra(il,1,j))) 2375 ! endif2375 ! END IF 2376 2376 ! enddo 2377 2377 ! enddo … … 2409 2409 ! ftra(il,1,k)=ftra(il,1,k)+0.1*work(il)*ment(il,j,1) 2410 2410 ! : *(traent(il,j,1,k)-tra(il,1,k)) 2411 ! endif2412 2413 ! endif2411 ! END IF 2412 2413 ! END IF 2414 2414 ! enddo 2415 2415 ! enddo … … 2531 2531 ! : *(amp1(il)*(tra(il,i+1,k)-tra(il,i,k)) 2532 2532 ! : -ad(il)*(tra(il,i,k)-tra(il,i-1,k))) 2533 ! endif2534 ! endif2533 ! END IF 2534 ! END IF 2535 2535 ! enddo 2536 2536 ! enddo … … 2580 2580 ! ftra(il,i,j)=ftra(il,i,j)+0.1*dpinv*ment(il,k,i) 2581 2581 ! : *(traent(il,k,i,j)-tra(il,i,j)) 2582 ! endif2583 ! endif2582 ! END IF 2583 ! END IF 2584 2584 ! enddo 2585 2585 ! enddo … … 2614 2614 ! do k=i,nl+1 2615 2615 ! do il=1,ncum 2616 ! if (i.le.inb(il) . and. k.le.inb(il)) THEN2616 ! if (i.le.inb(il) .AND. k.le.inb(il)) THEN 2617 2617 ! dpinv=1.0/(ph(il,i)-ph(il,i+1)) 2618 2618 ! cpinv=1.0/cpn(il,i) … … 2623 2623 ! ftra(il,i,j)=ftra(il,i,j)+0.1*dpinv*ment(il,k,i) 2624 2624 ! : *(traent(il,k,i,j)-tra(il,i,j)) 2625 ! endif2626 ! endif! i and k2625 ! END IF 2626 ! END IF ! i and k 2627 2627 ! enddo 2628 2628 ! enddo … … 2698 2698 ! : *(mp(il,i+1)*(trap(il,i+1,j)-tra(il,i,j)) 2699 2699 ! : -mp(il,i)*(trap(il,i,j)-tra(il,i-1,j))) 2700 ! endif2701 ! endif! i2700 ! END IF 2701 ! END IF ! i 2702 2702 ! enddo 2703 2703 ! enddo … … 2844 2844 DO k = i, nl 2845 2845 DO il = 1, ncum 2846 ! test if (i.ge.icb(il). and.i.le.inb(il).and.k.le.inb(il))2846 ! test if (i.ge.icb(il).AND.i.le.inb(il).AND.k.le.inb(il)) 2847 2847 ! THEN 2848 2848 IF (i<=inb(il) .AND. k<=inb(il)) THEN … … 3259 3259 3260 3260 ! inputs: 3261 integerncum, nd, nloc3262 integericb(nloc), inb(nloc)3263 realcape(nloc)3264 realclw(nloc, nd), lv(nloc, nd), t(nloc, nd), h(nloc, nd)3265 integernk(nloc)3261 INTEGER ncum, nd, nloc 3262 INTEGER icb(nloc), inb(nloc) 3263 REAL cape(nloc) 3264 REAL clw(nloc, nd), lv(nloc, nd), t(nloc, nd), h(nloc, nd) 3265 INTEGER nk(nloc) 3266 3266 ! inouts: 3267 realep(nloc, nd)3268 realhp(nloc, nd)3267 REAL ep(nloc, nd) 3268 REAL hp(nloc, nd) 3269 3269 ! outputs ou local 3270 realepmax_diag(nloc)3270 REAL epmax_diag(nloc) 3271 3271 ! locals 3272 integeri, k3273 realhp_bak(nloc, nd)3272 INTEGER i, k 3273 REAL hp_bak(nloc, nd) 3274 3274 CHARACTER (LEN = 20) :: modname = 'cv30_epmax_fn_cape' 3275 3275 CHARACTER (LEN = 80) :: abort_message … … 3277 3277 ! on recalcule ep et hp 3278 3278 3279 if(coef_epmax_cape>1e-12) THEN3279 IF (coef_epmax_cape>1e-12) THEN 3280 3280 do i = 1, ncum 3281 3281 epmax_diag(i) = epmax - coef_epmax_cape * sqrt(cape(i)) … … 3300 3300 do k = minorig + 1, nl 3301 3301 do i = 1, ncum 3302 if((k>=icb(i)).and.(k<=inb(i)))THEN3302 IF((k>=icb(i)).AND.(k<=inb(i)))THEN 3303 3303 hp(i, k) = h(i, nk(i)) + (lv(i, k) + (cpd - cpv) * t(i, k)) * ep(i, k) * clw(i, k) 3304 3304 endif … … 3308 3308 do i = 1, ncum 3309 3309 do k = 1, nl 3310 if(abs(hp_bak(i, k) - hp(i, k))>0.01) THEN3310 IF (abs(hp_bak(i, k) - hp(i, k))>0.01) THEN 3311 3311 WRITE(*, *) 'i,k=', i, k 3312 3312 WRITE(*, *) 'coef_epmax_cape=', coef_epmax_cape … … 3326 3326 enddo !do k=1,nl 3327 3327 enddo !do i=1,ncum 3328 endif!if (coef_epmax_cape.gt.1e-12) THEN3328 ENDIF !if (coef_epmax_cape.gt.1e-12) THEN 3329 3329 END SUBROUTINE cv30_epmax_fn_cape 3330 3330
Note: See TracChangeset
for help on using the changeset viewer.