PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
mode_tm06_h.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_h(D,TURBN,PTSTEP,PZZ,PFLXZ,PBL_DEPTH)
9 USE yomhook , ONLY : lhook, dr_hook, jphook
10! #################################################################
11!
12!
13!!**** *TM06_H* - 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_parameters, ONLY : xundef
49USE modd_turb_n, ONLY: turb_t
50!
51!
52IMPLICIT NONE
53!
54!
55!* 0.1 declarations of arguments
56!
57TYPE(dimphyex_t), INTENT(IN) :: D
58TYPE(turb_t), INTENT(IN) :: TURBN
59REAL, INTENT(IN) :: PTSTEP ! Double time step
60REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PZZ ! altitude of flux levels
61REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PFLXZ ! heat flux
62REAL, DIMENSION(MERGE(D%NIJT,0,TURBN%CTOM=='TM06')), INTENT(INOUT) :: PBL_DEPTH ! boundary layer height
63!
64!-------------------------------------------------------------------------------
65!
66! 0.2 declaration of local variables
67!
68!
69INTEGER :: JK,JIJ ! loop counter
70INTEGER :: IKB,IKTB,IKTE,IIJB,IIJE
71REAL, DIMENSION(D%NIJT) :: ZFLXZMIN ! minimum of temperature flux
72REAL, DIMENSION(D%NIJT) :: ZBL_DEPTH! BL depth at previous time-step
73REAL :: ZGROWTH ! maximum BL growth rate
74!----------------------------------------------------------------------------
75!
76!* mixed boundary layer cannot grow more rapidly than 1800m/h
77REAL(KIND=jphook) :: zhook_handle
78IF (lhook) CALL dr_hook('TM06_H',0,zhook_handle)
79zgrowth = 2.0 ! (m/s)
80!
81!----------------------------------------------------------------------------
82!
83iktb=d%NKTB
84ikte=d%NKTE
85ikb=d%NKB
86iije=d%NIJE
87iijb=d%NIJB
88
89!
90zbl_depth(iijb:iije) = pbl_depth(iijb:iije)
91!
92!$mnh_expand_where(JIJ=IIJB:IIJE)
93WHERE(zbl_depth(iijb:iije)==xundef)
94 zbl_depth(iijb:iije)=0.
95END WHERE
96!$mnh_end_expand_where(JIJ=IIJB:IIJE)
97!
98!$mnh_expand_array(JIJ=IIJB:IIJE)
99pbl_depth(iijb:iije) = xundef
100zflxzmin(iijb:iije) = pflxz(iijb:iije,ikb)
101!$mnh_end_expand_array(JIJ=IIJB:IIJE)
102!
103DO jk=iktb,ikte
104!$mnh_expand_where(JIJ=IIJB:IIJE)
105 WHERE(pflxz(iijb:iije,ikb)>0. .AND. pflxz(iijb:iije,jk)<zflxzmin(iijb:iije))
106 pbl_depth(iijb:iije) = pzz(iijb:iije,jk) - pzz(iijb:iije,ikb)
107 zflxzmin(iijb:iije) = pflxz(iijb:iije,jk)
108 END WHERE
109!$mnh_end_expand_where(JIJ=IIJB:IIJE)
110END DO
111!
112!$mnh_expand_where(JIJ=IIJB:IIJE)
113WHERE(pbl_depth(iijb:iije)/=xundef)
114 pbl_depth(iijb:iije)=min(pbl_depth(iijb:iije),zbl_depth(iijb:iije)+zgrowth*ptstep)
115END WHERE
116!$mnh_end_expand_where(JIJ=IIJB:IIJE)
117!
118!----------------------------------------------------------------------------
119IF (lhook) CALL dr_hook('TM06_H',1,zhook_handle)
120END SUBROUTINE tm06_h
121END MODULE mode_tm06_h
real, parameter xundef
subroutine tm06_h(d, turbn, ptstep, pzz, pflxz, pbl_depth)