init_random_seed_by_system_clock(3f) - [M_random] seed random_number(3f) with system clock value (LICENSE:MIT)
Synopsis
Description
Example
Author
License
subroutine init_random_seed_by_system_clock()
A simple wrapper around random_seed(3f) that uses the system clock to initialize the seed so you can easily call random_number(3f) with varying pseudo-random real number sequences
Sample program:
program demo_init_random_seed_by_system_clock use M_random, only : init_random_seed_by_system_clock integer :: i real :: x call init_random_seed_by_system_clock() do i=1,10 ! generate real pseudo-random numbers from 0 to <1.0 call random_number(x) write(*,*)i,x enddo end program demo_init_random_seed_by_system_clockResults
> 1 0.661672294 > 2 0.274969578 > 3 0.683666587 > 4 7.35652447E-02 > 5 0.457893968 > 6 0.826303899 > 7 0.727411628 > 8 0.542535722 > 9 0.983459771 > 10 0.527638793
John S. Urban
MIT License
Nemo Release 3.1 | init_random_seed_by_system_clock (3m_random) | April 12, 2023 |