Index: /readTracFiles_mod.f90
===================================================================
--- /readTracFiles_mod.f90	(revision 1)
+++ /readTracFiles_mod.f90	(revision 2)
@@ -1,7 +1,7 @@
 MODULE readTracFiles_mod
 
-  USE strings_mod, ONLY: msg, testFile,  strFind, strStack, strReduce,  strHead, strCount,   find, dispTable, fmsg, &
-          removeComment, cat, checkList, strIdx,  strParse, strReplace, strTail, reduceExpr, test, modname, get_in
-  USE trac_types_mod, ONLY : tra, iso, db, kys
+  USE strings_mod, ONLY:   msg, testFile,  strFind, strStack, strReduce,  strHead, strCount,   find, maxlen, fmsg, &
+            removeComment, cat, checkList, strIdx,  strParse, strReplace, strTail, reduceExpr, test, get_in, dispTable
+  USE trac_types_mod, ONLY : trac_type, isot_type, keys_type
 
   IMPLICIT NONE
@@ -10,18 +10,18 @@
 
   PUBLIC :: initIsotopes
-  PUBLIC :: readTracersFiles, aliasTracer, tracersSubset, indexUpdate     !--- TOOLS ASSOCIATED TO TRACERS  DESCRIPTORS
-  PUBLIC :: readIsotopesFile                                              !--- TOOLS ASSOCIATED TO ISOTOPES DESCRIPTORS
-  PUBLIC :: getKey_init, getKey, setDirectKeys                            !--- FUNCTIONS TO GET KEYS FROM tracers & isotopes
-
-  PUBLIC :: known_phases, old_phases, nphases, phases_names, phases_sep, &!--- VARIABLES RELATED TO THE PHASES
-            delPhase, addPhase                                            !--- ROUTINES TO ADD/REMOVE PHASE TO/FROM A NAME
-
-  PUBLIC :: tran0, idxAncestor, ancestor                                  !--- GEN 0 TRACER + TOOLS FOR GENERATIONS
-
-!------------------------------------------------------------------------------------------------------------------------------
-  TYPE db                                                            !=== TYPE FOR TRACERS SECTION
-    CHARACTER(LEN=256)     :: name                                   !--- Section name
-    TYPE(tra), ALLOCATABLE :: trac(:)                                !--- Tracers descriptors
-  END TYPE db
+  PUBLIC :: readTracersFiles, aliasTracer, tracersSubset, indexUpdate!--- TOOLS ASSOCIATED TO TRACERS  DESCRIPTORS
+  PUBLIC :: readIsotopesFile                                         !--- TOOLS ASSOCIATED TO ISOTOPES DESCRIPTORS
+  PUBLIC :: getKey_init, getKey, setDirectKeys                       !--- GET/SET KEYS FROM/TO tracers & isotopes
+
+  PUBLIC :: known_phases, old_phases, nphases, phases_names, &       !--- VARIABLES RELATED TO THE PHASES
+            phases_sep, delPhase, addPhase                           !--- + ROUTINES TO ADD/REMOVE PHASE TO/FROM A NAME
+
+  PUBLIC :: tran0, idxAncestor, ancestor                             !--- GENERATION 0 TRACER + TOOLS FOR GENERATIONS
+
+!------------------------------------------------------------------------------------------------------------------------------
+  TYPE :: dataBase_type                                              !=== TYPE FOR TRACERS SECTION
+    CHARACTER(LEN=maxlen)  :: name                                   !--- Section name
+    TYPE(trac_type), ALLOCATABLE :: trac(:)                          !--- Tracers descriptors
+  END TYPE dataBase_type
 !------------------------------------------------------------------------------------------------------------------------------
   INTERFACE getKey
@@ -29,5 +29,5 @@
   END INTERFACE getKey
 !------------------------------------------------------------------------------------------------------------------------------
-  INTERFACE tracersSubset; MODULE PROCEDURE trSubset_Indx, trSubset_Name, trSubset_Nam1; END INTERFACE tracersSubset
+  INTERFACE tracersSubset; MODULE PROCEDURE trSubset_Indx, trSubset_Name, trSubset_gen0Name; END INTERFACE tracersSubset
   INTERFACE idxAncestor;   MODULE PROCEDURE idxAncestor_1, idxAncestor_m; END INTERFACE idxAncestor
   INTERFACE    ancestor;   MODULE PROCEDURE    ancestor_1,    ancestor_m; END INTERFACE    ancestor
@@ -36,13 +36,13 @@
 
   !=== MAIN DATABASE: files sections descriptors
-  TYPE(db), SAVE, ALLOCATABLE, TARGET :: dBase(:)
+  TYPE(dataBase_type), SAVE, ALLOCATABLE, TARGET :: dBase(:)
 
   !--- SOME PARAMETERS THAT ARE NOT LIKELY TO CHANGE OFTEN
-  CHARACTER(LEN=256), SAVE      :: tran0        = 'air'              !--- Default transporting fluid
-  CHARACTER(LEN=256), PARAMETER :: old_phases   = 'vli'              !--- Old phases for water (no separator)
-  CHARACTER(LEN=256), PARAMETER :: known_phases = 'gls'              !--- Known phases initials
-  INTEGER,            PARAMETER :: nphases = LEN_TRIM(known_phases)  !--- Number of phases
-  CHARACTER(LEN=256), SAVE      :: phases_names(nphases) &           !--- Known phases names
-                                 = ['gaseous', 'liquid ', 'solid  ']
+  CHARACTER(LEN=maxlen), SAVE      :: tran0        = 'air'           !--- Default transporting fluid
+  CHARACTER(LEN=maxlen), PARAMETER :: old_phases   = 'vli'           !--- Old phases for water (no separator)
+  CHARACTER(LEN=maxlen), PARAMETER :: known_phases = 'gls'           !--- Known phases initials
+  INTEGER,               PARAMETER :: nphases=LEN_TRIM(known_phases) !--- Number of phases
+  CHARACTER(LEN=maxlen), SAVE      :: phases_names(nphases) &        !--- Known phases names
+                                = ['gaseous', 'liquid ', 'solid  ']
   CHARACTER(LEN=1),   SAVE      :: phases_sep  =  '_'                !--- Phase separator
   LOGICAL,            SAVE      :: tracs_merge = .TRUE.              !--- Merge/stack tracers lists
@@ -50,7 +50,8 @@
 
   !=== LOCAL COPIES OF THE TRACERS AND ISOTOPES DESCRIPTORS, USED BY getKey (INITIALIZED IN getKey_init)
-  TYPE(tra), ALLOCATABLE, TARGET, SAVE ::  tracers(:)
-  TYPE(iso), ALLOCATABLE, TARGET, SAVE :: isotopes(:)
-
+  TYPE(trac_type), ALLOCATABLE, TARGET, SAVE ::  tracers(:)
+  TYPE(isot_type), ALLOCATABLE, TARGET, SAVE :: isotopes(:)
+
+  CHARACTER(LEN=maxlen) :: modname
 
 CONTAINS
@@ -73,23 +74,23 @@
 !=== FUNCTION RETURN VALUE "lerr" IS FALSE IN CASE SOMETHING WENT WRONG.
 !=== ABOUT THE KEYS:
-!     * The "keys" component (of type kys) is in principle enough to store everything we could need.
+!     * The "keys" component (of type keys_type) is in principle enough to store everything we could need.
 !     But some variables are stored as direct-access keys to make the code more readable and because they are used often.
 !     * Most of the direct-access keys are set in this module, but some are not (lnam, iadv and itr for example).
 !     * Some of the direct-access keys must be updated (using the routine "setDirectKeys") is a subset of "tracers(:)"
-!     is extracted: the indexes are no longer valid for a subset (examples: tracers(:)iprnt or tracers(:)%ichld).
+!     is extracted: the indexes are no longer valid for a subset (examples: tracers(:)%iqParent or tracers(:)%ichld).
 !     * If you need to convert a %key/%val pair into a direct-access key, add the corresponding line in "setDirectKeys".
 !==============================================================================================================================
 LOGICAL FUNCTION readTracersFiles(type_trac, fType, tracs) RESULT(lerr)
 !------------------------------------------------------------------------------------------------------------------------------
-  CHARACTER(LEN=*),       INTENT(IN)  :: type_trac                    !--- List of components used
-  INTEGER,                INTENT(OUT) :: fType                        !--- Type of input file found
-  TYPE(tra), ALLOCATABLE, INTENT(OUT) :: tracs(:)
-  CHARACTER(LEN=256),     ALLOCATABLE ::  s(:), sections(:), trac_files(:)
-  CHARACTER(LEN=256)   :: str, fname, mesg
-  INTEGER              :: is, nsec, ierr, it, ntrac, ns, ip
-  LOGICAL, ALLOCATABLE :: ll(:), lGen3(:)
+  CHARACTER(LEN=*),             INTENT(IN)  :: type_trac              !--- List of components used
+  INTEGER,                      INTENT(OUT) :: fType                  !--- Type of input file found
+  TYPE(trac_type), ALLOCATABLE, INTENT(OUT) :: tracs(:)
+  CHARACTER(LEN=maxlen),  ALLOCATABLE ::  s(:), sections(:), trac_files(:)
+  CHARACTER(LEN=maxlen) :: str, fname, mesg
+  INTEGER               :: is, nsec, ierr, it, ntrac, ns, ip
+  LOGICAL, ALLOCATABLE  :: ll(:), lGen3(:)
 !------------------------------------------------------------------------------------------------------------------------------
   lerr = .FALSE.
-!  modname = 'readTracersFiles'
+  modname = 'readTracersFiles'
   IF(.NOT.ALLOCATED(dBase)) ALLOCATE(dBase(0))
 
@@ -111,8 +112,8 @@
 
   !--- TELLS WHAT WAS IS ABOUT TO BE USED
-  IF( fmsg(fType==0, 'No adequate tracers description file(s) found ; default values will be used')) RETURN
-  CALL msg(fType==1, 'Trying to read old-style tracers description file "traceur.def"')
-  CALL msg(fType==2, 'Trying to read the new style multi-sections tracers description file "tracer.def"')
-  CALL msg(fType==3, 'Trying to read the new style single section tracers description files "tracer_*.def"')
+  IF (fmsg('No adequate tracers description file(s) found ; default values will be used',          modname, fType==0)) RETURN
+  CALL msg('Trying to read old-style tracers description file "traceur.def"',                      modname, fType==1)
+  CALL msg('Trying to read the new style multi-sections tracers description file "tracer.def"',    modname, fType==2)
+  CALL msg('Trying to read the new style single section tracers description files "tracer_*.def"', modname, fType==3)
 
   !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -124,5 +125,5 @@
     !--- GET THE TRACERS NUMBER
     READ(90,'(i3)',IOSTAT=ierr)ntrac                                 !--- Number of lines/tracers
-    IF(test(fmsg(ierr /= 0, 'Invalid format for "'//TRIM(fname)//'"'), lerr)) RETURN
+    IF(test(fmsg('Invalid format for "'//TRIM(fname)//'"', modname, ierr /= 0), lerr)) RETURN
 
     !--- READ THE REMAINING LINES: <hadv> <vadv> <tracer> [<transporting fluid>]
@@ -130,23 +131,23 @@
     DO it=1,ntrac                                                    !=== READ RAW DATA: loop on the line/tracer number
       READ(90,'(a)',IOSTAT=ierr) str
-      IF(test(fmsg(ierr>0, 'Invalid format for "' //TRIM(fname)//'"'), lerr)) RETURN
-      IF(test(fmsg(ierr<0, 'Not enough lines in "'//TRIM(fname)//'"'), lerr)) RETURN
+      IF(test(fmsg('Invalid format for "' //TRIM(fname)//'"', modname, ierr>0), lerr)) RETURN
+      IF(test(fmsg('Not enough lines in "'//TRIM(fname)//'"', modname, ierr<0), lerr)) RETURN
       ll = strParse(str, ' ', s, n=ns)
       tracs(it)%keys%key = ['hadv', 'vadv']
       tracs(it)%keys%val = s(1:2)
-      CALL msg(ns == 3 .AND. it == 1, 'This file is for air tracers only')
-      CALL msg(ns == 4 .AND. it == 1, 'This files specifies the transporting fluid')
-      tracs(it)%name = s(3); tracs(it)%phas = known_phases(1:1)      !--- Default: name, gazeous phase "g"
+      CALL msg('This file is for air tracers only',           modname, ns == 3 .AND. it == 1)
+      CALL msg('This files specifies the transporting fluid', modname, ns == 4 .AND. it == 1)
+      tracs(it)%name = s(3); tracs(it)%phase = known_phases(1:1)     !--- Default: name, gazeous phase "g"
       DO ip = 1, nphases                                             !--- Deal with old water names
         IF(s(3) /= 'H2O'//old_phases(ip:ip)) CYCLE
-        tracs(it)%phas = known_phases(ip:ip); tracs(it)%name = 'H2O'//phases_sep//TRIM(tracs(it)%phas)
+        tracs(it)%phase = known_phases(ip:ip); tracs(it)%name = 'H2O'//phases_sep//TRIM(tracs(it)%phase)
       END DO
-      tracs(it)%prnt = tran0                                         !--- Default transporting fluid: Air
-      IF(ns == 4) tracs(it)%prnt = s(4)                              !--- Transporting fluid name
+      tracs(it)%parent = tran0                                       !--- Default transporting fluid: Air
+      IF(ns == 4) tracs(it)%parent = s(4)                            !--- Transporting fluid name
     END DO
     CLOSE(90)
 
-    lGen3 = tracs%igen==3
-    CALL setGeneration(tracs)                                        !--- Determine tracs(:)%igen values
+    lGen3 = tracs%iGeneration==3
+    CALL setGeneration(tracs)                                        !--- Determine tracs(:)%iGeneration values
     IF(test(checkTracers(tracs,      fname,fname),lerr)) RETURN      !--- Detect orphans and check phases
     IF(test(checkUnique (tracs,lGen3,fname,fname),lerr)) RETURN      !--- Detect repeated tracers
@@ -160,6 +161,6 @@
 
   !=== USING NEW FORMAT TRACERS DESCRIPTION FILES WITH POSSIBLY SEVERAL SECTIONS
-  CALL msg(nsec > 1 .AND.      tracs_merge, 'The multiple required sections will be MERGED.')
-  CALL msg(nsec > 1 .AND. .NOT.tracs_merge, 'The multiple required sections will be CUMULATED.')
+  CALL msg('The multiple required sections will be MERGED.',    modname, nsec > 1 .AND.      tracs_merge)
+  CALL msg('The multiple required sections will be CUMULATED.', modname, nsec > 1 .AND. .NOT.tracs_merge)
 
   !=== FEED THE DATABASE WITH THE RAW CONTENT OF THE FILE
@@ -191,9 +192,9 @@
   INTEGER,  ALLOCATABLE :: ixf(:)                                    !--- File index for each section of the expanded list
   LOGICAL,  ALLOCATABLE :: lTg(:)                                    !--- Tagging tracers mask
-  CHARACTER(LEN=256)    :: fnm, snm
+  CHARACTER(LEN=maxlen) :: fnm, snm, modname
   INTEGER               :: idb, i
   LOGICAL :: ll
 !------------------------------------------------------------------------------------------------------------------------------
-
+  modname = 'feedDBase'
   !=== READ THE REQUIRED SECTIONS
   ll = strCount(snames, ',', ndb)                                    !--- Number of sections for each file
@@ -219,5 +220,6 @@
 
   !=== DISPLAY BASIC INFORMATION
-  lerr = ANY([(dispTraSection('Expanded list for section "'//TRIM(dBase(idb)%name)//'"',dBase(idb)%name), idb=1, SIZE(dBase))])
+  lerr = ANY([( dispTraSection('Expanded list for section "'//TRIM(dBase(idb)%name)//'"', dBase(idb)%name, modname), &
+                idb=1, SIZE(dBase) )])
 END FUNCTION feedDBase
 !------------------------------------------------------------------------------------------------------------------------------
@@ -230,7 +232,7 @@
   CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: defName                  !--- Special section (default values) name
 !------------------------------------------------------------------------------------------------------------------------------
-  TYPE(db),           ALLOCATABLE :: tdb(:)
-  CHARACTER(LEN=256), ALLOCATABLE :: sec(:)
-  INTEGER,            ALLOCATABLE ::  ix(:)
+  TYPE(dataBase_type),   ALLOCATABLE :: tdb(:)
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: sec(:)
+  INTEGER,               ALLOCATABLE ::  ix(:)
   INTEGER :: n0, idb, ndb, i, j
   LOGICAL :: ll
@@ -252,10 +254,10 @@
 SUBROUTINE readSections_all()
 !------------------------------------------------------------------------------------------------------------------------------
-  CHARACTER(LEN=256), ALLOCATABLE ::  s(:), v(:)
-  TYPE(tra),          ALLOCATABLE :: tt(:)
-  TYPE(tra)           :: tmp
-  CHARACTER(LEN=1024) :: str
-  CHARACTER(LEN=256)  :: secn
-  INTEGER             :: ierr, n
+  CHARACTER(LEN=maxlen), ALLOCATABLE ::  s(:), v(:)
+  TYPE(trac_type),       ALLOCATABLE :: tt(:)
+  TYPE(trac_type)       :: tmp
+  CHARACTER(LEN=1024)   :: str
+  CHARACTER(LEN=maxlen) :: secn
+  INTEGER               :: ierr, n
 !------------------------------------------------------------------------------------------------------------------------------
   IF(.NOT.ALLOCATED(dBase)) ALLOCATE(dBase(0))
@@ -280,8 +282,8 @@
       ll = strParse(str,' ', keys = s, vals = v, n = n)              !--- Parse <key>=<val> pairs
       tt = dBase(ndb)%trac(:)
-      tmp%name = s(1); tmp%comp=secn; tmp%keys = kys(s(1), s(2:n), v(2:n))
+      tmp%name = s(1); tmp%component=secn; tmp%keys = keys_type(s(1), s(2:n), v(2:n))
       dBase(ndb)%trac = [tt(:), tmp]
       DEALLOCATE(tt)
-!      dBase(ndb)%trac = [dBase(ndb)%trac(:), tra(name=s(1), comp=secn, keys=kys(s(1), s(2:n), v(2:n)))]
+!      dBase(ndb)%trac = [dBase(ndb)%trac(:), tra(name=s(1), comp=secn, keys=keys_type(s(1), s(2:n), v(2:n)))]
     END IF
   END DO
@@ -300,9 +302,9 @@
 ! Purpose: Add the keys from virtual tracer named "defName" (if any) and remove this virtual tracer.
 !------------------------------------------------------------------------------------------------------------------------------
-  TYPE(tra), ALLOCATABLE, TARGET, INTENT(INOUT) :: t(:)
-  CHARACTER(LEN=*),               INTENT(IN)    :: defName
+  TYPE(trac_type), ALLOCATABLE, TARGET, INTENT(INOUT) :: t(:)
+  CHARACTER(LEN=*),                     INTENT(IN)    :: defName
   INTEGER :: jd, it, k
-  TYPE(kys), POINTER :: ky
-  TYPE(tra), ALLOCATABLE :: tt(:)
+  TYPE(keys_type), POINTER :: ky
+  TYPE(trac_type), ALLOCATABLE :: tt(:)
   jd = strIdx(t(:)%name, defName)
   IF(jd == 0) RETURN
@@ -321,10 +323,10 @@
 !          Substitute the keys locally (for the current tracer) if the flag "lSubLocal" is .TRUE.
 !------------------------------------------------------------------------------------------------------------------------------
-  TYPE(tra), ALLOCATABLE, TARGET, INTENT(INOUT) :: t(:)
-  CHARACTER(LEN=*),               INTENT(IN)    :: defName
-  LOGICAL,                        INTENT(IN)    :: lSubLocal
+  TYPE(trac_type), ALLOCATABLE, TARGET, INTENT(INOUT) :: t(:)
+  CHARACTER(LEN=*),                     INTENT(IN)    :: defName
+  LOGICAL,                              INTENT(IN)    :: lSubLocal
   INTEGER :: i0, it, ik
-  TYPE(kys), POINTER     :: k0, ky
-  TYPE(tra), ALLOCATABLE :: tt(:)
+  TYPE(keys_type), POINTER     :: k0, ky
+  TYPE(trac_type), ALLOCATABLE :: tt(:)
   i0 = strIdx(t(:)%name, defName)
   IF(i0 == 0) RETURN
@@ -353,12 +355,13 @@
 !        * Default values are provided for these keys because they are necessary.
 !------------------------------------------------------------------------------------------------------------------------------
-  TYPE(tra),     ALLOCATABLE, INTENT(INOUT) :: tr(:)                 !--- Tracer derived type vector
-  CHARACTER(LEN=*),           INTENT(IN)    :: sname
-  CHARACTER(LEN=*), OPTIONAL, INTENT(IN)    :: fname
-  TYPE(tra),          ALLOCATABLE :: ttr(:)
-  CHARACTER(LEN=256), ALLOCATABLE :: ta(:), pa(:)
-  CHARACTER(LEN=256) :: msg1
+  TYPE(trac_type), ALLOCATABLE, INTENT(INOUT) :: tr(:)                 !--- Tracer derived type vector
+  CHARACTER(LEN=*),             INTENT(IN)    :: sname
+  CHARACTER(LEN=*), OPTIONAL,   INTENT(IN)    :: fname
+  TYPE(trac_type),       ALLOCATABLE :: ttr(:)
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: ta(:), pa(:)
+  CHARACTER(LEN=maxlen) :: msg1, modname
   INTEGER :: it, nt, iq, nq, itr, ntr, ipr, npr, i
   LOGICAL :: ll
+  modname = 'expandSection'
   lerr = .FALSE.
   nt = SIZE(tr)
@@ -368,11 +371,11 @@
   !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     !--- Extract useful keys: parent name, type, component name
-    tr(it)%prnt = fgetKey(it, 'parent', tr(:)%keys,  tran0  )
-    tr(it)%type = fgetKey(it, 'type'  , tr(:)%keys, 'tracer')
-    tr(it)%comp = sname
+    tr(it)%parent    = fgetKey(it, 'parent', tr(:)%keys,  tran0  )
+    tr(it)%type      = fgetKey(it, 'type'  , tr(:)%keys, 'tracer')
+    tr(it)%component = sname
 
     !--- Determine the number of tracers and parents ; coherence checking
-    ll = strCount(tr(it)%name, ',', ntr)
-    ll = strCount(tr(it)%prnt, ',', npr)
+    ll = strCount(tr(it)%name,   ',', ntr)
+    ll = strCount(tr(it)%parent, ',', npr)
 
     !--- Tagging tracers only can have multiple parents
@@ -380,5 +383,5 @@
       msg1 = 'Check section "'//TRIM(sname)//'"'
       IF(PRESENT(fname)) msg1=TRIM(msg1)//' in file "'//TRIM(fname)//'"'
-      CALL msg(TRIM(msg1)//': "'//TRIM(tr(it)%name)//'" has several parents but is not a tag'); RETURN
+      CALL msg(TRIM(msg1)//': "'//TRIM(tr(it)%name)//'" has several parents but is not a tag', modname); RETURN
     END IF
     nq = nq + ntr*npr                 
@@ -394,10 +397,10 @@
   !++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     ll = strParse(tr(it)%name, ',', ta, n=ntr)                       !--- Number of tracers
-    ll = strParse(tr(it)%prnt, ',', pa, n=npr)                       !--- Number of parents
+    ll = strParse(tr(it)%parent, ',', pa, n=npr)                     !--- Number of parents
     DO ipr=1,npr                                                     !--- Loop on parents list elts
       DO itr=1,ntr                                                   !--- Loop on tracers list elts
         i = iq+itr-1+(ipr-1)*ntr
-        ttr(i)%name = ta(itr); ttr(i)%prnt = pa(ipr)
-        ttr(i)%keys = kys(ta(itr), tr(it)%keys%key, tr(it)%keys%val)
+        ttr(i)%name = ta(itr); ttr(i)%parent = pa(ipr)
+        ttr(i)%keys = keys_type(ta(itr), tr(it)%keys%key, tr(it)%keys%val)
       END DO
     END DO
@@ -421,25 +424,25 @@
 !------------------------------------------------------------------------------------------------------------------------------
 ! Arguments:
-  TYPE(tra), INTENT(INOUT) :: tr(:)                                  !--- Tracer derived type vector
+  TYPE(trac_type), INTENT(INOUT) :: tr(:)                            !--- Tracer derived type vector
 !------------------------------------------------------------------------------------------------------------------------------
 ! Local variables:
   INTEGER :: iq, nq, ig
-  LOGICAL,            ALLOCATABLE :: lg(:)
-  CHARACTER(LEN=256), ALLOCATABLE :: prn(:)
-!------------------------------------------------------------------------------------------------------------------------------
-  tr(:)%igen = 0                                                     !--- error if 0
+  LOGICAL,               ALLOCATABLE :: lg(:)
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: prn(:)
+!------------------------------------------------------------------------------------------------------------------------------
+  tr(:)%iGeneration = 0                                              !--- error if 0
   nq = SIZE(tr, DIM=1)                                               !--- Number of tracers lines
-  lg = tr(:)%prnt == tran0                                           !--- First generation tracers flag
-  WHERE(lg) tr(:)%igen = 1                                           !--- First generation tracers
+  lg = tr(:)%parent == tran0                                         !--- First generation tracers flag
+  WHERE(lg) tr(:)%iGeneration = 1                                    !--- First generation tracers
 
   !=== Determine generation for each tracer
   ig=0; prn = [tran0]
   DO                                                                 !--- Update current generation flag
-    IF(ig/=0) prn = PACK( tr(:)%name, MASK=tr(:)%igen == ig)
-    lg(:) = [(ANY(prn(:) == tr(iq)%prnt), iq=1, nq)]                 !--- Current generation tracers flag
+    IF(ig/=0) prn = PACK( tr(:)%name, MASK=tr(:)%iGeneration == ig)
+    lg(:) = [(ANY(prn(:) == tr(iq)%parent), iq=1, nq)]               !--- Current generation tracers flag
     IF( ALL( .NOT. lg ) ) EXIT                                       !--- Empty current generation
-    ig = ig+1; WHERE(lg) tr(:)%igen = ig
-  END DO
-  tr(:)%nam1 = ancestor(tr)                                          !--- First generation ancestor name
+    ig = ig+1; WHERE(lg) tr(:)%iGeneration = ig
+  END DO
+  tr(:)%gen0Name = ancestor(tr)                                      !--- First generation ancestor name
 
 END SUBROUTINE setGeneration
@@ -453,9 +456,9 @@
 !   * check wether the phases are known or not ("g"aseous, "l"iquid or "s"olid so far)
 !------------------------------------------------------------------------------------------------------------------------------
-  TYPE(tra),                  INTENT(IN) :: tr(:)                    !--- Tracer derived type vector
+  TYPE(trac_type),            INTENT(IN) :: tr(:)                    !--- Tracer derived type vector
   CHARACTER(LEN=*),           INTENT(IN) :: sname                    !--- Section name
   CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: fname                    !--- File name
-  CHARACTER(LEN=256) :: mesg
-  CHARACTER(LEN=256) :: bp(SIZE(tr, DIM=1)), pha                     !--- Bad phases list, phases of current tracer
+  CHARACTER(LEN=maxlen) :: mesg
+  CHARACTER(LEN=maxlen) :: bp(SIZE(tr, DIM=1)), pha                  !--- Bad phases list, phases of current tracer
   CHARACTER(LEN=1) :: p
   INTEGER :: ip, np, iq, nq
@@ -466,8 +469,8 @@
 
   !=== CHECK FOR ORPHAN TRACERS
-  IF(test(checkList(tr%name, tr%igen==0, mesg, 'tracers', 'orphan'), lerr)) RETURN
+  IF(test(checkList(tr%name, tr%iGeneration==0, mesg, 'tracers', 'orphan'), lerr)) RETURN
 
   !=== CHECK PHASES
-  DO iq=1,nq; IF(tr(iq)%igen/=1) CYCLE                               !--- Generation 1 only is checked
+  DO iq=1,nq; IF(tr(iq)%iGeneration/=1) CYCLE                        !--- Generation 1 only is checked
     pha = fgetKey(iq, 'phases', tr(:)%keys, 'g')                     !--- Phases
     np = LEN_TRIM(pha); bp(iq)=' '
@@ -475,5 +478,5 @@
     IF(TRIM(bp(iq)) /= '') bp(iq) = TRIM(tr(iq)%name)//': '//TRIM(bp(iq))
   END DO
-  lerr = checkList(bp, tr%igen==1 .AND. bp/='', mesg, 'tracers phases', 'unknown')
+  lerr = checkList(bp, tr%iGeneration==1 .AND. bp/='', mesg, 'tracers phases', 'unknown')
 END FUNCTION checkTracers
 !==============================================================================================================================
@@ -484,5 +487,5 @@
 ! Purpose: Make sure that tracers are not repeated.
 !------------------------------------------------------------------------------------------------------------------------------
-  TYPE(tra),                  INTENT(IN) :: tr(:)                    !--- Tracer derived type vector
+  TYPE(trac_type),            INTENT(IN) :: tr(:)                    !--- Tracer derived type vector
   LOGICAL,                    INTENT(IN) :: lTag(:)                  !--- Tagging tracer flag
   CHARACTER(LEN=*),           INTENT(IN) :: sname                    !--- Section name
@@ -490,7 +493,7 @@
 !------------------------------------------------------------------------------------------------------------------------------
   INTEGER :: ip, np, iq, nq, k
-  LOGICAL, ALLOCATABLE :: ll(:)
-  CHARACTER(LEN=256) :: mesg, tnam, tdup(SIZE(tr,DIM=1))
-  CHARACTER(LEN=1)   :: p
+  LOGICAL, ALLOCATABLE  :: ll(:)
+  CHARACTER(LEN=maxlen) :: mesg, tnam, tdup(SIZE(tr,DIM=1))
+  CHARACTER(LEN=1)      :: p
 !------------------------------------------------------------------------------------------------------------------------------
   mesg = 'Check section "'//TRIM(sname)//'"'
@@ -502,5 +505,5 @@
     ll = tr(:)%name==tnam                                            !--- Mask for current tracer name
     IF(COUNT(ll)==1 ) CYCLE                                          !--- Tracer is not repeated
-    IF(tr(iq)%igen>1) THEN
+    IF(tr(iq)%iGeneration>1) THEN
       tdup(iq) = tnam                                                !--- gen>1: MUST be unique
     ELSE
@@ -524,9 +527,9 @@
 ! Purpose: Expand the phases in the tracers descriptor "tr".
 !------------------------------------------------------------------------------------------------------------------------------
-  TYPE(tra), ALLOCATABLE, INTENT(INOUT) :: tr(:)                     !--- Tracer derived type vector
-!------------------------------------------------------------------------------------------------------------------------------
-  TYPE(tra), ALLOCATABLE :: ttr(:)
-  INTEGER,  ALLOCATABLE ::  i0(:)
-  CHARACTER(LEN=256)    :: nam, pha, trn
+  TYPE(trac_type), ALLOCATABLE, INTENT(INOUT) :: tr(:)               !--- Tracer derived type vector
+!------------------------------------------------------------------------------------------------------------------------------
+  TYPE(trac_type), ALLOCATABLE :: ttr(:)
+  INTEGER,   ALLOCATABLE ::  i0(:)
+  CHARACTER(LEN=maxlen)  :: nam, pha, trn
   INTEGER :: ip, np, iq, jq, nq, it, nt, nc, i, n
   LOGICAL :: lTg, lEx
@@ -535,8 +538,8 @@
   nt = 0
   DO iq = 1, nq                                                      !--- GET THE NUMBER OF TRACERS
-    IF(tr(iq)%igen /= 1) CYCLE
-    nc = COUNT(tr(:)%nam1==tr(iq)%name .AND. tr%igen/=1)             !--- Number of childs of tr(iq)
-    tr(iq)%phas = fgetKey(iq, 'phases', tr(:)%keys)                  !--- Phases list      of tr(iq)
-    np = LEN_TRIM(tr(iq)%phas)                                       !--- Number of phases of tr(iq)
+    IF(tr(iq)%iGeneration /= 1) CYCLE
+    nc = COUNT(tr(:)%gen0Name==tr(iq)%name .AND. tr%iGeneration/=1)  !--- Number of childs of tr(iq)
+    tr(iq)%phase = fgetKey(iq, 'phases', tr(:)%keys)                 !--- Phases list      of tr(iq)
+    np = LEN_TRIM(tr(iq)%phase)                                      !--- Number of phases of tr(iq)
     nt = nt + (1+nc) * np                                            !--- Number of tracers after expansion
   END DO
@@ -545,15 +548,15 @@
   DO iq = 1, nq                                                      !--- Loop on "tr(:)" indexes
     lTg = tr(iq)%type=='tag'                                         !--- Current tracer is a tag
-    i0 = strFind(tr(:)%name, tr(iq)%nam1, n)                         !--- Indexes of first generation ancestor copies
-    np = SUM( [( LEN_TRIM(tr(i0(i))%phas),i=1,n )],1)                !--- Number of phases for current tracer tr(iq)
+    i0 = strFind(tr(:)%name, tr(iq)%gen0Name, n)                     !--- Indexes of first generation ancestor copies
+    np = SUM( [( LEN_TRIM(tr(i0(i))%phase),i=1,n )],1)               !--- Number of phases for current tracer tr(iq)
     lEx = np>1                                                       !--- Need of a phase suffix
-    IF(lTg) lEx=lEx.AND.tr(iq)%igen>1                                !--- No phase suffix for first generation tags
+    IF(lTg) lEx=lEx.AND.tr(iq)%iGeneration>1                         !--- No phase suffix for first generation tags
     DO i=1,n                                                         !=== LOOP ON FIRST GENERATION ANCESTORS
       jq=i0(i)                                                       !--- tr(jq): ith copy of 1st gen. ancestor of tr(iq)
-      IF(tr(iq)%igen==1) jq=iq                                       !--- Generation 1: current tracer phases only
-      pha = tr(jq)%phas                                              !--- Phases list for tr(jq)
+      IF(tr(iq)%iGeneration==1) jq=iq                                !--- Generation 1: current tracer phases only
+      pha = tr(jq)%phase                                             !--- Phases list for tr(jq)
       DO ip=1,LEN_TRIM(pha)                                          !=== LOOP ON PHASES LISTS
         trn=TRIM(tr(iq)%name); nam=trn                               !--- Tracer name (regular case)
-        IF(lTg) nam = TRIM(tr(iq)%prnt)                              !--- Parent name (tagging case)
+        IF(lTg) nam = TRIM(tr(iq)%parent)                            !--- Parent name (tagging case)
         IF(lEx) nam = TRIM(nam)//phases_sep//pha(ip:ip)              !--- Phase extension needed
         IF(lTg) nam = TRIM(nam)//'_'//TRIM(trn)                      !--- <parent>_<name> for tags
@@ -561,12 +564,12 @@
         ttr(it)%name = nam                                           !--- Name with possibly phase suffix
         ttr(it)%keys%name = nam                                      !--- Name inside the keys decriptor
-        ttr(it)%phas = pha(ip:ip)                                    !--- Single phase entry
-        IF(lEx.AND.tr(iq)%igen>1) THEN
-          ttr(it)%prnt = TRIM(ttr(it)%prnt)//phases_sep//pha(ip:ip)
-          ttr(it)%nam1 = TRIM(ttr(it)%nam1)//phases_sep//pha(ip:ip)
+        ttr(it)%phase = pha(ip:ip)                                   !--- Single phase entry
+        IF(lEx.AND.tr(iq)%iGeneration>1) THEN
+          ttr(it)%parent   = TRIM(ttr(it)%parent)//phases_sep//pha(ip:ip)
+          ttr(it)%gen0Name = TRIM(ttr(it)%gen0Name)//phases_sep//pha(ip:ip)
         END IF
         it=it+1
       END DO
-      IF(tr(iq)%igen==1) EXIT                                        !--- Break phase loop for gen 1
+      IF(tr(iq)%iGeneration==1) EXIT                                 !--- Break phase loop for gen 1
     END DO
   END DO
@@ -584,5 +587,5 @@
 !  * lGrowGen == F: tracer + its childs sorted by growing generation, one after the other.
 !------------------------------------------------------------------------------------------------------------------------------
-  TYPE(tra), ALLOCATABLE, INTENT(INOUT) :: tr(:)                     !--- Tracer derived type vector
+  TYPE(trac_type), ALLOCATABLE, INTENT(INOUT) :: tr(:)               !--- Tracer derived type vector
   INTEGER :: ig, ng, iq, jq, n, ix(SIZE(tr)), k
   INTEGER, ALLOCATABLE :: iy(:), iz(:)
@@ -590,7 +593,7 @@
   iq = 1
   IF(lSortByGen) THEN
-    ng = MAXVAL(tr(:)%igen, MASK=.TRUE., DIM=1)                      !--- Number of generations
+    ng = MAXVAL(tr(:)%iGeneration, MASK=.TRUE., DIM=1)               !--- Number of generations
     DO ig = 0, ng                                                    !--- Loop on generations
-      iy = PACK([(k, k=1, SIZE(tr))], MASK=tr(:)%igen==ig)           !--- Generation ig tracers indexes
+      iy = PACK([(k, k=1, SIZE(tr))], MASK=tr(:)%iGeneration==ig)    !--- Generation ig tracers indexes
       n = SIZE(iy)
       ix(iq:iq+n-1) = iy                                             !--- Stack growing generations idxs
@@ -599,11 +602,11 @@
   ELSE
     DO jq = 1, SIZE(tr,DIM=1)                                        !--- Loop on first generation tracers
-      IF(tr(jq)%igen /= 1) CYCLE                                     !--- Skip generations >= 1
+      IF(tr(jq)%iGeneration /= 1) CYCLE                              !--- Skip generations >= 1
       ix(iq) = jq                                                    !--- First generation ancestor index first
       iq = iq + 1
-      iy = strFind(tr(:)%nam1, tr(jq)%name)                          !--- Indexes of "tr(jq)" childs in "tr(:)"
-      ng = MAXVAL(tr(iy)%igen, MASK=.TRUE., DIM=1)                   !--- Generations number of the "tr(jq)" family
+      iy = strFind(tr(:)%gen0Name, tr(jq)%name)                      !--- Indexes of "tr(jq)" childs in "tr(:)"
+      ng = MAXVAL(tr(iy)%iGeneration, MASK=.TRUE., DIM=1)            !--- Generations number of the "tr(jq)" family
       DO ig = 2, ng                                                  !--- Loop   on generations for the tr(jq) family
-        iz = find(tr(iy)%igen, ig, n)                                !--- Indexes of the tracers "tr(iy(:))" of generation "ig"
+        iz = find(tr(iy)%iGeneration, ig, n)                         !--- Indexes of the tracers "tr(iy(:))" of generation "ig"
         ix(iq:iq+n-1) = iy(iz)                                       !--- Same indexes in "tr(:)"
         iq = iq + n
@@ -617,10 +620,11 @@
 !==============================================================================================================================
 LOGICAL FUNCTION mergeTracers(sections, tr) RESULT(lerr)
-  TYPE(db),  TARGET,      INTENT(IN)  :: sections(:)
-  TYPE(tra), ALLOCATABLE, INTENT(OUT) ::       tr(:)
-  TYPE(tra), POINTER     ::   t1(:),   t2(:)
-  INTEGER,  ALLOCATABLE :: ixct(:), ixck(:)
+  TYPE(dataBase_type),  TARGET, INTENT(IN)  :: sections(:)
+  TYPE(trac_type), ALLOCATABLE, INTENT(OUT) ::       tr(:)
+  TYPE(trac_type), POINTER ::   t1(:),   t2(:)
+  INTEGER,     ALLOCATABLE :: ixct(:), ixck(:)
   INTEGER :: is, k1, k2, nk2, i1, i2, nt2
-  CHARACTER(LEN=256) :: s1, v1, v2, tnam, knam
+  CHARACTER(LEN=maxlen) :: s1, v1, v2, tnam, knam, modname
+  modname = 'mergeTracers'
   lerr = .FALSE.
   t1 => sections(1)%trac(:)                                          !--- Alias: first tracers section
@@ -634,6 +638,6 @@
     tr = [tr, PACK(t2, MASK= ixct==0)]                               !--- Append with new tracers
     IF( ALL(ixct == 0) ) CYCLE                                       !--- No common tracers => done
-    CALL msg('Tracers defined in previous sections and duplicated in "'//TRIM(sections(is)%name)//'":')
-    CALL msg( t1(PACK(ixct, MASK = ixct/=0))%name, nmax=128 )        !--- Display duplicates (the 128 first at most)
+    CALL msg('Tracers defined in previous sections and duplicated in "'//TRIM(sections(is)%name)//'":', modname)
+    CALL msg(t1(PACK(ixct, MASK = ixct/=0))%name, modname, nmax=128) !--- Display duplicates (the 128 first at most)
     !--------------------------------------------------------------------------------------------------------------------------
     DO i2=1,nt2; tnam = t2(i2)%name                                  !=== LOOP ON COMMON TRACERS
@@ -644,7 +648,7 @@
       s1=' of "'//TRIM(tnam)//'" in "'//TRIM(sections(is)%name)//'" not matching previous value'
       
-      IF(test(fmsg(t1(i1)%prnt /= t2(i2)%prnt, 'Parent name'//TRIM(s1)), lerr)) RETURN
-      IF(test(fmsg(t1(i1)%type /= t2(i2)%type, 'Type'       //TRIM(s1)), lerr)) RETURN
-      IF(test(fmsg(t1(i1)%igen /= t2(i2)%igen, 'Generation' //TRIM(s1)), lerr)) RETURN
+      IF(test(fmsg('Parent name'//TRIM(s1), modname, t1(i1)%parent      /= t2(i2)%parent),      lerr)) RETURN
+      IF(test(fmsg('Type'       //TRIM(s1), modname, t1(i1)%type        /= t2(i2)%type),        lerr)) RETURN
+      IF(test(fmsg('Generation' //TRIM(s1), modname, t1(i1)%iGeneration /= t2(i2)%iGeneration), lerr)) RETURN
 
       !=== APPEND <key>=<val> PAIRS NOT PREVIOULSLY DEFINED
@@ -657,5 +661,5 @@
 
       !--- KEEP TRACK OF THE COMPONENTS NAMES
-      tr(i1)%comp = TRIM(tr(i1)%comp)//','//TRIM(tr(i2)%comp)
+      tr(i1)%component = TRIM(tr(i1)%component)//','//TRIM(tr(i2)%component)
 
       !--- SELECT COMMON TRACERS WITH DIFFERING KEYS VALUES (PREVIOUS VALUE IS KEPT)
@@ -667,5 +671,5 @@
 
       !--- DISPLAY INFORMATION: OLD VALUES ARE KEPT FOR THE KEYS FOUND IN PREVIOUS AND CURRENT SECTIONS
-      CALL msg('Key(s)'//TRIM(s1))
+      CALL msg('Key(s)'//TRIM(s1), modname)
       DO k2 = 1, nk2                                                 !--- Loop on keys found in both t1(:) and t2(:)
         knam = t2(i2)%keys%key(k2)                                   !--- Name of the current key
@@ -673,5 +677,5 @@
         IF(k1 == 0) CYCLE                                            !--- New keys are skipped
         v1 = t1(i1)%keys%val(k1); v2 = t2(i2)%keys%val(k2)           !--- Key values in t1(:) and t2(:)
-        CALL msg(' * '//TRIM(knam)//'='//TRIM(v2)//' ; previous value kept:'//TRIM(v1))
+        CALL msg(' * '//TRIM(knam)//'='//TRIM(v2)//' ; previous value kept:'//TRIM(v1), modname)
       END DO
       !------------------------------------------------------------------------------------------------------------------------
@@ -686,9 +690,9 @@
 !==============================================================================================================================
 LOGICAL FUNCTION cumulTracers(sections, tr) RESULT(lerr)
-  TYPE(db),  TARGET,      INTENT(IN)  :: sections(:)
-  TYPE(tra), ALLOCATABLE, INTENT(OUT) ::       tr(:)
-  TYPE(tra), POINTER     :: t1(:), t2(:)
+  TYPE(dataBase_type),  TARGET, INTENT(IN)  :: sections(:)
+  TYPE(trac_type), ALLOCATABLE, INTENT(OUT) ::       tr(:)
+  TYPE(trac_type), POINTER     :: t1(:), t2(:)
   INTEGER,   ALLOCATABLE :: nt(:)
-  CHARACTER(LEN=256)     :: tnam, tnam_new
+  CHARACTER(LEN=maxlen)  :: tnam, tnam_new
   INTEGER :: iq, nq, is, ns, nsec
   lerr = .FALSE.                                                     !--- Can't fail ; kept to match "mergeTracer" interface.
@@ -709,5 +713,5 @@
       ns = nt(is)                                                    !--- Number of tracers in the current section
       tr(iq + nq)%name = tnam_new                                    !--- Modify tracer name
-      WHERE(tr(1+nq:ns+nq)%prnt==tnam) tr(1+nq:ns+nq)%prnt=tnam_new  !--- Modify parent name
+      WHERE(tr(1+nq:ns+nq)%parent==tnam) tr(1+nq:ns+nq)%parent=tnam_new  !--- Modify parent name
     !--------------------------------------------------------------------------------------------------------------------------
     END DO
@@ -721,6 +725,6 @@
 !==============================================================================================================================
 SUBROUTINE setDirectKeys(tr)
-  TYPE(tra), INTENT(INOUT) :: tr(:)
-  CALL indexUpdate(tr)                                               !--- Update iparnt and idesc indexes vectors
+  TYPE(trac_type), INTENT(INOUT) :: tr(:)
+  CALL indexUpdate(tr)                                               !--- Update iqParent and iqDescen indexes vectors
 !  DO iq = 1, SIZE(tr)
 !    tr(iq)%keys%<key> = getKey_prv(it, "<key>", tr%keys,  tran0 )   !--- For additional keys
@@ -730,10 +734,9 @@
 
 !==============================================================================================================================
-LOGICAL FUNCTION dispTraSection(message, sname) RESULT(lerr)
-  CHARACTER(LEN=*), INTENT(IN) :: message
-  CHARACTER(LEN=*), INTENT(IN) :: sname
+LOGICAL FUNCTION dispTraSection(message, sname, modname) RESULT(lerr)
+  CHARACTER(LEN=*), INTENT(IN) :: message, sname, modname
   INTEGER :: idb, iq, nq
   INTEGER, ALLOCATABLE :: hadv(:), vadv(:)
-  TYPE(tra), POINTER :: tm(:)
+  TYPE(trac_type), POINTER :: tm(:)
   lerr = .FALSE.
   idb = strIdx(dBase(:)%name, sname); IF(idb == 0) RETURN
@@ -742,7 +745,7 @@
   IF(test(getKeyByName_im('hadv', hadv, tm(:)%name, tm(:)%keys),lerr)) RETURN
   IF(test(getKeyByName_im('vadv', vadv, tm(:)%name, tm(:)%keys),lerr)) RETURN
-  CALL msg(TRIM(message)//':')
+  CALL msg(TRIM(message)//':', modname)
   IF(test(dispTable('iiissis', ['iq        ','hadv      ','vadv      ','short name','parent    ','igen      ','phase     '], &
-                    cat(tm(:)%name,  tm(:)%prnt, tm(:)%phas), cat([(iq, iq=1, nq)],  hadv,  vadv, tm(:)%igen)), lerr)) RETURN
+    cat(tm(:)%name,  tm(:)%parent, tm(:)%phase), cat([(iq, iq=1, nq)],  hadv,  vadv, tm(:)%iGeneration)), lerr)) RETURN
 END FUNCTION dispTraSection
 !==============================================================================================================================
@@ -754,7 +757,7 @@
 !==============================================================================================================================
 FUNCTION aliasTracer(tname, t) RESULT(out)
-  TYPE(tra),         POINTER    :: out
-  CHARACTER(LEN=*),  INTENT(IN) :: tname
-  TYPE(tra), TARGET, INTENT(IN) :: t(:)
+  TYPE(trac_type),         POINTER    :: out
+  CHARACTER(LEN=*),        INTENT(IN) :: tname
+  TYPE(trac_type), TARGET, INTENT(IN) :: t(:)
   INTEGER :: it
   it = strIdx(t(:)%name, tname)
@@ -768,7 +771,7 @@
 !==============================================================================================================================
 FUNCTION trSubset_Indx(trac,idx) RESULT(out)
-  TYPE(tra), ALLOCATABLE             ::  out(:)
-  TYPE(tra), ALLOCATABLE, INTENT(IN) :: trac(:)
-  INTEGER,                INTENT(IN) ::  idx(:)
+  TYPE(trac_type), ALLOCATABLE             ::  out(:)
+  TYPE(trac_type), ALLOCATABLE, INTENT(IN) :: trac(:)
+  INTEGER,                      INTENT(IN) ::  idx(:)
   out = trac(idx)
   CALL indexUpdate(out)
@@ -776,7 +779,7 @@
 !------------------------------------------------------------------------------------------------------------------------------
 FUNCTION trSubset_Name(trac,nam) RESULT(out)
-  TYPE(tra), ALLOCATABLE             ::  out(:)
-  TYPE(tra), ALLOCATABLE, INTENT(IN) :: trac(:)
-  CHARACTER(LEN=*),       INTENT(IN) ::  nam(:)
+  TYPE(trac_type), ALLOCATABLE             ::  out(:)
+  TYPE(trac_type), ALLOCATABLE, INTENT(IN) :: trac(:)
+  CHARACTER(LEN=*),             INTENT(IN) ::  nam(:)
   out = trac(strIdx(trac(:)%name, nam))
   CALL indexUpdate(out)
@@ -788,30 +791,30 @@
 !=== CREATE THE SUBSET OF THE TRACERS DESCRIPTORS LIST "trac" HAVING THE FIRST GENERATION ANCESTOR NAMED "nam" ================
 !==============================================================================================================================
-FUNCTION trSubset_Nam1(trac,nam) RESULT(out)
-  TYPE(tra), ALLOCATABLE             ::  out(:)
-  TYPE(tra), ALLOCATABLE, INTENT(IN) :: trac(:)
-  CHARACTER(LEN=*),       INTENT(IN) ::  nam
-  out = trac(strFind(delPhase(trac(:)%nam1), nam))
+FUNCTION trSubset_gen0Name(trac,nam) RESULT(out)
+  TYPE(trac_type), ALLOCATABLE             ::  out(:)
+  TYPE(trac_type), ALLOCATABLE, INTENT(IN) :: trac(:)
+  CHARACTER(LEN=*),             INTENT(IN) ::  nam
+  out = trac(strFind(delPhase(trac(:)%gen0Name), nam))
   CALL indexUpdate(out)
-END FUNCTION trSubset_Nam1
-!------------------------------------------------------------------------------------------------------------------------------
-
-
-!==============================================================================================================================
-!=== UPDATE THE INDEXES iparnt(:), idesc=(:) AND igen(:) IN THE TRACERS DESCRIPTOR LIST "tr" (USEFULL FOR SUBSETS) ============
+END FUNCTION trSubset_gen0Name
+!------------------------------------------------------------------------------------------------------------------------------
+
+
+!==============================================================================================================================
+!=== UPDATE THE INDEXES iqParent, iqDescend AND iGeneration IN THE TRACERS DESCRIPTOR LIST "tr" (USEFULL FOR SUBSETS) =========
 !==============================================================================================================================
 SUBROUTINE indexUpdate(tr)
-  TYPE(tra), INTENT(INOUT) :: tr(:)
+  TYPE(trac_type), INTENT(INOUT) :: tr(:)
   INTEGER :: iq, ig, ng, ngen
   INTEGER, ALLOCATABLE :: ix(:)
-  tr(:)%iprnt = strIdx( tr(:)%name, tr(:)%prnt )                     !--- Parent index
-  ngen = MAXVAL(tr(:)%igen, MASK=.TRUE.)
+  tr(:)%iqParent = strIdx( tr(:)%name, tr(:)%parent )                !--- Parent index
+  ngen = MAXVAL(tr(:)%iGeneration, MASK=.TRUE.)
   DO iq = 1, SIZE(tr)
-    ng = tr(iq)%igen                                                 !--- Generation of the current tracer
+    ng = tr(iq)%iGeneration                                          !--- Generation of the current tracer
     ix = idxAncestor(tr, igen = ng); ix = PACK(ix, ix/=0)            !--- Indexes of the tracers with ancestor tr(iq)
     !--- Childs indexes in growing generation order
-    tr(iq)%idesc = [( PACK(ix, MASK = tr(ix)%igen == ig), ig = ng+1, ngen)]
-    tr(iq)%ndesc =     SUM(  [( COUNT(tr(ix)%igen == ig), ig = ng+1, ngen)] )
-    tr(iq)%nchld =              COUNT(tr(ix)%igen == ng+1)
+    tr(iq)%iqDescen = [( PACK(ix, MASK = tr(ix)%iGeneration == ig), ig = ng+1, ngen)]
+    tr(iq)%nqDescen =     SUM(  [( COUNT(tr(ix)%iGeneration == ig), ig = ng+1, ngen)] )
+    tr(iq)%nqChilds =              COUNT(tr(ix)%iGeneration == ng+1)
   END DO
 END SUBROUTINE indexUpdate
@@ -820,6 +823,6 @@
   
 !==============================================================================================================================
-!=== READ FILE "fnam" TO APPEND THE "dBase" TRACERS DATABASE WITH AS MUCH SECTIONS AS PARENTS NAMES IN "isot(:)%prnt":     ====
-!===  * Each section dBase(i)%name contains the isotopes "dBase(i)%trac(:)" descending on "dBase(i)%name"="iso(i)%prnt"    ====
+!=== READ FILE "fnam" TO APPEND THE "dBase" TRACERS DATABASE WITH AS MUCH SECTIONS AS PARENTS NAMES IN "isot(:)%parent":   ====
+!===  * Each section dBase(i)%name contains the isotopes "dBase(i)%trac(:)" descending on "dBase(i)%name"="iso(i)%parent"  ====
 !===  * For each isotopes class, the <key>=<val> vector of each tracer is moved into the isotopes descriptor "isot"        ====
 !=== NOTES:                                                                                                                ====
@@ -833,22 +836,23 @@
 !==============================================================================================================================
 LOGICAL FUNCTION readIsotopesFile(fnam, isot) RESULT(lerr)
-  CHARACTER(LEN=*),  INTENT(IN)    :: fnam                           !--- Input file name
-  TYPE(iso), TARGET, INTENT(INOUT) :: isot(:)                        !--- Isotopes descriptors (field "prnt" must be defined !)
+  CHARACTER(LEN=*),        INTENT(IN)    :: fnam                     !--- Input file name
+  TYPE(isot_type), TARGET, INTENT(INOUT) :: isot(:)                  !--- Isotopes descriptors (field "prnt" must be defined !)
   INTEGER :: ik, is, it, idb, nk0, i, iis
   INTEGER :: nk, ns, nt, ndb, nb0, i0
-  CHARACTER(LEN=256), POINTER     :: k(:), v(:), k0(:), v0(:)
-  CHARACTER(LEN=256), ALLOCATABLE :: vals(:)
-  CHARACTER(LEN=256)     :: val
-  TYPE(kys),    POINTER  ::   ky(:)
-  TYPE(tra),    POINTER  ::   tt(:), t
-  TYPE(db),  ALLOCATABLE ::  tdb(:)
-  LOGICAL,   ALLOCATABLE :: liso(:)
+  CHARACTER(LEN=maxlen), POINTER     :: k(:), v(:), k0(:), v0(:)
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: vals(:)
+  CHARACTER(LEN=maxlen)              :: val, modname
+  TYPE(keys_type),           POINTER ::   ky(:)
+  TYPE(trac_type),           POINTER ::   tt(:), t
+  TYPE(dataBase_type),   ALLOCATABLE ::  tdb(:)
+  LOGICAL,               ALLOCATABLE :: liso(:)
+  modname = 'readIsotopesFile'
 
   !--- THE INPUT FILE MUST BE PRESENT
-  IF(test(fmsg(testFile(fnam),'Missing isotopes parameters file "'//TRIM(fnam)//'"'),lerr)) RETURN
+  IF(test(fmsg('Missing isotopes parameters file "'//TRIM(fnam)//'"', modname, testFile(fnam)),lerr)) RETURN
 
   !--- READ THE FILE SECTIONS, ONE EACH PARENT TRACER
   nb0 = SIZE(dBase, DIM=1)+1                                         !--- Next database element index
-  IF(test(readSections(fnam,strStack(isot(:)%prnt,',')),lerr)) RETURN!--- Read sections, one each parent tracer
+  IF(test(readSections(fnam,strStack(isot(:)%parent,',')),lerr)) RETURN !--- Read sections, one each parent tracer
   ndb = SIZE(dBase, DIM=1)                                           !--- Current database size
   DO idb = nb0, ndb
@@ -886,5 +890,5 @@
     ALLOCATE(tdb(nb0-1)); tdb(1:nb0-1)=dBase(1:nb0-1); CALL MOVE_ALLOC(FROM=tdb, TO=dBase)
   END IF
-  lerr = dispIsotopes(isot, 'Isotopes parameters read from file')
+  lerr = dispIsotopes(isot, 'Isotopes parameters read from file', modname)
 
 END FUNCTION readIsotopesFile
@@ -899,17 +903,17 @@
 !==============================================================================================================================
 SUBROUTINE initIsotopes(trac, isot)
-  TYPE(tra), ALLOCATABLE, TARGET, INTENT(INOUT) :: trac(:)
-  TYPE(iso), ALLOCATABLE, TARGET, INTENT(INOUT) :: isot(:)
-  CHARACTER(LEN=256), ALLOCATABLE :: p(:), str(:)                    !--- Temporary storage
-  CHARACTER(LEN=256) :: iname
+  TYPE(trac_type), ALLOCATABLE, TARGET, INTENT(INOUT) :: trac(:)
+  TYPE(isot_type), ALLOCATABLE, TARGET, INTENT(INOUT) :: isot(:)
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: p(:), str(:)                 !--- Temporary storage
+  CHARACTER(LEN=maxlen) :: iname
   CHARACTER(LEN=1)   :: ph                                           !--- Phase
   INTEGER :: nbIso, ic, ip, iq, it, iz
   LOGICAL, ALLOCATABLE :: ll(:)                                      !--- Mask
-  TYPE(tra), POINTER   ::  t(:), t1
-  TYPE(iso), POINTER   ::  s
+  TYPE(trac_type), POINTER   ::  t(:), t1
+  TYPE(isot_type), POINTER   ::  s
 
   t => trac
 
-  p = PACK(delPhase(t%prnt), MASK = t%type=='tracer' .AND. t%igen==2)!--- Parents of 2nd generation isotopes
+  p = PACK(delPhase(t%parent), MASK = t%type=='tracer' .AND. t%iGeneration==2) !--- Parents of 2nd generation isotopes
   CALL strReduce(p, nbIso)
   ALLOCATE(isot(nbIso))
@@ -918,11 +922,11 @@
 
   !--- ISOTOPES RELATED VARIABLES ; NULL OR EMPTY IF NO ISOTOPES
-  isot(:)%prnt = p
+  isot(:)%parent = p
   DO ic = 1, SIZE(p)                                                 !--- Loop on isotopes classes
     s => isot(ic)
-    iname = s%prnt                                                   !--- Current isotopes class name (parent tracer name)
+    iname = s%parent                                                 !--- Current isotopes class name (parent tracer name)
 
     !=== Isotopes childs of tracer "iname": mask, names, number (same for each phase of "iname")
-    ll = t(:)%type=='tracer' .AND. delPhase(t(:)%prnt) == iname .AND. t(:)%phas == 'g'
+    ll = t(:)%type=='tracer' .AND. delPhase(t(:)%parent) == iname .AND. t(:)%phase == 'g'
     str = PACK(delPhase(t(:)%name), MASK = ll)                       !--- Effectively found isotopes of "iname"
     s%niso = SIZE(str)                                               !--- Number of "effectively found isotopes of "iname"
@@ -931,5 +935,5 @@
 
     !=== Geographic tagging tracers descending on tracer "iname": mask, names, number
-    ll = t(:)%type=='tag'    .AND. delPhase(t(:)%nam1) == iname .AND. t(:)%igen == 3
+    ll = t(:)%type=='tag'    .AND. delPhase(t(:)%gen0Name) == iname .AND. t(:)%iGeneration == 3
     s%zone = PACK(strTail(t(:)%name,'_',lFirst=.TRUE.), MASK = ll)   !--- Tagging zones names  for isotopes category "iname"
     CALL strReduce(s%zone)
@@ -946,22 +950,22 @@
 
     !=== Phases for tracer "iname"
-    s%phas = ''
-    DO ip = 1, nphases; ph = known_phases(ip:ip); IF(strIdx(t%name,addPhase(iname, ph)) /= 0) s%phas = TRIM(s%phas)//ph; END DO
-    s%npha = LEN_TRIM(s%phas)                                        !--- Equal to "nqo" for water
+    s%phase = ''
+    DO ip = 1, nphases; ph = known_phases(ip:ip); IF(strIdx(t%name,addPhase(iname, ph)) /= 0) s%phase = TRIM(s%phase)//ph; END DO
+    s%npha = LEN_TRIM(s%phase)                                        !--- Equal to "nqo" for water
 
     !=== Tables giving the index in a table of effectively found items for each dynamical tracer (1<=iq<=nqtot)
     DO iq = 1, SIZE(t)
       t1 => trac(iq)
-      IF(delPhase(t1%nam1) /= iname) CYCLE                            !--- Only deal with tracers descending on "iname"
-      t1%iso_igr = ic                                                 !--- Isotopes family       idx in list "isotopes(:)%prnt"
-      t1%iso_num = strIdx(s%trac, delPhase(strHead(t1%name,'_')))     !--- Current isotope       idx in effective isotopes list
-      t1%iso_zon = strIdx(s%zone,          strTail(t1%name,'_') )     !--- Current isotope zone  idx in effective zones    list
-      t1%iso_pha =  INDEX(s%phas,TRIM(t1%phas))                       !--- Current isotope phase idx in effective phases   list
-      IF(t1%igen /= 3) t1%iso_zon = 0                                 !--- Skip possible generation 2 tagging tracers
+      IF(delPhase(t1%gen0Name) /= iname) CYCLE                       !--- Only deal with tracers descending on "iname"
+      t1%iso_iGroup = ic                                             !--- Isotopes family       idx in list "isotopes(:)%parent"
+      t1%iso_iName  = strIdx(s%trac, delPhase(strHead(t1%name,'_'))) !--- Current isotope       idx in effective isotopes list
+      t1%iso_iZone  = strIdx(s%zone,          strTail(t1%name,'_') ) !--- Current isotope zone  idx in effective zones    list
+      t1%iso_iPhase =  INDEX(s%phase,TRIM(t1%phase))                 !--- Current isotope phase idx in effective phases   list
+      IF(t1%iGeneration /= 3) t1%iso_iZone = 0                       !--- Skip possible generation 2 tagging tracers
     END DO
 
     !=== Table used to get iq (index in dyn array, size nqtot) from the isotope and phase indexes ; the full isotopes list
     !    (including tagging tracers) is sorted this way:  iso1, iso2, ..., iso1_zone1, iso2_zone1, ..., iso1_zoneN, iso2_zoneN
-    s%iTraPha = RESHAPE( [( (strIdx(t(:)%name,  addPhase(s%trac(it),s%phas(ip:ip))),     it=1, s%nitr), ip=1, s%npha)], &
+    s%iTraPha = RESHAPE( [( (strIdx(t(:)%name,  addPhase(s%trac(it),s%phase(ip:ip))),    it=1, s%nitr), ip=1, s%npha)], &
                          [s%nitr, s%npha] )
 
@@ -970,8 +974,4 @@
                          [s%nzon, s%niso] )
   END DO
-  
-  !=== Indexes, in dynamical tracers list, of the tracers transmitted to phytrac (nqtottr non-vanishing elements)
-  ll = delPhase(t%name)/='H2O' .AND. t%iso_num ==0              !--- Mask of tracers passed to the physics
-  t(:)%itr = UNPACK([(iq,iq=1,COUNT(ll))], ll, [(0, iq=1, SIZE(t))])
 
   !=== READ PHYSICAL PARAMETERS FROM "isotopes_params.def" FILE
@@ -984,11 +984,12 @@
 
 !==============================================================================================================================
-LOGICAL FUNCTION dispIsotopes(ides, message) RESULT(lerr)
-  TYPE(iso),        INTENT(IN) :: ides(:)                            !--- Isotopes descriptor vector
+LOGICAL FUNCTION dispIsotopes(ides, message, modname) RESULT(lerr)
+  TYPE(isot_type),  INTENT(IN) :: ides(:)                            !--- Isotopes descriptor vector
   CHARACTER(LEN=*), INTENT(IN) :: message                            !--- Message to display
+  CHARACTER(LEN=*), INTENT(IN) :: modname                            !--- Calling subroutine name
   INTEGER :: ik, nk, ip, it, nt
-  CHARACTER(LEN=256) :: prf
-  CHARACTER(LEN=256), ALLOCATABLE :: ttl(:), val(:,:)
-  CALL msg(TRIM(message)//':')
+  CHARACTER(LEN=maxlen) :: prf
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: ttl(:), val(:,:)
+  CALL msg(TRIM(message)//':', modname)
   DO ip = 1, SIZE(ides)                                              !--- Loop on parents tracers
     nk = SIZE(ides(ip)%keys(1)%key)                                  !--- Same keys for each isotope
@@ -1003,5 +1004,6 @@
       END DO
     END DO
-    IF(test(fmsg(dispTable(prf, ttl, val, cat([(it,it=1,nt)]), rFmt='(EN8.4)'),'Problem with the table content'), lerr)) RETURN
+    IF(test(fmsg('Problem with the table content', modname, dispTable(prf, ttl, val, cat([(it,it=1,nt)]), rFmt='(EN8.4)')), &
+       lerr)) RETURN
     DEALLOCATE(ttl, val)
   END DO        
@@ -1016,7 +1018,7 @@
 !------------------------------------------------------------------------------------------------------------------------------
   CHARACTER(LEN=*),  INTENT(IN)    :: key, val
-  TYPE(kys),         INTENT(INOUT) :: ky
+  TYPE(keys_type),   INTENT(INOUT) :: ky
   LOGICAL, OPTIONAL, INTENT(IN)    :: lOverWrite
-  CHARACTER(LEN=256),  ALLOCATABLE :: k(:), v(:)
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: k(:), v(:)
   INTEGER :: iky, nky
   LOGICAL :: lo
@@ -1037,5 +1039,5 @@
 !------------------------------------------------------------------------------------------------------------------------------
   CHARACTER(LEN=*),  INTENT(IN)    :: key, val
-  TYPE(kys),         INTENT(INOUT) :: ky(:)
+  TYPE(keys_type),   INTENT(INOUT) :: ky(:)
   LOGICAL, OPTIONAL, INTENT(IN)    :: lOverWrite
   INTEGER :: itr
@@ -1050,8 +1052,8 @@
 ! Purpose: The values of the keys of the tracer named "tr0" are overwritten by the values found in the *.def files, if any.
 !------------------------------------------------------------------------------------------------------------------------------
-  TYPE(tra), ALLOCATABLE, INTENT(INOUT) :: t(:)
-  CHARACTER(LEN=*),       INTENT(IN)    :: tr0
-  CHARACTER(LEN=256) :: val
-  INTEGER            :: ik, jd
+  TYPE(trac_type), ALLOCATABLE, INTENT(INOUT) :: t(:)
+  CHARACTER(LEN=*),             INTENT(IN)    :: tr0
+  CHARACTER(LEN=maxlen) :: val
+  INTEGER               :: ik, jd
   jd = strIdx(t%name, tr0)
   IF(jd == 0) RETURN
@@ -1069,7 +1071,7 @@
   INTEGER,          INTENT(IN)    :: itr
   CHARACTER(LEN=*), INTENT(IN)    :: keyn(:)
-  TYPE(tra),        INTENT(INOUT) :: ky(:)
-  CHARACTER(LEN=256), ALLOCATABLE :: k(:), v(:)
-  LOGICAL,  ALLOCATABLE :: ll(:)
+  TYPE(trac_type),  INTENT(INOUT) :: ky(:)
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: k(:), v(:)
+  LOGICAL,               ALLOCATABLE :: ll(:)
   INTEGER :: iky
 !------------------------------------------------------------------------------------------------------------------------------
@@ -1086,5 +1088,5 @@
 !------------------------------------------------------------------------------------------------------------------------------
   CHARACTER(LEN=*), INTENT(IN)    :: keyn(:)
-  TYPE(tra),        INTENT(INOUT) :: ky(:)
+  TYPE(trac_type),  INTENT(INOUT) :: ky(:)
   INTEGER :: iky
 !------------------------------------------------------------------------------------------------------------------------------
@@ -1100,11 +1102,11 @@
 !==============================================================================================================================
 SUBROUTINE getKey_init(tracers_, isotopes_)
-  TYPE(tra), OPTIONAL, INTENT(IN) ::  tracers_(:)
-  TYPE(iso), OPTIONAL, INTENT(IN) :: isotopes_(:)
+  TYPE(trac_type), OPTIONAL, INTENT(IN) ::  tracers_(:)
+  TYPE(isot_type), OPTIONAL, INTENT(IN) :: isotopes_(:)
   IF(PRESENT( tracers_))  tracers =  tracers_
   IF(PRESENT(isotopes_)) isotopes = isotopes_
 END SUBROUTINE getKey_init
 !==============================================================================================================================
-CHARACTER(LEN=256) FUNCTION fgetKey(itr, keyn, ky, def_val) RESULT(out)
+CHARACTER(LEN=maxlen) FUNCTION fgetKey(itr, keyn, ky, def_val) RESULT(out)
 !------------------------------------------------------------------------------------------------------------------------------
 ! Purpose: Internal function ; get a key value in string format (this is the returned argument).
@@ -1112,5 +1114,5 @@
   INTEGER,                    INTENT(IN) :: itr
   CHARACTER(LEN=*),           INTENT(IN) :: keyn
-  TYPE(kys),                  INTENT(IN) :: ky(:)
+  TYPE(keys_type),            INTENT(IN) :: ky(:)
   CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: def_val
 !------------------------------------------------------------------------------------------------------------------------------
@@ -1126,8 +1128,8 @@
   !     * "ky"   specified: try in "ky"      for "tnam" with phase and tagging suffixes, then without.
   !    The returned error code is always .FALSE.: an empty string is returned when the key hasn't been found.
-  CHARACTER(LEN=*),    INTENT(IN)  :: keyn
-  CHARACTER(LEN=256),  INTENT(OUT) :: val
-  CHARACTER(LEN=*),    INTENT(IN)  :: tname
-  TYPE(kys), OPTIONAL, INTENT(IN)  :: ky(:)
+  CHARACTER(LEN=*),          INTENT(IN)  :: keyn
+  CHARACTER(LEN=maxlen),     INTENT(OUT) :: val
+  CHARACTER(LEN=*),          INTENT(IN)  :: tname
+  TYPE(keys_type), OPTIONAL, INTENT(IN)  :: ky(:)
   INTEGER :: is
   lerr = .FALSE.
@@ -1147,8 +1149,8 @@
 
 FUNCTION getKeyByName_prv(keyn, tname, ky) RESULT(val)
-  CHARACTER(LEN=256)            :: val
+  CHARACTER(LEN=maxlen)         :: val
   CHARACTER(LEN=*), INTENT(IN)  :: keyn
   CHARACTER(LEN=*), INTENT(IN)  :: tname
-  TYPE(kys),        INTENT(IN)  :: ky(:)
+  TYPE(keys_type),  INTENT(IN)  :: ky(:)
   INTEGER :: itr, iky
   val = ''; iky = 0
@@ -1162,8 +1164,8 @@
 LOGICAL FUNCTION getKeyByName_sm(keyn, val, tnam, ky) RESULT(lerr)
   CHARACTER(LEN=*),                   INTENT(IN)  :: keyn
-  CHARACTER(LEN=256),    ALLOCATABLE, INTENT(OUT) ::  val(:)
+  CHARACTER(LEN=maxlen), ALLOCATABLE, INTENT(OUT) ::  val(:)
   CHARACTER(LEN=*), TARGET, OPTIONAL, INTENT(IN)  :: tnam(:)
-  TYPE(kys),        TARGET, OPTIONAL, INTENT(IN)  ::   ky(:)
-  CHARACTER(LEN=256), POINTER :: n(:)
+  TYPE(keys_type),  TARGET, OPTIONAL, INTENT(IN)  ::   ky(:)
+  CHARACTER(LEN=maxlen),    POINTER :: n(:)
   INTEGER :: iq
   n => tracers(:)%keys%name; IF(PRESENT(tnam)) n => tnam(:)
@@ -1174,15 +1176,15 @@
 !==============================================================================================================================
 LOGICAL FUNCTION getKeyByName_i1(keyn, val, tnam, ky) RESULT(lerr)
-  CHARACTER(LEN=*),    INTENT(IN)  :: keyn
-  INTEGER,             INTENT(OUT) :: val
-  CHARACTER(LEN=*),    INTENT(IN)  :: tnam
-  TYPE(kys), OPTIONAL, INTENT(IN)  :: ky(:)
-  CHARACTER(LEN=256) :: sval
+  CHARACTER(LEN=*),          INTENT(IN)  :: keyn
+  INTEGER,                   INTENT(OUT) :: val
+  CHARACTER(LEN=*),          INTENT(IN)  :: tnam
+  TYPE(keys_type), OPTIONAL, INTENT(IN)  :: ky(:)
+  CHARACTER(LEN=maxlen) :: sval
   INTEGER :: ierr
   IF(     PRESENT(ky)) lerr = getKeyByName_s1(keyn, sval, tnam, ky)
   IF(.NOT.PRESENT(ky)) lerr = getKeyByName_s1(keyn, sval, tnam)
-  IF(test(fmsg(lerr,   'key "'//TRIM(keyn)//'" or tracer "'//TRIM(tnam)//'" is missing'),        lerr)) RETURN
+  IF(test(fmsg('key "'//TRIM(keyn)//'" or tracer "'//TRIM(tnam)//'" is missing',        modname, lerr), lerr)) RETURN
   READ(sval, *, IOSTAT=ierr) val
-  IF(test(fmsg(ierr/=0,'key "'//TRIM(keyn)//'" of tracer "'//TRIM(tnam)//'" is not an integer'), lerr)) RETURN
+  IF(test(fmsg('key "'//TRIM(keyn)//'" of tracer "'//TRIM(tnam)//'" is not an integer', modname, lerr), lerr)) RETURN
 END FUNCTION getKeyByName_i1
 !==============================================================================================================================
@@ -1191,6 +1193,6 @@
   INTEGER,               ALLOCATABLE, INTENT(OUT) ::  val(:)
   CHARACTER(LEN=*), TARGET, OPTIONAL, INTENT(IN)  :: tnam(:)
-  TYPE(kys),        TARGET, OPTIONAL, INTENT(IN)  ::   ky(:)
-  CHARACTER(LEN=256), POINTER :: n(:)
+  TYPE(keys_type),  TARGET, OPTIONAL, INTENT(IN)  ::   ky(:)
+  CHARACTER(LEN=maxlen), POINTER :: n(:)
   INTEGER :: iq
   n => tracers(:)%name; IF(PRESENT(tnam)) n => tnam(:)
@@ -1201,15 +1203,15 @@
 !==============================================================================================================================
 LOGICAL FUNCTION getKeyByName_r1(keyn, val, tnam, ky) RESULT(lerr)
-  CHARACTER(LEN=*),    INTENT(IN)  :: keyn
-  REAL,                INTENT(OUT) :: val
-  CHARACTER(LEN=*),    INTENT(IN)  :: tnam
-  TYPE(kys), OPTIONAL, INTENT(IN)  :: ky(:)
-  CHARACTER(LEN=256) :: sval
+  CHARACTER(LEN=*),          INTENT(IN)  :: keyn
+  REAL,                      INTENT(OUT) :: val
+  CHARACTER(LEN=*),          INTENT(IN)  :: tnam
+  TYPE(keys_type), OPTIONAL, INTENT(IN)  :: ky(:)
+  CHARACTER(LEN=maxlen) :: sval
   INTEGER :: ierr
   IF(     PRESENT(ky)) lerr = getKeyByName_s1(keyn, sval, tnam, ky)
   IF(.NOT.PRESENT(ky)) lerr = getKeyByName_s1(keyn, sval, tnam)
-  IF(test(fmsg(lerr,   'key "'//TRIM(keyn)//'" or tracer "'//TRIM(tnam)//'" is missing'),    lerr)) RETURN
+  IF(test(fmsg('key "'//TRIM(keyn)//'" or tracer "'//TRIM(tnam)//'" is missing',    modname, lerr), lerr)) RETURN
   READ(sval, *, IOSTAT=ierr) val
-  IF(test(fmsg(ierr/=0,'key "'//TRIM(keyn)//'" of tracer "'//TRIM(tnam)//'" is not a real'), lerr)) RETURN
+  IF(test(fmsg('key "'//TRIM(keyn)//'" of tracer "'//TRIM(tnam)//'" is not a real', modname, lerr), lerr)) RETURN
 END FUNCTION getKeyByName_r1
 !==============================================================================================================================
@@ -1218,6 +1220,6 @@
   REAL,                  ALLOCATABLE, INTENT(OUT) ::  val(:)
   CHARACTER(LEN=*), TARGET, OPTIONAL, INTENT(IN)  :: tnam(:)
-  TYPE(kys),        TARGET, OPTIONAL, INTENT(IN)  ::   ky(:)
-  CHARACTER(LEN=256), POINTER :: n(:)
+  TYPE(keys_type),  TARGET, OPTIONAL, INTENT(IN)  ::   ky(:)
+  CHARACTER(LEN=maxlen), POINTER :: n(:)
   INTEGER :: iq
   n => tracers(:)%name;  IF(PRESENT(tnam)) n => tnam(:)
@@ -1232,5 +1234,5 @@
 !=== REMOVE, IF ANY, OR ADD THE PHASE SUFFIX OF THE TRACER NAMED "s" ==========================================================
 !==============================================================================================================================
-ELEMENTAL CHARACTER(LEN=256) FUNCTION delPhase(s) RESULT(out)
+ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION delPhase(s) RESULT(out)
   CHARACTER(LEN=*), INTENT(IN) :: s
   INTEGER :: l, i, ix
@@ -1249,5 +1251,5 @@
 END FUNCTION delPhase
 !------------------------------------------------------------------------------------------------------------------------------
-CHARACTER(LEN=256) FUNCTION addPhase_1(s,pha) RESULT(out)
+CHARACTER(LEN=maxlen) FUNCTION addPhase_1(s,pha) RESULT(out)
   CHARACTER(LEN=*), INTENT(IN) :: s
   CHARACTER(LEN=1), INTENT(IN) :: pha
@@ -1262,7 +1264,7 @@
 !------------------------------------------------------------------------------------------------------------------------------
 FUNCTION addPhase_m(s,pha) RESULT(out)
-  CHARACTER(LEN=*),    INTENT(IN) :: s(:)
-  CHARACTER(LEN=1),    INTENT(IN) :: pha
-  CHARACTER(LEN=256), ALLOCATABLE :: out(:)  
+  CHARACTER(LEN=*),      INTENT(IN)  :: s(:)
+  CHARACTER(LEN=1),      INTENT(IN)  :: pha
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: out(:)  
   INTEGER :: k
   out = [( addPhase_1(s(k), pha), k=1, SIZE(s) )]
@@ -1274,6 +1276,6 @@
 !=== GET THE NAME(S) OF THE ANCESTOR(S) OF TRACER(S) "tname" AT GENERATION "igen"  IN THE TRACERS DESCRIPTORS LIST "tr" =======
 !==============================================================================================================================
-CHARACTER(LEN=256) FUNCTION ancestor_1(t, tname, igen) RESULT(out)
-  TYPE(tra),         INTENT(IN) :: t(:)
+CHARACTER(LEN=maxlen) FUNCTION ancestor_1(t, tname, igen) RESULT(out)
+  TYPE(trac_type),   INTENT(IN) :: t(:)
   CHARACTER(LEN=*),  INTENT(IN) :: tname
   INTEGER, OPTIONAL, INTENT(IN) :: igen
@@ -1285,6 +1287,6 @@
 !------------------------------------------------------------------------------------------------------------------------------
 FUNCTION ancestor_m(t, tname, igen) RESULT(out)
-  CHARACTER(LEN=256), ALLOCATABLE        ::   out(:)
-  TYPE(tra),                  INTENT(IN) ::     t(:)
+  CHARACTER(LEN=maxlen), ALLOCATABLE     ::   out(:)
+  TYPE(trac_type),            INTENT(IN) ::     t(:)
   CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: tname(:)
   INTEGER,          OPTIONAL, INTENT(IN) :: igen
@@ -1305,5 +1307,5 @@
 INTEGER FUNCTION idxAncestor_1(t, tname, igen) RESULT(out)
 ! Return the name of the generation "igen" ancestor of "tname"
-  TYPE(tra),         INTENT(IN) :: t(:)
+  TYPE(trac_type),   INTENT(IN) :: t(:)
   CHARACTER(LEN=*),  INTENT(IN) :: tname
   INTEGER, OPTIONAL, INTENT(IN) :: igen
@@ -1312,11 +1314,11 @@
   out = strIdx(t(:)%name, tname)
   IF(out == 0)          RETURN
-  IF(t(out)%igen <= ig) RETURN
-  DO WHILE(t(out)%igen > ig); out = strIdx(t(:)%name, t(out)%prnt); END DO
+  IF(t(out)%iGeneration <= ig) RETURN
+  DO WHILE(t(out)%iGeneration > ig); out = strIdx(t(:)%name, t(out)%parent); END DO
 END FUNCTION idxAncestor_1
 !------------------------------------------------------------------------------------------------------------------------------
 FUNCTION idxAncestor_m(t, tname, igen) RESULT(out)
   INTEGER,          ALLOCATABLE          ::   out(:)
-  TYPE(tra),                  INTENT(IN) ::     t(:)
+  TYPE(trac_type),            INTENT(IN) ::     t(:)
   CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: tname(:)
   INTEGER,          OPTIONAL, INTENT(IN) :: igen
Index: /strings_mod.F90
===================================================================
--- /strings_mod.F90	(revision 1)
+++ /strings_mod.F90	(revision 2)
@@ -4,5 +4,5 @@
 
   PRIVATE
-  PUBLIC :: modname, init_printout, msg, fmsg, get_in, lunout, prt_level
+  PUBLIC :: maxlen, init_printout, msg, fmsg, get_in, lunout, prt_level
   PUBLIC :: strLower, strHead, strStack,  strClean,  strIdx,  strCount, strReplace
   PUBLIC :: strUpper, strTail, strStackm, strReduce, strFind, strParse, cat, find
@@ -13,6 +13,6 @@
 
   INTERFACE get_in;     MODULE PROCEDURE getin_s,  getin_i,  getin_r,  getin_l;  END INTERFACE get_in
-  INTERFACE  msg;       MODULE PROCEDURE        msg_1,      msg_l1,       msg_m; END INTERFACE  msg
-  INTERFACE fmsg;       MODULE PROCEDURE       fmsg_1,     fmsg_l1,      fmsg_m; END INTERFACE fmsg
+  INTERFACE  msg;       MODULE PROCEDURE        msg_1,                    msg_m; END INTERFACE  msg
+  INTERFACE fmsg;       MODULE PROCEDURE       fmsg_1,                   fmsg_m; END INTERFACE fmsg
   INTERFACE strHead;    MODULE PROCEDURE    strHead_1,                strHead_m; END INTERFACE strHead
   INTERFACE strTail;    MODULE PROCEDURE    strTail_1,                strTail_m; END INTERFACE strTail
@@ -32,8 +32,7 @@
   INTERFACE testFile;     MODULE PROCEDURE     testFile_1,     testFile_m; END INTERFACE testFile
 
-  CHARACTER(LEN=256), SAVE :: modname = ''                 !--- Current subroutine name
-  INTEGER,            SAVE :: lunout  = 6                  !--- Printing unit  (default: 6, ie. on screen)
-  INTEGER,            SAVE :: prt_level = 1                !--- Printing level (default: 1, ie. print all)
-
+  INTEGER, PARAMETER :: maxlen    = 256                    !--- Standard maximum length for strings
+  INTEGER,      SAVE :: lunout    = 6                      !--- Printing unit  (default: 6, ie. on screen)
+  INTEGER,      SAVE :: prt_level = 1                      !--- Printing level (default: 1, ie. print all)
 
 CONTAINS
@@ -57,5 +56,5 @@
 !==============================================================================================================================
 SUBROUTINE getin_s(nam, val, def)
-USE ioipsl_getin_mod, ONLY: getin
+USE ioipsl_getincom, ONLY: getin
   CHARACTER(LEN=*), INTENT(IN)    :: nam
   CHARACTER(LEN=*), INTENT(INOUT) :: val
@@ -66,5 +65,5 @@
 !==============================================================================================================================
 SUBROUTINE getin_i(nam, val, def)
-USE ioipsl_getin_mod, ONLY: getin
+USE ioipsl_getincom, ONLY: getin
   CHARACTER(LEN=*), INTENT(IN)    :: nam
   INTEGER,          INTENT(INOUT) :: val
@@ -75,5 +74,5 @@
 !==============================================================================================================================
 SUBROUTINE getin_r(nam, val, def)
-USE ioipsl_getin_mod, ONLY: getin
+USE ioipsl_getincom, ONLY: getin
   CHARACTER(LEN=*), INTENT(IN)    :: nam
   REAL,             INTENT(INOUT) :: val
@@ -84,5 +83,5 @@
 !==============================================================================================================================
 SUBROUTINE getin_l(nam, val, def)
-USE ioipsl_getin_mod, ONLY: getin
+USE ioipsl_getincom, ONLY: getin
   CHARACTER(LEN=*), INTENT(IN)    :: nam
   LOGICAL,          INTENT(INOUT) :: val
@@ -97,62 +96,74 @@
 !=== Display one or several messages, one each line, starting with the current routine name "modname".
 !==============================================================================================================================
-SUBROUTINE msg_1(str, unit)
-  CHARACTER(LEN=*),  INTENT(IN) :: str
-  INTEGER, OPTIONAL, INTENT(IN) :: unit
+SUBROUTINE msg_1(str, modname, ll, unit)
+  !--- Display a simple message "str". Optional parameters:
+  !    * "modname": module name, displayed in front of the message (with ": " separator) if present.
+  !    * "ll":      message trigger ; message is displayed only if ll==.TRUE.
+  !    * "unit":    write unit (by default: "lunout")
+  CHARACTER(LEN=*),           INTENT(IN) :: str
+  CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: modname
+  LOGICAL,          OPTIONAL, INTENT(IN) :: ll
+  INTEGER,          OPTIONAL, INTENT(IN) :: unit
   INTEGER :: unt
+  IF(PRESENT(ll)) THEN; IF(ll) RETURN; END IF
   unt = lunout; IF(PRESENT(unit)) unt = unit
-  WRITE(unt,'(a)') TRIM(modname)//': '//str
+  IF(PRESENT(modname)) THEN
+    WRITE(unt,'(a)') TRIM(modname)//': '//str              !--- Routine name provided
+  ELSE
+    WRITE(unt,'(a)') str                                   !--- Simple message
+  END IF
 END SUBROUTINE msg_1
 !==============================================================================================================================
-SUBROUTINE msg_l1(ll, str, unit)
-  LOGICAL,           INTENT(IN) :: ll
-  CHARACTER(LEN=*),  INTENT(IN) :: str
-  INTEGER, OPTIONAL, INTENT(IN) :: unit
-  INTEGER :: unt
-  IF(.NOT.ll) RETURN
-  unt = lunout; IF(PRESENT(unit)) unt = unit
-  WRITE(unt,'(a)') TRIM(modname)//': '//str
-END SUBROUTINE msg_l1
-!==============================================================================================================================
-SUBROUTINE msg_m(str, unit, nmax)
-  CHARACTER(LEN=*),  INTENT(IN) :: str(:)
-  INTEGER, OPTIONAL, INTENT(IN) :: unit
-  INTEGER, OPTIONAL, INTENT(IN) :: nmax
-  CHARACTER(LEN=256), ALLOCATABLE :: s(:)
+SUBROUTINE msg_m(str, modname, ll, unit, nmax)
+  !--- Same as msg_1 with multiple strings that are stacked (separator: coma) on up to "nmax" full lines.
+  CHARACTER(LEN=*),           INTENT(IN) :: str(:)
+  CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: modname
+  LOGICAL,          OPTIONAL, INTENT(IN) :: ll
+  INTEGER,          OPTIONAL, INTENT(IN) :: unit
+  INTEGER,          OPTIONAL, INTENT(IN) :: nmax
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: s(:)
   INTEGER :: unt, nmx, k
+  LOGICAL :: lerr
+  lerr = .TRUE.; IF(PRESENT(ll))  lerr = ll
   unt = lunout ; IF(PRESENT(unit)) unt = unit
   nmx = 128;     IF(PRESENT(nmax)) nmx = nmax
   s = strStackm(str, ', ', nmx)
-  DO k=1,SIZE(s); WRITE(unt,'(a)') TRIM(modname)//': '//TRIM(s(k)); END DO
+  IF(PRESENT(modname)) THEN
+    DO k=1,SIZE(s); CALL msg_1(s(k), modname, lerr, unt); END DO
+  ELSE
+    DO k=1,SIZE(s); CALL msg_1(s(k), ll=lerr, unit=unt);  END DO
+  END IF
 END SUBROUTINE msg_m
 !==============================================================================================================================
-LOGICAL FUNCTION fmsg_1(str, unit) RESULT(lerr)
-  CHARACTER(LEN=*),  INTENT(IN)  :: str
-  INTEGER, OPTIONAL, INTENT(IN)  :: unit
+LOGICAL FUNCTION fmsg_1(str, modname, ll, unit) RESULT(lerr)
+  CHARACTER(LEN=*),           INTENT(IN) :: str
+  CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: modname
+  LOGICAL,          OPTIONAL, INTENT(IN) :: ll
+  INTEGER,          OPTIONAL, INTENT(IN) :: unit
   INTEGER :: unt
-  lerr = .TRUE.
+  lerr = .TRUE.; IF(PRESENT(ll))  lerr = ll
   unt = lunout ; IF(PRESENT(unit)) unt = unit
-  CALL msg_1(str, unt)
+  IF(PRESENT(modname)) THEN
+    CALL msg_1(str, modname, lerr, unt)
+  ELSE
+    CALL msg_1(str, ll=lerr, unit=unt)
+  END IF
 END FUNCTION fmsg_1
 !==============================================================================================================================
-LOGICAL FUNCTION fmsg_l1(li, str, unit) RESULT(lerr)
-  LOGICAL,           INTENT(IN)  :: li
-  CHARACTER(LEN=*),  INTENT(IN)  :: str
-  INTEGER, OPTIONAL, INTENT(IN)  :: unit
-  INTEGER :: unt
-  lerr = li;     IF(.NOT.lerr) RETURN
-  unt = lunout ; IF(PRESENT(unit)) unt = unit
-  CALL msg_l1(lerr, str, unt)
-END FUNCTION fmsg_l1
-!==============================================================================================================================
-LOGICAL FUNCTION fmsg_m(str, unit, nmax) RESULT(lerr)
-  CHARACTER(LEN=*),  INTENT(IN)  :: str(:)
-  INTEGER, OPTIONAL, INTENT(IN)  :: unit
-  INTEGER, OPTIONAL, INTENT(IN)  :: nmax
+LOGICAL FUNCTION fmsg_m(str, modname, ll, unit, nmax) RESULT(lerr)
+  CHARACTER(LEN=*),           INTENT(IN)  :: str(:)
+  CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: modname
+  LOGICAL,          OPTIONAL, INTENT(IN) :: ll
+  INTEGER,          OPTIONAL, INTENT(IN) :: unit
+  INTEGER,          OPTIONAL, INTENT(IN)  :: nmax
   INTEGER :: unt, nmx
-  lerr = .TRUE.
+  lerr = .TRUE.; IF(PRESENT(ll))  lerr = ll
   unt = lunout ; IF(PRESENT(unit)) unt = unit
   nmx = 128;     IF(PRESENT(nmax)) nmx = nmax
-  CALL msg_m(str, unt, nmx)
+  IF(PRESENT(modname)) THEN
+    CALL msg_m(str, modname, lerr, unt, nmx)
+  ELSE
+    CALL msg_m(str, ll=lerr, unit=unt, nmax=nmx)
+  END IF
 END FUNCTION fmsg_m
 !==============================================================================================================================
@@ -162,5 +173,5 @@
 !=== Lower/upper case conversion function. ====================================================================================
 !==============================================================================================================================
-ELEMENTAL CHARACTER(LEN=256) FUNCTION strLower(str) RESULT(out)
+ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION strLower(str) RESULT(out)
   CHARACTER(LEN=*), INTENT(IN) :: str
   INTEGER :: k
@@ -171,5 +182,5 @@
 END FUNCTION strLower
 !==============================================================================================================================
-ELEMENTAL CHARACTER(LEN=256) FUNCTION strUpper(str) RESULT(out)
+ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION strUpper(str) RESULT(out)
   CHARACTER(LEN=*), INTENT(IN) :: str
   INTEGER :: k
@@ -188,5 +199,5 @@
 !===    * strHead(..,.TRUE.)  = 'a_b'         ${str%$sep*}                                                     ================
 !==============================================================================================================================
-CHARACTER(LEN=256) FUNCTION strHead_1(str,sep,lFirst) RESULT(out)
+CHARACTER(LEN=maxlen) FUNCTION strHead_1(str,sep,lFirst) RESULT(out)
   CHARACTER(LEN=*),           INTENT(IN) :: str
   CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: sep
@@ -203,5 +214,5 @@
 !==============================================================================================================================
 FUNCTION strHead_m(str,sep,lFirst) RESULT(out)
-  CHARACTER(LEN=256),        ALLOCATABLE :: out(:)
+  CHARACTER(LEN=maxlen),     ALLOCATABLE :: out(:)
   CHARACTER(LEN=*),           INTENT(IN) :: str(:)
   CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: sep
@@ -222,5 +233,5 @@
 !===    * strHead(..,.TRUE.)  = 'c'           ${str##*$sep}                                                    ================
 !==============================================================================================================================
-CHARACTER(LEN=256) FUNCTION strTail_1(str,sep,lFirst) RESULT(out)
+CHARACTER(LEN=maxlen) FUNCTION strTail_1(str,sep,lFirst) RESULT(out)
   CHARACTER(LEN=*),           INTENT(IN) :: str
   CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: sep
@@ -237,5 +248,5 @@
 !==============================================================================================================================
 FUNCTION strTail_m(str,sep,lFirst) RESULT(out)
-  CHARACTER(LEN=256),        ALLOCATABLE :: out(:)
+  CHARACTER(LEN=maxlen),     ALLOCATABLE :: out(:)
   CHARACTER(LEN=*),           INTENT(IN) :: str(:)
   CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: sep
@@ -270,10 +281,10 @@
 !==============================================================================================================================
 FUNCTION strStackm(str, sep, nmax) RESULT(out)
-  CHARACTER(LEN=256),        ALLOCATABLE :: out(:)
+  CHARACTER(LEN=maxlen),     ALLOCATABLE :: out(:)
   CHARACTER(LEN=*),           INTENT(IN) :: str(:)
   CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: sep
   INTEGER,          OPTIONAL, INTENT(IN) :: nmax
-  CHARACTER(LEN=256), ALLOCATABLE :: t(:)
-  CHARACTER(LEN=256) :: sp
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: t(:)
+  CHARACTER(LEN=maxlen) :: sp
   INTEGER :: is, ns, no, mx, n
   IF(SIZE(str) == 0) THEN; out = ['']; RETURN; END IF
@@ -328,5 +339,5 @@
   CHARACTER(LEN=*), ALLOCATABLE, INTENT(INOUT) :: str1(:)
   INTEGER,          OPTIONAL,    INTENT(OUT)   :: nb
-  CHARACTER(LEN=256), ALLOCATABLE :: s1(:)
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: s1(:)
   INTEGER :: k, n, n1
   IF(PRESENT(nb)) nb = 0
@@ -342,5 +353,5 @@
   CHARACTER(LEN=*),   ALLOCATABLE, INTENT(INOUT) :: str1(:)
   CHARACTER(LEN=*),                INTENT(IN)    :: str2(:)
-  CHARACTER(LEN=256), ALLOCATABLE :: s1(:), s2(:)
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: s1(:), s2(:)
   INTEGER :: k
   IF(SIZE(str2)==0) RETURN
@@ -432,8 +443,8 @@
   LOGICAL, OPTIONAL, INTENT(IN)  :: lSc                              !--- Care about nbs with front sign or in scient. notation
 
-  INTEGER              :: idx0                                       !--- Used to display an identified non-numeric string
-  INTEGER, ALLOCATABLE :: ii(:)
-  LOGICAL              :: ll, ls
-  CHARACTER(LEN=256)   :: d
+  INTEGER               :: idx0                                      !--- Used to display an identified non-numeric string
+  INTEGER, ALLOCATABLE  :: ii(:)
+  LOGICAL               :: ll, ls
+  CHARACTER(LEN=maxlen) :: d
 !  modname = 'strIdx'
   lerr = .FALSE.
@@ -545,5 +556,5 @@
   DO
     lerr = strIdx_prv(r, delimiter, ib, ie, jd, ll)
-    IF(fmsg(lerr,'"'//TRIM(r(ib:ie-1))//'" is not numeric')) RETURN
+    IF(fmsg('"'//TRIM(r(ib:ie-1))//'" is not numeric', ll=lerr)) RETURN
     IF(jd == 0) EXIT
     ib = ie + LEN(delimiter(jd))
@@ -560,9 +571,9 @@
 !==============================================================================================================================
 LOGICAL FUNCTION strParse_1(rawList, delimiter, keys, lSc, vals, n) RESULT(lerr)
-  CHARACTER(LEN=*),                          INTENT(IN)  :: rawList, delimiter
-  CHARACTER(LEN=256), ALLOCATABLE,           INTENT(OUT) :: keys(:)
-  LOGICAL,                         OPTIONAL, INTENT(IN)  :: lSc      !--- Take care about numbers in scientific notation
-  CHARACTER(LEN=256), ALLOCATABLE, OPTIONAL, INTENT(OUT) :: vals(:)
-  INTEGER,                         OPTIONAL, INTENT(OUT) :: n
+  CHARACTER(LEN=*),                             INTENT(IN)  :: rawList, delimiter
+  CHARACTER(LEN=maxlen), ALLOCATABLE,           INTENT(OUT) :: keys(:)
+  LOGICAL,                            OPTIONAL, INTENT(IN)  :: lSc      !--- Take care about numbers in scientific notation
+  CHARACTER(LEN=maxlen), ALLOCATABLE, OPTIONAL, INTENT(OUT) :: vals(:)
+  INTEGER,                            OPTIONAL, INTENT(OUT) :: n
   LOGICAL :: ll
 !  modname = 'strParse'
@@ -574,10 +585,10 @@
 !==============================================================================================================================
 LOGICAL FUNCTION strParse_m(rawList, delimiter, keys, lSc, vals, n, id) RESULT(lerr)
-  CHARACTER(LEN=*),                          INTENT(IN)  :: rawList, delimiter(:)
-  CHARACTER(LEN=256),           ALLOCATABLE, INTENT(OUT) :: keys(:)  !--- Parsed keys vector
-  LOGICAL,            OPTIONAL,              INTENT(IN)  :: lSc      !--- Take care about numbers in scientific notation
-  CHARACTER(LEN=256), OPTIONAL, ALLOCATABLE, INTENT(OUT) :: vals(:)  !--- Values for <name>=<value> keys
-  INTEGER,            OPTIONAL,              INTENT(OUT) :: n        !--- Length of the parsed vector
-  INTEGER,            OPTIONAL, ALLOCATABLE, INTENT(OUT) :: id(:)    !--- Indexes of the separators in "delimiter(:)" vector
+  CHARACTER(LEN=*),                             INTENT(IN)  :: rawList, delimiter(:)
+  CHARACTER(LEN=maxlen),           ALLOCATABLE, INTENT(OUT) :: keys(:)  !--- Parsed keys vector
+  LOGICAL,               OPTIONAL,              INTENT(IN)  :: lSc      !--- Take care about numbers in scientific notation
+  CHARACTER(LEN=maxlen), OPTIONAL, ALLOCATABLE, INTENT(OUT) :: vals(:)  !--- Values for <name>=<value> keys
+  INTEGER,               OPTIONAL,              INTENT(OUT) :: n        !--- Length of the parsed vector
+  INTEGER,               OPTIONAL, ALLOCATABLE, INTENT(OUT) :: id(:)    !--- Indexes of the separators in "delimiter(:)" vector
 
   CHARACTER(LEN=1024) :: r
@@ -587,5 +598,5 @@
 !  modname = 'strParse'
   ll = .FALSE.; IF(PRESENT(lSc)) ll = lSc
-  IF(test(fmsg(strCount_1m(rawList, delimiter, nk, ll), "Couldn't parse list: non-numerical strings were found"),lerr)) RETURN
+  IF(test(fmsg("Couldn't parse list: non-numerical strings were found", ll=strCount_1m(rawList, delimiter, nk, ll)),lerr)) RETURN
 
   !--- FEW ALLOCATIONS
@@ -600,5 +611,5 @@
   ib = 1
   DO ik = 1, nk-1
-    IF(test(fmsg(strIdx_prv(r, delimiter, ib, ie, jd, ll),'Non-numeric values found'),lerr)) RETURN
+    IF(test(fmsg('Non-numeric values found', ll=strIdx_prv(r, delimiter, ib, ie, jd, ll)),lerr)) RETURN
     keys(ik) = r(ib:ie-1)
     IF(PRESENT(vals)) CALL parseKeys(keys(ik), vals(ik))             !--- Parse a <key>=<val> pair
@@ -674,6 +685,6 @@
   CHARACTER(LEN=*),           TARGET, INTENT(IN) :: s0
   CHARACTER(LEN=*), OPTIONAL, TARGET, INTENT(IN) :: s1, s2, s3, s4, s5, s6, s7, s8, s9
-  CHARACTER(LEN=256), ALLOCATABLE :: out(:)
-  CHARACTER(LEN=256), POINTER     :: s
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: out(:)
+  CHARACTER(LEN=maxlen), POINTER     :: s
   LOGICAL :: lv(10)
   INTEGER :: iv
@@ -693,6 +704,6 @@
   CHARACTER(LEN=*),           TARGET, DIMENSION(:), INTENT(IN) :: s0
   CHARACTER(LEN=*), OPTIONAL, TARGET, DIMENSION(:), INTENT(IN) :: s1, s2, s3, s4, s5, s6, s7, s8, s9
-  CHARACTER(LEN=256), ALLOCATABLE :: out(:,:)
-  CHARACTER(LEN=256), POINTER     :: s(:)
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: out(:,:)
+  CHARACTER(LEN=maxlen), POINTER     :: s(:)
   LOGICAL :: lv(10)
   INTEGER :: nrow, ncol, iv, n
@@ -707,5 +718,5 @@
     END SELECT
     n = SIZE(s, DIM=1)
-    IF(n/=nrow) THEN; CALL msg('Can''t concatenate vectors of differing lengths',1); STOP; END IF
+    IF(n/=nrow) THEN; CALL msg("Can't concatenate vectors of differing lengths"); STOP; END IF
     out(:,iv) = s(:)
   END DO
@@ -748,5 +759,5 @@
     END SELECT
     n = SIZE(i, DIM=1)
-    IF(n/=nrow) THEN; CALL msg('Can''t concatenate vectors of differing lengths',1); STOP; END IF
+    IF(n/=nrow) THEN; CALL msg("Can't concatenate vectors of differing lengths"); STOP; END IF
     out(:,iv) = i(:)
   END DO
@@ -789,5 +800,5 @@
     END SELECT
     n = SIZE(r, DIM=1)
-    IF(n/=nrow) THEN; CALL msg('Can''t concatenate vectors of differing lengths',1); STOP; END IF
+    IF(n/=nrow) THEN; CALL msg("Can't concatenate vectors of differing lengths"); STOP; END IF
     out(:,iv) = r(:)
   END DO
@@ -830,5 +841,5 @@
     END SELECT
     n = SIZE(d, DIM=1)
-    IF(n/=nrow) THEN; CALL msg('Can''t concatenate vectors of differing lengths',1); STOP; END IF
+    IF(n/=nrow) THEN; CALL msg("Can't concatenate vectors of differing lengths"); STOP; END IF
     out(:,iv) = d(:)
   END DO
@@ -852,6 +863,6 @@
 
   CHARACTER(LEN=2048) :: row
-  CHARACTER(LEN=256)  :: rFm, el
-  CHARACTER(LEN=256), ALLOCATABLE :: d(:,:)
+  CHARACTER(LEN=maxlen)  :: rFm, el
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: d(:,:)
   CHARACTER(LEN=1) :: s1, sp
   INTEGER :: is, ii, ir, np, nrow, unt, ic
@@ -870,5 +881,5 @@
 
   !--- CHECK ARGUMENTS COHERENCE
-  lerr = np /= SIZE(titles); IF(fmsg(lerr, 'string "pattern" length and titles list mismatch')) RETURN
+  lerr = np /= SIZE(titles); IF(fmsg('string "pattern" length and titles list mismatch', ll=lerr)) RETURN
   IF(ls) THEN; ns = SIZE(s, DIM=1); ncol = ncol + SIZE(s, DIM=2)
     lerr = COUNT([(p(ic:ic)=='s', ic=1, np)]) /= SIZE(s, DIM=2)
@@ -880,10 +891,9 @@
     lerr = COUNT([(p(ic:ic)=='r', ic=1, np)]) /= SIZE(r, DIM=2)
   END IF
-
-  IF(fmsg(lerr, 'string "pattern" length and arguments number mismatch')) RETURN
-  lerr = ncol /= SIZE(titles); IF(fmsg(lerr, '"titles" length and arguments number mismatch')) RETURN
-  lerr = ls.AND.li.AND.ns/=ni; IF(fmsg(lerr, 'string and integer arguments lengths mismatch')) RETURN
-  lerr = ls.AND.lr.AND.ns/=nr; IF(fmsg(lerr,    'string and real arguments lengths mismatch')) RETURN
-  lerr = li.AND.lr.AND.ni/=nr; IF(fmsg(lerr,   'integer and real arguments lengths mismatch')) RETURN
+  IF(fmsg('string "pattern" length and arguments number mismatch', ll=lerr)) RETURN
+  lerr = ncol /= SIZE(titles); IF(fmsg('"titles" length and arguments number mismatch', ll=lerr)) RETURN
+  lerr = ls.AND.li.AND.ns/=ni; IF(fmsg('string and integer arguments lengths mismatch', ll=lerr)) RETURN
+  lerr = ls.AND.lr.AND.ns/=nr; IF(fmsg(   'string and real arguments lengths mismatch', ll=lerr)) RETURN
+  lerr = li.AND.lr.AND.ni/=nr; IF(fmsg(  'integer and real arguments lengths mismatch', ll=lerr)) RETURN
   nrow = MAX(ns,ni,nr)+1
   nmx = nrow; IF(PRESENT(nmax)) nmx = MIN(nmx,nmax+1)
@@ -912,8 +922,8 @@
     END DO
     nr = LEN_TRIM(row)-1                                             !--- Final separator removed
-    CALL msg(row(1:nr), unt)
+    CALL msg(row(1:nr), unit=unt)
     IF(ir /= 1) CYCLE                                                !--- Titles are underlined
     row=''; DO ic=1,ncol; row=TRIM(row)//REPEAT('-',n(ic))//'+'; END DO
-    CALL msg(row(1:LEN_TRIM(row)-1), unt)
+    CALL msg(row(1:LEN_TRIM(row)-1), unit=unt)
   END DO
 
@@ -932,7 +942,7 @@
   LOGICAL,          OPTIONAL, INTENT(IN)  :: llast         !--- Last variable: no final ','
 
-  CHARACTER(LEN=256)  :: rFm, el
-  CHARACTER(LEN=256), ALLOCATABLE :: d(:,:)
-  CHARACTER(LEN=:),   ALLOCATABLE :: sp, row
+  CHARACTER(LEN=maxlen)  :: rFm, el
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: d(:,:)
+  CHARACTER(LEN=:),      ALLOCATABLE :: sp, row
   INTEGER :: is, ii, ir, nrow, ic
   INTEGER :: ns, ni, nr, ncol, np
@@ -957,9 +967,9 @@
     lerr = COUNT([(p(ic:ic)=='r', ic=1, np)]) /= SIZE(r, DIM=2)
   END IF
-  IF(fmsg(lerr, 'string "pattern" length and arguments number mismatch')) RETURN
-  lerr = ncol /= SIZE(titles); IF(fmsg(lerr, '"titles" length and arguments number mismatch')) RETURN
-  lerr = ls.AND.li.AND.ns/=ni; IF(fmsg(lerr, 'string and integer arguments lengths mismatch')) RETURN
-  lerr = ls.AND.lr.AND.ns/=nr; IF(fmsg(lerr,    'string and real arguments lengths mismatch')) RETURN
-  lerr = li.AND.lr.AND.ni/=nr; IF(fmsg(lerr,   'integer and real arguments lengths mismatch')) RETURN
+  IF(fmsg('string "pattern" length and arguments number mismatch', ll=lerr)) RETURN
+  lerr = ncol /= SIZE(titles); IF(fmsg('"titles" length and arguments number mismatch', ll=lerr)) RETURN
+  lerr = ls.AND.li.AND.ns/=ni; IF(fmsg('string and integer arguments lengths mismatch', ll=lerr)) RETURN
+  lerr = ls.AND.lr.AND.ns/=nr; IF(fmsg(   'string and real arguments lengths mismatch', ll=lerr)) RETURN
+  lerr = li.AND.lr.AND.ni/=nr; IF(fmsg(  'integer and real arguments lengths mismatch', ll=lerr)) RETURN
 
   !--- Allocate the assembled quantities array
@@ -1012,10 +1022,10 @@
   CHARACTER(LEN=*), OPTIONAL, INTENT(IN)  :: err_msg, nam(:), subn   !--- Error message, variables and calling subroutine names
   INTEGER,          OPTIONAL, INTENT(IN)  :: nmax, unit              !--- Maximum number of lines to display (default: all)
-  CHARACTER(LEN=256),         ALLOCATABLE :: ttl(:)
+  CHARACTER(LEN=maxlen),      ALLOCATABLE :: ttl(:)
   LOGICAL,                    ALLOCATABLE :: m(:)
   INTEGER,                    ALLOCATABLE :: ki(:), kj(:)
   INTEGER                                 :: i, j, k, rk, rk1, ib, ie, itr, nm, unt, nmx, nv
-  CHARACTER(LEN=256)                      :: mes, sub, fm='(f12.9)', v, s
-  CHARACTER(LEN=256),         ALLOCATABLE :: vnm(:)
+  CHARACTER(LEN=maxlen)                   :: mes, sub, fm='(f12.9)', v, s
+  CHARACTER(LEN=maxlen),      ALLOCATABLE :: vnm(:)
 
   lerr = ANY(ll); IF(.NOT.lerr) RETURN                               !--- No outliers -> finished
@@ -1028,9 +1038,8 @@
 
   rk = SIZE(n); nv = SIZE(vnm)
-  IF(test(fmsg(nv /= 1 .AND. nv /= n(rk), 'In "'//TRIM(sub)//'": SIZE(nam) /= 1 or =last "n" element'    , unt),lerr)) RETURN
-  IF(test(fmsg(SIZE(a) /= SIZE(ll),       'In "'//TRIM(sub)//'": "ll" and "a" sizes mismatch'            , unt),lerr)) RETURN
-  IF(test(fmsg(SIZE(a) /= PRODUCT(n),     'In "'//TRIM(sub)//'": profile "n" does not match "a" and "ll"', unt),lerr)) RETURN
-
-  WRITE(unt,*)'Outliers detected by '//TRIM(sub)//': '//TRIM(mes)
+  IF(test(fmsg('SIZE(nam) /= 1 and /= last "n" element', sub, nv /= 1 .AND. nv /= n(rk), unt),lerr)) RETURN
+  IF(test(fmsg('ll" and "a" sizes mismatch',             sub, SIZE(a) /= SIZE(ll),       unt),lerr)) RETURN
+  IF(test(fmsg('profile "n" does not match "a" and "ll', sub, SIZE(a) /= PRODUCT(n),     unt),lerr)) RETURN
+  CALL msg(mes, sub, unit=unt)
 
   !--- SCALAR CASE: single value to display
@@ -1051,5 +1060,5 @@
     IF(nv == 1) lerr = dispTable('sr', ttl,               s=cat(PACK(nam,ll)), r=cat(PACK(a,ll)), rFmt=fm, nmax=nmax)
     IF(nv /= 1) lerr = dispTable('ir', ['name ','value'], i=cat(PACK(ki,m)),   r=cat(PACK(a,ll)), rFmt=fm, nmax=nmax)
-    CALL msg(lerr,'In '//TRIM(sub)//": can't display outliers table", unt)
+    CALL msg("can't display outliers table", sub, lerr, unt)
     RETURN
   END IF
@@ -1068,6 +1077,6 @@
     IF(rk==2) lerr = dispTable('ir',  ttl, i=cat(PACK(ki,m)),            r=cat(PACK(a(ib:ie),m)), rFmt=fm, nmax=nmax)
     IF(rk==3) lerr = dispTable('iir', ttl, i=cat(PACK(ki,m),PACK(kj,m)), r=cat(PACK(a(ib:ie),m)), rFmt=fm, nmax=nmax)
-    CALL msg(lerr,'In '//TRIM(sub)//": can't display outliers table", unt)
-    IF(lerr) THEN; CALL msg("Can't display outliers table"); RETURN; END IF
+    CALL msg("can't display outliers table", sub, lerr, unt)
+    IF(lerr) RETURN
   END DO
 END FUNCTION dispOutliers_1
@@ -1082,6 +1091,6 @@
   INTEGER,          OPTIONAL, INTENT(IN)  :: nmax, unit              !--- Maximum number of lines to display (default: all)
 
-  CHARACTER(LEN=256)                      :: mes, sub, fm='(f12.9)', prf
-  CHARACTER(LEN=256),         ALLOCATABLE :: ttl(:), vnm(:)
+  CHARACTER(LEN=maxlen)                   :: mes, sub, fm='(f12.9)', prf
+  CHARACTER(LEN=maxlen),      ALLOCATABLE :: ttl(:), vnm(:)
   LOGICAL,                    ALLOCATABLE :: m(:)
   INTEGER,                    ALLOCATABLE :: ki(:), kj(:), kl(:)
@@ -1096,7 +1105,7 @@
   nmx = SIZE(a);                  IF(PRESENT(nmax))    nmx = MIN(nmx,nmax)!--- Maximum number of lines to print
   unt = lunout;                   IF(PRESENT(unit))    unt = unit         !--- Unit to print messages
-  lerr = SIZE(vnm) /= nv;         IF(fmsg(lerr, 'In "dispOutlayers_2": SIZE(nam) /= SIZE(a,2)'  ,unt)) RETURN
-  lerr = SIZE(a,1) /= SIZE(ll);   IF(fmsg(lerr,'In '//TRIM(sub)//': "ll" and "a" sizes mismatch',unt)) RETURN
-  lerr = SIZE(a,1) /= PRODUCT(n); IF(fmsg(lerr,'In '//TRIM(sub)//': profile "n" does not match "a" and "ll"',unt)) RETURN
+  lerr = SIZE(vnm) /= nv;         IF(fmsg('SIZE(nam) /= SIZE(a,2)',                  sub, lerr, unt)) RETURN
+  lerr = SIZE(a,1) /= SIZE(ll);   IF(fmsg('"ll" and "a" sizes mismatch',             sub, lerr, unt)) RETURN
+  lerr = SIZE(a,1) /= PRODUCT(n); IF(fmsg('profile "n" does not match "a" and "ll"', sub, lerr, unt)) RETURN
 
   SELECT CASE(rk1)                                                   !--- Indices list
@@ -1116,5 +1125,5 @@
   IF(rk == 3) lerr = dispTable(prf, ttl, i = cat(PACK(ki,ll),PACK(kj,ll),PACK(kl,ll)), &
                      r = val, rFmt=fm, nmax=nmax)
-  CALL msg(lerr,'In '//TRIM(sub)//": can't display outliers table", unt)
+  CALL msg("can't display outliers table", sub, lerr, unt)
 END FUNCTION dispOutliers_2
 !==============================================================================================================================
@@ -1125,9 +1134,9 @@
 !==============================================================================================================================
 LOGICAL FUNCTION reduceExpr_1(str, val) RESULT(lerr)
-  CHARACTER(LEN=*),    INTENT(IN)  :: str
-  CHARACTER(LEN=256),  INTENT(OUT) :: val
-
-  CHARACTER(LEN=256)               :: v
-  CHARACTER(LEN=1024)              :: s, vv
+  CHARACTER(LEN=*),      INTENT(IN)  :: str
+  CHARACTER(LEN=maxlen), INTENT(OUT) :: val
+
+  CHARACTER(LEN=maxlen)              :: v
+  CHARACTER(LEN=1024)                :: s, vv
   CHARACTER(LEN=1024), ALLOCATABLE :: vl(:)
   INTEGER,             ALLOCATABLE :: ip(:)
@@ -1141,5 +1150,5 @@
   ll = strCount(s,')',nn)
   lerr = nl /= nn
-  IF(fmsg(lerr, 'Mismatching number of opening and closing parenthesis: '//TRIM(s))) RETURN
+  IF(fmsg('Mismatching number of opening and closing parenthesis: '//TRIM(s), ll=lerr)) RETURN
   nl = 2*nl-1
 
@@ -1175,10 +1184,10 @@
 !==============================================================================================================================
 LOGICAL FUNCTION reduceExpr_basic(str, val) RESULT(lerr)
-  CHARACTER(LEN=*),   INTENT(IN)  :: str
-  CHARACTER(LEN=*),   INTENT(OUT) :: val
-  DOUBLE PRECISION,   ALLOCATABLE :: vl(:)
-  INTEGER,            ALLOCATABLE :: id(:)
-  CHARACTER(LEN=256), ALLOCATABLE :: ky(:)
-  CHARACTER(LEN=1),   ALLOCATABLE :: op(:)
+  CHARACTER(LEN=*),      INTENT(IN)  :: str
+  CHARACTER(LEN=*),      INTENT(OUT) :: val
+  DOUBLE PRECISION,      ALLOCATABLE :: vl(:)
+  INTEGER,               ALLOCATABLE :: id(:)
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: ky(:)
+  CHARACTER(LEN=1),      ALLOCATABLE :: op(:)
 
   CHARACTER(LEN=1024) :: s
@@ -1194,5 +1203,5 @@
   vl = str2dble(ky)                                                            !--- Conversion to doubles
   lerr = ANY(vl >= HUGE(1.d0))
-  IF(fmsg(lerr,'Some values are non-numeric in: '//TRIM(s))) RETURN            !--- Non-numerical values found
+  IF(fmsg('Some values are non-numeric in: '//TRIM(s), ll=lerr)) RETURN        !--- Non-numerical values found
   DO io = 1, SIZE(op)                                                          !--- Loop on known operators (order matters !)
     DO i = SIZE(id), 1, -1                                                     !--- Loop on found operators
@@ -1218,7 +1227,7 @@
 !==============================================================================================================================
 FUNCTION reduceExpr_m(str, val) RESULT(lerr)
-  LOGICAL,            ALLOCATABLE              :: lerr(:)
-  CHARACTER(LEN=*),                INTENT(IN)  :: str(:)
-  CHARACTER(LEN=256), ALLOCATABLE, INTENT(OUT) :: val(:)
+  LOGICAL,               ALLOCATABLE              :: lerr(:)
+  CHARACTER(LEN=*),                   INTENT(IN)  :: str(:)
+  CHARACTER(LEN=maxlen), ALLOCATABLE, INTENT(OUT) :: val(:)
   INTEGER :: i
   ALLOCATE(lerr(SIZE(str)),val(SIZE(str)))
@@ -1277,5 +1286,5 @@
 END FUNCTION str2dble
 !==============================================================================================================================
-ELEMENTAL CHARACTER(LEN=256) FUNCTION bool2str(b) RESULT(out)
+ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION bool2str(b) RESULT(out)
   LOGICAL, INTENT(IN) :: b
   WRITE(out,*)b
@@ -1283,5 +1292,5 @@
 END FUNCTION bool2str
 !==============================================================================================================================
-ELEMENTAL CHARACTER(LEN=256) FUNCTION int2str(i, nDigits) RESULT(out)
+ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION int2str(i, nDigits) RESULT(out)
   INTEGER,           INTENT(IN) :: i
   INTEGER, OPTIONAL, INTENT(IN) :: nDigits
@@ -1292,5 +1301,5 @@
 END FUNCTION int2str
 !==============================================================================================================================
-ELEMENTAL CHARACTER(LEN=256) FUNCTION real2str(r,fmt) RESULT(out)
+ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION real2str(r,fmt) RESULT(out)
   REAL,                       INTENT(IN) :: r
   CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: fmt
@@ -1300,5 +1309,5 @@
 END FUNCTION real2str
 !==============================================================================================================================
-ELEMENTAL CHARACTER(LEN=256) FUNCTION dble2str(d,fmt) RESULT(out)
+ELEMENTAL CHARACTER(LEN=maxlen) FUNCTION dble2str(d,fmt) RESULT(out)
   DOUBLE PRECISION,           INTENT(IN) :: d
   CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: fmt
@@ -1367,5 +1376,5 @@
   CHARACTER(LEN=*),   INTENT(IN)  :: message, items, reason
   INTEGER,  OPTIONAL, INTENT(IN)  :: nmax
-  CHARACTER(LEN=256), ALLOCATABLE :: s(:)
+  CHARACTER(LEN=maxlen), ALLOCATABLE :: s(:)
   INTEGER :: i, nmx
   nmx = 256; IF(PRESENT(nmax)) nmx=nmax
Index: /trac_types_mod.F90
===================================================================
--- /trac_types_mod.F90	(revision 1)
+++ /trac_types_mod.F90	(revision 2)
@@ -1,47 +1,55 @@
 MODULE trac_types_mod
 
+  USE strings_mod, ONLY: maxlen
+  PRIVATE
+
 !=== TRACERS DESCRIPTOR DERIVED TYPE AND ASSOCIATED ROUTINES INTERFACES =======================================================
-  PRIVATE
-  PUBLIC :: tra, iso, kys
+  PUBLIC :: trac_type, isot_type, keys_type
 !------------------------------------------------------------------------------------------------------------------------------
-  TYPE kys                                                           !=== TYPE FOR A SET OF KEYS ASSOCIATED TO AN ELEMENT
-    CHARACTER(LEN=256)              :: name                          !--- Tracer name
-    CHARACTER(LEN=256), ALLOCATABLE :: key(:)                        !--- Keys string list
-    CHARACTER(LEN=256), ALLOCATABLE :: val(:)                        !--- Corresponding values string list
-  END TYPE kys
+  TYPE :: keys_type                                        !=== TYPE FOR A SET OF KEYS ASSOCIATED TO AN ELEMENT
+    CHARACTER(LEN=maxlen)              :: name             !--- Tracer name
+    CHARACTER(LEN=maxlen), ALLOCATABLE :: key(:)           !--- Keys string list
+    CHARACTER(LEN=maxlen), ALLOCATABLE :: val(:)           !--- Corresponding values string list
+  END TYPE keys_type
 !------------------------------------------------------------------------------------------------------------------------------
-  TYPE tra                                                           !=== TYPE FOR SINGLE TRACER
-    CHARACTER(LEN=256)   :: name = ''                                !--- Name
-    CHARACTER(LEN=256)   :: nam1 = ''                                !--- Generation 1 ancestor name
-    CHARACTER(LEN=256)   :: prnt = ''                                !--- Parent name
-    CHARACTER(LEN=256)   :: lnam = ''                                !--- Long name (with adv. scheme)
-    CHARACTER(LEN=256)   :: type = 'tracer'                          !--- Type (so far: 'tracer'/'tag')
-    CHARACTER(LEN=256)   :: phas = 'g'                               !--- Phase ('g'as/'l'iquid/'s'olid)
-    CHARACTER(LEN=256)   :: comp                                     !--- Coma-separated list of components (Ex: lmdz,inca)
-    INTEGER              :: iadv = 10                                !--- Advection scheme used
-    INTEGER              :: igen = 1                                 !--- Generation number (>=1)
-    INTEGER              :: itr  = 0                                 !--- Index in tr_seri (0: not in physics)
-    INTEGER              :: iprnt = 0                                !--- Parent index
-    INTEGER, ALLOCATABLE :: idesc(:)                                 !--- Descendants index (in growing generation order)
-    INTEGER              :: ndesc = 0                                !--- Number of descendants (all generations)
-    INTEGER              :: nchld = 0                                !--- Number of childs    (first generation)
-    INTEGER              :: iso_igr = 0                              !--- Isotopes group index in isotopes(:)
-    INTEGER              :: iso_num = 0                              !--- Isotope  name  index in isotopes(iso_igr)%trac(:)
-    INTEGER              :: iso_zon = 0                              !--- Isotope  zone  index in isotopes(iso_igr)%zone(:)
-    INTEGER              :: iso_pha = 0                              !--- Isotope  phase index in isotopes(iso_igr)%phas
-    TYPE(kys)            :: keys                                     !--- <key>=<val> pairs vector
-  END TYPE tra
+  TYPE :: trac_type                                        !=== TYPE FOR A SINGLE TRACER NAMED "name"
+    CHARACTER(LEN=maxlen) :: name        = ''      	   !--- Name of the tracer
+    CHARACTER(LEN=maxlen) :: gen0Name    = ''      	   !--- First generation ancestor name
+    CHARACTER(LEN=maxlen) :: parent      = ''      	   !--- Parent name
+    CHARACTER(LEN=maxlen) :: longName    = ''      	   !--- Long name (with advection scheme suffix)
+    CHARACTER(LEN=maxlen) :: type        = 'tracer'	   !--- Type  (so far: 'tracer' / 'tag')
+    CHARACTER(LEN=maxlen) :: phase       = 'g'     	   !--- Phase ('g'as / 'l'iquid / 's'olid)
+    CHARACTER(LEN=maxlen) :: component             	   !--- Coma-separated list of components (Ex: lmdz,inca)
+    INTEGER               :: iadv        = 10      	   !--- Advection scheme used
+    INTEGER               :: iGeneration = 1       	   !--- Generation number (>=1)
+    LOGICAL               :: isAdvected  = .FALSE. 	   !--- "true" tracers: iadv > 0 . COUNT(     isAdvected) =nqtrue
+    LOGICAL               :: isH2Ofamily = .FALSE. 	   !--- H2O tracers/isotopes/tags. COUNT(.NOT.isH2Ofamily)=nqtottr
+    INTEGER               :: iqParent    = 0       	   !--- Parent index
+    INTEGER,  ALLOCATABLE :: iqDescen(:)           	   !--- Descendants index (in growing generation order)
+    INTEGER               :: nqDescen    = 0       	   !--- Number of descendants (all generations)
+    INTEGER               :: nqChilds    = 0       	   !--- Number of childs    (first generation)
+    INTEGER               :: iso_iGroup  = 0       	   !--- Isotopes group index in isotopes(:)
+    INTEGER               :: iso_iName   = 0       	   !--- Isotope  name  index in isotopes(iso_iGroup)%trac(:)
+    INTEGER               :: iso_iZone   = 0       	   !--- Isotope  zone  index in isotopes(iso_iGroup)%zone(:)
+    INTEGER               :: iso_iPhase  = 0       	   !--- Isotope  phase index in isotopes(iso_iGroup)%phas
+    TYPE(keys_type)       :: keys                          !--- <key>=<val> pairs vector
+  END TYPE trac_type
 !------------------------------------------------------------------------------------------------------------------------------
-  TYPE iso                                                           !=== TYPE FOR ISOTOPES FAMILY DESCENDING ON TRACER "prnt"
-    CHARACTER(LEN=256)              :: prnt                          !--- Isotopes family name (parent tracer name ; ex: H2O)
-    LOGICAL                         :: check=.FALSE.                 !--- Triggering of the checking routines
-    TYPE(kys),          ALLOCATABLE :: keys(:)                       !--- Isotopes keys/values pairs list (length: niso)
-    CHARACTER(LEN=256), ALLOCATABLE :: trac(:)                       !--- Isotopes + tagging tracers list (length: nitr)
-    CHARACTER(LEN=256), ALLOCATABLE :: zone(:)                       !--- Geographic tagging zones names list
-    CHARACTER(LEN=256)              :: phas = 'g'                    !--- Phases list: [g][l][s]
-    INTEGER                         :: niso=0, nzon=0, nitr=0, npha=0!--- Number of isotopes, zones, total isotopes and phases
-    INTEGER,            ALLOCATABLE :: iTraPha(:,:)   ! (iqiso)      !--- Idx in "trac(1:niso)" = f(name(1:nitr)),phas)
-    INTEGER,            ALLOCATABLE :: iZonIso(:,:)   ! (index_trac) !--- Idx in "trac(1:nitr)" = f(zone, name(1:niso))
-  END TYPE iso
+  TYPE :: isot_type                                        !=== TYPE FOR AN ISOTOPES FAMILY DESCENDING ON TRACER "parent"
+    CHARACTER(LEN=maxlen)              :: parent           !--- Isotopes family name (parent tracer name ; ex: H2O)
+    LOGICAL                            :: check=.FALSE.    !--- Triggering of the checking routines
+    TYPE(keys_type),       ALLOCATABLE :: keys(:)          !--- Isotopes keys/values pairs list     (length: niso)
+    CHARACTER(LEN=maxlen), ALLOCATABLE :: trac(:)          !--- Isotopes + tagging tracers list     (length: nitr)
+    CHARACTER(LEN=maxlen), ALLOCATABLE :: zone(:)          !--- Geographic tagging zones names list (length: nzon)
+    CHARACTER(LEN=maxlen)              :: phase = 'g'      !--- Phases list: [g][l][s]              (length: npha)
+    INTEGER                            :: niso = 0         !--- Number of isotopes, excluding tagging tracers
+    INTEGER                            :: nzon = 0         !--- Number of geographic tagging zones
+    INTEGER                            :: nitr = 0         !--- Number of isotopes, including tagging tracers
+    INTEGER                            :: npha = 0         !--- Number phases
+    INTEGER,               ALLOCATABLE :: iTraPha(:,:)     !--- Idx in "trac(1:niso)" = f(name(1:nitr)),phas)
+                                                           !---        "iTraPha" former name: "iqiso"
+    INTEGER,               ALLOCATABLE :: iZonIso(:,:)     !--- Idx in "trac(1:nitr)" = f(zone, name(1:niso))
+                                                           !---        "iZonIso" former name: "index_trac"
+  END TYPE isot_type
 
 END MODULE trac_types_mod
