subroutine nbi_random_init_dep(nseed_dep,ind_dep,iscreen1)

  use nbi_random_dep
  implicit none

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

  integer, intent(in) :: nseed_dep      ! integer to init rng seed
  integer, intent(in) :: ind_dep      ! (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_dep,nseed_dep)
  call rng_step_seed(rng_seed_dep,ind_dep,-95,110)

  
! write(iscreen1,*) 'ind= ',ind_dep,' seed= ',rng_print_seed(rng_seed_dep)

  call rng_init(rng_seed_dep,rng_curstate_dep)

  call rng_number(rng_curstate_dep,nbi_srng_dep)
  nbi_srng_ptr_dep = 1

  call rng_gauss(rng_curstate_dep,nbi_sgauss_dep)
  nbi_sgauss_ptr_dep = 1

end subroutine nbi_random_init_dep
