     FUNCTION SinAngle(v1x,v1y,v1z,norm1,v2x,v2y,v2z,norm2)

       use Path_module, only :  Pi,KINT, KREAL

       IMPLICIT NONE

       real(KREAL) ::  v1x,v1y,v1z,norm1
       real(KREAL) ::  v2x,v2y,v2z,norm2
       real(KREAL) ::  SinAngle

       if (norm1<=1d-6) STOP "ERROR in SinAngle, norm1<=1e-6"
       if (norm2<=1d-6) STOP "ERROR in SinAngle, norm2<=1e-6"
       Sinangle=sqrt(1.-((v1x*v2x+v1y*v2y+v1z*V2z)/(norm1*norm2))**2)


     END FUNCTION SINANGLE
