!----------------------------------------------------------------------
!  inispc   initialize for operation on a given fast ion species
!
subroutine inispc
  !
  !  rga oct00 - removed levgb = 1,2
  !
  !  input  (common)  lsbeam -- pointer to current fast ion specie
  !                 abeams(lsbeam) -- atomic weight thereof
  !
  !  output (common)  abeam -- atomic weight of the current fast ion
  !                 species, defined here now.
  !
  !                   a handful of quantities formerly output by beam
  !                 code routines parms and bparms, back when the beam
  !                 code only handled a single fast ion species.
  !
  use nbi_com
  use physconst_mod, only : evptocm_sec
  !
  !============
  implicit none
  integer :: ig
  !============
  real(fp) :: zvnorm,xom,evptocm_sec2
  !============
  real(fp) :: zenorm = 1000.0_fp
  !-------------------------------------
  !
  evptocm_sec2=evptocm_sec*evptocm_sec
  abeam=abeams(lsbeam)
  if(nlheavy(lsbeam)) then
     xzbeami=1.0_fp  ! =1 after initial ionization
  else
     xzbeami=xzbeams(lsbeam)
  end if
  !
  rmassb=abeam*zmp
  !
  v2toev=abeam/evptocm_sec2
  !
  call xjaini
  !
  !-----------------/compute dtnv
  !  moved from parms and specie mass dependence introduced:  dmc jan 92
  !  the adjustment in this orbit integrator timestep control factor is
  !  made such that deuterium orbit stepsizes are not changed
  !
  zvnorm=evptocm_sec*sqrt(2.0_fp*zenorm/abeam)
  dtnv=dtn*zvnorm
  !-----------------
  !
  xom=0.0_fp
  !
  if(nlfbm) then
     !
     !	establish maximum v**2 in beam distribution, and delta e
     !
     ebdmaxm=ebdmaxa(lsbeam)
     epbdmx=evptocm_sec2*ebdmaxm/abeam
     !
  end if
  !
  !  thermal species corresponding to current fast ion species
  !
  nbs=0
  do ig=1,ng
     if((abs(aplasm(ig)-abeam).lt.0.05_fp).and. &
          (abs(backz(ig)-xzbeami).lt.0.05_fp)) nbs=ig

  end do
  !
  return
end subroutine inispc
