      subroutine cprod(a1,a2,a3)

!--------------------------------------------------------------------!
!                                                                    !
!     cross product                                                  !
!                                                                    !
!********************************************************************!

      implicit none

      real,dimension(3)::a1,a2,a3

      a3(1)=a1(2)*a2(3)-a1(3)*a2(2)
      a3(2)=a1(3)*a2(1)-a1(1)*a2(3)
      a3(3)=a1(1)*a2(2)-a1(2)*a2(1)

      end subroutine cprod
