Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Méso-NH code
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RODIER Quentin
Méso-NH code
Commits
e964ab16
Commit
e964ab16
authored
3 years ago
by
WAUTELET Philippe
Browse files
Options
Downloads
Patches
Plain Diff
Philippe 24/09/2021: add Goto_model_1field generic procedure + procedure for real 3D arrays
parent
2e828589
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/LIB/SURCOUCHE/src/mode_field.f90
+56
-0
56 additions, 0 deletions
src/LIB/SURCOUCHE/src/mode_field.f90
with
56 additions
and
0 deletions
src/LIB/SURCOUCHE/src/mode_field.f90
+
56
−
0
View file @
e964ab16
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
! P. Wautelet 19/06/2019: add Fieldlist_nmodel_resize subroutine + provide KMODEL to INI_FIELD_LIST when known
! P. Wautelet 19/06/2019: add Fieldlist_nmodel_resize subroutine + provide KMODEL to INI_FIELD_LIST when known
! P. Wautelet 23/01/2020: split in modd_field.f90 and mode_field.f90
! P. Wautelet 23/01/2020: split in modd_field.f90 and mode_field.f90
! JL Redelsperger 03/2021: add variables for Ocean LES and auto-coupled version
! JL Redelsperger 03/2021: add variables for Ocean LES and auto-coupled version
! P. Wautelet 24/09/2021: add Goto_model_1field generic procedure
!-----------------------------------------------------------------
!-----------------------------------------------------------------
module
mode_field
module
mode_field
...
@@ -36,6 +37,10 @@ public :: Fieldlist_goto_model
...
@@ -36,6 +37,10 @@ public :: Fieldlist_goto_model
public
::
Fieldlist_nmodel_resize
public
::
Fieldlist_nmodel_resize
public
::
Ini_field_scalars
public
::
Ini_field_scalars
interface
Goto_model_1field
module
procedure
::
Goto_model_1field_x3d
end
interface
contains
contains
SUBROUTINE
INI_FIELD_LIST
(
KMODEL
)
SUBROUTINE
INI_FIELD_LIST
(
KMODEL
)
...
@@ -4606,6 +4611,57 @@ END IF !KFROM/=KTO
...
@@ -4606,6 +4611,57 @@ END IF !KFROM/=KTO
END
SUBROUTINE
FIELDLIST_GOTO_MODEL
END
SUBROUTINE
FIELDLIST_GOTO_MODEL
subroutine
Goto_model_1field_x3d
(
hname
,
kfrom
,
kto
,
pdata
)
implicit
none
character
(
len
=*
),
intent
(
in
)
::
hname
integer
,
intent
(
in
)
::
kfrom
integer
,
intent
(
in
)
::
kto
real
,
dimension
(:,:,:),
pointer
,
intent
(
inout
)
::
pdata
integer
::
iid
integer
::
iresp
integer
::
isize
integer
::
ji
type
(
tfieldptr_x3d
),
dimension
(:),
allocatable
::
tzfield_x3d
call
Find_field_id_from_mnhname
(
hname
,
iid
,
iresp
)
isize
=
Max
(
kfrom
,
kto
)
if
(
tfieldlist
(
iid
)
%
nmodelmax
<
0
)
then
!nmodelmax is < 0 if the allocation of the field has been done by hand
!(not using a constructor, default value of nmodelmax)
!The correct value of nmodelmax is hence computed here
tfieldlist
(
iid
)
%
nmodelmax
=
Size
(
tfieldlist
(
iid
)
%
tfield_x3d
)
end
if
if
(
isize
>
tfieldlist
(
iid
)
%
nmodelmax
)
then
if
(
tfieldlist
(
iid
)
%
nmodelmax
==
0
)
then
Allocate
(
tfieldlist
(
iid
)
%
tfield_x3d
(
isize
)
)
do
ji
=
1
,
isize
tfieldlist
(
iid
)
%
tfield_x3d
(
ji
)
%
data
=>
null
()
end
do
else
Allocate
(
tzfield_x3d
(
isize
)
)
do
ji
=
1
,
Size
(
tfieldlist
(
iid
)
%
tfield_x3d
)
tzfield_x3d
(
ji
)
%
data
=>
tfieldlist
(
iid
)
%
tfield_x3d
(
ji
)
%
data
end
do
do
ji
=
Size
(
tfieldlist
(
iid
)
%
tfield_x3d
)
+
1
,
isize
tzfield_x3d
(
ji
)
%
data
=>
null
()
end
do
call
Move_alloc
(
from
=
tzfield_x3d
,
to
=
tfieldlist
(
iid
)
%
tfield_x3d
)
end
if
tfieldlist
(
iid
)
%
nmodelmax
=
isize
end
if
tfieldlist
(
iid
)
%
tfield_x3d
(
kfrom
)
%
data
=>
pdata
if
(
kfrom
/
=
kto
)
pdata
=>
tfieldlist
(
iid
)
%
tfield_x3d
(
kto
)
%
data
end
subroutine
Goto_model_1field_x3d
subroutine
Fieldlist_nmodel_resize
(
kmodelnew
)
subroutine
Fieldlist_nmodel_resize
(
kmodelnew
)
implicit
none
implicit
none
...
...
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