      SUBROUTINE predic

      IMPLICIT NONE

      INCLUDE 'param.txt'
      INCLUDE 'param2.txt'
      INCLUDE 'common.txt'

      REAL alpha,beta,preexp,incrho,rhoi

      COMMON /heatrl/ alpha,beta,preexp,incrho,rhoi
c--------------------------------------------------------------------

c     compute the star values of the temperature and scalar.

      IF(1.eq.1)THEN

      DO k=1,kmax
         DO j=1,jmax
            DO i=1,imax

               tnew(i,j,k)=told(i,j,k)+dt*(1.5*dtdtn(i,j,k)-0.5
     $              *dtdtnm(i,j,k))

               ymnew(i,j,k)=ymold(i,j,k)+dt*(1.5*dydtn(i,j,k)-0.5
     $              *dydtnm(i,j,k))

               rhonew(i,j,k) = 1.0/((incrho*alpha/(1.0-incrho*alpha))
     $              *tnew(i,j,k)+rhoi)

               ynew(i,j,k)=ymnew(i,j,k)/rhonew(i,j,k)

            END DO
         END DO
      END DO

      CALL scbndy(tnew,ynew,rhonew,ijet)

      END IF

c     compute the predicted star values for the velocity.

      DO k=1,kmax
         DO j=1,jmax
            DO i=1,imax

               umnew(i,j,k)=umold(i,j,k)+dt*(1.5*dudtn(i,j,k)-0.5
     $              *dudtnm(i,j,k))

               unew(i,j,k)=umnew(i,j,k)/(0.5*(rhonew(i,j,k)+rhonew(i+1,j
     $             ,k)))

               
               vmnew(i,j,k)=vmold(i,j,k)+dt*(1.5*dvdtn(i,j,k)-0.5
     $              *dvdtnm(i,j,k))

               vnew(i,j,k)=vmnew(i,j,k)/(0.5*(rhonew(i,j,k)+rhonew(i,j+1
     $             ,k)))
               
            END DO
         END DO
      END DO

      
      DO k=1,kmax-1
         DO j=1,jmax
            DO i=1,imax

               wmnew(i,j,k)=wmold(i,j,k)+dt*(1.5*dwdtn(i,j,k)-0.5
     $              *dwdtnm(i,j,k))

               wnew(i,j,k)=wmnew(i,j,k)/(0.5*(rhonew(i,j,k)+rhonew(i,j
     $              ,k+1)))

            END DO
         END DO
      END DO


      CALL bound(unew,vnew,wnew,tnew,ynew,rhonew,time,ijet,dt,zp,zw,1,ru,rp)


      RETURN
      END


