1 | MODULE lmdz_wake_ini |
---|
2 | IMPLICIT NONE |
---|
3 | |
---|
4 | ! ============================================================================ |
---|
5 | |
---|
6 | |
---|
7 | ! But : Decrire le comportement des poches froides apparaissant dans les |
---|
8 | ! grands systemes convectifs, et fournir l'energie disponible pour |
---|
9 | ! le declenchement de nouvelles colonnes convectives. |
---|
10 | |
---|
11 | ! State variables : |
---|
12 | ! deltatw : temperature difference between wake and off-wake regions |
---|
13 | ! deltaqw : specific humidity difference between wake and off-wake regions |
---|
14 | ! sigmaw : fractional area covered by wakes. |
---|
15 | ! wdens : number of wakes per unit area |
---|
16 | |
---|
17 | ! ------------------------------------------------------------------------- |
---|
18 | ! Declaration de variables |
---|
19 | ! ------------------------------------------------------------------------- |
---|
20 | |
---|
21 | ! Variables a fixer |
---|
22 | !jyg< |
---|
23 | !! REAL, SAVE :: stark, wdens_ref, coefgw, alpk |
---|
24 | INTEGER, SAVE, PROTECTED :: prt_level |
---|
25 | REAL, SAVE, PROTECTED, DIMENSION(2) :: wdens_ref |
---|
26 | REAL, SAVE, PROTECTED :: stark, coefgw, alpk, wk_pupper |
---|
27 | !>jyg |
---|
28 | REAL, SAVE, PROTECTED :: crep_upper, crep_sol |
---|
29 | !$OMP THREADPRIVATE(stark, wdens_ref, coefgw, alpk, wk_pupper, crep_upper, crep_sol) |
---|
30 | |
---|
31 | REAL, SAVE, PROTECTED :: tau_cv |
---|
32 | !$OMP THREADPRIVATE(tau_cv) |
---|
33 | |
---|
34 | REAL, SAVE, PROTECTED :: wk_delta_t_min |
---|
35 | !$OMP THREADPRIVATE(wk_delta_t_min) |
---|
36 | |
---|
37 | REAL, SAVE, PROTECTED :: wk_frac_int_delta_t |
---|
38 | !$OMP THREADPRIVATE(wk_frac_int_delta_t) |
---|
39 | |
---|
40 | REAL, SAVE, PROTECTED :: rzero, aa0 ! minimal wake radius and area |
---|
41 | !$OMP THREADPRIVATE(rzero, aa0) |
---|
42 | |
---|
43 | LOGICAL, SAVE, PROTECTED :: ok_bug_gfl |
---|
44 | !$OMP THREADPRIVATE(ok_bug_gfl) |
---|
45 | LOGICAL, SAVE, PROTECTED :: flag_wk_check_trgl |
---|
46 | !$OMP THREADPRIVATE(flag_wk_check_trgl) |
---|
47 | INTEGER, SAVE, PROTECTED :: iflag_wk_act |
---|
48 | !$OMP THREADPRIVATE(iflag_wk_act) |
---|
49 | |
---|
50 | INTEGER, SAVE, PROTECTED :: iflag_wk_check_trgl |
---|
51 | !$OMP THREADPRIVATE(iflag_wk_check_trgl) |
---|
52 | INTEGER, SAVE, PROTECTED :: iflag_wk_pop_dyn |
---|
53 | !$OMP THREADPRIVATE(iflag_wk_pop_dyn) |
---|
54 | |
---|
55 | INTEGER, SAVE, PROTECTED :: iflag_wk_profile |
---|
56 | !$OMP THREADPRIVATE(iflag_wk_profile) |
---|
57 | |
---|
58 | INTEGER, SAVE, PROTECTED :: iflag_wk_new_ptop |
---|
59 | !$OMP THREADPRIVATE(iflag_wk_new_ptop) |
---|
60 | |
---|
61 | REAL, SAVE, PROTECTED :: wdensinit ! Minimum wake density used to restart wakes from a wake-free state |
---|
62 | !$OMP THREADPRIVATE(wdensinit) |
---|
63 | REAL, SAVE, PROTECTED :: wdensthreshold ! Threshold wake density below which wakes are killed |
---|
64 | !$OMP THREADPRIVATE(wdensthreshold) |
---|
65 | REAL, SAVE, PROTECTED :: sigmad, hwmin, wapecut, cstart |
---|
66 | !$OMP THREADPRIVATE(sigmad, hwmin, wapecut, cstart) |
---|
67 | REAL, SAVE, PROTECTED :: sigmaw_max |
---|
68 | !$OMP THREADPRIVATE(sigmaw_max) |
---|
69 | REAL, SAVE, PROTECTED :: dens_rate |
---|
70 | !$OMP THREADPRIVATE(dens_rate) |
---|
71 | REAL, SAVE, PROTECTED :: epsilon_loc |
---|
72 | !$OMP THREADPRIVATE(epsilon_loc) |
---|
73 | REAL, SAVE, PROTECTED :: epsim1,RG,RD |
---|
74 | !$OMP THREADPRIVATE(epsim1,RG,RD) |
---|
75 | REAL, SAVE, PROTECTED ::smallestreal |
---|
76 | !$OMP THREADPRIVATE(smallestreal) |
---|
77 | |
---|
78 | |
---|
79 | |
---|
80 | CONTAINS |
---|
81 | |
---|
82 | ! ========================================================================= |
---|
83 | SUBROUTINE wake_ini(rg_in,rd_in,rv_in,prt_lev) |
---|
84 | ! ========================================================================= |
---|
85 | |
---|
86 | ! ************************************************************** |
---|
87 | ! * |
---|
88 | ! WAKE * |
---|
89 | ! retour a un Pupper fixe * |
---|
90 | ! * |
---|
91 | ! written by : GRANDPEIX Jean-Yves 09/03/2000 * |
---|
92 | ! modified by : ROEHRIG Romain 01/29/2007 * |
---|
93 | ! ************************************************************** |
---|
94 | |
---|
95 | ! ------------------------------------------------------------------------- |
---|
96 | ! Initialisations |
---|
97 | ! ------------------------------------------------------------------------- |
---|
98 | |
---|
99 | USE ioipsl_getin_p_mod, ONLY : getin_p |
---|
100 | real eps |
---|
101 | integer, intent(in) :: prt_lev |
---|
102 | real, intent(in) :: rg_in,rd_in,rv_in |
---|
103 | |
---|
104 | smallestreal=tiny(smallestreal) |
---|
105 | ! |
---|
106 | prt_level=prt_lev |
---|
107 | epsilon_loc=1.E-15 |
---|
108 | wapecut=1. ! previously 5. |
---|
109 | ! |
---|
110 | rzero = 5000. |
---|
111 | CALL getin_p('rzero_wk', rzero) |
---|
112 | aa0 = 3.14*rzero*rzero |
---|
113 | ! |
---|
114 | ! Essais d'initialisation avec sigmaw = 0.02 et hw = 10. |
---|
115 | !! sigmad=0.005 |
---|
116 | sigmad=0.02 |
---|
117 | CALL getin_p('sigmad', sigmad) |
---|
118 | hwmin=10. |
---|
119 | ! |
---|
120 | !!wdensthreshold=1.e-12 |
---|
121 | wdensthreshold=1.e-14 |
---|
122 | wdensthreshold=2.e-14 |
---|
123 | CALL getin_p('wdensthreshold', wdensthreshold) |
---|
124 | ! |
---|
125 | IF (sigmad < 0.) THEN |
---|
126 | sigmad = abs(sigmad) |
---|
127 | !! wdensmin=sigmad/(3.14*rzero**2) |
---|
128 | wdensinit=sigmad/(3.14*rzero**2) |
---|
129 | ELSE |
---|
130 | wdensinit = wdensthreshold/2. |
---|
131 | ENDIF |
---|
132 | ! |
---|
133 | ! |
---|
134 | ! cc nrlmd |
---|
135 | sigmaw_max=0.4 |
---|
136 | dens_rate=0.1 |
---|
137 | |
---|
138 | eps = rd_in/rv_in |
---|
139 | epsim1 = 1.0/eps - 1.0 |
---|
140 | RG=rg_in |
---|
141 | RD=rd_in |
---|
142 | |
---|
143 | |
---|
144 | ! cc |
---|
145 | ! Longueur de maille (en m) |
---|
146 | ! ------------------------------------------------------------------------- |
---|
147 | |
---|
148 | ! ALON = 3.e5 |
---|
149 | ! alon = 1.E6 |
---|
150 | |
---|
151 | ! Configuration de coefgw,stark,wdens (22/02/06 by YU Jingmei) |
---|
152 | |
---|
153 | ! coefgw : Coefficient pour les ondes de gravite |
---|
154 | ! stark : Coefficient k dans Cstar=k*sqrt(2*WAPE) |
---|
155 | ! wdens : Densite surfacique de poche froide |
---|
156 | ! ------------------------------------------------------------------------- |
---|
157 | |
---|
158 | ! cc nrlmd coefgw=10 |
---|
159 | ! coefgw=1 |
---|
160 | ! wdens0 = 1.0/(alon**2) |
---|
161 | ! cc nrlmd wdens = 1.0/(alon**2) |
---|
162 | ! cc nrlmd stark = 0.50 |
---|
163 | ! CRtest |
---|
164 | ! cc nrlmd alpk=0.1 |
---|
165 | ! alpk = 1.0 |
---|
166 | ! alpk = 0.5 |
---|
167 | ! alpk = 0.05 |
---|
168 | |
---|
169 | |
---|
170 | |
---|
171 | crep_upper = 0.9 |
---|
172 | crep_sol = 1.0 |
---|
173 | |
---|
174 | ! Flag concerning the bug in gfl computation |
---|
175 | ok_bug_gfl = .True. |
---|
176 | call getin_p('ok_bug_gfl', ok_bug_gfl) |
---|
177 | |
---|
178 | ! Get wapecut from parameter file |
---|
179 | wapecut = 1. |
---|
180 | |
---|
181 | print*,'wapecut',wapecut |
---|
182 | CALL getin_p('wapecut', wapecut) |
---|
183 | print*,'wapecut',wapecut |
---|
184 | |
---|
185 | ! cc nrlmd Lecture du fichier wake_param.data |
---|
186 | |
---|
187 | |
---|
188 | ! cc nrlmd Lecture du fichier wake_param.data |
---|
189 | stark=0.33 |
---|
190 | CALL getin_p('stark',stark) |
---|
191 | cstart = stark*sqrt(2.*wapecut) |
---|
192 | |
---|
193 | alpk=0.25 |
---|
194 | CALL getin_p('alpk',alpk) |
---|
195 | |
---|
196 | wk_pupper=0.6 |
---|
197 | CALL getin_p('wk_pupper',wk_pupper) |
---|
198 | |
---|
199 | |
---|
200 | !jyg< |
---|
201 | !! wdens_ref=8.E-12 |
---|
202 | !! CALL getin_p('wdens_ref',wdens_ref) |
---|
203 | wdens_ref(1)=8.E-12 |
---|
204 | wdens_ref(2)=8.E-12 |
---|
205 | CALL getin_p('wdens_ref_o',wdens_ref(1)) !wake number per unit area ; ocean |
---|
206 | CALL getin_p('wdens_ref_l',wdens_ref(2)) !wake number per unit area ; land |
---|
207 | !>jyg |
---|
208 | ! |
---|
209 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
210 | !!!!!!!!! Population dynamics parameters !!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
211 | !------------------------------------------------------------------------ |
---|
212 | |
---|
213 | iflag_wk_pop_dyn = 0 |
---|
214 | CALL getin_p('iflag_wk_pop_dyn',iflag_wk_pop_dyn) ! switch between wdens prescribed |
---|
215 | ! and wdens prognostic |
---|
216 | iflag_wk_act = 0 |
---|
217 | CALL getin_p('iflag_wk_act',iflag_wk_act) ! 0: act(:)=0. |
---|
218 | ! 1: act(:)=1. |
---|
219 | ! 2: act(:)=f(Wape) |
---|
220 | |
---|
221 | iflag_wk_profile = 0 |
---|
222 | CALL getin_p('iflag_wk_profile',iflag_wk_profile) ! switch between wdens prescribed |
---|
223 | ! and wdens prognostic |
---|
224 | ! iflag_wk_profile = 0 |
---|
225 | iflag_wk_new_ptop = 0 |
---|
226 | CALL getin_p('iflag_wk_new_ptop',iflag_wk_new_ptop) |
---|
227 | |
---|
228 | tau_cv = 4000. |
---|
229 | CALL getin_p('tau_cv', tau_cv) |
---|
230 | |
---|
231 | wk_delta_t_min = 0. |
---|
232 | CALL getin_p('wk_delta_t_min', wk_delta_t_min) |
---|
233 | |
---|
234 | wk_frac_int_delta_t = 0.9 |
---|
235 | CALL getin_p('wk_frac_int_delta_t', wk_frac_int_delta_t) |
---|
236 | |
---|
237 | |
---|
238 | !------------------------------------------------------------------------ |
---|
239 | |
---|
240 | coefgw=4. |
---|
241 | CALL getin_p('coefgw',coefgw) |
---|
242 | |
---|
243 | WRITE(*,*) 'stark=', stark |
---|
244 | WRITE(*,*) 'alpk=', alpk |
---|
245 | WRITE(*,*) 'wk_pupper=', wk_pupper |
---|
246 | !jyg< |
---|
247 | !! WRITE(*,*) 'wdens_ref=', wdens_ref |
---|
248 | WRITE(*,*) 'wdens_ref_o=', wdens_ref(1) |
---|
249 | WRITE(*,*) 'wdens_ref_l=', wdens_ref(2) |
---|
250 | !>jyg |
---|
251 | WRITE(*,*) 'iflag_wk_pop_dyn=',iflag_wk_pop_dyn |
---|
252 | WRITE(*,*) 'iflag_wk_act',iflag_wk_act |
---|
253 | WRITE(*,*) 'coefgw=', coefgw |
---|
254 | |
---|
255 | flag_wk_check_trgl=.false. |
---|
256 | CALL getin_p('flag_wk_check_trgl ', flag_wk_check_trgl) |
---|
257 | WRITE(*,*) 'flag_wk_check_trgl=', flag_wk_check_trgl |
---|
258 | WRITE(*,*) 'flag_wk_check_trgl OBSOLETE. Utilisr iflag_wk_check_trgl plutot' |
---|
259 | iflag_wk_check_trgl=0 ; IF (flag_wk_check_trgl) iflag_wk_check_trgl=1 |
---|
260 | CALL getin_p('iflag_wk_check_trgl ', iflag_wk_check_trgl) |
---|
261 | WRITE(*,*) 'iflag_wk_check_trgl=', iflag_wk_check_trgl |
---|
262 | |
---|
263 | WRITE(*,*) 'wk_delta_t_min=', wk_delta_t_min |
---|
264 | WRITE(*,*) 'wk_frac_int_delta_t=', wk_frac_int_delta_t |
---|
265 | WRITE(*,*) 'iflag_wk_new_ptop=', iflag_wk_new_ptop |
---|
266 | |
---|
267 | RETURN |
---|
268 | |
---|
269 | END SUBROUTINE wake_ini |
---|
270 | |
---|
271 | |
---|
272 | |
---|
273 | END MODULE lmdz_wake_ini |
---|