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
a6076a6b
Commit
a6076a6b
authored
2 years ago
by
WAUTELET Philippe
Browse files
Options
Downloads
Patches
Plain Diff
Philippe 20/02/2023: bugfix: update_nsv: reallocate size could be wrong in some scenarii
parent
1b776d52
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/MNH/update_nsv.f90
+4
-3
4 additions, 3 deletions
src/MNH/update_nsv.f90
with
4 additions
and
3 deletions
src/MNH/update_nsv.f90
+
4
−
3
View file @
a6076a6b
!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.
...
...
@@ -28,6 +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
!-------------------------------------------------------------------------------
!
USE
MODD_CONF
,
ONLY
:
NVERB
...
...
@@ -59,7 +60,7 @@ END IF
IF
(
.NOT.
ALLOCATED
(
CSV_CHEM_LIST_A
)
)
ALLOCATE
(
CSV_CHEM_LIST_A
(
NSV_CHEM_LIST_A
(
KMI
),
KMI
)
)
!If CSV_CHEM_LIST_A is too small, enlarge it and transfer data
IF
(
SIZE
(
CSV_CHEM_LIST_A
,
1
)
<
NSV_CHEM_LIST_A
(
KMI
)
.OR.
SIZE
(
CSV_CHEM_LIST_A
,
2
)
<
KMI
)
THEN
ALLOCATE
(
YSVCHEM_LIST_TMP
(
NSV_CHEM_LIST_A
(
KMI
),
KMI
)
)
ALLOCATE
(
YSVCHEM_LIST_TMP
(
MAX
(
SIZE
(
CSV_CHEM_LIST_A
,
1
),
NSV_CHEM_LIST_A
(
KMI
)
),
MAX
(
SIZE
(
CSV_CHEM_LIST_A
,
2
),
KMI
)
)
)
DO
JJ
=
1
,
SIZE
(
CSV_CHEM_LIST_A
,
2
)
DO
JI
=
1
,
SIZE
(
CSV_CHEM_LIST_A
,
1
)
YSVCHEM_LIST_TMP
(
JI
,
JJ
)
=
CSV_CHEM_LIST_A
(
JI
,
JJ
)
...
...
@@ -74,7 +75,7 @@ CSV_CHEM_LIST => CSV_CHEM_LIST_A(:,KMI)
IF
(
.NOT.
ALLOCATED
(
TSVLIST_A
)
)
ALLOCATE
(
TSVLIST_A
(
NSV_A
(
KMI
),
KMI
)
)
!If TSVLIST_A is too small, enlarge it and transfer data
IF
(
SIZE
(
TSVLIST_A
,
1
)
<
NSV_A
(
KMI
)
.OR.
SIZE
(
TSVLIST_A
,
2
)
<
KMI
)
THEN
ALLOCATE
(
YSVLIST_TMP
(
NSV_A
(
KMI
),
KMI
)
)
ALLOCATE
(
YSVLIST_TMP
(
MAX
(
SIZE
(
TSVLIST_A
,
1
),
NSV_A
(
KMI
)
),
MAX
(
SIZE
(
TSVLIST_A
,
2
),
KMI
)
)
)
DO
JJ
=
1
,
SIZE
(
TSVLIST_A
,
2
)
DO
JI
=
1
,
SIZE
(
TSVLIST_A
,
1
)
YSVLIST_TMP
(
JI
,
JJ
)
=
TSVLIST_A
(
JI
,
JJ
)
...
...
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