source: LMDZ6/trunk/libf/phylmd/thermcell_ini_mod.F90 @ 4419

Last change on this file since 4419 was 4413, checked in by evignon, 20 months ago

pour les mini-projets: controle des coefficients pour le detrainement
et l'entrainement des downdrafts dans les .def

File size: 3.5 KB
Line 
1MODULE thermcell_ini_mod
2IMPLICIT NONE
3
4save
5   integer :: dvdq=1,dqimpl=-1,prt_level=0,lunout
6   real RG,RD,RCPD,RKAPPA,RLVTT,RLvCp,RETV
7   real           :: r_aspect_thermals,tau_thermals,fact_thermals_ed_dz
8   integer        :: iflag_thermals_ed,iflag_thermals_optflux,iflag_thermals_closure
9   integer        :: iflag_thermals_down
10   real           :: entrdn_coef, detrdn_coef
11
12!$OMP THREADPRIVATE(dvdq,dqimpl,prt_level,lunout)
13!$OMP THREADPRIVATE(RG,RD,RCPD,RKAPPA,RLVTT,RLvCp)
14!$OMP THREADPRIVATE(r_aspect_thermals,tau_thermals,fact_thermals_ed_dz)
15!$OMP THREADPRIVATE(iflag_thermals_ed,iflag_thermals_optflux,iflag_thermals_closure)
16!$OMP THREADPRIVATE(iflag_thermals_down)
17!$OMP THREADPRIVATE(entrdn_coef, detrdn_coef)
18
19
20   REAL, SAVE :: fact_epsilon=0.002
21   REAL, SAVE :: betalpha=0.9
22   REAL, SAVE :: afact=2./3.
23   REAL, SAVE :: fact_shell=1.
24   REAL,SAVE :: detr_min=1.e-5
25   REAL,SAVE :: entr_min=1.e-5
26   REAL,SAVE :: detr_q_coef=0.012
27   REAL,SAVE :: detr_q_power=0.5
28   REAL,SAVE :: mix0=0.
29   INTEGER,SAVE :: thermals_flag_alim=0
30
31!$OMP THREADPRIVATE(fact_epsilon, betalpha, afact, fact_shell)
32!$OMP THREADPRIVATE(detr_min, entr_min, detr_q_coef, detr_q_power)
33!$OMP THREADPRIVATE( mix0, thermals_flag_alim)
34
35
36CONTAINS
37
38SUBROUTINE thermcell_ini(iflag_thermals,prt_level_in,tau_thermals_in,lunout_in, &
39   &    RG_in,RD_in,RCPD_in,RKAPPA_in,RLVTT_in,RETV_in)
40
41   USE ioipsl_getin_p_mod, ONLY : getin_p
42
43integer, intent(in) :: iflag_thermals,prt_level_in,lunout_in
44real, intent(in) :: RG_in,RD_in,RCPD_in,RKAPPA_in,RLVTT_in,RETV_in,tau_thermals_in
45
46print*,'thermcell_ini'
47      if (iflag_thermals==15.or.iflag_thermals==16) then
48         dvdq=0
49         dqimpl=-1
50      else
51         dvdq=1
52         dqimpl=1
53      endif
54   prt_level=prt_level_in
55   RG=RG_in
56   RD=RD_in
57   RCPD=RCPD_in
58   RKAPPA=RKAPPA_in
59   RLVTT=RLVTT_in
60   RLvCp = RLVTT/RCPD
61   RETV=RETV_in
62   tau_thermals=tau_thermals_in
63   lunout=lunout_in
64
65
66!=====================================================================
67! a la fois les vieilles param et thermcell_main :
68!=====================================================================
69
70   r_aspect_thermals=2.
71   CALL getin_p('r_aspect_thermals',r_aspect_thermals)
72   
73   tau_thermals = 0.
74   CALL getin_p('tau_thermals',tau_thermals)
75   
76   fact_thermals_ed_dz = 0.1
77   CALL getin_p('fact_thermals_ed_dz',fact_thermals_ed_dz)
78   
79   fact_thermals_ed_dz = 0.1
80   CALL getin_p('fact_thermals_ed_dz',fact_thermals_ed_dz)
81   
82   iflag_thermals_ed = 0
83   CALL getin_p('iflag_thermals_ed',iflag_thermals_ed)
84   
85   iflag_thermals_optflux = 0
86   CALL getin_p('iflag_thermals_optflux',iflag_thermals_optflux)
87   
88   iflag_thermals_closure = 1
89   CALL getin_p('iflag_thermals_closure',iflag_thermals_closure)
90
91   iflag_thermals_down = 0
92   CALL getin_p('iflag_thermals_down',iflag_thermals_down)
93
94
95   entrdn_coef = 0.5
96   CALL getin_p('entrdn_coef',entrdn_coef)
97
98   detrdn_coef = 0.5
99   CALL getin_p('detrdn_coef',detrdn_coef)
100
101
102     CALL getin_p('thermals_fact_epsilon',fact_epsilon)
103     CALL getin_p('thermals_betalpha',betalpha)
104     CALL getin_p('thermals_afact',afact)
105     CALL getin_p('thermals_fact_shell',fact_shell)
106     CALL getin_p('thermals_detr_min',detr_min)
107     CALL getin_p('thermals_entr_min',entr_min)
108     CALL getin_p('thermals_detr_q_coef',detr_q_coef)
109     CALL getin_p('thermals_detr_q_power',detr_q_power)
110     CALL getin_p('thermals_mix0',mix0)
111     CALL getin_p('thermals_flag_alim',thermals_flag_alim)
112
113
114 RETURN
115
116END SUBROUTINE thermcell_ini
117END MODULE thermcell_ini_mod
Note: See TracBrowser for help on using the repository browser.