Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gyacomo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antoine Cyril David Hoffmann
Gyacomo
Commits
1f84f890
Commit
1f84f890
authored
1 year ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
secure when no mode init
parent
c3d043a4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/initial_mod.F90
+22
-21
22 additions, 21 deletions
src/initial_mod.F90
with
22 additions
and
21 deletions
src/initial_mod.F90
+
22
−
21
View file @
1f84f890
...
...
@@ -12,13 +12,13 @@ MODULE initial
CHARACTER
(
len
=
32
),
PUBLIC
,
PROTECTED
::
ACT_ON_MODES
=
'nothing'
! Initial background level (in addition to noise init)
REAL
(
xp
),
PUBLIC
,
PROTECTED
::
init_background
=
0._xp
REAL
(
xp
),
PUBLIC
,
PROTECTED
::
init_amp
=
0
._xp
REAL
(
xp
),
PUBLIC
,
PROTECTED
::
init_amp
=
1
._xp
! Initial noise amplitude (for noise init)
REAL
(
xp
),
PUBLIC
,
PROTECTED
::
init_noiselvl
=
1E-6_xp
! Initialization for random number generator
INTEGER
,
PUBLIC
,
PROTECTED
::
iseed
=
42
! Multiple mode init
INTEGER
,
PUBLIC
,
PROTECTED
::
Nmodes
=
1
INTEGER
,
PUBLIC
,
PROTECTED
::
Nmodes
=
-
1
INTEGER
,
PUBLIC
,
PROTECTED
::
I_
,
J_
,
amp_
INTEGER
,
PUBLIC
,
PROTECTED
,
ALLOCATABLE
::
ikx_init
(:),
iky_init
(:)
REAL
(
xp
),
PUBLIC
,
PROTECTED
,
ALLOCATABLE
::
mode_amp
(:)
...
...
@@ -42,24 +42,25 @@ CONTAINS
READ
(
lu_in
,
initial
)
ALLOCATE
(
ikx_init
(
Nmodes
))
ALLOCATE
(
iky_init
(
Nmodes
))
ALLOCATE
(
mode_amp
(
Nmodes
))
! expected namelist in the input file
DO
im
=
1
,
Nmodes
! default parameters
I_
=
1
! kx mode number
J_
=
1
! ky mode number
amp_
=
1._xp
! read input
READ
(
lu_in
,
mode
)
! place values found in the arrays
ikx_init
(
im
)
=
I_
iky_init
(
im
)
=
J_
mode_amp
(
im
)
=
amp_
! We treat and make check only in the initialize routine (when grid attributes are set)
ENDDO
IF
(
Nmodes
.GT.
0
)
THEN
ALLOCATE
(
ikx_init
(
Nmodes
))
ALLOCATE
(
iky_init
(
Nmodes
))
ALLOCATE
(
mode_amp
(
Nmodes
))
! expected namelist in the input file
DO
im
=
1
,
Nmodes
! default parameters
I_
=
1
! kx mode number
J_
=
1
! ky mode number
amp_
=
1._xp
! read input
READ
(
lu_in
,
mode
)
! place values found in the arrays
ikx_init
(
im
)
=
I_
iky_init
(
im
)
=
J_
mode_amp
(
im
)
=
amp_
! We treat and make check only in the initialize routine (when grid attributes are set)
ENDDO
ENDIF
END
SUBROUTINE
initial_readinputs
!******************************************************************************!
...
...
@@ -675,7 +676,7 @@ CONTAINS
LPFy
=
0
DO
ikx
=
1
,
total_nkx
DO
iky
=
1
,
local_nky
IF
(
(
abs
(
kxarray
(
ik
x
,
ik
y
))
.LT.
LPFx
*
deltakx
)
.AND.
(
abs
(
kyarray
(
iky
))
.LT.
LPFy
*
deltaky
)
)&
IF
(
(
abs
(
kxarray
(
ik
y
,
ik
x
))
.LT.
LPFx
*
deltakx
)
.AND.
(
abs
(
kyarray
(
iky
))
.LT.
LPFy
*
deltaky
)
)&
moments
(:,:,:,
iky
,
ikx
,:,:)
=
0._xp
ENDDO
ENDDO
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment