source: LMDZ6/trunk/libf/phylmd/atke_turbulence_ini_mod.F90 @ 4646

Last change on this file since 4646 was 4644, checked in by evignon, 19 months ago

modifications en vue de la reprise de l'atelier tke a la rentree

File size: 3.4 KB
Line 
1MODULE atke_turbulence_ini_mod
2
3implicit none
4
5save
6
7integer :: iflag_atke, iflag_num_atke, iflag_atke_lmix
8  !$OMP THREADPRIVATE(iflag_atke, iflag_num_atke, iflag_atke_lmix)
9  real :: kappa = 0.4 ! Von Karman constant
10  !$OMP THREADPRIVATE(kappa)
11  real :: l0, ric, ri0, cinf, cepsilon, pr_slope, pr_asym, pr_neut, clmix, smmin, ctkes,cke
12  !$OMP THREADPRIVATE(l0,ric,cinf,cepsilon,pr_slope,pr_asym,pr_neut,clmix,smmin,ctkes,cke)
13  integer :: lunout,prt_level
14  !$OMP THREADPRIVATE(lunout,prt_level)
15  real :: rg, rd, rpi, rcpd
16  !$OMP THREADPRIVATE(rg, rd, rpi, rcpd)
17
18  real :: viscom, viscoh
19  !$OMP THREADPRIVATE(viscom,viscoh)
20
21  real :: lmin=0.01              ! minimum mixing length
22  !$OMP THREADPRIVATE(lmin)
23
24  logical :: ok_vdiff_tke
25  !$OMP THREADPRIVATE(ok_vdiff_tke)
26
27CONTAINS
28
29SUBROUTINE atke_ini(prt_level_in, lunout_in, rg_in, rd_in, rpi_in, rcpd_in)
30
31   USE ioipsl_getin_p_mod, ONLY : getin_p
32
33  integer, intent(in) :: lunout_in,prt_level_in
34  real, intent(in) :: rg_in, rd_in, rpi_in, rcpd_in
35
36
37  lunout=lunout_in
38  prt_level=prt_level_in
39  rd=rd_in
40  rg=rg_in
41  rpi=rpi_in
42  rcpd=rcpd_in
43
44  viscom=1.46E-5
45  viscoh=2.06E-5
46
47  ! flag that controls options in atke_compute_km_kh
48  iflag_atke=0
49  CALL getin_p('iflag_atke',iflag_atke)
50
51  ! flag that controls the calculation of mixing length in atke
52  iflag_atke_lmix=0
53  CALL getin_p('iflag_atke_lmix',iflag_atke_lmix)
54
55  if (iflag_atke .eq. 0 .and. iflag_atke_lmix>0) then
56        call abort_physic("atke_turbulence_ini", &
57        'stationary scheme must use mixing length formulation not depending on tke', 1)
58  endif
59
60  ! activate vertical diffusion of TKE or not
61  ok_vdiff_tke=.false.
62  CALL getin_p('atke_ok_vdiff_tke',ok_vdiff_tke)
63
64  ! flag that controls the numerical treatment of diffusion coeffiient calculation
65  iflag_num_atke=0
66  CALL getin_p('iflag_num_atke',iflag_num_atke)
67
68  ! asymptotic mixing length in neutral conditions [m]
69  ! Sun et al 2011, JAMC
70  ! between 10 and 40
71
72  l0=15.0
73  CALL getin_p('atke_l0',l0)
74
75  ! critical Richardson number
76  ric=0.25
77  CALL getin_p('atke_ric',ric)
78
79  ! asymptotic value of Sm for Ri=-Inf
80  cinf=1.5
81  CALL getin_p('atke_cinf',cinf)
82
83  ! constant for tke dissipation calculation
84  cepsilon=16.6/2./sqrt(2.) ! default value as in yamada4
85  CALL getin_p('atke_cepsilon',cepsilon)
86
87  ! slope of Pr=f(Ri) for stable conditions
88  pr_slope=5.0 ! default value from Zilitinkevich et al. 2005
89  CALL getin_p('atke_pr_slope',pr_slope)
90  if (pr_slope .le. 1) then
91        call abort_physic("atke_turbulence_ini", &
92        'pr_slope has to be greater than 1 for consistency of the tke scheme', 1)
93  endif
94
95  ! asymptotic turbulent prandt number value for Ri=-Inf
96  pr_asym=0.4
97  CALL getin_p('atke_pr_asym',pr_asym)
98
99  ! value of turbulent prandtl number in neutral conditions (Ri=0)
100  pr_neut=0.8
101  CALL getin_p('atke_pr_neut',pr_neut)
102
103  ! coefficient for mixing length depending on local stratification
104  clmix=0.5
105  CALL getin_p('atke_clmix',clmix)
106 
107  ! minimum anisotropy coefficient (defined here as minsqrt(Ez/Ek)) at large Ri.
108  ! From Zilitinkevich et al. 2013, it equals sqrt(0.03)~0.17
109 
110  smmin=0.17
111  CALL getin_p('atke_smmin',smmin)
112
113 ! coefficient for surface TKE (default value from Arpege, see E. Bazile note)
114  ctkes=3.75
115  CALL getin_p('atke_ctkes',ctkes)
116
117  ! ratio between the eddy diffusivity coeff for tke wrt that for momentum
118  ! default value from Lenderink et al. 2004
119  cke=2.
120  CALL getin_p('atke_cke',cke)
121
122 RETURN
123
124END SUBROUTINE atke_ini
125
126END MODULE  atke_turbulence_ini_mod
Note: See TracBrowser for help on using the repository browser.