Index: trunk/LMDZ.GENERIC/libf/phystd/dyn1d/kcm1d.F90
===================================================================
--- trunk/LMDZ.GENERIC/libf/phystd/dyn1d/kcm1d.F90	(revision 2428)
+++ trunk/LMDZ.GENERIC/libf/phystd/dyn1d/kcm1d.F90	(revision 2436)
@@ -90,4 +90,8 @@
   real :: latitude(1), longitude(1), cell_area(1), phisfi(1)
   
+  !     added by JVO and YJ to read modern traceur.def
+  character(len=500) :: line ! to store a line of text
+  LOGICAL :: moderntracdef=.false. ! JVO, YJ : modern traceur.def
+
   ! --------------
   ! Initialisation
@@ -162,5 +166,24 @@
         write(*,*) "kcm1d: Reading file traceur.def"
         ! read number of tracers:
-        read(90,*,iostat=ierr) nq
+        !! - Modif. by JVO and YJ for modern planetary traceur.def ---------------
+        READ(90,'(A)') line
+        IF (trim(line).ne.'#ModernTrac-v1') THEN ! Test modern traceur.def
+           READ(line,*,iostat=ierr) nq ! Try standard traceur.def
+        ELSE
+           moderntracdef = .true.
+           DO
+             READ(90,'(A)',iostat=ierr) line
+             IF (ierr.eq.0) THEN
+               IF (index(line,'#').ne.1) THEN ! Allows arbitary number of comments lines in the header
+                 READ(line,*,iostat=ierr) nq
+                 EXIT
+               ENDIF
+             ELSE ! If pb, or if reached EOF without having found nbtr
+                write(*,*) "rcm1d: error reading number of tracers"
+                write(*,*) "   (first line of traceur.def) "
+                stop
+             ENDIF
+           ENDDO
+        ENDIF ! if modern or standard traceur.def
         if (ierr.ne.0) then
            write(*,*) "kcm1d: error reading number of tracers"
@@ -184,4 +207,5 @@
            endif
         enddo !of do iq=1,nq
+        close(90)
      endif
 
Index: trunk/LMDZ.GENERIC/libf/phystd/dyn1d/rcm1d.F
===================================================================
--- trunk/LMDZ.GENERIC/libf/phystd/dyn1d/rcm1d.F	(revision 2428)
+++ trunk/LMDZ.GENERIC/libf/phystd/dyn1d/rcm1d.F	(revision 2436)
@@ -144,4 +144,8 @@
       real :: latitude(1), longitude(1), cell_area(1)
 
+      !     added by JVO and YJ to read modern traceur.def
+      character(len=500) :: line ! to store a line of text
+      LOGICAL :: moderntracdef=.false. ! JVO, YJ : modern traceur.def
+
 c=======================================================================
 c INITIALISATION
@@ -152,5 +156,25 @@
      &       iostat=ierr)
       if (ierr.eq.0) then
-        read(90,*,iostat=ierr) nq
+        ! read number of tracers:
+        !! - Modif. by JVO and YJ for modern planetary traceur.def ---------------
+            READ(90,'(A)') line
+            IF (trim(line).ne.'#ModernTrac-v1') THEN ! Test modern traceur.def
+               READ(line,*,iostat=ierr) nq ! Try standard traceur.def
+            ELSE
+               moderntracdef = .true.
+               DO
+                 READ(90,'(A)',iostat=ierr) line
+                 IF (ierr.eq.0) THEN
+                   IF (index(line,'#').ne.1) THEN ! Allows arbitary number of comments lines in the header
+                     READ(line,*,iostat=ierr) nq
+                     EXIT
+                   ENDIF
+                 ELSE ! If pb, or if reached EOF without having found nbtr
+                    write(*,*) "rcm1d: error reading number of tracers"
+                    write(*,*) "   (first line of traceur.def) "
+                    stop
+                 ENDIF
+               ENDDO
+            ENDIF ! if modern or standard traceur.def
       else
         nq=0
@@ -243,5 +267,24 @@
           write(*,*) "rcm1d: Reading file traceur.def"
           ! read number of tracers:
-          read(90,*,iostat=ierr) nq
+          !! - Modif. by JVO and YJ for modern planetary traceur.def ---------------
+          READ(90,'(A)') line
+          IF (trim(line).ne.'#ModernTrac-v1') THEN ! Test modern traceur.def
+             READ(line,*,iostat=ierr) nq ! Try standard traceur.def
+          ELSE
+             moderntracdef = .true.
+             DO
+               READ(90,'(A)',iostat=ierr) line
+               IF (ierr.eq.0) THEN
+                 IF (index(line,'#').ne.1) THEN ! Allows arbitary number of comments lines in the header
+                   READ(line,*,iostat=ierr) nq
+                   EXIT
+                 ENDIF
+               ELSE ! If pb, or if reached EOF without having found nbtr
+                  write(*,*) "rcm1d: error reading number of tracers"
+                  write(*,*) "   (first line of traceur.def) "
+                  stop
+               ENDIF
+             ENDDO
+          ENDIF ! if modern or standard traceur.def
           nqtot=nq ! set value of nqtot (in infotrac module) as nq
           if (ierr.ne.0) then
Index: trunk/LMDZ.GENERIC/libf/phystd/initracer.F
===================================================================
--- trunk/LMDZ.GENERIC/libf/phystd/initracer.F	(revision 2428)
+++ trunk/LMDZ.GENERIC/libf/phystd/initracer.F	(revision 2436)
@@ -20,4 +20,5 @@
 c   ------
 c            Ehouarn Millour (oct. 2008) identify tracers by their names
+c            Y Jaziri & J. Vatant d'Ollone (2020) : Modern traceur.def
 c=======================================================================
 
@@ -25,7 +26,7 @@
       character(len=30),intent(in) :: nametrac(nq) ! name of the tracer from dynamics
 
-      character(len=30) :: txt ! to store some text
-      integer iq,ig,count
-      real r0_lift , reff_lift
+      character(len=500) :: tracline   ! to read traceur.def lines
+      character(len=30)  :: txt        ! to store some text
+      integer iq,ig,count,ierr
 
 
@@ -43,4 +44,38 @@
 c-----------------------------------------------------------------------
 
+      moderntracdef=.false. ! For modern traceur.def (default false, old type)
+
+      open(407, form = 'formatted', status = 'old',
+     $          file = 'traceur.def', iostat=ierr)
+      if (ierr /=0) then
+        call abort_physic('initracer',
+     $  'Problem in opening traceur.def',1)
+      end if
+!! - Modif. by JVO and YJ for modern planetary traceur.def ---------------
+       READ(407,'(A)') tracline
+       IF (trim(tracline).ne.'#ModernTrac-v1') THEN ! Test modern traceur.def
+          READ(tracline,*) nqtot ! Try standard traceur.def
+       ELSE
+         moderntracdef = .true.
+         DO
+           READ(407,'(A)',iostat=ierr) tracline
+           IF (ierr==0) THEN
+             IF (index(tracline,'#').ne.1) THEN ! Allows arbitary number of comments lines in the header
+               READ(tracline,*) nqtot
+               ! Temporary not implemented solution
+               if (nqtot/=nq) then
+                 call abort_physic('initracer','Different number of&
+     & tracers in dynamics and physics not managed yet',1)
+               endif
+               EXIT
+             ENDIF
+           ELSE ! If pb, or if reached EOF without having found nqtot
+             call abort_physic('initracer','Unable to read numbers&
+     & of tracers in traceur.def',1)
+           ENDIF
+         ENDDO
+       ENDIF ! if modern or standard traceur.def
+!! -----------------------------------------------------------------------
+       !! For the moment number of tracers in dynamics and physics are equal
        nqtot=nq
        !! we allocate once for all arrays in common in tracer_h.F90
@@ -339,4 +374,11 @@
       endif
 
+      ! Get data of tracers
+      do iq=1,nqtot
+        read(407,'(A)') tracline
+        call get_tracdat(iq, tracline)
+      enddo
+
+      close(407)
 
 c------------------------------------------------------------
@@ -410,3 +452,32 @@
       write(*,*)
 
+      contains
+
+      subroutine get_tracdat(iq,tracline)
+        !-------------------ADDING NEW OPTIONS-------------------
+        ! Duplicate if sentence for adding new options
+        ! Do not forget to add the new variables in tracer_h.F90
+        ! Do not forget to allocate and initialize the new variables above
+        ! Please update list of options in "LMDZ.GENERIC/deftank/traceur.def.modern"
+        !-------------------------------------------------------
+          use tracer_h
+          implicit none
+          integer,           intent(in) :: iq       ! tracer index
+          character(len=500),intent(in) :: tracline ! traceur.def lines with parameters
+  
+          read(tracline,*) noms(iq)
+          ! JVO 20 : We should add a sanity check aborting when duplicates in names !
+          write(*,*)"initracer: iq=",iq,"noms(iq)=",trim(noms(iq))
+          if (index(tracline,'mmol='   ) /= 0) then
+              read(tracline(index(tracline,'mmol=')+len('mmol='):),*)
+     $             mmol(iq)
+              write(*,*) ' Parameter value (traceur.def) : mmol=',
+     $             mmol(iq)
+          else
+              write(*,*) ' Parameter value (default)     : mmol=',
+     $             mmol(iq)
+          end if
+      end subroutine get_tracdat
+
       end
+
Index: trunk/LMDZ.GENERIC/libf/phystd/tracer_h.F90
===================================================================
--- trunk/LMDZ.GENERIC/libf/phystd/tracer_h.F90	(revision 2428)
+++ trunk/LMDZ.GENERIC/libf/phystd/tracer_h.F90	(revision 2436)
@@ -6,4 +6,7 @@
        integer, save :: nqtot ! total number of tracers
 !$OMP THREADPRIVATE(nqtot)
+
+       logical :: moderntracdef=.false. ! Standard or modern traceur.def
+!$OMP THREADPRIVATE(moderntracdef)
 
        character*30, save, allocatable :: noms(:)   ! name of the tracer
