source: LMDZ5/branches/LMDZ5-DOFOCO/libf/phylmd/phys_local_var_mod.F90 @ 3483

Last change on this file since 3483 was 1785, checked in by Ehouarn Millour, 11 years ago

Transformation de l'include indicesol.h en un module indice_sol_mod et modification des appels dans tous les fichiers concernés.
Aucun changement des résultats ni des sorties du modèle vs 1784.
UG

...................................................

Replacement of the indicesol.h include by a module named indice_sol_mod. Modification of the calls in every affected files.
Results and outputs of simulations are unchanged in comparison with rev 1784.
UG

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 14.6 KB
Line 
1!
2! $Id: phys_local_var_mod.F90 1785 2013-07-16 09:22:04Z acozic $
3!
4      MODULE phys_local_var_mod
5
6! Variables locales pour effectuer les appels en serie
7!======================================================================
8!
9!
10!======================================================================
11! Declaration des variables
12
13      REAL, SAVE, ALLOCATABLE :: t_seri(:,:), q_seri(:,:)
14      !$OMP THREADPRIVATE(t_seri, q_seri)
15      REAL, SAVE, ALLOCATABLE :: ql_seri(:,:),qs_seri(:,:)
16      !$OMP THREADPRIVATE(ql_seri,qs_seri)
17      REAL, SAVE, ALLOCATABLE :: u_seri(:,:), v_seri(:,:)
18      !$OMP THREADPRIVATE(u_seri, v_seri)
19
20      REAL, SAVE, ALLOCATABLE :: tr_seri(:,:,:)
21      !$OMP THREADPRIVATE(tr_seri)
22      REAL, SAVE, ALLOCATABLE :: d_t_dyn(:,:), d_q_dyn(:,:)
23      !$OMP THREADPRIVATE(d_t_dyn, d_q_dyn)
24      REAL, SAVE, ALLOCATABLE :: d_u_dyn(:,:), d_v_dyn(:,:)
25      !$OMP THREADPRIVATE(d_u_dyn, d_v_dyn)
26!!!!
27      REAL, SAVE, ALLOCATABLE :: d_tr_dyn(:,:,:)
28      !$OMP THREADPRIVATE(d_tr_dyn)
29!!!!
30      REAL, SAVE, ALLOCATABLE :: d_t_con(:,:),d_q_con(:,:)
31      !$OMP THREADPRIVATE(d_t_con,d_q_con)
32      REAL, SAVE, ALLOCATABLE :: d_u_con(:,:),d_v_con(:,:)
33      !$OMP THREADPRIVATE(d_u_con,d_v_con)
34      REAL, SAVE, ALLOCATABLE :: d_t_wake(:,:),d_q_wake(:,:)
35      !$OMP THREADPRIVATE( d_t_wake,d_q_wake)
36      REAL, SAVE, ALLOCATABLE :: d_t_lsc(:,:),d_q_lsc(:,:),d_ql_lsc(:,:)
37      !$OMP THREADPRIVATE(d_t_lsc,d_q_lsc,d_ql_lsc)
38      REAL, SAVE, ALLOCATABLE :: d_t_ajsb(:,:), d_q_ajsb(:,:)
39      !$OMP THREADPRIVATE(d_t_ajsb, d_q_ajsb)
40      REAL, SAVE, ALLOCATABLE :: d_t_ajs(:,:), d_q_ajs(:,:)
41      !$OMP THREADPRIVATE(d_t_ajs, d_q_ajs)
42      REAL, SAVE, ALLOCATABLE :: d_u_ajs(:,:), d_v_ajs(:,:)
43      !$OMP THREADPRIVATE(d_u_ajs, d_v_ajs)
44      REAL, SAVE, ALLOCATABLE :: d_t_eva(:,:),d_q_eva(:,:)
45      !$OMP THREADPRIVATE(d_t_eva,d_q_eva)
46      REAL, SAVE, ALLOCATABLE :: d_t_lscst(:,:),d_q_lscst(:,:)
47      !$OMP THREADPRIVATE(d_t_lscst,d_q_lscst)
48      REAL, SAVE, ALLOCATABLE :: d_t_lscth(:,:),d_q_lscth(:,:)
49      !$OMP THREADPRIVATE(d_t_lscth,d_q_lscth)
50      REAL, SAVE, ALLOCATABLE :: plul_th(:),plul_st(:)
51      !$OMP THREADPRIVATE(plul_th,plul_st)
52!tendances dues a oro et lif
53      REAL, SAVE, ALLOCATABLE :: d_t_oli(:,:)
54      !$OMP THREADPRIVATE(d_t_oli)
55      REAL, SAVE, ALLOCATABLE :: d_u_oli(:,:), d_v_oli(:,:)
56      !$OMP THREADPRIVATE(d_u_oli, d_v_oli)
57      REAL, SAVE, ALLOCATABLE :: d_t_vdf(:,:), d_q_vdf(:,:), d_t_diss(:,:)
58      !$OMP THREADPRIVATE( d_t_vdf, d_q_vdf,d_t_diss)
59      REAL, SAVE, ALLOCATABLE :: d_u_vdf(:,:), d_v_vdf(:,:)
60      !$OMP THREADPRIVATE(d_u_vdf, d_v_vdf)
61      REAL, SAVE, ALLOCATABLE :: d_t_oro(:,:)
62      !$OMP THREADPRIVATE(d_t_oro)
63      REAL, SAVE, ALLOCATABLE :: d_u_oro(:,:), d_v_oro(:,:)
64      !$OMP THREADPRIVATE(d_u_oro, d_v_oro)
65      REAL, SAVE, ALLOCATABLE :: d_t_lif(:,:)
66      !$OMP THREADPRIVATE(d_t_lif)
67      REAL, SAVE, ALLOCATABLE :: d_u_lif(:,:), d_v_lif(:,:)
68      !$OMP THREADPRIVATE(d_u_lif, d_v_lif)
69! Tendances Ondes de G non oro (runs strato).
70      REAL, SAVE, ALLOCATABLE :: d_u_hin(:,:)
71      !$OMP THREADPRIVATE(d_u_hin)
72      REAL, SAVE, ALLOCATABLE :: d_v_hin(:,:)
73      !$OMP THREADPRIVATE(d_v_hin)
74      REAL, SAVE, ALLOCATABLE :: d_t_hin(:,:)
75      !$OMP THREADPRIVATE(d_t_hin)
76
77! tendance du a la conersion Ec -> E thermique
78      REAL, SAVE, ALLOCATABLE :: d_t_ec(:,:)
79      !$OMP THREADPRIVATE(d_t_ec)
80      REAL, SAVE, ALLOCATABLE :: d_ts(:,:), d_tr(:,:,:)
81      !$OMP THREADPRIVATE(d_ts, d_tr)
82
83! diagnostique pour le rayonnement
84      REAL, SAVE, ALLOCATABLE :: topswad_aero(:),  solswad_aero(:)      ! diag
85      !$OMP THREADPRIVATE(topswad_aero,solswad_aero)
86      REAL, SAVE, ALLOCATABLE :: topswai_aero(:),  solswai_aero(:)      ! diag
87      !$OMP THREADPRIVATE(topswai_aero,solswai_aero)
88      REAL, SAVE, ALLOCATABLE :: topswad0_aero(:), solswad0_aero(:)     ! diag
89      !$OMP THREADPRIVATE(topswad0_aero,solswad0_aero)
90      REAL, SAVE, ALLOCATABLE :: topsw_aero(:,:),  solsw_aero(:,:)      ! diag
91      !$OMP THREADPRIVATE(topsw_aero,solsw_aero)
92      REAL, SAVE, ALLOCATABLE :: topsw0_aero(:,:), solsw0_aero(:,:)     ! diag
93      !$OMP THREADPRIVATE(topsw0_aero,solsw0_aero)
94      REAL, SAVE, ALLOCATABLE :: topswcf_aero(:,:),  solswcf_aero(:,:)  ! diag
95      !$OMP THREADPRIVATE(topswcf_aero,solswcf_aero)
96      REAL, SAVE, ALLOCATABLE :: tausum_aero(:,:,:)
97      !$OMP THREADPRIVATE(tausum_aero)
98      REAL, SAVE, ALLOCATABLE :: tau3d_aero(:,:,:,:)
99      !$OMP THREADPRIVATE(tau3d_aero)
100      REAL, SAVE, ALLOCATABLE :: scdnc(:,:)
101      !$OMP THREADPRIVATE(scdnc)
102      REAL, SAVE, ALLOCATABLE :: cldncl(:)
103      !$OMP THREADPRIVATE(cldncl)
104      REAL, SAVE, ALLOCATABLE :: reffclwtop(:)
105      !$OMP THREADPRIVATE(reffclwtop)
106      REAL, SAVE, ALLOCATABLE :: lcc(:)
107      !$OMP THREADPRIVATE(lcc)
108      REAL, SAVE, ALLOCATABLE :: reffclws(:,:)
109      !$OMP THREADPRIVATE(reffclws)
110      REAL, SAVE, ALLOCATABLE :: reffclwc(:,:)
111      !$OMP THREADPRIVATE(reffclwc)
112      REAL, SAVE, ALLOCATABLE :: cldnvi(:)
113      !$OMP THREADPRIVATE(cldnvi)
114      REAL, SAVE, ALLOCATABLE :: lcc3d(:,:)
115      !$OMP THREADPRIVATE(lcc3d)
116      REAL, SAVE, ALLOCATABLE :: lcc3dcon(:,:)
117      !$OMP THREADPRIVATE(lcc3dcon)
118      REAL, SAVE, ALLOCATABLE :: lcc3dstra(:,:)
119      !$OMP THREADPRIVATE(lcc3dstra)
120      REAL, SAVE, ALLOCATABLE :: od550aer(:)
121      !$OMP THREADPRIVATE(od550aer)
122      REAL, SAVE, ALLOCATABLE :: absvisaer(:)
123      !$OMP THREADPRIVATE(absvisaer)
124      REAL, SAVE, ALLOCATABLE :: od865aer(:)
125      !$OMP THREADPRIVATE(od865aer)
126      REAL, SAVE, ALLOCATABLE :: ec550aer(:,:)
127      !$OMP THREADPRIVATE(ec550aer)
128      REAL, SAVE, ALLOCATABLE :: od550lt1aer(:)
129      !$OMP THREADPRIVATE(od550lt1aer)
130      REAL, SAVE, ALLOCATABLE :: sconcso4(:)
131      !$OMP THREADPRIVATE(sconcso4)
132      REAL, SAVE, ALLOCATABLE :: sconcoa(:)
133      !$OMP THREADPRIVATE(sconcoa)
134      REAL, SAVE, ALLOCATABLE :: sconcbc(:)
135      !$OMP THREADPRIVATE(sconcbc)
136      REAL, SAVE, ALLOCATABLE :: sconcss(:)
137      !$OMP THREADPRIVATE(sconcss)
138      REAL, SAVE, ALLOCATABLE :: sconcdust(:)
139      !$OMP THREADPRIVATE(sconcdust)
140      REAL, SAVE, ALLOCATABLE :: concso4(:,:)
141      !$OMP THREADPRIVATE(concso4)
142      REAL, SAVE, ALLOCATABLE :: concoa(:,:)
143      !$OMP THREADPRIVATE(concoa)
144      REAL, SAVE, ALLOCATABLE :: concbc(:,:)
145      !$OMP THREADPRIVATE(concbc)
146      REAL, SAVE, ALLOCATABLE :: concss(:,:)
147      !$OMP THREADPRIVATE(concss)
148      REAL, SAVE, ALLOCATABLE :: concdust(:,:)
149      !$OMP THREADPRIVATE(concdust)
150      REAL, SAVE, ALLOCATABLE :: loadso4(:)
151      !$OMP THREADPRIVATE(loadso4)
152      REAL, SAVE, ALLOCATABLE :: loadoa(:)
153      !$OMP THREADPRIVATE(loadoa)
154      REAL, SAVE, ALLOCATABLE :: loadbc(:)
155      !$OMP THREADPRIVATE(loadbc)
156      REAL, SAVE, ALLOCATABLE :: loadss(:)
157      !$OMP THREADPRIVATE(loadss)
158      REAL, SAVE, ALLOCATABLE :: loaddust(:)
159      !$OMP THREADPRIVATE(loaddust)
160      REAL, SAVE, ALLOCATABLE :: load_tmp1(:)
161      !$OMP THREADPRIVATE(load_tmp1)
162      REAL, SAVE, ALLOCATABLE :: load_tmp2(:)
163      !$OMP THREADPRIVATE(load_tmp2)
164      REAL, SAVE, ALLOCATABLE :: load_tmp3(:)
165      !$OMP THREADPRIVATE(load_tmp3)
166      REAL, SAVE, ALLOCATABLE :: load_tmp4(:)
167      !$OMP THREADPRIVATE(load_tmp4)
168      REAL, SAVE, ALLOCATABLE :: load_tmp5(:)
169      !$OMP THREADPRIVATE(load_tmp5)
170      REAL, SAVE, ALLOCATABLE :: load_tmp6(:)
171      !$OMP THREADPRIVATE(load_tmp6)
172      REAL, SAVE, ALLOCATABLE :: load_tmp7(:)
173      !$OMP THREADPRIVATE(load_tmp7)
174
175!IM ajout variables CFMIP2/CMIP5
176      REAL,ALLOCATABLE,SAVE :: topswad_aerop(:), solswad_aerop(:)
177!$OMP THREADPRIVATE(topswad_aerop, solswad_aerop)
178      REAL,ALLOCATABLE,SAVE :: topswai_aerop(:), solswai_aerop(:)
179!$OMP THREADPRIVATE(topswai_aerop, solswai_aerop)
180      REAL,ALLOCATABLE,SAVE :: topswad0_aerop(:), solswad0_aerop(:)
181!$OMP THREADPRIVATE(topswad0_aerop, solswad0_aerop)
182      REAL,ALLOCATABLE,SAVE :: topsw_aerop(:,:), topsw0_aerop(:,:) 
183!$OMP THREADPRIVATE(topsw_aerop, topsw0_aerop)
184      REAL,ALLOCATABLE,SAVE :: solsw_aerop(:,:), solsw0_aerop(:,:)
185!$OMP THREADPRIVATE(solsw_aerop, solsw0_aerop)
186      REAL,ALLOCATABLE,SAVE :: topswcf_aerop(:,:), solswcf_aerop(:,:)
187!$OMP THREADPRIVATE(topswcf_aerop, solswcf_aerop)
188
189CONTAINS
190
191!======================================================================
192SUBROUTINE phys_local_var_init
193USE dimphy
194USE infotrac, ONLY : nbtr
195USE aero_mod
196USE indice_sol_mod
197
198IMPLICIT NONE
199      allocate(t_seri(klon,klev),q_seri(klon,klev),ql_seri(klon,klev),qs_seri(klon,klev))
200      allocate(u_seri(klon,klev),v_seri(klon,klev))
201
202      allocate(tr_seri(klon,klev,nbtr))
203      allocate(d_t_dyn(klon,klev),d_q_dyn(klon,klev))
204      allocate(d_u_dyn(klon,klev),d_v_dyn(klon,klev))
205      allocate(d_tr_dyn(klon,klev,nbtr))                   !RomP
206      allocate(d_t_con(klon,klev),d_q_con(klon,klev))
207      allocate(d_u_con(klon,klev),d_v_con(klon,klev))
208      allocate(d_t_wake(klon,klev),d_q_wake(klon,klev))
209      allocate(d_t_lsc(klon,klev),d_q_lsc(klon,klev))
210      allocate(d_ql_lsc(klon,klev))
211      allocate(d_t_ajsb(klon,klev),d_q_ajsb(klon,klev))
212      allocate(d_t_ajs(klon,klev),d_q_ajs(klon,klev))
213      allocate(d_u_ajs(klon,klev),d_v_ajs(klon,klev))
214      allocate(d_t_eva(klon,klev),d_q_eva(klon,klev))
215      allocate(d_t_lscst(klon,klev),d_q_lscst(klon,klev))
216      allocate(d_t_lscth(klon,klev),d_q_lscth(klon,klev))
217      allocate(plul_st(klon),plul_th(klon))
218      allocate(d_t_vdf(klon,klev),d_q_vdf(klon,klev),d_t_diss(klon,klev))
219      allocate(d_u_vdf(klon,klev),d_v_vdf(klon,klev))
220      allocate(d_t_oli(klon,klev),d_t_oro(klon,klev))
221      allocate(d_u_oli(klon,klev),d_v_oli(klon,klev))
222      allocate(d_u_oro(klon,klev),d_v_oro(klon,klev))
223      allocate(d_t_lif(klon,klev),d_t_ec(klon,klev))
224      allocate(d_u_lif(klon,klev),d_v_lif(klon,klev))
225      allocate(d_ts(klon,nbsrf), d_tr(klon,klev,nbtr))
226      allocate(topswad_aero(klon), solswad_aero(klon))
227      allocate(topswai_aero(klon), solswai_aero(klon))
228      allocate(topswad0_aero(klon), solswad0_aero(klon))
229      allocate(topsw_aero(klon,naero_grp), solsw_aero(klon,naero_grp))
230      allocate(topsw0_aero(klon,naero_grp), solsw0_aero(klon,naero_grp))
231      allocate(topswcf_aero(klon,3), solswcf_aero(klon,3))
232      allocate(d_u_hin(klon,klev),d_v_hin(klon,klev),d_t_hin(klon,klev))
233      allocate(tausum_aero(klon,nwave,naero_spc))
234      allocate(tau3d_aero(klon,klev,nwave,naero_spc))
235      allocate(scdnc(klon, klev))
236      allocate(cldncl(klon))
237      allocate(reffclwtop(klon))
238      allocate(lcc(klon))
239      allocate(reffclws(klon, klev))
240      allocate(reffclwc(klon, klev))
241      allocate(cldnvi(klon))
242      allocate(lcc3d(klon, klev))
243      allocate(lcc3dcon(klon, klev))
244      allocate(lcc3dstra(klon, klev))
245      allocate(od550aer(klon))   
246      allocate(od865aer(klon))   
247      allocate(absvisaer(klon)) 
248      allocate(ec550aer(klon,klev))
249      allocate(od550lt1aer(klon))               
250      allocate(sconcso4(klon))
251      allocate(sconcoa(klon))
252      allocate(sconcbc(klon))
253      allocate(sconcss(klon))
254      allocate(sconcdust(klon))
255      allocate(concso4(klon,klev))
256      allocate(concoa(klon,klev))
257      allocate(concbc(klon,klev))
258      allocate(concss(klon,klev))
259      allocate(concdust(klon,klev))
260      allocate(loadso4(klon))
261      allocate(loadoa(klon))
262      allocate(loadbc(klon))
263      allocate(loadss(klon))
264      allocate(loaddust(klon))
265      allocate(load_tmp1(klon))
266      allocate(load_tmp2(klon))
267      allocate(load_tmp3(klon))
268      allocate(load_tmp4(klon))
269      allocate(load_tmp5(klon))
270      allocate(load_tmp6(klon))
271      allocate(load_tmp7(klon))
272
273!IM ajout variables CFMIP2/CMIP5
274      ALLOCATE(topswad_aerop(klon), solswad_aerop(klon))
275      ALLOCATE(topswai_aerop(klon), solswai_aerop(klon))
276      ALLOCATE(topswad0_aerop(klon), solswad0_aerop(klon))
277      ALLOCATE(topsw_aerop(klon,naero_grp), topsw0_aerop(klon,naero_grp))
278      ALLOCATE(solsw_aerop(klon,naero_grp), solsw0_aerop(klon,naero_grp))
279      ALLOCATE(topswcf_aerop(klon,naero_grp), solswcf_aerop(klon,naero_grp))
280
281END SUBROUTINE phys_local_var_init
282
283!======================================================================
284SUBROUTINE phys_local_var_end
285USE dimphy
286USE indice_sol_mod
287IMPLICIT NONE
288      deallocate(t_seri,q_seri,ql_seri,qs_seri)
289      deallocate(u_seri,v_seri)
290
291      deallocate(tr_seri)
292      deallocate(d_t_dyn,d_q_dyn)
293      deallocate(d_u_dyn,d_v_dyn)
294      deallocate(d_tr_dyn)                      !RomP
295      deallocate(d_t_con,d_q_con)
296      deallocate(d_u_con,d_v_con)
297      deallocate(d_t_wake,d_q_wake)
298      deallocate(d_t_lsc,d_q_lsc)
299      deallocate(d_ql_lsc)
300      deallocate(d_t_ajsb,d_q_ajsb)
301      deallocate(d_t_ajs,d_q_ajs)
302      deallocate(d_u_ajs,d_v_ajs)
303      deallocate(d_t_eva,d_q_eva)
304      deallocate(d_t_lscst,d_q_lscst)
305      deallocate(d_t_lscth,d_q_lscth)
306      deallocate(plul_st,plul_th)
307      deallocate(d_t_vdf,d_q_vdf,d_t_diss)
308      deallocate(d_u_vdf,d_v_vdf)
309      deallocate(d_t_oli,d_t_oro)
310      deallocate(d_u_oli,d_v_oli)
311      deallocate(d_u_oro,d_v_oro)
312      deallocate(d_t_lif,d_t_ec)
313      deallocate(d_u_lif,d_v_lif)
314      deallocate(d_ts, d_tr)
315      deallocate(topswad_aero,solswad_aero)
316      deallocate(topswai_aero,solswai_aero)
317      deallocate(topswad0_aero,solswad0_aero)
318      deallocate(topsw_aero,solsw_aero)
319      deallocate(topsw0_aero,solsw0_aero)
320      deallocate(topswcf_aero,solswcf_aero)
321      deallocate(tausum_aero)
322      deallocate(tau3d_aero)
323      deallocate(scdnc)
324      deallocate(cldncl)
325      deallocate(reffclwtop)
326      deallocate(lcc)
327      deallocate(reffclws)
328      deallocate(reffclwc)
329      deallocate(cldnvi)
330      deallocate(lcc3d)
331      deallocate(lcc3dcon)
332      deallocate(lcc3dstra)
333      deallocate(od550aer)       
334      deallocate(od865aer)
335      deallocate(absvisaer)
336      deallocate(ec550aer)
337      deallocate(od550lt1aer)
338      deallocate(sconcso4)
339      deallocate(sconcoa)
340      deallocate(sconcbc)
341      deallocate(sconcss)
342      deallocate(sconcdust)
343      deallocate(concso4)
344      deallocate(concoa)
345      deallocate(concbc)
346      deallocate(concss)
347      deallocate(concdust)
348      deallocate(loadso4)
349      deallocate(loadoa)
350      deallocate(loadbc)
351      deallocate(loadss)
352      deallocate(loaddust)
353      deallocate(load_tmp1)
354      deallocate(load_tmp2)
355      deallocate(load_tmp3)
356      deallocate(load_tmp4)
357      deallocate(load_tmp5)
358      deallocate(load_tmp6)
359      deallocate(load_tmp7)
360      deallocate(d_u_hin,d_v_hin,d_t_hin)
361
362!IM ajout variables CFMIP2/CMIP5
363      deallocate(topswad_aerop, solswad_aerop)
364      deallocate(topswai_aerop, solswai_aerop)
365      deallocate(topswad0_aerop, solswad0_aerop)
366      deallocate(topsw_aerop, topsw0_aerop)
367      deallocate(solsw_aerop, solsw0_aerop)
368      deallocate(topswcf_aerop, solswcf_aerop)
369
370END SUBROUTINE phys_local_var_end
371
372END MODULE phys_local_var_mod
Note: See TracBrowser for help on using the repository browser.