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
977cd88e
Commit
977cd88e
authored
4 years ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
module for different closure model
parent
9c460ecf
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/closure_mod.F90
+73
-0
73 additions, 0 deletions
src/closure_mod.F90
with
73 additions
and
0 deletions
src/closure_mod.F90
0 → 100644
+
73
−
0
View file @
977cd88e
module
closure
! Contains the routines to define closures
USE
basic
USE
model
,
ONLY
:
CLOS
USE
grid
USE
array
,
ONLY
:
kernel_e
,
kernel_i
USE
fields
,
ONLY
:
moments_e
,
moments_i
IMPLICIT
NONE
PUBLIC
::
apply_closure_model
CONTAINS
SUBROUTINE
apply_closure_model
IMPLICIT
NONE
! Negative out of bounds indices are put to zero (analytically correct)
moments_e
(
ips_e
-1
,:,:,:,:)
=
0._dp
moments_e
(
ips_e
-2
,:,:,:,:)
=
0._dp
moments_e
(:,
ijs_e
-1
,:,:,:)
=
0._dp
kernel_e
(
ijs_e
-1
,:,:)
=
0._dp
moments_i
(
ips_i
-1
,:,:,:,:)
=
0._dp
moments_i
(
ips_i
-2
,:,:,:,:)
=
0._dp
moments_i
(:,
ijs_i
-1
,:,:,:)
=
0._dp
kernel_i
(
ijs_i
-1
,:,:)
=
0._dp
! Positive Oob indices are approximated with a model
IF
(
CLOS
.EQ.
0
)
THEN
! zero truncation, An+1=0 for n+1>nmax
moments_e
(
ipe_e
+1
,:,:,:,:)
=
0._dp
moments_e
(
ipe_e
+2
,:,:,:,:)
=
0._dp
moments_e
(:,
ije_e
+1
,:,:,:)
=
0._dp
kernel_e
(
ije_e
+1
,:,:)
=
0._dp
moments_i
(
ipe_i
+1
,:,:,:,:)
=
0._dp
moments_i
(
ipe_i
+2
,:,:,:,:)
=
0._dp
moments_i
(:,
ije_i
+1
,:,:,:)
=
0._dp
kernel_i
(
ije_i
+1
,:,:)
=
0._dp
ELSEIF
(
CLOS
.EQ.
1
)
THEN
! Copy truncation with n+1 = min(nmax,n+1)
! here pmax+1 and pmax_2 are mapped to pmax
moments_e
(
ipe_e
+1
,:,:,:,:)
=
moments_e
(
ipe_e
,:,:,:,:)
moments_e
(
ipe_e
+2
,:,:,:,:)
=
moments_e
(
ipe_e
,:,:,:,:)
moments_e
(:,
ije_e
+1
,:,:,:)
=
moments_e
(:,
ije_e
,:,:,:)
kernel_e
(
ije_e
+1
,:,:)
=
kernel_e
(
ije_e
,:,:)
moments_i
(
ipe_i
+1
,:,:,:,:)
=
moments_i
(
ipe_i
,:,:,:,:)
moments_i
(
ipe_i
+2
,:,:,:,:)
=
moments_i
(
ipe_i
,:,:,:,:)
moments_i
(:,
ije_i
+1
,:,:,:)
=
moments_i
(:,
ije_i
,:,:,:)
kernel_i
(
ije_i
+1
,:,:)
=
kernel_i
(
ije_i
,:,:)
ELSEIF
(
CLOS
.EQ.
2
)
THEN
! Copy truncation with special treatment for Hermite
! here pmax+1 is mapped to pmax-1 and pmax+2 to pmax
moments_e
(
ipe_e
+1
,:,:,:,:)
=
moments_e
(
ipe_e
-1
,:,:,:,:)
moments_e
(
ipe_e
+2
,:,:,:,:)
=
moments_e
(
ipe_e
,:,:,:,:)
moments_e
(:,
ije_e
+1
,:,:,:)
=
moments_e
(:,
ije_e
,:,:,:)
kernel_e
(
ije_e
+1
,:,:)
=
kernel_e
(
ije_e
,:,:)
moments_i
(
ipe_i
+1
,:,:,:,:)
=
moments_i
(
ipe_i
-1
,:,:,:,:)
moments_i
(
ipe_i
+2
,:,:,:,:)
=
moments_i
(
ipe_i
,:,:,:,:)
moments_i
(:,
ije_i
+1
,:,:,:)
=
moments_i
(:,
ije_i
,:,:,:)
kernel_i
(
ije_i
+1
,:,:)
=
kernel_i
(
ije_i
,:,:)
ENDIF
END
SUBROUTINE
apply_closure_model
END
module
closure
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