Index: /LMDZ4/trunk/libf/dyn3d/advtrac.F
===================================================================
--- /LMDZ4/trunk/libf/dyn3d/advtrac.F	(revision 615)
+++ /LMDZ4/trunk/libf/dyn3d/advtrac.F	(revision 616)
@@ -4,5 +4,5 @@
 c
 c
-#ifdef INCA_CH4
+#ifdef INCA
       SUBROUTINE advtrac(pbaru,pbarv ,
      *                   p,  masse,q,iapptrac,teta,
@@ -16,5 +16,4 @@
      *                  pk)
 #endif
-
 c     Auteur :  F. Hourdin
 c
@@ -51,7 +50,7 @@
       REAL p( ip1jmp1,llmp1 ),teta(ip1jmp1,llm)
       REAL pk(ip1jmp1,llm)
-#ifdef INCA_CH4
+#ifdef INCA
       INTEGER            :: hadv_flg(nqmx)
-      REAL               :: mmt_adj(ip1jmp1,llm)
+      REAL               :: mmt_adj(ip1jmp1,llm,1)
       REAL               :: flxw(ip1jmp1,llm)
 #endif
@@ -129,5 +128,5 @@
         CALL groupe( massem, pbaruc,pbarvc, pbarug,pbarvg,wg )
 
-#ifdef INCA_CH4
+#ifdef INCA
       ! ... Flux de masse diaganostiques traceurs
       flxw = wg / FLOAT(iapp_tracvl)
@@ -214,5 +213,5 @@
         else if (iadv(iq).eq.20) then
             call pentes_ini (q(1,1,iq),wg,massem,pbarug,pbarvg,0)
-#ifdef INCA_CH4
+#ifdef INCA
        do iiq = iq+1, iq+3
          q(:,:,iiq)=q(:,:,iiq)*mmt_adj(:,:,1)
@@ -232,5 +231,5 @@
            call  prather(q(1,1,iq),wg,massem,pbarug,pbarvg,
      s                     n,dtbon)
-#ifdef INCA_CH4
+#ifdef INCA
        do iiq = iq+1, iq+9
          q(:,:,iiq)=q(:,:,iiq)*mmt_adj(:,:,1)
Index: /LMDZ4/trunk/libf/dyn3d/caladvtrac.F
===================================================================
--- /LMDZ4/trunk/libf/dyn3d/caladvtrac.F	(revision 615)
+++ /LMDZ4/trunk/libf/dyn3d/caladvtrac.F	(revision 616)
@@ -4,5 +4,5 @@
 c
 c
-#ifdef INCA_CH4
+#ifdef INCA
             SUBROUTINE caladvtrac(q,pbaru,pbarv ,
      *                   p ,masse, dq ,  teta,
@@ -41,5 +41,5 @@
       REAL p( ip1jmp1,llmp1),q( ip1jmp1,llm,nqmx),dq( ip1jmp1,llm,2 )
       REAL teta( ip1jmp1,llm),pk( ip1jmp1,llm)
-#ifdef INCA_CH4
+#ifdef INCA
       INTEGER            :: hadv_flg(nqmx)
       REAL               :: mmt_adj(iip1,jjp1,llm,1)
@@ -73,5 +73,5 @@
 c   advection
 
-#ifdef INCA_CH4
+#ifdef INCA
       CALL advtrac( pbaru,pbarv, 
      *             p,  masse,q,iapptrac, teta,
Index: /LMDZ4/trunk/libf/dyn3d/calfis.F
===================================================================
--- /LMDZ4/trunk/libf/dyn3d/calfis.F	(revision 615)
+++ /LMDZ4/trunk/libf/dyn3d/calfis.F	(revision 616)
@@ -23,5 +23,5 @@
      $                  pdq,
      $                  pw,
-#ifdef INCA_CH4
+#ifdef INCA
      $                  flxw,
 #endif
@@ -163,5 +163,5 @@
       REAL unskap, pksurcp
 
-#ifdef INCA_CH4
+#ifdef INCA
       REAL flxw(iip1,jjp1,llm)
       REAL flxwfi(ngridmx,llm)
@@ -432,5 +432,5 @@
 
 
-#ifdef INCA_CH4
+#ifdef INCA
       CALL gr_dyn_fi(llm,iip1,jjp1,ngridmx,flxw,flxwfi)
 #endif
@@ -461,5 +461,5 @@
      .             zqfi,
      .             pvervel,
-#ifdef INCA_CH4
+#ifdef INCA
      .             flxwfi,
 #endif
Index: /LMDZ4/trunk/libf/dyn3d/iniadvtrac.F
===================================================================
--- /LMDZ4/trunk/libf/dyn3d/iniadvtrac.F	(revision 615)
+++ /LMDZ4/trunk/libf/dyn3d/iniadvtrac.F	(revision 616)
@@ -8,4 +8,5 @@
 #ifdef INCA
       USE transport_controls, only : hadv_flg, vadv_flg
+      USE species_names
       USE chemshut
 #endif
@@ -192,5 +193,9 @@
          str1=tnom(iq)
          tname(iiq)=tnom(iq)
-         ttext(iiq)=str1(1:lnblnk(str1))//descrq(iadv(iiq))
+         IF (iadv(iiq).eq.0) THEN
+           ttext(iiq)=str1(1:lnblnk(str1))
+         ELSE
+           ttext(iiq)=str1(1:lnblnk(str1))//descrq(iadv(iiq))
+         endif
          str2=ttext(iiq)
 c   schemas tenant compte des moments d'ordre superieur.
Index: /LMDZ4/trunk/libf/dyn3d/iniinterp_horiz.F
===================================================================
--- /LMDZ4/trunk/libf/dyn3d/iniinterp_horiz.F	(revision 616)
+++ /LMDZ4/trunk/libf/dyn3d/iniinterp_horiz.F	(revision 616)
@@ -0,0 +1,179 @@
+C 
+C $Header$
+C
+      subroutine iniinterp_horiz (imo,jmo,imn,jmn ,kllm,
+     &       rlonuo,rlatvo,rlonun,rlatvn,
+     &       ktotal,iik,jjk,jk,ik,intersec,airen)
+   
+      implicit none
+
+
+
+c ---------------------------------------------------------
+c Prepare l' interpolation des variables d'une grille LMDZ
+c  dans une autre grille LMDZ en conservant la quantite
+c  totale pour les variables intensives (/m2) : ex : Pression au sol
+c
+c   (Pour chaque case autour d'un point scalaire de la nouvelle
+c    grille, on calcule la surface (en m2)en intersection avec chaque
+c    case de l'ancienne grille , pour la future interpolation)
+c
+c on calcule aussi l' aire dans la nouvelle grille 
+c
+c
+c   Auteur:  F.Forget 01/1995
+c   -------
+c
+c ---------------------------------------------------------
+c   Declarations:
+c ==============
+c
+c  ARGUMENTS
+c  """""""""
+c INPUT
+       integer imo, jmo ! dimensions ancienne grille
+       integer imn,jmn  ! dimensions nouvelle grille
+       integer kllm ! taille du tableau des intersections
+       real rlonuo(imo+1)     !  Latitude et
+       real rlatvo(jmo)       !  longitude des
+       real rlonun(imn+1)     !  bord des
+       real rlatvn(jmn)     !  cases "scalaires" (input)
+
+c OUTPUT
+       integer ktotal ! nombre totale d'intersections reperees
+       integer iik(kllm), jjk(kllm),jk(kllm),ik(kllm)
+       real intersec(kllm)  ! surface des intersections (m2)
+       real airen (imn+1,jmn+1) ! aire dans la nouvelle grille
+
+
+       
+ 
+c Autres variables
+c """"""""""""""""
+       integer i,j,ii,jj,k
+       real a(imo+1),b(imo+1),c(jmo+1),d(jmo+1)
+       real an(imn+1),bn(imn+1),cn(jmn+1),dn(jmn+1)
+       real aa, bb,cc,dd
+       real pi
+
+       pi      = 2.*ASIN( 1. )
+
+
+
+c On repere les frontieres des cases :
+c =================================== 
+c
+c Attention, on ruse avec des latitudes = 90 deg au pole.
+
+
+c  ANcienne grile
+c  """"""""""""""
+      a(1) =   - rlonuo(imo+1)
+      b(1) = rlonuo(1)
+      do i=2,imo+1
+         a(i) = rlonuo(i-1)
+         b(i) =  rlonuo(i)
+      end do
+
+      d(1) = pi/2 
+      do j=1,jmo
+         c(j) = rlatvo(j) 
+         d(j+1) = rlatvo(j)
+      end do
+      c(jmo+1) = -pi/2 
+      
+
+c  Nouvelle grille
+c  """""""""""""""
+      an(1) =  - rlonun(imn+1)
+      bn(1) = rlonun(1)
+      do i=2,imn+1
+         an(i) = rlonun(i-1)
+         bn(i) =  rlonun(i)
+      end do
+
+      dn(1) = pi/2 
+      do j=1,jmn
+         cn(j) = rlatvn(j)
+         dn(j+1) = rlatvn(j)
+      end do
+      cn(jmn+1) = -pi/2 
+
+c Calcul de la surface des cases scalaires de la nouvelle grille
+c ==============================================================
+      do ii=1,imn + 1
+        do jj = 1,jmn+1
+               airen(ii,jj) = (bn(ii)-an(ii))*(sin(dn(jj))-sin(cn(jj)))
+        end do
+      end do
+
+c Calcul de la surface des intersections
+c ======================================
+
+c     boucle sur la nouvelle grille
+c     """"""""""""""""""""""""""""
+      ktotal = 0
+      do jj = 1,jmn+1
+       do j=1, jmo+1
+          if((cn(jj).lt.d(j)).and.(dn(jj).gt.c(j)))then
+              do ii=1,imn + 1
+                do i=1, imo +1
+                    if (  ((an(ii).lt.b(i)).and.(bn(ii).gt.a(i)))
+     &        .or. ((an(ii).lt.b(i)-2*pi).and.(bn(ii).gt.a(i)-2*pi)
+     &             .and.(b(i)-2*pi.lt.-pi) )
+     &        .or. ((an(ii).lt.b(i)+2*pi).and.(bn(ii).gt.a(i)+2*pi)
+     &             .and.(a(i)+2*pi.gt.pi) )
+     &                     )then
+                      ktotal = ktotal +1
+                      iik(ktotal) =ii
+                      jjk(ktotal) =jj
+                      ik(ktotal) =i
+                      jk(ktotal) =j
+
+                      dd = min(d(j), dn(jj))
+                      cc = cn(jj)
+                      if (cc.lt. c(j))cc=c(j)
+                      if((an(ii).lt.b(i)-2*pi).and.
+     &                  (bn(ii).gt.a(i)-2*pi)) then 
+                          bb = min(b(i)-2*pi,bn(ii))
+                          aa = an(ii)
+                          if (aa.lt.a(i)-2*pi) aa=a(i)-2*pi
+                      else if((an(ii).lt.b(i)+2*pi).and.
+     &                       (bn(ii).gt.a(i)+2*pi)) then
+                          bb = min(b(i)+2*pi,bn(ii))
+                          aa = an(ii)
+                          if (aa.lt.a(i)+2*pi) aa=a(i)+2*pi
+                      else 
+                          bb = min(b(i),bn(ii))
+                          aa = an(ii)
+                          if (aa.lt.a(i)) aa=a(i)
+                      end if
+                      intersec(ktotal)=(bb-aa)*(sin(dd)-sin(cc))
+                     end if
+                end do
+               end do
+             end if
+         end do
+       end do       
+
+
+
+c     TEST  INFO
+c     DO k=1,ktotal 
+c      ii = iik(k) 
+c      jj = jjk(k)
+c      i = ik(k)
+c      j = jk(k)
+c      if ((ii.eq.10).and.(jj.eq.10).and.(i.eq.10).and.(j.eq.10))then
+c      if (jj.eq.2.and.(ii.eq.1))then
+c          write(*,*) '**************** jj=',jj,'ii=',ii
+c          write(*,*) 'i,j =',i,j
+c          write(*,*) 'an,bn,cn,dn', an(ii), bn(ii), cn(jj),dn(jj)
+c          write(*,*) 'a,b,c,d', a(i), b(i), c(j),d(j)
+c          write(*,*) 'intersec(k)',intersec(k)
+c          write(*,*) 'airen(ii,jj)=',airen(ii,jj)
+c      end if
+c     END DO 
+
+      return
+      end
Index: /LMDZ4/trunk/libf/dyn3d/interp_horiz.F
===================================================================
--- /LMDZ4/trunk/libf/dyn3d/interp_horiz.F	(revision 616)
+++ /LMDZ4/trunk/libf/dyn3d/interp_horiz.F	(revision 616)
@@ -0,0 +1,154 @@
+c
+c $Header$
+c
+      subroutine interp_horiz (varo,varn,imo,jmo,imn,jmn,lm,
+     &  rlonuo,rlatvo,rlonun,rlatvn)  
+
+c===========================================================
+c  Interpolation Horizontales des variables d'une grille LMDZ
+c (des points SCALAIRES au point SCALAIRES)
+c  dans une autre grille LMDZ en conservant la quantite
+c  totale pour les variables intensives (/m2) : ex : Pression au sol
+c
+c Francois Forget (01/1995)
+c===========================================================
+
+      IMPLICIT NONE 
+
+c   Declarations:
+c ==============
+c
+c  ARGUMENTS
+c  """""""""
+        
+       integer imo, jmo ! dimensions ancienne grille (input)
+       integer imn,jmn  ! dimensions nouvelle grille (input)
+
+       real rlonuo(imo+1)     !  Latitude et
+       real rlatvo(jmo)       !  longitude des
+       real rlonun(imn+1)     !  bord des 
+       real rlatvn(jmn)     !  cases "scalaires" (input)
+
+       integer lm ! dimension verticale (input)
+       real varo (imo+1, jmo+1,lm) ! var dans l'ancienne grille (input)
+       real varn (imn+1,jmn+1,lm) ! var dans la nouvelle grille (output)
+
+c Autres variables
+c """"""""""""""""
+       real airetest(imn+1,jmn+1)
+       integer ii,jj,l
+
+       real airen (imn+1,jmn+1) ! aire dans la nouvelle grille
+c    Info sur les ktotal intersection entre les cases new/old grille
+       integer kllm, k, ktotal
+       parameter (kllm = 400*200*10)
+       integer iik(kllm), jjk(kllm),jk(kllm),ik(kllm)
+       real intersec(kllm)
+       real R
+       real totn, tots
+
+       logical firstcall, firsttest, aire_ok
+       save firsttest
+       data firsttest /.true./
+       data aire_ok /.true./
+
+       
+
+
+
+c initialisation
+c --------------
+c Si c'est le premier appel, on prepare l'interpolation
+c en calculant pour chaque case autour d'un point scalaire de la
+c nouvelle grille, la surface  de intersection avec chaque
+c    case de l'ancienne grille.
+
+
+        call iniinterp_horiz (imo,jmo,imn,jmn ,kllm,
+     &       rlonuo,rlatvo,rlonun,rlatvn,
+     &          ktotal,iik,jjk,jk,ik,intersec,airen)
+
+      do l=1,lm
+       do jj =1 , jmn+1
+        do ii=1, imn+1
+          varn(ii,jj,l) =0.
+        end do
+       end do
+      end do 
+       
+c Interpolation horizontale
+c -------------------------
+c boucle sur toute les ktotal intersections entre les cases
+c de l'ancienne et la  nouvelle grille
+c
+      PRINT *, 'ktotal 1 = ', ktotal
+     
+      do k=1,ktotal
+        do l=1,lm
+         varn(iik(k),jjk(k),l) = varn(iik(k),jjk(k),l) 
+     &        + varo(ik(k), jk(k),l)*intersec(k)/airen(iik(k),jjk(k))
+        end do
+      end do
+
+c Une seule valeur au pole pour les variables ! :
+c -----------------------------------------------
+       do l=1, lm
+         totn =0.
+         tots =0.
+           do ii =1, imn+1
+             totn = totn + varn(ii,1,l)
+             tots = tots + varn (ii,jmn+1,l)
+           end do 
+           do ii =1, imn+1
+             varn(ii,1,l) = totn/float(imn+1)
+             varn(ii,jmn+1,l) = tots/float(imn+1)
+           end do 
+       end do
+           
+
+c---------------------------------------------------------------
+c  TEST  TEST  TEST  TEST  TEST  TEST  TEST  TEST  TEST  TEST 
+!!       if (.not.(firsttest)) goto 99
+!!       firsttest = .false.
+!! !     write (*,*) 'INTERP. HORIZ. : TEST SUR LES AIRES:'
+!!       do jj =1 , jmn+1
+!!         do ii=1, imn+1
+!!           airetest(ii,jj) =0.
+!!         end do
+!!       end do 
+!!       PRINT *, 'ktotal = ', ktotal
+!!       PRINT *, 'jmn+1 =', jmn+1, 'imn+1', imn+1
+!! 
+!!       do k=1,ktotal
+!!          airetest(iik(k),jjk(k))= airetest(iik(k),jjk(k)) +intersec(k) 
+!!       end DO
+!! 
+!! 
+!!       PRINT *, 'fin boucle'
+!!       do jj =1 , jmn+1
+!!        do ii=1, imn+1
+!!          r = airen(ii,jj)/airetest(ii,jj)
+!!          if ((r.gt.1.001).or.(r.lt.0.999)) then
+!! !             write (*,*) '********** PROBLEME D'' AIRES !!!',
+!! !     &                   ' DANS L''INTERPOLATION HORIZONTALE'
+!! !             write(*,*)'ii,jj,airen,airetest',
+!! !     &          ii,jj,airen(ii,jj),airetest(ii,jj)
+!!              aire_ok = .false.
+!!          end if
+!!        end do
+!!       end do
+!! !      if (aire_ok) write(*,*) 'INTERP. HORIZ. : AIRES OK'
+!!  99   continue
+
+c FIN TEST  FIN TEST  FIN TEST  FIN TEST  FIN TEST  FIN TEST  FIN TEST
+c---------------------------------------------------------------
+
+
+
+
+
+
+
+
+        return
+        end
Index: /LMDZ4/trunk/libf/dyn3d/leapfrog.F
===================================================================
--- /LMDZ4/trunk/libf/dyn3d/leapfrog.F	(revision 615)
+++ /LMDZ4/trunk/libf/dyn3d/leapfrog.F	(revision 616)
@@ -132,5 +132,5 @@
 
       REAL alpha(ip1jmp1,llm),beta(ip1jmp1,llm)
-#ifdef INCA_CH4
+#ifdef INCA
       REAL :: flxw(ip1jmp1,llm)
 #endif
@@ -274,5 +274,5 @@
 
 c
-#ifdef INCA_CH4
+#ifdef INCA
              CALL caladvtrac(q,pbaru,pbarv,
      *                      p, masse, dq,  teta,
@@ -358,5 +358,5 @@
      $               ucov,vcov,teta,q,masse,ps,p,pk,phis,phi ,
      $               du,dv,dteta,dq,w,
-#ifdef INCA_CH4
+#ifdef INCA
      $               flxw,
 #endif
Index: /LMDZ4/trunk/libf/phylmd/ini_histrac.h
===================================================================
--- /LMDZ4/trunk/libf/phylmd/ini_histrac.h	(revision 615)
+++ /LMDZ4/trunk/libf/phylmd/ini_histrac.h	(revision 616)
@@ -87,5 +87,5 @@
      .                "ave(X)", zsto,zout)
 
-#ifdef INCA_CH4
+#ifdef INCA
 #ifdef INCAINFO
          DO it=1, phtcnt
@@ -244,5 +244,5 @@
 
 #ifdef INCA
-#ifdef INCA_CH4
+!#ifdef INCA_CH4
          CALL histdef(nid_tra, "O3_column", "O3_column",
      .           "DU", iim,jjm+1,nhori, 1,1,1, -99, 32,
@@ -275,5 +275,79 @@
 !    .                "t_sum(X)", zsto,zout)
 
-#endif
+!#ENDIF
+
+!!! Ajout Anne
+!#ifdef INCA_AER
+!! for sulfur cycle
+!         CALL histdef(nid_tra, "SO2_p_dmsoh", "SO2_p_dmsoh", "CM-3 S-1",
+!     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .                "ave(X)", zsto,zout)
+!         CALL histdef(nid_tra, "SO2_p_dmsno3", "SO2_p_dmsno3", "CM-3 S-1",
+!     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .                "ave(X)", zsto,zout)
+!         CALL histdef(nid_tra, "SO2_p_h2soh", "SO2_p_h2soh", "CM-3 S-1",
+!     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .                "ave(X)", zsto,zout)
+!         CALL histdef(nid_tra, "SO2_p_dmsooh", "SO2_p_dmsooh", "CM-3 S-1",
+!     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .                "ave(X)", zsto,zout)
+!         CALL histdef(nid_tra, "DMSO_p_dmsoh", "DMSO_p_dmsoh", "CM-3 S-1",
+!     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .                "ave(X)", zsto,zout)
+!         CALL histdef(nid_tra, "ASMSAM_p_dmsooh", "ASMSAM_p_dmsooh", "CM-3 S-1",
+!     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .                "ave(X)", zsto,zout)
+!         CALL histdef(nid_tra, "ASSO4M_p_so2oh", "ASSO4M_p_so2oh", "CM-3 S-1",
+!     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .                "ave(X)", zsto,zout)
+!         CALL histdef(nid_tra, "ASSO4M_p_so2h2o2", "ASSO4M_p_h2o2","CM-3 S-1",
+!     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .                "ave(X)", zsto,zout)
+!         CALL histdef(nid_tra, "ASSO4M_p_so2o3", "ASSO4M_p_so2o3", "CM-3 S-1",
+!     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .                "ave(X)", zsto,zout)
+!
+!         CALL histdef(nid_tra, "Wet3D_SO2", "Wet3D_SO2",
+!     .           "kg/m2/s", iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .           "ave(X)", zsto,zout)
+!         CALL histdef(nid_tra, "Wet3D_DMS", "Wet3D_DMS",
+!     .           "kg/m2/s", iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .           "ave(X)", zsto,zout)
+!         CALL histdef(nid_tra, "Wet3D_HNO3", "Wet3D_HNO3",
+!     .           "kg/m2/s", iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .           "ave(X)", zsto,zout)
+!         CALL histdef(nid_tra, "Wet3D_H2O2", "Wet3D_H2O2",
+!     .           "kg/m2/s", iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .           "ave(X)", zsto,zout)
+!
+!         CALL histdef(nid_tra, "PH_HIST", "pH over physics time step", "1",
+!     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .                "ave(X)", zsto,zout)
+!#endif
+!
+!#ifdef INCA_NMHC
+!         CALL histdef(nid_tra, "CO2_basprod", "CO2_basprod", "CM-3 S-1",
+!     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .                "ave(X)", zsto,zout)
+!         CALL histdef(nid_tra, "CO2_nmhcprod", "CO2_nmhcprod", "CM-3 S-1",
+!     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .                "ave(X)", zsto,zout)
+!         CALL histdef(nid_tra, "CO2_radicalprod", "CO2_radicalprod", "CM-3 S-1",
+!     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .                "ave(X)", zsto,zout)
+!         CALL histdef(nid_tra, "HNO3_prod", "HNO3_prod", "CM-3 S-1",
+!     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .                "ave(X)", zsto,zout)
+!         CALL histdef(nid_tra, "HNO3_loss", "HNO3_loss", "CM-3 S-1",
+!     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .                "ave(X)", zsto,zout)
+!         CALL histdef(nid_tra, "CO_prod", "CO_prod", "CM-3 S-1",
+!     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .                "ave(X)", zsto,zout)
+!         CALL histdef(nid_tra, "CO_loss", "CO_loss", "CM-3 S-1",
+!     .                iim,jjm+1,nhori, klev,1,klev,nvert, 32,
+!     .                "ave(X)", zsto,zout)
+!#endif
+!! Fin ajout Anne
 #else
          CALL histdef(nid_tra, "pyu1", "Vent niv 1", "-",
Index: /LMDZ4/trunk/libf/phylmd/physiq.F
===================================================================
--- /LMDZ4/trunk/libf/phylmd/physiq.F	(revision 615)
+++ /LMDZ4/trunk/libf/phylmd/physiq.F	(revision 616)
@@ -8,5 +8,5 @@
      .            u,v,t,qx,
      .            omega,
-#ifdef INCA_CH4
+#ifdef INCA
      .            flxmass_w,
 #endif
@@ -17,4 +17,5 @@
 #ifdef INCA
       USE chemshut
+      USE species_names
 #ifdef INCA_CH4
 !      USE obs_pos
@@ -82,4 +83,5 @@
 #include "clesphys.h"
 #include "control.h"
+#include "logic.h"
 #include "temps.h"
 #include "comgeomphy.h"
@@ -202,5 +204,5 @@
       REAL omega(klon,klev)
 
-#ifdef INCA_CH4
+#ifdef INCA
       REAL flxmass_w(klon,klev)
 #endif
@@ -1010,4 +1012,15 @@
       solswad(:)=0.
 !rv
+! anne
+      d_u_con(:,:) = 0.0
+      d_v_con(:,:) = 0.0
+      rnebcon0(:,:) = 0.0
+      clwcon0(:,:) = 0.0
+      rnebcon(:,:) = 0.0
+      clwcon(:,:) = 0.0
+      paire_ter(:) = 0.0
+      nhistoW(:,:,:,:) = 0.0
+      histoW(:,:,:,:) = 0.0
+! fin anne
 
 cym
@@ -1296,9 +1309,4 @@
      $                   presnivs,
      $                   calday,
-     $                   tracnam,
-     $                   natsnam,
-c     $                   mxoutflds,
-c     $                   outinst,
-c     $                   outtimav,
      $                   klon,
      $                   nqmax,
@@ -2422,5 +2430,17 @@
      $                          iim,
      $                          jjm,
-     $                          tr_seri)
+#ifdef INCA_AER
+     $                          tr_seri,
+     $                          ftsol,
+     $                          paprs,
+     $                          cdragh,
+     $                          cdragm,
+     $                          pctsrf,
+     $				pdtphys,
+     $				itap)
+#else
+     $                          tr_seri)     
+#endif        
+
 #ifdef INCAINFO
            WRITE(lunout,*)'OK.'
@@ -2660,5 +2680,5 @@
      I                   ibas_con,
      I                   pmflxr,pmflxs,prfl,psfl,
-#ifdef INCA_CH4
+#ifdef INCA
      I                   flxmass_w,
 #endif
Index: /LMDZ4/trunk/libf/phylmd/phytrac.F
===================================================================
--- /LMDZ4/trunk/libf/phylmd/phytrac.F	(revision 615)
+++ /LMDZ4/trunk/libf/phylmd/phytrac.F	(revision 616)
@@ -48,5 +48,5 @@
      I                    prfl,
      I                    psfl,
-#ifdef INCA_CH4
+#ifdef INCA
      I                    flxmass_w,
 #endif
@@ -66,7 +66,14 @@
 #ifdef INCA_AER
       USE AEROSOL_MOD, only : ntr,trmx,trnx
-      USE AEROSOL_DIAG, only : cla,las,tausum,angst,aload,scon
-     .                            ,scavcoef_st,scavcoef_cv
-      USE AEROSOL_PROGNOS, ONLY : md
+      USE AEROSOL_DIAG,only : cla,las,tausum,angst,aload,cload,totaerh2o,tau,
+     $  emiss20,sconc,scavcoef_st,scavcoef_cv
+     $  ,cload05ss  ,cload05bc  ,cload05pom  ,cload05dust  ,cload05so4
+     $  ,cload125ss  ,cload125bc  ,cload125pom  ,cload125dust  ,cload125so4
+      USE AEROSOL_PROGNOS, ONLY : md,mdw
+      USE AEROSOL_METEO, only : airm
+#endif
+#ifdef INCA_NMHC
+      USE RESISTANCE_DIAGNOSE, ONLY : surf_alb, sol_irrad, surf_temp, surf_wind,
+     $                                aero_resist, lamin_resist, surf_resist
 #endif
 #endif
@@ -136,5 +143,5 @@
       REAL prfl(klon,klev+1),   psfl(klon,klev+1)     !--lessivage large-scale
 
-#ifdef INCA_CH4
+#ifdef INCA
       REAL flxmass_w(klon,klev)
 #endif
@@ -315,26 +322,33 @@
 
 #ifdef INCA
+      INTEGER           :: lastgas
       INTEGER           :: ncsec
+
+      INTEGER           :: prt_flag_ts(nbtr)=(/1,1,1
 #ifdef INCA_CH4
-#ifdef  INCA_AER
-      INTEGER           :: prt_flag_ts(51)=(/1,1,1
-#else
-      INTEGER           :: prt_flag_ts(43)=(/1,1,1
-#endif
-#else
-#ifdef INCA_AER
-      INTEGER           :: prt_flag_ts(11)=(/1,1,1
-#endif
-#endif
-
-#ifdef INCA_CH4
-     .                                              ,1,0,1,1,0,1,0,
-     .                                         0,0,0,0,0,0,0,1,0,0,
+     .                                              ,0,0,1,1,1,1,1,
+     .                                         0,1,0,0,0,0,0,1,0,0,
      .                                         0,1,1,1,1,0,1,1,1,0,
      .                                         1,1,1,1,1,1,1,1,1,1,
      .                                         1,0,0
-#endif
 #ifdef INCA_AER
-     .                                              ,1,1,1,1,1,1,1,1
+     .                                         ,1,1,1,1,0,1,1,1
+#endif
+#endif
+#ifdef INCA_AER
+c aerosol tracers
+     .                                        ,1,0,1,1,1,1,1,1,0,1,
+     .                                         0,1,1,1,1,1,0,1,0,1,1,1
+#endif
+#ifdef INCA_NMHC
+     .                                                 , 1, 1, 1, 1, 1, 1, 1,
+     .                                          1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+     .                                          1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+     .                                          1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+     .                                          1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+     .                                          1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+     .                                          1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+     .                                          1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+     .                                          1, 1, 1, 1, 1, 1, 1
 #endif
      .                                         /)
@@ -444,7 +458,10 @@
 
 #ifdef INCA_AER
+
+! Changement Anne 01/04/2005
         CALL aerosolmain (tr_seri,
      $                 pdtphys,
      $                 pplay,
+     $                 pdel,
      $                 prfl,
      $                 pmflxr,
@@ -455,6 +472,11 @@
      $                 ibas_con,
      $                 pphi,
-     $                 airephy,
-     $                 nstep)
+     $                 airephy, ! paire,
+     $                 nstep,
+     $                 rneb,         ! for chimiaq
+     $                 t_seri,       ! for chimiaq
+     $                 rh)
+! fin changement anne
+
 #endif
 
@@ -470,4 +492,5 @@
      $                 pplay,      !pmid
      $                 pdel,       !pdel
+     $                 airephy,
      $                 pctsrf(1,1),!oro
      $                 ftsol,      !tsurf
Index: /LMDZ4/trunk/libf/phylmd/write_histrac.h
===================================================================
--- /LMDZ4/trunk/libf/phylmd/write_histrac.h	(revision 615)
+++ /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
 
