Skip to content

Commit

Permalink
Merge pull request #77 from natalieth/patch-1
Browse files Browse the repository at this point in the history
rename randomNumbers
  • Loading branch information
fjansson authored Aug 8, 2022
2 parents f2fe301 + 41bd220 commit 0fd18d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modsynturb.f90
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module modsynturb
! integer :: dimids(NDIMS)
! integer :: start(NDIMS), count(NDIMS)

type(randomNumberSequence) :: randomNumbers
type(randomNumberSequence) :: noise
contains
subroutine initsynturb
use netcdf
Expand All @@ -67,7 +67,7 @@ subroutine initsynturb
nisqrt = sqrt(2./nmodes)
nisqrt2 = sqrt(1./nmodes)
ctot = lambda/tau
randomNumbers = new_RandomNumberSequence(seed = 100)
noise = new_RandomNumberSequence(seed = 100)
nxpatch = int(dx/dxint*real(itot));
nypatch = int(dy/dyint*real(jtot));
nzpatch = kmax
Expand Down Expand Up @@ -572,11 +572,11 @@ function gaussrand(mu,sigma)
real :: temp1,temp2
temp1 = 0.
do while(temp1<eps1)
temp1 = real(getRandomReal(randomNumbers))
temp1 = real(getRandomReal(noise))
end do
temp2 = 0.
do while(temp2<eps1)
temp2 = real(getRandomReal(randomNumbers))
temp2 = real(getRandomReal(noise))
end do
gaussrand = sqrt(-2.*log(temp1))*cos(2.*pi*temp2)*sigma+mu
!val(i*2) = sqrt(-2.*log(temp1))*sin(2.*pi*temp2)*sigma+mu
Expand Down

0 comments on commit 0fd18d2

Please sign in to comment.