      SUBROUTINE ROTATE1(R,A,B,BAD)
C
C ROTATE 3 ELEMENT VECTOR IF NOT FILL
C
      REAL*4 R(3),A(3),B(3,3)
C
      IF ( A(1).NE.BAD .AND.
     &     A(2).NE.BAD .AND.
     &     A(3).NE.BAD ) THEN
       R(1) = A(1)*B(1,1) + A(2)*B(2,1) + A(3)*B(3,1)
       R(2) = A(1)*B(1,2) + A(2)*B(2,2) + A(3)*B(3,2)
       R(3) = A(1)*B(1,3) + A(2)*B(2,3) + A(3)*B(3,3)
      ELSE
       R(1) = BAD
       R(2) = BAD
       R(3) = BAD
      END IF
C
      RETURN
      END
