*DK UTILITY                                                                        UTILITY.1        
CDIR$ NOLIST                                                                       UTILITY.2        
      SUBROUTINE TRSOLV(A,B,C,F,W,X,IF,I1,I2,KF,K1,K2,NF)
      SAVE
C     ****     SOLVES TRIDIAGONAL SYSTEM                                           UTILITY.5        
C     ****     A(I,K)*X(I,K-1)+B(I,K)*X(I,K)+C(I,K)*X(I,K+1)=F(I,K)                UTILITY.6        
C     ****     WHERE I=I1,I2,1 AND K=K1,K2,1 AND A(I,K1)=C(I,K2)=0.                UTILITY.7        
C     ****     ARRAYS A,B,C,F,X ARE DIMENSIONED (IF,KF)                            UTILITY.8        
C     ****     WHERE 1.LE.I1.LT.I2.LE.IF AND 1.LE.K1.LT.K2.LE.KF                   UTILITY.9        
C     ****     W IS WORK SPACE DIMENSIONED (IF,3*KF)                               UTILITY.10       
C     ****     THE ROUTINE USES VECTOR OPERATIONS ON ARRAYS OF LENGTH              UTILITY.11       
C     ****     IMAX=I2-I1+1                                                        UTILITY.12       
      DIMENSION A(IF,KF),B(IF,KF),C(IF,KF),F(IF,KF),W(IF,3*KF),X(IF,KF)
      IMAX=I2-I1+1
      K1P=K1+1
      GO TO(1,2),NF
    1 CONTINUE
C     ****          LOWER BOUNDARY                                                 UTILITY.18       
C     ****          W(K1)=B(K1)                                                    UTILITY.19       
      DO 3 I=I1,I2
      W(I,K1)=B(I,K1)
    3 CONTINUE
C     ****          SWEEP THROUGH K                                                UTILITY.23       
      DO 4 K=K1P,K2
C     ****          W(KF+K-1)=C(K-1)/W(K-1)                                        UTILITY.25       
      CALL QVDIV0(W(I1,KF+K-1),C(I1,K-1),W(I1,K-1),IMAX)
C     ****          W(K)=A(K)*W(KF+K-1)                                            UTILITY.27       
      CALL QVMPY0(W(I1,K),A(I1,K),W(I1,KF+K-1),IMAX)
C     ****          W(K)=B(K)-W(K)                                                 UTILITY.29       
      CALL QVSUB0(W(I1,K),B(I1,K),W(I1,K),IMAX)
    4 CONTINUE
    2 CONTINUE
C     ****          LOWER BOUNDARY                                                 UTILITY.33       
C     ****          W(2*KF+K1)=F(K1)/W(K1)                                         UTILITY.34       
      CALL QVDIV0(W(I1,2*KF+K1),F(I1,K1),W(I1,K1),IMAX)
      DO 5 K=K1P,K2
C     ****          W(2*KF+K)=A(K)*W(2*KF+K-1)                                     UTILITY.37       
      CALL QVMPY0(W(I1,2*KF+K),A(I1,K),W(I1,2*KF+K-1),IMAX)
C     ****          W(2*KF+K)=F(K)-W(2*KF+K)                                       UTILITY.39       
      CALL QVSUB0(W(I1,2*KF+K),F(I1,K),W(I1,2*KF+K),IMAX)
C     ****          W(2*KF+K)=W(2*KF+K)/W(K)                                       UTILITY.41       
      CALL QVDIV0(W(I1,2*KF+K),W(I1,2*KF+K),W(I1,K),IMAX)
    5 CONTINUE
C     ****          BACK SUBSTITUTION                                              UTILITY.44       
C     ****          X(K2)=W(2*KF+K2)                                               UTILITY.45       
      DO 6 I=I1,I2
      X(I,K2)=W(I,2*KF+K2)
    6 CONTINUE
      DO 7 KK=K1P,K2
      K=K1+K2-KK
C     ****          X(K)=W(KF+K)*X(K+1)                                            UTILITY.51       
      CALL QVMPY0(X(I1,K),W(I1,KF+K),X(I1,K+1),IMAX)
C     ****          X(K)=W(2*KF+K)-X(K)                                            UTILITY.53       
      CALL QVSUB0(X(I1,K),W(I1,2*KF+K),X(I1,K),IMAX)
    7 CONTINUE
      RETURN
      END
