source: LMDZ4/branches/V3_test/libf/phylmd/write_histrac.h @ 717

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

Inclusion des modifs de Y. Meurdesoif pour la version V3
LF

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 18.1 KB
RevLine 
[524]1!
2! $Header$
3!
4      ndex = 0
5      ndex2d = 0
6      ndex3d = 0
7c
8      itau_w = itau_phy + nstep
9
[704]10cym      CALL gr_fi_ecrit(1,klon,iim,jjm+1,pphis,zx_tmp_2d)
11      CALL histwrite_phy(nid_tra,"phis",itau_w,pphis)
[524]12C
[704]13cym      CALL gr_fi_ecrit(1,klon,iim,jjm+1,airephy,zx_tmp_2d)     
14      CALL histwrite_phy(nid_tra,"aire",itau_w,airephy)
[524]15#ifdef INCA
[704]16cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1, ps,zx_tmp_2d)
17      CALL histwrite_phy(nid_tra,"ps",itau_w,ps)
[524]18
[704]19cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1, ptrop,zx_tmp_2d)
20      CALL histwrite_phy(nid_tra,"ptrop",itau_w,ptrop)
[524]21
22C   3d FIELDS
23
[704]24cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,t_seri, zx_tmp_3d)
25      CALL histwrite_phy(nid_tra,"temp",itau_w,t_seri)
[524]26
[704]27cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,u, zx_tmp_3d)
28      CALL histwrite_phy(nid_tra,"u",itau_w,u)
[524]29
[704]30cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,v, zx_tmp_3d)
31      CALL histwrite_phy(nid_tra,"v",itau_w,v)
[524]32
[704]33cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,sh, zx_tmp_3d)
34      CALL histwrite_phy(nid_tra,"h2o",itau_w,sh)
[524]35
[704]36cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pdel, zx_tmp_3d)
37      CALL histwrite_phy(nid_tra,"pdel",itau_w,pdel)
[524]38
[704]39cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pplay, zx_tmp_3d)
40      CALL histwrite_phy(nid_tra,"pmid",itau_w,pplay)
[524]41
[616]42! Ajout Anne
[635]43#ifdef INCA_AER
[704]44cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,airm, zx_tmp_3d)
45      CALL histwrite_phy(nid_tra,"airm",itau_w,airm)
[635]46#endif
[646]47
[616]48! Fin ajout Anne
49
50#ifdef INCA
[524]51#ifdef INCAINFO
[673]52#ifdef INCA_NMHC
[524]53      DO it=1, phtcnt
54      WRITE(str2,'(i2.2)') it
[704]55cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,jrates(1,1,it),
56cym     .     zx_tmp_3d)
57      CALL histwrite_phy(nid_tra,"j"//str2,itau_w,jrates(:,:,it))
[524]58      ENDDO
59
60      DO it=1, hetcnt
61      WRITE(str2,'(i2.2)') it
[704]62cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,hrates(1,1,it),
63cym     .     zx_tmp_3d)
64      CALL histwrite_phy(nid_tra,"w"//str2,itau_w,hrates(:,:,it))
[524]65      ENDDO
66
67      DO it=1, extcnt
68      WRITE(str2,'(i2.2)') it
[704]69cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,extflx(1,1,it),
[524]70     .     zx_tmp_3d)
[704]71      CALL histwrite_phy(nid_tra,"ext"//str2,itau_w,extflx(:,:,it))
[524]72      ENDDO
[673]73#endif
74#ifdef INCA_CH4
75       DO it=1, phtcnt
76      WRITE(str2,'(i2.2)') it
[704]77cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,jrates(1,1,it),
78cym     .     zx_tmp_3d)
79      CALL histwrite_phy(nid_tra,"j"//str2,itau_w,jrates(:,:,it))
[673]80      ENDDO
[524]81
[673]82      DO it=1, hetcnt
83      WRITE(str2,'(i2.2)') it
[704]84cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,hrates(1,1,it),
85cym     .     zx_tmp_3d)
86      CALL histwrite_phy(nid_tra,"w"//str2,itau_w,hrates(:,:,it))
[673]87      ENDDO
88
89      DO it=1, extcnt
90      WRITE(str2,'(i2.2)') it
[704]91cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,extflx(1,1,it),
92cym   .     zx_tmp_3d)
93      CALL histwrite_phy(nid_tra,"ext"//str2,itau_w,extflx(:,:,it))
[673]94      ENDDO
95#endif
96
[524]97      DO it=1, nfs
98      WRITE(str2,'(i2.2)') it
[704]99cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,invariants(1,1,it),
100cym     .     zx_tmp_3d)
101      CALL histwrite_phy(nid_tra,"INV"//str2,itau_w,invariants(:,:,it))
[524]102      ENDDO
103#else
[673]104#ifdef INCA_NMHC
[704]105cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,jrates(1,1,2),
106cym     .     zx_tmp_3d)
107      CALL histwrite_phy(nid_tra,"jO3",itau_w,jrates(:,:,2))
[524]108
[704]109cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,jrates(1,1,4),
110cym     .     zx_tmp_3d)
111      CALL histwrite_phy(nid_tra,"jNO2",itau_w,jrates(:,:,4))
[524]112
[704]113cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,jrates(1,1,13),
114cym     .     zx_tmp_3d)
115      CALL histwrite_phy(nid_tra,"jH2O2",itau_w,jrates(:,:,13))
[524]116
[704]117cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,hrates(1,1,1),
118cym     .     zx_tmp_3d)
119      CALL histwrite_phy(nid_tra,"wHNO3",itau_w,hrates(:,:,1))
[524]120
[704]121cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,krates(1,1,1),
122cym     .     zx_tmp_3d)
123      CALL histwrite_phy(nid_tra,"kN2O5",itau_w,krates(:,:,1))
[524]124
[704]125cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,extflx(1,1,1),
126cym     .     zx_tmp_3d)
127      CALL histwrite_phy(nid_tra,"LghtNO",itau_w,extflx(:,:,1))
[524]128#endif
[673]129#ifdef INCA_CH4
[704]130cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,jrates(1,1,2),
131cym     .     zx_tmp_3d)
132      CALL histwrite_phy(nid_tra,"jO3",itau_w,jrates(:,:,2))
[524]133
[704]134cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,jrates(1,1,4),
135cym     .     zx_tmp_3d)
136      CALL histwrite_phy(nid_tra,"jNO2",itau_w,jrates(:,:,4))
[673]137
[704]138cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,jrates(1,1,13),
139cym     .     zx_tmp_3d)
140      CALL histwrite_phy(nid_tra,"jH2O2",itau_w,jrates(:,:,13))
[673]141
[704]142cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,hrates(1,1,1),
143cym     .     zx_tmp_3d)
144      CALL histwrite_phy(nid_tra,"wHNO3",itau_w,hrates(:,:,1))
[673]145
[704]146cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,krates(1,1,1),
147cym     .     zx_tmp_3d)
148      CALL histwrite_phy(nid_tra,"kN2O5",itau_w,krates(:,:,1))
149cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,extflx(1,1,1),
150cym     .     zx_tmp_3d)
151      CALL histwrite_phy(nid_tra,"LghtNO",itau_w,extflx(:,:,1))
[524]152#endif
[673]153#endif
154!      DO it=1, grpcnt
155!
[704]156!cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,nas(1,1,it),zx_tmp_3d)
[673]157!      zx_tmp_3d = zx_tmp_3d * dry_mass / nadv_mass(it)
[704]158!      CALL histwrite_phy(nid_tra,grpsym(it),itau_w,zx_tmp_3d,
[673]159!     .                                   iim*(jjm+1)*klev,ndex3d)
160!      ENDDO
161#endif
[524]162
163#ifdef INCA_AER
164
165      it = id_CIDUSTM
[704]166cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,scavcoef_st(1,1,it),
167cym     .                  zx_tmp_3d)
168       CALL histwrite_phy(nid_tra2,"scavcoef_st",itau_w,
169     .                    scavcoef_st(:,:,it))
170cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,scavcoef_cv(1,1,it),
171cym     .                  zx_tmp_3d)
172       CALL histwrite_phy(nid_tra2,"scavcoef_cv",itau_w,
173     .                    scavcoef_cv(:,:,it))
[524]174
[704]175cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1,angst(1),zx_tmp_2d)
176       CALL histwrite_phy(nid_tra2,"AngstroemComp",itau_w,angst))
[524]177
[704]178cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,totaerh2o(1,1), zx_tmp_3d)
179       CALL histwrite_phy(nid_tra2,"TOTAERH2O",itau_w,totaerh2o)
[646]180
[524]181#endif
182#endif
183
184      DO it=1,nqmax
185C champs 2D
186#ifdef INCA
[679]187      IF ( prt_flag_ts(it) == 0 ) CYCLE
[673]188
[704]189cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1, eflux(1,it),zx_tmp_2d)
190      CALL histwrite_phy(nid_tra,"Emi_"//solsym(it),itau_w,eflux(:,it))
[524]191
[704]192cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1, dvel(1,it),zx_tmp_2d)
193      CALL histwrite_phy(nid_tra,"Dep_"//solsym(it),itau_w,dvel(:,it))
[524]194#ifdef INCA_AER
[646]195      call diag(airephy,tr_seri,.false.)
[524]196
[704]197cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1,dflux(1,it),zx_tmp_2d)
198      CALL histwrite_phy(nid_tra2,"Dry_"//solsym(it),itau_w,
199     .                   dflux(:,it))
[646]200
[524]201      IF  ((it .ge. trmx) .and. (it .le. trnx)) then
[704]202cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1,sflux(1,it),zx_tmp_2d)
203        CALL histwrite_phy(nid_tra2,"Sed_"//solsym(it),itau_w,
204     .                     sflux(:,it))
[646]205       
[704]206cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1,wflux(1,it),zx_tmp_2d)
207        CALL histwrite_phy(nid_tra2,"Wet_"//solsym(it),itau_w,
208     .                     wflux(:,it))
209cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1,wsflux(1,it),zx_tmp_2d)
210        CALL histwrite_phy(nid_tra2,"WetST_"//solsym(it),itau_w,
211     .                     wsflux(:,it))
212cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1,wcflux(1,it),zx_tmp_2d)
213        CALL histwrite_phy(nid_tra2,"WetCV_"//solsym(it),itau_w,
214     .                     wcflux(:,it))
[646]215       
[704]216cym      CALL gr_fi_ecrit(klev, klon,iim,jjm+1,eflux_alt(1,1,it),zx_tmp_3d)
217        CALL histwrite_phy(nid_tra2,"Emi_alt_"//solsym(it),itau_w,
218     .                     eflux_alt(:,:,it))
[646]219       
[704]220cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1,aload(1,it),zx_tmp_2d)
221        CALL histwrite_phy(nid_tra2,"Load_"//solsym(it),itau_w,
222     .                     aload(:,it))
223        CALL histwrite_phy(nid_tra3,"Inst_Load_"//solsym(it),itau_w,
224     .                     aload(:,it))
[524]225
[704]226cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1,sconc(1,it),zx_tmp_2d)
227        CALL histwrite_phy(nid_tra2,"SConc_"//solsym(it),itau_w,
228     .                     sconc(:,it))
[524]229
230        do la=1,las
[704]231cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1,tausum(1,la,it),zx_tmp_2d)
232          CALL histwrite_phy(nid_tra2,"OD"//cla(la)//"_"//solsym(it),
233     .                       itau_w,tausum(:,la,it))
234cym      CALL gr_fi_ecrit(klev, klon,iim,jjm+1,tau(1,1,la,it),zx_tmp_3d)
235          CALL histwrite_phy(nid_tra2,"OD3D"//cla(la)//"_"//solsym(it),
236     .                       itau_w,tau(:,:,la,it))
[524]237        enddo
238
[704]239cym      CALL gr_fi_ecrit(klev, klon,iim,jjm+1,md(1,1,it),zx_tmp_3d)
240        CALL histwrite_phy(nid_tra2,"MD_"//solsym(it),itau_w,
241     .                     md(:,:,it))
[524]242
[704]243cym      CALL gr_fi_ecrit(klev, klon,iim,jjm+1,mdw(1,1,it),zx_tmp_3d)
244        CALL histwrite_phy(nid_tra2,"MDW_"//solsym(it),itau_w,
245     .                     mdw(:,:,it))
[646]246
[704]247cym      CALL gr_fi_ecrit(klev, klon,iim,jjm+1,cload(1,1,it),zx_tmp_3d)
248        CALL histwrite_phy(nid_tra2,"CLOAD_"//solsym(it),
249     .                     itau_w,cload(:,:,it))
[646]250
251
[524]252      endif
[646]253
254
[524]255#endif
256C champs 3D
[704]257cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,tr_seri(1,1,it),zx_tmp_3d)
[524]258
259       !Prefer vmr to mmr for transported species
260       if( adv_mass(it) /= 0. ) then
261#ifdef INCA_AER
262         if (it .lt. trmx) then
263#endif
[704]264       zx_tmp_fi3d = tr_seri(:,:,it) * dry_mass / adv_mass(it)
[524]265#ifdef INCA_AER
266         endif
267#endif
268       else
[673]269#ifdef INCA_CH4
[524]270       if ( solsym(it) == 'OX' ) then
[704]271       zx_tmp_fi3d = tr_seri(:,:,it) * dry_mass / nadv_mass(id_o3)
[524]272       end if
273#endif
[673]274#ifdef INCA_NMHC
275       if ( solsym(it) == 'OX' ) then
[704]276       zx_tmp_fi3d = tr_seri(:,:,it) * dry_mass / nadv_mass(id_o3)
[524]277       end if
[673]278#endif
279       end if
[524]280
[704]281       CALL histwrite_phy(nid_tra,solsym(it),itau_w,zx_tmp_fi3d)
[524]282#else
283
[704]284cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,tr_seri(1,1,it),zx_tmp_3d)
285       CALL histwrite_phy(nid_tra,tnom(it+2),itau_w,tr_seri(:,:,it))
[524]286       if (lessivage) THEN
[704]287cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,flestottr(1,1,it),zx_tmp_3d)
288       CALL histwrite_phy(nid_tra,"fl"//tnom(it+2),itau_w,
289     .                                   flestottr(:,:,it))
[524]290      endif
[541]291     
292c----Olivia
[704]293cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,d_tr_th(1,1,it),zx_tmp_3d)
294       CALL histwrite_phy(nid_tra,"d_tr_th_"//tnom(it+2),itau_w,
295     .                                           d_tr_th(:,:,it))
296cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,d_tr_cv(1,1,it),zx_tmp_3d)
297       CALL histwrite_phy(nid_tra,"d_tr_cv_"//tnom(it+2),itau_w,
298     .                                           d_tr_cv(:,:,it))
299cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,d_tr_cl(1,1,it),zx_tmp_3d)
300       CALL histwrite_phy(nid_tra,"d_tr_cl_"//tnom(it+2),itau_w,
301     .                                           d_tr_cl(:,:,it))
[541]302c---fin Olivia     
303     
[524]304#endif
305      ENDDO
306
307#ifdef INCA
[616]308!#ifdef INCA_CH4
[704]309cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1, o3_col(1), zx_tmp_2d)
310      CALL histwrite_phy(nid_tra,"O3_column",itau_w,o3_col)
[524]311
[704]312cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1, co_col(1), zx_tmp_2d)
313      CALL histwrite_phy(nid_tra,"CO_column",itau_w,co_col)
[524]314
[704]315cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1, ch4_col(1), zx_tmp_2d)
316      CALL histwrite_phy(nid_tra,"CH4_column",itau_w,ch4_col)
[524]317
[704]318cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1, no2_col(1), zx_tmp_2d)
319      CALL histwrite_phy(nid_tra,"NO2_column",itau_w,no2_col)
[524]320
[704]321cym      CALL gr_fi_ecrit(1, klon,iim,jjm+1, o3_st_flx(1), zx_tmp_2d)
322      CALL histwrite_phy(nid_tra,"O3_ste",itau_w,o3_st_flx)
[524]323
[704]324cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,o3_prod(1,1),
325cym     .     zx_tmp_3d)
326      CALL histwrite_phy(nid_tra,"O3_prod",itau_w,o3_prod)
[524]327
[704]328cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,o3_loss(1,1),
329cym    .     zx_tmp_3d)
330      CALL histwrite_phy(nid_tra,"O3_loss",itau_w,o3_loss)
[624]331! Ajout Anne
332#ifdef INCA_AER
333! for sulfur cycle
[524]334
[704]335cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,SO2_p_dmsoh(1,1),
336cym     .     zx_tmp_3d)
337      CALL histwrite_phy(nid_tra,"SO2_p_dmsoh",itau_w,SO2_p_dmsoh)
[624]338
[704]339cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,SO2_p_dmsno3(1,1),
340cym     .     zx_tmp_3d)
341      CALL histwrite_phy(nid_tra,"SO2_p_dmsno3",itau_w,SO2_p_dmsno3)
[624]342
[704]343cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,SO2_p_h2soh(1,1),
344cym     .     zx_tmp_3d)
345      CALL histwrite_phy(nid_tra,"SO2_p_h2soh",itau_w,SO2_p_h2soh)
[624]346
[704]347cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,SO2_p_dmsooh(1,1),
348cym     .     zx_tmp_3d)
349      CALL histwrite_phy(nid_tra,"SO2_p_dmsooh",itau_w,SO2_p_dmsooh)
[624]350
[704]351cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,DMSO_p_dmsoh(1,1),
352cym     .     zx_tmp_3d)
353      CALL histwrite_phy(nid_tra,"DMSO_p_dmsoh",itau_w,DMSO_p_dmsoh)
[624]354
[704]355cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,ASMSAM_p_dmsooh(1,1),
356cym     .     zx_tmp_3d)
357      CALL histwrite_phy(nid_tra,"ASMSAM_p_dmsooh",itau_w,ASMSAM_p_dmsooh)
[624]358
[704]359cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,ASSO4M_p_so2oh(1,1),
360cym     .     zx_tmp_3d)
361      CALL histwrite_phy(nid_tra,"ASSO4M_p_so2oh",itau_w,ASSO4M_p_so2oh)
362cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,ASSO4M_p_so2h2o2(1,1),
363cym     .     zx_tmp_3d)
364      CALL histwrite_phy(nid_tra,"ASSO4M_p_so2h2o2",itau_w,ASSO4M_p_so2h2o2)
[624]365
[704]366cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,ASSO4M_p_so2o3(1,1),
367cym     .     zx_tmp_3d)
368      CALL histwrite_phy(nid_tra,"ASSO4M_p_so2o3",itau_w,ASSO4M_p_so2o3)
[624]369
370c closing the sulfur budget
[704]371cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1, wet3d_so2(1,1), zx_tmp_3d)
372      CALL histwrite_phy(nid_tra,"Wet3D_SO2",itau_w,wet3d_so2)
373cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1, wet3d_dms(1,1), zx_tmp_3d)
374      CALL histwrite_phy(nid_tra,"Wet3D_DMS",itau_w,wet3d_dms)
375cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1, wet3d_hno3(1,1), zx_tmp_3d)
376      CALL histwrite_phy(nid_tra,"Wet3D_HNO3",itau_w,wet3d_hno3)
377cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1, wet3d_h2o2(1,1), zx_tmp_3d)
378      CALL histwrite_phy(nid_tra,"Wet3D_H2O2",itau_w,wet3d_h2o2)
[624]379
380
[704]381cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,PH_HIST(1,1),
382cym     .     zx_tmp_3d)
383      CALL histwrite_phy(nid_tra,"PH_HIST",itau_w,PH_HIST)
[624]384#endif
385
[673]386#ifdef INCA_CH4
387      DO it=1, grpcnt
388
[704]389cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,nas(1,1,it),zx_tmp_3d)
390      zx_tmp_fi3d = nas(:,:,it) * dry_mass / nadv_mass(it)
391      CALL histwrite_phy(nid_tra,grpsym(it),itau_w,zx_tmp_fi3d)
[673]392      ENDDO
393
394#endif
395
396
[624]397#ifdef INCA_NMHC
[704]398cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,CO2_basprod(1,1),
399cym     .     zx_tmp_3d)
400      CALL histwrite_phy(nid_tra,"CO2_basprod",itau_w,CO2_basprod)
[624]401
[704]402cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,CO2_nmhcprod(1,1),
403cym     .     zx_tmp_3d)
404      CALL histwrite_phy(nid_tra,"CO2_nmhcprod",itau_w,CO2_nmhcprod)
[624]405
[704]406cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,CO2_radicalprod(1,1),
407cym     .     zx_tmp_3d)
408      CALL histwrite_phy(nid_tra,"CO2_radicalprod",itau_w,
409     .                   CO2_radicalprod)
[624]410
[704]411cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,hno3_prod(1,1),
412cym     .     zx_tmp_3d)
413      CALL histwrite_phy(nid_tra,"HNO3_prod",itau_w,hno3_prod)
[624]414
[704]415cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,hno3_loss(1,1),
416cym     .     zx_tmp_3d)
417      CALL histwrite_phy(nid_tra,"HNO3_loss",itau_w,hno3_loss)
[624]418
[704]419cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,co_prod(1,1),
420cym     .     zx_tmp_3d)
421      CALL histwrite_phy(nid_tra,"CO_prod",itau_w,co_prod)
[624]422
[704]423cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,co_loss(1,1),
424cym     .     zx_tmp_3d)
425      CALL histwrite_phy(nid_tra,"CO_loss",itau_w,co_loss)
[624]426
[673]427      DO it=1, grpcnt
428
[704]429cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,nas(1,1,it),zx_tmp_3d)
430      zx_tmp_3d = nas(:,:,it) * dry_mass / nadv_mass(it)
431      CALL histwrite_phy(nid_tra,grpsym(it),itau_w,zx_tmp_fi3d)
[673]432      ENDDO
433
434
[624]435#endif
436
437! Fin ajout Anne
438
[524]439!     ... Special section for daytime averaging
[704]440! cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,day_cnt(1,1),
[524]441!    .       zx_tmp_3d)
[704]442!       CALL histwrite_phy(nid_tra,"day_cnt",itau_w,zx_tmp_3d,
[524]443!    .                                  iim*(jjm+1)*klev,ndex3d)
[704]444! cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,no_daytime(1,1),
[524]445!    .       zx_tmp_3d)
[704]446!       CALL histwrite_phy(nid_tra,"NO_day",itau_w,zx_tmp_3d,
[524]447!    .                                  iim*(jjm+1)*klev,ndex3d)
448
[616]449!#endif
[524]450#else
451
452C abder
[704]453cym      CALL gr_fi_ecrit(1,klon,iim,jjm+1,yu1,zx_tmp_2d)
454         CALL histwrite_phy(nid_tra,"pyu1",itau_w,yu1)
[524]455
[704]456cym      CALL gr_fi_ecrit(1,klon,iim,jjm+1,yv1,zx_tmp_2d)
457         CALL histwrite_phy(nid_tra,"pyv1",itau_w,yv1)
[524]458
[704]459cym      CALL gr_fi_ecrit(1,klon,iim,jjm+1,pftsol1,zx_tmp_2d)
460         CALL histwrite_phy(nid_tra,"ftsol1",itau_w,pftsol1)
[524]461
[704]462cym      CALL gr_fi_ecrit(1,klon,iim,jjm+1,pftsol2,zx_tmp_2d)
463         CALL histwrite_phy(nid_tra,"ftsol2",itau_w,pftsol2)
[524]464
[704]465cym      CALL gr_fi_ecrit(1,klon,iim,jjm+1,pftsol3,zx_tmp_2d)
466         CALL histwrite_phy(nid_tra,"ftsol3",itau_w,pftsol3)
[524]467
[704]468cym      CALL gr_fi_ecrit(1,klon,iim,jjm+1,pftsol4,zx_tmp_2d)
469         CALL histwrite_phy(nid_tra,"ftsol4",itau_w,pftsol4)
[524]470
[704]471cym      CALL gr_fi_ecrit(1,klon,iim,jjm+1,ppsrf1,zx_tmp_2d)
472         CALL histwrite_phy(nid_tra,"psrf1",itau_w,ppsrf1)
[524]473
[704]474cym      CALL gr_fi_ecrit(1,klon,iim,jjm+1,ppsrf2,zx_tmp_2d)
475         CALL histwrite_phy(nid_tra,"psrf2",itau_w,ppsrf2)
[524]476
[704]477cym      CALL gr_fi_ecrit(1,klon,iim,jjm+1,ppsrf3,zx_tmp_2d)
478         CALL histwrite_phy(nid_tra,"psrf3",itau_w,ppsrf3)
[524]479
[704]480cym      CALL gr_fi_ecrit(1,klon,iim,jjm+1,ppsrf4,zx_tmp_2d)
481         CALL histwrite_phy(nid_tra,"psrf4",itau_w,ppsrf4)
482cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pplay,zx_tmp_3d)
483        CALL histwrite_phy(nid_tra,"pplay",itau_w,pplay)
[524]484
[704]485cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,t_seri,zx_tmp_3d)
486        CALL histwrite_phy(nid_tra,"t",itau_w,t_seri)
487cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pmfu,zx_tmp_3d)
488        CALL histwrite_phy(nid_tra,"mfu",itau_w,pmfu)
489cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pmfd,zx_tmp_3d)
490        CALL histwrite_phy(nid_tra,"mfd",itau_w,pmfd)
491cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pen_u,zx_tmp_3d)
492        CALL histwrite_phy(nid_tra,"en_u",itau_w,pen_u)
493cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pen_d,zx_tmp_3d)
494        CALL histwrite_phy(nid_tra,"en_d",itau_w,pen_d)
495cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pde_d,zx_tmp_3d)
496        CALL histwrite_phy(nid_tra,"de_d",itau_w,pde_d)
497cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,pde_u,zx_tmp_3d)
498        CALL histwrite_phy(nid_tra,"de_u",itau_w,pde_u)
499cym      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,coefh,zx_tmp_3d)
500        CALL histwrite_phy(nid_tra,"coefh",itau_w,coefh)
[524]501
502
503c abder
504#endif
505
506      if (ok_sync) then
507         call histsync(nid_tra)
508#ifdef INCA_AER
509         call histsync(nid_tra2)
510         call histsync(nid_tra3)
511#endif
512       endif
513
514
Note: See TracBrowser for help on using the repository browser.