anchor.diff:  !
         ZBI = 1./(25.*G)
         DO 450 JK = KLEV, 1, -1
  -      DO 450 JL = 1, KLON
  -      LLO1 = LDCUM(JL).AND.KTYPE(JL).EQ.1.AND.IHMIN(JL).EQ.KCBOT(JL)
  -      IF (LLO1.AND.JK.LT.KCBOT(JL).AND.JK.GE.ICTOP0(JL)) THEN
  -        IKB = KCBOT(JL)
  -        ZRO = RD*ZTENH(JL,JK)/(G*PAPH(JL,JK))
  -        ZDZ = (PAPH(JL,JK)-PAPH(JL,JK-1))*ZRO
  -        ZDHDZ=(CPD*(PTEN(JL,JK-1)-PTEN(JL,JK))+ALV*(PQEN(JL,JK-1)-   &
  -          PQEN(JL,JK))+(PGEO(JL,JK-1)-PGEO(JL,JK)))*G/(PGEO(JL,      &
  -          JK-1)-PGEO(JL,JK))
  -        ZDEPTH = ZGEOH(JL,JK) - ZGEOH(JL,IKB)
  -        ZFAC = SQRT(1.+ZDEPTH*ZBI)
  -        ZHMIN(JL) = ZHMIN(JL) + ZDHDZ*ZFAC*ZDZ
  -        ZRH = -ALV*(ZQSENH(JL,JK)-ZQENH(JL,JK))*ZFAC
  -        IF (ZHMIN(JL).GT.ZRH) IHMIN(JL) = JK
  -      END IF
  +          DO JL = 1, KLON
  +              LLO1 = LDCUM(JL).AND.KTYPE(JL).EQ.1.AND.IHMIN(JL).EQ.KCBOT(JL)
  +              IF (LLO1.AND.JK.LT.KCBOT(JL).AND.JK.GE.ICTOP0(JL)) THEN
  +                IKB = KCBOT(JL)
  +                ZRO = RD*ZTENH(JL,JK)/(G*PAPH(JL,JK))
  +                ZDZ = (PAPH(JL,JK)-PAPH(JL,JK-1))*ZRO
  +                ZDHDZ=(CPD*(PTEN(JL,JK-1)-PTEN(JL,JK))+ALV*(PQEN(JL,JK-1)-   &
  +                  PQEN(JL,JK))+(PGEO(JL,JK-1)-PGEO(JL,JK)))*G/(PGEO(JL,      &
  +                  JK-1)-PGEO(JL,JK))
  +                ZDEPTH = ZGEOH(JL,JK) - ZGEOH(JL,IKB)
  +                ZFAC = SQRT(1.+ZDEPTH*ZBI)
  +                ZHMIN(JL) = ZHMIN(JL) + ZDHDZ*ZFAC*ZDZ
  +                ZRH = -ALV*(ZQSENH(JL,JK)-ZQENH(JL,JK))*ZFAC
  +                IF (ZHMIN(JL).GT.ZRH) IHMIN(JL) = JK
  +              END IF
  +          end do
    450  CONTINUE
         DO 460 JL = 1, KLON
         IF (LDCUM(JL).AND.KTYPE(JL).EQ.1) THEN
  
positive.code:       ZRFL(JL)=ZDMFUP(JL,1)
    480 CONTINUE
        DO 490 JK=2,KLEV
        DO 490 JL=1,KLON
            ZRFL(JL)=ZRFL(JL)+ZDMFUP(JL,JK)
    490 CONTINUE
  !-----------------------------------------
  !*    5.0   CUMULUS DOWNDRAFT CALCULATIONS
  
negative.code:         pqi(j,k)=pqi(j,k)+fice*PCTE(j,k)*ZTMST
          PTTE(j,k)=PTTE(j,k)-ZALF*RCPD*fliq*PCTE(j,k)
        Endif
        end do
     20 CONTINUE
        ENDIF
  !
        DO 75 k=1,km
          DO j=1,lq
            pt(j,k)=ZTP1(j,k)+PTTE(j,k)*ZTMST
            ZQP1(j,k)=ZQP1(j,k)+(PQTE(j,k)-ZQQ(j,k))*ZTMST
            pqv(j,k)=ZQP1(j,k)/(1.0-ZQP1(j,k))
          end do
     75 CONTINUE
        DO 85 j=1,lq
          zprecc(j)=amax1(0.0,(PRSFC(j)+PSSFC(j))*ZTMST)
     85 CONTINUE
        IF (LMFDUDV) THEN
          DO 100 k=1,km
            DO j=1,lq
              pu(j,k)=pu(j,k)+PVOM(j,k)*ZTMST
              pv(j,k)=pv(j,k)+PVOL(j,k)*ZTMST
            end do
    100   CONTINUE
        ENDIF
  !
  