Index: trunk/LMDZ.COMMON/libf/dyn3d_common/adaptdt.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/adaptdt.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/adaptdt.F	(revision 1422)
@@ -6,4 +6,5 @@
 
       USE control_mod
+      USE comconst_mod, ONLY: dtvr
       IMPLICIT NONE
 
@@ -11,12 +12,6 @@
 c#include "paramr2.h"
 #include "paramet.h"
-#include "comconst.h"
 #include "comdissip.h"
-#include "comvert.h"
 #include "comgeom2.h"
-#include "logic.h"
-#include "temps.h"
-#include "ener.h"
-#include "description.h"
 
 c----------------------------------------------------------
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/advn.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/advn.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/advn.F	(revision 1422)
@@ -19,7 +19,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "logic.h"
-#include "comvert.h"
-#include "comconst.h"
 #include "comgeom.h"
 #include "iniprint.h"
@@ -486,7 +483,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "logic.h"
-#include "comvert.h"
-#include "comconst.h"
 #include "iniprint.h"
 c
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/advx.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/advx.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/advx.F	(revision 1422)
@@ -25,6 +25,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
-#include "comvert.h"
 
 C  Arguments :
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/advxp.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/advxp.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/advxp.F	(revision 1422)
@@ -15,6 +15,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
-#include "comvert.h"
 
        INTEGER ntra
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/advy.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/advy.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/advy.F	(revision 1422)
@@ -28,6 +28,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
-#include "comvert.h"
 #include "comgeom2.h"
  
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/advyp.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/advyp.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/advyp.F	(revision 1422)
@@ -30,6 +30,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
-#include "comvert.h"
 #include "comgeom.h"
  
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/advz.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/advz.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/advz.F	(revision 1422)
@@ -23,6 +23,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
-#include "comvert.h"
 
 C    #include "traceur.h"
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/advzp.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/advzp.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/advzp.F	(revision 1422)
@@ -33,6 +33,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
-#include "comvert.h"
 #include "comgeom.h"
 C
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/bernoui.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/bernoui.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/bernoui.F	(revision 1422)
@@ -27,5 +27,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "logic.h"
 c
 c   Arguments:
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/comconst_mod.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/comconst_mod.F90	(revision 1422)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/comconst_mod.F90	(revision 1422)
@@ -0,0 +1,34 @@
+MODULE comconst_mod
+
+IMPLICIT NONE  
+
+      INTEGER im,jm,lllm,imp1,jmp1,lllmm1,lllmp1,lcl
+      REAL dtvr ! dynamical time step (in s)
+      REAL daysec !length (in s) of a standard day
+      REAL pi    ! something like 3.14159....
+      REAL dtphys ! (s) time step for the physics
+      REAL dtdiss ! (s) time step for the dissipation
+      REAL rad ! (m) radius of the planet
+      REAL r ! Reduced Gas constant r=R/mu
+             ! with R=8.31.. J.K-1.mol-1, mu: mol mass of atmosphere (kg/mol)
+      REAL cpp   ! Cp
+      REAL kappa ! kappa=R/Cp 
+      REAL cotot
+      REAL unsim ! = 1./iim
+      REAL g ! (m/s2) gravity
+      REAL omeg ! (rad/s) rotation rate of the planet
+! Dissipation factors, for Earth model:
+      REAL dissip_factz,dissip_zref !dissip_deltaz
+! Dissipation factors, for other planets:
+      REAL dissip_fac_mid,dissip_fac_up,dissip_deltaz,dissip_hdelta
+      REAL dissip_pupstart
+      INTEGER iflag_top_bound,mode_top_bound
+      REAL tau_top_bound
+      REAL daylen ! length of solar day, in 'standard' day length
+      REAL molmass ! (g/mol) molar mass of the atmosphere
+
+      REAL nu_venus,t0_venus ! coeffs needed for Cp(T), Venus atmosphere
+      REAL ihf  ! (W/m2) intrinsic heat flux for giant planets
+
+
+END MODULE comconst_mod
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/comvert_mod.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/comvert_mod.F90	(revision 1422)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/comvert_mod.F90	(revision 1422)
@@ -0,0 +1,21 @@
+MODULE comvert_mod
+
+IMPLICIT NONE  
+
+include "dimensions.h"
+include "paramet.h"
+
+REAL ap(llm+1),bp(llm+1),presnivs(llm),dpres(llm),pa,preff,	&
+     	nivsigs(llm),nivsig(llm+1),scaleheight
+! Mars Ce qui suit vient de gcm
+REAL sig(llm+1),ds(llm),aps(llm),bps(llm),pseudoalt(llm)
+INTEGER disvert_type ! type of vertical discretization:
+                           ! 1: Earth (default for planet_type==earth),
+                           !     automatic generation
+                           ! 2: Planets (default for planet_type!=earth),
+                           !     using 'z2sig.def' (or 'esasig.def) file
+LOGICAL pressure_exner
+!     compute pressure inside layers using Exner function, else use mean
+!     of pressure values at interfaces
+
+END MODULE comvert_mod
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/conf_planete.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/conf_planete.F90	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/conf_planete.F90	(revision 1422)
@@ -10,4 +10,6 @@
 USE ioipsl_getincom
 #endif
+USE comvert_mod, ONLY: preff,pa
+USE comconst_mod, ONLY: daysec,daylen,kappa,cpp,omeg,rad,g,ihf,pi,molmass
 IMPLICIT NONE
 !
@@ -16,6 +18,4 @@
 !   --------------
 #include "dimensions.h"
-#include "comconst.h"
-#include "comvert.h"
 !
 !   local:
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/convmas.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/convmas.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/convmas.F	(revision 1422)
@@ -34,6 +34,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comvert.h"
-#include "logic.h"
 
       REAL pbaru( ip1jmp1,llm ),pbarv( ip1jm,llm ),convm(  ip1jmp1,llm )
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/coordij.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/coordij.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/coordij.F	(revision 1422)
@@ -10,4 +10,5 @@
 c
 c=======================================================================
+      USE comconst_mod, ONLY: pi
 
       IMPLICIT NONE
@@ -18,7 +19,5 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
 #include "comgeom.h"
-#include "serre.h"
 
       real zlon,zlat
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/cpdet_mod.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/cpdet_mod.F90	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/cpdet_mod.F90	(revision 1422)
@@ -22,11 +22,9 @@
       
       USE control_mod, ONLY: planet_type 
+      USE comconst_mod, ONLY: nu_venus,t0_venus
       IMPLICIT none
 !======================================================================
 ! Initialization of nu_venus and t0_venus
 !======================================================================
-
-! for cpp, nu_venus and t0_venus:
-#include "comconst.h"
 
       if (planet_type.eq."venus") then
@@ -47,8 +45,8 @@
 
       USE control_mod, ONLY: planet_type 
+      USE comconst_mod, ONLY: cpp,t0_venus,nu_venus
       IMPLICIT none
 
 ! for cpp, nu_venus and t0_venus:
-#include "comconst.h"
 
       real,intent(in) :: t
@@ -78,8 +76,7 @@
 
       USE control_mod, ONLY: planet_type 
+      USE comconst_mod, ONLY: cpp,t0_venus,nu_venus
+
       IMPLICIT NONE
-      
-! for cpp, nu_venus and t0_venus:
-#include "comconst.h"
 
       integer,intent(in) :: npoints
@@ -112,8 +109,7 @@
 
       USE control_mod, ONLY: planet_type 
+      USE comconst_mod, ONLY: cpp,nu_venus,t0_venus
+
       IMPLICIT NONE
-
-! for cpp, nu_venus and t0_venus:
-#include "comconst.h"
 
       integer,intent(in) :: npoints
@@ -143,8 +139,7 @@
       USE control_mod, only : planet_type
       USE parallel_lmdz, only : OMP_CHUNK
-      IMPLICIT none
-
-! for cpp, nu_venus and t0_venus:
-#include "comconst.h"
+      USE comconst_mod, ONLY: cpp,nu_venus,t0_venus
+
+      IMPLICIT none
 
       integer,intent(in) :: nlon,nlev
@@ -182,10 +177,10 @@
       USE parallel_lmdz, only : jj_begin,jj_end,OMP_CHUNK
       USE control_mod, only : planet_type
+      USE comconst_mod, ONLY: cpp,nu_venus,t0_venus
+
       IMPLICIT none
 ! for iip1, jjp1 and llm
 #include "dimensions.h"
 #include "paramet.h"
-! for cpp, nu_venus and t0_venus:
-#include "comconst.h"
 
       real,intent(in) :: yt(iip1,jjp1,llm)
@@ -225,7 +220,7 @@
       USE control_mod, only : planet_type
       USE parallel_lmdz, only : OMP_CHUNK
-      IMPLICIT none
-! for cpp, nu_venus and t0_venus:
-#include "comconst.h"
+      USE comconst_mod, ONLY: cpp,nu_venus,t0_venus
+
+      IMPLICIT none
 
       integer,intent(in) :: nlon,nlev
@@ -263,10 +258,10 @@
       USE parallel_lmdz, only : jj_begin,jj_end,OMP_CHUNK
       USE control_mod, only : planet_type
+      USE comconst_mod, ONLY: cpp,nu_venus,t0_venus
+
       IMPLICIT none
 ! for iip1, jjp1 and llm
 #include "dimensions.h"
 #include "paramet.h"
-! for cpp, nu_venus and t0_venus:
-#include "comconst.h"
 
       real,intent(out) :: yt(iip1,jjp1,llm)
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/defrun.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/defrun.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/defrun.F	(revision 1422)
@@ -13,4 +13,7 @@
 
       USE control_mod
+      USE logic_mod, ONLY: purmats,iflag_phys,fxyhypb,ysinus
+      USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy,
+     .		alphax,alphay,taux,tauy
  
       IMPLICIT NONE
@@ -36,6 +39,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "logic.h"
-#include "serre.h"
 #include "comdissnew.h"
 #include "clesph0.h"
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/disvert.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/disvert.F90	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/disvert.F90	(revision 1422)
@@ -12,4 +12,6 @@
   use new_unit_m, only: new_unit
   use assert_m, only: assert
+  USE comvert_mod, ONLY: ap,bp,nivsigs,nivsig,preff,pa,presnivs,dpres,scaleheight
+  USE logic_mod, ONLY: ok_strato
 
   IMPLICIT NONE
@@ -17,8 +19,5 @@
   include "dimensions.h"
   include "paramet.h"
-  include "comvert.h"
-  include "comconst.h"
   include "iniprint.h"
-  include "logic.h"
 
 !-------------------------------------------------------------------------------
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/disvert_noterre.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/disvert_noterre.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/disvert_noterre.F	(revision 1422)
@@ -12,4 +12,8 @@
       use ioipsl_getincom
 #endif
+      USE comvert_mod, ONLY: ap,bp,aps,bps,presnivs,pseudoalt,
+     .			nivsig,nivsigs,pa,preff,scaleheight
+      USE comconst_mod, ONLY: kappa
+      USE logic_mod, ONLY: hybrid
 
       IMPLICIT NONE
@@ -17,7 +21,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comvert.h"
-#include "comconst.h"
-#include "logic.h"
 #include "iniprint.h"
 c
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/divgrad.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/divgrad.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/divgrad.F	(revision 1422)
@@ -24,5 +24,4 @@
 #include "comgeom.h"
 #include "comdissipn.h"
-#include "logic.h"
 c
       INTEGER klevel
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/dynetat0.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/dynetat0.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/dynetat0.F	(revision 1422)
@@ -11,4 +11,12 @@
 
       use control_mod, only : planet_type, timestart
+      USE comvert_mod, ONLY: pa,preff
+      USE comconst_mod, ONLY: im,jm,lllm,daysec,dtvr,
+     .			rad,omeg,g,cpp,kappa,pi
+      USE logic_mod, ONLY: fxyhypb,ysinus
+      USE serre_mod, ONLY: clon,clat,grossismx,grossismy
+      USE temps_mod, ONLY: annee_ref,day_ref,itau_dyn,
+     .			start_time,day_ini,hour_ini
+      USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0
 
       IMPLICIT NONE
@@ -31,13 +39,6 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "temps.h"
-#include "comconst.h"
-#include "comvert.h"
 #include "comgeom2.h"
-#include "ener.h"
 #include "netcdf.inc"
-#include "description.h"
-#include "serre.h"
-#include "logic.h"
 #include "iniprint.h"
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/dynredem.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/dynredem.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/dynredem.F	(revision 1422)
@@ -10,4 +10,13 @@
       use netcdf95, only: NF95_PUT_VAR
       use control_mod, only : planet_type
+      USE comvert_mod, ONLY: ap,bp,aps,bps,presnivs,pseudoalt,pa,preff,
+     .			nivsig,nivsigs
+      USE comconst_mod, ONLY: daysec,dtvr,rad,omeg,g,cpp,kappa,pi
+      USE logic_mod, ONLY: fxyhypb,ysinus
+      USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy,
+     .			taux,tauy
+      USE temps_mod, ONLY: annee_ref,day_ref,itau_dyn,itaufin,
+     .			start_time,hour_ini
+      USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0
 
       IMPLICIT NONE
@@ -19,13 +28,6 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
-#include "comvert.h"
 #include "comgeom2.h"
-#include "temps.h"
-#include "ener.h"
-#include "logic.h"
 #include "netcdf.inc"
-#include "description.h"
-#include "serre.h"
 #include "iniprint.h"
 
@@ -588,4 +590,5 @@
       use netcdf, only: NF90_get_VAR
       use netcdf95, only: NF95_PUT_VAR
+      USE temps_mod, ONLY: itaufin,itau_dyn
  
       IMPLICIT NONE
@@ -595,9 +598,6 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "description.h"
 #include "netcdf.inc"
-#include "comvert.h"
 #include "comgeom.h"
-#include "temps.h"
 #include "iniprint.h"
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/ener_mod.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/ener_mod.F90	(revision 1422)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/ener_mod.F90	(revision 1422)
@@ -0,0 +1,12 @@
+MODULE ener_mod
+
+IMPLICIT NONE  
+
+include "dimensions.h"
+include "paramet.h"
+
+      REAL ang0,etot0,ptot0,ztot0,stot0,			&
+		ang,etot,ptot,ztot,stot,rmsdpdt,rmsv,gtot(llmm1)
+
+
+END MODULE ener_mod
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/exner_hyb_m.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/exner_hyb_m.F90	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/exner_hyb_m.F90	(revision 1422)
@@ -1,3 +1,6 @@
 module exner_hyb_m
+
+  USE comvert_mod, ONLY: preff
+  USE comconst_mod, ONLY: jmp1,kappa,cpp,r,pi
 
   IMPLICIT NONE
@@ -35,8 +38,5 @@
     include "dimensions.h"
     include "paramet.h"
-    include "comconst.h"
     include "comgeom.h"
-    include "comvert.h"
-    include "serre.h"
 
     INTEGER  ngrid
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/exner_milieu_m.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/exner_milieu_m.F90	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/exner_milieu_m.F90	(revision 1422)
@@ -1,3 +1,6 @@
 module exner_milieu_m
+
+  USE comvert_mod, ONLY: preff
+  USE comconst_mod, ONLY: jmp1,kappa,cpp,r
 
   IMPLICIT NONE
@@ -32,8 +35,5 @@
     include "dimensions.h"
     include "paramet.h"
-    include "comconst.h"
     include "comgeom.h"
-    include "comvert.h"
-    include "serre.h"
 
     INTEGER  ngrid
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/fxy.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/fxy.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/fxy.F	(revision 1422)
@@ -5,4 +5,7 @@
      ,                    rlatu2,yprimu2,
      , rlonu,xprimu,rlonv,xprimv,rlonm025,xprimm025,rlonp025,xprimp025)
+
+      USE comconst_mod, ONLY: pi
+      USE serre_mod, ONLY: pxo,pyo,alphax,alphay,transx,transy
 
       IMPLICIT NONE
@@ -16,6 +19,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "serre.h"
-#include "comconst.h"
 
        INTEGER i,j
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/fxysinus.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/fxysinus.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/fxysinus.F	(revision 1422)
@@ -6,4 +6,5 @@
      ,  rlonu,xprimu,rlonv,xprimv,rlonm025,xprimm025,rlonp025,xprimp025)
 
+      USE comconst_mod, ONLY: pi
 
       IMPLICIT NONE
@@ -17,5 +18,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
 
        INTEGER i,j
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/geopot.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/geopot.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/geopot.F	(revision 1422)
@@ -29,5 +29,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comvert.h"
 
 c   Arguments:
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/gradiv.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/gradiv.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/gradiv.F	(revision 1422)
@@ -22,5 +22,4 @@
 #include "paramet.h"
 #include "comdissipn.h"
-#include "logic.h"
 
       INTEGER klevel
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/grilles_gcm_netcdf_sub.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/grilles_gcm_netcdf_sub.F90	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/grilles_gcm_netcdf_sub.F90	(revision 1422)
@@ -9,13 +9,13 @@
 SUBROUTINE grilles_gcm_netcdf_sub(masque,phis)
 
+  USE comvert_mod, ONLY: pa,preff,presnivs
+  USE comconst_mod, ONLY: daysec,rad,omeg,g,kappa,cpp,pi
+
   IMPLICIT NONE
 
   INCLUDE "dimensions.h"
   INCLUDE "paramet.h"
-  INCLUDE "comconst.h"
   INCLUDE "comgeom.h"
-  INCLUDE "comvert.h"
   INCLUDE "netcdf.inc"
-  INCLUDE "serre.h"
 
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/iniacademic.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/iniacademic.F90	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/iniacademic.F90	(revision 1422)
@@ -16,4 +16,9 @@
   use exner_hyb_m, only: exner_hyb
   use exner_milieu_m, only: exner_milieu
+  USE comvert_mod, ONLY: ap,bp,preff,presnivs,pressure_exner
+  USE comconst_mod, ONLY: im,jm,daysec,dtvr,kappa,cpp,g,pi
+  USE logic_mod, ONLY: iflag_phys,read_start
+  USE temps_mod, ONLY: annee_ref,day_ref,day_ini
+  USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0
 
   !   Author:    Frederic Hourdin      original: 15/01/93
@@ -28,12 +33,7 @@
   include "dimensions.h"
   include "paramet.h"
-  include "comvert.h"
-  include "comconst.h"
   include "comgeom.h"
   include "academic.h"
-  include "ener.h"
-  include "temps.h"
   include "iniprint.h"
-  include "logic.h"
 
   !   Arguments:
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/iniconst.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/iniconst.F90	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/iniconst.F90	(revision 1422)
@@ -11,4 +11,7 @@
   use ioipsl_getincom
 #endif
+  USE comvert_mod, ONLY: disvert_type,pressure_exner
+  USE comconst_mod, ONLY: im,jm,lllm,imp1,jmp1,lllmm1,lllmp1,	&
+		dtphys,dtvr,unsim,r,cpp,kappa,pi
 
   IMPLICIT NONE
@@ -21,7 +24,4 @@
   include "dimensions.h"
   include "paramet.h"
-  include "comconst.h"
-  include "temps.h"
-  include "comvert.h"
   include "iniprint.h"
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/inidissip.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/inidissip.F90	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/inidissip.F90	(revision 1422)
@@ -25,4 +25,9 @@
 
   USE control_mod, only : dissip_period,iperiod,planet_type
+  USE comvert_mod, ONLY: preff,presnivs,scaleheight,pseudoalt
+  USE comconst_mod, ONLY: dtvr,dtdiss,rad,pi,dissip_zref,dissip_deltaz,		&
+		dissip_factz,dissip_fac_mid,dissip_fac_up,dissip_pupstart,	&
+		dissip_hdelta	
+  USE logic_mod, ONLY: ok_strato
 
   IMPLICIT NONE
@@ -30,7 +35,4 @@
   include "paramet.h"
   include "comdissipn.h"
-  include "comconst.h"
-  include "comvert.h"
-  include "logic.h"
   include "iniprint.h"
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/inigeom.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/inigeom.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/inigeom.F	(revision 1422)
@@ -16,12 +16,14 @@
 c
 c
+      USE comconst_mod, ONLY: rad,g,omeg,pi
+      USE logic_mod, ONLY: fxyhypb,ysinus
+      USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy,
+     .		alphax,alphay,taux,tauy,transx,transy,pxo,pyo
+
       IMPLICIT NONE
 c
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
 #include "comgeom2.h"
-#include "serre.h"
-#include "logic.h"
 #include "comdissnew.h"
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/initdynav.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/initdynav.F90	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/initdynav.F90	(revision 1422)
@@ -9,4 +9,7 @@
   use com_io_dyn_mod, only : histaveid,histvaveid,histuaveid, &
        dynhistave_file,dynhistvave_file,dynhistuave_file
+  USE comvert_mod, ONLY: presnivs
+  USE comconst_mod, ONLY: pi
+  USE temps_mod, ONLY: itau_dyn
   implicit none
 
@@ -34,12 +37,5 @@
   include "dimensions.h"
   include "paramet.h"
-  include "comconst.h"
-  include "comvert.h"
   include "comgeom.h"
-  include "temps.h"
-  include "ener.h"
-  include "logic.h"
-  include "description.h"
-  include "serre.h"
   include "iniprint.h"
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/initfluxsto.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/initfluxsto.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/initfluxsto.F	(revision 1422)
@@ -9,4 +9,7 @@
        USE IOIPSL
 #endif
+       USE comvert_mod, ONLY: nivsigs
+       USE comconst_mod, ONLY: pi
+       USE temps_mod, ONLY: annee_ref,day_ref,itau_dyn
       implicit none
 
@@ -40,12 +43,5 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
-#include "comvert.h"
 #include "comgeom.h"
-#include "temps.h"
-#include "ener.h"
-#include "logic.h"
-#include "description.h"
-#include "serre.h"
 #include "iniprint.h"
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/inithist.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/inithist.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/inithist.F	(revision 1422)
@@ -10,4 +10,7 @@
        use com_io_dyn_mod, only : histid,histvid,histuid,               &
      &                        dynhist_file,dynhistv_file,dynhistu_file
+       USE comvert_mod, ONLY: presnivs
+       USE comconst_mod, ONLY: pi
+       USE temps_mod, ONLY: itau_dyn
 
       implicit none
@@ -40,12 +43,5 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
-#include "comvert.h"
 #include "comgeom.h"
-#include "temps.h"
-#include "ener.h"
-#include "logic.h"
-#include "description.h"
-#include "serre.h"
 #include "iniprint.h"
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/inter_barxy_m.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/inter_barxy_m.F90	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/inter_barxy_m.F90	(revision 1422)
@@ -374,8 +374,8 @@
 
     use assert_eq_m, only: assert_eq
+    USE comconst_mod, ONLY: pi
 
     IMPLICIT NONE
 
-    include "comconst.h"
     ! (for "pi")
 
@@ -431,7 +431,8 @@
     ! order.
 
+    USE comconst_mod, ONLY: pi
+
     IMPLICIT NONE
 
-    include "comconst.h"
     ! (for "pi")
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/interpost.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/interpost.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/interpost.F	(revision 1422)
@@ -9,6 +9,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
-#include "comvert.h"
 #include "comgeom2.h"
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/interpre.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/interpre.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/interpre.F	(revision 1422)
@@ -7,4 +7,6 @@
 
       USE control_mod
+      USE comvert_mod, ONLY: ap,bp
+      USE comconst_mod, ONLY: g
 
        implicit none
@@ -13,12 +15,6 @@
 c#include "paramr2.h"
 #include "paramet.h"
-#include "comconst.h"
 #include "comdissip.h"
-#include "comvert.h"
 #include "comgeom2.h"
-#include "logic.h"
-#include "temps.h"
-#include "ener.h"
-#include "description.h"
 
 c---------------------------------------------------
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/limx.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/limx.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/limx.F	(revision 1422)
@@ -17,7 +17,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "logic.h"
-#include "comvert.h"
-#include "comconst.h"
 #include "comgeom.h"
 c
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/limy.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/limy.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/limy.F	(revision 1422)
@@ -14,11 +14,10 @@
 c
 c   --------------------------------------------------------------------
+      USE comconst_mod, ONLY: pi
+
       IMPLICIT NONE
 c
 #include "dimensions.h"
 #include "paramet.h"
-#include "logic.h"
-#include "comvert.h"
-#include "comconst.h"
 #include "comgeom.h"
 c
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/limz.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/limz.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/limz.F	(revision 1422)
@@ -17,7 +17,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "logic.h"
-#include "comvert.h"
-#include "comconst.h"
 #include "comgeom.h"
 c
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/massbar.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/massbar.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/massbar.F	(revision 1422)
@@ -20,5 +20,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
 #include "comgeom.h"
 c
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/massbarxy.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/massbarxy.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/massbarxy.F	(revision 1422)
@@ -20,5 +20,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
 #include "comgeom.h"
 c
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/massdair.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/massdair.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/massdair.F	(revision 1422)
@@ -20,5 +20,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
 #include "comgeom.h"
 c
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/nxgrarot.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/nxgrarot.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/nxgrarot.F	(revision 1422)
@@ -22,5 +22,4 @@
 #include "paramet.h"
 #include "comdissipn.h"
-#include "logic.h"
 c
       INTEGER klevel
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/pentes_ini.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/pentes_ini.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/pentes_ini.F	(revision 1422)
@@ -3,4 +3,7 @@
 !
       SUBROUTINE pentes_ini (q,w,masse,pbaru,pbarv,mode)
+
+      USE comconst_mod, ONLY: dtvr,pi
+
       IMPLICIT NONE
 
@@ -24,6 +27,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
-#include "comvert.h"
 #include "comgeom2.h"
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/prather.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/prather.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/prather.F	(revision 1422)
@@ -3,4 +3,7 @@
 !
       SUBROUTINE prather (q,w,masse,pbaru,pbarv,nt,dt)
+
+      USE comconst_mod, ONLY: pi
+
       IMPLICIT NONE
 
@@ -21,6 +24,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
-#include "comvert.h"
 #include "comgeom2.h"
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/serre_mod.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/serre_mod.F90	(revision 1422)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/serre_mod.F90	(revision 1422)
@@ -0,0 +1,8 @@
+MODULE serre_mod
+
+IMPLICIT NONE  
+
+      REAL clon,clat,transx,transy,alphax,alphay,pxo,pyo,              &
+     &  grossismx, grossismy, dzoomx, dzoomy,taux,tauy
+
+END MODULE serre_mod
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/sortvarc.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/sortvarc.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/sortvarc.F	(revision 1422)
@@ -7,4 +7,9 @@
 
       USE control_mod, ONLY: resetvarc 
+      USE comconst_mod, ONLY: daysec,dtvr,rad,g,omeg
+      USE logic_mod, ONLY: read_start
+      USE ener_mod, ONLY: etot,ptot,ztot,stot,ang,
+     .			etot0,ptot0,ztot0,stot0,ang0,
+     .			rmsdpdt,rmsv
       IMPLICIT NONE
 
@@ -27,10 +32,5 @@
       INCLUDE "dimensions.h"
       INCLUDE "paramet.h"
-      INCLUDE "comconst.h"
-      INCLUDE "comvert.h"
       INCLUDE "comgeom.h"
-      INCLUDE "ener.h"
-      INCLUDE "logic.h"
-      INCLUDE "temps.h"
       INCLUDE "iniprint.h"
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/sortvarc0.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/sortvarc0.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/sortvarc0.F	(revision 1422)
@@ -5,4 +5,8 @@
      $(itau,ucov,teta,ps,masse,pk,phis,vorpot,phi,bern,dp,time ,
      $ vcov)
+
+      USE comconst_mod, ONLY: daysec,dtvr,rad,g,omeg
+      USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0,rmsv,rmsdpdt
+
       IMPLICIT NONE
 
@@ -24,10 +28,5 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
-#include "comvert.h"
 #include "comgeom.h"
-#include "ener.h"
-#include "logic.h"
-#include "temps.h"
 
 c   Arguments:
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/tidal_forces.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/tidal_forces.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/tidal_forces.F	(revision 1422)
@@ -24,7 +24,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "logic.h"
-#include "comvert.h"
-#include "comconst.h"
 #include "comgeom.h"
 !#include "comorbit.h"
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/tourpot.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/tourpot.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/tourpot.F	(revision 1422)
@@ -25,5 +25,4 @@
 #include "paramet.h"
 #include "comgeom.h"
-#include "logic.h"
 
       REAL  rot( ip1jm,llm )
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/traceurpole.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/traceurpole.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/traceurpole.F	(revision 1422)
@@ -11,12 +11,6 @@
 c#include "paramr2.h"
 #include "paramet.h"
-#include "comconst.h"
 #include "comdissip.h"
-#include "comvert.h"
 #include "comgeom2.h"
-#include "logic.h"
-#include "temps.h"
-#include "ener.h"
-#include "description.h"
 
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/ugeostr.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/ugeostr.F90	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/ugeostr.F90	(revision 1422)
@@ -11,9 +11,10 @@
   ! levels are pressure levels.
 
+  USE comconst_mod, ONLY: omeg,rad
+
   implicit none
 
   include "dimensions.h"
   include "paramet.h"
-  include "comconst.h"
   include "comgeom2.h"
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/vitvert.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/vitvert.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/vitvert.F	(revision 1422)
@@ -4,4 +4,6 @@
       SUBROUTINE vitvert ( convm , w )
 c
+      USE comvert_mod, ONLY: bp
+
       IMPLICIT NONE
 
@@ -30,5 +32,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comvert.h"
 
       REAL w(ip1jmp1,llm),convm(ip1jmp1,llm)
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/writedynav.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/writedynav.F90	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/writedynav.F90	(revision 1422)
@@ -8,4 +8,6 @@
   USE infotrac, ONLY : nqtot, ttext
   use com_io_dyn_mod, only : histaveid, histvaveid, histuaveid
+  USE comconst_mod, ONLY: cpp
+  USE temps_mod, ONLY: itau_dyn
 
   implicit none
@@ -31,12 +33,5 @@
   include "dimensions.h"
   include "paramet.h"
-  include "comconst.h"
-  include "comvert.h"
   include "comgeom.h"
-  include "temps.h"
-  include "ener.h"
-  include "logic.h"
-  include "description.h"
-  include "serre.h"
   include "iniprint.h"
 
Index: trunk/LMDZ.COMMON/libf/dyn3d_common/writehist.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3d_common/writehist.F	(revision 1415)
+++ trunk/LMDZ.COMMON/libf/dyn3d_common/writehist.F	(revision 1422)
@@ -9,4 +9,5 @@
       USE infotrac, ONLY : nqtot, ttext
       use com_io_dyn_mod, only : histid,histvid,histuid
+      USE temps_mod, ONLY: itau_dyn
       implicit none
 
@@ -35,12 +36,5 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "comconst.h"
-#include "comvert.h"
 #include "comgeom.h"
-#include "temps.h"
-#include "ener.h"
-#include "logic.h"
-#include "description.h"
-#include "serre.h"
 #include "iniprint.h"
 
