!******************** start file nbsv00.for ; group nbzero ******************
!------------------------------------------------------------------
!  nbsv00
!
!  clear the nb*sigma*v monte carlo arrays
!  these arrays are used to accumulate data on beam-beam stopping,
!  by cx and impact ionization.  the data accumulated in orbit following
!  step j is used in deposition step j+1; therefore these quantities
!  are not cleared to zero in nbzero when other quantities are cleared.
!
!  call sequence (in driver routines) should be ...
!
!   call nbzero  ! clear m.c. accumulated source fcns
!    ...
!   call nbatom  ! evaluate fast neutral stopping cross-sections
!                ! use data from past timestep beam
!
!   call depall  ! deposit all fast ions.......
!
!    ...
!   call nbsv00  ! clear beam-beam nb*sigma*v info used in nbatom
!    ...
!   call orbit   ! follow ions; accumulate new beam-beam info
!
!  this information is used in dep for stopping 1st gen beam neutrals
!   it is not for nth gen neutrals (nutrav)
!
subroutine nbsv00
  !
  use nbi_com
  !
  !  new 2d arrays (beam dist fcn zone grid)
  !  1st generation beam beam reaction rate coefficients
  !    vs. neutral beam & energy fraction, plasma 2d zone, and
  !        fast ion species index
  !
  !
  !============
  implicit none
  integer :: isb,iz,ien,ib,ibs,i
  !============
  sn00i2=0.0_fp
  sn00x2=0.0_fp
  if(levmod_halo.eq.2) then
     svn3vcx_h=0.0_fp
     svn3vcx_he=0.0_fp
     svn3vii_h=0.0_fp
     svn3vii_he=0.0_fp
  end if
  snbn02=0.0_fp
  snb0i2=0.0_fp
  if(nlfbmflr) then
     fbm_ptcl=0.0_fp        ! clean it up before the orbiting
  end if !nlfbmflr
  !
  !  also clear xzbmav here instead of in nbzero -- used in hvsigma
  !   and possibly nbatom
  !
  xzbmav=0.0_fp
  !
  !  zero out ptcl/weight sums to be evaluated in orball and used in depall
  !  on a subsequent call
  !
  !--------------------------------
  return
end subroutine nbsv00
!******************** end file nbsv00.for ; group nbzero ******************
