From 4817fe56aaaa28370a9ea5cd1592733507a4cc1d Mon Sep 17 00:00:00 2001 From: Antoine Cyril David Hoffmann <ahoffman@spcpc606.epfl.ch> Date: Mon, 5 Oct 2020 15:21:12 +0200 Subject: [PATCH] Added z shift to the Gaussian initialization --- src/inital.F90 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/inital.F90 b/src/inital.F90 index c7eaea5b..01b9bc89 100644 --- a/src/inital.F90 +++ b/src/inital.F90 @@ -51,7 +51,7 @@ SUBROUTINE init_moments IMPLICIT NONE REAL(dp) :: noise - REAL(dp) :: kr, kz, sigma, gain + REAL(dp) :: kr, kz, sigma, gain, kz_shift INTEGER, DIMENSION(12) :: iseedarr ! Seed random number generator @@ -68,16 +68,17 @@ SUBROUTINE init_moments END DO ELSE - sigma = 5._dp - gain = 0.5_dp + sigma = 5._dp ! Gaussian sigma + gain = 0.5_dp ! Gaussian mean + kz_shift = 0.5_dp ! Gaussian z shift !**** Gaussian initialization (Hakim 2017) moments_i = 0; moments_e = 0; DO ikr=ikrs,ikre kr = krarray(ikr) DO ikz=ikzs,ikze kz = kzarray(ikz) - moments_i( 1,1, ikr,ikz, :) = gain*sigma/SQRT2 * EXP(-(kr**2+kz**2)*sigma**2/4._dp) - moments_e( 1,1, ikr,ikz, :) = gain*sigma/SQRT2 * EXP(-(kr**2+kz**2)*sigma**2/4._dp) + moments_i( 1,1, ikr,ikz, :) = gain*sigma/SQRT2 * EXP(-(kr**2+(kz-kz_shift)**2)*sigma**2/4._dp) + moments_e( 1,1, ikr,ikz, :) = gain*sigma/SQRT2 * EXP(-(kr**2+(kz-kz_shift)**2)*sigma**2/4._dp) END DO END DO ! Broad noise initialization -- GitLab