      SUBROUTINE SATVAP(T,E,JMAX)
CJPB  REAL*4 A(25),B(25),C(25),D(25),TT(25),AI,AL,BI,BL,E3,T3,
      REAL   A(25),B(25),C(25),D(25),TT(25),AI,AL,BI,BL,E3,T3,
     C  T(1),E(1)
      DATA E3/.611/,T3/273.16/
      DATA AI/.0985921/,BI/22.488695/,AL/5.006501/,BL/19.839233/
      DATA ICALL /0/
C
C     ********  THE FLWG TWO CARDS MAKE ICE SAME AS WATER***************
      AI=AL
      BI=BL
      IF(ICALL) 1,1,2
C     SET UP THE TABLES
    1 LM=25
      TLO=200.
      THI=320.
      CALL SATVP1(A,B,C,D,TT,TLO,THI,LM)
C
C     E=SAT VAP PRESS IS NOW GIVEN BY
C
C         E(X) = A(L) + X*( B(L) + X*( C(L) + X*D(L) ) )
C                  WHERE
C     X = T - TT(L-1),   L=2,3,--,LM
C                  AND
C              TT(L-1) IS L.T.E.  T  IS L.T.E. TT(L)
C
C     FOR T L.T. TT(1) = TLO,  OR,  T G.T. TT(LM) = THI, WE USE
C         E = E3 * (TAU**A) * EXP( (A+B)*(1.-TAU) ), WITH TAU=T3/T.
C         AND A AND B DIFFER FOR ICE AND LIQUID.
C     LAST AND TLAST REMEMBER THE LAST USES TO SPEED UP THE TABLE USE
      LAST=2
      TLAST=TLO+.5*(THI-TLO)/(LM-1.)
      ICALL=1
C
C     REJOIN THE JOB AT HAND
C
    2 DO  9 J=1,JMAX
      TE=T(J)
      IF(TE-TLAST) 3,3,6
C     TE IS L.T.E. TLAST.  SEARCH IN DECREASING T
    3 LL=LAST
          DO 4 M=2,LL
          LAST=LL+2-M
          IF(TE-TT(LAST-1) ) 4,5,5
    4     CONTINUE
C     TE IS L.T. TT(1) = TLO
      TLAST=.5*(TT(1)+TT(2) )
      LAST=2
      TAU=T3/TE
      E(J)=E3*(TAU**AI)*EXP((AI+BI)*(1.-TAU) )
      GO TO 9
C       TE IS G.T.E. TT(LAST-1)
    5 X=TE-TT(LAST-1)
      TLAST=TE
      E(J)=A(LAST)+X*(B(LAST)+X*(C(LAST)+X*D(LAST) ) )
      GO TO 9
C
C     TE IS G.T. TLAST.  SEARCH IN INCREASING T
    6 LL=LAST
          DO 7 L=LL,LM
          LAST=L
          IF(TE-TT(L) ) 8,8,7
    7     CONTINUE
C       T=TE IS G.T. TT(LM) = THI
      LAST = LM
      TLAST=.5*(TT(LM)+TT(LM-1) )
      TAU=T3/TE
      E(J)=E3*(TAU**AL)*EXP( (AL+BL)*(1.-TAU) )
      GO TO 9
C     T=TE IS L.T.E. TT(L)
    8 X=TE-TT(LAST-1)
      E(J)=A(LAST)+X*(B(LAST)+X*(C(LAST)+X*D(LAST) ) )
      TLAST=TE
C         END OF J LOOP
    9 CONTINUE
C
      RETURN
      END
