Index: trunk/LMDZ.COMMON/libf/dyn3d_common/comconst_mod.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/comconst_mod.F90	(revision 1593)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/comconst_mod.F90	(revision 1650)
@@ -12,6 +12,6 @@
       REAL r ! Reduced Gas constant r=R/mu
              ! with R=8.31.. J.K-1.mol-1, mu: mol mass of atmosphere (kg/mol)
-      REAL cpp   ! Cp
-      REAL kappa ! kappa=R/Cp 
+      REAL cpp   ! Specific heat Cp (J.kg-1.K-1)
+      REAL kappa ! kappa=r/Cp 
       REAL cotot
       REAL unsim ! = 1./iim
@@ -23,8 +23,11 @@
       REAL dissip_fac_mid,dissip_fac_up,dissip_deltaz,dissip_hdelta
       REAL dissip_pupstart
-      INTEGER iflag_top_bound,mode_top_bound
+! top_bound sponge:
+      INTEGER iflag_top_bound ! sponge type
       INTEGER ngroup ! parameter to group points (along longitude) near poles
-      REAL tau_top_bound
+      INTEGER mode_top_bound  ! sponge mode
+      REAL tau_top_bound ! inverse of sponge characteristic time scale (Hz)
       REAL daylen ! length of solar day, in 'standard' day length
+      REAL year_day ! Number of standard days in a year
       REAL molmass ! (g/mol) molar mass of the atmosphere
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/comvert_mod.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/comvert_mod.F90	(revision 1593)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/comvert_mod.F90	(revision 1650)
@@ -3,16 +3,33 @@
 IMPLICIT NONE  
 
-include "dimensions.h"
-include "paramet.h"
+PRIVATE
+INCLUDE "dimensions.h"
 
-REAL ap(llm+1),bp(llm+1),presnivs(llm),dpres(llm),pa,preff,	&
-     	nivsigs(llm),nivsig(llm+1),scaleheight
-! Mars Ce qui suit vient de gcm
-REAL sig(llm+1),ds(llm),aps(llm),bps(llm),pseudoalt(llm)
+PUBLIC :: ap,bp,presnivs,dpres,sig,ds,pa,preff,nivsigs,nivsig, &
+          aps,bps,scaleheight,pseudoalt,disvert_type, pressure_exner
+
+REAL ap(llm+1) ! hybrid pressure contribution at interlayers
+REAL bp (llm+1) ! hybrid sigma contribution at interlayer
+REAL presnivs(llm) ! (reference) pressure at mid-layers
+REAL dpres(llm)
+REAL sig(llm+1)
+REAL ds(llm)
+REAL pa ! reference pressure (Pa) at which hybrid coordinates
+        ! become purely pressure (more or less)
+REAL preff  ! reference surface pressure (Pa)
+REAL nivsigs(llm)
+REAL nivsig(llm+1)
+REAL aps(llm) ! hybrid pressure contribution at mid-layers
+REAL bps(llm) ! hybrid sigma contribution at mid-layers
+REAL scaleheight ! atmospheric (reference) scale height (km)
+REAL pseudoalt(llm) ! pseudo-altitude of model levels (km), based on presnivs(),
+                     ! preff and scaleheight
+
 INTEGER disvert_type ! type of vertical discretization:
-                           ! 1: Earth (default for planet_type==earth),
-                           !     automatic generation
-                           ! 2: Planets (default for planet_type!=earth),
-                           !     using 'z2sig.def' (or 'esasig.def) file
+                     ! 1: Earth (default for planet_type==earth),
+                     !     automatic generation
+                     ! 2: Planets (default for planet_type!=earth),
+                     !     using 'z2sig.def' (or 'esasig.def) file
+
 LOGICAL pressure_exner
 !     compute pressure inside layers using Exner function, else use mean
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/conf_planete.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/conf_planete.F90	(revision 1593)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/conf_planete.F90	(revision 1650)
@@ -10,6 +10,7 @@
 USE ioipsl_getincom
 #endif
-USE comvert_mod, ONLY: preff,pa
-USE comconst_mod, ONLY: daysec,daylen,kappa,cpp,omeg,rad,g,ihf,pi,molmass
+USE comconst_mod, ONLY: pi, g, molmass, kappa, cpp, omeg, rad, &
+                        year_day, daylen, daysec, ihf
+USE comvert_mod, ONLY: preff, pa
 IMPLICIT NONE
 !
@@ -17,10 +18,8 @@
 !   Declarations :
 !   --------------
-#include "dimensions.h"
+
 !
 !   local:
 !   ------
-
-real :: year_day_dyn
 
 ! ---------------------------------------------
@@ -59,18 +58,14 @@
 CALL getin('daylen',daylen)
 ! Number of days (standard) per year:
-year_day_dyn = 365.25
-CALL getin('year_day',year_day_dyn)
+year_day = 365.25
+CALL getin('year_day',year_day)
 ! Omega
 ! omeg=2.*pi/86400.
-omeg=2.*pi/daysec*(1./daylen+1./year_day_dyn)
+omeg=2.*pi/daysec*(1./daylen+1./year_day)
 CALL getin('omeg',omeg)
 
-! Intrinsic heat flux [default is none]
-! Aymeric -- for giant planets
-! [matters only if planet_type="giant"]
+! Intrinsic heat flux (default: none) (only used if planet_type="giant")
 ihf = 0.
-CALL getin('ihf',ihf)
-
-
+call getin('ihf',ihf)
 
 END SUBROUTINE conf_planete
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/infotrac.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/infotrac.F90	(revision 1593)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/infotrac.F90	(revision 1650)
@@ -45,5 +45,5 @@
     INTEGER :: niso_possibles   
     PARAMETER ( niso_possibles=5) ! 5 possible water isotopes
-    real, DIMENSION (niso_possibles),SAVE :: tnat,alpha_ideal
+    REAL, DIMENSION (niso_possibles),SAVE :: tnat,alpha_ideal
     LOGICAL, DIMENSION(niso_possibles),SAVE ::  use_iso
     INTEGER, ALLOCATABLE, DIMENSION(:,:), SAVE ::  iqiso ! donne indice iq en fn de (ixt,phase) 
@@ -55,4 +55,15 @@
     INTEGER, ALLOCATABLE, DIMENSION(:,:), SAVE ::  index_trac ! numéro ixt en fn izone, indnum entre 1 et niso
     INTEGER,SAVE :: niso,ntraceurs_zone,ntraciso
+
+#ifdef CPP_StratAer
+!--CK/OB for stratospheric aerosols
+  INTEGER, SAVE :: nbtr_bin
+  INTEGER, SAVE :: nbtr_sulgas
+  INTEGER, SAVE :: id_OCS_strat
+  INTEGER, SAVE :: id_SO2_strat
+  INTEGER, SAVE :: id_H2SO4_strat
+  INTEGER, SAVE :: id_BIN01_strat
+  INTEGER, SAVE :: id_TEST_strat
+#endif
 
 CONTAINS
@@ -143,4 +154,10 @@
        CALL abort_gcm('infotrac_init','You must compile with cpp key REPROBUS',1)
 #endif
+    ELSE IF (type_trac == 'coag') THEN
+       WRITE(lunout,*) 'Tracers are treated for COAGULATION tests : type_trac=', type_trac
+#ifndef CPP_StratAer
+       WRITE(lunout,*) 'To run this option you must add cpp key StratAer and compile with StratAer code'
+       CALL abort_gcm('infotrac_init','You must compile with cpp key StratAer',1)
+#endif
      ELSE IF (type_trac == 'lmdz') THEN
        WRITE(lunout,*) 'Tracers are treated in LMDZ only : type_trac=', type_trac
@@ -166,5 +183,5 @@
 !-----------------------------------------------------------------------
     IF (planet_type=='earth') THEN
-     IF (type_trac == 'lmdz' .OR. type_trac == 'repr') THEN
+     IF (type_trac == 'lmdz' .OR. type_trac == 'repr' .OR. type_trac == 'coag') THEN
        OPEN(90,file='traceur.def',form='formatted',status='old', iostat=ierr)
        IF(ierr.EQ.0) THEN
@@ -272,5 +289,5 @@
 !---------------------------------------------------------------------
     IF (planet_type=='earth') THEN
-     IF (type_trac == 'lmdz' .OR. type_trac == 'repr') THEN
+     IF (type_trac == 'lmdz' .OR. type_trac == 'repr' .OR. type_trac == 'coag') THEN
        IF(ierr.EQ.0) THEN
           ! Continue to read tracer.def
@@ -352,13 +369,58 @@
        END DO
 
+!       IF ( planet_type=='earth') THEN
          !CR: nombre de traceurs de l eau
-         if (tnom_0(3) == 'H2Oi') then
+         IF (tnom_0(3) == 'H2Oi') then
             nqo=3
-         else
+         ELSE
             nqo=2
-         endif
+         ENDIF
          ! For Earth, water vapour & liquid tracers are not in the physics
          nbtr=nqtrue-nqo
-     ENDIF  ! (type_trac == 'lmdz' .OR. type_trac == 'repr')
+!       ELSE
+!         ! Other planets (for now); we have the same number of tracers
+!         ! in the dynamics than in the physics
+!         nbtr=nqtrue
+!       ENDIF
+
+#ifdef CPP_StratAer
+       IF (type_trac == 'coag') THEN
+         nbtr_bin=0
+         nbtr_sulgas=0
+         DO iq=1,nqtrue
+           IF (tnom_0(iq)(1:3)=='BIN') THEN !check if tracer name contains 'BIN'
+             nbtr_bin=nbtr_bin+1
+           ENDIF
+           IF (tnom_0(iq)(1:3)=='GAS') THEN !check if tracer name contains 'GAS'
+             nbtr_sulgas=nbtr_sulgas+1
+           ENDIF
+         ENDDO
+         print*,'nbtr_bin=',nbtr_bin
+         print*,'nbtr_sulgas=',nbtr_sulgas
+         DO iq=1,nqtrue
+           IF (tnom_0(iq)=='GASOCS') THEN
+             id_OCS_strat=iq-nqo
+           ENDIF
+           IF (tnom_0(iq)=='GASSO2') THEN
+             id_SO2_strat=iq-nqo
+           ENDIF
+           IF (tnom_0(iq)=='GASH2SO4') THEN
+             id_H2SO4_strat=iq-nqo
+           ENDIF
+           IF (tnom_0(iq)=='BIN01') THEN
+             id_BIN01_strat=iq-nqo
+           ENDIF
+           IF (tnom_0(iq)=='GASTEST') THEN
+             id_TEST_strat=iq-nqo
+           ENDIF
+         ENDDO
+         print*,'id_OCS_strat  =',id_OCS_strat
+         print*,'id_SO2_strat  =',id_SO2_strat
+         print*,'id_H2SO4_strat=',id_H2SO4_strat
+         print*,'id_BIN01_strat=',id_BIN01_strat
+       ENDIF
+#endif
+
+     ENDIF  ! (type_trac == 'lmdz' .OR. type_trac == 'repr' .OR. type_trac = 'coag')
 !jyg<
 !
