Skip to content

Commit

Permalink
program to print out the integer k generated by ran_unif
Browse files Browse the repository at this point in the history
see #495 for discussion on cce compiler
  • Loading branch information
hkershaw-brown committed Jun 21, 2023
1 parent 502af78 commit 5ac6a2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions assimilation_code/modules/utilities/random_seq_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ module random_seq_mod
twod_gaussians, &
random_gamma, &
random_inverse_gamma, &
random_exponential
random_exponential, &
ran_unif, init_ran

character(len=*), parameter :: source = 'random_seq_mod.f90'

Expand Down Expand Up @@ -415,7 +416,7 @@ function ran_unif(s)
! at this point we have an integer value for k
! this routine returns 0.0 <= real < 1.0, so do
! the divide here. return range: [0,1).

print*, 'k=', k
ran_unif = real(real(k, digits12) / 4294967296.0_digits12, r8)

end function ran_unif
Expand Down
1 change: 1 addition & 0 deletions developer_tests/random_seq/work/quickbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ test_hist
test_inv_gamma
test_random
test_reseed
test_ran_unif
)


Expand Down

0 comments on commit 5ac6a2a

Please sign in to comment.