Index: LMDZ4/trunk/libf/phylmd/write_histrac.h
===================================================================
--- LMDZ4/trunk/libf/phylmd/write_histrac.h	(revision 541)
+++ LMDZ4/trunk/libf/phylmd/write_histrac.h	(revision 616)
@@ -52,5 +52,14 @@
      .                                   iim*(jjm+1)*klev,ndex3d)
 
-#ifdef INCA_CH4
+! Ajout Anne
+!#ifdef INCA_AER
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,airm, zx_tmp_3d)
+!      CALL histwrite(nid_tra,"airm",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!#endif
+
+! Fin ajout Anne
+
+#ifdef INCA
 #ifdef INCAINFO
       DO it=1, phtcnt
@@ -130,9 +139,9 @@
        CALL gr_fi_ecrit(klev,klon,iim,jjm+1,scavcoef_st(1,1,it),
      .                  zx_tmp_3d)
-       CALL histwrite(nid_tra,"scavcoef_st",itau_w,zx_tmp_3d,
+       CALL histwrite(nid_tra2,"scavcoef_st",itau_w,zx_tmp_3d,
      .                  iim*(jjm+1)*klev,ndex3d)
        CALL gr_fi_ecrit(klev,klon,iim,jjm+1,scavcoef_cv(1,1,it),
      .                  zx_tmp_3d)
-       CALL histwrite(nid_tra,"scavcoef_cv",itau_w,zx_tmp_3d,
+       CALL histwrite(nid_tra2,"scavcoef_cv",itau_w,zx_tmp_3d,
      .                  iim*(jjm+1)*klev,ndex3d)
 
@@ -215,5 +224,5 @@
 #endif
        else
-#ifdef INCA_CH4
+#ifdef INCA
        if ( solsym(it) == 'OX' ) then
        zx_tmp_3d = zx_tmp_3d * dry_mass / nadv_mass(id_o3)
@@ -251,18 +260,18 @@
 
 #ifdef INCA
-#ifdef INCA_CH4
-      CALL gr_fi_ecrit(1, klon,iim,jjm+1, o3_tr_col(1), zx_tmp_2d)
+!#ifdef INCA_CH4
+      CALL gr_fi_ecrit(1, klon,iim,jjm+1, o3_col(1), zx_tmp_2d)
       CALL histwrite(nid_tra,"O3_column",itau_w,zx_tmp_2d,
      .     iim*(jjm+1),ndex2d)
 
-      CALL gr_fi_ecrit(1, klon,iim,jjm+1, co_tr_col(1), zx_tmp_2d)
+      CALL gr_fi_ecrit(1, klon,iim,jjm+1, co_col(1), zx_tmp_2d)
       CALL histwrite(nid_tra,"CO_column",itau_w,zx_tmp_2d,
      .     iim*(jjm+1),ndex2d)
 
-      CALL gr_fi_ecrit(1, klon,iim,jjm+1, ch4_tr_col(1), zx_tmp_2d)
+      CALL gr_fi_ecrit(1, klon,iim,jjm+1, ch4_col(1), zx_tmp_2d)
       CALL histwrite(nid_tra,"CH4_column",itau_w,zx_tmp_2d,
      .     iim*(jjm+1),ndex2d)
 
-      CALL gr_fi_ecrit(1, klon,iim,jjm+1, no2_tr_col(1), zx_tmp_2d)
+      CALL gr_fi_ecrit(1, klon,iim,jjm+1, no2_col(1), zx_tmp_2d)
       CALL histwrite(nid_tra,"NO2_column",itau_w,zx_tmp_2d,
      .     iim*(jjm+1),ndex2d)
@@ -281,4 +290,112 @@
       CALL histwrite(nid_tra,"O3_loss",itau_w,zx_tmp_3d,
      .                                   iim*(jjm+1)*klev,ndex3d)
+!! Ajout Anne
+!#ifdef INCA_AER
+!! for sulfur cycle
+!
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,SO2_p_dmsoh(1,1),
+!     .     zx_tmp_3d)
+!      CALL histwrite(nid_tra,"SO2_p_dmsoh",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,SO2_p_dmsno3(1,1),
+!     .     zx_tmp_3d)
+!      CALL histwrite(nid_tra,"SO2_p_dmsno3",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,SO2_p_h2soh(1,1),
+!     .     zx_tmp_3d)
+!      CALL histwrite(nid_tra,"SO2_p_h2soh",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,SO2_p_dmsooh(1,1),
+!     .     zx_tmp_3d)
+!      CALL histwrite(nid_tra,"SO2_p_dmsooh",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,DMSO_p_dmsoh(1,1),
+!     .     zx_tmp_3d)
+!      CALL histwrite(nid_tra,"DMSO_p_dmsoh",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,ASMSAM_p_dmsooh(1,1),
+!     .     zx_tmp_3d)
+!      CALL histwrite(nid_tra,"ASMSAM_p_dmsooh",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,ASSO4M_p_so2oh(1,1),
+!     .     zx_tmp_3d)
+!      CALL histwrite(nid_tra,"ASSO4M_p_so2oh",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,ASSO4M_p_so2h2o2(1,1),
+!     .     zx_tmp_3d)
+!      CALL histwrite(nid_tra,"ASSO4M_p_so2h2o2",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,ASSO4M_p_so2o3(1,1),
+!     .     zx_tmp_3d)
+!      CALL histwrite(nid_tra,"ASSO4M_p_so2o3",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!
+!c closing the sulfur budget
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1, wet3d_so2(1,1), zx_tmp_3d)
+!      CALL histwrite(nid_tra,"Wet3D_SO2",itra,zx_tmp_3d,
+!     .     iim*(jjm+1)*klev,ndex)
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1, wet3d_dms(1,1), zx_tmp_3d)
+!      CALL histwrite(nid_tra,"Wet3D_DMS",itra,zx_tmp_3d,
+!     .     iim*(jjm+1)*klev,ndex)
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1, wet3d_hno3(1,1), zx_tmp_3d)
+!      CALL histwrite(nid_tra,"Wet3D_HNO3",itra,zx_tmp_3d,
+!     .     iim*(jjm+1)*klev,ndex)
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1, wet3d_h2o2(1,1), zx_tmp_3d)
+!      CALL histwrite(nid_tra,"Wet3D_H2O2",itra,zx_tmp_3d,
+!     .     iim*(jjm+1)*klev,ndex)
+!
+!
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,PH_HIST(1,1),
+!     .     zx_tmp_3d)
+!      CALL histwrite(nid_tra,"PH_HIST",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!#endif
+!
+!#ifdef INCA_NMHC
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,CO2_basprod(1,1),
+!     .     zx_tmp_3d)
+!      CALL histwrite(nid_tra,"CO2_basprod",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,CO2_nmhcprod(1,1),
+!     .     zx_tmp_3d)
+!      CALL histwrite(nid_tra,"CO2_nmhcprod",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,CO2_radicalprod(1,1),
+!     .     zx_tmp_3d)
+!      CALL histwrite(nid_tra,"CO2_radicalprod",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,hno3_prod(1,1),
+!     .     zx_tmp_3d)
+!      CALL histwrite(nid_tra,"HNO3_prod",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,hno3_loss(1,1),
+!     .     zx_tmp_3d)
+!      CALL histwrite(nid_tra,"HNO3_loss",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,co_prod(1,1),
+!     .     zx_tmp_3d)
+!      CALL histwrite(nid_tra,"CO_prod",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!
+!      CALL gr_fi_ecrit(klev,klon,iim,jjm+1,co_loss(1,1),
+!     .     zx_tmp_3d)
+!      CALL histwrite(nid_tra,"CO_loss",itra,zx_tmp_3d,
+!     .                                   iim*(jjm+1)*klev,ndex)
+!
+!#endif
+!
+!! Fin ajout Anne
 
 !     ... Special section for daytime averaging
@@ -292,5 +409,5 @@
 !    .                                  iim*(jjm+1)*klev,ndex3d)
 
-#endif
+!#endif
 #else
 
