Index: LMDZ6/trunk/libf/dyn3d/advtrac.F90
===================================================================
--- LMDZ6/trunk/libf/dyn3d/advtrac.F90	(revision 4124)
+++ LMDZ6/trunk/libf/dyn3d/advtrac.F90	(revision 4143)
@@ -11,5 +11,5 @@
    !            M.A Filiberti (04/2002)
    !
-   USE infotrac,     ONLY: nqtot, tracers,ok_iso_verif
+   USE infotrac,     ONLY: nqtot, tracers, isoCheck
    USE control_mod,  ONLY: iapp_tracvl, day_step
    USE comconst_mod, ONLY: dtvr
@@ -215,8 +215,6 @@
 #endif
 
-   IF(ok_iso_verif) THEN
-      WRITE(*,*) 'advtrac 227'
-      CALL check_isotopes_seq(q,ip1jmp1,'advtrac 162')
-   END IF
+   IF(isoCheck) WRITE(*,*) 'advtrac 227'
+   CALL check_isotopes_seq(q,ip1jmp1,'advtrac 162')
 
    !-------------------------------------------------------------------------
@@ -346,8 +344,6 @@
    END DO
 
-   IF(ok_iso_verif) then
-      WRITE(*,*) 'advtrac 402'
-      CALL check_isotopes_seq(q,ip1jmp1,'advtrac 397')
-   END IF
+   IF(isoCheck) WRITE(*,*) 'advtrac 402'
+   CALL check_isotopes_seq(q,ip1jmp1,'advtrac 397')
 
    !-------------------------------------------------------------------------
Index: LMDZ6/trunk/libf/dyn3d/check_isotopes.F
===================================================================
--- LMDZ6/trunk/libf/dyn3d/check_isotopes.F	(revision 4124)
+++ 	(revision )
@@ -1,203 +1,0 @@
-        subroutine check_isotopes_seq(q,ip1jmp1,err_msg)
-        USE infotrac, ONLY: nqtot, nqo, niso, ntraciso, nzone,
-     &                     use_iso, 
-     &                     iqiso, index_trac,indnum_fn_num, tnat
-        implicit none
-
-#include "dimensions.h"
-
-        ! inputs
-        integer ip1jmp1
-        real q(ip1jmp1,llm,nqtot)
-        character*(*) err_msg ! message d''erreur à afficher
-
-        ! locals
-        integer ixt,phase,k,i,iq,iiso,izone,ieau,iqeau
-        real xtractot,xiiso
-        real borne
-        real qmin
-        real errmax ! erreur maximale en absolu.
-        real errmaxrel ! erreur maximale en relatif autorisée
-        real deltaDmax,deltaDmin
-        real ridicule
-        parameter (borne=1e19)
-        parameter (errmax=1e-8)
-        parameter (errmaxrel=1e-3)
-        parameter (qmin=1e-11)
-        parameter (deltaDmax=1000.0,deltaDmin=-999.0)
-        parameter (ridicule=1e-12)
-        real deltaD
-
-        if (niso > 0) then
-
-        write(*,*) 'check_isotopes 31: err_msg=',err_msg
-        ! verifier que rien n'est NaN
-        do ixt=1,ntraciso
-          do phase=1,nqo
-            iq=iqiso(ixt,phase)
-            do k=1,llm
-              DO i = 1,ip1jmp1
-                if ((q(i,k,iq).gt.-borne).and.
-     :            (q(i,k,iq).lt.borne)) then
-                else !if ((x(ixt,i,j).gt.-borne).and.
-                  write(*,*) 'erreur detectee par iso_verif_noNaN:'
-                  write(*,*) err_msg
-                  write(*,*) 'q,i,k,iq=',q(i,k,iq),i,k,iq
-                  write(*,*) 'borne=',borne
-                  call abort_gcm('check_isotopes_loc','plantage iso',0)
-                endif  !if ((x(ixt,i,j).gt.-borne).and.
-              enddo !DO i = 1,ip1jmp1
-            enddo !do k=1,llm
-          enddo !do phase=1,nqo
-        enddo !do ixt=1,ntraciso
-
-        !write(*,*) 'check_isotopes 52'
-        ! verifier que l'eau normale est OK
-        if (use_iso(1)) then
-          ixt=indnum_fn_num(1)
-          do phase=1,nqo
-            iq=iqiso(ixt,phase)
-            do k=1,llm
-            DO i = 1,ip1jmp1  
-              if ((abs(q(i,k,phase)-q(i,k,iq)).gt.errmax).and.
-     :          (abs((q(i,k,phase)-q(i,k,iq))/
-     :           max(max(abs(q(i,k,phase)),abs(q(i,k,iq))),1e-18))
-     :           .gt.errmaxrel)) then
-                  write(*,*) 'erreur detectee par iso_verif_egalite:'
-                  write(*,*) err_msg
-                  write(*,*) 'ixt,phase=',ixt,phase
-                  write(*,*) 'q,iq,i,k=',q(i,k,iq),iq,i,k
-                  write(*,*) 'q(i,k,phase)=',q(i,k,phase)
-                  call abort_gcm('check_isotopes_loc','plantage iso',0)
-              endif !if ((abs(q(i,k,phase)-q(i,k,iq)).gt.errmax).and.
-              ! bidouille pour éviter divergence:
-              q(i,k,iq)= q(i,k,phase) 
-            enddo ! DO i = 1,ip1jmp1
-            enddo !do k=1,llm
-          enddo ! do phase=1,nqo 
-        endif !if (use_iso(1)) then
-        
-        !write(*,*) 'check_isotopes 78'
-        ! verifier que HDO est raisonable
-        if (use_iso(2)) then
-          ixt=indnum_fn_num(2)
-          do phase=1,nqo
-            iq=iqiso(ixt,phase)
-            do k=1,llm
-            DO i = 1,ip1jmp1
-            if (q(i,k,iq).gt.qmin) then
-             deltaD=(q(i,k,iq)/q(i,k,phase)/tnat(2)-1)*1000
-             if ((deltaD.gt.deltaDmax).or.(deltaD.lt.deltaDmin)) then
-                  write(*,*) 'erreur detectee par iso_verif_aberrant:'
-                  write(*,*) err_msg
-                  write(*,*) 'ixt,phase=',ixt,phase
-                  write(*,*) 'q,iq,i,k,=',q(i,k,iq),iq,i,k
-                  write(*,*) 'q=',q(i,k,:)
-                  write(*,*) 'deltaD=',deltaD
-                  call abort_gcm('check_isotopes_loc','plantage iso',0)
-             endif !if ((deltaD.gt.deltaDmax).or.(deltaD.lt.deltaDmin)) then
-            endif !if (q(i,k,iq).gt.qmin) then
-            enddo !DO i = 1,ip1jmp1
-            enddo !do k=1,llm
-          enddo ! do phase=1,nqo 
-        endif !if (use_iso(2)) then
-
-        !write(*,*) 'check_isotopes 103'
-        ! verifier que O18 est raisonable
-        if (use_iso(3)) then
-          ixt=indnum_fn_num(3)
-          do phase=1,nqo
-            iq=iqiso(ixt,phase)
-            do k=1,llm
-            DO i = 1,ip1jmp1
-            if (q(i,k,iq).gt.qmin) then
-             deltaD=(q(i,k,iq)/q(i,k,phase)/tnat(3)-1)*1000
-             if ((deltaD.gt.deltaDmax).or.(deltaD.lt.deltaDmin)) then
-                  write(*,*) 'erreur detectee iso_verif_aberrant O18:'
-                  write(*,*) err_msg
-                  write(*,*) 'ixt,phase=',ixt,phase
-                  write(*,*) 'q,iq,i,k,=',q(i,k,phase),iq,i,k
-                  write(*,*) 'xt=',q(i,k,:)
-                  write(*,*) 'deltaO18=',deltaD
-                  call abort_gcm('check_isotopes_loc','plantage iso',0)
-             endif !if ((deltaD.gt.deltaDmax).or.(deltaD.lt.deltaDmin)) then
-            endif !if (q(i,k,iq).gt.qmin) then
-            enddo !DO i = 1,ip1jmp1
-            enddo !do k=1,llm
-          enddo ! do phase=1,nqo 
-        endif !if (use_iso(2)) then
-
-
-        !write(*,*) 'check_isotopes 129'
-        if (nzone > 0) then
-
-          if (use_iso(2).and.use_iso(1)) then
-            do izone=1,nzone
-             ixt=index_trac(izone,indnum_fn_num(2))
-             ieau=index_trac(izone,indnum_fn_num(1))
-             do phase=1,nqo
-               iq=iqiso(ixt,phase)
-               iqeau=iqiso(ieau,phase)
-               do k=1,llm
-                DO i = 1,ip1jmp1
-                if (q(i,k,iq).gt.qmin) then
-                 deltaD=(q(i,k,iq)/q(i,k,iqeau)/tnat(2)-1)*1000
-                 if ((deltaD.gt.deltaDmax).or.
-     &                   (deltaD.lt.deltaDmin)) then
-                  write(*,*) 'erreur dans iso_verif_aberrant trac:'
-                  write(*,*) err_msg
-                  write(*,*) 'izone,phase=',izone,phase
-                  write(*,*) 'ixt,ieau=',ixt,ieau
-                  write(*,*) 'q,iq,i,k,=',q(i,k,iq),iq,i,k
-                  write(*,*) 'deltaD=',deltaD
-                  call abort_gcm('check_isotopes_loc','plantage iso',0)
-                 endif !if ((deltaD.gt.deltaDmax).or.
-                endif !if (q(i,k,iq).gt.qmin) then
-                enddo !DO i = 1,ip1jmp1
-                enddo  ! do k=1,llm
-              enddo ! do phase=1,nqo    
-            enddo !do izone=1,nzone
-          endif !if (use_iso(2).and.use_iso(1)) then
-
-          do iiso=1,niso
-           do phase=1,nqo
-              iq=iqiso(iiso,phase)
-              do k=1,llm
-                DO i = 1,ip1jmp1
-                   xtractot=0.0
-                   xiiso=q(i,k,iq)
-                   do izone=1,nzone
-                      iq=iqiso(index_trac(izone,iiso),phase)
-                      xtractot=xtractot+ q(i,k,iq)
-                   enddo !do izone=1,ntraceurs_zone
-                   if ((abs(xtractot-xiiso).gt.errmax).and.
-     :                  (abs(xtractot-xiiso)/
-     :                  max(max(abs(xtractot),abs(xiiso)),1e-18)
-     :                  .gt.errmaxrel)) then
-                  write(*,*) 'erreur detectee par iso_verif_traceurs:'
-                  write(*,*) err_msg
-                  write(*,*) 'iiso,phase=',iiso,phase
-                  write(*,*) 'i,k,=',i,k
-                  write(*,*) 'q(i,k,:)=',q(i,k,:)
-                  call abort_gcm('check_isotopes_loc','plantage iso',0)
-                 endif !if ((abs(q(i,k,phase)-q(i,k,iq)).gt.errmax).and.
-                  
-                 ! bidouille pour éviter divergence:
-                 if (abs(xtractot).gt.ridicule) then
-                   do izone=1,nzone
-                     ixt=index_trac(izone,iiso) 
-                     q(i,k,iq)=q(i,k,iq)/xtractot*xiiso
-                   enddo !do izone=1,nzone                
-                  endif !if ((abs(xtractot).gt.ridicule) then
-                enddo !DO i = 1,ip1jmp1
-              enddo !do k=1,llm
-           enddo !do phase=1,nqo
-          enddo !do iiso=1,niso
-
-        endif !if (nzone > 0)
-
-        endif ! if (niso > 0)
-        !write(*,*) 'check_isotopes 198'
-        
-        end
-
Index: LMDZ6/trunk/libf/dyn3d/check_isotopes.F90
===================================================================
--- LMDZ6/trunk/libf/dyn3d/check_isotopes.F90	(revision 4143)
+++ LMDZ6/trunk/libf/dyn3d/check_isotopes.F90	(revision 4143)
@@ -0,0 +1,172 @@
+SUBROUTINE check_isotopes_seq(q, ip1jmp1, err_msg)
+   USE strings_mod, ONLY: maxlen, msg, strIdx, strStack, int2str, real2str
+   USE infotrac,    ONLY: nqtot, niso, nphas, isotope, isoCheck, iqIsoPha, isoSelect, &
+                          ntiso, iH2O, nzone, tracers, isoName,  itZonIso, tnat
+   IMPLICIT NONE
+   include "dimensions.h"
+   REAL,             INTENT(INOUT) :: q(ip1jmp1,llm,nqtot)
+   INTEGER,          INTENT(IN)    :: ip1jmp1
+   CHARACTER(LEN=*), INTENT(IN)    :: err_msg    !--- Error message to display
+   CHARACTER(LEN=maxlen) :: modname, msg1, nm(2)
+   INTEGER :: ixt, ipha, k, i, iq, iiso, izon, ieau, iqeau, iqpar
+   INTEGER, ALLOCATABLE :: ix(:)
+   REAL    :: xtractot, xiiso, deltaD, q1, q2
+   REAL, PARAMETER :: borne     = 1e19,  &
+                      errmax    = 1e-8,  &       !--- Max. absolute error
+                      errmaxrel = 1e-3,  &       !--- Max. relative error
+                      qmin      = 1e-11, &
+                      deltaDmax =1000.0, &
+                      deltaDmin =-999.0, &
+                      ridicule  = 1e-12
+   INTEGER, SAVE :: iso_eau, iso_HDO, iso_O18, &
+                             iso_O17, iso_HTO
+   LOGICAL, SAVE :: first=.TRUE.
+
+   modname='check_isotopes'
+   IF(.NOT.isoCheck)    RETURN                   !--- No need to check => finished
+   IF(isoSelect('H2O')) RETURN                   !--- No H2O isotopes group found
+   IF(niso == 0)        RETURN                   !--- No isotopes => finished
+   IF(first) THEN
+      iso_eau = strIdx(isoName,'H2[16]O')
+      iso_HDO = strIdx(isoName,'H[2]HO')
+      iso_O18 = strIdx(isoName,'H2[18]O')
+      iso_O17 = strIdx(isoName,'H2[17]O')
+      iso_HTO = strIdx(isoName,'H[3]HO')
+      first = .FALSE.
+   END IF
+   CALL msg('31: err_msg='//TRIM(err_msg), modname)
+
+   !--- CHECK FOR NaNs (FOR ALL THE ISOTOPES, INCLUDING GEOGRAPHIC TAGGING TRACERS)
+   modname = 'check_isotopes:iso_verif_noNaN'
+   DO ixt = 1, ntiso
+      DO ipha = 1, nphas
+         iq = iqIsoPha(ixt,ipha)
+         DO k = 1, llm
+            DO i = 1, ip1jmp1
+               IF(ABS(q(i,k,iq)) < borne) CYCLE
+               WRITE(msg1,'(s,"(",i0,",",i0,",",i0,") = ",ES12.4)')TRIM(isoName(ixt)),i,k,iq,q(i,k,iq)
+               CALL msg(msg1, modname)
+               CALL abort_gcm(modname, 'Error with isotopes: '//TRIM(err_msg), 1)
+            END DO
+         END DO
+      END DO
+   END DO
+
+   !--- CHECK CONSERVATION (MAIN ISOTOPE AND PARENT CONCENTRATIONS MUST BE EQUAL)
+   modname = 'check_isotopes:iso_verif_egalite'
+   ixt = iso_eau
+   IF(ixt /= 0) THEN
+      DO ipha = 1, nphas
+         iq = iqIsoPha(ixt,ipha)
+         iqpar = tracers(iq)%iqParent
+         DO k = 1, llm
+            DO i = 1, ip1jmp1
+               q1 = q(i,k,iqpar)
+               q2 = q(i,k,iq)
+!--- IMPROVEMENT in case at least one isotope is not negligible compared to the main isotopic form.
+!    This would be probably required to sum from smallest to highest concentrations ; the corresponding
+!    indices vector can be computed once only (in the initializations stage), using mean concentrations.
+!              q2 = SUM(q(i,k,tracers(iqPar)%iqDesc), DIM=3)
+               IF(ABS(q1-q2) <= errmax .OR. ABS(q1-q2)/MAX(MAX(ABS(q1),ABS(q2)),1e-18) <= errmaxrel) THEN
+                  q(i,k,iq) = q1                 !--- Bidouille pour convergence
+!                 q(i,k,tracers(iqPar)%iqDesc) = q(i,k,tracers(iqPar)%iqDesc) * q1 / q2
+                  CYCLE
+               END IF
+               CALL msg('ixt, iq = '//TRIM(strStack(int2str([ixt,iq]))), modname)
+               msg1 = '('//TRIM(strStack(int2str([i,k])))//')'
+               CALL msg(TRIM(tracers(iqpar)%name)//TRIM(msg1)//' = '//TRIM(real2str(q1)), modname)
+               CALL msg(TRIM(tracers(iq   )%name)//TRIM(msg1)//' = '//TRIM(real2str(q2)), modname)
+               CALL abort_gcm(modname, 'Error with isotopes: '//TRIM(err_msg), 1)
+            END DO
+         END DO
+      END DO
+   END IF
+
+   !--- CHECK DELTA ANOMALIES
+   modname = 'check_isotopes:iso_verif_aberrant'
+   ix = [ iso_HDO  ,   iso_O18 ]
+   nm = ['deltaD  ', 'deltaO18']
+   DO iiso = 1, SIZE(ix)
+      ixt = ix(iiso)
+      IF(ixt  == 0) CYCLE
+      DO ipha = 1, nphas
+         iq = iqIsoPha(ixt,ipha)
+         iqpar = tracers(iq)%iqParent
+         DO k = 1, llm
+            DO i = 1, ip1jmp1
+               q1 = q(i,k,iqpar)
+               q2 = q(i,k,iq)
+!--- IMPROVEMENT in case at least one isotope is not negligible compared to the main isotopic form.
+!    This would be probably required to sum from smallest to highest concentrations ; the corresponding
+!    indices vector can be computed once only (in the initializations stage), using mean concentrations.
+!              q2 = SUM(q(i,k,tracers(iqPar)%iqDesc), DIM=3)
+               IF(q2 <= qmin) CYCLE
+               deltaD = (q2/q1/tnat(ixt)-1.)*1000.
+               IF(deltaD <= deltaDmax .AND. deltaD >= deltaDmin) CYCLE
+               CALL msg('ixt, iq = '//TRIM(strStack(int2str([ixt,iq]))), modname)
+               msg1 = '('//TRIM(strStack(int2str([i,k])))//')'
+               CALL msg(TRIM(tracers(iqpar)%name)//TRIM(msg1)//' = '//TRIM(real2str(q1)), modname)
+               CALL msg(TRIM(tracers(iq   )%name)//TRIM(msg1)//' = '//TRIM(real2str(q2)), modname)
+               CALL msg(TRIM(nm(iiso))//TRIM(real2str(deltaD)), modname)
+               CALL abort_gcm(modname, 'Error with isotopes: '//TRIM(err_msg), 1)
+            END DO
+         END DO
+      END DO
+   END DO
+
+   IF(nzone == 0) RETURN
+
+   !--- CHECK FOR TAGGING TRACERS DELTAD ANOMALIES
+   modname = 'check_isotopes:iso_verif_aberrant'
+   IF(iso_eau /= 0 .AND. iso_HDO /= 0) THEN
+      DO izon = 1, nzone
+         ixt  = itZonIso(izon, iso_HDO)
+         ieau = itZonIso(izon, iso_eau)
+         DO ipha = 1, nphas
+            iq    = iqIsoPha(ixt,  ipha)
+            iqeau = iqIsoPha(ieau, ipha)
+            DO k = 1, llm
+               DO i = 1, ip1jmp1
+                  q1 = q(i,k,iqeau)
+                  q2 = q(i,k,iq)
+                  IF(q2<=qmin) CYCLE
+                  deltaD = (q2/q1/tnat(iso_HDO)-1.)*1000.
+                  IF(deltaD <= deltaDmax .AND. deltaD >= deltaDmin) CYCLE
+                  CALL msg('izon, ipha = '//TRIM(strStack(int2str([izon, ipha]))), modname)
+                  CALL msg( 'ixt, ieau = '//TRIM(strStack(int2str([ ixt, ieau]))), modname)
+                  msg1 = '('//TRIM(strStack(int2str([i,k])))//')'
+                  CALL msg(TRIM(tracers(iqeau)%name)//TRIM(msg1)//' = '//TRIM(real2str(q1)), modname)
+                  CALL msg(TRIM(tracers(iq   )%name)//TRIM(msg1)//' = '//TRIM(real2str(q2)), modname)
+                  CALL msg('deltaD = '//TRIM(real2str(deltaD)), modname)
+                  CALL abort_gcm(modname, 'Error with isotopes: '//TRIM(err_msg), 1)
+               END DO
+            END DO
+         END DO
+      END DO
+   END IF
+
+   !--- CHECK FOR TAGGING TRACERS CONSERVATION (PARENT AND TAGGING TRACERS SUM OVER ALL REGIONS MUST BE EQUAL)
+   DO iiso = 1, niso
+      DO ipha = 1, nphas
+         iq = iqIsoPha(iiso, ipha)
+         DO k = 1, llm
+            DO i = 1, ip1jmp1
+               xiiso = q(i,k,iq)
+               xtractot = SUM(q(i, k, iqIsoPha(itZonIso(1:nzone,iiso), ipha)))
+               IF(ABS(xtractot-xiiso) > errmax .AND. ABS(xtractot-xiiso)/MAX(MAX(ABS(xtractot),ABS(xiiso)),1e-18) > errmaxrel) THEN
+                  CALL msg('Error in iso_verif_aberrant trac: '//TRIM(err_msg))
+                  CALL msg('iiso, ipha = '//TRIM(strStack(int2str([iiso, ipha]))), modname)
+                  CALL msg('q('//TRIM(strStack(int2str([i,k])))//',:) = '//TRIM(strStack(real2str(q(i,k,:)))), modname)
+                  CALL abort_gcm(modname, 'Error with isotopes: '//TRIM(err_msg), 1)
+               END IF
+               IF(ABS(xtractot) <= ridicule) CYCLE
+               DO izon = 1, nzone
+                  q(i,k,iq) = q(i,k,iq) / xtractot * xiiso !--- Bidouille pour convergence
+               END DO
+            END DO
+         END DO
+      END DO
+   END DO
+
+END SUBROUTINE check_isotopes_seq
+
Index: LMDZ6/trunk/libf/dyn3d/dynetat0.F90
===================================================================
--- LMDZ6/trunk/libf/dyn3d/dynetat0.F90	(revision 4124)
+++ LMDZ6/trunk/libf/dyn3d/dynetat0.F90	(revision 4143)
@@ -6,5 +6,5 @@
 ! Purpose: Initial state reading.
 !-------------------------------------------------------------------------------
-  USE infotrac,    ONLY: nqtot, tracers, niso, iqiso, iso_indnum, iso_num, tnat, alpha_ideal, iH2O
+  USE infotrac,    ONLY: nqtot, tracers, niso, iqIsoPha, tnat, alpha_ideal, iH2O
   USE strings_mod, ONLY: maxlen, msg, strStack, real2str
   USE netcdf,      ONLY: NF90_OPEN,  NF90_NOWRITE, NF90_INQ_VARID, &
@@ -145,6 +145,5 @@
 #endif
     ELSE IF(tracers(iq)%iso_iGroup == iH2O .AND. niso > 0) THEN                          !=== WATER ISOTOPES
-!     iName    = tracers(iq)%iso_iName  ! (next commit)
-      iName    = iso_num(iq)
+      iName    = tracers(iq)%iso_iName
       iPhase   = tracers(iq)%iso_iPhase
       iqParent = tracers(iq)%iqParent
@@ -154,5 +153,5 @@
       ELSE
          CALL msg('Tracer <'//TRIM(var)//'> is missing => initialized to its parent isotope concentration.', modname)
-         q(:,:,:,iq) = q(:,:,:,iqiso(iso_indnum(iq),iPhase))
+         q(:,:,:,iq) = q(:,:,:,iqIsoPha(iName,iPhase))
       END IF
     !--------------------------------------------------------------------------------------------------------------------------
Index: LMDZ6/trunk/libf/dyn3d/iniacademic.F90
===================================================================
--- LMDZ6/trunk/libf/dyn3d/iniacademic.F90	(revision 4124)
+++ LMDZ6/trunk/libf/dyn3d/iniacademic.F90	(revision 4143)
@@ -5,6 +5,5 @@
 
   USE filtreg_mod, ONLY: inifilr
-  USE infotrac,    ONLY: nqtot, niso, niso_possibles, ok_iso_verif, tnat, alpha_ideal, &
-                         iqiso, tracers, iso_indnum, iso_num
+  USE infotrac,    ONLY: nqtot, niso, tnat, alpha_ideal, iqIsoPha, tracers
   USE control_mod, ONLY: day_step,planet_type
   use exner_hyb_m, only: exner_hyb
@@ -282,6 +281,5 @@
               ! CRisi: init des isotopes
               ! distill de Rayleigh très simplifiée
-!             iName    = tracers(iq)%iso_iName  ! (next commit)
-              iName    = iso_num(iq)
+              iName    = tracers(iq)%iso_iName
               if (niso <= 0 .OR. iName <= 0) CYCLE
               iPhase   = tracers(iq)%iso_iPhase
@@ -290,5 +288,5 @@
                  q(:,:,iq) = q(:,:,iqParent)*tnat(iName)*(q(:,:,iqParent)/30.e-3)**(alpha_ideal(iName)-1.)
               ELSE
-                 q(:,:,iq) = q(:,:,iqiso(iso_indnum(iq),iPhase))
+                 q(:,:,iq) = q(:,:,iqIsoPha(iName,iPhase))
               END IF
            enddo
@@ -297,5 +295,5 @@
         endif ! of if (planet_type=="earth")
 
-        if (ok_iso_verif) call check_isotopes_seq(q,1,ip1jmp1,'iniacademic_loc')
+        call check_isotopes_seq(q,1,ip1jmp1,'iniacademic_loc')
 
         ! add random perturbation to temperature
Index: LMDZ6/trunk/libf/dyn3d/leapfrog.F
===================================================================
--- LMDZ6/trunk/libf/dyn3d/leapfrog.F	(revision 4124)
+++ LMDZ6/trunk/libf/dyn3d/leapfrog.F	(revision 4143)
@@ -11,5 +11,5 @@
       use IOIPSL
 #endif
-      USE infotrac, ONLY: nqtot,ok_iso_verif
+      USE infotrac, ONLY: nqtot, isoCheck
       USE guide_mod, ONLY : guide_main
       USE write_field, ONLY: writefield
@@ -26,4 +26,5 @@
       USE temps_mod, ONLY: jD_ref,jH_ref,itaufin,day_ini,day_ref,
      &                        start_time,dt
+      USE strings_mod, ONLY: msg
 
       IMPLICIT NONE
@@ -237,7 +238,5 @@
       jH_cur = jH_cur - int(jH_cur)
 
-        if (ok_iso_verif) then
-           call check_isotopes_seq(q,ip1jmp1,'leapfrog 321')
-        endif !if (ok_iso_verif) then
+      call check_isotopes_seq(q,ip1jmp1,'leapfrog 321')
 
 #ifdef CPP_IOIPSL
@@ -271,7 +270,5 @@
 !      CALL filtreg ( finvmaold ,jjp1, llm, -2,2, .TRUE., 1 )
 
-        if (ok_iso_verif) then
-           call check_isotopes_seq(q,ip1jmp1,'leapfrog 400')
-        endif !if (ok_iso_verif) then
+      call check_isotopes_seq(q,ip1jmp1,'leapfrog 400')
 
    2  CONTINUE ! Matsuno backward or leapfrog step begins here
@@ -324,7 +321,5 @@
 
 
-        if (ok_iso_verif) then
-           call check_isotopes_seq(q,ip1jmp1,'leapfrog 589')
-        endif !if (ok_iso_verif) then
+      call check_isotopes_seq(q,ip1jmp1,'leapfrog 589')
 
 c-----------------------------------------------------------------------
@@ -345,8 +340,6 @@
 c   -------------------------------------------------------------
 
-        if (ok_iso_verif) then
-           call check_isotopes_seq(q,ip1jmp1,
+      call check_isotopes_seq(q,ip1jmp1,
      &           'leapfrog 686: avant caladvtrac')
-        endif !if (ok_iso_verif) then
 
       IF( forward. OR . leapf )  THEN
@@ -376,8 +369,6 @@
 c   ----------------------------------
 
-        if (ok_iso_verif) then
-           write(*,*) 'leapfrog 720' 
-           call check_isotopes_seq(q,ip1jmp1,'leapfrog 756')
-        endif !if (ok_iso_verif) then
+       CALL msg('720', modname, isoCheck)
+       call check_isotopes_seq(q,ip1jmp1,'leapfrog 756')
         
        CALL integrd ( nqtot,vcovm1,ucovm1,tetam1,psm1,massem1 ,
@@ -385,8 +376,6 @@
 !     $              finvmaold                                    )
 
-       if (ok_iso_verif) then
-          write(*,*) 'leapfrog 724'
-           call check_isotopes_seq(q,ip1jmp1,'leapfrog 762')
-        endif !if (ok_iso_verif) then
+       CALL msg('724', modname, isoCheck)
+       call check_isotopes_seq(q,ip1jmp1,'leapfrog 762')
 
 c .P.Le Van (26/04/94  ajout de  finvpold dans l'appel d'integrd)
@@ -552,7 +541,5 @@
         CALL massdair(p,masse)
 
-        if (ok_iso_verif) then
-           call check_isotopes_seq(q,ip1jmp1,'leapfrog 1196')
-        endif !if (ok_iso_verif) then
+        call check_isotopes_seq(q,ip1jmp1,'leapfrog 1196')
 
 c-----------------------------------------------------------------------
@@ -639,7 +626,5 @@
 c   preparation du pas d'integration suivant  ......
 
-        if (ok_iso_verif) then
-           call check_isotopes_seq(q,ip1jmp1,'leapfrog 1509')
-        endif !if (ok_iso_verif) then
+      call check_isotopes_seq(q,ip1jmp1,'leapfrog 1509')
 
       IF ( .NOT.purmats ) THEN
@@ -703,7 +688,5 @@
             ENDIF ! of IF((MOD(itau,iperiod).EQ.0).OR.(itau.EQ.itaufin))
 
-        if (ok_iso_verif) then
-           call check_isotopes_seq(q,ip1jmp1,'leapfrog 1584')
-        endif !if (ok_iso_verif) then
+            call check_isotopes_seq(q,ip1jmp1,'leapfrog 1584')
 
 c-----------------------------------------------------------------------
@@ -790,7 +773,5 @@
       ELSE ! of IF (.not.purmats)
 
-        if (ok_iso_verif) then
-           call check_isotopes_seq(q,ip1jmp1,'leapfrog 1664')
-        endif !if (ok_iso_verif) then
+            call check_isotopes_seq(q,ip1jmp1,'leapfrog 1664')
 
 c       ........................................................
@@ -817,7 +798,5 @@
             ELSE ! of IF(forward) i.e. backward step
  
-        if (ok_iso_verif) then
-           call check_isotopes_seq(q,ip1jmp1,'leapfrog 1698')
-        endif !if (ok_iso_verif) then  
+              call check_isotopes_seq(q,ip1jmp1,'leapfrog 1698')
 
               IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) THEN
Index: LMDZ6/trunk/libf/dyn3d/qminimum.F
===================================================================
--- LMDZ6/trunk/libf/dyn3d/qminimum.F	(revision 4124)
+++ LMDZ6/trunk/libf/dyn3d/qminimum.F	(revision 4143)
@@ -4,5 +4,7 @@
       SUBROUTINE qminimum( q,nqtot,deltap )
 
-      USE infotrac, ONLY: niso, ntraciso,iqiso,ok_iso_verif
+      USE infotrac, ONLY: niso, ntiso,iqIsoPha, tracers
+      USE strings_mod, ONLY: strIdx
+      USE readTracFiles_mod, ONLY: addPhase
       IMPLICIT none
 c
@@ -16,10 +18,8 @@
       REAL q(ip1jmp1,llm,nqtot), deltap(ip1jmp1,llm)
 c
-      INTEGER iq_vap, iq_liq
-      PARAMETER ( iq_vap = 1 ) ! indice pour l'eau vapeur
-      PARAMETER ( iq_liq = 2 ) ! indice pour l'eau liquide
-      REAL seuil_vap, seuil_liq
-      PARAMETER ( seuil_vap = 1.0e-10 ) ! seuil pour l'eau vapeur
-      PARAMETER ( seuil_liq = 1.0e-11 ) ! seuil pour l'eau liquide
+      LOGICAL, SAVE :: first=.TRUE.
+      INTEGER, SAVE :: iq_vap, iq_liq        ! indices pour l'eau vapeur/liquide
+      REAL, PARAMETER :: seuil_vap = 1.0e-10 ! seuil pour l'eau vapeur
+      REAL, PARAMETER :: seuil_liq = 1.0e-11 ! seuil pour l'eau liquide
 c
 c  NB. ....( Il est souhaitable mais non obligatoire que les valeurs des
@@ -43,4 +43,10 @@
       !INTEGER nb_pump
       INTEGER ixt
+
+      IF(first) THEN
+         iq_vap = strIdx(tracers(:)%name, addPhase('H2O', 'g'))
+         iq_liq = strIdx(tracers(:)%name, addPhase('H2O', 'l'))
+         first = .FALSE.
+      END IF
 c
 c Quand l'eau liquide est trop petite (ou negative), on prend
@@ -49,7 +55,5 @@
 c
 
-        if (ok_iso_verif) then
-           call check_isotopes_seq(q,ip1jmp1,'qminimum 52')   
-        endif !if (ok_iso_verif) then     
+      call check_isotopes_seq(q,ip1jmp1,'qminimum 52')   
 
       zx_defau_diag(:,:,:)=0.0
@@ -127,14 +131,16 @@
           if (zx_defau_diag(i,k,iq_vap).gt.0.0) then             
               ! on ajoute la vapeur en k              
-              do ixt=1,ntraciso
-               q(i,k,iqiso(ixt,iq_vap))=q(i,k,iqiso(ixt,iq_vap))
-     :              +zx_defau_diag(i,k,iq_vap)
-     :              *q(i,k-1,iqiso(ixt,iq_vap))/q_follow(i,k-1,iq_vap)
+              do ixt=1,ntiso
+               q(i,k,iqIsoPha(ixt,iq_vap))=q(i,k,iqIsoPha(ixt,iq_vap))
+     :           +zx_defau_diag(i,k,iq_vap)
+     :           *q(i,k-1,iqIsoPha(ixt,iq_vap))/q_follow(i,k-1,iq_vap)
                 
               ! et on la retranche en k-1
-               q(i,k-1,iqiso(ixt,iq_vap))=q(i,k-1,iqiso(ixt,iq_vap))
+               q(i,k-1,iqIsoPha(ixt,iq_vap))=
+     :            q(i,k-1,iqIsoPha(ixt,iq_vap))
      :              -zx_defau_diag(i,k,iq_vap)
      :              *deltap(i,k)/deltap(i,k-1)
-     :              *q(i,k-1,iqiso(ixt,iq_vap))/q_follow(i,k-1,iq_vap)
+     :              *q(i,k-1,iqIsoPha(ixt,iq_vap))
+     :              /q_follow(i,k-1,iq_vap)
 
               enddo !do ixt=1,niso
@@ -148,7 +154,5 @@
        enddo !do k=2,llm
 
-        if (ok_iso_verif) then     
-           call check_isotopes_seq(q,ip1jmp1,'qminimum 168')
-        endif !if (ok_iso_verif) then
+       call check_isotopes_seq(q,ip1jmp1,'qminimum 168')
         
       
@@ -160,12 +164,12 @@
 
               ! on ajoute eau liquide en k en k              
-              do ixt=1,ntraciso
-               q(i,k,iqiso(ixt,iq_liq))=q(i,k,iqiso(ixt,iq_liq))
+              do ixt=1,ntiso
+               q(i,k,iqIsoPha(ixt,iq_liq))=q(i,k,iqIsoPha(ixt,iq_liq))
      :              +zx_defau_diag(i,k,iq_liq)
-     :              *q(i,k,iqiso(ixt,iq_vap))/q_follow(i,k,iq_vap)
+     :              *q(i,k,iqIsoPha(ixt,iq_vap))/q_follow(i,k,iq_vap)
               ! et on la retranche à la vapeur en k
-               q(i,k,iqiso(ixt,iq_vap))=q(i,k,iqiso(ixt,iq_vap))
+               q(i,k,iqIsoPha(ixt,iq_vap))=q(i,k,iqIsoPha(ixt,iq_vap))
      :              -zx_defau_diag(i,k,iq_liq)
-     :              *q(i,k,iqiso(ixt,iq_vap))/q_follow(i,k,iq_vap)   
+     :              *q(i,k,iqIsoPha(ixt,iq_vap))/q_follow(i,k,iq_vap)   
               enddo !do ixt=1,niso
               q_follow(i,k,iq_liq)=   q_follow(i,k,iq_liq)
@@ -177,7 +181,5 @@
        enddo !do k=2,llm  
 
-        if (ok_iso_verif) then
-           call check_isotopes_seq(q,ip1jmp1,'qminimum 197')
-        endif !if (ok_iso_verif) then
+       call check_isotopes_seq(q,ip1jmp1,'qminimum 197')
 
       endif !if (niso > 0) then
Index: LMDZ6/trunk/libf/dyn3d/vlsplt.F
===================================================================
--- LMDZ6/trunk/libf/dyn3d/vlsplt.F	(revision 4124)
+++ LMDZ6/trunk/libf/dyn3d/vlsplt.F	(revision 4143)
@@ -125,5 +125,5 @@
       RECURSIVE SUBROUTINE vlx(q,pente_max,masse,u_m,iq)
       USE infotrac, ONLY : nqtot,tracers, ! CRisi
-     &                     qperemin,masseqmin,ratiomin ! MVals et CRisi
+     &                     min_qParent,min_qMass,min_ratio ! MVals et CRisi
 
 c     Auteurs:   P.Le Van, F.Hourdin, F.Forget 
@@ -428,9 +428,9 @@
             !Ratio(ij,l,iq2)=q(ij,l,iq2)/q(ij,l,iq)
             !Mvals: veiller a ce qu'on n'ait pas de denominateur nul
-            masseq(ij,l,iq2)=max(masse(ij,l,iq)*q(ij,l,iq),masseqmin)
-            if (q(ij,l,iq).gt.qperemin) then
+            masseq(ij,l,iq2)=max(masse(ij,l,iq)*q(ij,l,iq),min_qMass)
+            if (q(ij,l,iq).gt.min_qParent) then
               Ratio(ij,l,iq2)=q(ij,l,iq2)/q(ij,l,iq)
             else
-              Ratio(ij,l,iq2)=ratiomin
+              Ratio(ij,l,iq2)=min_ratio
             endif
           enddo   
@@ -449,5 +449,5 @@
          DO ij=iip2+1,ip1jm
             !MVals: veiller a ce qu'on ait pas de denominateur nul
-            new_m=max(masse(ij,l,iq)+u_m(ij-1,l)-u_m(ij,l),masseqmin)
+            new_m=max(masse(ij,l,iq)+u_m(ij-1,l)-u_m(ij,l),min_qMass)
             q(ij,l,iq)=(q(ij,l,iq)*masse(ij,l,iq)+
      &      u_mq(ij-1,l)-u_mq(ij,l))
@@ -485,5 +485,5 @@
       RECURSIVE SUBROUTINE vly(q,pente_max,masse,masse_adv_v,iq)
       USE infotrac, ONLY : nqtot,tracers, ! CRisi
-     &                     qperemin,masseqmin,ratiomin ! MVals et CRisi
+     &                     min_qParent,min_qMass,min_ratio ! MVals et CRisi
 c
 c     Auteurs:   P.Le Van, F.Hourdin, F.Forget 
@@ -752,9 +752,9 @@
             !Ratio(ij,l,iq2)=q(ij,l,iq2)/q(ij,l,iq)     
             !MVals: veiller a ce qu'on n'ait pas de denominateur nul
-            masseq(ij,l,iq2)=max(masse(ij,l,iq)*q(ij,l,iq),masseqmin)
-            if (q(ij,l,iq).gt.qperemin) then
+            masseq(ij,l,iq2)=max(masse(ij,l,iq)*q(ij,l,iq),min_qMass)
+            if (q(ij,l,iq).gt.min_qParent) then
               Ratio(ij,l,iq2)=q(ij,l,iq2)/q(ij,l,iq)
             else
-              Ratio(ij,l,iq2)=ratiomin
+              Ratio(ij,l,iq2)=min_ratio
             endif 
           enddo   
@@ -848,5 +848,5 @@
       RECURSIVE SUBROUTINE vlz(q,pente_max,masse,w,iq)
       USE infotrac, ONLY : nqtot,tracers, ! CRisi 
-     &                     qperemin,masseqmin,ratiomin ! MVals et CRisi
+     &                     min_qParent,min_qMass,min_ratio ! MVals et CRisi
 c
 c     Auteurs:   P.Le Van, F.Hourdin, F.Forget 
@@ -977,9 +977,9 @@
             !Ratio(ij,l,iq2)=q(ij,l,iq2)/q(ij,l,iq)        
             !MVals: veiller a ce qu'on n'ait pas de denominateur nul
-            masseq(ij,l,iq2)=max(masse(ij,l,iq)*q(ij,l,iq),masseqmin)
-            if (q(ij,l,iq).gt.qperemin) then
+            masseq(ij,l,iq2)=max(masse(ij,l,iq)*q(ij,l,iq),min_qMass)
+            if (q(ij,l,iq).gt.min_qParent) then
               Ratio(ij,l,iq2)=q(ij,l,iq2)/q(ij,l,iq)
             else
-              Ratio(ij,l,iq2)=ratiomin
+              Ratio(ij,l,iq2)=min_ratio
             endif      
           enddo   
