PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
mode_tm06.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.
6IMPLICIT NONE
7CONTAINS
8SUBROUTINE tm06(D,TURBN,CST,PTHVREF,PBL_DEPTH,PZZ,PSFTH,PMWTH,PMTH2)
9 USE yomhook , ONLY : lhook, dr_hook, jphook
10! #################################################################
11!
12!
13!!**** *TM06* - computes the Third Order Moments
14!!
15!! PURPOSE
16!! -------
17!
18!!** METHOD
19!! ------
20!!
21!! TOMs are deduced from convective normalized TOMs according to Tomas and
22!! Masson 2006
23!!
24!! EXTERNAL
25!! --------
26!!
27!! IMPLICIT ARGUMENTS
28!! ------------------
29!!
30!!
31!! REFERENCE
32!! ---------
33!!
34!! AUTHOR
35!! ------
36!! V. MAsson and S. Tomas * Meteo-France *
37!!
38!! MODIFICATIONS
39!! -------------
40!! Original sept. 2005
41!!
42!! --------------------------------------------------------------------------
43!
44!* 0. DECLARATIONS
45! ------------
46!
47USE modd_cst, ONLY: cst_t
49USE modd_parameters, ONLY: xundef
50USE modd_turb_n, ONLY: turb_t
51!
52!
53IMPLICIT NONE
54!
55!
56!* 0.1 declarations of arguments
57!
58TYPE(dimphyex_t), INTENT(IN) :: D
59TYPE(cst_t), INTENT(IN) :: CST
60TYPE(turb_t), INTENT(IN) :: TURBN
61REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PTHVREF ! reference potential temperature
62REAL, DIMENSION(MERGE(D%NIJT,0,TURBN%CTOM=='TM06')), INTENT(IN) :: PBL_DEPTH ! boundary layer height
63REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PZZ ! altitude of flux levels
64REAL, DIMENSION(D%NIJT), INTENT(IN) :: PSFTH ! surface heat flux
65REAL, DIMENSION(D%NIJT,D%NKT), INTENT(OUT):: PMWTH ! w'2th'
66REAL, DIMENSION(D%NIJT,D%NKT), INTENT(OUT):: PMTH2 ! w'th'2
67!
68!-------------------------------------------------------------------------------
69!
70! 0.2 declaration of local variables
71!
72REAL, DIMENSION(D%NIJT,D%NKT):: ZZ_O_H ! normalized height z/h (where h=BL height)
73REAL, DIMENSION(D%NIJT) :: ZWSTAR ! normalized convective velocity w*
74REAL, DIMENSION(D%NIJT) :: ZTSTAR ! normalized temperature velocity w*
75!
76INTEGER :: JK,JIJ ! loop counter
77INTEGER :: IIJE,IIJB
78INTEGER :: IKTB,IKTE,IKB,IKE,IKT,IKU ! vertical levels
79!----------------------------------------------------------------------------
80!
81REAL(KIND=jphook) :: zhook_handle
82IF (lhook) CALL dr_hook('TM06',0,zhook_handle)
83iktb=d%NKTB
84ikte=d%NKTE
85ikb=d%NKB
86ikt=d%NKT
87ike=d%NKE
88iije=d%NIJE
89iijb=d%NIJB
90iku=d%NKU
91!
92!
93!* w* and T*
94!
95!$mnh_expand_where(JIJ=IIJB:IIJE)
96WHERE(psfth(iijb:iije)>0.)
97 zwstar(iijb:iije) = ((cst%XG/pthvref(iijb:iije,ikb))*psfth(iijb:iije)*pbl_depth(iijb:iije))**(1./3.)
98 ztstar(iijb:iije) = psfth(iijb:iije) / zwstar(iijb:iije)
99ELSEWHERE
100 zwstar(iijb:iije) = 0.
101 ztstar(iijb:iije) = 0.
102END WHERE
103!$mnh_end_expand_where(JIJ=IIJB:IIJE)
104!
105!
106!* normalized height
107!
108!$mnh_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
109zz_o_h(iijb:iije,1:ikt) = xundef
110!$mnh_end_expand_array(JIJ=IIJB:IIJE,JK=1:IKT)
111DO jk=1,ikt
112 !$mnh_expand_where(JIJ=IIJB:IIJE)
113 WHERE (pbl_depth(iijb:iije)/=xundef)
114 zz_o_h(iijb:iije,jk) = (pzz(iijb:iije,jk)-pzz(iijb:iije,ikb)) / pbl_depth(iijb:iije)
115 END WHERE
116 !$mnh_end_expand_where(JIJ=IIJB:IIJE)
117END DO
118!
119!* w'th'2
120!
121pmth2(iijb:iije,1:ikt) = 0.
122!$mnh_expand_where(JIJ=IIJB:IIJE,JK=1:IKT)
123WHERE(zz_o_h(iijb:iije,1:ikt) < 0.95 .AND. zz_o_h(iijb:iije,1:ikt)/=xundef)
124 pmth2(iijb:iije,1:ikt) = 4.*(max(zz_o_h(iijb:iije,1:ikt),0.))**0.4*(zz_o_h(iijb:iije,1:ikt)-0.95)**2
125END WHERE
126!$mnh_end_expand_where(JIJ=IIJB:IIJE,JK=1:IKT)
127DO jk=iktb+1,ikte-1
128 !$mnh_expand_array(JIJ=IIJB:IIJE)
129 pmth2(iijb:iije,jk) = pmth2(iijb:iije,jk) * ztstar(iijb:iije)**2*zwstar(iijb:iije)
130 !$mnh_end_expand_array(JIJ=IIJB:IIJE)
131END DO
132!$mnh_expand_array(JIJ=IIJB:IIJE)
133pmth2(iijb:iije,ike)=pmth2(iijb:iije,ike) * ztstar(iijb:iije)**2*zwstar(iijb:iije)
134pmth2(iijb:iije,iku)=pmth2(iijb:iije,iku) * ztstar(iijb:iije)**2*zwstar(iijb:iije)
135!$mnh_end_expand_array(JIJ=IIJB:IIJE)
136!
137!
138!* w'2th'
139!
140pmwth(iijb:iije,1:ikt) = 0.
141!$mnh_expand_where(JIJ=IIJB:IIJE,JK=1:IKT)
142WHERE(zz_o_h(iijb:iije,1:ikt) <0.9 .AND. zz_o_h(iijb:iije,1:ikt)/=xundef)
143 pmwth(iijb:iije,1:ikt) = max(-7.9*(abs(zz_o_h(iijb:iije,1:ikt)-0.35))**2.9 &
144 * (abs(zz_o_h(iijb:iije,1:ikt)-1.))**0.58 + 0.37, 0.)
145END WHERE
146!$mnh_end_expand_where(JIJ=IIJB:IIJE,JK=1:IKT)
147
148DO jk=iktb+1,ikte-1
149 !$mnh_expand_array(JIJ=IIJB:IIJE)
150 pmwth(iijb:iije,jk) = pmwth(iijb:iije,jk) * zwstar(iijb:iije)**2*ztstar(iijb:iije)
151 !$mnh_end_expand_array(JIJ=IIJB:IIJE)
152END DO
153!$mnh_expand_array(JIJ=IIJB:IIJE)
154pmwth(iijb:iije,ike) = pmwth(iijb:iije,ike) * zwstar(iijb:iije)**2*ztstar(iijb:iije)
155pmwth(iijb:iije,iku) = pmwth(iijb:iije,iku) * zwstar(iijb:iije)**2*ztstar(iijb:iije)
156!$mnh_end_expand_array(JIJ=IIJB:IIJE)
157!
158!----------------------------------------------------------------------------
159IF (lhook) CALL dr_hook('TM06',1,zhook_handle)
160END SUBROUTINE tm06
161END MODULE mode_tm06
real, parameter xundef
subroutine tm06(d, turbn, cst, pthvref, pbl_depth, pzz, psfth, pmwth, pmth2)
Definition mode_tm06.F90:9