EMPIRE DA  v1.9.1
Data assimilation codes using EMPIRE communication
 All Classes Files Functions Variables Pages
gen_rand.f90 File Reference

Go to the source code of this file.

Data Types

module  random_number_controls
 

Functions/Subroutines

subroutine uniformrandomnumbers1d (minv, maxv, n, phi)
 generate one dimension of uniform random numbers More...
 
subroutine normalrandomnumbers1d (mean, stdev, n, phi)
 generate one dimension of Normal random numbers More...
 
subroutine normalrandomnumbers2d (mean, stdev, n, k, phi)
 generate two dimensional Normal random numbers More...
 
subroutine mixturerandomnumbers1d (mean, stdev, ufac, epsi, n, phi, uniform)
 generate one dimensional vector drawn from mixture density More...
 
subroutine mixturerandomnumbers2d (mean, stdev, ufac, epsi, n, k, phi, uniform)
 generate two dimensional vector, each drawn from mixture density More...
 
subroutine random_seed_mpi (pfid)
 Subroutine to set the random seed across MPI threads. More...
 

Function/Subroutine Documentation

subroutine mixturerandomnumbers1d ( real(kind=kind(1.0d0)), intent(in)  mean,
real(kind=kind(1.0d0)), intent(in)  stdev,
real(kind=kind(1.0d0)), intent(in)  ufac,
real(kind=kind(1.0d0)), intent(in)  epsi,
integer, intent(in)  n,
real(kind=kind(1.0d0)), dimension(n), intent(out)  phi,
logical, intent(out)  uniform 
)

generate one dimensional vector drawn from mixture density

Parameters
[in]meanMean of normal distribution
[in]stdevStandard deviation of normal distribution
[in]ufachalf-width of uniform distribution that is centered on the mean
[in]epsiProportion controlling mixture draw. if random_number > epsi then draw from uniform, else normal
[in]nsize of output vector
[out]phin dimensional mixture random numbers
[out]uniformTrue if mixture drawn from uniform. False if drawn from normal

Definition at line 158 of file gen_rand.f90.

Here is the call graph for this function:

subroutine mixturerandomnumbers2d ( real(kind=kind(1.0d0)), intent(in)  mean,
real(kind=kind(1.0d0)), intent(in)  stdev,
real(kind=kind(1.0d0)), intent(in)  ufac,
real(kind=kind(1.0d0)), intent(in)  epsi,
integer, intent(in)  n,
integer, intent(in)  k,
real(kind=kind(1.0d0)), dimension(n,k), intent(out)  phi,
logical, dimension(k), intent(out)  uniform 
)

generate two dimensional vector, each drawn from mixture density

Parameters
[in]meanMean of normal distribution
[in]stdevStandard deviation of normal distribution
[in]ufachalf-width of uniform distribution that is centered on the mean
[in]epsiProportion controlling mixture draw. if random_number > epsi then draw from uniform, else normal
[in]nfirst dimension of output vector
[in]ksecond dimension of output vector
[out]phin,k dimensional mixture random numbers
[out]uniformk dimensional logical with uniform(i) True if phi(:,i) drawn from uniform. False if drawn from normal

Definition at line 207 of file gen_rand.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine normalrandomnumbers1d ( real(kind=rk), intent(in)  mean,
real(kind=rk), intent(in)  stdev,
integer, intent(in)  n,
real(kind=rk), dimension(n), intent(out)  phi 
)

generate one dimension of Normal random numbers

Parameters
[in]nn size of output vector
[in]meanmean mean of normal distribution
[in]stdevstdev Standard Deviation of normal distribution
[out]phiphi n dimensional normal random numbers

Definition at line 74 of file gen_rand.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine normalrandomnumbers2d ( real(kind=rk), intent(in)  mean,
real(kind=rk), intent(in)  stdev,
integer, intent(in)  n,
integer, intent(in)  k,
real(kind=rk), dimension(n,k), intent(out)  phi 
)

generate two dimensional Normal random numbers

Parameters
[in]nn first dimension of output vector
[in]kk second dimension of output vector
[in]meanmean mean of normal distribution
[in]stdevstdev Standard Deviation of normal distribution
[out]phiphi n,k dimensional normal random numbers

Definition at line 109 of file gen_rand.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine random_seed_mpi ( integer, intent(in)  pfid)

Subroutine to set the random seed across MPI threads.

Parameters
[in]pfidThe process identifier of the MPI process

Definition at line 233 of file gen_rand.f90.

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine uniformrandomnumbers1d ( real(kind=rk), intent(in)  minv,
real(kind=rk), intent(in)  maxv,
integer, intent(in)  n,
real(kind=rk), dimension(n), intent(out)  phi 
)

generate one dimension of uniform random numbers

Parameters
[in]nn size of output vector
[in]minvminv minimum value of uniform distribution
[in]maxvmaxv maximum value of uniform distribution
[out]phiphi n dimensional uniform random numbers

Definition at line 59 of file gen_rand.f90.

Here is the caller graph for this function: