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
Méso-NH
Méso-NH code
Commits
f397cb27
Commit
f397cb27
authored
2 years ago
by
WAUTELET Philippe
Browse files
Options
Downloads
Patches
Plain Diff
Philippe 20/02/2023: scalar variables: CSV is now allocated on each model
parent
a6076a6b
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/MNH/ground_paramn.f90
+1
-1
1 addition, 1 deletion
src/MNH/ground_paramn.f90
src/MNH/ini_nsv.f90
+4
-6
4 additions, 6 deletions
src/MNH/ini_nsv.f90
src/MNH/modd_nsv.f90
+4
-3
4 additions, 3 deletions
src/MNH/modd_nsv.f90
src/MNH/update_nsv.f90
+17
-1
17 additions, 1 deletion
src/MNH/update_nsv.f90
with
26 additions
and
11 deletions
src/MNH/ground_paramn.f90
+
1
−
1
View file @
f397cb27
...
...
@@ -590,7 +590,7 @@ IF(LBLOWSNOW) THEN
ELSE
KSV_SURF
=
NSV
ALLOCATE
(
YSV_SURF
(
KSV_SURF
))
YSV_SURF
(:)
=
CSV
(
:
)
YSV_SURF
(:)
=
CSV
(
1
:
NSV
)
ENDIF
!
!-------------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
src/MNH/ini_nsv.f90
+
4
−
6
View file @
f397cb27
...
...
@@ -744,13 +744,11 @@ IF (LBLOWSNOW) XSVMIN(NSV_SNWBEG_A(KMI):NSV_SNWEND_A(KMI))=XMNH_TINY
!
! NAME OF THE SCALAR VARIABLES IN THE DIFFERENT SV GROUPS
!
IF
(
ALLOCATED
(
CSV
))
DEALLOCATE
(
CSV
)
ALLOCATE
(
CSV
(
NSV
))
CSV
(:)
=
' '
CSV_A
(:,
KMI
)
=
' '
IF
(
LLG
)
THEN
CSV
(
NSV_LGBEG_A
(
KMI
)
)
=
'X0 '
CSV
(
NSV_LGBEG_A
(
KMI
)
+1
)
=
'Y0 '
CSV
(
NSV_LGEND_A
(
KMI
)
)
=
'Z0 '
CSV
_A
(
NSV_LGBEG_A
(
KMI
)
,
KMI
)
=
'X0 '
CSV
_A
(
NSV_LGBEG_A
(
KMI
)
+1
,
KMI
)
=
'Y0 '
CSV
_A
(
NSV_LGEND_A
(
KMI
)
,
KMI
)
=
'Z0 '
ENDIF
! Initialize scalar variable names for dust
...
...
This diff is collapsed.
Click to expand it.
src/MNH/modd_nsv.f90
+
4
−
3
View file @
f397cb27
!MNH_LIC Copyright 2001-202
2
CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC Copyright 2001-202
3
CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC for details. version 1.
...
...
@@ -52,6 +52,7 @@ REAL,DIMENSION(JPSVMAX) :: XSVMIN ! minimum value for SV variables
LOGICAL
::
LINI_NSV
(
JPMODELMAX
)
=
.FALSE.
! becomes True when routine INI_NSV is called
!
CHARACTER
(
LEN
=
NMNHNAMELGTMAX
),
DIMENSION
(:,:),
ALLOCATABLE
,
TARGET
::
CSV_CHEM_LIST_A
!Names of all the chemical variables
CHARACTER
(
LEN
=
6
),
DIMENSION
(:,:),
ALLOCATABLE
,
TARGET
::
CSV_A
!Names of the scalar variables
TYPE
(
tfieldmetadata
),
DIMENSION
(:,:),
ALLOCATABLE
,
TARGET
::
TSVLIST_A
!Metadata of all the scalar variables
INTEGER
,
DIMENSION
(
JPMODELMAX
)::
NSV_A
=
0
! total number of scalar variables
...
...
@@ -166,9 +167,9 @@ INTEGER,DIMENSION(JPMODELMAX)::NSV_SNWEND_A = 0 ! NSV_SNWBEG_A...NSV_SNWEND_A
! variables updated for the current model
!
CHARACTER
(
LEN
=
NMNHNAMELGTMAX
),
DIMENSION
(:),
POINTER
::
CSV_CHEM_LIST
!Names of all the chemical variables
TYPE
(
tfieldmetadata
),
DIMENSION
(:),
POINTER
::
T
SV
LIST
!Metadata of all
the scalar variables
CHARACTER
(
LEN
=
6
),
DIMENSION
(:),
POINTER
::
C
SV
!Names of
the scalar variables
CHARACTER
(
LEN
=
6
),
DIMENSION
(:),
ALLOCATABLE
::
C
SV
! name of
the scalar variables
TYPE
(
tfieldmetadata
),
DIMENSION
(:),
POINTER
::
T
SV
LIST
!Metadata of all
the scalar variables
INTEGER
::
NSV
=
0
! total number of user scalar variables
!
...
...
This diff is collapsed.
Click to expand it.
src/MNH/update_nsv.f90
+
17
−
1
View file @
f397cb27
...
...
@@ -28,7 +28,7 @@ END MODULE MODI_UPDATE_NSV
! P. Wautelet 10/04/2019: replace ABORT and STOP calls by Print_msg
! P. Wautelet 26/11/2021: add TSVLIST and TSVLIST_A to store the metadata of all the scalar variables
! P. Wautelet 14/01/2022: add CSV_CHEM_LIST(_A) to store the list of all chemical variables
! P. Wautelet 20/02/2023: bugfix: reallocate size was wrong in some scenarii
! P. Wautelet 20/02/2023:
manage CSV(_A) +
bugfix: reallocate size was wrong in some scenarii
!-------------------------------------------------------------------------------
!
USE
MODD_CONF
,
ONLY
:
NVERB
...
...
@@ -43,6 +43,7 @@ IMPLICIT NONE
INTEGER
,
INTENT
(
IN
)
::
KMI
! Model index
CHARACTER
(
LEN
=
JPSVNAMELGTMAX
),
DIMENSION
(:,:),
ALLOCATABLE
::
YSVNAMES_TMP
CHARACTER
(
LEN
=
6
),
DIMENSION
(:,:),
ALLOCATABLE
::
YSV_TMP
CHARACTER
(
LEN
=
NMNHNAMELGTMAX
),
DIMENSION
(:,:),
ALLOCATABLE
::
YSVCHEM_LIST_TMP
INTEGER
::
JI
,
JJ
TYPE
(
tfieldmetadata
),
DIMENSION
(:,:),
ALLOCATABLE
::
YSVLIST_TMP
...
...
@@ -71,6 +72,21 @@ END IF
CSV_CHEM_LIST
=>
CSV_CHEM_LIST_A
(:,
KMI
)
! Allocate/reallocate CSV_A
IF
(
.NOT.
ALLOCATED
(
CSV_A
)
)
ALLOCATE
(
CSV_A
(
NSV_A
(
KMI
),
KMI
)
)
!If CSV_A is too small, enlarge it and transfer data
IF
(
SIZE
(
CSV_A
,
1
)
<
NSV_A
(
KMI
)
.OR.
SIZE
(
CSV_A
,
2
)
<
KMI
)
THEN
ALLOCATE
(
YSV_TMP
(
MAX
(
SIZE
(
CSV_A
,
1
),
NSV_A
(
KMI
)
),
MAX
(
SIZE
(
CSV_A
,
2
),
KMI
)
)
)
DO
JJ
=
1
,
SIZE
(
CSV_A
,
2
)
DO
JI
=
1
,
SIZE
(
CSV_A
,
1
)
YSV_TMP
(
JI
,
JJ
)
=
CSV_A
(
JI
,
JJ
)
END
DO
END
DO
CALL
MOVE_ALLOC
(
FROM
=
YSV_TMP
,
TO
=
CSV_A
)
END
IF
CSV
=>
CSV_A
(:,
KMI
)
! Allocate/reallocate TSVLIST_A
IF
(
.NOT.
ALLOCATED
(
TSVLIST_A
)
)
ALLOCATE
(
TSVLIST_A
(
NSV_A
(
KMI
),
KMI
)
)
!If TSVLIST_A is too small, enlarge it and transfer data
...
...
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