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
a999fb49
Commit
a999fb49
authored
2 years ago
by
WAUTELET Philippe
Browse files
Options
Downloads
Patches
Plain Diff
Philippe 30/11/2022: compute XTHW_FLUX, XRCW_FLUX and XSVW_FLUX only when needed
parent
d21b5838
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/MNH/phys_paramn.f90
+15
-13
15 additions, 13 deletions
src/MNH/phys_paramn.f90
src/MNH/turb_ver_sv_flux.f90
+11
-6
11 additions, 6 deletions
src/MNH/turb_ver_sv_flux.f90
src/MNH/turb_ver_thermo_flux.f90
+28
-19
28 additions, 19 deletions
src/MNH/turb_ver_thermo_flux.f90
with
54 additions
and
38 deletions
src/MNH/phys_paramn.f90
+
15
−
13
View file @
a999fb49
...
...
@@ -237,12 +237,14 @@ END MODULE MODI_PHYS_PARAM_n
! C. Lac 11/2019: correction in the drag formula and application to building in addition to tree
! F. Auguste 02/2021: add IBM
! JL Redelsperger 03/2021: add the SW flux penetration for Ocean model case
! P. Wautelet 30/11/2022: compute XTHW_FLUX, XRCW_FLUX and XSVW_FLUX only when needed
!!-------------------------------------------------------------------------------
!
!* 0. DECLARATIONS
! ------------
!
USE
MODD_ADV_n
,
ONLY
:
XRTKEMS
USE
MODD_AIRCRAFT_BALLOON
,
ONLY
:
LFLYER
USE
MODD_ARGSLIST_ll
,
ONLY
:
LIST_ll
use
modd_budget
,
only
:
lbudget_th
,
lbudget_rv
,
lbudget_rc
,
lbudget_ri
,
lbudget_sv
,
&
NBUDGET_TH
,
NBUDGET_RV
,
NBUDGET_RC
,
NBUDGET_RI
,
NBUDGET_SV1
,
&
...
...
@@ -1460,25 +1462,25 @@ IF ( CTURB == 'TKEL' ) THEN
END
IF
!
!
IF
(
ALLOCATED
(
XTHW_FLUX
))
THEN
DEALLOCATE
(
XTHW_FLUX
)
ALLOCATE
(
XTHW_FLUX
(
SIZE
(
XTHT
,
1
),
SIZE
(
XTHT
,
2
),
SIZE
(
XTHT
,
3
)))
IF
(
ALLOCATED
(
XTHW_FLUX
)
)
DEALLOCATE
(
XTHW_FLUX
)
IF
(
LFLYER
)
THEN
ALLOCATE
(
XTHW_FLUX
(
SIZE
(
XTHT
,
1
),
SIZE
(
XTHT
,
2
),
SIZE
(
XTHT
,
3
))
)
ELSE
ALLOCATE
(
XTHW_FLUX
(
SIZE
(
XTHT
,
1
),
SIZE
(
XTHT
,
2
),
SIZE
(
XTHT
,
3
))
)
ALLOCATE
(
XTHW_FLUX
(
0
,
0
,
0
)
)
END
IF
IF
(
ALLOCATED
(
XRCW_FLUX
))
THEN
DEALLOCATE
(
XRCW_FLUX
)
ALLOCATE
(
XRCW_FLUX
(
SIZE
(
XTHT
,
1
),
SIZE
(
XTHT
,
2
),
SIZE
(
XTHT
,
3
)))
IF
(
ALLOCATED
(
XRCW_FLUX
)
)
DEALLOCATE
(
XRCW_FLUX
)
IF
(
LFLYER
)
THEN
ALLOCATE
(
XRCW_FLUX
(
SIZE
(
XTHT
,
1
),
SIZE
(
XTHT
,
2
),
SIZE
(
XTHT
,
3
))
)
ELSE
ALLOCATE
(
XRCW_FLUX
(
SIZE
(
XTHT
,
1
),
SIZE
(
XTHT
,
2
),
SIZE
(
XTHT
,
3
))
)
ALLOCATE
(
XRCW_FLUX
(
0
,
0
,
0
)
)
END
IF
!
IF
(
ALLOCATED
(
XSVW_FLUX
))
THEN
DEALLOCATE
(
XSVW_FLUX
)
ALLOCATE
(
XSVW_FLUX
(
SIZE
(
XSVT
,
1
),
SIZE
(
XSVT
,
2
),
SIZE
(
XSVT
,
3
),
SIZE
(
XSVT
,
4
)))
IF
(
ALLOCATED
(
XSVW_FLUX
)
)
DEALLOCATE
(
XSVW_FLUX
)
IF
(
LFLYER
)
THEN
ALLOCATE
(
XSVW_FLUX
(
SIZE
(
XSVT
,
1
),
SIZE
(
XSVT
,
2
),
SIZE
(
XSVT
,
3
),
SIZE
(
XSVT
,
4
))
)
ELSE
ALLOCATE
(
XSVW_FLUX
(
SIZE
(
XSVT
,
1
),
SIZE
(
XSVT
,
2
),
SIZE
(
XSVT
,
3
),
SIZE
(
XSVT
,
4
))
)
ALLOCATE
(
XSVW_FLUX
(
0
,
0
,
0
,
0
)
)
END
IF
!
CALL
TURB
(
1
,
IKU
,
1
,
IMI
,
NRR
,
NRRL
,
NRRI
,
CLBCX
,
CLBCY
,
1
,
NMODEL_CLOUD
,
&
...
...
This diff is collapsed.
Click to expand it.
src/MNH/turb_ver_sv_flux.f90
+
11
−
6
View file @
a999fb49
!MNH_LIC Copyright 1994-202
1
CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC Copyright 1994-202
2
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.
...
...
@@ -263,11 +263,13 @@ END MODULE MODI_TURB_VER_SV_FLUX
!! to avoid unknwon values outside physical domain
!! and avoid negative values in sv tendencies
!! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O
! P. Wautelet 30/11/2022: compute PWSV only when needed
!!--------------------------------------------------------------------------
!
!* 0. DECLARATIONS
! ------------
!
USE
MODD_AIRCRAFT_BALLOON
,
ONLY
:
LFLYER
USE
MODD_CST
USE
MODD_CTURB
use
modd_field
,
only
:
tfieldmetadata
,
TYPEREAL
...
...
@@ -445,11 +447,14 @@ DO JSV=1,ISV
! extrapolates the flux under the ground so that the vertical average with
! the IKB flux gives the ground value
ZFLXZ
(:,:,
KKA
)
=
ZFLXZ
(:,:,
IKB
)
DO
JK
=
IKTB
+1
,
IKTE
-1
PWSV
(:,:,
JK
,
JSV
)
=
0.5
*
(
ZFLXZ
(:,:,
JK
)
+
ZFLXZ
(:,:,
JK
+
KKL
))
END
DO
PWSV
(:,:,
IKB
,
JSV
)
=
0.5
*
(
ZFLXZ
(:,:,
IKB
)
+
ZFLXZ
(:,:,
IKB
+
KKL
))
PWSV
(:,:,
IKE
,
JSV
)
=
PWSV
(:,:,
IKE
-
KKL
,
JSV
)
IF
(
LFLYER
)
THEN
DO
JK
=
IKTB
+1
,
IKTE
-1
PWSV
(:,:,
JK
,
JSV
)
=
0.5
*
(
ZFLXZ
(:,:,
JK
)
+
ZFLXZ
(:,:,
JK
+
KKL
))
END
DO
PWSV
(:,:,
IKB
,
JSV
)
=
0.5
*
(
ZFLXZ
(:,:,
IKB
)
+
ZFLXZ
(:,:,
IKB
+
KKL
))
PWSV
(:,:,
IKE
,
JSV
)
=
PWSV
(:,:,
IKE
-
KKL
,
JSV
)
END
IF
END
IF
!
IF
(
OTURB_FLX
.AND.
tpfile
%
lopened
)
THEN
...
...
This diff is collapsed.
Click to expand it.
src/MNH/turb_ver_thermo_flux.f90
+
28
−
19
View file @
a999fb49
...
...
@@ -331,11 +331,13 @@ END MODULE MODI_TURB_VER_THERMO_FLUX
!! June 2020 (B. Vie) Patch preventing negative rc and ri in 2.3 and 3.3
!! JL Redelsperger : 03/2021: Ocean and Autocoupling O-A LES Cases
!! Sfc flux shape for LDEEPOC Case
! P. Wautelet 30/11/2022: compute PWTH and PWRC only when needed
!!--------------------------------------------------------------------------
!
!* 0. DECLARATIONS
! ------------
!
USE
MODD_AIRCRAFT_BALLOON
,
ONLY
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(:,:,
IKE
)
=
PWTH
(:,:,
IKE
-
KKL
)
PWTH
(:,:,
KKA
)
=
0.5
*
(
ZFLXZ
(:,:,
KKA
)
+
ZFLXZ
(:,:,
KKA
+
KKL
))
END
IF
END
IF
!
IF
(
OTURB_FLX
.AND.
tpfile
%
lopened
)
THEN
...
...
@@ -966,12 +973,14 @@ IF (KRR /= 0) THEN
!
ZFLXZ
(:,:,
KKA
)
=
ZFLXZ
(:,:,
IKB
)
!
DO
JK
=
IKTB
+1
,
IKTE
-1
PWRC
(:,:,
JK
)
=
0.5
*
(
ZFLXZ
(:,:,
JK
)
+
ZFLXZ
(:,:,
JK
+
KKL
))
END
DO
PWRC
(:,:,
IKB
)
=
0.5
*
(
ZFLXZ
(:,:,
IKB
)
+
ZFLXZ
(:,:,
IKB
+
KKL
))
PWRC
(:,:,
KKA
)
=
0.5
*
(
ZFLXZ
(:,:,
KKA
)
+
ZFLXZ
(:,:,
KKA
+
KKL
))
PWRC
(:,:,
IKE
)
=
PWRC
(:,:,
IKE
-
KKL
)
IF
(
LFLYER
)
THEN
DO
JK
=
IKTB
+1
,
IKTE
-1
PWRC
(:,:,
JK
)
=
0.5
*
(
ZFLXZ
(:,:,
JK
)
+
ZFLXZ
(:,:,
JK
+
KKL
))
END
DO
PWRC
(:,:,
IKB
)
=
0.5
*
(
ZFLXZ
(:,:,
IKB
)
+
ZFLXZ
(:,:,
IKB
+
KKL
))
PWRC
(:,:,
KKA
)
=
0.5
*
(
ZFLXZ
(:,:,
KKA
)
+
ZFLXZ
(:,:,
KKA
+
KKL
))
PWRC
(:,:,
IKE
)
=
PWRC
(:,:,
IKE
-
KKL
)
END
IF
!
!
IF
(
OTURB_FLX
.AND.
tpfile
%
lopened
)
THEN
...
...
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