Index: LMDZ4/branches/LMDZ4_AR5/libf/phylmd/phys_output_mod.F90
===================================================================
--- LMDZ4/branches/LMDZ4_AR5/libf/phylmd/phys_output_mod.F90	(revision 1404)
+++ LMDZ4/branches/LMDZ4_AR5/libf/phylmd/phys_output_mod.F90	(revision 1405)
@@ -1224,12 +1224,16 @@
      ENDIF
 
-      if (nqtot>=3) THEN
-!Attention    DO iq=3,nqtot
-    DO iq=3,4  
-       iiq=niadv(iq)
-! CALL histdef3d (iff, o_trac%flag,'o_'//tnom(iq)%name,ttext(iiq), "-" )
-  CALL histdef3d (iff, o_trac(iq-2)%flag,o_trac(iq-2)%name,ttext(iiq), "-" )
-    ENDDO
-      endif
+
+!Attention : sorties uniquement pour traceurs 3 et 4
+     IF (nqtot>=3) THEN
+        IF (tname(3) == "Aga" .OR. tname(3)=="AGA") THEN
+           o_trac(1)%name= "Aga"
+           ttext(3)= "Age stratospheric air"
+        END IF
+        CALL histdef3d (iff, o_trac(1)%flag,o_trac(1)%name,ttext(3), "-" )
+     END IF
+     
+     IF (nqtot>=4) CALL histdef3d (iff, o_trac(2)%flag,o_trac(2)%name,ttext(4), "-" )
+
 
         CALL histend(nid_files(iff))
Index: LMDZ4/branches/LMDZ4_AR5/libf/phylmd/phys_output_write.h
===================================================================
--- LMDZ4/branches/LMDZ4_AR5/libf/phylmd/phys_output_write.h	(revision 1404)
+++ LMDZ4/branches/LMDZ4_AR5/libf/phylmd/phys_output_write.h	(revision 1405)
@@ -1509,14 +1509,16 @@
         ENDIF
 
-!       IF (o_trac%flag(iff)<=lev_files(iff)) THEN
-         if (nqtot.GE.3) THEN
-!           DO iq=3,nqtot
-           DO iq=3,4
-       IF (o_trac(iq-2)%flag(iff)<=lev_files(iff)) THEN
-         CALL histwrite_phy(nid_files(iff),
-     s                  o_trac(iq-2)%name,itau_w,qx(:,:,iq))
-       ENDIF
-           ENDDO
-         endif
+
+        IF (nqtot.GE.3 .AND. o_trac(1)%flag(iff)<=lev_files(iff)) THEN
+           CALL histwrite_phy(nid_files(iff),
+     s          o_trac(1)%name,itau_w,qx(:,:,3))
+        ENDIF
+
+        IF (nqtot.GE.4 .AND. o_trac(2)%flag(iff)<=lev_files(iff)) THEN
+           CALL histwrite_phy(nid_files(iff),
+     s          o_trac(2)%name,itau_w,qx(:,:,4))
+        ENDIF
+
+
 
       if (ok_sync) then
Index: LMDZ4/branches/LMDZ4_AR5/libf/phylmd/traclmdz_mod.F90
===================================================================
--- LMDZ4/branches/LMDZ4_AR5/libf/phylmd/traclmdz_mod.F90	(revision 1404)
+++ LMDZ4/branches/LMDZ4_AR5/libf/phylmd/traclmdz_mod.F90	(revision 1405)
@@ -35,7 +35,15 @@
 !$OMP THREADPRIVATE(id_be)
 
-  LOGICAL,SAVE :: rnpb=.TRUE. ! Presence du couple Rn222, Pb210
+  INTEGER,SAVE :: id_aga      ! Identification number for tracer : Age of stratospheric air
+!$OMP THREADPRIVATE(id_aga)
+  INTEGER,SAVE :: lev_1p5km   ! Approximative vertical layer number at 1.5km above surface, used for calculation of the age of air. The result shouldn't be that sensible to the exactness of this value as long as it is in the lower troposphere. 
+!$OMP THREADPRIVATE(lev_1p5km)
+
+  INTEGER,SAVE :: id_rn, id_pb ! Identification number for tracer : radon (Rn222), lead (Pb210)
+  !$OMP THREADPRIVATE(id_rn, id_pb)
+  LOGICAL,SAVE :: rnpb=.FALSE. ! Presence du couple Rn222, Pb210
 !$OMP THREADPRIVATE(rnpb)
 
+  
 
 CONTAINS
@@ -123,8 +131,27 @@
 ! Recherche des traceurs connus : Be7, CO2,...
 ! --------------------------------------------
-    id_be=0
+    id_rn=0; id_pb=0; id_aga=0; id_be=0
     DO it=1,nbtr
        iiq=niadv(it+2)
-       IF ( tname(iiq) == "BE" .OR. tname(iiq) == "Be" .OR.  &
+       IF ( tname(iiq) == "RN" ) THEN
+          id_rn=it ! radon
+       ELSE IF ( tname(iiq) == "PB") THEN
+          id_pb=it ! plomb
+       ELSE IF ( tname(iiq) == "Aga" .OR. tname(iiq) == "AGA" ) THEN
+          ! Age of stratospheric air
+          id_aga=it
+          radio(id_aga) = .FALSE.
+          aerosol(id_aga) = .FALSE.
+          pbl_flg(id_aga) = 0 
+
+          ! Find the first model layer above 1.5km from the surface
+          IF (klev>=30) THEN
+             lev_1p5km=6   ! NB! This value is for klev=39
+          ELSE IF (klev>=10) THEN
+             lev_1p5km=5   ! NB! This value is for klev=19
+          ELSE
+             lev_1p5km=klev/2
+          END IF
+       ELSE IF ( tname(iiq) == "BE" .OR. tname(iiq) == "Be" .OR.  &
             tname(iiq) == "BE7" .OR. tname(iiq) == "Be7" ) THEN  
           ! Recherche du Beryllium 7
@@ -135,11 +162,12 @@
           CALL init_be(pctsrf,masktr(:,id_be),tautr(id_be),vdeptr(id_be),scavtr(id_be),srcbe)
           WRITE(*,*) 'Initialisation srcBe: OK'
-       END IF    
+       END IF
+       
     END DO
 !
 ! Valeurs specifiques pour les traceurs Rn222 et Pb210
 ! ----------------------------------------------
-    IF (rnpb) THEN
-        
+    IF ( id_rn/=0 .AND. id_pb/=0 ) THEN
+       rnpb = .TRUE.
        radio(1)= .TRUE.
        radio(2)= .TRUE.
@@ -249,4 +277,25 @@
        WRITE(solsym(it),'(i2)') it
     END DO
+
+!
+! Update tracer : Age of stratospheric air 
+!
+    IF (id_aga/=0) THEN
+       
+       ! Bottom layers
+       DO k = 1, lev_1p5km
+          tr_seri(:,k,id_aga) = 0.0
+       END DO
+       
+       ! Layers above 1.5km
+       DO k = lev_1p5km+1,klev-1
+          tr_seri(:,k,id_aga) = tr_seri(:,k,id_aga) + pdtphys
+       END DO
+       
+       ! Top layer
+       tr_seri(:,klev,id_aga) = tr_seri(:,klev-1,id_aga)
+       
+    END IF
+
 !======================================================================
 !     -- Calcul de l'effet de la couche limite --
@@ -273,5 +322,5 @@
     
     DO it=1, nbtr
-       IF (couchelimite .AND. pbl_flg(it) == 0 ) THEN ! couche limite avec quantite dans le sol calculee
+       IF (couchelimite .AND. pbl_flg(it) == 0 .AND. rnpb) THEN ! couche limite avec quantite dans le sol calculee
           CALL cltracrn(it, pdtphys, yu1, yv1,     &
                cdragh, coefh,t_seri,ftsol,pctsrf,  &
