      subroutine xy_ran(sta,ns) ! bernd berg feb 12 2002.
c disordered start: assigns random values to the spins in sta(2,ns). 
c x and y components stored.
      include '../../libs/fortran/implicit.sta'
      include '../../libs/fortran/constants.par'
      dimension sta(2,ns)
      do is=1,ns
        phi=tpi*rmafun()
        sta(1,is)=cos(phi)
        sta(2,is)=sin(phi)
      end do
      return
      end
