C   
C
      PARAMETER (Np   = Nmaxpart)        ! Max Nparticles, make extra 
      PARAMETER (Nrad = 80)              ! Number of shells
      PARAMETER (Nrad2= 2*Nrad+1)        ! length of an array for rad
      PARAMETER (Nzp  = 20)              ! Number of bins in Z
      PARAMETER (Nbp  = 18)              ! Number of bins in phi
      PARAMETER (Nbt  = Nrad2*Nbp)       !  length of an array for phi
      PARAMETER (bar_max = 3.5e-3)        ! max bar radius in Mpc
      PARAMETER (dZ_max  = 0.5e-5)       ! max dZ for bar search
      PARAMETER (Nmlink   = -20)             ! size of linker list
      PARAMETER (Nblink   = 112)
      parameter ( n_cool = 400000  )   ! total # of part. to be cooled
      parameter ( nh_cool = 200   )   ! total # of halos to be cooled
      parameter ( nh_prop = 50    )   ! properties of halos to be stored
      REAL halo_prop(nh_cool,nh_prop) ! to store properties of halos
                                      ! from Catshort.dat

      common /COOL/  ip_cool(n_cool), iph_cool(nh_cool,3)

c ... ip_cool is a one-dimensional array with ALL particles to be cooled
c ... iph_cool is a two-dimensional array which stores for each 
c ...     halo (1 ... nh_cool) three numbers, namely the number of 
c....     particles per halo to be cooled, the first and the last entry
c....     of particles of this halo in ip_cool(n_cool)

      COMMON /CATx/ Xp(Np),Yp(Np),Zp(Np)
      COMMON /CATv/ VXp(Np),VYp(Np),VZp(Np)
      COMMON /CATmask/ iMask(Np)
      COMMON /DISK/ Nradd(-Nrad:Nrad),Vfi(-Nrad:Nrad),Vrad(-Nrad:Nrad),
     +             Vzz(-Nrad:Nrad),Vfi2(-Nrad:Nrad),
     +             Vrad2(-Nrad:Nrad),Vzz2(-Nrad:Nrad),Radd(-Nrad:Nrad),
     +             Nzz(Nzp,Nrad),Wradd(-Nrad:Nrad)
      COMMON /DISKp/ Nradp(-Nrad:Nrad),Vfip(-Nrad:Nrad),
     +             Vradp(-Nrad:Nrad),Vzzp(-Nrad:Nrad),Vfi2p(-Nrad:Nrad),
     +             Vrad2p(-Nrad:Nrad),Vzz2p(-Nrad:Nrad),Radp(-Nrad:Nrad)
      COMMON /BAR/ Nradb(-Nrad:Nrad,Nbp),Vfib(-Nrad:Nrad,Nbp),
     +             Vradb(-Nrad:Nrad,Nbp),Vzzb(-Nrad:Nrad,Nbp),
     +             Vfi2b(-Nrad:Nrad,Nbp),Vrad2b(-Nrad:Nrad,Nbp),
     +             Vzz2b(-Nrad:Nrad,Nbp),Radb(-Nrad:Nrad,Nbp)
      COMMON /BULGE/ Nradg(-Nrad:Nrad),Vfig(-Nrad:Nrad),
     +        Vradg(-Nrad:Nrad),Vfig2(-Nrad:Nrad),Nradu(-Nrad:Nrad),
     +             Vradg2(-Nrad:Nrad),Radg(-Nrad:Nrad)
      COMMON /HALO/ Nradh(-Nrad:Nrad),Vfih(-Nrad:Nrad),
     +             Vradh(-Nrad:Nrad),Vfih2(-Nrad:Nrad),
     +             Vradh2(-Nrad:Nrad),Radh(-Nrad:Nrad)
      COMMON/BarLength/bar_angle,bar_length,bar_ecc ! params of Bar
      COMMON/DensA/Label(Nmlink:Nblink,Nmlink:Nblink,Nmlink:Nblink)
      COMMON/DensB/Lst(Np),Dens(Np),
     +             RadDens(5),Cell,dStep 

