PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
mode_compute_mf_cloud_direct.F90
Go to the documentation of this file.
1!MNH_LIC Copyright 1994-2014 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! ######spl
7! ###################################
8!
9IMPLICIT NONE
10CONTAINS
11 SUBROUTINE compute_mf_cloud_direct(D, PARAMMF, &
12 &KKLCL, PFRAC_UP, PRC_UP, PRI_UP,&
13 &PRC_MF, PRI_MF, PCF_MF, PWEIGHT_MF_CLOUD)
14
15!$ACDC singlecolumn
16
17! #################################################################
18!!
19!!**** *COMPUTE_MF_CLOUD_DIRECT* -
20!! compute diagnostic subgrid cumulus cloud caracteristics with a direct scheme
21!!
22!! PURPOSE
23!! -------
24!!**** The purpose of this routine is to compute the cloud fraction and
25!! the mean cloud content associated with clouds described by the
26!! mass flux scheme
27!!
28!
29!!** METHOD
30!! ------
31!! Updraft variables are used directly to diagnose subgrid clouds
32!! This scheme may be activated only if the selected updraft model
33!! gives the updraft fraction as an output
34!!
35!! EXTERNAL
36!! --------
37!!
38!! IMPLICIT ARGUMENTS
39!! ------------------
40!!
41!! REFERENCE
42!! ---------
43!!
44!!
45!! AUTHOR
46!! ------
47!! S. Riette moving of code previously in compute_mf_cloud code
48!!
49!! MODIFICATIONS
50!! -------------
51!! Original 25 Aug 2011
52!! S. Riette Jan 2012: support for both order of vertical levels
53!! S. Riette Apr 2013: computation begins one level lower (to be able to have a cloud
54!! on mass level just below the first saturated flux level)
55!! A. Marcel Jan 2025: relaxation of the small fraction assumption
56!! --------------------------------------------------------------------------
57!
58!* 0. DECLARATIONS
59! ------------
62USE mode_shuman_mf, ONLY: mzf_mf
63USE yomhook , ONLY : lhook, dr_hook, jphook
64!
65IMPLICIT NONE
66!
67!* 0.1 Declaration of Arguments
68!
69TYPE(dimphyex_t), INTENT(IN) :: D
70TYPE(param_mfshall_t), INTENT(IN) :: PARAMMF
71INTEGER, DIMENSION(D%NIJT), INTENT(IN) :: KKLCL ! index of updraft condensation level
72REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PFRAC_UP ! Updraft Fraction
73REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PRC_UP,PRI_UP ! updraft characteritics
74REAL, DIMENSION(D%NIJT,D%NKT), INTENT(OUT) :: PRC_MF, PRI_MF ! cloud content
75REAL, DIMENSION(D%NIJT,D%NKT), INTENT(OUT) :: PCF_MF ! and cloud fraction for MF scheme
76REAL, DIMENSION(D%NIJT,D%NKT), INTENT(OUT) :: PWEIGHT_MF_CLOUD ! weight coefficient for the mass-flux cloud
77!
78!* 0.1 Declaration of local variables
79!
80REAL(KIND=jphook) :: zhook_handle
81INTEGER :: JIJ,JK, JK0, IKB,IKE,IKL,IKT,IIJB,IIJE
82REAL, DIMENSION(D%NIJT,D%NKT) :: ZFRAC_UP_M
83!
84!* 0.2 Initialisation
85!
86IF (lhook) CALL dr_hook('COMPUTE_MF_CLOUD_DIRECT',0,zhook_handle)
87!
88ikb=d%NKB
89ike=d%NKE
90ikl=d%NKL
91ikt=d%NKT
92iijb=d%NIJB
93iije=d%NIJE
94!* 1. COMPUTATION OF SUBGRID CLOUD
95! ----------------------------
96
97!
98! Warning: updraft variables are on flux levels
99! and PRC_MF, PRI_MF and PCF_MF are on mass levels
100prc_mf(:,:)=0.
101pri_mf(:,:)=0.
102pcf_mf(:,:)=0.
103
104IF(parammf%LRELAX_ALPHA_MF) THEN
105 CALL mzf_mf(d, pfrac_up, zfrac_up_m)
106 !$mnh_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
107 pweight_mf_cloud(iijb:iije, 1:ikt) = zfrac_up_m(iijb:iije, 1:ikt)*parammf%XALPHA_MF
108 pweight_mf_cloud(iijb:iije, 1:ikt) = max(0., min(pweight_mf_cloud(iijb:iije, 1:ikt), 1.))
109 !$mnh_end_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
110ENDIF
111
112DO jij=iijb,iije
113 jk0=kklcl(jij)-ikl ! first mass level with cloud
114 jk0=max(jk0, min(ikb,ike)) !protection if KKL=1
115 jk0=min(jk0, max(ikb,ike)) !protection if KKL=-1
116 DO jk=jk0,ike-ikl,ikl
117 pcf_mf(jij,jk ) = max( 0., min(1.,parammf%XKCF_MF *0.5* ( &
118 & pfrac_up(jij,jk) + pfrac_up(jij,jk+ikl) ) ))
119 prc_mf(jij,jk) = 0.5* parammf%XKCF_MF * ( pfrac_up(jij,jk)*prc_up(jij,jk) &
120 + pfrac_up(jij,jk+ikl)*prc_up(jij,jk+ikl) )
121 pri_mf(jij,jk) = 0.5* parammf%XKCF_MF * ( pfrac_up(jij,jk)*pri_up(jij,jk) &
122 + pfrac_up(jij,jk+ikl)*pri_up(jij,jk+ikl) )
123 END DO
124END DO
125
126IF (lhook) CALL dr_hook('COMPUTE_MF_CLOUD_DIRECT',1,zhook_handle)
127
128END SUBROUTINE compute_mf_cloud_direct
subroutine compute_mf_cloud_direct(d, parammf, kklcl, pfrac_up, prc_up, pri_up, prc_mf, pri_mf, pcf_mf, pweight_mf_cloud)
subroutine mzf_mf(d, pa, pmzf)