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(prt_level,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 :: wk_nsub |
---|
59 | !$OMP THREADPRIVATE(wk_nsub) |
---|
60 | |
---|
61 | INTEGER, SAVE, PROTECTED :: iflag_wk_new_ptop |
---|
62 | !$OMP THREADPRIVATE(iflag_wk_new_ptop) |
---|
63 | |
---|
64 | REAL, SAVE, PROTECTED :: wdensinit ! Minimum wake density used to restart wakes from a wake-free state |
---|
65 | !$OMP THREADPRIVATE(wdensinit) |
---|
66 | REAL, SAVE, PROTECTED :: wdensthreshold ! Threshold wake density below which wakes are killed |
---|
67 | !$OMP THREADPRIVATE(wdensthreshold) |
---|
68 | REAL, SAVE, PROTECTED :: sigmad, hwmin, wapecut, cstart |
---|
69 | !$OMP THREADPRIVATE(sigmad, hwmin, wapecut, cstart) |
---|
70 | REAL, SAVE, PROTECTED :: sigmaw_max |
---|
71 | !$OMP THREADPRIVATE(sigmaw_max) |
---|
72 | REAL, SAVE, PROTECTED :: dens_rate |
---|
73 | !$OMP THREADPRIVATE(dens_rate) |
---|
74 | REAL, SAVE, PROTECTED :: epsilon_loc |
---|
75 | !$OMP THREADPRIVATE(epsilon_loc) |
---|
76 | REAL, SAVE, PROTECTED :: epsim1,RG,RD |
---|
77 | !$OMP THREADPRIVATE(epsim1,RG,RD) |
---|
78 | REAL, SAVE, PROTECTED ::smallestreal |
---|
79 | !$OMP THREADPRIVATE(smallestreal) |
---|
80 | REAL, SAVE, PROTECTED :: wk_int_delta_t_min |
---|
81 | !$OMP THREADPRIVATE(wk_int_delta_t_min) |
---|
82 | |
---|
83 | ! CPP key used only in this module for debugging purposes. jyg 09/24 |
---|
84 | !!#define IOPHYS_WK |
---|
85 | #ifdef IOPHYS_WK |
---|
86 | LOGICAL, PARAMETER :: CPPKEY_IOPHYS_WK = .TRUE. |
---|
87 | #else |
---|
88 | LOGICAL, PARAMETER :: CPPKEY_IOPHYS_WK = .FALSE. |
---|
89 | #endif |
---|
90 | |
---|
91 | |
---|
92 | |
---|
93 | CONTAINS |
---|
94 | |
---|
95 | ! ========================================================================= |
---|
96 | SUBROUTINE wake_ini(rg_in,rd_in,rv_in,prt_lev) |
---|
97 | ! ========================================================================= |
---|
98 | |
---|
99 | ! ************************************************************** |
---|
100 | ! * |
---|
101 | ! WAKE * |
---|
102 | ! retour a un Pupper fixe * |
---|
103 | ! * |
---|
104 | ! written by : GRANDPEIX Jean-Yves 09/03/2000 * |
---|
105 | ! modified by : ROEHRIG Romain 01/29/2007 * |
---|
106 | ! ************************************************************** |
---|
107 | |
---|
108 | ! ------------------------------------------------------------------------- |
---|
109 | ! Initialisations |
---|
110 | ! ------------------------------------------------------------------------- |
---|
111 | |
---|
112 | USE ioipsl_getin_p_mod, ONLY : getin_p |
---|
113 | real eps |
---|
114 | integer, intent(in) :: prt_lev |
---|
115 | real, intent(in) :: rg_in,rd_in,rv_in |
---|
116 | |
---|
117 | smallestreal=tiny(smallestreal) |
---|
118 | ! |
---|
119 | prt_level=prt_lev |
---|
120 | epsilon_loc=1.E-15 |
---|
121 | wapecut=1. ! previously 5. |
---|
122 | ! |
---|
123 | rzero = 5000. |
---|
124 | CALL getin_p('rzero_wk', rzero) |
---|
125 | aa0 = 3.14*rzero*rzero |
---|
126 | ! |
---|
127 | ! Essais d'initialisation avec sigmaw = 0.02 et hw = 10. |
---|
128 | !! sigmad=0.005 |
---|
129 | sigmad=0.02 |
---|
130 | CALL getin_p('sigmad', sigmad) |
---|
131 | hwmin=10. |
---|
132 | ! |
---|
133 | !!wdensthreshold=1.e-12 |
---|
134 | wdensthreshold=1.e-14 |
---|
135 | wdensthreshold=2.e-14 |
---|
136 | CALL getin_p('wdensthreshold', wdensthreshold) |
---|
137 | ! |
---|
138 | IF (sigmad < 0.) THEN |
---|
139 | sigmad = abs(sigmad) |
---|
140 | !! wdensmin=sigmad/(3.14*rzero**2) |
---|
141 | wdensinit=sigmad/(3.14*rzero**2) |
---|
142 | ELSE |
---|
143 | wdensinit = wdensthreshold/2. |
---|
144 | ENDIF |
---|
145 | ! |
---|
146 | ! |
---|
147 | ! cc nrlmd |
---|
148 | sigmaw_max=0.4 |
---|
149 | dens_rate=0.1 |
---|
150 | |
---|
151 | eps = rd_in/rv_in |
---|
152 | epsim1 = 1.0/eps - 1.0 |
---|
153 | RG=rg_in |
---|
154 | RD=rd_in |
---|
155 | |
---|
156 | |
---|
157 | ! cc |
---|
158 | ! Longueur de maille (en m) |
---|
159 | ! ------------------------------------------------------------------------- |
---|
160 | |
---|
161 | ! ALON = 3.e5 |
---|
162 | ! alon = 1.E6 |
---|
163 | |
---|
164 | ! Configuration de coefgw,stark,wdens (22/02/06 by YU Jingmei) |
---|
165 | |
---|
166 | ! coefgw : Coefficient pour les ondes de gravite |
---|
167 | ! stark : Coefficient k dans Cstar=k*sqrt(2*WAPE) |
---|
168 | ! wdens : Densite surfacique de poche froide |
---|
169 | ! ------------------------------------------------------------------------- |
---|
170 | |
---|
171 | ! cc nrlmd coefgw=10 |
---|
172 | ! coefgw=1 |
---|
173 | ! wdens0 = 1.0/(alon**2) |
---|
174 | ! cc nrlmd wdens = 1.0/(alon**2) |
---|
175 | ! cc nrlmd stark = 0.50 |
---|
176 | ! CRtest |
---|
177 | ! cc nrlmd alpk=0.1 |
---|
178 | ! alpk = 1.0 |
---|
179 | ! alpk = 0.5 |
---|
180 | ! alpk = 0.05 |
---|
181 | |
---|
182 | |
---|
183 | |
---|
184 | crep_upper = 0.9 |
---|
185 | crep_sol = 1.0 |
---|
186 | |
---|
187 | ! Flag concerning the bug in gfl computation |
---|
188 | ok_bug_gfl = .True. |
---|
189 | call getin_p('ok_bug_gfl', ok_bug_gfl) |
---|
190 | |
---|
191 | ! Get wapecut from parameter file |
---|
192 | wapecut = 1. |
---|
193 | |
---|
194 | print*,'wapecut',wapecut |
---|
195 | CALL getin_p('wapecut', wapecut) |
---|
196 | print*,'wapecut',wapecut |
---|
197 | |
---|
198 | ! cc nrlmd Lecture du fichier wake_param.data |
---|
199 | |
---|
200 | |
---|
201 | ! cc nrlmd Lecture du fichier wake_param.data |
---|
202 | stark=0.33 |
---|
203 | CALL getin_p('stark',stark) |
---|
204 | cstart = stark*sqrt(2.*wapecut) |
---|
205 | |
---|
206 | alpk=0.25 |
---|
207 | CALL getin_p('alpk',alpk) |
---|
208 | |
---|
209 | wk_pupper=0.6 |
---|
210 | CALL getin_p('wk_pupper',wk_pupper) |
---|
211 | |
---|
212 | |
---|
213 | !jyg< |
---|
214 | !! wdens_ref=8.E-12 |
---|
215 | !! CALL getin_p('wdens_ref',wdens_ref) |
---|
216 | wdens_ref(1)=8.E-12 |
---|
217 | wdens_ref(2)=8.E-12 |
---|
218 | CALL getin_p('wdens_ref_o',wdens_ref(1)) !wake number per unit area ; ocean |
---|
219 | CALL getin_p('wdens_ref_l',wdens_ref(2)) !wake number per unit area ; land |
---|
220 | !>jyg |
---|
221 | ! |
---|
222 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
223 | !!!!!!!!! Population dynamics parameters !!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
224 | !------------------------------------------------------------------------ |
---|
225 | |
---|
226 | iflag_wk_pop_dyn = 0 |
---|
227 | CALL getin_p('iflag_wk_pop_dyn',iflag_wk_pop_dyn) ! switch between wdens prescribed |
---|
228 | ! and wdens prognostic |
---|
229 | iflag_wk_act = 0 |
---|
230 | CALL getin_p('iflag_wk_act',iflag_wk_act) ! 0: act(:)=0. |
---|
231 | ! 1: act(:)=1. |
---|
232 | ! 2: act(:)=f(Wape) |
---|
233 | |
---|
234 | iflag_wk_profile = 0 |
---|
235 | CALL getin_p('iflag_wk_profile',iflag_wk_profile) ! switch between wdens prescribed |
---|
236 | ! and wdens prognostic |
---|
237 | ! iflag_wk_profile = 0 |
---|
238 | iflag_wk_new_ptop = 0 |
---|
239 | CALL getin_p('iflag_wk_new_ptop',iflag_wk_new_ptop) |
---|
240 | |
---|
241 | wk_nsub = 10 |
---|
242 | CALL getin_p('wk_nsub',wk_nsub) |
---|
243 | |
---|
244 | tau_cv = 4000. |
---|
245 | CALL getin_p('tau_cv', tau_cv) |
---|
246 | |
---|
247 | wk_delta_t_min = 0. |
---|
248 | CALL getin_p('wk_delta_t_min', wk_delta_t_min) |
---|
249 | |
---|
250 | wk_int_delta_t_min = 10. |
---|
251 | CALL getin_p('wk_int_delta_t_min', wk_int_delta_t_min) |
---|
252 | |
---|
253 | wk_frac_int_delta_t = 0.9 |
---|
254 | CALL getin_p('wk_frac_int_delta_t', wk_frac_int_delta_t) |
---|
255 | |
---|
256 | |
---|
257 | !------------------------------------------------------------------------ |
---|
258 | |
---|
259 | coefgw=4. |
---|
260 | CALL getin_p('coefgw',coefgw) |
---|
261 | |
---|
262 | WRITE(*,*) 'stark=', stark |
---|
263 | WRITE(*,*) 'alpk=', alpk |
---|
264 | WRITE(*,*) 'wk_pupper=', wk_pupper |
---|
265 | !jyg< |
---|
266 | !! WRITE(*,*) 'wdens_ref=', wdens_ref |
---|
267 | WRITE(*,*) 'wdens_ref_o=', wdens_ref(1) |
---|
268 | WRITE(*,*) 'wdens_ref_l=', wdens_ref(2) |
---|
269 | !>jyg |
---|
270 | WRITE(*,*) 'iflag_wk_pop_dyn=',iflag_wk_pop_dyn |
---|
271 | WRITE(*,*) 'iflag_wk_act',iflag_wk_act |
---|
272 | WRITE(*,*) 'coefgw=', coefgw |
---|
273 | |
---|
274 | flag_wk_check_trgl=.false. |
---|
275 | CALL getin_p('flag_wk_check_trgl ', flag_wk_check_trgl) |
---|
276 | WRITE(*,*) 'flag_wk_check_trgl=', flag_wk_check_trgl |
---|
277 | WRITE(*,*) 'flag_wk_check_trgl OBSOLETE. Utilisr iflag_wk_check_trgl plutot' |
---|
278 | iflag_wk_check_trgl=0 ; IF (flag_wk_check_trgl) iflag_wk_check_trgl=1 |
---|
279 | CALL getin_p('iflag_wk_check_trgl ', iflag_wk_check_trgl) |
---|
280 | WRITE(*,*) 'iflag_wk_check_trgl=', iflag_wk_check_trgl |
---|
281 | |
---|
282 | WRITE(*,*) 'wk_delta_t_min=', wk_delta_t_min |
---|
283 | WRITE(*,*) 'wk_int_delta_t_min=', wk_int_delta_t_min |
---|
284 | WRITE(*,*) 'wk_frac_int_delta_t=', wk_frac_int_delta_t |
---|
285 | WRITE(*,*) 'iflag_wk_new_ptop=', iflag_wk_new_ptop |
---|
286 | WRITE(*,*) 'wk_nsub=', wk_nsub |
---|
287 | |
---|
288 | RETURN |
---|
289 | |
---|
290 | END SUBROUTINE wake_ini |
---|
291 | |
---|
292 | |
---|
293 | |
---|
294 | END MODULE lmdz_wake_ini |
---|