subroutine nbi_random_init_nbkill(nseed_nbkill,ind_nbkill,iscreen1)

  use nbi_random_nbkill
  implicit none

  !
  !  init nbi random numbers
  !  use charles karney's f90 rng interface
  !     (see nbi_random module)
  !

  integer, intent(in) :: nseed_nbkill      ! integer to init rng seed
  integer, intent(in) :: ind_nbkill      ! (eventually) no. of cpus / parallel
                                    ! random number streams.
  integer, intent(in) :: iscreen1

  !  (parallel random number streams not yet used as nubeam has not been
  !  parallelized)

  call rng_set_seed(rng_seed_nbkill,nseed_nbkill)
  call rng_step_seed(rng_seed_nbkill,ind_nbkill,-95,110)

  
! write(iscreen1,*) 'ind= ',ind_nbkill,' seed= ',rng_print_seed(rng_seed_nbkill)

  call rng_init(rng_seed_nbkill,rng_curstate_nbkill)

  call rng_number(rng_curstate_nbkill,nbi_srng_nbkill)
  nbi_srng_ptr_nbkill = 1

  call rng_gauss(rng_curstate_nbkill,nbi_sgauss_nbkill)
  nbi_sgauss_ptr_nbkill = 1

end subroutine nbi_random_init_nbkill
