PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
mode_turb_hor.F90
Go to the documentation of this file.
1!MNH_LIC Copyright 1994-2025 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
8 SUBROUTINE turb_hor(D,CST,CSTURB,TURBN,NEBN,TLES, &
9 KSPLT, KRR, KRRL, KRRI, PTSTEP, &
10 KSV, KSV_LGBEG, KSV_LGEND, OFLAT,O2D,ONOMIXLG, &
11 OOCEAN,OCOMPUTE_SRC,OBLOWSNOW, &
12 TPFILE, &
13 PDXX,PDYY,PDZZ,PDZX,PDZY,PZZ,PRSNOW, &
14 PDIRCOSXW,PDIRCOSYW,PDIRCOSZW, &
15 PCOSSLOPE,PSINSLOPE, &
16 PINV_PDXX, PINV_PDYY, PINV_PDZZ, PMZM_PRHODJ, &
17 PK, &
18 PRHODJ,PTHVREF, &
19 PSFTHM,PSFRM,PSFSVM, &
20 PCDUEFF,PTAU11M,PTAU12M,PTAU22M,PTAU33M, &
21 PUM,PVM,PWM,PUSLOPEM,PVSLOPEM,PTHLM,PRM,PSVM, &
22 PTKEM,PLM,PLEPS, &
23 PLOCPEXNM,PATHETA,PAMOIST,PSRCM,PFRAC_ICE, &
24 PTURB_SPP,PDP,PTP,PSIGS, &
25 PRUS,PRVS,PRWS,PRTHLS,PRRS,PRSVS )
26! ################################################################
27!
28!
29!!**** *TURB_HOR* -routine to compute the source terms in the meso-NH
30!! model equations due to the non-vertical turbulent fluxes.
31!!
32!! PURPOSE
33!! -------
34! The purpose of this routine is to compute the non-vertical
35! turbulent fluxes of the evolutive variables and give back the
36! source terms to the main program.
37!
38!!** METHOD
39!! ------
40!! Complementary 3D calculations when running at high resolution;
41!! The non-vertical turbulent fluxes are computed explicitly. The
42!! contributions are cumulated in PRvarS and in DP and TP of TKE
43!
44! d(rho*T) = -d(rho*u'T'/dxx) -d(-rho*u'T'*dzx/dxx/dzz)
45! / dt / dx /dz
46!!
47!!
48!! Near the bottom of the model, uncentred evaluation of vertical
49!! gradients are required because no field values are available under
50!! the level where the gradient must be evaluated. In this case, the
51!! gradient is computed with a second order accurate uncentred scheme
52!! according to:
53!!
54!! D FF dzz3 (dzz3+dzz4)
55!! ---- = - ----------------- FF(4) + ----------------- FF(3)
56!! D z (dzz3+dzz4) dzz4 dzz3 dzz4
57!!
58!! dzz4 + 2 dzz3
59!! - ----------------- FF(2)
60!! (dzz3+dzz4) dzz3
61!!
62!! where the values are taken from:
63!!
64!! ----- FF(5)
65!! |
66!! | dzz5
67!! |
68!! ----- FF(4)
69!! |
70!! | dzz4
71!! |
72!! ----- FF(3)
73!! |
74!! | dzz3
75!! |
76!! ----- FF(2) , (D FF / DZ)
77!! | dzz2 * 0.5
78!! ----- ground
79!!
80!!
81!!
82!! EXTERNAL
83!! --------
84!!
85!!
86!! IMPLICIT ARGUMENTS
87!! ------------------
88!! Module MODD_CST : contains physical constants
89!!
90!! XG : gravity constant
91!!
92!! Module MODD_CTURB: contains the set of constants for
93!! the turbulence scheme
94!!
95!! XCMFS,XCMFB : cts for the momentum flux
96!! XCSHF : ct for the sensible heat flux
97!! XCHF : ct for the moisture flux
98!! XCTV,XCHV : cts for the T and moisture variances
99!!
100!! Module MODD_PARAMETERS
101!!
102!! JPVEXT : number of vertical external points
103!!
104!!
105!!
106!!
107!! REFERENCE
108!! ---------
109!! Book 2 of documentation (routine TURB_HOR)
110!! Book 1 of documentation (Chapter: Turbulence)
111!!
112!! AUTHOR
113!! ------
114!! Joan Cuxart * INM and Meteo-France *
115!!
116!! MODIFICATIONS
117!! -------------
118!! Original Aug 29, 1994
119!! Modifications: Feb 14, 1995 (J.Cuxart and J.Stein)
120!! Doctorization and Optimization
121!! March 21, 1995 (J.M. Carriere)
122!! Introduction of cloud water
123!! June 14, 1995 (J. Stein)
124!! rm the ZVTPV computation + bug in the all
125!! or nothing condens. case
126!! June 28, 1995 (J.Cuxart) Add the LES tools
127!! Sept 19, 1995 (J. Stein) change the surface flux
128!! computations
129!! Nov 13, 1995 (J. Stein) include the tangential fluxes
130!! bug in <u'w'> at the surface
131!! Nov 27, 1997 (V. Saravane) spliting of the routine
132!! Nov 27, 1997 (V. Masson) clearing of the routine
133!! Nov 06, 2002 (V. Masson) LES budgets
134!! Feb 20, 2003 (JP Pinty) Add PFRAC_ICE
135!! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O
136!! --------------------------------------------------------------------------
137!
138!* 0. DECLARATIONS
139! ------------
140!
141USE modd_cst, ONLY : cst_t
142USE modd_cturb, ONLY : csturb_t
143USE modd_turb_n, ONLY: turb_t, nturb_s
144USE modd_neb_n, ONLY: neb_t
145USE modd_dimphyex, ONLY: dimphyex_t
146USE modd_io, ONLY: tfiledata
147USE modd_les, ONLY: tles_t
148!
157!
158IMPLICIT NONE
159!
160!
161!* 0.1 declaration of arguments
162!
163!
164TYPE(dimphyex_t), INTENT(IN) :: D
165TYPE(cst_t), INTENT(IN) :: CST
166TYPE(csturb_t), INTENT(IN) :: CSTURB
167TYPE(turb_t), INTENT(IN) :: TURBN
168TYPE(neb_t), INTENT(IN) :: NEBN
169TYPE(tles_t), INTENT(INOUT):: TLES ! modd_les structure
170INTEGER, INTENT(IN) :: KSPLT ! current split index
171INTEGER, INTENT(IN) :: KRR ! number of moist var.
172INTEGER, INTENT(IN) :: KRRL ! number of liquid water var.
173INTEGER, INTENT(IN) :: KRRI ! number of ice water var.
174INTEGER, INTENT(IN) :: KSV,KSV_LGBEG,KSV_LGEND ! number of sv var.
175REAL, INTENT(IN) :: PTSTEP !
176LOGICAL, INTENT(IN) :: OFLAT ! Logical for zero ororography
177LOGICAL, INTENT(IN) :: ONOMIXLG ! to use turbulence for lagrangian variables (modd_conf)
178LOGICAL, INTENT(IN) :: O2D ! Logical for 2D model version (modd_conf)
179LOGICAL, INTENT(IN) :: OOCEAN ! switch for ocean version
180LOGICAL, INTENT(IN) :: OCOMPUTE_SRC ! flag to define dimensions of SIGS and SRCT variables
181LOGICAL, INTENT(IN) :: OBLOWSNOW ! switch to activate pronostic blowing snow
182
183TYPE(tfiledata), INTENT(INOUT) :: TPFILE ! Output file
184!
185REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PDXX, PDYY, PDZZ, PDZX, PDZY
186 ! Metric coefficients
187REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PZZ ! vertical grid
188REAL, INTENT(IN) :: PRSNOW ! Ratio for diffusion coeff. scalar (blowing snow)
189REAL, DIMENSION(D%NIJT), INTENT(IN) :: PDIRCOSXW, PDIRCOSYW, PDIRCOSZW
190! Director Cosinus along x, y and z directions at surface w-point
191REAL, DIMENSION(D%NIJT), INTENT(IN) :: PCOSSLOPE ! cosinus of the angle
192 ! between i and the slope vector
193REAL, DIMENSION(D%NIJT), INTENT(IN) :: PSINSLOPE ! sinus of the angle
194 ! between i and the slope vector
195
196REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PK ! Turbulent diffusion doef.
197 ! PK = PLM * SQRT(PTKEM)
198REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PINV_PDXX ! 1./PDXX
199REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PINV_PDYY ! 1./PDYY
200REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PINV_PDZZ ! 1./PDZZ
201REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PMZM_PRHODJ ! MZM(PRHODJ)
202
203REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PRHODJ ! density * grid volume
204REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PTHVREF ! ref. state VPT
205!
206REAL, DIMENSION(D%NIJT), INTENT(IN) :: PSFTHM,PSFRM
207REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PSFSVM ! surface fluxes
208!
209REAL, DIMENSION(D%NIJT), INTENT(IN) :: PCDUEFF ! Cd * || u || at time t
210REAL, DIMENSION(D%NIJT), INTENT(IN) :: PTAU11M ! <uu> in the axes linked
211 ! to the maximum slope direction and the surface normal and the binormal
212 ! at time t - dt
213REAL, DIMENSION(D%NIJT), INTENT(IN) :: PTAU12M ! <uv> in the same axes
214REAL, DIMENSION(D%NIJT), INTENT(IN) :: PTAU22M ! <vv> in the same axes
215REAL, DIMENSION(D%NIJT), INTENT(IN) :: PTAU33M ! <ww> in the same axes
216!
217! Variables at t-1
218REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PUM,PVM,PWM,PTHLM
219REAL, DIMENSION(D%NIJT,D%NKT,KRR), INTENT(IN) :: PRM ! mixing ratios at t-1,
220 ! where PRM(D%NIJT,D%NKT,1) = conservative mixing ratio
221REAL, DIMENSION(D%NIJT,D%NKT,KSV), INTENT(IN) :: PSVM ! scalar var. at t-1
222REAL, DIMENSION(D%NIJT), INTENT(IN) :: PUSLOPEM ! wind component along the
223 ! maximum slope direction
224REAL, DIMENSION(D%NIJT), INTENT(IN) :: PVSLOPEM ! wind component along the
225 ! direction normal to the maximum slope one
226!
227REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PTKEM ! TKE at time t- dt
228REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PLM ! Turb. mixing length
229REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PLEPS ! dissipative length
230REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PLOCPEXNM ! Lv(T)/Cp/Exner at time t-1
231REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PATHETA ! coefficients between
232REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PAMOIST ! s and Thetal and Rnp
233
234REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PSRCM
235 ! normalized 2nd-order flux
236 ! s'r'c/2Sigma_s2 at t-1 multiplied by Lambda_3
237!
238REAL, DIMENSION(D%NIJT,D%NKT), INTENT(IN) :: PFRAC_ICE ! ri fraction of rc+ri
239REAL, DIMENSION(D%NIJT,D%NKT,NTURB_S), INTENT(IN) :: PTURB_SPP ! SPP for turbulence
240!
241REAL, DIMENSION(D%NIJT,D%NKT), INTENT(INOUT) :: PRUS, PRVS, PRWS, PRTHLS
242REAL, DIMENSION(D%NIJT,D%NKT,KSV), INTENT(INOUT) :: PRSVS ! var. at t+1 -split-
243REAL, DIMENSION(D%NIJT,D%NKT,KRR), INTENT(INOUT) :: PRRS ! var. at t+1 -split-
244REAL, DIMENSION(D%NIJT,D%NKT), INTENT(INOUT) :: PDP,PTP ! TKE production terms
245REAL, DIMENSION(D%NIJT,D%NKT), INTENT(INOUT) :: PSIGS
246 ! IN: Vertical part of Sigma_s at t
247 ! OUT: Total Sigma_s at t
248!
249!
250!
251!* 0.2 declaration of local variables
252!
253! ---------------------------------------------------------------------------
254!
255!* 1. PRELIMINARY COMPUTATIONS
256! ------------------------
257!
258!* Exchange coefficient is limited in order to insure numerical stability
259!
260!!
261!* 2. < U' THETA'l >
262!* 3. < U' R'np >
263!* 4. < U' TPV' >
264!* 5. < V' THETA'l >
265!* 6. < V' R'np >
266!* 7. < V' TPV' >
267!
268 CALL turb_hor_thermo_flux(d,turbn,tles,ksplt, krr, krrl, krri,&
269 tpfile,oflat, o2d, &
270 pk,pinv_pdxx,pinv_pdyy,pinv_pdzz,pmzm_prhodj, &
271 pdxx,pdyy,pdzz,pdzx,pdzy, &
272 pdircosxw,pdircosyw, &
273 prhodj, &
274 psfthm,psfrm, &
275 pwm,pthlm,prm, &
276 patheta,pamoist,psrcm,pfrac_ice, &
277 pturb_spp,prthls,prrs )
278!
279!
280!* 8. TURBULENT CORRELATIONS : <THl THl>, <THl Rnp>, <Rnp Rnp>, Sigma_s
281!
282 IF (ksplt==1) &
283 CALL turb_hor_thermo_corr(d,cst,turbn,nebn,tles, &
284 krr, krrl, krri, &
285 oocean,ocompute_src,o2d,oflat, &
286 tpfile, &
287 pinv_pdxx,pinv_pdyy, &
288 pdxx,pdyy,pdzz,pdzx,pdzy, &
289 pthvref, &
290 pwm,pthlm,prm, &
291 ptkem,plm,pleps, &
292 plocpexnm,patheta,pamoist,psrcm, &
293 pturb_spp, psigs )
294!
295!
296!* 9. < U'U'>
297!* 10. < V'V'>
298!* 11. < W'W'>
299!
300 CALL turb_hor_dyn_corr(d,turbn,tles,ksplt, ptstep, &
301 krr,ksv,oflat, o2d, &
302 tpfile, &
303 pk,pinv_pdzz, &
304 pdxx,pdyy,pdzz,pdzx,pdzy,pzz, &
305 pdircoszw, &
306 pcosslope,psinslope, &
307 prhodj, &
308 pcdueff,ptau11m,ptau12m,ptau22m,ptau33m, &
309 pum,pvm,pwm, puslopem,pvslopem, &
310 pthlm,prm,psvm, &
311 ptkem,plm, &
312 pturb_spp,pdp,ptp, &
313 prus,prvs,prws )
314!
315!
316!* 12. < U'V'>
317!
318 CALL turb_hor_uv(d,turbn,tles,ksplt,oflat,o2d, &
319 tpfile, &
320 pk,pinv_pdxx,pinv_pdyy,pinv_pdzz,pmzm_prhodj, &
321 pdxx,pdyy,pdzz,pdzx,pdzy, &
322 pdircoszw, &
323 pcosslope,psinslope, &
324 prhodj, &
325 pcdueff,ptau11m,ptau12m,ptau22m,ptau33m, &
326 pum,pvm,puslopem,pvslopem, &
327 pturb_spp,pdp, &
328 prus,prvs )
329!
330!
331!* 13. < U'W'>
332!
333 CALL turb_hor_uw(d,turbn,tles,ksplt, &
334 krr,ksv,oflat, &
335 tpfile, &
336 pk,pinv_pdxx,pinv_pdzz,pmzm_prhodj, &
337 pdxx,pdzz,pdzx, &
338 prhodj,pthvref, &
339 pum,pwm,pthlm,prm,psvm, &
340 ptkem,plm, &
341 pturb_spp,pdp, &
342 prus,prws )
343!
344!
345!* 14. < V'W'>
346!
347 CALL turb_hor_vw(d,turbn,tles,ksplt, &
348 krr,ksv,oflat,o2d, &
349 tpfile, &
350 pk,pinv_pdyy,pinv_pdzz,pmzm_prhodj, &
351 pdyy,pdzz,pdzy, &
352 prhodj,pthvref, &
353 pvm,pwm,pthlm,prm,psvm, &
354 ptkem,plm, &
355 pturb_spp,pdp, &
356 prvs,prws )
357
358!
359!
360!* 15. HORIZONTAL FLUXES OF PASSIVE SCALARS
361!
362 CALL turb_hor_sv_flux(d,turbn,tles,ksplt,oblowsnow,oflat, &
363 tpfile,ksv,ksv_lgbeg,ksv_lgend,o2d,onomixlg, &
364 pk,pinv_pdxx,pinv_pdyy,pinv_pdzz,pmzm_prhodj, &
365 pdxx,pdyy,pdzz,pdzx,pdzy,prsnow, &
366 pdircosxw,pdircosyw, &
367 prhodj,pwm, &
368 psfsvm, &
369 psvm, &
370 prsvs )
371!
372 IF (ksplt==1 .AND. tles%LLES_CALL) &
373 CALL turb_hor_sv_corr(d,cst,csturb,turbn,tles, &
374 ksv,ksv_lgbeg,ksv_lgend, &
375 krr,krrl,krri,oocean,ocompute_src,oblowsnow, &
376 onomixlg,o2d,oflat, &
377 pdxx,pdyy,pdzz,pdzx,pdzy,prsnow, &
378 plm,pleps,ptkem,pthvref, &
379 pthlm,prm, &
380 plocpexnm,patheta,pamoist,psrcm, &
381 pwm,psvm,pturb_spp )
382!
383!
384END SUBROUTINE turb_hor
385END MODULE mode_turb_hor
integer, parameter nturb_s
subroutine turb_hor_dyn_corr(d, turbn, tles, ksplt, ptstep, krr, ksv, oflat, o2d, tpfile, pk, pinv_pdzz, pdxx, pdyy, pdzz, pdzx, pdzy, pzz, pdircoszw, pcosslope, psinslope, prhodj, pcdueff, ptau11m, ptau12m, ptau22m, ptau33m, pum, pvm, pwm, puslopem, pvslopem, pthlm, prm, psvm, ptkem, plm, pturb_spp, pdp, ptp, prus, prvs, prws)
subroutine turb_hor_sv_corr(d, cst, csturb, turbn, tles, ksv, ksv_lgbeg, ksv_lgend, krr, krrl, krri, oocean, ocompute_src, oblowsnow, onomixlg, o2d, oflat, pdxx, pdyy, pdzz, pdzx, pdzy, prsnow, plm, pleps, ptkem, pthvref, pthlm, prm, plocpexnm, patheta, pamoist, psrcm, pwm, psvm, pturb_spp)
subroutine turb_hor_sv_flux(d, turbn, tles, ksplt, oblowsnow, oflat, tpfile, ksv, ksv_lgbeg, ksv_lgend, o2d, onomixlg, pk, pinv_pdxx, pinv_pdyy, pinv_pdzz, pmzm_prhodj, pdxx, pdyy, pdzz, pdzx, pdzy, prsnow, pdircosxw, pdircosyw, prhodj, pwm, psfsvm, psvm, prsvs)
subroutine turb_hor_thermo_corr(d, cst, turbn, nebn, tles, krr, krrl, krri, oocean, ocompute_src, o2d, oflat, tpfile, pinv_pdxx, pinv_pdyy, pdxx, pdyy, pdzz, pdzx, pdzy, pthvref, pwm, pthlm, prm, ptkem, plm, pleps, plocpexnm, patheta, pamoist, psrcm, pturb_spp, psigs)
subroutine turb_hor_thermo_flux(d, turbn, tles, ksplt, krr, krrl, krri, tpfile, oflat, o2d, pk, pinv_pdxx, pinv_pdyy, pinv_pdzz, pmzm_prhodj, pdxx, pdyy, pdzz, pdzx, pdzy, pdircosxw, pdircosyw, prhodj, psfthm, psfrm, pwm, pthlm, prm, patheta, pamoist, psrcm, pfrac_ice, pturb_spp, prthls, prrs)
subroutine turb_hor_uv(d, turbn, tles, ksplt, oflat, o2d, tpfile, pk, pinv_pdxx, pinv_pdyy, pinv_pdzz, pmzm_prhodj, pdxx, pdyy, pdzz, pdzx, pdzy, pdircoszw, pcosslope, psinslope, prhodj, pcdueff, ptau11m, ptau12m, ptau22m, ptau33m, pum, pvm, puslopem, pvslopem, pturb_spp, pdp, prus, prvs)
subroutine turb_hor_uw(d, turbn, tles, ksplt, krr, ksv, oflat, tpfile, pk, pinv_pdxx, pinv_pdzz, pmzm_prhodj, pdxx, pdzz, pdzx, prhodj, pthvref, pum, pwm, pthlm, prm, psvm, ptkem, plm, pturb_spp, pdp, prus, prws)
subroutine turb_hor_vw(d, turbn, tles, ksplt, krr, ksv, oflat, o2d, tpfile, pk, pinv_pdyy, pinv_pdzz, pmzm_prhodj, pdyy, pdzz, pdzy, prhodj, pthvref, pvm, pwm, pthlm, prm, psvm, ptkem, plm, pturb_spp, pdp, prvs, prws)
subroutine turb_hor(d, cst, csturb, turbn, nebn, tles, ksplt, krr, krrl, krri, ptstep, ksv, ksv_lgbeg, ksv_lgend, oflat, o2d, onomixlg, oocean, ocompute_src, oblowsnow, tpfile, pdxx, pdyy, pdzz, pdzx, pdzy, pzz, prsnow, pdircosxw, pdircosyw, pdircoszw, pcosslope, psinslope, pinv_pdxx, pinv_pdyy, pinv_pdzz, pmzm_prhodj, pk, prhodj, pthvref, psfthm, psfrm, psfsvm, pcdueff, ptau11m, ptau12m, ptau22m, ptau33m, pum, pvm, pwm, puslopem, pvslopem, pthlm, prm, psvm, ptkem, plm, pleps, plocpexnm, patheta, pamoist, psrcm, pfrac_ice, pturb_spp, pdp, ptp, psigs, prus, prvs, prws, prthls, prrs, prsvs)