1 | IF (ok_mensuel) THEN |
---|
2 | |
---|
3 | zsto = dtime |
---|
4 | zout = dtime * REAL(ecrit_mth) |
---|
5 | itau_w = itau_phy + itap |
---|
6 | |
---|
7 | c------------------------------------------------------- |
---|
8 | IF(lev_histmth.GE.1) THEN |
---|
9 | |
---|
10 | ccccccccccccc 2D fields, invariables |
---|
11 | |
---|
12 | call histwrite_phy(nid_mth,.false.,"phis",itau_w,pphis) |
---|
13 | c call histwrite_phy(nid_mth,.false.,"aire",itau_w,cell_area) |
---|
14 | cell_area_out(:)=cell_area(:) |
---|
15 | if (is_north_pole_phy) cell_area_out(1)=cell_area(1)/nbp_lon |
---|
16 | if (is_south_pole_phy) cell_area_out(klon)=cell_area(klon)/nbp_lon |
---|
17 | call histwrite_phy(nid_mth,.false.,"aire",itau_w,cell_area_out) |
---|
18 | |
---|
19 | ccccccc axe Ls ... Faudrait le reduire a axe temporel seulement... |
---|
20 | c Correction passage de 360 a 0... Sinon probleme avec moyenne |
---|
21 | if (zls.lt.zlsm1) then |
---|
22 | do i=1,klon |
---|
23 | tmpout(i,1) = zls*180./RPI+360. |
---|
24 | enddo |
---|
25 | zlsm1 = 2.*RPI |
---|
26 | else |
---|
27 | do i=1,klon |
---|
28 | tmpout(i,1) = zls*180./RPI |
---|
29 | enddo |
---|
30 | zlsm1 = zls |
---|
31 | endif |
---|
32 | call histwrite_phy(nid_mth,.false.,"ls",itau_w,tmpout(:,1)) |
---|
33 | |
---|
34 | ccccccccccccc 2D fields, variables |
---|
35 | |
---|
36 | call histwrite_phy(nid_mth,.false.,"tsol",itau_w,ftsol) |
---|
37 | call histwrite_phy(nid_mth,.false.,"psol",itau_w,paprs(:,1)) |
---|
38 | |
---|
39 | c call histwrite_phy(nid_mth,.false.,"ue",itau_w,ue) |
---|
40 | c call histwrite_phy(nid_mth,.false.,"ve",itau_w,ve) |
---|
41 | |
---|
42 | ENDIF !lev_histmth.GE.1 |
---|
43 | |
---|
44 | c------------------------------------------------------- |
---|
45 | IF(lev_histmth.GE.2) THEN |
---|
46 | |
---|
47 | ccccccccccccc 3D fields, basics |
---|
48 | |
---|
49 | call histwrite_phy(nid_mth,.false.,"temp",itau_w,t_seri) |
---|
50 | call histwrite_phy(nid_mth,.false.,"pres",itau_w,pplay) |
---|
51 | call histwrite_phy(nid_mth,.false.,"geop",itau_w,zphi) |
---|
52 | call histwrite_phy(nid_mth,.false.,"vitu",itau_w,u_seri) |
---|
53 | call histwrite_phy(nid_mth,.false.,"vitv",itau_w,v_seri) |
---|
54 | call histwrite_phy(nid_mth,.false.,"vitw",itau_w,omega) |
---|
55 | c call histwrite_phy(nid_mth,.false.,"Kz",itau_w,ycoefh) |
---|
56 | call histwrite_phy(nid_mth,.false.,"tops",itau_w,topsw) |
---|
57 | call histwrite_phy(nid_mth,.false.,"duvdf",itau_w,d_u_vdf) |
---|
58 | call histwrite_phy(nid_mth,.false.,"dudyn",itau_w,d_u_dyn) |
---|
59 | |
---|
60 | cccccccccccccccccc Tracers |
---|
61 | |
---|
62 | if (iflag_trac.eq.1) THEN |
---|
63 | if (microfi.ge.1) then |
---|
64 | c DO iq=1,nmicro |
---|
65 | c call histwrite_phy(nid_mth,.false.,tname(iq), |
---|
66 | c . itau_w,qaer(1:klon,1:klev,iq)) |
---|
67 | c ENDDO |
---|
68 | c ------- NB AER TOT |
---|
69 | do i=1,klon |
---|
70 | do j=1,klev |
---|
71 | tmpout(i,j)= SUM(qaer(i,j,1:nrad)) |
---|
72 | enddo |
---|
73 | enddo |
---|
74 | call histwrite_phy(nid_mth,.false.,"qaer",itau_w,tmpout) |
---|
75 | |
---|
76 | if (clouds.eq.1) then |
---|
77 | c ------- NB NOY TOT |
---|
78 | do i=1,klon |
---|
79 | do j=1,klev |
---|
80 | tmpout(i,j)= SUM(qaer(i,j,nrad+1:2*nrad)) |
---|
81 | enddo |
---|
82 | enddo |
---|
83 | call histwrite_phy(nid_mth,.false.,"qnoy",itau_w,tmpout) |
---|
84 | c ------- V GLA1 TOT |
---|
85 | do i=1,klon |
---|
86 | do j=1,klev |
---|
87 | tmpout(i,j)= SUM(qaer(i,j,2*nrad+1:3*nrad)) |
---|
88 | enddo |
---|
89 | enddo |
---|
90 | call histwrite_phy(nid_mth,.false.,"qgl1",itau_w,tmpout) |
---|
91 | c ------- V GLA2 TOT |
---|
92 | do i=1,klon |
---|
93 | do j=1,klev |
---|
94 | tmpout(i,j)= SUM(qaer(i,j,3*nrad+1:4*nrad)) |
---|
95 | enddo |
---|
96 | enddo |
---|
97 | call histwrite_phy(nid_mth,.false.,"qgl2",itau_w,tmpout) |
---|
98 | c ------- V GLA3 TOT |
---|
99 | do i=1,klon |
---|
100 | do j=1,klev |
---|
101 | tmpout(i,j)= SUM(qaer(i,j,4*nrad+1:5*nrad)) |
---|
102 | enddo |
---|
103 | enddo |
---|
104 | call histwrite_phy(nid_mth,.false.,"qgl3",itau_w,tmpout) |
---|
105 | c -------------- |
---|
106 | c ----- SATURATION ESP NUAGES |
---|
107 | call histwrite_phy(nid_mth,.false.,"ch4sat",itau_w,satch4) |
---|
108 | call histwrite_phy(nid_mth,.false.,"c2h6sat",itau_w,satc2h6) |
---|
109 | call histwrite_phy(nid_mth,.false.,"c2h2sat",itau_w,satc2h2) |
---|
110 | c -------------- |
---|
111 | c ----- RESERVOIR DE SURFACE |
---|
112 | call histwrite_phy(nid_mth,.false.,"reserv",itau_w,reservoir) |
---|
113 | c -------------- |
---|
114 | c ----- ECHANGE GAZ SURF/ATM (evaporation) |
---|
115 | call histwrite_phy(nid_mth,.false.,"evapch4",itau_w,evapch4) |
---|
116 | c -------------- |
---|
117 | c ----- PRECIPITATIONS |
---|
118 | c ----- CH4 |
---|
119 | call histwrite_phy(nid_mth,.false.,"prech4", |
---|
120 | . itau_w,precip(1:klon,1)) |
---|
121 | c ----- C2H6 |
---|
122 | call histwrite_phy(nid_mth,.false.,"prec2h6", |
---|
123 | . itau_w,precip(1:klon,2)) |
---|
124 | c ----- C2H2 |
---|
125 | call histwrite_phy(nid_mth,.false.,"prec2h2", |
---|
126 | . itau_w,precip(1:klon,3)) |
---|
127 | c ----- NOY |
---|
128 | call histwrite_phy(nid_mth,.false.,"prenoy", |
---|
129 | . itau_w,precip(1:klon,4)) |
---|
130 | c ----- AER |
---|
131 | call histwrite_phy(nid_mth,.false.,"preaer", |
---|
132 | . itau_w,precip(1:klon,5)) |
---|
133 | c -------------- |
---|
134 | c ----- FLUX GLACE |
---|
135 | c ----- CH4 |
---|
136 | call histwrite_phy(nid_mth,.false.,"flxgl1", |
---|
137 | . itau_w,flxesp_i(1:klon,1:klev,1)) |
---|
138 | c ----- C2H6 |
---|
139 | call histwrite_phy(nid_mth,.false.,"flxgl2", |
---|
140 | . itau_w,flxesp_i(1:klon,1:klev,2)) |
---|
141 | c ----- C2H2 |
---|
142 | call histwrite_phy(nid_mth,.false.,"flxgl3", |
---|
143 | . itau_w,flxesp_i(1:klon,1:klev,3)) |
---|
144 | c -------------- |
---|
145 | c ----- Source/puits GLACE |
---|
146 | c ----- CH4 |
---|
147 | call histwrite_phy(nid_mth,.false.,"solch4", |
---|
148 | . itau_w,solesp(1:klon,1:klev,1)) |
---|
149 | c ----- C2H6 |
---|
150 | call histwrite_phy(nid_mth,.false.,"solc2h6", |
---|
151 | . itau_w,solesp(1:klon,1:klev,2)) |
---|
152 | c ----- C2H2 |
---|
153 | call histwrite_phy(nid_mth,.false.,"solc2h2", |
---|
154 | . itau_w,solesp(1:klon,1:klev,3)) |
---|
155 | c -------------- |
---|
156 | c ----- RAYON MOYEN GOUTTE |
---|
157 | call histwrite_phy(nid_mth,.false.,"rcldbar",itau_w,rmcloud) |
---|
158 | |
---|
159 | endif |
---|
160 | endif |
---|
161 | |
---|
162 | c -------------- |
---|
163 | c ----- TRACEURS CHIMIQUES |
---|
164 | if (nmicro.lt.nqmax) then |
---|
165 | DO iq=nmicro+1,nqmax |
---|
166 | call histwrite_phy(nid_mth,.false.,tname(iq), |
---|
167 | . itau_w,tr_seri(1:klon,1:klev,iq)) |
---|
168 | ENDDO |
---|
169 | c Condensation: |
---|
170 | c DO iq=nmicro+1,nqmax |
---|
171 | c call histwrite_phy(nid_mth,.false.,"c_"//tname(iq), |
---|
172 | c . itau_w,d_tr_mph(1:klon,1:klev,iq)) |
---|
173 | c ENDDO |
---|
174 | endif |
---|
175 | endif |
---|
176 | |
---|
177 | ENDIF !lev_histmth.GE.2 |
---|
178 | |
---|
179 | c------------------------------------------------------- |
---|
180 | IF(lev_histmth.GE.3) THEN |
---|
181 | |
---|
182 | cccccccccccccccccc Radiative transfer |
---|
183 | |
---|
184 | c 2D |
---|
185 | |
---|
186 | call histwrite_phy(nid_mth,.false.,"topl",itau_w,toplw) |
---|
187 | call histwrite_phy(nid_mth,.false.,"sols",itau_w,solsw) |
---|
188 | call histwrite_phy(nid_mth,.false.,"soll",itau_w,sollw) |
---|
189 | |
---|
190 | c 3D |
---|
191 | |
---|
192 | call histwrite_phy(nid_mth,.false.,"SWnet", |
---|
193 | . itau_w,swnet(1:klon,1:klev)) |
---|
194 | c call histwrite_phy(nid_mth,.false.,"SWup", |
---|
195 | c . itau_w,swup(1:klon,1:klev)) |
---|
196 | c call histwrite_phy(nid_mth,.false.,"SWdn", |
---|
197 | c . itau_w,swdn(1:klon,1:klev)) |
---|
198 | call histwrite_phy(nid_mth,.false.,"LWnet", |
---|
199 | . itau_w,lwnet(1:klon,1:klev)) |
---|
200 | c call histwrite_phy(nid_mth,.false.,"LWup", |
---|
201 | c . itau_w,lwup(1:klon,1:klev)) |
---|
202 | c call histwrite_phy(nid_mth,.false.,"LWdn", |
---|
203 | c . itau_w,lwdn(1:klon,1:klev)) |
---|
204 | call histwrite_phy(nid_mth,.false.,"fluxvdf",itau_w,fluxt) |
---|
205 | call histwrite_phy(nid_mth,.false.,"fluxdyn",itau_w,flux_dyn) |
---|
206 | call histwrite_phy(nid_mth,.false.,"fluxajs",itau_w,flux_ajs) |
---|
207 | c call histwrite_phy(nid_mth,.false.,"fluxec",itau_w,flux_ec) |
---|
208 | |
---|
209 | c -------------- |
---|
210 | c ----- OPACITE BRUME |
---|
211 | do k=7,NSPECV,10 |
---|
212 | do i=1,klon |
---|
213 | do l=1,klev |
---|
214 | t_tauhvd(i,l)=TAUHVD(i,klev-l+1,k) |
---|
215 | enddo |
---|
216 | enddo |
---|
217 | write(str2,'(i2.2)') k |
---|
218 | call histwrite_phy(nid_mth,.false.,"thv"//str2,itau_w,t_tauhvd) |
---|
219 | enddo ! fin boucle NSPECV |
---|
220 | |
---|
221 | do k=8,NSPECI,10 |
---|
222 | do i=1,klon |
---|
223 | do l=1,klev |
---|
224 | t_tauhvd(i,l)=TAUHID(i,klev-l+1,k) |
---|
225 | enddo |
---|
226 | enddo |
---|
227 | write(str2,'(i2.2)') k |
---|
228 | call histwrite_phy(nid_mth,.false.,"thi"//str2,itau_w,t_tauhvd) |
---|
229 | enddo ! fin boucle NSPECI |
---|
230 | c -------------- |
---|
231 | c ----- EXTINCTION BRUME |
---|
232 | do k=7,NSPECV,10 |
---|
233 | do i=1,klon |
---|
234 | do l=1,klev |
---|
235 | if(l.ne.klev) |
---|
236 | s t_khvd(i,l)=TAUHVD(i,klev-l+1,k) |
---|
237 | s -TAUHVD(i,klev-l+1-1,k) |
---|
238 | if(l.eq.klev) |
---|
239 | s t_khvd(i,l)=TAUHVD(i,klev-l+1,k) |
---|
240 | |
---|
241 | t_khvd(i,l)=t_khvd(i,l)/(zzlev(i,l+1)-zzlev(i,l)) |
---|
242 | enddo |
---|
243 | enddo |
---|
244 | write(str2,'(i2.2)') k |
---|
245 | call histwrite_phy(nid_mth,.false.,"khv"//str2,itau_w,t_khvd) |
---|
246 | enddo ! fin boucle NSPECV |
---|
247 | |
---|
248 | do k=8,NSPECI,10 |
---|
249 | do i=1,klon |
---|
250 | do l=1,klev |
---|
251 | if(l.ne.klev) |
---|
252 | s t_khvd(i,l)=TAUHID(i,klev-l+1,k) |
---|
253 | s -TAUHID(i,klev-l+1-1,k) |
---|
254 | if(l.eq.klev) |
---|
255 | s t_khvd(i,l)=TAUHID(i,klev-l+1,k) |
---|
256 | |
---|
257 | t_khvd(i,l)=t_khvd(i,l)/(zzlev(i,l+1)-zzlev(i,l)) |
---|
258 | enddo |
---|
259 | enddo |
---|
260 | write(str2,'(i2.2)') k |
---|
261 | call histwrite_phy(nid_mth,.false.,"khi"//str2,itau_w,t_khvd) |
---|
262 | enddo ! fin boucle NSPECI |
---|
263 | c -------------- |
---|
264 | c ----- OPACITE GAZ |
---|
265 | do k=7,NSPECV,10 |
---|
266 | do i=1,klon |
---|
267 | do l=1,klev |
---|
268 | t_tauhvd(i,l)=TAUGVD(i,klev-l+1,k) |
---|
269 | enddo |
---|
270 | enddo |
---|
271 | write(str2,'(i2.2)') k |
---|
272 | call histwrite_phy(nid_mth,.false.,"tgv"//str2,itau_w,t_tauhvd) |
---|
273 | enddo ! fin boucle NSPECV |
---|
274 | |
---|
275 | do k=8,NSPECI,10 |
---|
276 | do i=1,klon |
---|
277 | do l=1,klev |
---|
278 | t_tauhvd(i,l)=TAUGID(i,klev-l+1,k) |
---|
279 | enddo |
---|
280 | enddo |
---|
281 | write(str2,'(i2.2)') k |
---|
282 | call histwrite_phy(nid_mth,.false.,"tgi"//str2,itau_w,t_tauhvd) |
---|
283 | enddo ! fin boucle NSPECI |
---|
284 | c -------------- |
---|
285 | c ----- EXTINCTION GAZ |
---|
286 | do k=7,NSPECV,10 |
---|
287 | do i=1,klon |
---|
288 | do l=1,klev |
---|
289 | if(l.ne.klev) |
---|
290 | s t_khvd(i,l)=TAUGVD(i,klev-l+1,k) |
---|
291 | s -TAUGVD(i,klev-l+1-1,k) |
---|
292 | if(l.eq.klev) |
---|
293 | s t_khvd(i,l)=TAUGVD(i,klev-l+1,k) |
---|
294 | |
---|
295 | t_khvd(i,l)=t_khvd(i,l)/(zzlev(i,l+1)-zzlev(i,l)) |
---|
296 | enddo |
---|
297 | enddo |
---|
298 | write(str2,'(i2.2)') k |
---|
299 | call histwrite_phy(nid_mth,.false.,"kgv"//str2,itau_w,t_khvd) |
---|
300 | enddo ! fin boucle NSPECV |
---|
301 | |
---|
302 | do k=8,NSPECI,10 |
---|
303 | do i=1,klon |
---|
304 | do l=1,klev |
---|
305 | if(l.ne.klev) |
---|
306 | s t_khvd(i,l)=TAUGID(i,klev-l+1,k) |
---|
307 | s -TAUGID(i,klev-l+1-1,k) |
---|
308 | |
---|
309 | if(l.eq.klev) |
---|
310 | s t_khvd(i,l)=TAUGID(i,klev-l+1,k) |
---|
311 | |
---|
312 | t_khvd(i,l)=t_khvd(i,l)/(zzlev(i,l+1)-zzlev(i,l)) |
---|
313 | enddo |
---|
314 | enddo |
---|
315 | write(str2,'(i2.2)') k |
---|
316 | call histwrite_phy(nid_mth,.false.,"kgi"//str2,itau_w,t_khvd) |
---|
317 | enddo ! fin boucle NSPECI |
---|
318 | |
---|
319 | c -------------- |
---|
320 | if (clouds.eq.1) then |
---|
321 | c -------------- |
---|
322 | c ----- OPACITE NUAGES (ATTENTION PROXY) |
---|
323 | call histwrite_phy(nid_mth,.false.,"tcld",itau_w,occcld) |
---|
324 | c -------------- |
---|
325 | c ----- EXTINCTION NUAGES (ATTENTION PROXY) |
---|
326 | do i=1,klon |
---|
327 | t_kcld(i,klev)=occcld(i,klev) |
---|
328 | . /(zzlev(i,klev+1)-zzlev(i,klev)) |
---|
329 | do j=klev-1,1,-1 |
---|
330 | t_kcld(i,j)=(occcld(i,j)-occcld(i,j+1)) |
---|
331 | . /(zzlev(i,j+1)-zzlev(i,j)) |
---|
332 | enddo |
---|
333 | enddo |
---|
334 | call histwrite_phy(nid_mth,.false.,"kcld",itau_w,t_kcld) |
---|
335 | c -------------- |
---|
336 | c ----- OCCURENCE NUAGES |
---|
337 | do k=1,12 |
---|
338 | write(str2,'(i2.2)') k |
---|
339 | call histwrite_phy(nid_mth,.false.,"occcld"//str2, |
---|
340 | . itau_w,occcld_m(1:klon,1:klev,k)) |
---|
341 | enddo |
---|
342 | c -------------- |
---|
343 | endif |
---|
344 | c -------------- |
---|
345 | |
---|
346 | ENDIF !lev_histmth.GE.3 |
---|
347 | |
---|
348 | c------------------------------------------------------- |
---|
349 | IF(lev_histmth.GE.4) THEN |
---|
350 | |
---|
351 | call histwrite_phy(nid_mth,.false.,"dtdyn",itau_w,d_t_dyn) |
---|
352 | call histwrite_phy(nid_mth,.false.,"dtphy",itau_w,d_t) |
---|
353 | c K/s |
---|
354 | call histwrite_phy(nid_mth,.false.,"dtvdf",itau_w,d_t_vdf) |
---|
355 | c K/s |
---|
356 | call histwrite_phy(nid_mth,.false.,"dtajs",itau_w,d_t_ajs) |
---|
357 | c K/s |
---|
358 | call histwrite_phy(nid_mth,.false.,"dtswr",itau_w,heat) |
---|
359 | c K/s |
---|
360 | call histwrite_phy(nid_mth,.false.,"dtlwr",itau_w,-1.*cool) |
---|
361 | c K/s |
---|
362 | c call histwrite_phy(nid_mth,.false.,"dtec",itau_w,d_t_ec) |
---|
363 | c call histwrite_phy(nid_mth,.false.,"dvvdf",itau_w,d_v_vdf) |
---|
364 | |
---|
365 | ENDIF !lev_histmth.GE.4 |
---|
366 | c |
---|
367 | c------------------------------------------------------- |
---|
368 | IF(lev_histmth.GE.5) THEN |
---|
369 | |
---|
370 | c call histwrite_phy(nid_mth,.false.,"taux",itau_w,fluxu) |
---|
371 | c call histwrite_phy(nid_mth,.false.,"tauy",itau_w,fluxv) |
---|
372 | c call histwrite_phy(nid_mth,.false.,"cdrm",itau_w,cdragm) |
---|
373 | c call histwrite_phy(nid_mth,.false.,"cdrh",itau_w,cdragh) |
---|
374 | |
---|
375 | ENDIF !lev_histmth.GE.5 |
---|
376 | c------------------------------------------------------- |
---|
377 | |
---|
378 | if (ok_sync) then |
---|
379 | call histsync(nid_mth) |
---|
380 | endif |
---|
381 | |
---|
382 | ENDIF |
---|