8 common/clouds/ xcl(3,mcl),xdotcl(3,mcl),bodycl(mcl),rcl2(mcl),
9 & clm(mcl),clmdot(mcl),cldot,vcl,sigma,rb2,pcl2,
10 & tcl,stepcl,ncl,newcl
20 a(k+1) = 2.0*
ran2(idum1) - 1.0
21 a(1) = a(1) + a(k+1)**2
23 IF (a(1).GT.1.0) go to 1
25 xcl(k,j) = a(k+1)*sqrt(rb2/a(1))
27 ranphi = twopi*
ran2(idum1)
28 randi = sqrt(
ran2(idum1))
38 a(6) = twopi*
ran2(idum1)
39 a(k+10) = vcl + sigma*sqrt(-2.0d0*log(a(5)))*cos(a(6))
41 a(10) = sqrt(a(11)**2 + a(12)**2 + a(13)**2)
45 a(11) = a(10)*a(2)*a(3)
46 a(12) = a(10)*a(1)*a(3)
48 phi = datan2(-xcl(1,j),(-xcl(2,j)))
49 a(1) = xcl(3,j)/sqrt(rb2)
57 xdotcl(1,j) = -a(4)*a(1)*a(11) + a(2)*a(12) - a(3)*a(1)*a(13)
58 xdotcl(2,j) = -a(4)*a(2)*a(11) - a(1)*a(12) - a(3)*a(2)*a(13)
59 xdotcl(3,j) = -a(3)*a(11) + a(4)*a(13)
61 xdotcl(1,j) = xdotcl(1,j) + 0.5*tidal(4)*xcl(2,j)
62 xdotcl(2,j) = xdotcl(2,j) - 0.5*tidal(4)*xcl(1,j)
66 xcl(k,j) = xcl(k,j) - rdens(k)