Index: /LMDZ4/branches/LMDZ4_V3_patches/libf/phylmd/conf_phys.F90
===================================================================
--- /LMDZ4/branches/LMDZ4_V3_patches/libf/phylmd/conf_phys.F90	(revision 953)
+++ /LMDZ4/branches/LMDZ4_V3_patches/libf/phylmd/conf_phys.F90	(revision 954)
@@ -9,5 +9,5 @@
 !IM&                   ratqsbas,ratqshaut,ip_ebil_phy, &
  &                     ratqsbas,ratqshaut, &
- &		       ok_ade, ok_aie, &
+ &		       ok_ade, ok_aie, aerosol_couple, &
  &                     bl95_b0, bl95_b1,&
  &                     iflag_thermals,nsplit_thermals)
@@ -47,5 +47,5 @@
   logical              :: ok_veget, ok_newmicro
   logical              :: ok_journe, ok_mensuel, ok_instan, ok_hf
-  LOGICAL              :: ok_ade, ok_aie
+  LOGICAL              :: ok_ade, ok_aie, aerosol_couple
   REAL                 :: bl95_b0, bl95_b1
   real                 :: fact_cldcon, facttemps,ratqsbas,ratqshaut
@@ -55,5 +55,5 @@
   logical,SAVE              :: ok_veget_omp, ok_newmicro_omp
   logical,SAVE        :: ok_journe_omp, ok_mensuel_omp, ok_instan_omp, ok_hf_omp        
-  LOGICAL,SAVE        :: ok_ade_omp, ok_aie_omp
+  LOGICAL,SAVE        :: ok_ade_omp, ok_aie_omp, aerosol_couple_omp
   character (len = 8),SAVE  :: aer_type_omp
   REAL,SAVE           :: bl95_b0_omp, bl95_b1_omp
@@ -166,4 +166,14 @@
   ok_aie_omp = .false.
   call getin('ok_aie', ok_aie_omp)
+
+
+!
+!Config Key  = aerosol_couple
+!Config Desc = read aerosol in file or calcul by inca
+!Config Def  = .false.
+!Config Help = Used in physiq.F
+!
+  aerosol_couple_omp = .false.
+  CALL getin('aerosol_couple',aerosol_couple_omp)
 
 !
@@ -849,4 +859,5 @@
     ok_ade = ok_ade_omp
     ok_aie = ok_aie_omp
+    aerosol_couple=aerosol_couple_omp
     aer_type = aer_type_omp
     bl95_b0 = bl95_b0_omp
@@ -929,4 +940,5 @@
   write(numout,*)' ok_ade = ',ok_ade
   write(numout,*)' ok_aie = ',ok_aie
+  write(numout,*)' aerosol_couple = ', aerosol_couple
   write(numout,*)' aer_type = ',aer_type
   write(numout,*)' bl95_b0 = ',bl95_b0
Index: /LMDZ4/branches/LMDZ4_V3_patches/libf/phylmd/physiq.F
===================================================================
--- /LMDZ4/branches/LMDZ4_V3_patches/libf/phylmd/physiq.F	(revision 953)
+++ /LMDZ4/branches/LMDZ4_V3_patches/libf/phylmd/physiq.F	(revision 954)
@@ -1,4 +1,5 @@
 !
 ! $Header$
+!
 !
 c
@@ -1305,6 +1306,5 @@
 c$OMP THREADPRIVATE(cg_ae)
 
-#ifdef INCA_AER
-#ifdef CPP_COUPLE
+#ifdef INCA
 ! Aerosol optical properties by INCA model 
       REAL, SAVE, ALLOCATABLE  ::    tau_inca(:,:,:,:)
@@ -1319,5 +1319,4 @@
       REAL,SAVE,ALLOCATABLE :: topsw_inca(:,:), solsw_inca(:,:) 
       REAL,SAVE,ALLOCATABLE :: topsw0_inca(:,:), solsw0_inca(:,:)
-#endif
 #endif
       REAL,SAVE,ALLOCATABLE :: topswad(:), solswad(:) ! Aerosol direct effect.
@@ -1339,4 +1338,7 @@
       SAVE ok_ade, ok_aie, bl95_b0, bl95_b1
 c$OMP THREADPRIVATE(ok_ade, ok_aie, bl95_b0, bl95_b1)
+      LOGICAL, SAVE :: aerosol_couple  ! true  : calcul des aerosols dans INCA
+                                       ! false : lecture des aerosol dans un fichier
+c$OMP THREADPRIVATE(aerosol_couple)    
 
 c
@@ -1457,6 +1459,5 @@
       allocate( topswad(klon), solswad(klon))
       allocate( topswai(klon), solswai(klon) )
-#ifdef INCA_AER
-#ifdef CPP_COUPLE
+#ifdef INCA
       allocate( topswad_inca(klon), solswad_inca(klon))
       allocate( topswad0_inca(klon), solswad0_inca(klon))
@@ -1468,5 +1469,4 @@
       allocate( cg_inca(klon,klev,9,2))
       allocate( ccm(klon,klev,2) )
-#endif
 #endif
       allocate( clwcon0(klon,klev),rnebcon0(klon,klev))
@@ -1530,6 +1530,5 @@
          solswai(:)=0.
          solswad(:)=0.
-#ifdef INCA_AER
-#ifdef CPP_COUPLE
+#ifdef INCA
          tau_inca(:,:,:,:) = 0.
          piz_inca(:,:,:,:) = 0.
@@ -1547,5 +1546,4 @@
          solsw0_inca(:,:)  = 0.
 #endif
-#endif
 !rv
 !ACo
@@ -1570,5 +1568,5 @@
 cIM  .                  iflag_cldcon,ratqsbas,ratqshaut, if_ebil,
      .                  iflag_cldcon,ratqsbas,ratqshaut,
-     .                  ok_ade, ok_aie, 
+     .                  ok_ade, ok_aie,aerosol_couple,  
      .                  bl95_b0, bl95_b1,
      .                  iflag_thermals,nsplit_thermals)
@@ -2578,23 +2576,15 @@
 cjq - Johannes Quaas, 27/11/2003 (quaas@lmd.jussieu.fr)
       IF (ok_ade.OR.ok_aie) THEN
-#if defined(CPP_COUPLE) && !defined(INCA_AER)
-         ! Get sulfate aerosol distribution
-         CALL readsulfate(rjourvrai, debut, sulfate)
-         CALL readsulfate_preind(rjourvrai, debut, sulfate_pi)
-
-         ! Calculate aerosol optical properties (Olivier Boucher)
-         CALL aeropt(pplay, paprs, t_seri, sulfate, rhcl,
-     .        tau_ae, piz_ae, cg_ae, aerindex)
-#endif
-#if !defined(CPP_COUPLE)
-         ! Get sulfate aerosol distribution
-         CALL readsulfate(rjourvrai, debut, sulfate)
-         CALL readsulfate_preind(rjourvrai, debut, sulfate_pi)
-
-         ! Calculate aerosol optical properties (Olivier Boucher)
-         CALL aeropt(pplay, paprs, t_seri, sulfate, rhcl,
-     .        tau_ae, piz_ae, cg_ae, aerindex)
-#endif
+         IF ( .NOT. aerosol_couple ) THEN 
+            ! Get sulfate aerosol distribution
+            CALL readsulfate(rjourvrai, debut, sulfate)
+            CALL readsulfate_preind(rjourvrai, debut, sulfate_pi)
+            
+            ! Calculate aerosol optical properties (Olivier Boucher)
+            CALL aeropt(pplay, paprs, t_seri, sulfate, rhcl,
+     .           tau_ae, piz_ae, cg_ae, aerindex)
 cym
+         ENDIF
+
       ELSE
         tau_ae(:,:,:)=0.0
@@ -2773,4 +2763,12 @@
 c parametres pour diagnostiques:
 c
+
+      IF (aerosol_couple ) THEN 
+#ifdef INCA_AER
+         sulfate(:,:) = ccm(:,:,1) 
+         sulfate_pi(:,:) = ccm(:,:,2) 
+#endif
+      ENDIF
+
       if (ok_newmicro) then
       CALL newmicro (paprs, pplay,ok_newmicro,
@@ -2779,9 +2777,5 @@
      .            flwp, fiwp, flwc, fiwc,
      e            ok_aie,
-#if defined(CPP_COUPLE) && defined(INCA_AER)  
-     e            ccm(:,:,1), ccm(:,:,2),
-#else
      e            sulfate, sulfate_pi,
-#endif
      e            bl95_b0, bl95_b1,
      s            cldtaupi, re, fl)
@@ -2819,43 +2813,45 @@
       endif
       
-
-#if defined(CPP_COUPLE) && defined(INCA_AER)
-      CALL radlwsw_inca ! nouveau rayonnement (compatible Arpege-IFS)
-     e            (kdlon,kflev,dist, rmu0, fract, 
-     e             paprs, pplay,zxtsol,albsol, albsollw, t_seri,q_seri,
-     e             wo,
-     e             cldfra, cldemi, cldtau,
-     s             heat,heat0,cool,cool0,radsol,albpla,
-     s             topsw,toplw,solsw,sollw,
-     s             sollwdown,
-     s             topsw0,toplw0,solsw0,sollw0,
-     s             lwdn0, lwdn, lwup0, lwup, 
-     s             swdn0, swdn, swup0, swup,
-     e             ok_ade, ok_aie, ! new for aerosol radiative effects
-     e             tau_inca, piz_inca, cg_inca, ! ="=
-     s             topswad_inca, solswad_inca, ! ="=
-     s             topswad0_inca, solswad0_inca, ! ="=
-     s             topsw_inca, topsw0_inca,
-     s             solsw_inca, solsw0_inca,
-     e             cldtaupi, ! ="=
-     s             topswai_inca, solswai_inca) ! ="=
-#else
-      CALL radlwsw ! nouveau rayonnement (compatible Arpege-IFS)
-     e            (dist, rmu0, fract, 
-     e             paprs, pplay,zxtsol,albsol, albsollw, t_seri,q_seri,
-     e             wo,
-     e             cldfra, cldemi, cldtau,
-     s             heat,heat0,cool,cool0,radsol,albpla,
-     s             topsw,toplw,solsw,sollw,
-     s             sollwdown,
-     s             topsw0,toplw0,solsw0,sollw0,
-     s             lwdn0, lwdn, lwup0, lwup, 
-     s             swdn0, swdn, swup0, swup,
-     e             ok_ade, ok_aie, ! new for aerosol radiative effects
-     e             tau_ae, piz_ae, cg_ae, ! ="=
-     s             topswad, solswad, ! ="=
-     e             cldtaupi, ! ="=
-     s             topswai, solswai) ! ="=
-#endif
+      IF (aerosol_couple) THEN 
+#ifdef INCA_AER
+         CALL radlwsw_inca      
+     e        (kdlon,kflev,dist, rmu0, fract, solaire,
+     e        paprs, pplay,zxtsol,albsol, albsollw, t_seri,q_seri,
+     e        wo,
+     e        cldfra, cldemi, cldtau,
+     s        heat,heat0,cool,cool0,radsol,albpla,
+     s        topsw,toplw,solsw,sollw,
+     s        sollwdown,
+     s        topsw0,toplw0,solsw0,sollw0,
+     s        lwdn0, lwdn, lwup0, lwup, 
+     s        swdn0, swdn, swup0, swup,
+     e        ok_ade, ok_aie,   
+     e        tau_inca, piz_inca, cg_inca,
+     s        topswad_inca, solswad_inca, 
+     s        topswad0_inca, solswad0_inca, 
+     s        topsw_inca, topsw0_inca,
+     s        solsw_inca, solsw0_inca,
+     e        cldtaupi,         
+     s        topswai_inca, solswai_inca)
+#endif
+      ELSE
+         CALL radlwsw           ! nouveau rayonnement (compatible Arpege-IFS)
+     e        (dist, rmu0, fract, 
+     e        paprs, pplay,zxtsol,albsol, albsollw, t_seri,q_seri,
+     e        wo,
+     e        cldfra, cldemi, cldtau,
+     s        heat,heat0,cool,cool0,radsol,albpla,
+     s        topsw,toplw,solsw,sollw,
+     s        sollwdown,
+     s        topsw0,toplw0,solsw0,sollw0,
+     s        lwdn0, lwdn, lwup0, lwup, 
+     s        swdn0, swdn, swup0, swup,
+     e        ok_ade, ok_aie,   ! new for aerosol radiative effects
+     e        tau_ae, piz_ae, cg_ae, ! ="=
+     s        topswad, solswad, ! ="=
+     e        cldtaupi,         ! ="=
+     s        topswai, solswai) ! ="=
+      ENDIF
+
       itaprad = 0
       ENDIF
@@ -3089,7 +3085,7 @@
      I                   upwd,
      I                   dnwd,
+     I                   aerosol_couple, 
 #ifdef INCA
      I                   flxmass_w,
-#if defined(INCA_AER) && defined(CPP_COUPLE)
      I                   tau_inca, 
      I                   piz_inca, 
@@ -3097,5 +3093,4 @@
      I                   ccm,
      I                   rfname,
-#endif
 #endif
      O                   tr_seri)
Index: /LMDZ4/branches/LMDZ4_V3_patches/libf/phylmd/phytrac.F
===================================================================
--- /LMDZ4/branches/LMDZ4_V3_patches/libf/phylmd/phytrac.F	(revision 953)
+++ /LMDZ4/branches/LMDZ4_V3_patches/libf/phylmd/phytrac.F	(revision 954)
@@ -57,7 +57,7 @@
      I                    upwd,
      I                    dnwd,
+     I                    aerosol_couple,
 #ifdef INCA
      I                    flxmass_w,
-#if defined(INCA_AER) && defined(CPP_COUPLE)
      I                   tau_inca, 
      I                   piz_inca, 
@@ -65,5 +65,4 @@
      I                   ccm,
      I                   rfname,
-#endif
 #endif
      O                    tr_seri)
@@ -143,9 +142,8 @@
       REAL pmflxr(klon,klev+1), pmflxs(klon,klev+1)   !--lessivage convection
       REAL prfl(klon,klev+1),   psfl(klon,klev+1)     !--lessivage large-scale
-
+      LOGICAL aerosol_couple
 #ifdef INCA
       REAL flxmass_w(klon,klev)
       CHARACTER(len=8) :: solsym(nqmax)
-#if defined(INCA_AER) && defined(CPP_COUPLE)
       integer la
       REAL              ::    tau_inca(klon,klev,9,2)
@@ -154,5 +152,4 @@
       character*4       ::    rfname(9) 
       REAL              ::    ccm(klon,klev,2) 
-#endif
 #endif
 c      integer iflag_con
@@ -521,5 +518,6 @@
 
 #ifdef INCA_AER
-        CALL aerosolmain (tr_seri,
+        CALL aerosolmain (aerosol_couple, 
+     $                 tr_seri,
      $                 pdtphys,
      $                 pplay,
@@ -538,5 +536,4 @@
      $                 t_seri,       ! for chimiaq
      $                 rh,
-#ifdef CPP_COUPLE
      $                 tau_inca,
      $                 piz_inca,
@@ -544,5 +541,4 @@
      $                 rfname,
      $                 ccm,
-#endif
      $                 lafin)
 #endif
