source: LMDZ4/trunk/libf/phylmd/write_histday.h @ 888

Last change on this file since 888 was 888, checked in by Laurent Fairhead, 17 years ago

Modifications sur l'albedo JG
LF

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 22.8 KB
Line 
1c
2c $Header$
3c
4      if (ok_journe) THEN
5c
6      ndex2d = 0
7      ndex3d = 0
8c
9c Champs 2D:
10c
11         itau_w = itau_phy + itap
12
13c  temperature tendency due to moist convective processes
14       DO l=1, klev
15       DO i=1, klon
16        zx_tmp_fi3d(i,l)=d_t_con(i,l)/pdtphys
17       ENDDO !i
18       ENDDO !l
19c
20      IF(lev_histday.GE.1) THEN
21c
22       CALL histwrite_phy(nid_day,"phis",itau_w,pphis)
23 
24c
25       CALL histwrite_phy(nid_day,"aire",itau_w,airephy)
26c
27      DO i=1, klon
28       zx_tmp_fi2d(i)=pctsrf(i,is_ter)+pctsrf(i,is_lic)
29      ENDDO
30c
31cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
32      CALL histwrite_phy(nid_day,"contfracATM",itau_w,zx_tmp_fi2d)
33c
34cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,pctsrf_new(:,is_ter),zx_tmp_2d)
35      CALL histwrite_phy(nid_day,"contfracOR",itau_w,
36     &                   pctsrf_new(:,is_ter))
37c
38
39      CALL histwrite_phy(nid_day,"dthmin",itau_w,dthmin)
40      CALL histwrite_phy(nid_day,"weakinv",itau_w,weak_inversion)
41
42cIM: 101003 : K/30min ==> K/s
43
44cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxtsol,zx_tmp_2d)
45      CALL histwrite_phy(nid_day,"tsol",itau_w,zxtsol)
46C
47cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zt2m,zx_tmp_2d)
48      CALL histwrite_phy(nid_day,"t2m",itau_w,zt2m)
49c
50c   En attendant un eventuel debugage.
51
52cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zt2m,zx_tmp_2d)
53      CALL histwrite_phy(nid_day,"t2m_min",itau_w,zt2m)
54c
55cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zt2m,zx_tmp_2d)
56      CALL histwrite_phy(nid_day,"t2m_max",itau_w,zt2m)
57c
58      DO i = 1, klon
59         zx_tmp_fi2d(i) = rain_lsc(i) + snow_lsc(i)
60      ENDDO
61cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
62      CALL histwrite_phy(nid_day,"plul",itau_w,zx_tmp_fi2d)
63c
64      DO i = 1, klon
65         zx_tmp_fi2d(i) = rain_con(i) + snow_con(i)
66      ENDDO
67cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
68      CALL histwrite_phy(nid_day,"pluc",itau_w,zx_tmp_fi2d)
69c
70cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, snow_lsc,zx_tmp_2d)
71      CALL histwrite_phy(nid_day,"snowl",itau_w,snow_lsc)
72c
73      IF(1.EQ.0) THEN
74cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, snow_con,zx_tmp_2d)
75      CALL histwrite_phy(nid_day,"snowc",itau_w,snow_con)
76      ENDIF
77c
78cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxfluxlat,zx_tmp_2d)
79      CALL histwrite_phy(nid_day,"flat",itau_w,zxfluxlat)
80c
81      DO i = 1, klon
82         zx_tmp_fi2d(i) = pctsrf(i,is_sic)
83      ENDDO
84c
85cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
86      CALL histwrite_phy(nid_day,"sicf",itau_w,zx_tmp_fi2d)
87c
88cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zq2m,zx_tmp_2d)
89      CALL histwrite_phy(nid_day,"q2m",itau_w,zq2m)
90c
91cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zu10m,zx_tmp_2d)
92      CALL histwrite_phy(nid_day,"u10m",itau_w,zu10m)
93c
94cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zv10m,zx_tmp_2d)
95      CALL histwrite_phy(nid_day,"v10m",itau_w,zv10m)
96c
97      DO i=1, klon
98       zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i))
99      ENDDO
100cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)     
101      CALL histwrite_phy(nid_day,"wind10m",itau_w,zx_tmp_fi2d)
102c
103cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
104      CALL histwrite_phy(nid_day,"wind10max",itau_w,zx_tmp_fi2d)
105c
106      DO i=1, klon
107         zx_tmp_fi2d(i) = paprs(i,1)
108      ENDDO
109cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
110      CALL histwrite_phy(nid_day,"psol",itau_w,zx_tmp_fi2d)
111c
112      DO i=1, klon
113         zx_tmp_fi2d(i) = (rain_fall(i) + snow_fall(i))
114      ENDDO
115cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
116      CALL histwrite_phy(nid_day,"precip",itau_w,zx_tmp_fi2d)
117c
118cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, snow_fall,zx_tmp_2d)
119      CALL histwrite_phy(nid_day,"snowf",itau_w,snow_fall)
120c
121cIM: 140404   CALL gr_fi_ecrit(1, klon,iim,jjmp1, zxsnow,zx_tmp_2d)
122c     CALL gr_fi_ecrit(1, klon,iim,jjmp1, zsnow_mass,zx_tmp_2d)
123c     CALL histwrite(nid_day,"snow_mass",itau_w,zx_tmp_2d,iim*jjmp1,
124c    .               ndex2d)
125c
126cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, evap,zx_tmp_2d)
127      CALL histwrite_phy(nid_day,"evap",itau_w,evap)
128c
129cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, topsw,zx_tmp_2d)
130      CALL histwrite_phy(nid_day,"tops",itau_w,topsw)
131c
132cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, toplw,zx_tmp_2d)
133      CALL histwrite_phy(nid_day,"topl",itau_w,toplw)
134c
135cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, solsw,zx_tmp_2d)
136      CALL histwrite_phy(nid_day,"sols",itau_w,solsw)
137c
138cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollw,zx_tmp_2d)
139      CALL histwrite_phy(nid_day,"soll",itau_w,sollw)
140c
141cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, radsol,zx_tmp_2d)
142      CALL histwrite_phy(nid_day,"radsol",itau_w,radsol)
143c
144cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldl,zx_tmp_2d)
145      CALL histwrite_phy(nid_day,"cldl",itau_w,cldl)
146c
147cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldm,zx_tmp_2d)
148      CALL histwrite_phy(nid_day,"cldm",itau_w,cldm)
149c
150cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldh,zx_tmp_2d)
151      CALL histwrite_phy(nid_day,"cldh",itau_w,cldh)
152c
153cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldt,zx_tmp_2d)
154      CALL histwrite_phy(nid_day,"cldt",itau_w,cldt)
155c
156cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, cldq,zx_tmp_2d)
157      CALL histwrite_phy(nid_day,"cldq",itau_w,cldq)
158c
159cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, prw,zx_tmp_2d)
160      CALL histwrite_phy(nid_day,"prw",itau_w,prw)
161
162c   Ecriture de champs dynamiques sur des niveaux de pression
163c     DO k=1, nlevENS
164      DO k=1, nlevSTD
165c
166c        bb=clevSTD(k)
167c
168         IF(k.GE.2.AND.k.LE.12) bb2=clevSTD(k)
169         IF(k.GE.13.AND.k.LE.17) bb3=clevSTD(k)
170c         aa=clevSTD(k)
171c         bb=aa(1:lnblnk1(aa))
172c        ENDIF
173c
174      IF(bb2.EQ."850".OR.bb2.EQ."700"
175     $   .OR.bb2.EQ."500".OR.bb2.EQ."200") THEN
176c
177cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1,usumSTD(:,k,1),zx_tmp_2d)
178        CALL histwrite_phy(nid_day,"u"//bb2,itau_w,usumSTD(:,k,1))
179c
180cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1,vsumSTD(:,k,1),zx_tmp_2d)
181        CALL histwrite_phy(nid_day,"v"//bb2,itau_w,vsumSTD(:,k,1))
182c
183      ENDIF !(bb2.EQ."850".OR.bb2.EQ."700".OR.bb2.EQ."500".OR.bb2.EQ."200") THEN
184c
185c w500
186c
187      IF(bb2.EQ."500") THEN
188c
189cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1,wsumSTD(:,k,1),zx_tmp_2d)
190      CALL histwrite_phy(nid_day,"w"//bb2,itau_w,wsumSTD(:,k,1))
191c
192cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1,phisumSTD(:,k,1),zx_tmp_2d)
193      CALL histwrite_phy(nid_day,"phi"//bb2,itau_w,phisumSTD(:,k,1))
194
195      ENDIF !(bb2.EQ."500") THEN
196c
197      ENDDO !nlevSTD
198c
199cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, slp,zx_tmp_2d)
200      CALL histwrite_phy(nid_day,"slp",itau_w,slp)
201
202cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,cape,zx_tmp_2d)
203      CALL histwrite_phy(nid_day,"cape_max",itau_w,cape)
204c
205cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollwdown,zx_tmp_2d)
206      CALL histwrite_phy(nid_day,"solldown",itau_w,sollwdown)
207c
208      DO i=1, klon
209        zx_tmp_fi2d(i)=-1*sens(i)
210      ENDDO
211cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
212      CALL histwrite_phy(nid_day,"sens",itau_w,zx_tmp_fi2d)
213c
214      zx_tmp_fi2d(1 : klon) = swdn(1 : klon, 1)
215
216cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
217      CALL histwrite_phy(nid_day, "SWdnSFC",itau_w,zx_tmp_fi2d)
218c
219      IF (OCEAN.EQ.'force ') THEN
220c
221      DO i=1, klon
222      IF((pctsrf(i,is_oce).GT.epsfra).OR.
223     .   (pctsrf(i,is_sic).GT.epsfra)) THEN
224       zx_tmp_fi2d(i) = (radsol(i) + fluxo(i))*pctsrf(i,is_oce)+
225     .                  fluxg(i)*pctsrf(i,is_sic)
226      ELSE
227       zx_tmp_fi2d(i) = 1.E+20
228      ENDIF
229      ENDDO
230cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
231      CALL histwrite_phy(nid_day,"lmt_bils",itau_w, zx_tmp_fi2d)
232c
233      ELSE IF (OCEAN.EQ.'slab  ') THEN
234c
235      DO i=1, klon
236      IF((pctsrf(i,is_oce).GT.epsfra).OR.
237     .   (pctsrf(i,is_sic).GT.epsfra)) THEN
238       zx_tmp_fi2d(i) = (radsol(i) + fluxo(i))*pctsrf(i,is_oce)+
239     .                  fluxg(i)*pctsrf(i,is_sic)
240      ELSE
241       zx_tmp_fi2d(i) = 1.E+20
242      ENDIF
243      ENDDO
244cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
245      CALL histwrite_phy(nid_day,"slab_bils",itau_w,zx_tmp_fi2d)
246c
247      DO i=1, klon
248       IF(pctsrf(i,is_oce).GT.epsfra.OR.
249     $    pctsrf(i,is_sic).GT.epsfra) THEN
250        zx_tmp_fi2d(i)=tslab(i)
251       ELSE
252        zx_tmp_fi2d(i) = 1.E+20
253       ENDIF
254      ENDDO !i=1, klon
255cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
256      CALL histwrite_phy(nid_day,"tslab",itau_w,zx_tmp_fi2d)
257c
258cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, seaice,zx_tmp_2d)
259      CALL histwrite_phy(nid_day,"seaice",itau_w,seaice)
260c
261cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, seaice/1000.,zx_tmp_2d)
262      CALL histwrite_phy(nid_day,"siceh",itau_w,seaice/1000.)
263c
264      ENDIF !(OCEAN.EQ.'slab  ') THEN
265c
266      DO i=1, klon
267       IF (pctsrf(i,is_oce).GT.epsfra) THEN
268        zx_tmp_fi2d(i) = fluxo(i)
269       ELSE
270        zx_tmp_fi2d(i) = 0.
271       ENDIF
272      ENDDO
273c
274cym     CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
275      CALL histwrite_phy(nid_day,"fluxo",itau_w,zx_tmp_fi2d)
276c
277      DO i=1, klon
278       IF (pctsrf(i,is_sic).GT.epsfra) THEN
279        zx_tmp_fi2d(i) = fluxg(i)
280       ELSE
281        zx_tmp_fi2d(i) = 0.
282       ENDIF
283      ENDDO
284c
285cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
286      CALL histwrite_phy(nid_day,"fluxg",itau_w,zx_tmp_fi2d)
287c
288      ENDIF !lev_histday.GE.1
289c
290      IF(lev_histday.GE.2) THEN
291c
292cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, bils,zx_tmp_2d)
293      CALL histwrite_phy(nid_day,"bils",itau_w, bils)
294c
295cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, fder,zx_tmp_2d)
296      CALL histwrite_phy(nid_day,"fder",itau_w,fder)
297c
298      ENDIF !lev_histday.GE.2
299c
300      IF(lev_histday.GE.3) THEN
301c=================================================================
302c   ECRITURE DES CHAMPS 3D
303c=================================================================
304
305c
306c Champs 3D:
307c
308cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, t_seri, zx_tmp_3d)
309      CALL histwrite_phy(nid_day,"temp",itau_w,t_seri)
310c
311cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, qx(1,1,ivap), zx_tmp_3d)
312      CALL histwrite_phy(nid_day,"ovap",itau_w,qx(:,:,ivap))
313c
314cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, zphi, zx_tmp_3d)
315      CALL histwrite_phy(nid_day,"geop",itau_w,zphi)
316c
317cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, u_seri, zx_tmp_3d)
318      CALL histwrite_phy(nid_day,"vitu",itau_w,u_seri)
319c
320cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, v_seri, zx_tmp_3d)
321      CALL histwrite_phy(nid_day,"vitv",itau_w,v_seri)
322c
323cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, omega, zx_tmp_3d)
324      CALL histwrite_phy(nid_day,"vitw",itau_w,omega)
325c
326cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, pplay, zx_tmp_3d)
327      CALL histwrite_phy(nid_day,"pres",itau_w,pplay)
328c
329      CALL histwrite_phy(nid_day,"rhum",itau_w,zx_rh)
330
331      CALL histwrite_phy(nid_day,"wh",itau_w,wake_h)
332c
333      CALL histwrite_phy(nid_day,"ws",itau_w,wake_s)
334c
335      CALL histwrite_phy(nid_day,"cin",itau_w,cin)
336
337      CALL histwrite_phy(nid_day,"wale",itau_w,ale_wake)
338c
339      CALL histwrite_phy(nid_day,"walp",itau_w,alp_wake)
340c
341      CALL histwrite_phy(nid_day,"blale",itau_w,Ale_bl)
342c
343      CALL histwrite_phy(nid_day,"blalp",itau_w,Alp_bl)
344
345cFin Wake parameters 2D     
346c Wake parameters 3D
347c
348          print*,'SSS test2'
349if (1.eq.0) then
350      CALL histwrite_phy(nid_day,"wdt1",itau_w,wake_deltat(:,1))
351c
352      CALL histwrite_phy(nid_day,"wdq1",itau_w,wake_deltaq(:,1))
353c
354
355c
356      ENDIF !lev_histday.GE.3
357c=================================================================
358c   FIN ECRITURE DES CHAMPS 3D
359c=================================================================
360      IF(lev_histday.ge.4) THEN
361c=================================================================
362c
363c   ECRITURE DES CHAMPS SUR LES SOUS SURFACES
364c
365c=================================================================
366      zx_tmp_fi2d(1 : klon) = swup( 1 : klon, klevp1 )
367cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
368      CALL histwrite_phy(nid_day, "SWupTOA",itau_w,zx_tmp_fi2d)
369c
370      zx_tmp_fi2d(1 : klon) = swup( 1 : klon, 1 )
371cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
372      CALL histwrite_phy(nid_day, "SWupSFC",itau_w,zx_tmp_fi2d)
373c
374      zx_tmp_fi2d(1 : klon) = swdn( 1 : klon, klevp1 )
375cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
376      CALL histwrite_phy(nid_day, "SWdnTOA",itau_w,zx_tmp_fi2d)
377c
378      zx_tmp_fi2d(1 : klon) = swup0( 1 : klon, klevp1 )
379cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
380      CALL histwrite_phy(nid_day, "SWupTOAclr",itau_w,zx_tmp_fi2d)
381c
382      zx_tmp_fi2d(1 : klon) = swup0( 1 : klon, 1 )
383cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
384      CALL histwrite_phy(nid_day, "SWupSFCclr",itau_w,zx_tmp_fi2d)
385c
386      zx_tmp_fi2d(1 : klon) = swdn0( 1 : klon, klevp1 )
387cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
388      CALL histwrite_phy(nid_day, "SWdnTOAclr",itau_w,zx_tmp_fi2d)
389c
390      zx_tmp_fi2d(1 : klon) = swdn0( 1 : klon, 1 )
391cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
392      CALL histwrite_phy(nid_day, "SWdnSFCclr",itau_w,zx_tmp_fi2d)
393c
394cIM AMMA-MIP
395cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollwdown,zx_tmp_2d)
396      CALL histwrite_phy(nid_day,"LWdnSFC",itau_w,sollwdown)
397c
398      zx_tmp_fi2d(1:klon)=sollwdown(1:klon)-sollw(1:klon)
399cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
400      CALL histwrite_phy(nid_day,"LWupSFC",itau_w,zx_tmp_fi2d)
401c
402cIM   IF (iflag_con.GE.3) THEN
403cIM ema_pct= 0.     CALL gr_fi_ecrit(1, klon,iim,jjmp1, ema_pct,zx_tmp_2d)
404cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, meanptop(:,1),zx_tmp_2d)
405      CALL histwrite_phy(nid_day,"ptop",itau_w,meanptop(:,1))
406cIM   ENDIF
407c
408      zx_tmp_fi2d(1 : klon) = ftsol(1 : klon, is_ter)
409cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d ,zx_tmp_2d)
410      CALL histwrite_phy(nid_day,"tter",itau_w,zx_tmp_fi2d)
411c
412      zx_tmp_fi2d(1 : klon) = ftsol(1 : klon, is_lic)
413cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
414      CALL histwrite_phy(nid_day,"tlic",itau_w,zx_tmp_fi2d)
415c
416      zx_tmp_fi2d(1 : klon) = ftsol(1 : klon, is_oce)
417cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
418      CALL histwrite_phy(nid_day,"toce",itau_w,zx_tmp_fi2d)
419c
420      zx_tmp_fi2d(1 : klon) = ftsol(1 : klon, is_sic)
421cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
422      CALL histwrite_phy(nid_day,"tsic",itau_w,zx_tmp_fi2d)
423c
424      zx_tmp_fi2d(1 : klon) = t2m(1 : klon, is_ter)
425cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
426      CALL histwrite_phy(nid_day,"t2mter",itau_w,zx_tmp_fi2d)
427c
428      zx_tmp_fi2d(1 : klon) = t2m(1 : klon, is_ter)
429cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
430      CALL histwrite_phy(nid_day,"t2mter_min",itau_w,zx_tmp_fi2d)
431c
432      zx_tmp_fi2d(1 : klon) = t2m(1 : klon, is_ter)
433cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1,zx_tmp_fi2d,zx_tmp_2d)
434      CALL histwrite_phy(nid_day,"t2mter_max",itau_w,zx_tmp_fi2d)
435c
436      zx_tmp_fi2d(1 : klon) = t2m(1 : klon, is_lic)
437cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
438      CALL histwrite_phy(nid_day,"t2mlic",itau_w,zx_tmp_fi2d)
439c
440      zx_tmp_fi2d(1 : klon) = t2m(1 : klon, is_oce)
441cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
442      CALL histwrite_phy(nid_day,"t2moce",itau_w,zx_tmp_fi2d)
443c
444      zx_tmp_fi2d(1 : klon) = t2m(1 : klon, is_sic)
445cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
446      CALL histwrite_phy(nid_day,"t2msic",itau_w,zx_tmp_fi2d)
447c
448      zx_tmp_fi2d(1 : klon) = u10m(1 : klon, is_ter)
449cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
450      CALL histwrite_phy(nid_day,"u10mter",itau_w,zx_tmp_fi2d)
451c
452      zx_tmp_fi2d(1 : klon) = v10m(1 : klon, is_ter)
453cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
454      CALL histwrite_phy(nid_day,"v10mter",itau_w,zx_tmp_fi2d)
455c
456      zx_tmp_fi2d(1 : klon) = u10m(1 : klon, is_lic)
457cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
458      CALL histwrite_phy(nid_day,"u10mlic",itau_w,zx_tmp_fi2d)
459c
460      zx_tmp_fi2d(1 : klon) = v10m(1 : klon, is_lic)
461cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
462      CALL histwrite_phy(nid_day,"v10mlic",itau_w,zx_tmp_fi2d)
463c
464      zx_tmp_fi2d(1 : klon) = u10m(1 : klon, is_oce)
465cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
466      CALL histwrite_phy(nid_day,"u10moce",itau_w,zx_tmp_fi2d)
467c
468      zx_tmp_fi2d(1 : klon) = v10m(1 : klon, is_oce)
469cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
470      CALL histwrite_phy(nid_day,"v10moce",itau_w,zx_tmp_fi2d)
471c
472      zx_tmp_fi2d(1 : klon) = u10m(1 : klon, is_sic)
473cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
474      CALL histwrite_phy(nid_day,"u10msic",itau_w,zx_tmp_fi2d)
475C
476      zx_tmp_fi2d(1 : klon) = v10m(1 : klon, is_sic)
477cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d, zx_tmp_2d)
478      CALL histwrite_phy(nid_day,"v10msic",itau_w,zx_tmp_fi2d)
479C
480      DO nsrf = 1, nbsrf
481C
482        zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf)*100.
483cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
484        CALL histwrite_phy(nid_day,"pourc_"//clnsurf(nsrf),itau_w,
485     &                     zx_tmp_fi2d) 
486C
487        zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf)
488cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
489        CALL histwrite_phy(nid_day,"fract_"//clnsurf(nsrf),itau_w,
490     &                     zx_tmp_fi2d) 
491C
492        zx_tmp_fi2d(1 : klon) = ftsol( 1 : klon, nsrf)
493cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
494        CALL histwrite_phy(nid_day,"tsol_"//clnsurf(nsrf),itau_w,
495     $                     zx_tmp_fi2d) 
496C
497        zx_tmp_fi2d(1 : klon) = fluxt( 1 : klon, 1, nsrf)
498cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
499        CALL histwrite_phy(nid_day,"sens_"//clnsurf(nsrf),itau_w,
500     $                     zx_tmp_fi2d) 
501
502        zx_tmp_fi2d(1 : klon) = fluxlat( 1 : klon, nsrf)
503cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
504        CALL histwrite_phy(nid_day,"lat_"//clnsurf(nsrf),itau_w,
505     $                     zx_tmp_fi2d) 
506C
507        zx_tmp_fi2d(1 : klon) = fluxu( 1 : klon, 1, nsrf)
508cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
509        CALL histwrite_phy(nid_day,"taux_"//clnsurf(nsrf),itau_w,
510     $                     zx_tmp_fi2d) 
511C     
512        zx_tmp_fi2d(1 : klon) = fluxv( 1 : klon, 1, nsrf)
513cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
514        CALL histwrite_phy(nid_day,"tauy_"//clnsurf(nsrf),itau_w,
515     $                     zx_tmp_fi2d)
516C
517        zx_tmp_fi2d(1 : klon) = falb1( 1 : klon, nsrf)
518cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
519        CALL histwrite_phy(nid_day,"albe_"//clnsurf(nsrf),itau_w,
520     $                     zx_tmp_fi2d) 
521C
522        zx_tmp_fi2d(1 : klon) = frugs( 1 : klon, nsrf)
523cym        CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d , zx_tmp_2d)
524        CALL histwrite_phy(nid_day,"rugs_"//clnsurf(nsrf),itau_w,
525     $                     zx_tmp_fi2d) 
526C
527! FH Sorties specifiques pour Mellor et Yamada
528      if (iflag_pbl>1 .and. lev_histday.gt.10 ) then
529
530        CALL histwrite_phy(nid_day,"tke_"//clnsurf(nsrf),itau_w,
531     $      pbl_tke(:,1:klev,nsrf))
532
533        CALL histwrite_phy(nid_day,"tke_max_"//clnsurf(nsrf),itau_w,
534     $      pbl_tke(:,1:klev,nsrf))
535        endif
536
537      END DO 
538c=================================================================
539c   FIN ECRITURE DES CHAMPS SUR LES SOUS SURFACES
540c=================================================================
541      ENDIF !lev_histday.GE.4
542c
543      IF(lev_histday.GE.5) THEN !lev_histday.GE.5
544c
545c rajout sorties F. Aires
546c
547cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, topsw0,zx_tmp_2d)
548      CALL histwrite_phy(nid_day,"tops0",itau_w,topsw0)
549c
550cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, toplw0,zx_tmp_2d)
551      CALL histwrite_phy(nid_day,"topl0",itau_w,toplw0)
552c
553cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, solsw0,zx_tmp_2d)
554      CALL histwrite_phy(nid_day,"sols0",itau_w,solsw0)
555c
556cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, sollw0,zx_tmp_2d)
557      CALL histwrite_phy(nid_day,"soll0",itau_w, sollw0)
558c
559cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, cldfra, zx_tmp_3d)
560      CALL histwrite_phy(nid_day,"rneb",itau_w,cldfra)
561c
562cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, rnebcon, zx_tmp_3d)
563      CALL histwrite_phy(nid_day,"rnebcon",itau_w,rnebcon)
564c
565cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, flwc,zx_tmp_3d)
566      CALL histwrite_phy(nid_day,"lwcon",itau_w,flwc)
567c
568cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, fiwc,zx_tmp_3d)
569      CALL histwrite_phy(nid_day,"iwcon",itau_w,fiwc)
570c
571      zx_tmp_fi2d(1:klon) = flwp(1:klon)
572cym     CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
573      CALL histwrite_phy(nid_day,"lwp",itau_w,zx_tmp_fi2d)
574c
575      zx_tmp_fi2d(1:klon) = fiwp(1:klon)
576cym      CALL gr_fi_ecrit(1, klon,iim,jjmp1, zx_tmp_fi2d,zx_tmp_2d)
577      CALL histwrite_phy(nid_day,"iwp",itau_w,zx_tmp_fi2d)
578c
579cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1, meantaucld,zx_tmp_2d)
580      CALL histwrite_phy(nid_day,"meantaucld",itau_w,meantaucld)
581c
582cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, cldtau,zx_tmp_3d)
583      CALL histwrite_phy(nid_day,"cldtau",itau_w,cldtau)
584c
585cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1, cldemi,zx_tmp_3d)
586      CALL histwrite_phy(nid_day,"cldemi",itau_w,cldemi)
587c
588c
589cIM: 101003 : K/30min ==> K/s
590      zx_tmp_fi3d(1:klon,1:klev)=
591     s   (d_q_vdf(1:klon,1:klev)+d_q_ajs(1:klon,1:klev))/pdtphys
592      CALL histwrite_phy(nid_day,"dqpbl",itau_w,zx_tmp_fi3d)
593
594      CALL histwrite_phy(nid_day,"dtwak",itau_w,dt_wake)
595
596          CALL histwrite_phy(nid_day,"cape",itau_w,cape)
597c
598      zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys
599cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d)
600      CALL histwrite_phy(nid_day,"dtcon",itau_w,zx_tmp_fi3d)
601c
602      zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys
603cym      CALL gr_fi_ecrit(klev,klon,iim,jjmp1,zx_tmp_fi3d,zx_tmp_3d)
604      CALL histwrite_phy(nid_day,"dqcon",itau_w,zx_tmp_fi3d)
605c
606      DO i=1, klon
607       zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.)
608      ENDDO
609c
610cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1, zx_tmp_2d,zx_tmp_2d)
611      CALL histwrite_phy(nid_day,"rh2m",itau_w,zx_tmp_fi2d)
612c
613cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1, qsat2m,zx_tmp_2d)
614      CALL histwrite_phy(nid_day,"qsat2m",itau_w,qsat2m)
615c
616cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1, tpot,zx_tmp_2d)
617      CALL histwrite_phy(nid_day,"tpot",itau_w,tpot)
618c
619cym      CALL gr_fi_ecrit(1,klon,iim,jjmp1, tpote,zx_tmp_2d)
620      CALL histwrite_phy(nid_day,"tpote",itau_w,tpote)
621c
622      ENDIF !lev_histday.GE.5
623c=================================================================
624c=================================================================
625c=================================================================
626c
627      if (ok_sync) then
628c$OMP MASTER
629        call histsync(nid_day)
630c$OMP END MASTER
631      endif
632
633      ENDIF
Note: See TracBrowser for help on using the repository browser.