PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
mode_compute_mf_cloud.F90
Go to the documentation of this file.
1!MNH_LIC Copyright 2009-2021 CNRS, Meteo-France and Universite Paul Sabatier
2!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
3!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4!MNH_LIC for details. version 1.
5!-----------------------------------------------------------------
6! ######spl
8! ############################
9!
10IMPLICIT NONE
11CONTAINS
12!
13! ######spl
14 SUBROUTINE compute_mf_cloud(D, CST, TURBN, PARAMMF, ICEP, OSTATNW, &
15 OTAUCONV, KRR, KRRL, KRRI, &
16 PFRAC_ICE, &
17 PRV_UP, PRC_UP, PRI_UP, PEMF, &
18 PTHL_UP, PRT_UP, PFRAC_UP, PTH_UP, &
19 PEXNM, PTHLM, PRTM, PTHM, PRM, &
20 PDZZ, KKLCL, &
21 PPABSM, PRHODREF, &
22 PRC_MF, PRI_MF, PCF_MF, PSIGMF, PTAUFUNC, &
23 PHLC_HRC, PHLC_HCF, PHLI_HRI, PHLI_HCF, &
24 PWEIGHT_MF_CLOUD,PXCTV)
25
26!$ACDC singlecolumn
27
28! #################################################################
29!!
30!!**** *COMPUTE_MF_CLOUD* -
31!! compute diagnostic subgrid cumulus cloud caracteristics
32!!
33!! PURPOSE
34!! -------
35!!**** The purpose of this routine is to compute the cloud fraction and
36!! the mean cloud content associated with clouds described by the
37!! mass flux scheme
38!!
39!
40!!** METHOD
41!! ------
42!!
43!! EXTERNAL
44!! --------
45!!
46!! IMPLICIT ARGUMENTS
47!! ------------------
48!!
49!! REFERENCE
50!! ---------
51!!
52!!
53!! AUTHOR
54!! ------
55!!
56!! MODIFICATIONS
57!! -------------
58!! Original
59!! S. Riette Dec 2010 BIGA case
60!! S. Riette Aug 2011 code is split into subroutines
61!! S. Riette Jan 2012: support for both order of vertical levels
62! P. Wautelet 10/04/2019: replace ABORT and STOP calls by Print_msg
63!! A. Marcel Jan 2025: bi-Gaussian PDF and associated subgrid precipitation
64!! A. Marcel Jan 2025: relaxation of the small fraction assumption
65!! --------------------------------------------------------------------------
66!
67!* 0. DECLARATIONS
68! ------------
69!
71USE modd_cst, ONLY: cst_t
72USE modd_turb_n, ONLY: turb_t
75USE mode_msg, ONLY: print_msg
79USE yomhook, ONLY: lhook, dr_hook, jphook
80USE modd_io, ONLY:nverb_fatal
81
82IMPLICIT NONE
83
84!* 1.1 Declaration of Arguments
85!
86!
87!
88TYPE(dimphyex_t), INTENT(IN) :: D
89TYPE(cst_t), INTENT(IN) :: CST
90TYPE(turb_t), INTENT(IN) :: TURBN
91TYPE(param_mfshall_t), INTENT(IN) :: PARAMMF
92TYPE(rain_ice_param_t), INTENT(IN) :: ICEP
93INTEGER, INTENT(IN) :: KRR ! number of moist var.
94INTEGER, INTENT(IN) :: KRRL ! number of liquid water var.
95INTEGER, INTENT(IN) :: KRRI ! number of ice water var.
96LOGICAL, INTENT(IN) :: OSTATNW ! new cloud scheme also including convect. covar. contrib
97LOGICAL, INTENT(IN) :: OTAUCONV ! new convection time scale
98REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PFRAC_ICE ! liquid/ice fraction
99REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PRV_UP, PRC_UP, PRI_UP, PEMF! updraft characteritics
100REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PTHL_UP, PRT_UP ! rc,w,Mass Flux,Thetal,rt
101REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PFRAC_UP ! Updraft Fraction
102REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PTH_UP ! updraft theta
103REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PEXNM ! exner function
104REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PTHLM, PRTM ! cons. var. at t-dt
105REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PTHM ! theta
106REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PTAUFUNC ! profile convection time scale
107REAL, DIMENSION(D%NIJT,D%NKT,KRR), INTENT(IN) :: PRM ! water var. at t-dt
108REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PDZZ
109INTEGER, DIMENSION(D%NIJT), INTENT(IN) :: KKLCL ! index of updraft condensation level
110REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PPABSM, PRHODREF ! environement
111REAL, DIMENSION(D%NIJT,D%NKT), INTENT(OUT) :: PRC_MF, PRI_MF ! cloud content (INPUT=environment, OUTPUT=conv. cloud)
112REAL, DIMENSION(D%NIJT,D%NKT), INTENT(OUT) :: PCF_MF ! and cloud fraction for MF scheme
113REAL, DIMENSION(D%NIJT,D%NKT), INTENT(OUT) :: PSIGMF ! SQRT(variance) for statistical cloud scheme
114REAL, DIMENSION(D%NIJT,D%NKT), INTENT(OUT) :: PHLC_HRC, PHLC_HCF, PHLI_HRI, PHLI_HCF ! low/high cloud diagnostics
115REAL, DIMENSION(D%NIJT,D%NKT), INTENT(OUT) :: PWEIGHT_MF_CLOUD ! weight coefficient for the mass-flux cloud
116REAL, DIMENSION(D%NIJT), INTENT(IN) :: PXCTV ! SPP parameter for turbulence
117!
118! 1.2 Declaration of local variables
119!
120REAL(KIND=jphook) :: zhook_handle
121CHARACTER(LEN=100) :: CTEMP
122!------------------------------------------------------------------------
123
124! 1. INITIALISATION
125!
126IF (lhook) CALL dr_hook('COMPUTE_MF_CLOUD',0,zhook_handle)
127!
128! 2.1 Internal domain
129prc_mf(:,:) = 0.
130pri_mf(:,:) = 0.
131pcf_mf(:,:) = 0.
132psigmf(:,:) = 0.
133phlc_hcf(:,:) = 0.
134phlc_hrc(:,:) = 0.
135phli_hcf(:,:) = 0.
136phli_hri(:,:) = 0.
137pweight_mf_cloud(:,:) = 0.
138
139IF (parammf%CMF_CLOUD == 'DIRE') THEN
140 !Direct cloud scheme
141 CALL compute_mf_cloud_direct(d, parammf, &
142 &kklcl, pfrac_up, prc_up, pri_up,&
143 &prc_mf, pri_mf, pcf_mf, pweight_mf_cloud)
144 !
145ELSEIF (parammf%CMF_CLOUD == 'STAT') THEN
146 !Statistical scheme using the PDF proposed by Bougeault (81, 82) and
147 !Bechtold et al (95).
148 CALL compute_mf_cloud_stat(d, cst, turbn, parammf, &
149 &krr, krrl, krri, ostatnw, &
150 &otauconv,pfrac_ice,&
151 &pthlm, prtm, ppabsm, prm,&
152 &pdzz, pthm, pexnm,&
153 &pemf, pthl_up, prt_up,&
154 &psigmf,ptaufunc,pxctv)
155ELSEIF (parammf%CMF_CLOUD == 'BIGA') THEN
156 !Statistical scheme using the bi-gaussian PDF
157 CALL compute_mf_cloud_bigaus(d, cst, parammf, icep, krr, &
158 &prt_up, prv_up, prc_up, pri_up, pth_up, pfrac_up, &
159 &prtm, pthm, prm, &
160 &prhodref, pexnm, ppabsm, &
161 &prc_mf, pri_mf, pcf_mf, psigmf, &
162 &phlc_hrc, phlc_hcf, phli_hri, phli_hcf, pweight_mf_cloud)
163 !
164ELSEIF (parammf%CMF_CLOUD == 'NONE') THEN
165 ! No CONVECTIVE CLOUD SCHEME
166 ! Nothing to do: PRC_MF, PRI_MF, PCF_MF, PSIGMF are already filled with zero
167ELSE
168 ctemp='Shallow convection cloud scheme not valid: PARAMMF%CMF_CLOUD='//parammf%CMF_CLOUD
169 CALL print_msg(nverb_fatal, 'GEN', 'COMPUTE_MF_CLOUD', ctemp)
170ENDIF
171
172IF (lhook) CALL dr_hook('COMPUTE_MF_CLOUD',1,zhook_handle)
173
174END SUBROUTINE compute_mf_cloud
175END MODULE mode_compute_mf_cloud
integer, parameter nverb_fatal
Definition modd_io.F90:6
subroutine compute_mf_cloud_bigaus(d, cst, parammf, icep, krr, prt_up, prv_up, prc_up, pri_up, pth_up, pfrac_up, prtm, pthm, prm, prhodref, pexnm, ppabsm, prc_mf, pri_mf, pcf_mf, psigmf, phlc_hrc, phlc_hcf, phli_hri, phli_hcf, pweight_mf_cloud)
subroutine compute_mf_cloud_direct(d, parammf, kklcl, pfrac_up, prc_up, pri_up, prc_mf, pri_mf, pcf_mf, pweight_mf_cloud)
subroutine compute_mf_cloud_stat(d, cst, turbn, parammf, krr, krrl, krri, ostatnw, otauconv, pfrac_ice, pthlm, prtm, ppabsm, prm, pdzz, pthm, pexnm, pemf, pthl_up, prt_up, psigmf, ptaufunc, pxctv)
subroutine compute_mf_cloud(d, cst, turbn, parammf, icep, ostatnw, otauconv, krr, krrl, krri, pfrac_ice, prv_up, prc_up, pri_up, pemf, pthl_up, prt_up, pfrac_up, pth_up, pexnm, pthlm, prtm, pthm, prm, pdzz, kklcl, ppabsm, prhodref, prc_mf, pri_mf, pcf_mf, psigmf, ptaufunc, phlc_hrc, phlc_hcf, phli_hri, phli_hcf, pweight_mf_cloud, pxctv)