Index: /LMDZ6/branches/Amaury_dev/libf/dyn3d_common/lmdz_infotrac.F90
===================================================================
--- /LMDZ6/branches/Amaury_dev/libf/dyn3d_common/lmdz_infotrac.F90	(revision 5230)
+++ /LMDZ6/branches/Amaury_dev/libf/dyn3d_common/lmdz_infotrac.F90	(revision 5230)
@@ -0,0 +1,397 @@
+MODULE lmdz_infotrac
+
+  USE       lmdz_strings, ONLY: msg, fmsg, maxlen, cat, dispTable, int2str, bool2str, strStack, strParse, strCount
+  USE lmdz_readTracFiles, ONLY: readTracersFiles, maxTableWidth, isot_type, addPhase, addKey, iH2O, &
+          indexUpdate, trac_type, testTracersFiles, processIsotopes, tracers, delPhase, getKey, tran0, &
+          isoKeys, isoName, isoZone, isoPhas, isoSelect, itZonIso, nbIso, isotope, &
+          niso, ntiso, nzone, nphas, iqIsoPha, ixIso, isoCheck
+  USE lmdz_readTracFiles, ONLY: new2oldH2O, newHNO3, oldHNO3
+
+  IMPLICIT NONE; PRIVATE
+
+  !=== FOR TRACERS:
+  PUBLIC :: init_infotrac                                 !--- Initialization of the tracers
+  PUBLIC :: tracers, type_trac                            !--- Full tracers database, tracers type keyword
+  PUBLIC :: nqtot, nbtr, nqo, nqCO2, nqtottr      !--- Main dimensions
+  PUBLIC :: conv_flg, pbl_flg                             !--- Convection & boundary layer activation keys
+  PUBLIC :: new2oldH2O, newHNO3, oldHNO3                  !--- For backwards compatibility in dynetat0
+  PUBLIC :: addPhase, delPhase                            !--- Add/remove the phase from the name of a tracer
+
+
+  !=== FOR ISOTOPES: General
+  PUBLIC :: isot_type, nbIso                              !--- Derived type, full isotopes families database + nb of families
+  PUBLIC :: isoSelect, ixIso                              !--- Isotopes family selection tool + selected family index
+  !=== FOR ISOTOPES: Specific to water
+  PUBLIC :: iH2O                                          !--- Value of "ixIso" for "H2O" isotopes class
+  PUBLIC :: min_qParent, min_qMass, min_ratio             !--- Min. values for various isotopic quantities
+  !=== FOR ISOTOPES: Depending on the selected isotopes family
+  PUBLIC :: isotope                                       !--- Selected isotopes database (argument of getKey)
+  PUBLIC :: isoKeys, isoName, isoZone, isoPhas            !--- Isotopes keys & names, tagging zones names, phases
+  PUBLIC :: niso, ntiso, nzone, nphas            !--- Number of   "   "
+  PUBLIC :: itZonIso                                      !--- Index "it" in "isoName(1:niso)" = f(tagging idx, isotope idx)
+  PUBLIC :: iqIsoPha                                      !--- Index "iq" in "qx"              = f(isotope idx,   phase idx)
+  PUBLIC :: isoCheck                                      !--- Run isotopes checking routines
+  !=== FOR BOTH TRACERS AND ISOTOPES
+  PUBLIC :: getKey                                        !--- Get a key from "tracers" or "isotope"
+
+  !=== CONVENTIONS FOR TRACERS NUMBERS:
+  !  |--------------------+-----------------------+-----------------+---------------+----------------------------|
+  !  | water in different |    water tagging      |  water isotopes | other tracers | additional tracers moments |
+  !  | phases: H2O_[glsrb]|      isotopes         |                 |               |  for higher order schemes  |
+  !  |--------------------+-----------------------+-----------------+---------------+----------------------------|
+  !  |                    |                       |                 |               |                            |
+  !  |<--     nqo      -->|<-- nqo*niso* nzone -->|<-- nqo*niso  -->|<--  nbtr   -->|<--        (nmom)        -->|
+  !  |                    |                                         |                                            |
+  !  |                    |<-- nqo*niso*(nzone+1)  =   nqo*ntiso -->|<--    nqtottr = nbtr + nmom             -->|
+  !  |                                                                              = nqtot - nqo*(ntiso+1)      |
+  !  |                                                                                                           |
+  !  |<--                        nqtrue  =  nbtr + nqo*(ntiso+1)                 -->|                            |
+  !  |                                                                                                           |
+  !  |<--                        nqtot   =  nqtrue + nmom                                                     -->|
+  !  |                                                                                                           |
+  !  |-----------------------------------------------------------------------------------------------------------|
+  !  NOTES FOR THIS TABLE:
+  !  * Used "niso", "nzone" and "ntiso" are components of "isotopes(ip)" for water (isotopes(ip)%parent == 'H2O'),
+  !    since water is so far the sole tracers family, except passive CO2, removed from the main tracers table.
+  !  * For water, "nqo" is equal to the more general field "isotopes(ip)%nphas".
+  !  * "niso", "nzone", "ntiso", "nphas" are defined for other isotopic tracers families, if any.
+
+  !=== DERIVED TYPE EMBEDDING MOST OF THE TRACERS-RELATED QUANTITIES (LENGTH: nqtot)
+  !    Each entry is accessible using "%" sign.
+  !  |-------------+------------------------------------------------------+-------------+------------------------+
+  !  |  entry      | Meaning                                              | Former name | Possible values        |
+  !  |-------------+------------------------------------------------------+-------------+------------------------+
+  !  | name        | Name (short)                                         | tname       |                        |
+  !  | keys        | key/val pairs accessible with "getKey" routine       | /           |                        |
+  !  | gen0Name    | Name of the 1st generation ancestor                  | /           |                        |
+  !  | parent      | Name of the parent                                   | /           |                        |
+  !  | longName    | Long name (with adv. scheme suffix) for outputs      | ttext       |                        |
+  !  | type        | Type (so far: tracer or tag)                         | /           | tracer,tag             |
+  !  | phase       | Phases list ("g"as / "l"iquid / "s"olid              |             | [g|l|s|r|b]            |
+  !  |             |              "r"(cloud) / "b"lowing)                 | /           |                        |
+  !  | component   | Name(s) of the merged/cumulated section(s)           | /           | coma-separated names   |
+  !  | iGeneration | Generation (>=1)                                     | /           |                        |
+  !  | iqParent    | Index of the parent tracer                           | iqpere      | 1:nqtot                |
+  !  | iqDescen    | Indexes of the childs       (all generations)        | iqfils      | 1:nqtot                |
+  !  | nqDescen    | Number of the descendants   (all generations)        | nqdesc      | 1:nqtot                |
+  !  | nqChildren  | Number of childs            (1st generation only)    | nqfils      | 1:nqtot                |
+  !  | keys        | key/val pairs accessible with "getKey" routine       | /           |                        |
+  !  | iadv        | Advection scheme number                              | iadv        | 1,2,10-20(exc.15,19),30|
+  !  | isAdvected  | Advected tracers flag (.TRUE. if iadv >= 0)          | /           | nqtrue  .TRUE. values  |
+  !  | isInPhysics | Tracers not extracted from the main table in physics | /           | nqtottr .TRUE. values  |
+  !  | iso_iGroup  | Isotopes group index in isotopes(:)                  | /           | 1:nbIso                |
+  !  | iso_iName   | Isotope  name  index in isotopes(iso_iGroup)%trac(:) | iso_indnum  | 1:niso                 |
+  !  | iso_iZone   | Isotope  zone  index in isotopes(iso_iGroup)%zone(:) | zone_num    | 1:nzone                |
+  !  | iso_iPhas   | Isotope  phase index in isotopes(iso_iGroup)%phas(:) | phase_num   | 1:nphas                |
+  !  +-------------+------------------------------------------------------+-------------+------------------------+
+
+  !=== DERIVED TYPE EMBEDDING MOST OF THE ISOTOPES-RELATED QUANTITIES (LENGTH: nbIso, NUMBER OF ISOTOPES FAMILIES)
+  !    Each entry is accessible using "%" sign.
+  !  |-----------------+--------------------------------------------------+--------------------+-----------------+
+  !  |  entry | length | Meaning                                          |    Former name     | Possible values |
+  !  |-----------------+--------------------------------------------------+--------------------+-----------------+
+  !  | parent          | Parent tracer (isotopes family name)             |                    |                 |
+  !  | keys   | niso   | Isotopes keys/values pairs list + number         |                    |                 |
+  !  | trac   | ntiso  | Isotopes + tagging tracers list + number         | / | ntraciso       |                 |
+  !  | zone   | nzone  | Geographic tagging zones   list + number         | / | ntraceurs_zone |                 |
+  !  | phase  | nphas  | Phases                     list + number         |                    | [g|l|s|r|b] 1:5 |
+  !  | 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         |
+  !  +-----------------+--------------------------------------------------+--------------------+-----------------+
+
+  REAL, PARAMETER :: min_qParent = 1.e-30, min_qMass = 1.e-18, min_ratio = 1.e-16 ! MVals et CRisi
+
+  !=== DIMENSIONS OF THE TRACERS TABLES AND OTHER SCALAR VARIABLES
+  INTEGER, SAVE :: nqtot, &                     !--- Tracers nb in dynamics (incl. higher moments + H2O)
+          nbtr, &                     !--- Tracers nb in physics  (excl. higher moments + H2O)
+          nqo, &                     !--- Number of water phases
+          nqtottr, &                    !--- Number of tracers passed to phytrac (TO BE DELETED ?)
+          nqCO2                         !--- Number of tracers of CO2  (ThL)
+  CHARACTER(LEN = maxlen), SAVE :: type_trac                     !--- Keyword for tracers type(s)
+
+  !=== VARIABLES FOR INCA
+  INTEGER, DIMENSION(:), SAVE, ALLOCATABLE :: &
+          conv_flg, pbl_flg                           !--- Convection / boundary layer activation (nbtr)
+
+CONTAINS
+
+  SUBROUTINE init_infotrac
+    USE control_mod, ONLY: planet_type
+#ifdef CPP_PARA
+    USE parallel_lmdz, ONLY: is_master
+#endif
+    USE lmdz_reprobus_wrappers, ONLY: init_chem_rep_trac
+    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_STRATAER, CPPKEY_REPROBUS
+    USE lmdz_iniprint, ONLY: lunout, prt_level
+    USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
+
+    IMPLICIT NONE
+    !==============================================================================================================================
+
+    !   Auteur:  P. Le Van /L. Fairhead/F.Hourdin
+    !   -------
+
+    !   Modifications:
+    !   --------------
+    !   05/94: F.Forget      Modif special traceur
+    !   02/02: M-A Filiberti Lecture de traceur.def
+    !   01/22: D. Cugnet     Nouveaux tracer.def et tracer_*.def + encapsulation (types trac_type et isot_type)
+
+    !   Objet:
+    !   ------
+    !   GCM LMD nouvelle grille
+
+    !==============================================================================================================================
+    !   ... modification de l'integration de q ( 26/04/94 ) ....
+    !------------------------------------------------------------------------------------------------------------------------------
+    ! Declarations:
+
+
+    !------------------------------------------------------------------------------------------------------------------------------
+    ! Local variables
+    INTEGER, ALLOCATABLE :: hadv(:), vadv(:)                          !--- Horizontal/vertical transport scheme number
+    INTEGER, ALLOCATABLE :: had (:), hadv_inca(:), conv_flg_inca(:), &!--- Variables specific to INCA
+            vad (:), vadv_inca(:), pbl_flg_inca(:)
+    CHARACTER(LEN = 8), ALLOCATABLE :: solsym_inca(:)                   !--- Tracers names for INCA
+    INTEGER :: nqINCA
+#ifndef CPP_PARA
+    LOGICAL :: is_master = .TRUE.
+#endif
+    CHARACTER(LEN = 2) :: suff(9)                                     !--- Suffixes for schemes of order 3 or 4 (Prather)
+    CHARACTER(LEN = 3) :: descrq(30)                                  !--- Advection scheme description tags
+    CHARACTER(LEN = maxlen) :: msg1, texp, ttp, nam, val              !--- Strings for messages and expanded tracers type
+    INTEGER :: fType                                                  !--- Tracers description file type ; 0: none
+    !--- 1/2/3: "traceur.def"/"tracer.def"/"tracer_*.def"
+    INTEGER :: nqtrue                                                 !--- Tracers nb from tracer.def (no higher order moments)
+    INTEGER :: iad                                                    !--- Advection scheme number
+    INTEGER :: iq, jq, nt, im, nm, ig                                 !--- Indexes and temporary variables
+    LOGICAL :: lerr, ll
+    TYPE(trac_type), ALLOCATABLE, TARGET :: ttr(:)
+    TYPE(trac_type), POINTER :: t1, t(:)
+    CHARACTER(LEN = maxlen), ALLOCATABLE :: types_trac(:)             !--- Keywords for tracers type(s), parsed version
+    CHARACTER(LEN = *), PARAMETER :: modname = "init_infotrac"
+    !------------------------------------------------------------------------------------------------------------------------------
+    ! Initialization :
+    !------------------------------------------------------------------------------------------------------------------------------
+    suff = ['x ', 'y ', 'z ', 'xx', 'xy', 'xz', 'yy', 'yz', 'zz']
+    descrq(1:30) = '   '
+    descrq(1:2) = ['LMV', 'BAK']
+    descrq(10:20) = ['VL1', 'VLP', 'FH1', 'FH2', 'VLH', '   ', 'PPM', 'PPS', 'PPP', '   ', 'SLP']
+    descrq(30) = 'PRA'
+
+    CALL msg('type_trac = "' // TRIM(type_trac) // '"', modname, is_master)
+    IF(strCount(type_trac, '|', nt)) CALL abort_gcm(modname, 'Could''nt parse the "type_trac" string with delimiter "|"', 1)
+    IF(nt >= 3) CALL abort_gcm(modname, 'you need to modify type_trac, this version is not supported by lmdz', 1)
+    IF(strParse(type_trac, '|', types_trac, n = nt)) CALL abort_gcm(modname, "couldn't parse " // '"type_trac"', 1)
+    IF(nt == 2) type_trac = types_trac(2) ! TO BE DELETED SOON
+
+    CALL msg('type_trac = "' // TRIM(type_trac) // '"', modname)
+
+    !##############################################################################################################################
+    IF(is_master) THEN                                                !=== SKIPED IF ALREADY DONE
+    !##############################################################################################################################
+    !--- MESSAGE ABOUT THE CHOSEN CONFIGURATION
+    msg1 = 'For type_trac = "' // TRIM(type_trac) // '":'
+    SELECT CASE(type_trac)
+    CASE('inca'); CALL msg(TRIM(msg1) // ' coupling with INCA chemistry model', modname)
+    CASE('inco'); CALL msg(TRIM(msg1) // ' coupling jointly with INCA and CO2 cycle', modname)
+    CASE('repr'); CALL msg(TRIM(msg1) // ' coupling with REPROBUS chemistry model', modname)
+    CASE('co2i'); CALL msg(TRIM(msg1) // ' you have chosen to run with CO2 cycle', modname)
+    CASE('coag'); CALL msg(TRIM(msg1) // ' tracers are treated for COAGULATION tests', modname)
+    CASE('lmdz'); CALL msg(TRIM(msg1) // ' tracers are treated in LMDZ only', modname)
+    CASE DEFAULT; CALL abort_gcm(modname, 'type_trac=' // TRIM(type_trac) // ' not possible yet.', 1)
+    END SELECT
+
+    !--- COHERENCE TEST BETWEEN "type_trac" AND PREPROCESSING KEYS
+    SELECT CASE(type_trac)
+    CASE('inca', 'inco')
+      IF (.NOT. CPPKEY_INCA) THEN
+        CALL abort_gcm(modname, 'You must add cpp key INCA and compile with INCA code', 1)
+      END IF
+    CASE('repr')
+      IF (.NOT. CPPKEY_REPROBUS) THEN
+        CALL abort_gcm(modname, 'You must add cpp key REPROBUS and compile with REPROBUS code', 1)
+      END IF
+    CASE('coag')
+      IF (.NOT. CPPKEY_STRATAER) THEN
+        CALL abort_gcm(modname, 'You must add cpp key StratAer and compile with StratAer code', 1)
+      END IF
+    END SELECT
+
+    !##############################################################################################################################
+    END IF
+    !##############################################################################################################################
+
+    !==============================================================================================================================
+    ! 0) DETERMINE THE TYPE OF THE INPUT TRACERS DESCRIPTION FILE AND READ IT
+    !==============================================================================================================================
+    texp = type_trac                                                  !=== EXPANDED (WITH "|" SEPARATOR) "type_trac"
+    IF(texp == 'inco') texp = 'co2i|inca'
+    IF(texp /= 'lmdz') texp = 'lmdz|' // TRIM(texp)
+    IF(testTracersFiles(modname, texp, fType, .TRUE.)) CALL abort_gcm(modname, 'problem with tracers file(s)', 1)
+    ttp = type_trac; IF(fType /= 1) ttp = texp
+       !---------------------------------------------------------------------------------------------------------------------------
+   IF(fType == 0) CALL abort_gcm(modname, 'Missing "traceur.def", "tracer.def" or "tracer_<keyword>.def tracers file.',1)
+   !---------------------------------------------------------------------------------------------------------------------------
+   IF(fType == 1 .AND. ANY(['inca', 'inco'] == type_trac)) &                   !=== FOUND OLD STYLE INCA "traceur.def"
+      CALL abort_gcm(modname, 'retro-compatibility with old-style INCA traceur.def files has been disabled.', 1)
+   !---------------------------------------------------------------------------------------------------------------------------
+
+   IF(readTracersFiles(ttp, lRepr=type_trac == 'repr')) CALL abort_gcm(modname, 'problem with tracers file(s)',1)
+    !==============================================================================================================================
+    ! 1) Get various numbers: "nqtrue" (first order only tracers), "nqo" (water phases), 'nbtr' (tracers passed to physics), etc.
+    !==============================================================================================================================
+      nqtrue = SIZE(tracers)                                                                               !--- "true" tracers
+      nqo = COUNT(tracers(:)%component == 'lmdz' .AND. delPhase(tracers(:)%name)     == 'H2O')     !--- Water phases
+      nbtr = nqtrue - COUNT(tracers(:)%component == 'lmdz' .AND. delPhase(tracers(:)%gen0Name) == 'H2O')     !--- Passed to phytrac
+      nqCO2 = COUNT([type_trac == 'inco', type_trac == 'co2i'])
+      IF (CPPKEY_INCA) THEN
+        nqINCA = COUNT(tracers(:)%component == 'inca')
+      END IF
+    IF (CPPKEY_REPROBUS) THEN
+      CALL init_chem_rep_trac(nbtr, nqo, tracers(:)%name)                         !--- Transfert the number of tracers to Reprobus
+    END IF
+
+    !==============================================================================================================================
+    ! 2) Calculate nqtot, number of tracers needed (greater if advection schemes 20 or 30 have been chosen).
+    !==============================================================================================================================
+    IF(getKey('hadv', hadv, ky = tracers(:)%keys)) CALL abort_gcm(modname, 'missing key "hadv"', 1)
+    IF(getKey('vadv', vadv, ky = tracers(:)%keys)) CALL abort_gcm(modname, 'missing key "vadv"', 1)
+    DO iq = 1, nqtrue
+      IF(hadv(iq)<20 .OR. (ANY(hadv(iq)==[20, 30]) .AND. hadv(iq)==vadv(iq))) CYCLE
+      WRITE(msg1, '("The choice hadv=",i0,", vadv=",i0,a)')hadv(iq), vadv(iq), ' for "' // TRIM(tracers(iq)%name) // '" is not available'
+      CALL abort_gcm(modname, TRIM(msg1), 1)
+    END DO
+    nqtot = COUNT(hadv< 20 .AND. vadv< 20) &                     !--- No additional tracer
+            + 4 * COUNT(hadv==20 .AND. vadv==20) &                     !--- 3  additional tracers
+            + 10 * COUNT(hadv==30 .AND. vadv==30)                       !--- 9  additional tracers
+
+    !--- More tracers due to the choice of advection scheme => assign total number of tracers
+    IF(nqtot /= nqtrue) THEN
+      CALL msg('The choice of advection scheme for one or more tracers makes it necessary to add tracers')
+      CALL msg('The number of true tracers is ' // TRIM(int2str(nqtrue)))
+      CALL msg('The total number of tracers needed is ' // TRIM(int2str(nqtot)))
+    END IF
+
+    !==============================================================================================================================
+    ! 3) Determine the advection scheme choice for water and tracers "iadv" and the fields long name, isAdvected.
+    !     iadv = 1    "LMDZ-specific humidity transport" (for H2O vapour)          LMV
+    !     iadv = 2    backward                           (for H2O liquid)          BAK
+    !     iadv = 14   Van-Leer + specific humidity, modified by Francis Codron     VLH
+    !     iadv = 10   Van-Leer (chosen for vapour and liquid water)                VL1
+    !     iadv = 11   Van-Leer for hadv and PPM version (Monotonic) for vadv       VLP
+    !     iadv = 12   Frederic Hourdin I                                           FH1
+    !     iadv = 13   Frederic Hourdin II                                          FH2
+    !     iadv = 16   Monotonic         PPM (Collela & Woodward 1984)              PPM
+    !     iadv = 17   Semi-monotonic    PPM (overshoots allowed)                   PPS
+    !     iadv = 18   Definite positive PPM (overshoots and undershoots allowed)   PPP
+    !     iadv = 20   Slopes                                                       SLP
+    !     iadv = 30   Prather                                                      PRA
+
+    !        In array q(ij,l,iq) : iq = 1/2[/3]    for vapour/liquid[/ice] water
+    !        And optionaly:        iq = 3[4],nqtot for other tracers
+    !==============================================================================================================================
+    ALLOCATE(ttr(nqtot))
+    jq = nqtrue + 1; tracers(:)%iadv = -1
+    DO iq = 1, nqtrue
+      t1 => tracers(iq)
+
+      !--- VERIFY THE CHOICE OF ADVECTION SCHEME
+      iad = -1
+      IF(hadv(iq)     ==    vadv(iq)) iad = hadv(iq)
+      IF(hadv(iq)==10 .AND. vadv(iq)==16) iad = 11
+      WRITE(msg1, '("Bad choice of advection scheme for ",a,": hadv = ",i0,", vadv = ",i0)')TRIM(t1%name), hadv(iq), vadv(iq)
+      IF(iad == -1) CALL abort_gcm(modname, msg1, 1)
+
+      !--- SET FIELDS longName, iadv, isAdvected, isInPhysics
+      t1%longName = t1%name; IF(iad > 0) t1%longName = TRIM(t1%name) // descrq(iad)
+      t1%iadv = iad
+      t1%isAdvected = iad >= 0
+      t1%isInPhysics = delPhase(t1%gen0Name) /= 'H2O' .OR. t1%component /= 'lmdz' !=== MORE EXCEPTIONS ? CO2i, SURSAT CLOUD H2O
+      ttr(iq) = t1
+
+      !--- DEFINE THE HIGHER ORDER TRACERS, IF ANY
+      nm = 0
+      IF(iad == 20) nm = 3                                           !--- 2nd order scheme
+      IF(iad == 30) nm = 9                                           !--- 3rd order scheme
+      IF(nm == 0) CYCLE                                              !--- No higher moments
+      ttr(jq + 1:jq + nm) = t1
+      ttr(jq + 1:jq + nm)%name = [ (TRIM(t1%name) // '-' // TRIM(suff(im)), im = 1, nm) ]
+      ttr(jq + 1:jq + nm)%gen0Name = [ (TRIM(t1%name) // '-' // TRIM(suff(im)), im = 1, nm) ]
+      ttr(jq + 1:jq + nm)%parent = [ (TRIM(t1%parent) // '-' // TRIM(suff(im)), im = 1, nm) ]
+      ttr(jq + 1:jq + nm)%longName = [ (TRIM(t1%longName) // '-' // TRIM(suff(im)), im = 1, nm) ]
+      ttr(jq + 1:jq + nm)%iadv = [ (-iad, im = 1, nm) ]
+      ttr(jq + 1:jq + nm)%isAdvected = [ (.FALSE., im = 1, nm) ]
+      jq = jq + nm
+    END DO
+    DEALLOCATE(hadv, vadv)
+    CALL MOVE_ALLOC(FROM = ttr, TO = tracers)
+
+    !--- SET FIELDS iqParent, iqDescen, nqDescen, nqChildren
+    IF(indexUpdate(tracers)) CALL abort_gcm(modname, 'problem with tracers indices update', 1)
+
+    !=== TEST ADVECTION SCHEME
+    DO iq = 1, nqtot ; t1 => tracers(iq)
+    iad = t1%iadv
+    ig = t1%iGeneration
+    nam = t1%name
+    val = 'iadv=' // TRIM(int2str(iad))
+
+    !--- ONLY TESTED VALUES FOR TRACERS FOR NOW:               iadv = 14, 10 (and 0 for non-transported tracers)
+    IF(ALL([10, 14, 0] /= iad)) CALL abort_gcm(modname, TRIM(val) // ' has not been tested yet ; 10 or 14 only are allowed !', 1)
+
+    !--- ONLY TESTED VALUES SO FAR FOR PARENTS HAVING CHILDREN: iadv = 14, 10 (PARENTS: TRACERS OF GENERATION 0)
+    IF(ALL([10, 14] /= iad) .AND. ig == 0 .AND. ANY(tracers(:)%parent==nam)) &
+            CALL abort_gcm(modname, TRIM(val) // ' is not implemented for parents ; 10 or 14 only are allowed !', 1)
+
+    !--- ONLY TESTED VALUES SO FAR FOR DESCENDANTS (TRACERS OF GENERATION > 0): iadv = 10 ; WATER VAPOUR: iadv = 14
+    lerr = iad /= 10 .AND. ig > 0;                     IF(lerr) tracers(iq)%iadv = 10
+    CALL msg('WARNING! ' // TRIM(val) // ' not implemented for children. Setting iadv=10 for "' // TRIM(nam) // '"', modname, lerr)
+    lerr = iad == 14 .AND. nam /= addPhase('H2O', 'g'); IF(lerr) tracers(iq)%iadv = 10
+    CALL msg('WARNING! ' // TRIM(val) // ' is valid for water vapour only. Setting iadv=10 for "' // TRIM(nam) // '"', modname, lerr)
+    END DO
+
+    !=== READ PHYSICAL PARAMETERS FOR ISOTOPES ; DONE HERE BECAUSE dynetat0 AND iniacademic NEED "tnat" AND "alpha_ideal"
+    niso = 0; nzone = 0; nphas = nqo; ntiso = 0; isoCheck = .FALSE.
+    IF(processIsotopes()) CALL abort_gcm(modname, 'problem when processing isotopes parameters', 1)
+
+    !--- Convection / boundary layer activation for all tracers
+    IF(.NOT.ALLOCATED(conv_flg)) ALLOCATE(conv_flg(nbtr)); conv_flg(1:nbtr) = 1
+    IF(.NOT.ALLOCATED(pbl_flg)) ALLOCATE(pbl_flg(nbtr));  pbl_flg(1:nbtr) = 1
+
+    !--- Note: nqtottr can differ from nbtr when nmom/=0
+    nqtottr = nqtot - COUNT(delPhase(tracers%gen0Name) == 'H2O' .AND. tracers%component == 'lmdz')
+    IF(COUNT(tracers%iso_iName == 0) - COUNT(delPhase(tracers%name) == 'H2O' .AND. tracers%component == 'lmdz') /= nqtottr) &
+            CALL abort_gcm(modname, 'problem with the computation of nqtottr', 1)
+
+    !=== DISPLAY THE RESULTS
+    IF(.NOT.is_master) RETURN
+    CALL msg('nqo    = ' // TRIM(int2str(nqo)), modname)
+    CALL msg('nbtr   = ' // TRIM(int2str(nbtr)), modname)
+    CALL msg('nqtrue = ' // TRIM(int2str(nqtrue)), modname)
+    CALL msg('nqtot  = ' // TRIM(int2str(nqtot)), modname)
+    CALL msg('niso   = ' // TRIM(int2str(niso)), modname)
+    CALL msg('ntiso  = ' // TRIM(int2str(ntiso)), modname)
+    IF (CPPKEY_INCA) THEN
+      CALL msg('nqCO2  = ' // TRIM(int2str(nqCO2)), modname)
+      CALL msg('nqINCA = ' // TRIM(int2str(nqINCA)), modname)
+    END IF
+    t => tracers
+    CALL msg('Information stored in ' // TRIM(modname) // ': ', modname)
+    IF(dispTable('isssssssiiiiiiiii', ['iq  ', 'name', 'lNam', 'g0Nm', 'prnt', 'type', 'phas', 'comp', &
+            'iAdv', 'iGen', 'iqPr', 'nqDe', 'nqCh', 'iGrp', 'iNam', 'iZon', 'iPha'], &
+            cat(t%name, t%longName, t%gen0Name, t%parent, t%type, t%phase, t%component), &
+            cat([(iq, iq = 1, nqtot)], t%iadv, t%iGeneration, t%iqParent, t%nqDescen, t%nqChildren, t%iso_iGroup, &
+                    t%iso_iName, t%iso_iZone, t%iso_iPhase), nColMax = maxTableWidth, nHead = 2, sub = modname))   &
+            CALL abort_gcm(modname, "problem with the tracers table content", 1)
+    CALL msg('No isotopes identified.', modname, nbIso == 0)
+    IF(nbIso == 0) RETURN
+    CALL msg('For isotopes family "H2O":', modname)
+    CALL msg('  isoKeys%name = ' // strStack(isoKeys%name), modname)
+    CALL msg('  isoName = ' // strStack(isoName), modname)
+    CALL msg('  isoZone = ' // strStack(isoZone), modname)
+    CALL msg('  isoPhas = ' // TRIM(isoPhas), modname)
+
+  END SUBROUTINE init_infotrac
+
+END MODULE lmdz_infotrac
Index: DZ6/branches/Amaury_dev/libf/dyn3d_common/lmdz_infotrac.f90
===================================================================
--- /LMDZ6/branches/Amaury_dev/libf/dyn3d_common/lmdz_infotrac.f90	(revision 5229)
+++ 	(revision )
@@ -1,425 +1,0 @@
-MODULE lmdz_infotrac
-
-  USE       lmdz_strings, ONLY: msg, fmsg, maxlen, cat, dispTable, int2str, bool2str, strStack, strParse
-  USE lmdz_readTracFiles, ONLY: trac_type, readTracersFiles, tracers, setGeneration, itZonIso, nzone, tran0, isoZone, &
-          delPhase, niso, getKey, isot_type, processIsotopes, isotope, maxTableWidth, iqIsoPha, nphas, ixIso, isoPhas, &
-          addPhase, iH2O, addKey, isoSelect, testTracersFiles, isoKeys, indexUpdate, iqWIsoPha, nbIso, ntiso, isoName, isoCheck
-  USE lmdz_readTracFiles, ONLY: new2oldH2O, newHNO3, oldHNO3
-
-  IMPLICIT NONE; PRIVATE
-
-  !=== FOR TRACERS:
-  PUBLIC :: init_infotrac                                 !--- Initialization of the tracers
-  PUBLIC :: tracers, type_trac                            !--- Full tracers database, tracers type keyword
-  PUBLIC :: nqtot, nbtr, nqo, nqCO2, nqtottr      !--- Main dimensions
-  PUBLIC :: conv_flg, pbl_flg                             !--- Convection & boundary layer activation keys
-  PUBLIC :: new2oldH2O, newHNO3, oldHNO3                  !--- For backwards compatibility in dynetat0
-  PUBLIC :: addPhase, delPhase                            !--- Add/remove the phase from the name of a tracer
-
-
-  !=== FOR ISOTOPES: General
-  PUBLIC :: isot_type, nbIso                              !--- Derived type, full isotopes families database + nb of families
-  PUBLIC :: isoSelect, ixIso                              !--- Isotopes family selection tool + selected family index
-  !=== FOR ISOTOPES: Specific to water
-  PUBLIC :: iH2O                                          !--- Value of "ixIso" for "H2O" isotopes class
-  PUBLIC :: min_qParent, min_qMass, min_ratio             !--- Min. values for various isotopic quantities
-  !=== FOR ISOTOPES: Depending on the selected isotopes family
-  PUBLIC :: isotope                                       !--- Selected isotopes database (argument of getKey)
-  PUBLIC :: isoKeys, isoName, isoZone, isoPhas            !--- Isotopes keys & names, tagging zones names, phases
-  PUBLIC :: niso, ntiso, nzone, nphas            !--- Number of   "   "
-  PUBLIC :: itZonIso                                      !--- index "it" in "isoName(1:niso)" = f(tagging idx, isotope idx)
-  PUBLIC :: iqIsoPha                                      !--- index "iq" in "qx"              = f(isotope idx,   phase idx)
-  PUBLIC :: isoCheck                                      !--- Run isotopes checking routines
-  !=== FOR BOTH TRACERS AND ISOTOPES
-  PUBLIC :: getKey                                        !--- Get a key from "tracers" or "isotope"
-
-  !=== CONVENTIONS FOR TRACERS NUMBERS:
-  !  |--------------------+-----------------------+-----------------+---------------+----------------------------|
-  !  | water in different |    water tagging      |  water isotopes | other tracers | additional tracers moments |
-  !  | phases: H2O_[glsrb]|      isotopes         |                 |               |  for higher order schemes  |
-  !  |--------------------+-----------------------+-----------------+---------------+----------------------------|
-  !  |                    |                       |                 |               |                            |
-  !  |<--     nqo      -->|<-- nqo*niso* nzone -->|<-- nqo*niso  -->|<--  nbtr   -->|<--        (nmom)        -->|
-  !  |                    |                                         |                                            |
-  !  |                    |<-- nqo*niso*(nzone+1)  =   nqo*ntiso -->|<--    nqtottr = nbtr + nmom             -->|
-  !  |                                                                              = nqtot - nqo*(ntiso+1)      |
-  !  |                                                                                                           |
-  !  |<--                        nqtrue  =  nbtr + nqo*(ntiso+1)                 -->|                            |
-  !  |                                                                                                           |
-  !  |<--                        nqtot   =  nqtrue + nmom                                                     -->|
-  !  |                                                                                                           |
-  !  |-----------------------------------------------------------------------------------------------------------|
-  !  NOTES FOR THIS TABLE:
-  !  * Used "niso", "nzone" and "ntiso" are components of "isotopes(ip)" for water (isotopes(ip)%parent == 'H2O'),
-  !    since water is so far the sole tracers family, except passive CO2, removed from the main tracers table.
-  !  * For water, "nqo" is equal to the more general field "isotopes(ip)%nphas".
-  !  * "niso", "nzone", "ntiso", "nphas" are defined for other isotopic tracers families, if any.
-
-  !=== DERIVED TYPE EMBEDDING MOST OF THE TRACERS-RELATED QUANTITIES (LENGTH: nqtot)
-  !    Each entry is accessible using "%" sign.
-  !  |-------------+------------------------------------------------------+-------------+------------------------+
-  !  |  entry      | Meaning                                              | Former name | Possible values        |
-  !  |-------------+------------------------------------------------------+-------------+------------------------+
-  !  | name        | Name (short)                                         | tname       |                        |
-  !  | keys        | key/val pairs accessible with "getKey" routine       | /           |                        |
-  !  | gen0Name    | Name of the 1st generation ancestor                  | /           |                        |
-  !  | parent      | Name of the parent                                   | /           |                        |
-  !  | longName    | Long name (with adv. scheme suffix) for outputs      | ttext       |                        |
-  !  | type        | Type (so far: tracer or tag)                         | /           | tracer,tag             |
-  !  | phase       | Phases list ("g"as / "l"iquid / "s"olid              |             | [g|l|s|r|b]            |
-  !  |             |              "r"(cloud) / "b"lowing)                 | /           |                        |
-  !  | component   | Name(s) of the merged/cumulated section(s)           | /           | coma-separated names   |
-  !  | iGeneration | Generation (>=1)                                     | /           |                        |
-  !  | iqParent    | Index of the parent tracer                           | iqpere      | 1:nqtot                |
-  !  | iqDescen    | Indexes of the childs       (all generations)        | iqfils      | 1:nqtot                |
-  !  | nqDescen    | Number of the descendants   (all generations)        | nqdesc      | 1:nqtot                |
-  !  | nqChildren  | Number of childs            (1st generation only)    | nqfils      | 1:nqtot                |
-  !  | keys        | key/val pairs accessible with "getKey" routine       | /           |                        |
-  !  | iadv        | Advection scheme number                              | iadv        | 1,2,10-20(exc.15,19),30|
-  !  | isAdvected  | Advected tracers flag (.TRUE. if iadv >= 0)          | /           | nqtrue  .TRUE. values  |
-  !  | isInPhysics | Tracers not extracted from the main table in physics | /           | nqtottr .TRUE. values  |
-  !  | iso_iGroup  | Isotopes group index in isotopes(:)                  | /           | 1:nbIso                |
-  !  | iso_iName   | Isotope  name  index in isotopes(iso_iGroup)%trac(:) | iso_indnum  | 1:niso                 |
-  !  | iso_iZone   | Isotope  zone  index in isotopes(iso_iGroup)%zone(:) | zone_num    | 1:nzone                |
-  !  | iso_iPhas   | Isotope  phase index in isotopes(iso_iGroup)%phas(:) | phase_num   | 1:nphas                |
-  !  +-------------+------------------------------------------------------+-------------+------------------------+
-
-  !=== DERIVED TYPE EMBEDDING MOST OF THE ISOTOPES-RELATED QUANTITIES (LENGTH: nbIso, NUMBER OF ISOTOPES FAMILIES)
-  !    Each entry is accessible using "%" sign.
-  !  |-----------------+--------------------------------------------------+--------------------+-----------------+
-  !  |  entry | length | Meaning                                          |    Former name     | Possible values |
-  !  |-----------------+--------------------------------------------------+--------------------+-----------------+
-  !  | parent          | Parent tracer (isotopes family name)             |                    |                 |
-  !  | keys   | niso   | Isotopes keys/values pairs list + number         |                    |                 |
-  !  | trac   | ntiso  | Isotopes + tagging tracers list + number         | / | ntraciso       |                 |
-  !  | zone   | nzone  | Geographic tagging zones   list + number         | / | ntraceurs_zone |                 |
-  !  | phase  | nphas  | Phases                     list + number         |                    | [g|l|s|r|b] 1:5 |
-  !  | 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         |
-  !  +-----------------+--------------------------------------------------+--------------------+-----------------+
-
-  REAL, PARAMETER :: min_qParent = 1.e-30, min_qMass = 1.e-18, min_ratio = 1.e-16 ! MVals et CRisi
-
-  !=== DIMENSIONS OF THE TRACERS TABLES AND OTHER SCALAR VARIABLES
-  INTEGER, SAVE :: nqtot, &                     !--- Tracers nb in dynamics (incl. higher moments + H2O)
-          nbtr, &                     !--- Tracers nb in physics  (excl. higher moments + H2O)
-          nqo, &                     !--- Number of water phases
-          nqtottr, &                    !--- Number of tracers passed to phytrac (TO BE DELETED ?)
-          nqCO2                         !--- Number of tracers of CO2  (ThL)
-  CHARACTER(LEN = maxlen), SAVE :: type_trac                     !--- Keyword for tracers type(s)
-
-  !=== VARIABLES FOR INCA
-  INTEGER, DIMENSION(:), SAVE, ALLOCATABLE :: &
-          conv_flg, pbl_flg                           !--- Convection / boundary layer activation (nbtr)
-
-CONTAINS
-
-  SUBROUTINE init_infotrac
-    USE control_mod, ONLY: planet_type
-    USE lmdz_reprobus_wrappers, ONLY: init_chem_rep_trac
-    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_STRATAER, CPPKEY_REPROBUS
-    USE lmdz_iniprint, ONLY: lunout, prt_level
-    USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
-
-    IMPLICIT NONE
-    !==============================================================================================================================
-
-    !   Auteur:  P. Le Van /L. Fairhead/F.Hourdin
-    !   -------
-
-    !   Modifications:
-    !   --------------
-    !   05/94: F.Forget      Modif special traceur
-    !   02/02: M-A Filiberti Lecture de traceur.def
-    !   01/22: D. Cugnet     Nouveaux tracer.def et tracer_*.def + encapsulation (types trac_type et isot_type)
-
-    !   Objet:
-    !   ------
-    !   GCM LMD nouvelle grille
-
-    !==============================================================================================================================
-    !   ... modification de l'integration de q ( 26/04/94 ) ....
-    !------------------------------------------------------------------------------------------------------------------------------
-    ! Declarations:
-
-
-    !------------------------------------------------------------------------------------------------------------------------------
-    ! Local variables
-    INTEGER, ALLOCATABLE :: hadv(:), vadv(:)                          !--- Horizontal/vertical transport scheme number
-    INTEGER, ALLOCATABLE :: had (:), hadv_inca(:), conv_flg_inca(:), &!--- Variables specific to INCA
-            vad (:), vadv_inca(:), pbl_flg_inca(:)
-    CHARACTER(LEN = 8), ALLOCATABLE :: solsym_inca(:)                   !--- Tracers names for INCA
-    INTEGER :: nqINCA
-    CHARACTER(LEN = 2) :: suff(9)                                !--- Suffixes for schemes of order 3 or 4 (Prather)
-    CHARACTER(LEN = 3) :: descrq(30)                               !--- Advection scheme description tags
-    CHARACTER(LEN = maxlen) :: msg1, texp, ttp                          !--- Strings for messages and expanded tracers type
-    INTEGER :: fType                                                  !--- Tracers description file type ; 0: none
-    !--- 1/2/3: "traceur.def"/"tracer.def"/"tracer_*.def"
-    INTEGER :: nqtrue                                                 !--- Tracers nb from tracer.def (no higher order moments)
-    INTEGER :: iad                                                    !--- Advection scheme number
-    INTEGER :: iq, jq, nt, im, nm                                     !--- Indexes and temporary variables
-    LOGICAL :: lerr, ll
-    TYPE(trac_type), ALLOCATABLE, TARGET :: ttr(:)
-    TYPE(trac_type), POINTER :: t1, t(:)
-    CHARACTER(LEN = maxlen), ALLOCATABLE :: types_trac(:)             !--- Keywords for tracers type(s), parsed version
-    CHARACTER(LEN = *), PARAMETER :: modname = "init_infotrac"
-    !------------------------------------------------------------------------------------------------------------------------------
-    ! Initialization :
-    !------------------------------------------------------------------------------------------------------------------------------
-    suff = ['x ', 'y ', 'z ', 'xx', 'xy', 'xz', 'yy', 'yz', 'zz']
-    descrq(1:30) = '   '
-    descrq(1:2) = ['LMV', 'BAK']
-    descrq(10:20) = ['VL1', 'VLP', 'FH1', 'FH2', 'VLH', '   ', 'PPM', 'PPS', 'PPP', '   ', 'SLP']
-    descrq(30) = 'PRA'
-
-    lerr = strParse(type_trac, '|', types_trac, n = nt)
-    IF (nt > 1) THEN
-      IF (nt > 2) CALL abort_gcm(modname, 'you need to modify type_trac, this version is not supported by lmdz', 1)
-      IF (nt == 2) type_trac = types_trac(2)
-    ENDIF
-
-    CALL msg('type_trac = "' // TRIM(type_trac) // '"', modname)
-
-    !--- MESSAGE ABOUT THE CHOSEN CONFIGURATION
-    msg1 = 'For type_trac = "' // TRIM(type_trac) // '":'
-    SELECT CASE(type_trac)
-    CASE('inca'); CALL msg(TRIM(msg1) // ' coupling with INCA chemistry model', modname)
-    CASE('inco'); CALL msg(TRIM(msg1) // ' coupling jointly with INCA and CO2 cycle', modname)
-    CASE('repr'); CALL msg(TRIM(msg1) // ' coupling with REPROBUS chemistry model', modname)
-    CASE('co2i'); CALL msg(TRIM(msg1) // ' you have chosen to run with CO2 cycle', modname)
-    CASE('coag'); CALL msg(TRIM(msg1) // ' tracers are treated for COAGULATION tests', modname)
-    CASE('lmdz'); CALL msg(TRIM(msg1) // ' tracers are treated in LMDZ only', modname)
-    CASE DEFAULT; CALL abort_gcm(modname, 'type_trac=' // TRIM(type_trac) // ' not possible yet.', 1)
-    END SELECT
-
-    !--- COHERENCE TEST BETWEEN "type_trac" AND PREPROCESSING KEYS
-    SELECT CASE(type_trac)
-    CASE('inca', 'inco')
-      IF (.NOT. CPPKEY_INCA) THEN
-        CALL abort_gcm(modname, 'You must add cpp key INCA and compile with INCA code', 1)
-      END IF
-    CASE('repr')
-      IF (.NOT. CPPKEY_REPROBUS) THEN
-        CALL abort_gcm(modname, 'You must add cpp key REPROBUS and compile with REPROBUS code', 1)
-      END IF
-    CASE('coag')
-      IF (.NOT. CPPKEY_STRATAER) THEN
-        CALL abort_gcm(modname, 'You must add cpp key StratAer and compile with StratAer code', 1)
-      END IF
-    END SELECT
-
-    nqCO2 = COUNT([type_trac == 'inco', type_trac == 'co2i'])
-
-    !==============================================================================================================================
-    ! 0) DETERMINE THE TYPE OF THE INPUT TRACERS DESCRIPTION FILE AND READ IT
-    !==============================================================================================================================
-    texp = type_trac                                                  !=== EXPANDED (WITH "|" SEPARATOR) "type_trac"
-    IF(texp == 'inco') texp = 'co2i|inca'
-    IF(texp /= 'lmdz') texp = 'lmdz|' // TRIM(texp)
-    IF(testTracersFiles(modname, texp, fType, .TRUE.)) CALL abort_gcm(modname, 'problem with tracers file(s)', 1)
-    ttp = type_trac; IF(fType /= 1) ttp = texp
-    IF(readTracersFiles(ttp, lRepr = type_trac=='repr')) CALL abort_gcm(modname, 'problem with tracers file(s)', 1)
-    !==============================================================================================================================
-    ! 1) Get various numbers: "nqtrue" (first order only tracers), "nqo" (water phases), 'nbtr' (tracers passed to physics), etc.
-    !==============================================================================================================================
-
-    !---------------------------------------------------------------------------------------------------------------------------
-    IF(fType == 0) CALL abort_gcm(modname, 'Missing "traceur.def", "tracer.def" or "tracer_<keyword>.def tracers file.', 1)
-    !---------------------------------------------------------------------------------------------------------------------------
-    IF(fType == 1 .AND. ANY(['inca', 'inco']==type_trac)) THEN         !=== FOUND OLD STYLE INCA "traceur.def"
-      !---------------------------------------------------------------------------------------------------------------------------
-      IF (CPPKEY_INCA) THEN
-        nqo = SIZE(tracers) - nqCO2
-        CALL init_chem_inca_trac(nqINCA)                               !--- Get nqINCA from INCA
-        nbtr = nqINCA + nqCO2                                          !--- Number of tracers passed to phytrac
-        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), 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)
-        ALLOCATE(ttr(nqtrue))
-        ttr(1:nqo + nqCO2) = tracers
-        ttr(1:nqo)%component = 'lmdz'
-        ttr(1 + nqo:nqCO2 + nqo)%component = 'co2i'
-        ttr(1 + nqo + nqCO2:nqtrue)%component = 'inca'
-        ttr(1 + nqo:nqtrue)%name = [('CO2     ', iq = 1, nqCO2), solsym_inca]
-        ttr(1 + nqo + nqCO2:nqtrue)%parent = tran0
-        ttr(1 + nqo + nqCO2:nqtrue)%phase = 'g'
-        lerr = getKey('hadv', had, ky = tracers(:)%keys)
-        lerr = getKey('vadv', vad, ky = tracers(:)%keys)
-        hadv(1:nqo + nqCO2) = had(:); hadv(1 + nqo + nqCO2:nqtrue) = hadv_inca
-        vadv(1:nqo + nqCO2) = vad(:); vadv(1 + nqo + nqCO2:nqtrue) = vadv_inca
-        CALL MOVE_ALLOC(FROM = ttr, TO = tracers)
-        DO iq = 1, nqtrue
-          t1 => tracers(iq)
-          CALL addKey('name', t1%name, t1%keys)
-          CALL addKey('component', t1%component, t1%keys)
-          CALL addKey('parent', t1%parent, t1%keys)
-          CALL addKey('phase', t1%phase, t1%keys)
-        END DO
-        IF(setGeneration(tracers)) CALL abort_gcm(modname, 'See above', 1) !- SET FIELDS %iGeneration, %gen0Name
-        DEALLOCATE(had, hadv_inca, vad, vadv_inca, conv_flg_inca, pbl_flg_inca, solsym_inca)
-        !---------------------------------------------------------------------------------------------------------------------------
-      END IF
-    ELSE                                                              !=== OTHER CASES (OLD OR NEW FORMAT, NO INCA MODULE)
-      !---------------------------------------------------------------------------------------------------------------------------
-      nqtrue = SIZE(tracers)                                                                               !--- "true" tracers
-      nqo = COUNT(tracers(:)%component == 'lmdz' .AND. delPhase(tracers(:)%name)     == 'H2O')     !--- Water phases
-      nbtr = nqtrue - COUNT(tracers(:)%component == 'lmdz' .AND. delPhase(tracers(:)%gen0Name) == 'H2O')     !--- Passed to phytrac
-      nqCO2 = COUNT([type_trac == 'inco', type_trac == 'co2i'])
-      IF (CPPKEY_INCA) THEN
-        nqINCA = COUNT(tracers(:)%component == 'inca')
-      END IF
-      IF(getKey('hadv', hadv, ky = tracers(:)%keys)) CALL abort_gcm(modname, 'missing key "hadv"', 1)
-      IF(getKey('vadv', vadv, ky = tracers(:)%keys)) CALL abort_gcm(modname, 'missing key "vadv"', 1)
-      !---------------------------------------------------------------------------------------------------------------------------
-    END IF
-    !---------------------------------------------------------------------------------------------------------------------------
-
-    IF (CPPKEY_REPROBUS) THEN
-      CALL init_chem_rep_trac(nbtr, nqo, tracers(:)%name)
-    END IF
-
-    !==============================================================================================================================
-    ! 2) Calculate nqtot, number of tracers needed (greater if advection schemes 20 or 30 have been chosen).
-    !==============================================================================================================================
-    DO iq = 1, nqtrue
-      IF(hadv(iq)<20 .OR. (ANY(hadv(iq)==[20, 30]) .AND. hadv(iq)==vadv(iq))) CYCLE
-      WRITE(msg1, '("The choice hadv=",i0,", vadv=",i0,a)')hadv(iq), vadv(iq), ' for "' // TRIM(tracers(iq)%name) // '" is not available'
-      CALL abort_gcm(modname, TRIM(msg1), 1)
-    END DO
-    nqtot = COUNT(hadv< 20 .AND. vadv< 20) &                     !--- No additional tracer
-            + 4 * COUNT(hadv==20 .AND. vadv==20) &                     !--- 3  additional tracers
-            + 10 * COUNT(hadv==30 .AND. vadv==30)                       !--- 9  additional tracers
-
-    !--- More tracers due to the choice of advection scheme => assign total number of tracers
-    IF(nqtot /= nqtrue) THEN
-      CALL msg('The choice of advection scheme for one or more tracers makes it necessary to add tracers')
-      CALL msg('The number of true tracers is ' // TRIM(int2str(nqtrue)))
-      CALL msg('The total number of tracers needed is ' // TRIM(int2str(nqtot)))
-    END IF
-
-    !==============================================================================================================================
-    ! 3) Determine the advection scheme choice for water and tracers "iadv" and the fields long name, isAdvected.
-    !     iadv = 1    "LMDZ-specific humidity transport" (for H2O vapour)          LMV
-    !     iadv = 2    backward                           (for H2O liquid)          BAK
-    !     iadv = 14   Van-Leer + specific humidity, modified by Francis Codron     VLH
-    !     iadv = 10   Van-Leer (chosen for vapour and liquid water)                VL1
-    !     iadv = 11   Van-Leer for hadv and PPM version (Monotonic) for vadv       VLP
-    !     iadv = 12   Frederic Hourdin I                                           FH1
-    !     iadv = 13   Frederic Hourdin II                                          FH2
-    !     iadv = 16   Monotonic         PPM (Collela & Woodward 1984)              PPM
-    !     iadv = 17   Semi-monotonic    PPM (overshoots allowed)                   PPS
-    !     iadv = 18   Definite positive PPM (overshoots and undershoots allowed)   PPP
-    !     iadv = 20   Slopes                                                       SLP
-    !     iadv = 30   Prather                                                      PRA
-
-    !        In array q(ij,l,iq) : iq = 1/2[/3]    for vapour/liquid[/ice] water
-    !        And optionaly:        iq = 3[4],nqtot for other tracers
-    !==============================================================================================================================
-    ALLOCATE(ttr(nqtot))
-    jq = nqtrue + 1; tracers(:)%iadv = -1
-    DO iq = 1, nqtrue
-      t1 => tracers(iq)
-
-      !--- VERIFY THE CHOICE OF ADVECTION SCHEME
-      iad = -1
-      IF(hadv(iq)     ==    vadv(iq)) iad = hadv(iq)
-      IF(hadv(iq)==10 .AND. vadv(iq)==16) iad = 11
-      WRITE(msg1, '("Bad choice of advection scheme for ",a,": hadv = ",i0,", vadv = ",i0)')TRIM(t1%name), hadv(iq), vadv(iq)
-      IF(iad == -1) CALL abort_gcm(modname, msg1, 1)
-
-      !--- SET FIELDS longName, iadv, isAdvected, isInPhysics
-      t1%longName = t1%name; IF(iad > 0) t1%longName = TRIM(t1%name) // descrq(iad)
-      t1%iadv = iad
-      t1%isAdvected = iad >= 0
-      t1%isInPhysics = delPhase(t1%gen0Name) /= 'H2O' .OR. t1%component /= 'lmdz' !=== MORE EXCEPTIONS ? CO2i, SURSAT CLOUD H2O
-      ttr(iq) = t1
-
-      !--- DEFINE THE HIGHER ORDER TRACERS, IF ANY
-      nm = 0
-      IF(iad == 20) nm = 3                                           !--- 2nd order scheme
-      IF(iad == 30) nm = 9                                           !--- 3rd order scheme
-      IF(nm == 0) CYCLE                                              !--- No higher moments
-      ttr(jq + 1:jq + nm) = t1
-      ttr(jq + 1:jq + nm)%name = [ (TRIM(t1%name) // '-' // TRIM(suff(im)), im = 1, nm) ]
-      ttr(jq + 1:jq + nm)%gen0Name = [ (TRIM(t1%name) // '-' // TRIM(suff(im)), im = 1, nm) ]
-      ttr(jq + 1:jq + nm)%parent = [ (TRIM(t1%parent) // '-' // TRIM(suff(im)), im = 1, nm) ]
-      ttr(jq + 1:jq + nm)%longName = [ (TRIM(t1%longName) // '-' // TRIM(suff(im)), im = 1, nm) ]
-      ttr(jq + 1:jq + nm)%iadv = [ (-iad, im = 1, nm) ]
-      ttr(jq + 1:jq + nm)%isAdvected = [ (.FALSE., im = 1, nm) ]
-      jq = jq + nm
-    END DO
-    DEALLOCATE(hadv, vadv)
-    CALL MOVE_ALLOC(FROM = ttr, TO = tracers)
-
-    !--- SET FIELDS iqParent, iqDescen, nqDescen, nqChildren
-    IF(indexUpdate(tracers)) CALL abort_gcm(modname, 'problem with tracers indices update', 1)
-
-    !=== TEST ADVECTION SCHEME
-    DO iq = 1, nqtot ; t1 => tracers(iq); iad = t1%iadv
-
-    !--- ONLY TESTED VALUES FOR TRACERS FOR NOW:               iadv = 14, 10 (and 0 for non-transported tracers)
-    IF(ALL([10, 14, 0] /= iad)) &
-            CALL abort_gcm(modname, 'Not tested for iadv=' // TRIM(int2str(iad)) // ' ; 10 or 14 only are allowed !', 1)
-
-    !--- ONLY TESTED VALUES FOR PARENTS HAVING CHILDS FOR NOW: iadv = 14, 10 (PARENTS: TRACERS OF GENERATION 1)
-    IF(ALL([10, 14] /= iad) .AND. t1%iGeneration == 1 .AND. ANY(tracers(:)%iGeneration > 1)) &
-            CALL abort_gcm(modname, 'iadv=' // TRIM(int2str(iad)) // ' not implemented for parents ; 10 or 14 only are allowed !', 1)
-
-    !--- ONLY TESTED VALUES FOR CHILDS FOR NOW:                iadv = 10     (CHILDS:  TRACERS OF GENERATION GREATER THAN 1)
-    IF(fmsg('WARNING ! iadv=' // TRIM(int2str(iad)) // ' not implemented for childs. Setting iadv=10 for "' // TRIM(t1%name) // '"', &
-            modname, iad /= 10 .AND. t1%iGeneration > 1)) t1%iadv = 10
-
-    !--- ONLY VALID SCHEME NUMBER FOR WATER VAPOUR:            iadv = 14
-    ll = t1%name /= addPhase('H2O', 'g')
-    IF(fmsg('WARNING ! iadv=14 is valid for water vapour only. Setting iadv=10 for "' // TRIM(t1%name) // '".', &
-            modname, iad == 14 .AND. ll))                 t1%iadv = 10
-    END DO
-
-    !=== READ PHYSICAL PARAMETERS FOR ISOTOPES ; DONE HERE BECAUSE dynetat0 AND iniacademic NEED "tnat" AND "alpha_ideal"
-    niso = 0; nzone = 0; nphas = nqo; ntiso = 0; isoCheck = .FALSE.
-    IF(processIsotopes()) CALL abort_gcm(modname, 'problem when processing isotopes parameters', 1)
-
-    !--- 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
-    nqtottr = nqtot - COUNT(delPhase(tracers%gen0Name) == 'H2O' .AND. tracers%component == 'lmdz')
-    IF(COUNT(tracers%iso_iName == 0) - COUNT(delPhase(tracers%name) == 'H2O' .AND. tracers%component == 'lmdz') /= nqtottr) &
-            CALL abort_gcm(modname, 'problem with the computation of nqtottr', 1)
-
-    !=== DISPLAY THE RESULTS
-    CALL msg('nqo    = ' // TRIM(int2str(nqo)), modname)
-    CALL msg('nbtr   = ' // TRIM(int2str(nbtr)), modname)
-    CALL msg('nqtrue = ' // TRIM(int2str(nqtrue)), modname)
-    CALL msg('nqtot  = ' // TRIM(int2str(nqtot)), modname)
-    CALL msg('niso   = ' // TRIM(int2str(niso)), modname)
-    CALL msg('ntiso  = ' // TRIM(int2str(ntiso)), modname)
-    IF (CPPKEY_INCA) THEN
-      CALL msg('nqCO2  = ' // TRIM(int2str(nqCO2)), modname)
-      CALL msg('nqINCA = ' // TRIM(int2str(nqINCA)), modname)
-    END IF
-    t => tracers
-    CALL msg('Information stored in ' // TRIM(modname) // ': ', modname)
-    IF(dispTable('isssssssiiiiiiiii', ['iq  ', 'name', 'lNam', 'g0Nm', 'prnt', 'type', 'phas', 'comp', &
-            'iAdv', 'iGen', 'iqPr', 'nqDe', 'nqCh', 'iGrp', 'iNam', 'iZon', 'iPha'], &
-            cat(t%name, t%longName, t%gen0Name, t%parent, t%type, t%phase, t%component), &
-            cat([(iq, iq = 1, nqtot)], t%iadv, t%iGeneration, t%iqParent, t%nqDescen, t%nqChildren, t%iso_iGroup, &
-                    t%iso_iName, t%iso_iZone, t%iso_iPhase), nColMax = maxTableWidth, nHead = 2, sub = modname))   &
-            CALL abort_gcm(modname, "problem with the tracers table content", 1)
-    IF(niso > 0) THEN
-      CALL msg('Where, for isotopes family "' // TRIM(isotope%parent) // '":', modname)
-      CALL msg('  isoKeys%name = ' // strStack(isoKeys%name), modname)
-      CALL msg('  isoName = ' // strStack(isoName), modname)
-      CALL msg('  isoZone = ' // strStack(isoZone), modname)
-      CALL msg('  isoPhas = ' // TRIM(isoPhas), modname)
-    ELSE
-      CALL msg('No isotopes identified.', modname)
-    END IF
-    CALL msg('end', modname)
-
-  END SUBROUTINE init_infotrac
-
-END MODULE lmdz_infotrac
Index: /LMDZ6/branches/Amaury_dev/libf/phylmd/infotrac_phy.F90
===================================================================
--- /LMDZ6/branches/Amaury_dev/libf/phylmd/infotrac_phy.F90	(revision 5229)
+++ /LMDZ6/branches/Amaury_dev/libf/phylmd/infotrac_phy.F90	(revision 5230)
@@ -3,8 +3,9 @@
 MODULE infotrac_phy
 
-  USE       lmdz_strings, ONLY: msg, fmsg, maxlen, cat, dispTable, int2str, bool2str, strStack, strParse, strIdx
-  USE lmdz_readTracFiles, ONLY: trac_type, readTracersFiles, tracers, setGeneration, itZonIso, nzone, tran0, isoZone, &
-          delPhase, niso, getKey, isot_type, processIsotopes, isotope, maxTableWidth, iqIsoPha, nphas, ixIso, isoPhas, &
-          addPhase, iH2O, addKey, isoSelect, testTracersFiles, isoKeys, indexUpdate, iqWIsoPha, nbIso, ntiso, isoName, isoCheck, new2oldH2O
+  USE       lmdz_strings, ONLY: msg, maxlen, cat, dispTable, int2str, bool2str, strStack, strParse, strCount, strIdx
+  USE lmdz_readTracFiles, ONLY: readTracersFiles, maxTableWidth, isot_type, addPhase, addKey, iH2O, &
+          indexUpdate, trac_type, testTracersFiles, processIsotopes, tracers, delPhase, getKey, tran0, &
+          isoKeys, isoName, isoZone, isoPhas, isoSelect, itZonIso, nbIso, isotope, &
+          niso, ntiso, nzone, nphas, iqWIsoPha, iqIsoPha, ixIso, isoCheck, new2oldH2O
   IMPLICIT NONE
 
@@ -17,5 +18,5 @@
   PUBLIC :: conv_flg, pbl_flg                             !--- Convection & boundary layer activation keys
   PUBLIC :: new2oldH2O                                    !--- For backwards compatibility in phyetat0
-   PUBLIC :: addPhase, delPhase                            !--- Add/remove the phase from the name of a tracer
+  PUBLIC :: addPhase, delPhase                            !--- Add/remove the phase from the name of a tracer
   PUBLIC :: nbtr_bin, nbtr_sulgas                         !--- Number of aerosols bins and sulfur gases for StratAer model
   PUBLIC :: id_OCS_strat, id_SO2_strat, id_H2SO4_strat, id_BIN01_strat, id_TEST_strat
@@ -26,9 +27,9 @@
   !=== FOR ISOTOPES: Specific to water
   PUBLIC :: iH2O                                          !--- Value of "ixIso" for "H2O" isotopes class
-   PUBLIC :: ivap, iliq, isol
+  PUBLIC :: ivap, iliq, isol
   !=== FOR ISOTOPES: Depending on the selected isotopes family
   PUBLIC :: isotope                              !--- Selected isotopes database (argument of getKey)
   PUBLIC :: isoKeys, isoName, isoZone, isoPhas            !--- Isotopes keys & names, tagging zones names, phases
-  PUBLIC :: niso, ntiso,nzone, nphas!--- Number of   "   "
+  PUBLIC :: niso, ntiso, nzone, nphas!--- Number of   "   "
   PUBLIC :: itZonIso                                      !--- Index "it" in "isoName(1:niso)" = f(tagging idx, isotope idx)
   PUBLIC :: iqIsoPha                                      !--- Index "iq" in "qx"              = f(isotope idx,   phase idx)
@@ -68,10 +69,10 @@
   !  | name        | Name (short)                                         | tname       |                        |
   !  | keys        | key/val pairs accessible with "getKey" routine       | /           |                        |
-!  |gen0Name    | Name of the 1st generation ancestor                  | /           |                        |
+  !  |gen0Name    | Name of the 1st generation ancestor                  | /           |                        |
   !  | parent      | Name of the parent                                   | /           |                        |
   !  | longName    | Long name (with adv. scheme suffix) for outputs      | ttext       |                        |
   !  | type        | Type (so far: tracer or tag)                         | /           | tracer,tag             |
   !  | phase       | Phases list ("g"as / "l"iquid / "s"olid             |             | [g|l|s|r|b]            |
-!  |             |              "r"(cloud) / "b"lowing)                 | /           |              |
+  !  |             |              "r"(cloud) / "b"lowing)                 | /           |              |
   !  | component   | Name(s) of the merged/cumulated section(s)           | /           | coma-separated names   |
   !  | iGeneration | Generation (>=1)                                     | /           |                        |
@@ -105,8 +106,8 @@
 
   !=== INDICES FOR WATER
-   INTEGER, SAVE :: ivap, iliq, isol
-!$OMP THREADPRIVATE(ivap, iliq, isol)
-
-   !===DIMENSIONS OF THE TRACERS TABLES AND OTHER SCALAR VARIABLES
+  INTEGER, SAVE :: ivap, iliq, isol
+  !$OMP THREADPRIVATE(ivap, iliq, isol)
+
+  !===DIMENSIONS OF THE TRACERS TABLES AND OTHER SCALAR VARIABLES
   INTEGER, SAVE :: nqtot, &                     !--- Tracers nb in dynamics (incl. higher moments + H2O)
           nbtr, &                     !--- Tracers nb in physics  (excl. higher moments + H2O)
@@ -119,5 +120,5 @@
   !===  VARIABLES FOR INCA
   INTEGER, DIMENSION(:), SAVE, ALLOCATABLE :: &
-                    conv_flg, pbl_flg                           !--- Convection / boundary layer activation (nbtr)
+          conv_flg, pbl_flg                           !--- Convection / boundary layer activation (nbtr)
   !$OMP THREADPRIVATE(conv_flg, pbl_flg)
 
@@ -132,4 +133,5 @@
   SUBROUTINE init_infotrac_phy
     USE lmdz_ioipsl_getin_p, ONLY: getin_p
+    USE lmdz_phys_para, ONLY: is_master, is_omp_master
     USE lmdz_reprobus_wrappers, ONLY: Init_chem_rep_trac
     USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_STRATAER, CPPKEY_REPROBUS
@@ -192,10 +194,9 @@
 
     CALL getin_p('type_trac', type_trac)
-
-    lerr = strParse(type_trac, '|', types_trac, n = nt)
-    IF (nt > 1) THEN
-      IF (nt > 2) CALL abort_physic(modname, 'you need to modify type_trac, this version is not supported by lmdz', 1)
-      IF (nt == 2) type_trac = types_trac(2)
-    ENDIF
+    CALL msg('type_trac = "' // TRIM(type_trac) // '"', modname, is_master)
+    IF(strCount(type_trac, '|', nt)) CALL abort_physic(modname, 'Could''nt parse the "type_trac" string with delimiter "|"', 1)
+    IF(nt >= 3) CALL abort_physic(modname, 'you need to modify type_trac, this version is not supported by lmdz', 1)
+    IF(strParse(type_trac, '|', types_trac, n = nt)) CALL abort_physic(modname, "couldn't parse " // '"type_trac"', 1)
+    IF(nt == 2) type_trac = types_trac(2) ! TO BE DELETED SOON
 
     CALL msg('type_trac = "' // TRIM(type_trac) // '"', modname)
@@ -203,5 +204,5 @@
 
     !##############################################################################################################################
-    IF(lInit) THEN                                                    !=== SKIPED IF ALREADY DONE IN dyn3d_common/infotrac  ####
+    IF(lInit .AND. is_master) THEN                                    !=== SKIPED IF ALREADY DONE
       !##############################################################################################################################
       !--- MESSAGE ABOUT THE CHOSEN CONFIGURATION
@@ -236,5 +237,5 @@
     !##############################################################################################################################
 
-    nqCO2 = COUNT([type_trac == 'inco', type_trac == 'co2i'])
+
 
     !==============================================================================================================================
@@ -245,70 +246,29 @@
     IF(texp /= 'lmdz') texp = 'lmdz|' // TRIM(texp)
 
-
-    IF(testTracersFiles(modname, texp, fType, lInit)) CALL abort_physic(modname, 'problem with tracers file(s)', 1)
-
-    ttp = type_trac; IF(fType /= 1) ttp = texp
+    IF(testTracersFiles(modname, texp, fType, lInit.AND.is_master)) CALL abort_physic(modname, 'problem with tracers file(s)', 1)
+
+    ttp = type_trac; IF(fType /= 1) ttp = texp!---------------------------------------------------------------------------------------------------------------------------
+    IF(fType == 0) CALL abort_physic(modname, 'Missing "traceur.def", "tracer.def" or "tracer_<keyword>.def tracers file.', 1)
+    !---------------------------------------------------------------------------------------------------------------------------
+    IF(fType == 1 .AND. ANY(['inca', 'inco'] == type_trac)) &                   !=== FOUND OLD STYLE INCA "traceur.def"
+            CALL abort_physic(modname, 'retro-compatibility with old-style INCA traceur.def files has been disabled.', 1)
+    !---------------------------------------------------------------------------------------------------------------------------
 
     !##############################################################################################################################
     IF(lInit) THEN
       IF(readTracersFiles(ttp, lRepr = type_trac=='repr')) CALL abort_physic(modname, 'problem with tracers file(s)', 1)
-    ELSE
-      CALL msg('No tracers description file(s) reading needed: already done in the dynamics', modname)
-    END IF
-    !##############################################################################################################################
-
-    !==============================================================================================================================
-! 1) Get various numbers: "nqtrue" (first order only tracers), "nqo" (water phases), 'nbtr' (tracers passed to physics), etc.
-!==============================================================================================================================
-   !---------------------------------------------------------------------------------------------------------------------------
-    IF(fType == 0) CALL abort_physic(modname, 'Missing "traceur.def", "tracer.def" or "tracer_<keyword>.def tracersfile.', 1)
-    !---------------------------------------------------------------------------------------------------------------------------
-    IF(fType == 1 .AND. ANY(['inca', 'inco']==type_trac) .AND. lInit) THEN  !=== FOUND OLD STYLE INCA "traceur.def"
-      !---------------------------------------------------------------------------------------------------------------------------
-      IF (CPPKEY_INCA) THEN
-      nqo = SIZE(tracers) - nqCO2
-      CALL Init_chem_inca_trac(nqINCA)                               !--- Get nqINCA from INCA
-      nbtr = nqINCA + nqCO2                                          !--- Number of tracers passed to phytrac
-      nqtrue = nbtr + nqo                                            !--- Total number of "true" tracers
-      IF(ALL([2, 3] /= nqo)) CALL abort_physic(modname, 'Only 2 or 3 water phases allowed ; found nqo=' // TRIM(int2str(nqo)), 1)
-      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)
-      ALLOCATE(ttr(nqtrue))
-      ttr(1:nqo + nqCO2) = tracers
-      ttr(1:nqo)%component = 'lmdz'
-      ttr(1 + nqo:nqCO2 + nqo)%component = 'co2i'
-      ttr(1 + nqo + nqCO2:nqtrue)%component = 'inca'
-      ttr(1 + nqo:nqtrue)%name = [('CO2     ', iq = 1, nqCO2), solsym_inca]
-      ttr(1 + nqo + nqCO2:nqtrue)%parent = tran0
-      ttr(1 + nqo + nqCO2:nqtrue)%phase = 'g'
-      lerr = getKey('hadv', had, ky = tracers(:)%keys)
-      lerr = getKey('vadv', vad, ky = tracers(:)%keys)
-      hadv(1:nqo + nqCO2) = had(:); hadv(1 + nqo + nqCO2:nqtrue) = hadv_inca
-      vadv(1:nqo + nqCO2) = vad(:); vadv(1 + nqo + nqCO2:nqtrue) = vadv_inca
-      CALL MOVE_ALLOC(FROM = ttr, TO = tracers)
-      DO iq = 1, nqtrue
-        t1 => tracers(iq)
-        CALL addKey('name', t1%name, t1%keys)
-        CALL addKey('component', t1%component, t1%keys)
-        CALL addKey('parent', t1%parent, t1%keys)
-        CALL addKey('phase', t1%phase, t1%keys)
-      END DO
-      IF(setGeneration(tracers)) CALL abort_physic(modname, 'See below', 1) !- SET FIELDS %iGeneration, %gen0Name
-      DEALLOCATE(had, hadv_inca, vad, vadv_inca, conv_flg_inca, pbl_flg_inca, solsym_inca)
- END IF
-      !---------------------------------------------------------------------------------------------------------------------------
-    ELSE                                                              !=== OTHER CASES (OLD OR NEW FORMAT, NO INCA MODULE)
-      !---------------------------------------------------------------------------------------------------------------------------
-      nqtrue = SIZE(tracers)                                                                               !--- "true" tracers
-   nqo    =      COUNT(tracers(:)%component == 'lmdz' .AND. delPhase(tracers(:)%name)     == 'H2O')     !--- Water phases
-   nbtr = nqtrue-COUNT(tracers(:)%component == 'lmdz' .AND. delPhase(tracers(:)%gen0Name) == 'H2O')     !--- Passed to phytrac
-   nqCO2  =      COUNT( [type_trac == 'inco', type_trac == 'co2i'] )
-      IF (CPPKEY_INCA) THEN
-        nqINCA = COUNT(tracers(:)%component == 'inca')
-      END IF
-      IF(getKey('hadv', hadv, ky=tracers(:)%keys)) CALL abort_physic(modname, 'missing key "hadv"', 1)
-   IF(getKey('vadv', vadv, ky=tracers(:)%keys)) CALL abort_physic(modname, 'missing key "vadv"', 1)
-      !---------------------------------------------------------------------------------------------------------------------------
+    END IF
+    CALL msg('No tracers description file(s) reading needed: already done', modname, .NOT.lInit.AND.is_master)
+    !##############################################################################################################################
+
+    !==============================================================================================================================
+    ! 1) Get various numbers: "nqtrue" (first order only tracers), "nqo" (water phases), 'nbtr' (tracers passed to physics), etc.
+    !==============================================================================================================================
+    nqtrue = SIZE(tracers)                                                                               !--- "true" tracers
+    nqo = COUNT(tracers(:)%component == 'lmdz' .AND. delPhase(tracers(:)%name)     == 'H2O')     !--- Water phases
+    nbtr = nqtrue - COUNT(tracers(:)%component == 'lmdz' .AND. delPhase(tracers(:)%gen0Name) == 'H2O')     !--- Passed to phytrac
+    nqCO2 = COUNT([type_trac == 'inco', type_trac == 'co2i'])
+    IF (CPPKEY_INCA) THEN
+      nqINCA = COUNT(tracers(:)%component == 'inca')
     END IF
     !---------------------------------------------------------------------------------------------------------------------------
@@ -326,4 +286,7 @@
       ! 2) Calculate nqtot, number of tracers needed (greater if advection schemes 20 or 30 have been chosen).
       !==============================================================================================================================
+      IF(getKey('hadv', hadv, ky = tracers(:)%keys)) CALL abort_physic(modname, 'missing key "hadv"', 1)
+      IF(getKey('vadv', vadv, ky = tracers(:)%keys)) CALL abort_physic(modname, 'missing key "vadv"', 1)
+
       DO iq = 1, nqtrue
         IF(hadv(iq)<20 .OR. (ANY(hadv(iq)==[20, 30]) .AND. hadv(iq)==vadv(iq))) CYCLE
@@ -360,5 +323,5 @@
         t1%longName = t1%name; IF(iad > 0) t1%longName = TRIM(t1%name) // descrq(iad)
         t1%isAdvected = iad >= 0
-        t1%isInPhysics= delPhase(t1%gen0Name) /= 'H2O' .OR. t1%component /= 'lmdz' !=== MORE EXCEPTIONS ? CO2i, SURSAT CLOUD H2O
+        t1%isInPhysics = delPhase(t1%gen0Name) /= 'H2O' .OR. t1%component /= 'lmdz' !=== MORE EXCEPTIONS ? CO2i, SURSAT CLOUD H2O
         ttr(iq) = t1
 
@@ -370,9 +333,9 @@
         ttr(jq + 1:jq + nm) = t1
         ttr(jq + 1:jq + nm)%name = [(TRIM(t1%name) // '-' // TRIM(suff(im)), im = 1, nm) ]
-        ttr(jq+1:jq+nm)%gen0Name    = [ (TRIM(t1%name)    //'-'//TRIM(suff(im)), im=1, nm) ]
+        ttr(jq + 1:jq + nm)%gen0Name = [ (TRIM(t1%name) // '-' // TRIM(suff(im)), im = 1, nm) ]
         ttr(jq + 1:jq + nm)%parent = [(TRIM(t1%parent) // '-' // TRIM(suff(im)), im = 1, nm) ]
         ttr(jq + 1:jq + nm)%longName = [(TRIM(t1%longName) // '-' // TRIM(suff(im)), im = 1, nm) ]
-        ttr(jq + 1:jq + nm)%isAdvected = [(.FALSE., im=1, nm) ]
-      ttr(jq+1:jq+nm)%isInPhysics = [ (.FALSE., im = 1, nm) ]
+        ttr(jq + 1:jq + nm)%isAdvected = [(.FALSE., im = 1, nm) ]
+        ttr(jq + 1:jq + nm)%isInPhysics = [ (.FALSE., im = 1, nm) ]
         jq = jq + nm
       END DO
@@ -404,5 +367,5 @@
     !--- Convection / boundary layer activation for all tracers
     IF(.NOT.ALLOCATED(conv_flg)) ALLOCATE(conv_flg(nbtr)); conv_flg(1:nbtr) = 1
-    IF(.NOT.ALLOCATED( pbl_flg)) ALLOCATE(pbl_flg(nbtr));  pbl_flg(1:nbtr) = 1
+    IF(.NOT.ALLOCATED(pbl_flg)) ALLOCATE(pbl_flg(nbtr));  pbl_flg(1:nbtr) = 1
 
     !--- Note: nqtottr can differ from nbtr when nmom/=0
@@ -412,4 +375,5 @@
 
     !=== DISPLAY THE RESULTS
+    IF(.NOT.is_master) RETURN
     CALL msg('nqo    = ' // TRIM(int2str(nqo)), modname)
     CALL msg('nbtr   = ' // TRIM(int2str(nbtr)), modname)
@@ -423,21 +387,20 @@
     END IF
     t => tracers
-    CALL msg('Information stored in '//TRIM(modname)//' :', modname)
+    CALL msg('Information stored in ' // TRIM(modname) // ' :', modname)
     IF(dispTable('isssssssssiiiiiiii', ['iq  ', 'name', 'lNam', 'g0Nm', 'prnt', 'type', 'phas', 'comp', &
             'isPh', 'isAd', 'iGen', 'iqPr', 'nqDe', 'nqCh', 'iGrp', 'iNam', 'iZon', 'iPha'], &
             cat(t%name, t%longName, t%gen0Name, t%parent, t%type, t%phase, t%component, &
-                                                         bool2str(t%isInPhysics), bool2str(t%isAdvected)), &
+                    bool2str(t%isInPhysics), bool2str(t%isAdvected)), &
             cat([(iq, iq = 1, nqtot)], t%iGeneration, t%iqParent, t%nqDescen, t%nqChildren, t%iso_iGroup, &
                     t%iso_iName, t%iso_iZone, t%iso_iPhase), nColMax = maxTableWidth, nHead = 2, sub = modname))   &
             CALL abort_physic(modname, "problem with the tracers table content", 1)
-    IF(niso > 0) THEN
-      CALL msg('Where, for isotopes family "' // TRIM(isotope%parent) // '":', modname)
-      CALL msg('  isoKeys%name = ' // strStack(isoKeys%name), modname)
-      CALL msg('  isoName = ' // strStack(isoName), modname)
-      CALL msg('  isoZone = ' // strStack(isoZone), modname)
-      CALL msg('  isoPhas = ' // TRIM(isoPhas), modname)
-    ELSE
-      CALL msg('No isotopes identified.', modname)
-    END IF
+    CALL msg('No isotopes identified.', modname, nbIso == 0)
+    IF(nbIso == 0) RETURN
+    CALL msg('For isotopes family "H2O":', modname)
+    CALL msg('  isoKeys%name = ' // strStack(isoKeys%name), modname)
+    CALL msg('  isoName = ' // strStack(isoName), modname)
+    CALL msg('  isoZone = ' // strStack(isoZone), modname)
+    CALL msg('  isoPhas = ' // TRIM(isoPhas), modname)
+
 
 #ifdef ISOVERIF
@@ -463,5 +426,4 @@
       END IF
     END IF
-    CALL msg('end', modname)
 
   END SUBROUTINE init_infotrac_phy
Index: /LMDZ6/branches/Amaury_dev/libf/phylmd/phys_local_var_mod.F90
===================================================================
--- /LMDZ6/branches/Amaury_dev/libf/phylmd/phys_local_var_mod.F90	(revision 5229)
+++ /LMDZ6/branches/Amaury_dev/libf/phylmd/phys_local_var_mod.F90	(revision 5230)
@@ -414,5 +414,5 @@
       REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: h1_diag
       REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: xtrunoff_diag
-!$OMP THREADPRIVATE(h1_diagv,xtrunoff_diag)
+!$OMP THREADPRIVATE(h1_diag,xtrunoff_diag)
       REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zxfxtcalving
 !$OMP THREADPRIVATE(zxfxtcalving)
