Index: LMDZ6/trunk/libf/dyn3d_common/infotrac.F90
===================================================================
--- LMDZ6/trunk/libf/dyn3d_common/infotrac.F90	(revision 4130)
+++ LMDZ6/trunk/libf/dyn3d_common/infotrac.F90	(revision 4143)
@@ -28,15 +28,9 @@
    PUBLIC :: isoName, isoZone, isoPhas                     !--- Isotopes and tagging zones names, phases
    PUBLIC :: niso,    nzone,   nphas,   ntiso              !---  " " numbers + isotopes & tagging tracers number
-   PUBLIC :: itZonIso, index_trac                          !--- idx "it" (in "isoName(1:niso)") = function(tagging idx, isotope idx)
-   PUBLIC :: iqTraPha, iqiso                               !--- idx "iq" (in "qx") = function(isotope idx, phase idx) + aliases
+   PUBLIC :: itZonIso                                      !--- idx "it" (in "isoName(1:niso)") = function(tagging idx, isotope idx)
+   PUBLIC :: iqIsoPha                                      !--- idx "iq" (in "qx") = function(isotope idx, phase idx) + aliases
    PUBLIC :: isoCheck                                      !--- Run isotopes checking routines
    !=== FOR BOTH TRACERS AND ISOTOPES
    PUBLIC :: getKey                                        !--- Get a key from "tracers" or "isotope"
-
-   !=== OLD QUANTITIES OR ALIASES FOR OLDER NAMES (TO BE REMOVED SOON)
-   PUBLIC :: ntraciso, ntraceurs_zone
-   PUBLIC :: ok_iso_verif, use_iso
-   PUBLIC :: iso_num, iso_indnum, indnum_fn_num, niso_possibles
-   PUBLIC :: qperemin, masseqmin, ratiomin
 
    INTERFACE isoSelect; MODULE PROCEDURE isoSelectByIndex, isoSelectByName; END INTERFACE isoSelect
@@ -101,5 +95,5 @@
 !  | zone   | nzone  | Geographic tagging zones   list + number         | / | ntraceurs_zone |                 |
 !  | phase  | nphas  | Phases                     list + number         |                    | [g][l][s], 1:3  |
-!  | iqTraPha        | Index in "qx"           = f(name(1:ntiso)),phas) | iqiso              | 1:nqtot         |
+!  | iqIsoPha        | Index in "qx"           = f(name(1:ntiso)),phas) | iqiso              | 1:nqtot         |
 !  | itZonIso        | Index in "trac(1:ntiso)"= f(zone, name(1:niso))  | index_trac         | 1:ntiso         |
 !  +-----------------+--------------------------------------------------+--------------------+-----------------+
@@ -131,17 +125,5 @@
                                              nphas, ntiso, &    !--- NUMBER OF PHASES AND ISOTOPES + ISOTOPIC TAGGING TRACERS
                                             itZonIso(:,:), &    !--- INDEX IN "isoTrac" AS f(tagging zone idx,  isotope idx)
-                                            iqTraPha(:,:)       !--- INDEX IN "qx"      AS f(isotopic tracer idx, phase idx)
-
-   !--- Aliases for older names + quantities to be removed soon
-   INTEGER,                 SAVE, POINTER ::  index_trac(:,:)   ! numero ixt en fn izone, indnum entre 1 et niso
-   INTEGER,                 SAVE, POINTER ::  iqiso(:,:)        ! donne indice iq en fn de (ixt,phase) 
-   INTEGER,                 SAVE, POINTER :: ntraciso, ntraceurs_zone
-   REAL,    SAVE :: qperemin, masseqmin, ratiomin
-   INTEGER, SAVE :: niso_possibles
-   LOGICAL, SAVE :: ok_iso_verif
-   LOGICAL, SAVE, ALLOCATABLE ::       use_iso(:)
-   INTEGER, SAVE, ALLOCATABLE ::       iso_num(:)               !--- idx in [1,niso_possibles] = f(1<=iq <=nqtot)
-   INTEGER, SAVE, ALLOCATABLE ::    iso_indnum(:)               !--- idx in [1,niso]           = f(1<=iq <=nqtot)
-   INTEGER, SAVE, ALLOCATABLE :: indnum_fn_num(:)               !--- idx in [1,niso]           = f(1<=idx<=niso_possibles)
+                                            iqIsoPha(:,:)       !--- INDEX IN "qx"      AS f(isotopic tracer idx, phase idx)
 
    !=== VARIABLES FOR ISOTOPES INITIALIZATION AND FOR INCA
@@ -359,5 +341,5 @@
    DEALLOCATE(tnom_0, tnom_transp)
 #ifdef INCA
-   DEALLOCATE(hadv_inca, vadv_inca, solsym_inca)
+   DEALLOCATE(hadv_inca, vadv_inca, conv_flg_inca, pbl_flg_inca, solsym_inca)
 #endif
 
@@ -377,10 +359,7 @@
       nqtrue = nbtr + nqo                                            !--- Total number of "true" tracers
       IF(ALL([2,3] /= nqo)) CALL abort_gcm(modname, 'Only 2 or 3 water phases allowed ; found nqo='//TRIM(int2str(nqo)), 1)
-      ALLOCATE(hadv(nqtrue), conv_flg(nbtr), hadv_inca(nqINCA), conv_flg_inca(nqINCA), solsym_inca(nqINCA))
-      ALLOCATE(vadv(nqtrue),  pbl_flg(nbtr), vadv_inca(nqINCA),  pbl_flg_inca(nqINCA))
+      ALLOCATE(hadv(nqtrue), hadv_inca(nqINCA), conv_flg_inca(nqINCA), solsym_inca(nqINCA))
+      ALLOCATE(vadv(nqtrue), vadv_inca(nqINCA),  pbl_flg_inca(nqINCA))
       CALL init_transport(solsym_inca, conv_flg_inca, pbl_flg_inca, hadv_inca, vadv_inca)
-      !--- Passive CO2 tracer is at position 1 because: H2O has been removed ; nqCO2/=0 in "inco" case only
-      conv_flg(1:nbtr) = [(1,          k=1, nqCO2), conv_flg_inca]
-       pbl_flg(1:nbtr) = [(1,          k=1, nqCO2),  pbl_flg_inca]
       ALLOCATE(ttr(nqtrue))
       ttr(1:nqo+nqCO2)                    = tracers
@@ -407,7 +386,4 @@
       lerr = getKey('hadv', hadv, ky=tracers(:)%keys)
       lerr = getKey('vadv', vadv, ky=tracers(:)%keys)
-      ALLOCATE(conv_flg(nbtr), pbl_flg(nbtr))
-      conv_flg(1:nbtr) = [(1, it=1, nbtr)]                           !--- Convection activated for all tracers
-       pbl_flg(1:nbtr) = [(1, it=1, nbtr)]                           !--- Boundary layer activated for all tracers
    !---------------------------------------------------------------------------------------------------------------------------
    END IF
@@ -531,14 +507,4 @@
    nbtr    = nbtr -nqo*   ntiso             !--- ISOTOPIC TAGGING TRACERS ARE NOT PASSED TO THE PHYSICS
    nqtottr = nqtot-nqo*(1+ntiso)            !--- NO H2O-FAMILY    TRACER  IS      PASSED TO THE PHYSICS
-
-   ALLOCATE(conv_flg(nbtr), pbl_flg(nbtr))
-#ifndef INCA
-   conv_flg(1:nbtr) = 1                                              !--- Convection activated for all tracers
-    pbl_flg(1:nbtr) = 1                                              !--- Boundary layer activated for all tracers
-#else
-   !--- Passive CO2 tracer is at position 1 because: H2O has been removed ; nqCO2/=0 in "inco" case only
-   conv_flg(1:nbtr) = [(1, ic=1, nqCO2),conv_flg_inca]
-    pbl_flg(1:nbtr) = [(1, ic=1, nqCO2), pbl_flg_inca]
-#endif
 
 ELSE
@@ -578,16 +544,11 @@
 END IF
 
+   !--- Convection / boundary layer activation for all tracers
+   ALLOCATE(conv_flg(nbtr)); conv_flg(1:nbtr) = 1
+   ALLOCATE( pbl_flg(nbtr));  pbl_flg(1:nbtr) = 1
+
    !--- Note: nqtottr can differ from nbtr when nmom/=0
 !   IF(COUNT(tracers%iso_iName == 0) - COUNT(delPhase(tracers%name) == 'H2O' .AND. tracers%component == 'lmdz') /= nqtottr) &
 !      CALL abort_gcm('infotrac_init', 'pb dans le calcul de nqtottr', 1)
-
-   !--- Some aliases to be removed later
-   ntraciso       => ntiso
-   ntraceurs_zone => nzone
-   qperemin       =  min_qParent
-   masseqmin      =  min_qMass
-   ratiomin       =  min_ratio
-   iqiso          => iqTraPha
-   index_trac     => itZonIso
 
    !=== DISPLAY THE RESULTS
@@ -704,5 +665,5 @@
    USE readTracFiles_mod, ONLY: tnom_iso => newH2OIso
    IMPLICIT NONE
-   INTEGER, ALLOCATABLE  :: nb_iso(:), nb_tiso(:), nb_zone(:), ix(:)
+   INTEGER, ALLOCATABLE  :: nb_iso(:), nb_tiso(:), nb_zone(:), ix(:), iy(:)
    INTEGER               :: ii, ip, iq, it, iz, ixt
    TYPE(isot_type), POINTER :: i
@@ -765,10 +726,9 @@
    END DO
 
-   niso_possibles = SIZE(tnom_iso)
-!   ix = strIdx(tnom_iso, i%trac)
-!   tnat        = tnat0       (PACK(ix, MASK=ix/=0))
-!   alpha_ideal = alpha_ideal0(PACK(ix, MASK=ix/=0))
-   tnat        = tnat0
-   alpha_ideal = alpha_ideal0
+   !--- Get vectors, one value each "isotope%trac" element (and in the same order)
+   ix = strIdx(tnom_iso, i%trac)
+   iy =   PACK(ix, MASK = ix/=0)
+   tnat        = tnat0       (iy)
+   alpha_ideal = alpha_ideal0(iy)
 
    !--- Tests
@@ -786,19 +746,11 @@
 
    !--- Table: index in "qx(:)" of an isotope, knowing its indices "it","ip" in "isotope%iName,%iPhase"
-   i%iqTraPha = RESHAPE([((strIdx(t%name, TRIM(addPhase(i%trac(it),ip,i%phase))),it=1,i%ntiso),ip=1,i%nphas)],[i%ntiso,i%nphas])
+   i%iqIsoPha = RESHAPE([((strIdx(t%name, TRIM(addPhase(i%trac(it),ip,i%phase))),it=1,i%ntiso),ip=1,i%nphas)],[i%ntiso,i%nphas])
 
    !--- Table: index in "isotope%tracs(:)%name" of an isotopic tagging tracer, knowing its indices "iz","ip" in "isotope%iZone,%iName"
    i%itZonIso = RESHAPE([((strIdx(i%trac,TRIM(i%trac(it))//'_'//TRIM(i%zone(iz))),iz=1,i%nzone),it=1,i%niso )],[i%nzone,i%niso])
 
-   DO it=1,i%ntiso; CALL msg('iqTraPha('//TRIM(int2str(it))//',:) = '//strStack(int2str(i%iqTraPha(it,:))), modname); END DO
+   DO it=1,i%ntiso; CALL msg('iqIsoPha('//TRIM(int2str(it))//',:) = '//strStack(int2str(i%iqIsoPha(it,:))), modname); END DO
    DO iz=1,i%nzone; CALL msg('itZonIso('//TRIM(int2str(iz))//',:) = '//strStack(int2str(i%itZonIso(iz,:))), modname); END DO
-
-   !--- Isotopic quantities (to be removed soon)
-   ok_iso_verif  = i%check
-   niso_possibles = SIZE(tnom_iso)
-   iso_num       = [(strIdx(tnom_iso(:),    strHead(delPhase(tracers(iq)%name), '_')), iq=1, nqtot)]
-   iso_indnum    = [(strIdx(i%keys(:)%name, strHead(delPhase(tracers(iq)%name), '_')), iq=1, nqtot)]
-   indnum_fn_num = [(strIdx(i%keys(:)%name, tnom_iso(ixt)), ixt=1, niso_possibles)]
-   use_iso       = indnum_fn_num /= 0            !--- .TRUE. for the effectively used isotopes of the possible isotopes list
 
    !--- Finalize :
@@ -845,5 +797,5 @@
    isoPhas  => isotope%phase;    nphas    => isotope%nphas
    itZonIso => isotope%itZonIso; isoCheck => isotope%check
-   iqTraPha => isotope%iqTraPha
+   iqIsoPha => isotope%iqIsoPha
 END FUNCTION isoSelectByIndex
 !==============================================================================================================================
