[4449] | 1 | MODULE atke_turbulence_ini_mod |
---|
| 2 | |
---|
| 3 | implicit none |
---|
| 4 | |
---|
| 5 | save |
---|
| 6 | |
---|
[4631] | 7 | integer :: iflag_atke, iflag_num_atke, iflag_atke_lmix |
---|
| 8 | !$OMP THREADPRIVATE(iflag_atke, iflag_num_atke, iflag_atke_lmix) |
---|
[4449] | 9 | real :: kappa = 0.4 ! Von Karman constant |
---|
| 10 | !$OMP THREADPRIVATE(kappa) |
---|
[4644] | 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) |
---|
[4449] | 13 | integer :: lunout,prt_level |
---|
| 14 | !$OMP THREADPRIVATE(lunout,prt_level) |
---|
[4478] | 15 | real :: rg, rd, rpi, rcpd |
---|
| 16 | !$OMP THREADPRIVATE(rg, rd, rpi, rcpd) |
---|
[4449] | 17 | |
---|
[4478] | 18 | real :: viscom, viscoh |
---|
| 19 | !$OMP THREADPRIVATE(viscom,viscoh) |
---|
[4449] | 20 | |
---|
[4644] | 21 | real :: lmin=0.01 ! minimum mixing length |
---|
[4631] | 22 | !$OMP THREADPRIVATE(lmin) |
---|
[4478] | 23 | |
---|
[4644] | 24 | logical :: ok_vdiff_tke |
---|
| 25 | !$OMP THREADPRIVATE(ok_vdiff_tke) |
---|
[4478] | 26 | |
---|
[4449] | 27 | CONTAINS |
---|
| 28 | |
---|
[4478] | 29 | SUBROUTINE atke_ini(prt_level_in, lunout_in, rg_in, rd_in, rpi_in, rcpd_in) |
---|
[4449] | 30 | |
---|
| 31 | USE ioipsl_getin_p_mod, ONLY : getin_p |
---|
| 32 | |
---|
| 33 | integer, intent(in) :: lunout_in,prt_level_in |
---|
[4478] | 34 | real, intent(in) :: rg_in, rd_in, rpi_in, rcpd_in |
---|
[4449] | 35 | |
---|
| 36 | |
---|
| 37 | lunout=lunout_in |
---|
| 38 | prt_level=prt_level_in |
---|
| 39 | rd=rd_in |
---|
| 40 | rg=rg_in |
---|
| 41 | rpi=rpi_in |
---|
[4478] | 42 | rcpd=rcpd_in |
---|
[4449] | 43 | |
---|
[4478] | 44 | viscom=1.46E-5 |
---|
| 45 | viscoh=2.06E-5 |
---|
| 46 | |
---|
[4449] | 47 | ! flag that controls options in atke_compute_km_kh |
---|
| 48 | iflag_atke=0 |
---|
| 49 | CALL getin_p('iflag_atke',iflag_atke) |
---|
| 50 | |
---|
[4631] | 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 | |
---|
[4644] | 60 | ! activate vertical diffusion of TKE or not |
---|
| 61 | ok_vdiff_tke=.false. |
---|
| 62 | CALL getin_p('atke_ok_vdiff_tke',ok_vdiff_tke) |
---|
[4631] | 63 | |
---|
[4545] | 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 | |
---|
[4631] | 68 | ! asymptotic mixing length in neutral conditions [m] |
---|
| 69 | ! Sun et al 2011, JAMC |
---|
| 70 | ! between 10 and 40 |
---|
| 71 | |
---|
| 72 | l0=15.0 |
---|
[4449] | 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 |
---|
[4631] | 84 | cepsilon=16.6/2./sqrt(2.) ! default value as in yamada4 |
---|
[4449] | 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) |
---|
[4631] | 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 |
---|
[4449] | 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 | |
---|
[4478] | 99 | ! value of turbulent prandtl number in neutral conditions (Ri=0) |
---|
[4481] | 100 | pr_neut=0.8 |
---|
[4478] | 101 | CALL getin_p('atke_pr_neut',pr_neut) |
---|
| 102 | |
---|
[4631] | 103 | ! coefficient for mixing length depending on local stratification |
---|
[4632] | 104 | clmix=0.5 |
---|
[4631] | 105 | CALL getin_p('atke_clmix',clmix) |
---|
[4644] | 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 | |
---|
[4449] | 122 | RETURN |
---|
| 123 | |
---|
| 124 | END SUBROUTINE atke_ini |
---|
| 125 | |
---|
| 126 | END MODULE atke_turbulence_ini_mod |
---|