Index: LMDZ6/branches/LMDZ-tracers/libf/dyn3d_common/infotrac.F90
===================================================================
--- LMDZ6/branches/LMDZ-tracers/libf/dyn3d_common/infotrac.F90	(revision 3963)
+++ LMDZ6/branches/LMDZ-tracers/libf/dyn3d_common/infotrac.F90	(revision 3985)
@@ -2,5 +2,5 @@
 
   USE       strings_mod, ONLY: msg, find, strIdx,  strFind,  strHead, dispTable, testFile, cat, get_in,   &
-                              fmsg, test, int2str, strParse, strTail, strReduce, strStack, modname
+                              fmsg, test, int2str, strParse, strTail, strReduce, strStack, modname, reduceExpr
   USE readTracFiles_mod, ONLY: readTracersFiles, getKey_init, nphases, delPhase, old_phases, aliasTracer, &
             phases_sep, tran0, readIsotopesFile, getKey, known_phases, addPhase, indexUpdate, initIsotopes
@@ -202,4 +202,8 @@
   oldH2O        = ['H2Ov','H2Ol','H2Oi']
 
+!  lerr = reduceExpr('1.0+-470.0/1000.',msg1)
+!print*,msg1
+!stop
+
   !--- MESSAGE ABOUT THE CHOSEN CONFIGURATION
   CALL msg('type_trac='//TRIM(type_trac))
@@ -279,4 +283,5 @@
       IF(planet_type=='earth') THEN                                  !--- Default for Earth
         nqo = 2; nbtr = 2
+        ALLOCATE(tracers(nqo+nbtr))
         tracers(:)%name = ['H2O'//phases_sep//'g', 'H2O'//phases_sep//'l', 'RN   ', 'PB   ']
         tracers(:)%prnt = [tran0, tran0, tran0, tran0]
@@ -286,4 +291,5 @@
       ELSE                                                           !--- Default for other planets
         nqo = 0; nbtr = 1
+        ALLOCATE(tracers(nqo+nbtr))
         tracers(:)%name = ['dummy']
         tracers(:)%prnt = ['dummy']
@@ -354,26 +360,4 @@
   IF(.NOT.ALLOCATED(conv_flg)) conv_flg = [(1, it=1, nbtr)]
   IF(.NOT.ALLOCATED( pbl_flg))  pbl_flg = [(1, it=1, nbtr)]
-!print*,'nqo, nbtr = ',nqo,nbtr
-!stop
-
-#ifdef CPP_StratAer
-  IF (type_trac == 'coag') THEN
-    nbtr_bin=0
-    nbtr_sulgas=0
-    DO iq = 1, nqtrue
-      IF(tracers(iq)%name(1:3)=='BIN') nbtr_bin    = nbtr_bin   +1
-      IF(tracers(iq)%name(1:3)=='GAS') nbtr_sulgas = nbtr_sulgas+1
-      SELECT CASE(tracers(iq)%name)
-        CASE('BIN01');    id_BIN01_strat = iq - nqo; CALL msg('id_BIN01_strat=', id_BIN01_strat)
-        CASE('GASOCS');   id_OCS_strat   = iq - nqo; CALL msg('id_OCS_strat  =', id_OCS_strat)
-        CASE('GASSO2');   id_SO2_strat   = iq - nqo; CALL msg('id_SO2_strat  =', id_SO2_strat)
-        CASE('GASH2SO4'); id_H2SO4_strat = iq - nqo; CALL msg('id_H2SO4_strat=', id_H2SO4_strat)
-        CASE('GASTEST');  id_TEST_strat  = iq - nqo; CALL msg('id_TEST_strat=' , id_TEST_strat)
-      END SELECT
-    END DO
-    CALL msg('nbtr_bin      =',nbtr_bin)
-    CALL msg('nbtr_sulgas   =',nbtr_sulgas)
-  END IF
-#endif
 
   !--- Transfert number of tracers to Reprobus
@@ -459,14 +443,15 @@
     WRITE(msg2,'(a,i2,a)')'iadv=',iad,' not implemented yet for'
 
-    !--- ONLY TESTED VALUES FOR TRACERS FOR NOW: iadv = 14, 10 (and 0)
+    !--- ONLY TESTED VALUES FOR TRACERS FOR NOW:               iadv = 14, 10 (and 0 for non-transported tracers)
     IF(ALL( [10,14,0] /= iad) ) CALL abort_gcm(modname, TRIM(msg1)//' ; only iadv=10 and iadv=14 are tested !', 1)
 
-    !--- ONLY TESTED VALUES FOR CHILDS  FOR NOW: iadv = 10     (CHILDS:  TRACERS OF GENERATION GREATER THAN 1)
+    !--- ONLY TESTED VALUES FOR CHILDS FOR NOW:                iadv = 10     (CHILDS:  TRACERS OF GENERATION GREATER THAN 1)
     IF(fmsg(iad/=10.AND.t1%igen>1,'WARNING ! '//TRIM(msg2)//' childs.  Setting iadv=10 for "'//TRIM(t1%name)//'".')) t1%iadv=10
 
-    !--- ONLY TESTED VALUES FOR PARENTS FOR NOW: iadv = 14, 10 (PARENTS: TRACERS OF GENERATION 1)
-    IF(t1%igen==1 .AND. ALL([10,14]/=iad)) CALL abort_gcm(modname, TRIM(msg2)//' parents: schemes 10 or 14 only !', 1)
-
-    !--- iadv = 14 IS ONLY VALID FOR WATER VAPOUR
+    !--- ONLY TESTED VALUES FOR PARENTS HAVING CHILDS FOR NOW: iadv = 14, 10 (PARENTS: TRACERS OF GENERATION 1)
+    IF(ANY(ttr(:)%igen>1) .AND. t1%igen==1 .AND. ALL([10,14]/=iad)) &
+      CALL abort_gcm(modname, TRIM(msg2)//' parents: schemes 10 or 14 only !', 1)
+
+    !--- ONLY VALID SCHEME NUMBER FOR WATER VAPOUR:            iadv = 14
     IF(fmsg(iad==14 .AND. t1%name(1:5)/='H2O'//phases_sep//'g', 'WARNING ! '//TRIM(msg1)//', found for "' &
                  //TRIM(t1%name)//'" but only valid for water vapour ! Setting iadv=10 for "'//TRIM(t1%name)//'".')) t1%iadv=10
