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
69018883
Commit
69018883
authored
4 years ago
by
WAUTELET Philippe
Browse files
Options
Downloads
Patches
Plain Diff
Philippe 19/02/2021: bugfix: RIM and ACC terms for budgets are now correctly stored
parent
34320971
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/rain_ice_fast_rs.f90
+40
-18
40 additions, 18 deletions
src/MNH/rain_ice_fast_rs.f90
with
40 additions
and
18 deletions
src/MNH/rain_ice_fast_rs.f90
+
40
−
18
View file @
69018883
!MNH_LIC Copyright 1995-202
0
CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC Copyright 1995-202
1
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.
...
...
@@ -9,6 +9,7 @@
! P. Wautelet 03/06/2019: remove PACK/UNPACK intrinsics (to get more performance and better OpenACC support)
! P. Wautelet 05/06/2019: optimisations
! P. Wautelet 02/2020: use the new data structures and subroutines for budgets
! P. Wautelet 19/02/2021: bugfix: RIM and ACC terms for budgets are now correctly stored
!-----------------------------------------------------------------
MODULE
MODE_RAIN_ICE_FAST_RS
...
...
@@ -38,7 +39,7 @@ use MODD_RAIN_ICE_PARAM, only: NACCLBDAR, NACCLBDAS, NGAMINC, X0DEPS, X1DEPS, XA
XKER_RACCSS
,
XKER_SACCRG
,
XLBRACCS1
,
XLBRACCS2
,
XLBRACCS3
,
XLBSACCR1
,
XLBSACCR2
,
XLBSACCR3
,
&
XRIMINTP1
,
XRIMINTP2
,
XSRIMCG
use
mode_budget
,
only
:
Budget_store_add
use
mode_budget
,
only
:
Budget_store_add
,
Budget_store_end
,
Budget_store_init
IMPLICIT
NONE
!
...
...
@@ -91,6 +92,15 @@ REAL, DIMENSION(:), ALLOCATABLE :: ZZW1, ZZW2, ZZW3, ZZW4 ! Work arrays
END
DO
!
IF
(
IGRIM
>
0
)
THEN
if
(
lbudget_th
)
call
Budget_store_init
(
tbudgets
(
NBUDGET_TH
),
'RIM'
,
Unpack
(
pths
(:)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rc
)
call
Budget_store_init
(
tbudgets
(
NBUDGET_RC
),
'RIM'
,
Unpack
(
prcs
(:)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rs
)
call
Budget_store_init
(
tbudgets
(
NBUDGET_RS
),
'RIM'
,
Unpack
(
prss
(:)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rg
)
call
Budget_store_init
(
tbudgets
(
NBUDGET_RG
),
'RIM'
,
Unpack
(
prgs
(:)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
!
! 5.1.0 allocations
!
...
...
@@ -161,14 +171,16 @@ REAL, DIMENSION(:), ALLOCATABLE :: ZZW1, ZZW2, ZZW3, ZZW4 ! Work arrays
END
IF
END
DO
if
(
lbudget_th
)
call
Budget_store_add
(
tbudgets
(
NBUDGET_TH
),
'RIM'
,
Unpack
(
(
zzw1
(:)
+
zzw2
(:)
)
&
*
(
plsfact
(:)
-
plvfact
(:)
)
*
prhodj
(:),
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rc
)
call
Budget_store_add
(
tbudgets
(
NBUDGET_RC
),
'RIM'
,
Unpack
(
(
-
zzw1
(:)
-
zzw2
(:)
)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rs
)
call
Budget_store_add
(
tbudgets
(
NBUDGET_RS
),
'RIM'
,
Unpack
(
(
zzw1
(:)
-
zzw3
(:)
)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rg
)
call
Budget_store_add
(
tbudgets
(
NBUDGET_RG
),
'RIM'
,
Unpack
(
(
zzw2
(:)
+
zzw3
(:)
)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
!Remark: not possible to use Budget_store_add here
! because variables modified a second time but with a if on prss + jl/=jj
if
(
lbudget_th
)
call
Budget_store_end
(
tbudgets
(
NBUDGET_TH
),
'RIM'
,
Unpack
(
pths
(:)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rc
)
call
Budget_store_end
(
tbudgets
(
NBUDGET_RC
),
'RIM'
,
Unpack
(
prcs
(:)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rs
)
call
Budget_store_end
(
tbudgets
(
NBUDGET_RS
),
'RIM'
,
Unpack
(
prss
(:)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rg
)
call
Budget_store_end
(
tbudgets
(
NBUDGET_RG
),
'RIM'
,
Unpack
(
prgs
(:)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
DEALLOCATE
(
ZZW3
)
DEALLOCATE
(
ZZW2
)
...
...
@@ -190,6 +202,14 @@ REAL, DIMENSION(:), ALLOCATABLE :: ZZW1, ZZW2, ZZW3, ZZW4 ! Work arrays
END
DO
!
IF
(
IGACC
>
0
)
THEN
if
(
lbudget_th
)
call
Budget_store_init
(
tbudgets
(
NBUDGET_TH
),
'ACC'
,
Unpack
(
pths
(:)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rr
)
call
Budget_store_init
(
tbudgets
(
NBUDGET_RR
),
'ACC'
,
Unpack
(
prrs
(:)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rs
)
call
Budget_store_init
(
tbudgets
(
NBUDGET_RS
),
'ACC'
,
Unpack
(
prss
(:)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rg
)
call
Budget_store_init
(
tbudgets
(
NBUDGET_RG
),
'ACC'
,
Unpack
(
prgs
(:)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
!
! 5.2.0 allocations
!
...
...
@@ -299,14 +319,16 @@ REAL, DIMENSION(:), ALLOCATABLE :: ZZW1, ZZW2, ZZW3, ZZW4 ! Work arrays
END
IF
END
DO
if
(
lbudget_th
)
call
Budget_store_add
(
tbudgets
(
NBUDGET_TH
),
'ACC'
,
Unpack
(
(
zzw4
(:)
+
zzw2
(:)
)
&
*
(
plsfact
(:)
-
plvfact
(:)
)
*
prhodj
(:),
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rr
)
call
Budget_store_add
(
tbudgets
(
NBUDGET_RR
),
'ACC'
,
Unpack
(
(
-
zzw4
(:)
-
zzw2
(:)
)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rs
)
call
Budget_store_add
(
tbudgets
(
NBUDGET_RS
),
'ACC'
,
Unpack
(
(
zzw4
(:)
-
zzw3
(:)
)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rg
)
call
Budget_store_add
(
tbudgets
(
NBUDGET_RG
),
'ACC'
,
Unpack
(
(
zzw2
(:)
+
zzw3
(:)
)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
!Remark: not possible to use Budget_store_add here
! because variables modified a second time but with a if on prss + jl/=jj
if
(
lbudget_th
)
call
Budget_store_end
(
tbudgets
(
NBUDGET_TH
),
'ACC'
,
Unpack
(
pths
(:)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rr
)
call
Budget_store_end
(
tbudgets
(
NBUDGET_RR
),
'ACC'
,
Unpack
(
prrs
(:)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rs
)
call
Budget_store_end
(
tbudgets
(
NBUDGET_RS
),
'ACC'
,
Unpack
(
prss
(:)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
if
(
lbudget_rg
)
call
Budget_store_end
(
tbudgets
(
NBUDGET_RG
),
'ACC'
,
Unpack
(
prgs
(:)
*
prhodj
(:),
&
mask
=
omicro
(:,:,:),
field
=
0.
)
)
DEALLOCATE
(
ZZW4
)
DEALLOCATE
(
ZZW3
)
...
...
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