source: LMDZ4/branches/V3_test/libf/phylmd/write_histday.h @ 5427

Last change on this file since 5427 was 735, checked in by Laurent Fairhead, 18 years ago

Modifications version parallele
YM/LF

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