Index: trunk/LMDZ.GENERIC/libf/phystd/dyn1d/rcm1d.F
===================================================================
--- trunk/LMDZ.GENERIC/libf/phystd/dyn1d/rcm1d.F	(revision 1616)
+++ trunk/LMDZ.GENERIC/libf/phystd/dyn1d/rcm1d.F	(revision 1621)
@@ -24,5 +24,7 @@
       use callkeys_mod, only: tracer,check_cpp_match,rings_shadow,
      &	                      specOLR,water,pceil,ok_slab_ocean
-      USE comvert_mod, ONLY: ap,bp,aps,bps,pa,preff
+      USE comvert_mod, ONLY: ap,bp,aps,bps,pa,preff, sig,
+     &                       presnivs,pseudoalt,scaleheight
+      USE vertical_layers_mod, ONLY: init_vertical_layers
       USE logic_mod, ONLY: hybrid,autozlevs
       use regular_lonlat_mod, only: init_regular_lonlat
@@ -502,4 +504,7 @@
      &                   (/0.,0.,0.,0./),(/0.,0.,0.,0./),
      &                   cell_area)
+! Ehouarn: init_vertial_layers called later (because disvert not called yet)
+!      call init_vertical_layers(nlayer,preff,scaleheight,
+!     &                      ap,bp,aps,bps,presnivs,pseudoalt)
       call init_dimphy(1,nlayer) ! Initialize dimphy module
       call ini_planete_mod(nlayer,preff,ap,bp)
@@ -734,4 +739,7 @@
 
       call disvert
+      ! now that disvert has been called, initialize module vertical_layers_mod
+      call init_vertical_layers(nlayer,preff,scaleheight,
+     &                      ap,bp,aps,bps,presnivs,pseudoalt)
 
          if(.not.autozlevs)then
Index: trunk/LMDZ.GENERIC/libf/phystd/inistats.F
===================================================================
--- trunk/LMDZ.GENERIC/libf/phystd/inistats.F	(revision 1616)
+++ trunk/LMDZ.GENERIC/libf/phystd/inistats.F	(revision 1621)
@@ -3,6 +3,7 @@
       use statto_mod, only: istats,istime
       use mod_phys_lmdz_para, only : is_master
-      USE comvert_mod, ONLY: ap,bp,aps,bps,preff,pseudoalt,presnivs
-      USE comconst_mod, ONLY: pi
+      USE vertical_layers_mod, ONLY: ap,bp,aps,bps,preff,
+     &                               pseudoalt,presnivs
+      USE nrtype, ONLY: pi
       USE time_phylmdz_mod, ONLY: daysec,dtphys
       USE regular_lonlat_mod, ONLY: lon_reg, lat_reg
Index: trunk/LMDZ.GENERIC/libf/phystd/initracer.F
===================================================================
--- trunk/LMDZ.GENERIC/libf/phystd/initracer.F	(revision 1616)
+++ trunk/LMDZ.GENERIC/libf/phystd/initracer.F	(revision 1621)
@@ -46,4 +46,5 @@
 c-----------------------------------------------------------------------
 
+       nqtot=nq
        !! we allocate once for all arrays in common in tracer_h.F90
        !! (supposedly those are not used before call to initracer)
Index: trunk/LMDZ.GENERIC/libf/phystd/iniwrite.F
===================================================================
--- trunk/LMDZ.GENERIC/libf/phystd/iniwrite.F	(revision 1616)
+++ trunk/LMDZ.GENERIC/libf/phystd/iniwrite.F	(revision 1621)
@@ -3,9 +3,9 @@
       use comsoil_h, only: mlayer, nsoilmx
       USE comcstfi_mod, only: g, mugaz, omeg, rad, rcp, pi 
-      USE comvert_mod, ONLY: ap,bp,aps,bps,pseudoalt
-      USE logic_mod, ONLY: fxyhypb,ysinus
-      USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy
+      USE vertical_layers_mod, ONLY: ap,bp,aps,bps,pseudoalt
+!      USE logic_mod, ONLY: fxyhypb,ysinus
+!      USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy
       USE time_phylmdz_mod, ONLY: daysec, dtphys
-      USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0
+!      USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0
       USE regular_lonlat_mod, ONLY: lon_reg, lat_reg
       USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev
@@ -75,30 +75,30 @@
       tab_cntrl(10) = daysec
       tab_cntrl(11) = dtphys
-      tab_cntrl(12) = etot0
-      tab_cntrl(13) = ptot0
-      tab_cntrl(14) = ztot0
-      tab_cntrl(15) = stot0
-      tab_cntrl(16) = ang0
+!      tab_cntrl(12) = etot0
+!      tab_cntrl(13) = ptot0
+!      tab_cntrl(14) = ztot0
+!      tab_cntrl(15) = stot0
+!      tab_cntrl(16) = ang0
 c
 c    ..........    P.Le Van  ( ajout le 8/04/96 )    .........
 c         .....        parametres  pour le zoom          ......   
-      tab_cntrl(17)  = clon
-      tab_cntrl(18)  = clat
-      tab_cntrl(19)  = grossismx
-      tab_cntrl(20)  = grossismy
+!      tab_cntrl(17)  = clon
+!      tab_cntrl(18)  = clat
+!      tab_cntrl(19)  = grossismx
+!      tab_cntrl(20)  = grossismy
 c
 c     .....   ajout  le 6/05/97 et le 15/10/97  .......
 c
-      IF ( fxyhypb )   THEN
-        tab_cntrl(21) = 1.
-        tab_cntrl(22) = dzoomx
-        tab_cntrl(23) = dzoomy
-      ELSE
-        tab_cntrl(21) = 0.
-        tab_cntrl(22) = dzoomx
-        tab_cntrl(23) = dzoomy
-        tab_cntrl(24) = 0.
-        IF( ysinus )  tab_cntrl(24) = 1.
-      ENDIF
+!      IF ( fxyhypb )   THEN
+!        tab_cntrl(21) = 1.
+!        tab_cntrl(22) = dzoomx
+!        tab_cntrl(23) = dzoomy
+!      ELSE
+!        tab_cntrl(21) = 0.
+!        tab_cntrl(22) = dzoomx
+!        tab_cntrl(23) = dzoomy
+!        tab_cntrl(24) = 0.
+!        IF( ysinus )  tab_cntrl(24) = 1.
+!      ENDIF
 
 c    .........................................................
Index: trunk/LMDZ.GENERIC/libf/phystd/iniwrite_specIR.F
===================================================================
--- trunk/LMDZ.GENERIC/libf/phystd/iniwrite_specIR.F	(revision 1616)
+++ trunk/LMDZ.GENERIC/libf/phystd/iniwrite_specIR.F	(revision 1621)
@@ -5,7 +5,7 @@
       use comcstfi_mod, only: rad, omeg, g, mugaz, rcp, pi
       use time_phylmdz_mod, only: daysec, dtphys
-      USE logic_mod, ONLY: fxyhypb,ysinus
-      USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy
-      USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0
+!      USE logic_mod, ONLY: fxyhypb,ysinus
+!      USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy
+!      USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0
       USE regular_lonlat_mod, ONLY: lon_reg, lat_reg
       USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev
@@ -77,30 +77,30 @@
       tab_cntrl(10) = daysec
       tab_cntrl(11) = dtphys
-      tab_cntrl(12) = etot0
-      tab_cntrl(13) = ptot0
-      tab_cntrl(14) = ztot0
-      tab_cntrl(15) = stot0
-      tab_cntrl(16) = ang0
+!      tab_cntrl(12) = etot0
+!      tab_cntrl(13) = ptot0
+!      tab_cntrl(14) = ztot0
+!      tab_cntrl(15) = stot0
+!      tab_cntrl(16) = ang0
 c
 c    ..........    P.Le Van  ( ajout le 8/04/96 )    .........
 c         .....        parametres  pour le zoom          ......   
-      tab_cntrl(17)  = clon
-      tab_cntrl(18)  = clat
-      tab_cntrl(19)  = grossismx
-      tab_cntrl(20)  = grossismy
+!      tab_cntrl(17)  = clon
+!      tab_cntrl(18)  = clat
+!      tab_cntrl(19)  = grossismx
+!      tab_cntrl(20)  = grossismy
 c
 c     .....   ajout  le 6/05/97 et le 15/10/97  .......
 c
-      IF ( fxyhypb )   THEN
-        tab_cntrl(21) = 1.
-        tab_cntrl(22) = dzoomx
-        tab_cntrl(23) = dzoomy
-      ELSE
-        tab_cntrl(21) = 0.
-        tab_cntrl(22) = dzoomx
-        tab_cntrl(23) = dzoomy
-        tab_cntrl(24) = 0.
-        IF( ysinus )  tab_cntrl(24) = 1.
-      ENDIF
+!      IF ( fxyhypb )   THEN
+!        tab_cntrl(21) = 1.
+!        tab_cntrl(22) = dzoomx
+!        tab_cntrl(23) = dzoomy
+!      ELSE
+!        tab_cntrl(21) = 0.
+!        tab_cntrl(22) = dzoomx
+!        tab_cntrl(23) = dzoomy
+!        tab_cntrl(24) = 0.
+!        IF( ysinus )  tab_cntrl(24) = 1.
+!      ENDIF
 
 c    .........................................................
Index: trunk/LMDZ.GENERIC/libf/phystd/iniwrite_specVI.F
===================================================================
--- trunk/LMDZ.GENERIC/libf/phystd/iniwrite_specVI.F	(revision 1616)
+++ trunk/LMDZ.GENERIC/libf/phystd/iniwrite_specVI.F	(revision 1621)
@@ -5,7 +5,7 @@
       use comcstfi_mod, only: rad, omeg, g, mugaz, rcp, pi
       use time_phylmdz_mod, only: daysec, dtphys
-      USE logic_mod, ONLY: fxyhypb,ysinus
-      USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy
-      USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0
+!      USE logic_mod, ONLY: fxyhypb,ysinus
+!      USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy
+!      USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0
       USE regular_lonlat_mod, ONLY: lon_reg, lat_reg
       USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev
@@ -77,30 +77,30 @@
       tab_cntrl(10) = daysec
       tab_cntrl(11) = dtphys
-      tab_cntrl(12) = etot0
-      tab_cntrl(13) = ptot0
-      tab_cntrl(14) = ztot0
-      tab_cntrl(15) = stot0
-      tab_cntrl(16) = ang0
+!      tab_cntrl(12) = etot0
+!      tab_cntrl(13) = ptot0
+!      tab_cntrl(14) = ztot0
+!      tab_cntrl(15) = stot0
+!      tab_cntrl(16) = ang0
 c
 c    ..........    P.Le Van  ( ajout le 8/04/96 )    .........
 c         .....        parametres  pour le zoom          ......   
-      tab_cntrl(17)  = clon
-      tab_cntrl(18)  = clat
-      tab_cntrl(19)  = grossismx
-      tab_cntrl(20)  = grossismy
+!      tab_cntrl(17)  = clon
+!      tab_cntrl(18)  = clat
+!      tab_cntrl(19)  = grossismx
+!      tab_cntrl(20)  = grossismy
 c
 c     .....   ajout  le 6/05/97 et le 15/10/97  .......
 c
-      IF ( fxyhypb )   THEN
-        tab_cntrl(21) = 1.
-        tab_cntrl(22) = dzoomx
-        tab_cntrl(23) = dzoomy
-      ELSE
-        tab_cntrl(21) = 0.
-        tab_cntrl(22) = dzoomx
-        tab_cntrl(23) = dzoomy
-        tab_cntrl(24) = 0.
-        IF( ysinus )  tab_cntrl(24) = 1.
-      ENDIF
+!      IF ( fxyhypb )   THEN
+!        tab_cntrl(21) = 1.
+!        tab_cntrl(22) = dzoomx
+!        tab_cntrl(23) = dzoomy
+!      ELSE
+!        tab_cntrl(21) = 0.
+!        tab_cntrl(22) = dzoomx
+!        tab_cntrl(23) = dzoomy
+!        tab_cntrl(24) = 0.
+!        IF( ysinus )  tab_cntrl(24) = 1.
+!      ENDIF
 
 c    .........................................................
Index: trunk/LMDZ.GENERIC/libf/phystd/iostart.F90
===================================================================
--- trunk/LMDZ.GENERIC/libf/phystd/iostart.F90	(revision 1616)
+++ trunk/LMDZ.GENERIC/libf/phystd/iostart.F90	(revision 1621)
@@ -467,5 +467,5 @@
   USE mod_grid_phy_lmdz, only: klon_glo
   USE dimphy, only: klev, klevp1
-  USE infotrac, only: nqtot
+  USE tracer_h, only: nqtot
   USE comsoil_h, only: nsoilmx
   USE slab_ice_h, only: noceanmx
Index: trunk/LMDZ.GENERIC/libf/phystd/phyetat0.F90
===================================================================
--- trunk/LMDZ.GENERIC/libf/phystd/phyetat0.F90	(revision 1616)
+++ trunk/LMDZ.GENERIC/libf/phystd/phyetat0.F90	(revision 1621)
@@ -5,5 +5,5 @@
 
 
-  USE infotrac, ONLY: tname
+  USE tracer_h, ONLY: noms
   USE surfdat_h, only: phisfi, albedodat, zmea, zstd, zsig, zgam, zthe
   use iostart, only: nid_start, open_startphy, close_startphy, &
@@ -375,5 +375,5 @@
 if (nq.ge.1) then
   do iq=1,nq
-    txt=tname(iq)
+    txt=noms(iq)
     
     !! There was a bug here. MT2015.
Index: trunk/LMDZ.GENERIC/libf/phystd/phyredem.F90
===================================================================
--- trunk/LMDZ.GENERIC/libf/phystd/phyredem.F90	(revision 1616)
+++ trunk/LMDZ.GENERIC/libf/phystd/phyredem.F90	(revision 1621)
@@ -141,5 +141,5 @@
   use iostart, only : open_restartphy, close_restartphy, & 
                       put_var, put_field
-  use infotrac, only: tname
+  use tracer_h, only: noms
   use slab_ice_h, only: noceanmx
   use callkeys_mod, only: ok_slab_ocean
@@ -207,5 +207,5 @@
   if (nq>0) then
     do iq=1,nq
-      call put_field(tname(iq),"tracer on surface",qsurf(:,iq))
+      call put_field(noms(iq),"tracer on surface",qsurf(:,iq))
     enddo
   endif ! of if (nq>0)
Index: trunk/LMDZ.GENERIC/libf/phystd/tracer_h.F90
===================================================================
--- trunk/LMDZ.GENERIC/libf/phystd/tracer_h.F90	(revision 1616)
+++ trunk/LMDZ.GENERIC/libf/phystd/tracer_h.F90	(revision 1621)
@@ -3,4 +3,8 @@
 
        implicit none
+
+! nqtot : total number of tracers
+       INTEGER, SAVE :: nqtot
+!$OMP THREADPRIVATE(nqtot)
 
        character*20, DIMENSION(:), ALLOCATABLE :: noms   ! name of the tracer
