Index: /LMDZ6/trunk/libf/dyn3d/abort_gcm.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/abort_gcm.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/abort_gcm.F90	(revision 5271)
@@ -10,5 +10,5 @@
   USE wxios
 
-#include "iniprint.h"
+INCLUDE "iniprint.h"
 
   !
Index: /LMDZ6/trunk/libf/dyn3d/addfi.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/addfi.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/addfi.f90	(revision 5271)
@@ -8,4 +8,5 @@
   USE infotrac, ONLY : nqtot
   USE control_mod, ONLY : planet_type
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
   IMPLICIT NONE
   !
@@ -46,5 +47,4 @@
   !    ------------------
   !
-  include "dimensions.h"
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d/advect.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/advect.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/advect.f90	(revision 5271)
@@ -3,9 +3,8 @@
 !
 SUBROUTINE advect(ucov,vcov,teta,w,massebx,masseby,du,dv,dteta)
-
   USE comconst_mod, ONLY: daysec
   USE logic_mod, ONLY: conser
   USE ener_mod, ONLY: gtot
-
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
   IMPLICIT NONE
   !=======================================================================
@@ -28,5 +27,4 @@
   !   -------------
 
-  include "dimensions.h"
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d/advtrac.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/advtrac.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/advtrac.f90	(revision 5271)
@@ -14,7 +14,8 @@
    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
    USE strings_mod, ONLY: int2str
-   IMPLICIT NONE
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
    !
-   include "dimensions.h"
+
    include "paramet.h"
    include "comdissip.h"
Index: /LMDZ6/trunk/libf/dyn3d/bilan_dyn.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/bilan_dyn.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/bilan_dyn.f90	(revision 5271)
@@ -15,7 +15,8 @@
   USE temps_mod, ONLY: annee_ref, day_ref, itau_dyn
 
-  IMPLICIT NONE
-
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dyn3d/caladvtrac.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/caladvtrac.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/caladvtrac.f90	(revision 5271)
@@ -12,5 +12,6 @@
   USE comconst_mod, ONLY: dtvr
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   ! Auteurs:   F.Hourdin , P.Le Van, F.Forget, F.Codron
@@ -24,5 +25,5 @@
 
 
-  include "dimensions.h"
+
   include "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3d/caldyn.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/caldyn.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/caldyn.f90	(revision 5271)
@@ -9,5 +9,6 @@
   USE comvert_mod, ONLY: ap, bp
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !=======================================================================
@@ -27,5 +28,5 @@
   !   ----------------
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d/check_isotopes.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/check_isotopes.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/check_isotopes.f90	(revision 5271)
@@ -5,6 +5,7 @@
    USE iso_params_mod,  ONLY: tnat_H216O, tnat_H217O, tnat_H218O, tnat_HDO, tnat_HTO
    USE ioipsl,          ONLY: getin
-   IMPLICIT NONE
-   include "dimensions.h"
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
    REAL,             INTENT(INOUT) :: q(ip1jmp1,llm,nqtot)
    INTEGER,          INTENT(IN)    :: ip1jmp1
Index: /LMDZ6/trunk/libf/dyn3d/conf_gcm.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/conf_gcm.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/conf_gcm.f90	(revision 5271)
@@ -18,5 +18,6 @@
   USE temps_mod, ONLY: calend, year_len
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !-----------------------------------------------------------------------
   !     Auteurs :   L. Fairhead , P. Le Van  .
@@ -25,5 +26,5 @@
 
   !     tapedef   :
-  !     etatinit  :     = TRUE   , on ne  compare pas les valeurs des para- 
+  !     etatinit  :     = TRUE   , on ne  compare pas les valeurs des para-
   !     -metres  du zoom  avec  celles lues sur le fichier start .
 
@@ -33,5 +34,5 @@
   !   Declarations :
   !   --------------
-  include "dimensions.h"
+
   include "paramet.h"
   include "comdissnew.h"
Index: /LMDZ6/trunk/libf/dyn3d/covnat.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/covnat.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/covnat.F90	(revision 5271)
@@ -3,4 +3,5 @@
 !
 SUBROUTINE covnat (klevel,ucov, vcov, unat, vnat )
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
   IMPLICIT NONE
 
@@ -19,7 +20,6 @@
   !=======================================================================
 
-#include "dimensions.h"
-#include "paramet.h"
-#include "comgeom.h"
+INCLUDE "paramet.h"
+INCLUDE "comgeom.h"
 
   INTEGER :: klevel
Index: /LMDZ6/trunk/libf/dyn3d/dissip.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/dissip.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/dissip.f90	(revision 5271)
@@ -6,5 +6,6 @@
   USE comconst_mod, ONLY: dtdiss
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
 
@@ -27,5 +28,5 @@
   !   -------------
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d/dteta1.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/dteta1.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/dteta1.f90	(revision 5271)
@@ -3,4 +3,5 @@
 !
 SUBROUTINE dteta1 ( teta, pbaru, pbarv, dteta)
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
   IMPLICIT NONE
 
@@ -20,6 +21,4 @@
   !=======================================================================
 
-
-  include "dimensions.h"
   include "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3d/dudv1.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/dudv1.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/dudv1.F90	(revision 5271)
@@ -3,5 +3,6 @@
 !
 SUBROUTINE dudv1 ( vorpot, pbaru, pbarv, du, dv )
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   !-----------------------------------------------------------------------
@@ -19,6 +20,6 @@
   !-----------------------------------------------------------------------
 
-#include "dimensions.h"
-#include "paramet.h"
+
+INCLUDE "paramet.h"
 
   REAL :: vorpot( ip1jm,llm ) ,pbaru( ip1jmp1,llm ) , &
Index: /LMDZ6/trunk/libf/dyn3d/dudv2.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/dudv2.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/dudv2.f90	(revision 5271)
@@ -3,5 +3,5 @@
 !
 SUBROUTINE dudv2 ( teta, pkf, bern, du, dv  )
-
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
   IMPLICIT NONE
   !
@@ -25,6 +25,4 @@
   !
   !=======================================================================
-  !
-  include "dimensions.h"
   include "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3d/dynetat0.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/dynetat0.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/dynetat0.f90	(revision 5271)
@@ -24,6 +24,7 @@
   USE strings_mod, ONLY: strIdx
 
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dyn3d/dynredem.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/dynredem.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/dynredem.f90	(revision 5271)
@@ -19,6 +19,7 @@
   USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0
   
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom2.h"
@@ -167,6 +168,7 @@
   USE temps_mod, ONLY: itau_dyn, itaufin
   
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "description.h"
Index: /LMDZ6/trunk/libf/dyn3d/dynredem_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/dynredem_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/dynredem_mod.f90	(revision 5271)
@@ -1,9 +1,8 @@
 MODULE dynredem_mod
-
   USE netcdf
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
   PRIVATE
   PUBLIC :: dynredem_write_u, dynredem_write_v, dynredem_read_u, err
   PUBLIC :: cre_var, put_var1, put_var2, fil, modname, msg
-  include "dimensions.h"
   include "paramet.h"
   CHARACTER(LEN=256), SAVE :: fil, modname
Index: /LMDZ6/trunk/libf/dyn3d/fluxstokenc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/fluxstokenc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/fluxstokenc.f90	(revision 5271)
@@ -13,7 +13,8 @@
   !cc   ..   Modif. P. Le Van  ( 20/12/97 )  ...
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d/friction.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/friction.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/friction.f90	(revision 5271)
@@ -4,9 +4,8 @@
 !=======================================================================
 SUBROUTINE friction(ucov,vcov,pdt)
-
   USE control_mod
   USE IOIPSL
-
   USE comconst_mod, ONLY: pi
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
   IMPLICIT NONE
 
@@ -23,5 +22,4 @@
   !=======================================================================
 
-  include "dimensions.h"
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dyn3d/gcm.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/gcm.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/gcm.f90	(revision 5271)
@@ -5,12 +5,6 @@
 !
 PROGRAM gcm
-
   USE IOIPSL
-
-
-
-! ug Pour les sorties XIOS
-  USE wxios
-
+  USE wxios  ! ug Pour les sorties XIOS
   USE filtreg_mod
   USE infotrac, ONLY: nqtot, init_infotrac
@@ -22,5 +16,4 @@
   USE logic_mod, ONLY: ecripar, iflag_phys, read_start
   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_PHYS
-
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   ! FH 2008/05/09 On elimine toutes les clefs physiques dans la dynamique
@@ -29,5 +22,5 @@
   USE iniphysiq_mod, ONLY: iniphysiq
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
   IMPLICIT NONE
 
@@ -62,5 +55,4 @@
   !   -------------
 
-  include "dimensions.h"
   include "paramet.h"
   include "comdissnew.h"
Index: /LMDZ6/trunk/libf/dyn3d/groupe.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/groupe.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/groupe.f90	(revision 5271)
@@ -6,5 +6,6 @@
   use comconst_mod, only: ngroup
 
-  implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
   !   sous-programme servant a fitlrer les champs de flux de masse aux
@@ -19,5 +20,5 @@
   !   pas besoin de w en entree.
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dyn3d/groupeun.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/groupeun.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/groupeun.f90	(revision 5271)
@@ -6,7 +6,8 @@
   USE comconst_mod, ONLY: ngroup
 
-  IMPLICIT NONE
-
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
   include "paramet.h"
   include "comgeom2.h"
@@ -140,7 +141,8 @@
   USE comconst_mod, ONLY: ngroup
 
-  IMPLICIT NONE
-
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dyn3d/guide_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/guide_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/guide_mod.f90	(revision 5271)
@@ -78,7 +78,8 @@
     USE serre_mod, ONLY: grossismx
 
-    IMPLICIT NONE
-  
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
     INCLUDE "paramet.h"
 
@@ -359,7 +360,8 @@
     USE comvert_mod, ONLY: ap, bp, preff, presnivs, pressure_exner
  
-    IMPLICIT NONE
-  
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
     INCLUDE "paramet.h"
     INCLUDE "iniprint.h"
@@ -610,7 +612,8 @@
     USE comconst_mod, ONLY: pi
     
-    IMPLICIT NONE
-
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
     INCLUDE "paramet.h"
     INCLUDE "comgeom.h"
@@ -676,7 +679,8 @@
   use comconst_mod, only: kappa, cpp
   use comvert_mod, only: preff, pressure_exner, bp, ap
-  IMPLICIT NONE
-
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
   include "paramet.h"
   include "comgeom2.h"
@@ -926,7 +930,8 @@
     use serre_mod, only: clon, clat, grossismx, grossismy
     
-    implicit none
-
-    include "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
+
     include "paramet.h"
     include "comgeom2.h"
@@ -1096,7 +1101,8 @@
     use netcdf, only: NF90_GET_VAR, nf90_noerr
 
-    IMPLICIT NONE
-
-    include "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
     include "paramet.h"
 
@@ -1396,7 +1402,8 @@
     use netcdf, only: nf90_get_var, nf90_noerr
 
-    IMPLICIT NONE
-
-    include "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
     include "paramet.h"
 
@@ -1660,7 +1667,8 @@
     use netcdf, only: nf90_float, nf90_def_var, nf90_put_var
     
-    IMPLICIT NONE
-
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
     INCLUDE "paramet.h"
     INCLUDE "comgeom2.h"
Index: /LMDZ6/trunk/libf/dyn3d/iniacademic.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/iniacademic.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/iniacademic.f90	(revision 5271)
@@ -26,10 +26,11 @@
   ! of the American Meteorological Society, 75, 1825.
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !   Declararations:
   !   ---------------
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d/integrd.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/integrd.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/integrd.f90	(revision 5271)
@@ -13,5 +13,6 @@
   USE temps_mod, ONLY: dt
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
 
@@ -31,5 +32,5 @@
   !   -------------
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d/leapfrog.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/leapfrog.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/leapfrog.F90	(revision 5271)
@@ -5,6 +5,4 @@
 !
 SUBROUTINE leapfrog(ucov,vcov,teta,ps,masse,phis,q,time_0)
-
-
   !IM : pour sortir les param. du modele dans un fis. netcdf 110106
   use IOIPSL
@@ -26,5 +24,5 @@
   USE strings_mod, ONLY: msg
   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_PHYS
-
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
   IMPLICIT NONE
 
@@ -59,6 +57,4 @@
   !   Declarations:
   !   -------------
-
-  include "dimensions.h"
   include "paramet.h"
   include "comdissnew.h"
@@ -452,8 +448,8 @@
      ! IF (first) THEN
      !  first=.false.
-  !#include "ini_paramLMDZ_dyn.h"
+  !INCLUDE "ini_paramLMDZ_dyn.h"
      ! ENDIF
   !
-  !#include "write_paramLMDZ_dyn.h"
+  !INCLUDE "write_paramLMDZ_dyn.h"
 
 IF (CPPKEY_PHYS) THEN
@@ -708,5 +704,5 @@
   ! For some Grads outputs of fields
           if (output_grads_dyn) then
-#include "write_grads_dyn.h"
+INCLUDE "write_grads_dyn.h"
           endif
          endif ! of if (leapf.or.(.not.leapf.and.(.not.forward)))
@@ -831,5 +827,5 @@
   ! For some Grads outputs
             if (output_grads_dyn) then
-#include "write_grads_dyn.h"
+INCLUDE "write_grads_dyn.h"
             endif
 
Index: /LMDZ6/trunk/libf/dyn3d/qminimum.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/qminimum.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/qminimum.f90	(revision 5271)
@@ -6,10 +6,11 @@
   USE infotrac, ONLY: niso, ntiso, iqIsoPha, tracers, addPhase
   USE strings_mod, ONLY: strIdx
-  IMPLICIT none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT none
   !
   !  -- Objet : Traiter les valeurs trop petites (meme negatives)
   !         pour l'eau vapeur et l'eau liquide
   !
-  include "dimensions.h"
+
   include "paramet.h"
   !
Index: /LMDZ6/trunk/libf/dyn3d/replay3d.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/replay3d.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/replay3d.f90	(revision 5271)
@@ -5,11 +5,6 @@
 !
 PROGRAM replay3d
-
-
-
-USE comvert_mod, only :  preff, pa
-USE inigeomphy_mod, ONLY: inigeomphy
-
-
+  USE comvert_mod, only :  preff, pa
+  USE inigeomphy_mod, ONLY: inigeomphy
   USE control_mod
   USE temps_mod, ONLY: calend,start_time,annee_ref,day_ref, &
@@ -21,7 +16,4 @@
         grossismx, grossismy, dzoomx, dzoomy,taux,tauy
   USE mod_const_mpi, ONLY: comm_lmdz
-
-
-
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   ! FH 2008/05/09 On elimine toutes les clefs physiques dans la dynamique
@@ -30,4 +22,5 @@
   USE iniphysiq_mod, ONLY: iniphysiq
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
 
   IMPLICIT NONE
@@ -62,6 +55,4 @@
   !   Declarations:
   !   -------------
-
-  include "dimensions.h"
   include "paramet.h"
   include "comdissnew.h"
Index: /LMDZ6/trunk/libf/dyn3d/sw_case_williamson91_6.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/sw_case_williamson91_6.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/sw_case_williamson91_6.f90	(revision 5271)
@@ -29,10 +29,11 @@
   USE comvert_mod, ONLY: ap, bp, preff
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !-----------------------------------------------------------------------
   !   Declararations:
   !   ---------------
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d/tetaleveli1j.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/tetaleveli1j.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/tetaleveli1j.F90	(revision 5271)
@@ -7,8 +7,9 @@
   ! FH 2008/05/09 On elimine toutes les clefs physiques dans la dynamique
    ! USE dimphy
-  IMPLICIT none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT none
 
-#include "dimensions.h"
-  !cccc#include "dimphy.h"
+
+  !ccccINCLUDE "dimphy.h"
 
   !================================================================
@@ -45,5 +46,5 @@
   ! REAL ptop, pbot, aist(klon), aisb(klon)
   !
-#include "paramet.h"
+INCLUDE "paramet.h"
   !
   INTEGER :: lt(ip1jm), lb(ip1jm)
@@ -57,5 +58,5 @@
   !=====================================================================
   if (lnew) then
-  !   on réinitialise les réindicages et les poids
+  !   on r�initialise les r�indicages et les poids
   !=====================================================================
 
@@ -96,5 +97,5 @@
   !
   ! ...   Modif . P. Le Van    ( 20/01/98) ....
-  !   Modif Frédéric Hourdin (3/01/02)
+  !   Modif Fr�d�ric Hourdin (3/01/02)
 
     IF(pgcm(i,lb(i)).EQ.0.OR. &
Index: /LMDZ6/trunk/libf/dyn3d/tetaleveli1j1.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/tetaleveli1j1.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/tetaleveli1j1.F90	(revision 5271)
@@ -7,8 +7,9 @@
   ! FH 2008/05/09 On elimine toutes les clefs physiques dans la dynamique
    ! USE dimphy
-  IMPLICIT none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT none
 
-#include "dimensions.h"
-  !ccc#include "dimphy.h"
+
+  !cccINCLUDE "dimphy.h"
 
   !================================================================
@@ -45,5 +46,5 @@
   ! REAL ptop, pbot, aist(klon), aisb(klon)
   !
-#include "paramet.h"
+INCLUDE "paramet.h"
   !
   INTEGER :: lt(ip1jmp1), lb(ip1jmp1)
@@ -57,5 +58,5 @@
   !=====================================================================
   if (lnew) then
-  !   on réinitialise les réindicages et les poids
+  !   on r�initialise les r�indicages et les poids
   !=====================================================================
 
@@ -96,5 +97,5 @@
   !
   ! ...   Modif . P. Le Van    ( 20/01/98) ....
-  !   Modif Frédéric Hourdin (3/01/02)
+  !   Modif Fr�d�ric Hourdin (3/01/02)
 
     IF(pgcm(i,lb(i)).EQ.0.OR. &
Index: /LMDZ6/trunk/libf/dyn3d/top_bound.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/top_bound.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/top_bound.F90	(revision 5271)
@@ -8,7 +8,8 @@
   USE comvert_mod, ONLY: presnivs, preff, scaleheight
 
-  IMPLICIT NONE
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   include "paramet.h"
   include "comgeom2.h"
@@ -27,5 +28,5 @@
   !   ------
   !
-  !   Dissipation linéaire (ex top_bound de la physique)
+  !   Dissipation lin�aire (ex top_bound de la physique)
   !
   !=======================================================================
@@ -54,6 +55,6 @@
 
 
-#include "comdissipn.h"
-#include "iniprint.h"
+INCLUDE "comdissipn.h"
+INCLUDE "iniprint.h"
 
   !   Arguments:
Index: /LMDZ6/trunk/libf/dyn3d/vlsplt.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/vlsplt.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/vlsplt.F90	(revision 5271)
@@ -19,7 +19,8 @@
   !
   !   --------------------------------------------------------------------
-  IMPLICIT NONE
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   include "paramet.h"
 
@@ -136,7 +137,8 @@
   !
   !   --------------------------------------------------------------------
-  IMPLICIT NONE
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   include "paramet.h"
   include "iniprint.h"
@@ -495,7 +497,8 @@
   !   --------------------------------------------------------------------
   USE comconst_mod, ONLY: pi
-  IMPLICIT NONE
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   include "paramet.h"
   include "comgeom.h"
@@ -857,7 +860,8 @@
   !
   !   --------------------------------------------------------------------
-  IMPLICIT NONE
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   include "paramet.h"
   !
@@ -1014,6 +1018,6 @@
  ! SUBROUTINE minmaxq(zq,qmin,qmax,comment)
 !
-!#include "dimensions.h"
-!#include "paramet.h"
+!INCLUDE "dimensions_mod.f90"
+!INCLUDE "paramet.h"
 
 !  CHARACTER*(*) comment
@@ -1043,7 +1047,6 @@
 !  end
 subroutine minmaxq(zq,qmin,qmax,comment)
-
-#include "dimensions.h"
-#include "paramet.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+  INCLUDE "paramet.h"
 
   character(len=20) :: comment
Index: /LMDZ6/trunk/libf/dyn3d/vlspltqs.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/vlspltqs.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/vlspltqs.F90	(revision 5271)
@@ -26,7 +26,8 @@
   USE comconst_mod, ONLY: cpp
   USE logic_mod, ONLY: adv_qsat_liq
-  IMPLICIT NONE
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   include "paramet.h"
 
@@ -190,7 +191,8 @@
   !
   !   --------------------------------------------------------------------
-  IMPLICIT NONE
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   include "paramet.h"
   !
@@ -554,7 +556,8 @@
   USE comconst_mod, ONLY: pi
 
-  IMPLICIT NONE
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d/wrgrads.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d/wrgrads.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d/wrgrads.F90	(revision 5271)
@@ -12,5 +12,5 @@
   !    titlevar   Titre
 
-#include "gradsdef.h"
+INCLUDE "gradsdef.h"
 
   !   arguments
Index: /LMDZ6/trunk/libf/dyn3d_common/adaptdt.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/adaptdt.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/adaptdt.f90	(revision 5271)
@@ -6,7 +6,8 @@
 
   USE comconst_mod, ONLY: dtvr
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comdissip.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/advn.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/advn.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/advn.F90	(revision 5271)
@@ -15,7 +15,8 @@
   !
   !   --------------------------------------------------------------------
-  IMPLICIT NONE
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   include "paramet.h"
   include "comgeom.h"
@@ -144,7 +145,8 @@
   !
   !   --------------------------------------------------------------------
-  IMPLICIT NONE
-  !
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   INCLUDE "paramet.h"
   INCLUDE "iniprint.h"
@@ -261,7 +263,8 @@
   !
   !   --------------------------------------------------------------------
-  IMPLICIT NONE
-  !
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   INCLUDE "paramet.h"
   INCLUDE "iniprint.h"
@@ -357,7 +360,8 @@
   !
   !   --------------------------------------------------------------------
-  IMPLICIT NONE
-  !
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   INCLUDE "paramet.h"
   INCLUDE "iniprint.h"
@@ -479,7 +483,8 @@
   !
   !   --------------------------------------------------------------------
-  IMPLICIT NONE
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   include "paramet.h"
   include "iniprint.h"
@@ -744,7 +749,8 @@
   !
   !   --------------------------------------------------------------------
-  IMPLICIT NONE
-  !
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
@@ -875,7 +881,8 @@
   !
   !   --------------------------------------------------------------------
-  IMPLICIT NONE
-  !
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/advx.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/advx.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/advx.f90	(revision 5271)
@@ -4,5 +4,6 @@
 SUBROUTINE  advx(limit,dtx,pbaru,sm,s0, &
         sx,sy,sz,lati,latf)
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
@@ -23,5 +24,5 @@
   !  parametres principaux du modele
   !
-  include "dimensions.h"
+
   include "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3d_common/advxp.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/advxp.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/advxp.f90	(revision 5271)
@@ -4,5 +4,6 @@
  SUBROUTINE ADVXP(LIMIT,DTX,PBARU,SM,S0,SSX,SY,SZ &
          ,SSXX,SSXY,SSXZ,SYY,SYZ,SZZ,ntra)
-   IMPLICIT NONE
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
   !                                                                 C
@@ -13,5 +14,5 @@
   !  parametres principaux du modele
   !
-  include "dimensions.h"
+
   include "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3d_common/advy.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/advy.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/advy.f90	(revision 5271)
@@ -3,5 +3,6 @@
 !
 SUBROUTINE advy(limit,dty,pbarv,sm,s0,sx,sy,sz)
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
@@ -26,5 +27,5 @@
   !
   !
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/advyp.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/advyp.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/advyp.f90	(revision 5271)
@@ -4,5 +4,6 @@
 SUBROUTINE ADVYP(LIMIT,DTY,PBARV,SM,S0,SSX,SY,SZ &
         ,SSXX,SSXY,SSXZ,SYY,SYZ,SZZ,ntra )
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
   !                                                                 C
@@ -28,5 +29,5 @@
   !
   !
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/advz.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/advz.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/advz.f90	(revision 5271)
@@ -3,5 +3,6 @@
 !
 SUBROUTINE advz(limit,dtz,w,sm,s0,sx,sy,sz)
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
@@ -21,5 +22,5 @@
   !  parametres principaux du modele
   !
-  include "dimensions.h"
+
   include "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3d_common/advzp.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/advzp.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/advzp.f90	(revision 5271)
@@ -5,5 +5,6 @@
         ,SSXX,SSXY,SSXZ,SYY,SYZ,SZZ,ntra )
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
@@ -31,5 +32,5 @@
   !  parametres principaux du modele
   !
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/bernoui.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/bernoui.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/bernoui.f90	(revision 5271)
@@ -3,5 +3,6 @@
 !
 SUBROUTINE bernoui (ngrid,nlay,pphi,pecin,pbern)
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !=======================================================================
@@ -25,5 +26,5 @@
   !   -------------
   !
-  include "dimensions.h"
+
   include "paramet.h"
   !
Index: /LMDZ6/trunk/libf/dyn3d_common/caldyn0.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/caldyn0.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/caldyn0.f90	(revision 5271)
@@ -8,6 +8,7 @@
   USE control_mod, ONLY: resetvarc 
   USE comvert_mod, ONLY: ap, bp
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/comvert_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/comvert_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/comvert_mod.f90	(revision 5271)
@@ -4,8 +4,9 @@
 MODULE comvert_mod
 
-IMPLICIT NONE  
+USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
 PRIVATE
-INCLUDE "dimensions.h"
+
 
 PUBLIC :: ap,bp,presnivs,dpres,sig,ds,pa,preff,nivsigs,nivsig, &
Index: /LMDZ6/trunk/libf/dyn3d_common/convflu.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/convflu.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/convflu.f90	(revision 5271)
@@ -18,7 +18,8 @@
   ! nbniv   est le nombre de niveaux vert. de  xflu et de yflu .
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   REAL :: xflu,yflu,convfl,convpn,convps
Index: /LMDZ6/trunk/libf/dyn3d_common/convmas.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/convmas.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/convmas.f90	(revision 5271)
@@ -5,6 +5,7 @@
 !-------------------------------------------------------------------------------
 ! Purpose: Compute mass flux convergence at p levels.
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/coordij.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/coordij.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/coordij.f90	(revision 5271)
@@ -13,10 +13,11 @@
   USE comconst_mod, ONLY: pi
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   REAL :: lon,lat
   INTEGER :: ilon,jlat
   INTEGER :: i,j
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/covcont.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/covcont.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/covcont.f90	(revision 5271)
@@ -6,6 +6,7 @@
 ! Purpose: Compute contravariant components from covariant components.
 !-------------------------------------------------------------------------------
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/diagedyn.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/diagedyn.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/diagedyn.f90	(revision 5271)
@@ -55,7 +55,8 @@
   USE control_mod, ONLY : planet_type
 
-  IMPLICIT NONE
-  !
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/disvert.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/disvert.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/disvert.f90	(revision 5271)
@@ -10,7 +10,8 @@
   USE logic_mod, ONLY: ok_strato
 
-  IMPLICIT NONE
-
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
   include "paramet.h"
   include "iniprint.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/disvert_noterre.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/disvert_noterre.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/disvert_noterre.f90	(revision 5271)
@@ -13,7 +13,8 @@
   USE logic_mod, ONLY: hybrid
 
-  IMPLICIT NONE
-
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
   include "paramet.h"
   include "iniprint.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/diverg.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/diverg.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/diverg.f90	(revision 5271)
@@ -11,5 +11,6 @@
   !          x et y  etant des composantes covariantes   ...
   !  *********************************************************************
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   !  x  et  y  sont des arguments  d'entree pour le s-prog
@@ -22,5 +23,5 @@
   !
   !   ---------------------------------------------------------------------
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/diverg_gam.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/diverg_gam.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/diverg_gam.f90	(revision 5271)
@@ -12,5 +12,6 @@
   !          x et y  etant des composantes covariantes   ...
   !  *********************************************************************
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   !  x  et  y  sont des arguments  d'entree pour le s-prog
@@ -23,5 +24,5 @@
   !
   !   ---------------------------------------------------------------------
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/divergf.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/divergf.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/divergf.f90	(revision 5271)
@@ -11,5 +11,6 @@
   !          x et y  etant des composantes covariantes   ...
   !  *********************************************************************
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   !  x  et  y  sont des arguments  d'entree pour le s-prog
@@ -22,5 +23,5 @@
   !
   !   ---------------------------------------------------------------------
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/divergst.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/divergst.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/divergst.f90	(revision 5271)
@@ -3,4 +3,5 @@
 !
 SUBROUTINE divergst(klevel,x,y,div)
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
   IMPLICIT NONE
   !
@@ -17,5 +18,4 @@
   !   -------------------------------------------------------------------
   !
-  INCLUDE "dimensions.h"
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/divgrad.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/divgrad.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/divgrad.f90	(revision 5271)
@@ -3,5 +3,6 @@
 !
 SUBROUTINE divgrad (klevel,h, lh, divgra )
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   !=======================================================================
@@ -20,5 +21,5 @@
   !   -------------
   !
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/divgrad2.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/divgrad2.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/divgrad2.f90	(revision 5271)
@@ -13,7 +13,8 @@
   !     divgra     est  un argument  de sortie pour le s-prg
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom2.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/ener_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/ener_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/ener_mod.f90	(revision 5271)
@@ -4,7 +4,8 @@
 MODULE ener_mod
 
-IMPLICIT NONE  
+USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
-include "dimensions.h"
+
 include "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3d_common/enercin.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/enercin.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/enercin.f90	(revision 5271)
@@ -5,6 +5,7 @@
 !-------------------------------------------------------------------------------
 ! Purpose: Compute kinetic energy at sigma levels.
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/exner_hyb_m.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/exner_hyb_m.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/exner_hyb_m.f90	(revision 5271)
@@ -36,7 +36,8 @@
     USE comvert_mod, ONLY: preff
     
-    IMPLICIT NONE
-    
-    include "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
     include "paramet.h"
     include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/exner_milieu_m.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/exner_milieu_m.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/exner_milieu_m.f90	(revision 5271)
@@ -33,7 +33,8 @@
     USE comvert_mod, ONLY: preff
     
-    IMPLICIT NONE
-    
-    include "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
     include "paramet.h"
     include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/flumass.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/flumass.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/flumass.f90	(revision 5271)
@@ -5,6 +5,7 @@
 !-------------------------------------------------------------------------------
 ! Purpose: Compute mass flux at s levels.
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/fxhyp_m.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/fxhyp_m.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/fxhyp_m.f90	(revision 5271)
@@ -23,7 +23,5 @@
     use principal_cshift_m, only: principal_cshift
     use serre_mod, only: clon, grossismx, dzoomx, taux
-
-    include "dimensions.h"
-    ! for iim
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
 
     REAL, intent(out):: xprimm025(:), rlonv(:), xprimv(:) ! (iim + 1)
Index: /LMDZ6/trunk/libf/dyn3d_common/fxy.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/fxy.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/fxy.f90	(revision 5271)
@@ -9,5 +9,6 @@
   USE serre_mod, ONLY: pxo,pyo,alphax,alphay,transx,transy
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   ! Auteur  :  P. Le Van
@@ -17,5 +18,5 @@
   !
   !
-  include "dimensions.h"
+
   include "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3d_common/fxysinus.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/fxysinus.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/fxysinus.f90	(revision 5271)
@@ -8,5 +8,6 @@
 
   USE comconst_mod, ONLY: pi
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   ! Calcul  des longitudes et des latitudes  pour une fonction f(x,y)
@@ -16,5 +17,5 @@
   !
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3d_common/fyhyp_m.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/fyhyp_m.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/fyhyp_m.f90	(revision 5271)
@@ -19,7 +19,5 @@
     use nrtype, only: k8
     use serre_mod, only: clat, grossismy, dzoomy, tauy
-
-    include "dimensions.h"
-    ! for jjm
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
 
     REAL, intent(out):: rlatu(jjm + 1), yyprimu(jjm + 1)
Index: /LMDZ6/trunk/libf/dyn3d_common/geopot.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/geopot.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/geopot.f90	(revision 5271)
@@ -3,5 +3,6 @@
 !
 SUBROUTINE geopot (ngrid, teta, pk, pks, phis, phi )
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !=======================================================================
@@ -27,5 +28,5 @@
   !   -------------
 
-  include "dimensions.h"
+
   include "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3d_common/gr_u_scal.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/gr_u_scal.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/gr_u_scal.f90	(revision 5271)
@@ -25,10 +25,11 @@
   !
   !=======================================================================
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !-----------------------------------------------------------------------
   !   Declararations:
   !   ---------------
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/gr_v_scal.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/gr_v_scal.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/gr_v_scal.f90	(revision 5271)
@@ -25,10 +25,11 @@
   !
   !=======================================================================
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !-----------------------------------------------------------------------
   !   Declararations:
   !   ---------------
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/grad.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/grad.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/grad.f90	(revision 5271)
@@ -13,7 +13,8 @@
   !   pgx  et  pgy    sont des arguments de sortie pour le s-prog
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INTEGER :: klevel
Index: /LMDZ6/trunk/libf/dyn3d_common/gradiv.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/gradiv.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/gradiv.f90	(revision 5271)
@@ -17,7 +17,8 @@
   !
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  include "dimensions.h"
+
   include "paramet.h"
   include "comdissipn.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/gradiv2.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/gradiv2.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/gradiv2.f90	(revision 5271)
@@ -16,7 +16,8 @@
   !
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/grilles_gcm_netcdf_sub.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/grilles_gcm_netcdf_sub.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/grilles_gcm_netcdf_sub.f90	(revision 5271)
@@ -17,7 +17,8 @@
           nf90_put_att, nf90_enddef, nf90_create
   
-  IMPLICIT NONE
-
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/infotrac.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/infotrac.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/infotrac.f90	(revision 5271)
@@ -120,5 +120,6 @@
    USE lmdz_reprobus_wrappers, ONLY: Init_chem_rep_trac
    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_REPROBUS, CPPKEY_STRATAER
-   IMPLICIT NONE
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 !==============================================================================================================================
 !
@@ -140,5 +141,5 @@
 !------------------------------------------------------------------------------------------------------------------------------
 ! Declarations:
-   INCLUDE "dimensions.h"
+
    INCLUDE "iniprint.h"
 
Index: /LMDZ6/trunk/libf/dyn3d_common/iniconst.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/iniconst.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/iniconst.f90	(revision 5271)
@@ -11,5 +11,6 @@
   USE comvert_mod, ONLY: disvert_type, pressure_exner
   
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   !      P. Le Van
@@ -18,5 +19,5 @@
   !   -------------
   !
-  include "dimensions.h"
+
   include "paramet.h"
   include "iniprint.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/inidissip.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/inidissip.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/inidissip.f90	(revision 5271)
@@ -16,6 +16,7 @@
   USE comvert_mod, ONLY: preff, presnivs
 
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comdissipn.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/inigeom.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/inigeom.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/inigeom.f90	(revision 5271)
@@ -22,7 +22,8 @@
   USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy, &
         alphax,alphay,taux,tauy,transx,transy,pxo,pyo
-  IMPLICIT NONE
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/initdynav.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/initdynav.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/initdynav.f90	(revision 5271)
@@ -11,5 +11,6 @@
   USE temps_mod, ONLY: itau_dyn
   
-  implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
 
@@ -34,5 +35,5 @@
   !   L. Fairhead, LMD, 03/99
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/initfluxsto.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/initfluxsto.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/initfluxsto.f90	(revision 5271)
@@ -11,5 +11,6 @@
   USE temps_mod, ONLY: annee_ref, day_ref, itau_dyn
 
-  implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
   !
@@ -40,5 +41,5 @@
   !
   !   Declarations
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/inithist.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/inithist.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/inithist.f90	(revision 5271)
@@ -12,5 +12,6 @@
    USE temps_mod, ONLY: itau_dyn
 
-  implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
   !
@@ -39,5 +40,5 @@
   !
   !   Declarations
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/inter_barxy_m.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/inter_barxy_m.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/inter_barxy_m.f90	(revision 5271)
@@ -6,5 +6,6 @@
   ! Authors: Robert SADOURNY, Phu LE VAN, Lionel GUEZ
 
-  implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
   private
@@ -18,5 +19,5 @@
     use assert_m, only: assert
 
-    include "dimensions.h"
+
     ! (for "iim", "jjm")
 
Index: /LMDZ6/trunk/libf/dyn3d_common/interpost.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/interpost.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/interpost.f90	(revision 5271)
@@ -4,8 +4,9 @@
   subroutine interpost(q,qppm)
 
-   implicit none
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom2.h"
@@ -18,7 +19,7 @@
 
   ! RE-INVERSION DES NIVEAUX
-  ! le programme ppm3d travaille avec une 3ème coordonnée inversée par rapport
+  ! le programme ppm3d travaille avec une 3�me coordonn�e invers�e par rapport
   ! de celle du LMDZ: z=1<=>niveau max, z=llm+1<=>surface
-  ! On passe donc des niveaux de Lin à ceux du LMDZ
+  ! On passe donc des niveaux de Lin � ceux du LMDZ
 
     do l=1,llm
Index: /LMDZ6/trunk/libf/dyn3d_common/interpre.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/interpre.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/interpre.f90	(revision 5271)
@@ -9,7 +9,8 @@
   USE comvert_mod, ONLY: ap, bp
 
-   implicit none
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comdissip.h"
@@ -41,6 +42,6 @@
 
     ! CALCUL DE LA PRESSION DE SURFACE
-    ! Les coefficients ap et bp sont passés en common
-    ! Calcul de la pression au sol en mb optimisée pour
+    ! Les coefficients ap et bp sont pass�s en common
+    ! Calcul de la pression au sol en mb optimis�e pour
     ! la vectorialisation
 
@@ -67,6 +68,6 @@
   ! RECONSTRUCTION DES CHAMPS CONTRAVARIANTS
   ! Le programme ppm3d travaille avec les composantes
-  ! de vitesse et pas les flux, on doit donc passer de l'un à l'autre
-  ! Dans le même temps, on fait le changement d'orientation du vent en v
+  ! de vitesse et pas les flux, on doit donc passer de l'un � l'autre
+  ! Dans le m�me temps, on fait le changement d'orientation du vent en v
   do l=1,llm
       do j=1,jjm
@@ -99,7 +100,7 @@
 
   ! INVERSION DES NIVEAUX
-  ! le programme ppm3d travaille avec une 3ème coordonnée inversée par rapport
+  ! le programme ppm3d travaille avec une 3�me coordonn�e invers�e par rapport
   ! de celle du LMDZ: z=1<=>niveau max, z=llm+1<=>surface
-  ! On passe donc des niveaux du LMDZ à ceux de Lin
+  ! On passe donc des niveaux du LMDZ � ceux de Lin
 
   do l=1,llm+1
Index: /LMDZ6/trunk/libf/dyn3d_common/invert_zoom_x_m.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/invert_zoom_x_m.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/invert_zoom_x_m.f90	(revision 5271)
@@ -1,5 +1,6 @@
 module invert_zoom_x_m
 
-  implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
   INTEGER, PARAMETER:: nmax = 30000
@@ -13,5 +14,5 @@
     use serre_mod, only: clon
 
-    include "dimensions.h"
+
     ! for iim
 
Index: /LMDZ6/trunk/libf/dyn3d_common/laplacien.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/laplacien.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/laplacien.f90	(revision 5271)
@@ -12,7 +12,8 @@
   !  divgra     est  un argument  de sortie pour le s-prog
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/laplacien_gam.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/laplacien_gam.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/laplacien_gam.f90	(revision 5271)
@@ -14,7 +14,8 @@
   !  divgra     est  un argument  de sortie pour le s-prog
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/laplacien_rot.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/laplacien_rot.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/laplacien_rot.f90	(revision 5271)
@@ -13,7 +13,8 @@
   !  rotout           est  un argument  de sortie pour le s-prog
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/laplacien_rotgam.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/laplacien_rotgam.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/laplacien_rotgam.f90	(revision 5271)
@@ -12,7 +12,8 @@
   !  divgra     est  un argument  de sortie pour le s-prog
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/limx.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/limx.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/limx.f90	(revision 5271)
@@ -13,7 +13,8 @@
   !
   !   --------------------------------------------------------------------
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/limy.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/limy.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/limy.f90	(revision 5271)
@@ -15,7 +15,8 @@
   !   --------------------------------------------------------------------
   USE comconst_mod, ONLY: pi
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/limz.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/limz.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/limz.f90	(revision 5271)
@@ -13,7 +13,8 @@
   !
   !   --------------------------------------------------------------------
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/massbar.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/massbar.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/massbar.f90	(revision 5271)
@@ -6,6 +6,7 @@
 ! Purpose: Compute air mass mean along X and Y in each cell.
 ! See iniconst for more details.
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/massbarxy.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/massbarxy.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/massbarxy.f90	(revision 5271)
@@ -6,6 +6,7 @@
 ! Purpose: Compute air mass mean along X and Y in each cell.
 ! See iniconst for more details.
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/massdair.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/massdair.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/massdair.f90	(revision 5271)
@@ -16,7 +16,8 @@
   !  ....  p est defini aux interfaces des llm couches   .....
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/nxgrad.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/nxgrad.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/nxgrad.f90	(revision 5271)
@@ -12,7 +12,8 @@
   !   x  et y    sont des arguments de sortie pour le s-prog
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/nxgrad_gam.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/nxgrad_gam.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/nxgrad_gam.f90	(revision 5271)
@@ -12,7 +12,8 @@
   !   x  et y    sont des arguments de sortie pour le s-prog
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/nxgradst.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/nxgradst.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/nxgradst.f90	(revision 5271)
@@ -4,5 +4,6 @@
 SUBROUTINE nxgradst (klevel,rot, x, y )
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   ! Auteur :  P. Le Van
   !
@@ -13,5 +14,5 @@
   !   x  et y    sont des arguments de sortie pour le s-prog
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/nxgraro2.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/nxgraro2.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/nxgraro2.f90	(revision 5271)
@@ -15,7 +15,8 @@
   !
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comdissipn.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/nxgrarot.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/nxgrarot.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/nxgrarot.f90	(revision 5271)
@@ -16,8 +16,9 @@
   !
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   !
-  include "dimensions.h"
+
   include "paramet.h"
   include "comdissipn.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/pbar.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/pbar.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/pbar.f90	(revision 5271)
@@ -3,5 +3,6 @@
 !
 SUBROUTINE pbar ( pext, pbarx, pbary, pbarxy )
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !=======================================================================
@@ -75,5 +76,5 @@
 
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3d_common/pentes_ini.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/pentes_ini.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/pentes_ini.f90	(revision 5271)
@@ -6,5 +6,6 @@
   USE comconst_mod, ONLY: pi, dtvr
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !=======================================================================
@@ -25,5 +26,5 @@
 
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/prather.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/prather.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/prather.f90	(revision 5271)
@@ -6,5 +6,6 @@
   USE comconst_mod, ONLY: pi
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !=======================================================================
@@ -22,5 +23,5 @@
 
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/pression.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/pression.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/pression.f90	(revision 5271)
@@ -8,6 +8,7 @@
 !          with p(ij,llm+1) = 0. and  p(ij,1) = ps(ij)  .   
 !-------------------------------------------------------------------------------
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
 !===============================================================================
Index: /LMDZ6/trunk/libf/dyn3d_common/principal_cshift_m.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/principal_cshift_m.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/principal_cshift_m.f90	(revision 5271)
@@ -1,5 +1,6 @@
 module principal_cshift_m
 
-  implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
 contains
@@ -14,5 +15,5 @@
     use serre_mod, only: clon
 
-    include "dimensions.h"
+
     ! for iim
 
Index: /LMDZ6/trunk/libf/dyn3d_common/psextbar.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/psextbar.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/psextbar.f90	(revision 5271)
@@ -3,5 +3,6 @@
 !
 SUBROUTINE psextbar ( ps, psexbarxy )
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !=======================================================================
@@ -75,5 +76,5 @@
 
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/rotat.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/rotat.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/rotat.f90	(revision 5271)
@@ -13,7 +13,8 @@
   !        rot          est  un argument  de sortie pour le s-prog
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/rotat_nfil.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/rotat_nfil.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/rotat_nfil.f90	(revision 5271)
@@ -13,7 +13,8 @@
   !        rot          est  un argument  de sortie pour le s-prog
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/rotatf.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/rotatf.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/rotatf.f90	(revision 5271)
@@ -14,7 +14,8 @@
   !        rot          est  un argument  de sortie pour le s-prog
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/rotatst.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/rotatst.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/rotatst.f90	(revision 5271)
@@ -13,8 +13,9 @@
   !    rot          est  un argument  de sortie pour le s-prog
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   INTEGER :: klevel
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3d_common/sortvarc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/sortvarc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/sortvarc.f90	(revision 5271)
@@ -12,5 +12,6 @@
         etot0,ptot0,ztot0,stot0,ang0, &
         rmsdpdt,rmsv
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
 
@@ -30,5 +31,5 @@
   !   -------------
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/test_period.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/test_period.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/test_period.f90	(revision 5271)
@@ -11,7 +11,8 @@
   USE infotrac, ONLY : nqtot
   !
-  ! IMPLICIT NONE
+  ! USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   !
Index: /LMDZ6/trunk/libf/dyn3d_common/tourpot.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/tourpot.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/tourpot.f90	(revision 5271)
@@ -5,6 +5,7 @@
 !-------------------------------------------------------------------------------
 ! Purpose: Compute potential vorticity.
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/traceurpole.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/traceurpole.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/traceurpole.f90	(revision 5271)
@@ -4,7 +4,8 @@
     subroutine traceurpole(q,masse)
 
-      implicit none
+      USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comdissip.h"
@@ -28,5 +29,5 @@
 
 
-  ! On impose une seule valeur au pôle Sud j=jjm+1=jjp1
+  ! On impose une seule valeur au p�le Sud j=jjm+1=jjp1
   sommemasses=0
   sommemqs=0
@@ -39,5 +40,5 @@
       enddo
 
-  ! On impose une seule valeur du traceur au pôle Nord j=1
+  ! On impose une seule valeur du traceur au p�le Nord j=1
   sommemassen=0
   sommemqn=0
@@ -50,5 +51,5 @@
      enddo
 
-  ! On force le traceur à prendre cette valeur aux pôles
+  ! On force le traceur � prendre cette valeur aux p�les
     do l=1,llm
         do i=1,iip1
Index: /LMDZ6/trunk/libf/dyn3d_common/ugeostr.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/ugeostr.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/ugeostr.f90	(revision 5271)
@@ -13,7 +13,8 @@
   use comconst_mod, only: omeg, rad
   
-  implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/vitvert.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/vitvert.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/vitvert.f90	(revision 5271)
@@ -6,6 +6,7 @@
 ! Purpose: Compute vertical speed at sigma levels.
   USE comvert_mod, ONLY: bp
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
 !===============================================================================
Index: /LMDZ6/trunk/libf/dyn3d_common/writedynav.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/writedynav.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/writedynav.f90	(revision 5271)
@@ -8,6 +8,6 @@
   USE comconst_mod, ONLY: cpp
   USE temps_mod, ONLY: itau_dyn
-
-  implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
   !   Ecriture du fichier histoire au format IOIPSL
@@ -29,5 +29,5 @@
 
   !   Declarations
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3d_common/writehist.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3d_common/writehist.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3d_common/writehist.f90	(revision 5271)
@@ -3,11 +3,10 @@
 !
 subroutine writehist(time,vcov,ucov,teta,phi,q,masse,ps,phis)
-
   USE ioipsl
   USE infotrac, ONLY : nqtot
   use com_io_dyn_mod, only : histid,histvid,histuid
   USE temps_mod, ONLY: itau_dyn
-
-  implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
   !
@@ -33,5 +32,4 @@
   !
   !   Declarations
-  include "dimensions.h"
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/addfi_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/addfi_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/addfi_loc.f90	(revision 5271)
@@ -8,4 +8,5 @@
   USE infotrac, ONLY : nqtot
   USE control_mod, ONLY : planet_type
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
   IMPLICIT NONE
   !
@@ -46,5 +47,4 @@
   !    ------------------
   !
-  include "dimensions.h"
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/advect_new_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/advect_new_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/advect_new_loc.f90	(revision 5271)
@@ -10,5 +10,6 @@
   USE logic_mod, ONLY: conser
   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !=======================================================================
   !
@@ -30,5 +31,5 @@
   !   -------------
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/advect_new_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/advect_new_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/advect_new_mod.f90	(revision 5271)
@@ -17,6 +17,5 @@
   USE allocate_field_mod
   USE parallel_lmdz
-  USE dimensions_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  IMPLICIT NONE
   TYPE(distrib),POINTER :: d
 
Index: /LMDZ6/trunk/libf/dyn3dmem/advtrac_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/advtrac_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/advtrac_loc.f90	(revision 5271)
@@ -21,7 +21,8 @@
    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
    USE strings_mod, ONLY: int2str
-   IMPLICIT NONE
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
    !
-   include "dimensions.h"
+
    include "paramet.h"
    include "comdissip.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/advtrac_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/advtrac_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/advtrac_mod.f90	(revision 5271)
@@ -10,6 +10,7 @@
   USE parallel_lmdz
   USE vlspltgen_mod
-  IMPLICIT NONE
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   INCLUDE "paramet.h"
   TYPE(distrib),POINTER :: d
Index: /LMDZ6/trunk/libf/dyn3dmem/allocate_field_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/allocate_field_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/allocate_field_mod.f90	(revision 5271)
@@ -158,6 +158,5 @@
   SUBROUTINE allocate1d_u2d(field,d)
   USE parallel_lmdz
-  USE dimensions_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  IMPLICIT NONE
   REAL,POINTER :: field(:,:)
   TYPE(distrib),INTENT(IN) :: d
@@ -175,6 +174,5 @@
   SUBROUTINE allocate2d_u2d(field,dim1,d)
   USE parallel_lmdz
-  USE dimensions_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  IMPLICIT NONE
   REAL,POINTER :: field(:,:,:)
   INTEGER      :: dim1
@@ -192,6 +190,5 @@
   SUBROUTINE allocate3d_u2d(field,dim1,dim2,d)
   USE parallel_lmdz
-  USE dimensions_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  IMPLICIT NONE
   REAL,POINTER :: field(:,:,:,:)
   INTEGER      :: dim1,dim2
@@ -211,6 +208,5 @@
   SUBROUTINE allocate1d_v2d(field,d)
   USE parallel_lmdz
-  USE dimensions_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  IMPLICIT NONE
   REAL,POINTER :: field(:,:)
   TYPE(distrib),INTENT(IN) :: d
@@ -228,6 +224,5 @@
   SUBROUTINE allocate2d_v2d(field,dim1,d)
   USE parallel_lmdz
-  USE dimensions_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  IMPLICIT NONE
   REAL,POINTER :: field(:,:,:)
   INTEGER      :: dim1
@@ -245,6 +240,5 @@
   SUBROUTINE allocate3d_v2d(field,dim1,dim2,d)
   USE parallel_lmdz
-  USE dimensions_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  IMPLICIT NONE
   REAL,POINTER :: field(:,:,:,:)
   INTEGER      :: dim1,dim2
@@ -511,6 +505,5 @@
   USE parallel_lmdz
   USE mod_hallo
-  USE dimensions_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  IMPLICIT NONE
   REAL,POINTER :: field(:,:)
   TYPE(distrib),INTENT(IN) :: old_dist
@@ -548,6 +541,5 @@
   USE parallel_lmdz
   USE mod_hallo
-  USE dimensions_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  IMPLICIT NONE
   REAL,POINTER :: field(:,:,:)
   TYPE(distrib),INTENT(IN) :: old_dist
@@ -585,6 +577,5 @@
   USE parallel_lmdz
   USE mod_hallo
-  USE dimensions_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  IMPLICIT NONE
   REAL,POINTER :: field(:,:,:,:)
   TYPE(distrib),INTENT(IN) :: old_dist
@@ -625,6 +616,5 @@
   USE parallel_lmdz
   USE mod_hallo
-  USE dimensions_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  IMPLICIT NONE
   REAL,POINTER :: field(:,:)
   TYPE(distrib),INTENT(IN) :: old_dist
@@ -662,6 +652,5 @@
   USE parallel_lmdz
   USE mod_hallo
-  USE dimensions_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  IMPLICIT NONE
   REAL,POINTER :: field(:,:,:)
   TYPE(distrib),INTENT(IN) :: old_dist
@@ -699,6 +688,5 @@
   USE parallel_lmdz
   USE mod_hallo
-  USE dimensions_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  IMPLICIT NONE
   REAL,POINTER :: field(:,:,:,:)
   TYPE(distrib),INTENT(IN) :: old_dist
Index: /LMDZ6/trunk/libf/dyn3dmem/bands.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/bands.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/bands.f90	(revision 5271)
@@ -42,7 +42,8 @@
   subroutine Read_distrib
     USE parallel_lmdz
-    implicit none
-
-    include "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
+
       integer :: i,j
       character (len=4) :: siim,sjjm,sllm,sproc
@@ -105,6 +106,7 @@
    SUBROUTINE  Set_Bands 
      USE parallel_lmdz
-     IMPLICIT NONE
-     INCLUDE 'dimensions.h'    
+     USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
      INTEGER :: i, ij
      INTEGER :: jj_para_begin(0:mpi_size-1)
@@ -438,6 +440,7 @@
     subroutine WriteBands
     USE parallel_lmdz
-    implicit none
-    include "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
 
       integer :: i,j
Index: /LMDZ6/trunk/libf/dyn3dmem/bernoui_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/bernoui_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/bernoui_loc.f90	(revision 5271)
@@ -2,5 +2,6 @@
   USE parallel_lmdz
   USE mod_filtreg_p
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !=======================================================================
@@ -24,5 +25,5 @@
   !   -------------
   !
-  include "dimensions.h"
+
   include "paramet.h"
   !
Index: /LMDZ6/trunk/libf/dyn3dmem/bilan_dyn_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/bilan_dyn_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/bilan_dyn_loc.f90	(revision 5271)
@@ -19,7 +19,8 @@
   USE temps_mod, ONLY: annee_ref, day_ref, itau_dyn
 
-  IMPLICIT NONE
-
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/caladvtrac_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/caladvtrac_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/caladvtrac_loc.f90	(revision 5271)
@@ -17,5 +17,6 @@
   USE write_field_loc
   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   ! Auteurs:   F.Hourdin , P.Le Van, F.Forget, F.Codron
@@ -29,5 +30,5 @@
 
 
-  include "dimensions.h"
+
   include "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3dmem/caladvtrac_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/caladvtrac_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/caladvtrac_mod.f90	(revision 5271)
@@ -34,6 +34,7 @@
   USE advtrac_mod, ONLY : advtrac_allocate
   USE groupe_mod 
-  IMPLICIT NONE
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   INCLUDE "paramet.h"
   TYPE(distrib),POINTER :: d
Index: /LMDZ6/trunk/libf/dyn3dmem/caldyn_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/caldyn_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/caldyn_loc.f90	(revision 5271)
@@ -8,5 +8,6 @@
   USE comvert_mod, ONLY: ap, bp
   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !=======================================================================
@@ -26,5 +27,5 @@
   !   ----------------
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/caldyn_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/caldyn_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/caldyn_mod.f90	(revision 5271)
@@ -22,6 +22,5 @@
   USE allocate_field_mod
   USE parallel_lmdz
-  USE dimensions_mod
-  USE advect_new_mod,ONLY : advect_new_allocate
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  USE advect_new_mod,ONLY : advect_new_allocate
   IMPLICIT NONE
   TYPE(distrib),POINTER :: d
Index: /LMDZ6/trunk/libf/dyn3dmem/call_calfis_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/call_calfis_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/call_calfis_mod.f90	(revision 5271)
@@ -36,6 +36,5 @@
   USE allocate_field_mod
   USE parallel_lmdz
-  USE dimensions_mod
-  USE infotrac, ONLY: nqtot
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  USE infotrac, ONLY: nqtot
   IMPLICIT NONE
     TYPE(distrib),POINTER :: d
@@ -72,6 +71,5 @@
   SUBROUTINE call_calfis(itau,lafin,ucov_dyn,vcov_dyn,teta_dyn,masse_dyn,ps_dyn, &
                          phis_dyn,q_dyn,flxw_dyn)
-  USE dimensions_mod
-  use exner_hyb_loc_m, only: exner_hyb_loc
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  use exner_hyb_loc_m, only: exner_hyb_loc
   use exner_milieu_loc_m, only: exner_milieu_loc
   USE parallel_lmdz
Index: /LMDZ6/trunk/libf/dyn3dmem/call_dissip_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/call_dissip_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/call_dissip_mod.f90	(revision 5271)
@@ -24,6 +24,5 @@
   USE allocate_field_mod
   USE parallel_lmdz
-  USE dimensions_mod
-  USE dissip_mod, ONLY : dissip_allocate
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  USE dissip_mod, ONLY : dissip_allocate
   IMPLICIT NONE
     TYPE(distrib),POINTER :: d
@@ -80,6 +79,5 @@
   
   SUBROUTINE call_dissip(ucov_dyn,vcov_dyn,teta_dyn,p_dyn,pk_dyn,ps_dyn)
-  USE dimensions_mod
-  USE parallel_lmdz
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  USE parallel_lmdz
   USE times
   USE mod_hallo
Index: /LMDZ6/trunk/libf/dyn3dmem/check_isotopes_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/check_isotopes_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/check_isotopes_loc.f90	(revision 5271)
@@ -6,6 +6,7 @@
    USE iso_params_mod, ONLY: tnat_H216O, tnat_H217O, tnat_H218O, tnat_HDO, tnat_HTO
    USE ioipsl,          ONLY: getin
-   IMPLICIT NONE
-   include "dimensions.h"
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
    REAL,             INTENT(INOUT) :: q(ijb_u:ije_u,llm,nqtot)
    INTEGER,          INTENT(IN)    :: ijb, ije   !--- Can be local and different from ijb_u,ije_u, for example in qminimum
Index: /LMDZ6/trunk/libf/dyn3dmem/conf_gcm.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/conf_gcm.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/conf_gcm.F90	(revision 5271)
@@ -23,5 +23,6 @@
   USE temps_mod, ONLY: calend, year_len, offline_time
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !-----------------------------------------------------------------------
   !     Auteurs :   L. Fairhead , P. Le Van  .
@@ -30,5 +31,5 @@
 
   !     tapedef   :
-  !     etatinit  :     = TRUE   , on ne  compare pas les valeurs des para- 
+  !     etatinit  :     = TRUE   , on ne  compare pas les valeurs des para-
   !     -metres  du zoom  avec  celles lues sur le fichier start .
 
@@ -38,5 +39,5 @@
   !   Declarations :
   !   --------------
-  include "dimensions.h"
+
   include "paramet.h"
   include "comdissnew.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/convflu_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/convflu_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/convflu_loc.f90	(revision 5271)
@@ -16,7 +16,8 @@
   !
   USE parallel_lmdz
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   REAL :: xflu,yflu,convfl,convpn,convps
Index: /LMDZ6/trunk/libf/dyn3dmem/convmas1_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/convmas1_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/convmas1_loc.f90	(revision 5271)
@@ -8,6 +8,7 @@
   USE parallel_lmdz
   USE mod_filtreg_p
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/convmas2_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/convmas2_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/convmas2_loc.f90	(revision 5271)
@@ -7,6 +7,7 @@
 !          Equivalent to convmas_loc if convmas1_loc is called before.
   USE parallel_lmdz
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/convmas_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/convmas_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/convmas_loc.f90	(revision 5271)
@@ -7,6 +7,7 @@
   USE parallel_lmdz
   USE mod_filtreg_p
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/covcont_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/covcont_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/covcont_loc.f90	(revision 5271)
@@ -1,5 +1,6 @@
 SUBROUTINE covcont_loc (klevel,ucov, vcov, ucont, vcont )
   USE parallel_lmdz
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !=======================================================================
@@ -17,5 +18,5 @@
   !=======================================================================
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/covnat_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/covnat_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/covnat_loc.f90	(revision 5271)
@@ -4,5 +4,6 @@
 SUBROUTINE covnat_loc(klevel,ucov, vcov, unat, vnat )
   USE parallel_lmdz
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !=======================================================================
@@ -20,5 +21,5 @@
   !=======================================================================
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: DZ6/trunk/libf/dyn3dmem/dimensions_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/dimensions_mod.f90	(revision 5270)
+++ 	(revision )
@@ -1,4 +1,0 @@
-MODULE dimensions_mod
-  INCLUDE 'dimensions.h'
-  INCLUDE 'paramet.h'
-END MODULE dimensions_mod
Index: /LMDZ6/trunk/libf/dyn3dmem/dissip_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/dissip_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/dissip_loc.f90	(revision 5271)
@@ -9,5 +9,6 @@
   USE comconst_mod, ONLY: dtdiss
   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
 
@@ -30,5 +31,5 @@
   !   -------------
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/dissip_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/dissip_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/dissip_mod.f90	(revision 5271)
@@ -9,6 +9,5 @@
   USE allocate_field_mod
   USE parallel_lmdz
-  USE dimensions_mod
-  USE gradiv2_mod, ONLY : gradiv2_allocate
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  USE gradiv2_mod, ONLY : gradiv2_allocate
   USE nxgraro2_mod, ONLY : nxgraro2_allocate
   USE divgrad2_mod, ONLY : divgrad2_allocate
Index: /LMDZ6/trunk/libf/dyn3dmem/diverg_gam_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/diverg_gam_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/diverg_gam_loc.f90	(revision 5271)
@@ -10,5 +10,6 @@
   !  *********************************************************************
   USE parallel_lmdz
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   !  x  et  y  sont des arguments  d'entree pour le s-prog
@@ -21,5 +22,5 @@
   !
   !   ---------------------------------------------------------------------
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/diverg_p.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/diverg_p.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/diverg_p.f90	(revision 5271)
@@ -9,5 +9,6 @@
   !  *********************************************************************
   USE parallel_lmdz
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   !  x  et  y  sont des arguments  d'entree pour le s-prog
@@ -20,5 +21,5 @@
   !
   !   ---------------------------------------------------------------------
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/divergf_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/divergf_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/divergf_loc.f90	(revision 5271)
@@ -10,5 +10,6 @@
   USE parallel_lmdz
   USE mod_filtreg_p
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   !  x  et  y  sont des arguments  d'entree pour le s-prog
@@ -21,5 +22,5 @@
   !
   !   ---------------------------------------------------------------------
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/divgrad2_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/divgrad2_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/divgrad2_loc.f90	(revision 5271)
@@ -14,7 +14,8 @@
   USE mod_hallo
   USE divgrad2_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom2.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/divgrad2_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/divgrad2_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/divgrad2_mod.f90	(revision 5271)
@@ -9,6 +9,5 @@
   USE allocate_field_mod
   USE parallel_lmdz
-  USE dimensions_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  IMPLICIT NONE
     TYPE(distrib),POINTER :: d
     d=>distrib_dissip
Index: /LMDZ6/trunk/libf/dyn3dmem/dteta1_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/dteta1_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/dteta1_loc.f90	(revision 5271)
@@ -3,5 +3,6 @@
   USE write_field_p
   USE mod_filtreg_p
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !=======================================================================
@@ -21,5 +22,5 @@
 
 
-  include "dimensions.h"
+
   include "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3dmem/dudv1_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/dudv1_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/dudv1_loc.f90	(revision 5271)
@@ -1,5 +1,6 @@
 SUBROUTINE dudv1_loc ( vorpot, pbaru, pbarv, du, dv )
   USE parallel_lmdz
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   !-----------------------------------------------------------------------
@@ -17,5 +18,5 @@
   !-----------------------------------------------------------------------
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3dmem/dudv2_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/dudv2_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/dudv2_loc.f90	(revision 5271)
@@ -1,5 +1,6 @@
 SUBROUTINE dudv2_loc ( teta, pkf, bern, du, dv  )
   USE parallel_lmdz
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   !=======================================================================
@@ -23,5 +24,5 @@
   !=======================================================================
   !
-  include "dimensions.h"
+
   include "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3dmem/dynetat0_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/dynetat0_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/dynetat0_loc.f90	(revision 5271)
@@ -24,6 +24,7 @@
   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_REPROBUS
 
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/dynredem_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/dynredem_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/dynredem_loc.f90	(revision 5271)
@@ -22,6 +22,7 @@
   USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0
 
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
@@ -176,6 +177,7 @@
   USE temps_mod, ONLY: itau_dyn, itaufin
   
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "description.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/dynredem_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/dynredem_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/dynredem_mod.f90	(revision 5271)
@@ -1,6 +1,5 @@
 MODULE dynredem_mod
 
-  USE dimensions_mod
-  USE parallel_lmdz
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  USE parallel_lmdz
   USE mod_hallo
   USE netcdf
Index: /LMDZ6/trunk/libf/dyn3dmem/enercin_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/enercin_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/enercin_loc.f90	(revision 5271)
@@ -6,6 +6,7 @@
 ! Purpose: Compute kinetic energy at sigma levels.
   USE parallel_lmdz
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/exner_hyb_loc_m.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/exner_hyb_loc_m.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/exner_hyb_loc_m.f90	(revision 5271)
@@ -38,7 +38,8 @@
     USE comvert_mod, ONLY: preff
     USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
-    IMPLICIT NONE
-    !
-    include "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+    !
+
     include "paramet.h"
     include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/exner_milieu_loc_m.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/exner_milieu_loc_m.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/exner_milieu_loc_m.f90	(revision 5271)
@@ -34,7 +34,8 @@
     USE comvert_mod, ONLY: preff
     
-    IMPLICIT NONE
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
     !
-    include "dimensions.h"
+
     include "paramet.h"
     include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/flumass_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/flumass_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/flumass_loc.f90	(revision 5271)
@@ -6,6 +6,7 @@
 ! Purpose: Compute mass flux at s levels.
   USE parallel_lmdz
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/fluxstokenc_p.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/fluxstokenc_p.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/fluxstokenc_p.f90	(revision 5271)
@@ -16,5 +16,6 @@
 
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   ! Auteurs:   F.Hourdin , P.Le Van, F.Forget, F.Codron
@@ -27,5 +28,5 @@
 
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "tracstoke.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/friction_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/friction_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/friction_loc.f90	(revision 5271)
@@ -7,6 +7,6 @@
   USE control_mod
   USE IOIPSL
-
   USE comconst_mod, ONLY: pi
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
   IMPLICIT NONE
 
@@ -23,5 +23,4 @@
   !=======================================================================
 
-  include "dimensions.h"
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/gcm.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/gcm.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/gcm.F90	(revision 5271)
@@ -28,9 +28,10 @@
 
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !      ......   Version  du 10/01/98    ..........
 
-  !             avec  coordonnees  verticales hybrides 
+  !             avec  coordonnees  verticales hybrides
   !   avec nouveaux operat. dissipation * ( gradiv2,divgrad2,nxgraro2 )
 
@@ -59,5 +60,5 @@
   !   Declarations:
   !   -------------
-  include "dimensions.h"
+
   include "paramet.h"
   include "comdissnew.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/geopot_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/geopot_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/geopot_loc.f90	(revision 5271)
@@ -1,5 +1,6 @@
 SUBROUTINE geopot_loc ( ngrid, teta, pk, pks, phis, phi )
   USE parallel_lmdz
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
 
@@ -26,5 +27,5 @@
   !   -------------
 
-  include "dimensions.h"
+
   include "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3dmem/gr_u_scal_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/gr_u_scal_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/gr_u_scal_loc.f90	(revision 5271)
@@ -26,10 +26,11 @@
   !=======================================================================
   USE parallel_lmdz
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !-----------------------------------------------------------------------
   !   Declararations:
   !   ---------------
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/gr_v_scal_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/gr_v_scal_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/gr_v_scal_loc.f90	(revision 5271)
@@ -26,10 +26,11 @@
   !=======================================================================
   USE parallel_lmdz
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !-----------------------------------------------------------------------
   !   Declararations:
   !   ---------------
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/grad_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/grad_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/grad_loc.f90	(revision 5271)
@@ -11,7 +11,8 @@
   !
   USE parallel_lmdz
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INTEGER :: klevel
Index: /LMDZ6/trunk/libf/dyn3dmem/grad_p.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/grad_p.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/grad_p.f90	(revision 5271)
@@ -11,7 +11,8 @@
   !
   USE parallel_lmdz
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INTEGER :: klevel
Index: /LMDZ6/trunk/libf/dyn3dmem/gradiv2_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/gradiv2_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/gradiv2_loc.f90	(revision 5271)
@@ -19,7 +19,8 @@
   USE mod_filtreg_p
   USE gradiv2_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/gradiv2_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/gradiv2_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/gradiv2_mod.f90	(revision 5271)
@@ -11,6 +11,5 @@
   USE allocate_field_mod
   USE parallel_lmdz
-  USE dimensions_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  IMPLICIT NONE
     TYPE(distrib),POINTER :: d
     d=>distrib_dissip
Index: /LMDZ6/trunk/libf/dyn3dmem/groupe_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/groupe_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/groupe_loc.f90	(revision 5271)
@@ -5,5 +5,6 @@
   USE comconst_mod, ONLY: ngroup
   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
-  implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
   !   sous-programme servant a fitlrer les champs de flux de masse aux
@@ -18,5 +19,5 @@
   !   pas besoin de w en entree.
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/groupe_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/groupe_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/groupe_mod.f90	(revision 5271)
@@ -12,6 +12,7 @@
 !  USE infotrac
   USE advtrac_mod, ONLY : advtrac_allocate 
-  IMPLICIT NONE
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   INCLUDE "paramet.h"
   TYPE(distrib),POINTER :: d
Index: /LMDZ6/trunk/libf/dyn3dmem/groupeun_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/groupeun_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/groupeun_loc.f90	(revision 5271)
@@ -3,7 +3,8 @@
   USE Write_Field_p
   USE comconst_mod, ONLY: ngroup
-  IMPLICIT NONE
-
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
   include "paramet.h"
   include "comgeom2.h"
@@ -137,7 +138,8 @@
   USE parallel_lmdz
   USE comconst_mod, ONLY: ngroup
-  IMPLICIT NONE
-
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/guide_loc_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/guide_loc_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/guide_loc_mod.f90	(revision 5271)
@@ -80,7 +80,8 @@
     USE serre_mod, ONLY: grossismx
 
-    IMPLICIT NONE
-
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
     INCLUDE "paramet.h"
 
@@ -369,7 +370,8 @@
     USE comvert_mod, ONLY: ap, bp, preff, presnivs, pressure_exner
 
-    IMPLICIT NONE
-
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
     INCLUDE "paramet.h"
 
@@ -729,6 +731,7 @@
 ! field1=a*field1+alpha*field2
 
-    IMPLICIT NONE
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
     INCLUDE "paramet.h"
 
@@ -752,6 +755,7 @@
 ! field1=a*field1+alpha*field2
 
-    IMPLICIT NONE
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
     INCLUDE "paramet.h"
 
@@ -777,7 +781,8 @@
     USE comconst_mod, ONLY: pi
 
-    IMPLICIT NONE
-
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
     INCLUDE "paramet.h"
     INCLUDE "comgeom.h"
@@ -849,7 +854,8 @@
     USE comconst_mod, ONLY: pi
 
-    IMPLICIT NONE
-
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
     INCLUDE "paramet.h"
     INCLUDE "comgeom.h"
@@ -921,7 +927,8 @@
   USE comconst_mod, ONLY: cpp, kappa
   USE comvert_mod, ONLY: preff, pressure_exner, bp, ap, disvert_type
-  IMPLICIT NONE
-
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
   include "paramet.h"
   include "comgeom2.h"
@@ -1409,7 +1416,8 @@
     use serre_mod, only: clat, clon, grossismx, grossismy
 
-    implicit none
-
-    include "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
+
     include "paramet.h"
     include "comgeom2.h"
@@ -1576,6 +1584,7 @@
   SUBROUTINE guide_read(timestep)
     USE netcdf, ONLY: nf90_put_var
-    IMPLICIT NONE
-    include "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
     include "paramet.h"
 
@@ -1893,6 +1902,7 @@
   SUBROUTINE guide_read2D(timestep)
     USE netcdf, ONLY: nf90_put_var
-    IMPLICIT NONE
-    include "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
     include "paramet.h"
 
@@ -2171,7 +2181,8 @@
     use netcdf, only: nf90_float, nf90_put_var
 
-    IMPLICIT NONE
-
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
     INCLUDE "paramet.h"
     INCLUDE "comgeom2.h"
@@ -2393,6 +2404,7 @@
 use parallel_lmdz
 use mod_hallo
+USE dimensions_mod, ONLY: iim, jjm, llm, ndm
 implicit none
-include 'dimensions.h'
+
 include 'paramet.h'
 
@@ -2423,6 +2435,7 @@
 !====================================================================
 subroutine dumpall
-     implicit none
-     include "dimensions.h"
+     USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
      include "paramet.h"
      include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/iniacademic_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/iniacademic_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/iniacademic_loc.f90	(revision 5271)
@@ -27,10 +27,11 @@
   ! of the American Meteorological Society, 75, 1825.
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   !   Declararations:
   !   ---------------
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/initdynav_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/initdynav_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/initdynav_loc.f90	(revision 5271)
@@ -17,5 +17,6 @@
    USE temps_mod, ONLY: itau_dyn
 
-   implicit none
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
   !
@@ -44,5 +45,5 @@
   !
   !   Declarations
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/initfluxsto_p.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/initfluxsto_p.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/initfluxsto_p.f90	(revision 5271)
@@ -16,5 +16,6 @@
    USE temps_mod, ONLY: annee_ref, day_ref, itau_dyn
 
-  implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
   !
@@ -45,5 +46,5 @@
   !
   !   Declarations
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/inithist_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/inithist_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/inithist_loc.f90	(revision 5271)
@@ -16,5 +16,6 @@
    USE temps_mod, ONLY: itau_dyn
 
-   implicit none
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
   !
@@ -42,5 +43,5 @@
   !
   !   Declarations
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/integrd_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/integrd_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/integrd_loc.f90	(revision 5271)
@@ -16,5 +16,6 @@
   USE temps_mod, ONLY: dt
   USE strings_mod, ONLY: int2str
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
 
@@ -34,5 +35,5 @@
   !   -------------
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/integrd_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/integrd_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/integrd_mod.f90	(revision 5271)
@@ -13,6 +13,5 @@
   USE allocate_field_mod
   USE parallel_lmdz
-  USE dimensions_mod
-  USE advect_new_mod,ONLY : advect_new_allocate
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  USE advect_new_mod,ONLY : advect_new_allocate
   IMPLICIT NONE
   TYPE(distrib),POINTER :: d
Index: /LMDZ6/trunk/libf/dyn3dmem/laplacien_gam_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/laplacien_gam_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/laplacien_gam_loc.f90	(revision 5271)
@@ -12,7 +12,8 @@
   !
   USE parallel_lmdz
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/laplacien_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/laplacien_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/laplacien_loc.f90	(revision 5271)
@@ -11,7 +11,8 @@
   USE parallel_lmdz
   USE mod_filtreg_p
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/laplacien_rot_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/laplacien_rot_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/laplacien_rot_loc.f90	(revision 5271)
@@ -12,7 +12,8 @@
   USE parallel_lmdz
   USE mod_filtreg_p
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/laplacien_rotgam_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/laplacien_rotgam_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/laplacien_rotgam_loc.f90	(revision 5271)
@@ -10,7 +10,8 @@
   !
   USE parallel_lmdz
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/leapfrog_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/leapfrog_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/leapfrog_loc.f90	(revision 5271)
@@ -40,5 +40,6 @@
    USE strings_mod, ONLY: int2str
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
    ! ......   Version  du 10/01/98    ..........
@@ -73,5 +74,5 @@
   !   -------------
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comdissnew.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/leapfrog_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/leapfrog_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/leapfrog_mod.f90	(revision 5271)
@@ -39,6 +39,5 @@
   USE allocate_field_mod
   USE parallel_lmdz
-  USE dimensions_mod
-  USE infotrac
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  USE infotrac
   USE caldyn_mod,ONLY : caldyn_allocate
   USE integrd_mod,ONLY : integrd_allocate
Index: /LMDZ6/trunk/libf/dyn3dmem/massbar_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/massbar_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/massbar_loc.f90	(revision 5271)
@@ -7,6 +7,7 @@
 ! See iniconst for more details.
   USE parallel_lmdz
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/massbarxy_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/massbarxy_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/massbarxy_loc.f90	(revision 5271)
@@ -7,6 +7,7 @@
 ! See iniconst for more details.
   USE parallel_lmdz
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/massdair_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/massdair_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/massdair_loc.f90	(revision 5271)
@@ -14,7 +14,8 @@
   !  ....  p est defini aux interfaces des llm couches   .....
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/mod_filtreg_p.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/mod_filtreg_p.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/mod_filtreg_p.F90	(revision 5271)
@@ -13,5 +13,6 @@
           matricevn, matricevs
 
-    IMPLICIT NONE
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
     !=======================================================================
@@ -55,5 +56,5 @@
     !
     !
-    INCLUDE "dimensions.h"
+
     INCLUDE "paramet.h"
     INCLUDE "coefils.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/mod_hallo.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/mod_hallo.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/mod_hallo.f90	(revision 5271)
@@ -68,6 +68,5 @@
 
   subroutine Init_mod_hallo
-  USE dimensions_mod
-  USE IOIPSL
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  USE IOIPSL
     implicit none
     integer :: jj_nb_gather(0:mpi_size-1)
@@ -215,6 +214,5 @@
   
   subroutine Register_SendField(Field,ij,ll,offset,size,target,a_request)
-  USE dimensions_mod
-  implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  implicit none
 
     
@@ -231,6 +229,5 @@
       
   subroutine Register_RecvField(Field,ij,ll,offset,size,target,a_request)
-  USE dimensions_mod
-  implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  implicit none
 
    
@@ -248,6 +245,5 @@
   
   subroutine Register_SwapField(FieldS,FieldR,ij,ll,jj_Nb_New,a_request)
-  USE dimensions_mod
-      implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      implicit none
 
     
@@ -296,6 +292,5 @@
   
   subroutine Register_SwapFieldHallo(FieldS,FieldR,ij,ll,jj_Nb_New,Up,Down,a_request)
-  USE dimensions_mod
-  
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
       implicit none
     
@@ -350,6 +345,5 @@
   SUBROUTINE Register_SwapField1d_u(FieldS,FieldR,new_dist,a_request,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -375,6 +369,5 @@
   SUBROUTINE Register_SwapField1d_u_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -402,6 +395,5 @@
   SUBROUTINE Register_SwapField2d_u1d(FieldS,FieldR,new_dist,a_request,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-    IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm    IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -430,6 +422,5 @@
   SUBROUTINE Register_SwapField2d_u1d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-    IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm    IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -460,6 +451,5 @@
   SUBROUTINE Register_SwapField3d_u(FieldS,FieldR,new_dist,a_request,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -488,6 +478,5 @@
   SUBROUTINE Register_SwapField3d_u_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -519,6 +508,5 @@
  SUBROUTINE Register_SwapField1d_u2d(FieldS,FieldR,new_dist,a_request,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
       IMPLICIT NONE
 
@@ -545,6 +533,5 @@
  SUBROUTINE Register_SwapField1d_u2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
       IMPLICIT NONE
 
@@ -573,6 +560,5 @@
   SUBROUTINE Register_SwapField2d_u2d(FieldS,FieldR,new_dist,a_request,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
       IMPLICIT NONE
     
@@ -602,6 +588,5 @@
   SUBROUTINE Register_SwapField2d_u2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
       IMPLICIT NONE
     
@@ -633,6 +618,5 @@
   SUBROUTINE Register_SwapField3d_u2d(FieldS,FieldR,new_dist,a_request,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -661,6 +645,5 @@
   SUBROUTINE Register_SwapField3d_u2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -696,6 +679,5 @@
   SUBROUTINE Register_SwapField1d_v(FieldS,FieldR,new_dist,a_request,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -721,6 +703,5 @@
   SUBROUTINE Register_SwapField1d_v_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -748,6 +729,5 @@
   SUBROUTINE Register_SwapField2d_v1d(FieldS,FieldR,new_dist,a_request,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
    
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -776,6 +756,5 @@
   SUBROUTINE Register_SwapField2d_v1d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
    
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -807,6 +786,5 @@
   SUBROUTINE Register_SwapField3d_v(FieldS,FieldR,new_dist,a_request,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -835,6 +813,5 @@
   SUBROUTINE Register_SwapField3d_v_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -867,6 +844,5 @@
   SUBROUTINE Register_SwapField1d_v2d(FieldS,FieldR,new_dist,a_request,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist !LF
@@ -892,6 +868,5 @@
   SUBROUTINE Register_SwapField1d_v2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist !LF
@@ -919,6 +894,5 @@
   SUBROUTINE Register_SwapField2d_v2d(FieldS,FieldR,new_dist,a_request,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -947,6 +921,5 @@
   SUBROUTINE Register_SwapField2d_v2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -977,6 +950,5 @@
   SUBROUTINE Register_SwapField3d_v2d(FieldS,FieldR,new_dist,a_request,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -1005,6 +977,5 @@
   SUBROUTINE Register_SwapField3d_v2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
     
     TYPE(distrib),INTENT(IN)          :: new_dist
@@ -1036,6 +1007,5 @@
   SUBROUTINE Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,Up,Down,a_request)
   USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm      IMPLICIT NONE
    
     INTEGER :: ll,Up,Down
@@ -1089,6 +1059,5 @@
   SUBROUTINE Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,Up,Down,a_request)
   USE parallel_lmdz
-  USE dimensions_mod
-    IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm    IMPLICIT NONE
     
     INTEGER :: ll,Up,Down
@@ -1148,6 +1117,5 @@
   
   subroutine Register_Hallo(Field,ij,ll,RUp,Rdown,SUp,SDown,a_request)
-  USE dimensions_mod
-  USE lmdz_mpi
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  USE lmdz_mpi
       implicit none
 
@@ -1213,6 +1181,5 @@
 
   subroutine Register_Hallo_u(Field,ll,RUp,Rdown,SUp,SDown,a_request)
-  USE dimensions_mod
-  USE lmdz_mpi
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  USE lmdz_mpi
       implicit none
       INTEGER :: ll
@@ -1276,6 +1243,5 @@
 
   subroutine Register_Hallo_v(Field,ll,RUp,Rdown,SUp,SDown,a_request)
-  USE dimensions_mod
-  USE lmdz_mpi
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  USE lmdz_mpi
       implicit none
       INTEGER :: ll
@@ -1339,6 +1305,5 @@
     
     subroutine SendRequest(a_Request)
-    USE dimensions_mod
-    USE lmdz_mpi
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm    USE lmdz_mpi
       implicit none
 
@@ -1457,6 +1422,5 @@
    
    subroutine WaitRequest(a_Request)
-   USE dimensions_mod
-   USE lmdz_mpi
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm   USE lmdz_mpi
    implicit none
       
@@ -1543,6 +1507,5 @@
    subroutine WaitSendRequest(a_Request)
    USE lmdz_mpi
-   USE dimensions_mod
-   implicit none
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm   implicit none
    
       type(request),target :: a_request
@@ -1590,6 +1553,5 @@
     
    subroutine WaitRecvRequest(a_Request)
-   USE dimensions_mod
-   USE lmdz_mpi
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm   USE lmdz_mpi
    implicit none
       type(request),target :: a_request
@@ -1661,6 +1623,5 @@
     
     subroutine CopyField(FieldS,FieldR,ij,ll,jj_Nb_New)
-    USE dimensions_mod
-  
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
       implicit none
     
@@ -1699,6 +1660,5 @@
 
   subroutine CopyFieldHallo(FieldS,FieldR,ij,ll,jj_Nb_New,Up,Down)
-  USE dimensions_mod
-  
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
       implicit none
     
@@ -1739,6 +1699,5 @@
 
    subroutine Gather_field_u(field_loc,field_glo,ll)
-   USE dimensions_mod
-   implicit none
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm   implicit none
      integer :: ll
      real :: field_loc(ijb_u:ije_u,ll)
@@ -1762,6 +1721,5 @@
         
    subroutine Gather_field_v(field_loc,field_glo,ll)
-   USE dimensions_mod
-   implicit none
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm   implicit none
      integer :: ll
      real :: field_loc(ijb_v:ije_v,ll)
@@ -1790,6 +1748,5 @@
      
    subroutine Scatter_field_u(field_glo,field_loc,ll)
-   USE dimensions_mod
-   implicit none
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm   implicit none
      integer :: ll
      real :: field_glo(ip1jmp1,ll)
@@ -1824,6 +1781,5 @@
 
    subroutine Scatter_field_v(field_glo,field_loc,ll)
-   USE dimensions_mod
-   implicit none
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm   implicit none
      integer :: ll
      real :: field_glo(ip1jmp1,ll)
Index: /LMDZ6/trunk/libf/dyn3dmem/mod_xios_dyn3dmem.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/mod_xios_dyn3dmem.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/mod_xios_dyn3dmem.f90	(revision 5271)
@@ -40,7 +40,8 @@
      USE parallel_lmdz
 
-     IMPLICIT NONE
-
-     INCLUDE 'dimensions.h'
+     USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
      INCLUDE "paramet.h"
      INCLUDE 'comgeom.h'
@@ -133,6 +134,7 @@
 
      USE parallel_lmdz
-     IMPLICIT NONE
-     include 'dimensions.h'
+     USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
      include 'paramet.h'
      CHARACTER(LEN=*)   :: name
@@ -154,6 +156,7 @@
 
      USE parallel_lmdz
-     IMPLICIT NONE
-     include 'dimensions.h'
+     USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
      include 'paramet.h'
      CHARACTER(LEN=*)   :: name
@@ -187,6 +190,7 @@
 
      USE parallel_lmdz
-     IMPLICIT NONE
-     include 'dimensions.h'
+     USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
      include 'paramet.h'
      CHARACTER(LEN=*)   :: name
@@ -217,6 +221,7 @@
 
      USE parallel_lmdz
-     IMPLICIT NONE
-     include 'dimensions.h'
+     USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
      include 'paramet.h'
      CHARACTER(LEN=*)   :: name
Index: /LMDZ6/trunk/libf/dyn3dmem/nxgrad_gam_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/nxgrad_gam_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/nxgrad_gam_loc.f90	(revision 5271)
@@ -11,7 +11,8 @@
   USE parallel_lmdz
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/nxgrad_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/nxgrad_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/nxgrad_loc.f90	(revision 5271)
@@ -10,7 +10,8 @@
   !
   USE parallel_lmdz
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/nxgraro2_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/nxgraro2_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/nxgraro2_loc.f90	(revision 5271)
@@ -18,7 +18,8 @@
   USE mod_filtreg_p
   USE nxgraro2_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comdissipn.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/nxgraro2_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/nxgraro2_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/nxgraro2_mod.f90	(revision 5271)
@@ -11,6 +11,5 @@
   USE allocate_field_mod
   USE parallel_lmdz
-  USE dimensions_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  IMPLICIT NONE
     TYPE(distrib),POINTER :: d
     d=>distrib_dissip
Index: /LMDZ6/trunk/libf/dyn3dmem/parallel_lmdz.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/parallel_lmdz.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/parallel_lmdz.F90	(revision 5271)
@@ -85,6 +85,7 @@
     USE vampir
     USE lmdz_mpi
-    implicit none
-      INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
       INCLUDE "paramet.h"
       INCLUDE "iniprint.h"
@@ -244,6 +245,7 @@
 
     SUBROUTINE create_distrib(jj_nb_new,d)
-    IMPLICIT NONE
-      INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
       INCLUDE "paramet.h"
       
@@ -295,7 +297,8 @@
       
     SUBROUTINE Set_Distrib(d)
-    IMPLICIT NONE
-
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
     INCLUDE "paramet.h"
     TYPE(distrib),INTENT(IN) :: d
@@ -331,7 +334,8 @@
 
     SUBROUTINE copy_distrib(dist,new_dist)
-    IMPLICIT NONE
-
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
     INCLUDE "paramet.h"
     TYPE(distrib),INTENT(INOUT) :: dist
@@ -368,7 +372,8 @@
     
     SUBROUTINE get_current_distrib(d)
-    IMPLICIT NONE
-
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
     INCLUDE "paramet.h"
     TYPE(distrib),INTENT(OUT) :: d
@@ -383,4 +388,5 @@
   	USE wxios
     USE control_mod, only : ok_dyn_xios
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
 
 #ifdef CPP_COUPLE
@@ -401,5 +407,4 @@
 ! #endif of #ifdef CPP_EARTH
 
-      include "dimensions.h"
       include "paramet.h"
 
@@ -447,7 +452,8 @@
         
     subroutine Pack_Data(Field,ij,ll,row,Buffer)
-    implicit none
-
-      INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
+
       INCLUDE "paramet.h"
 
@@ -470,7 +476,8 @@
      
     subroutine Unpack_Data(Field,ij,ll,row,Buffer)
-    implicit none
-
-      INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
+
       INCLUDE "paramet.h"
 
@@ -509,6 +516,7 @@
     USE lmdz_mpi
     USE Vampir
-    implicit none
-      INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
       INCLUDE "paramet.h"    
       INTEGER :: ij,ll
@@ -626,6 +634,7 @@
     subroutine Gather_Field(Field,ij,ll,rank)
     USE lmdz_mpi
-    implicit none
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
     INCLUDE "paramet.h" 
     INCLUDE "iniprint.h"
@@ -706,6 +715,7 @@
     subroutine AllGather_Field(Field,ij,ll)
     USE lmdz_mpi
-    implicit none
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
     INCLUDE "paramet.h"    
       INTEGER :: ij,ll
@@ -724,6 +734,7 @@
    subroutine Broadcast_Field(Field,ij,ll,rank)
     USE lmdz_mpi
-    implicit none
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
     INCLUDE "paramet.h"    
       INTEGER :: ij,ll
@@ -744,6 +755,7 @@
 !  Subroutine verif_hallo(Field,ij,ll,up,down)
 !    USE lmdz_mpi
-!    implicit none
-!      INCLUDE "dimensions.h"
+!    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+!
 !      INCLUDE "paramet.h"    
 !    
Index: /LMDZ6/trunk/libf/dyn3dmem/pression_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/pression_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/pression_loc.f90	(revision 5271)
@@ -12,7 +12,8 @@
   !  ************************************************************************
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   !
Index: /LMDZ6/trunk/libf/dyn3dmem/qminimum_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/qminimum_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/qminimum_loc.f90	(revision 5271)
@@ -7,10 +7,11 @@
         isoCheck, min_qParent
   USE strings_mod, ONLY: strIdx
-  IMPLICIT none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT none
   !
   !  -- Objet : Traiter les valeurs trop petites (meme negatives)
   !         pour l'eau vapeur et l'eau liquide
   !
-  include "dimensions.h"
+
   include "paramet.h"
   include "iniprint.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/rotat_nfil_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/rotat_nfil_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/rotat_nfil_loc.f90	(revision 5271)
@@ -11,7 +11,8 @@
   !
   USE parallel_lmdz
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/rotat_p.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/rotat_p.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/rotat_p.f90	(revision 5271)
@@ -11,7 +11,8 @@
   !
   USE parallel_lmdz
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/rotatf_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/rotatf_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/rotatf_loc.f90	(revision 5271)
@@ -12,7 +12,8 @@
   USE parallel_lmdz
   USE mod_filtreg_p
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/sw_case_williamson91_6_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/sw_case_williamson91_6_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/sw_case_williamson91_6_loc.f90	(revision 5271)
@@ -30,10 +30,11 @@
   USE comvert_mod, ONLY: ap, bp, preff
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !-----------------------------------------------------------------------
   !   Declararations:
   !   ---------------
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/times.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/times.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/times.f90	(revision 5271)
@@ -26,6 +26,7 @@
   subroutine init_timer
     USE parallel_lmdz
-    implicit none
-    INCLUDE "dimensions.h"
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
     INCLUDE "paramet.h"
     
Index: /LMDZ6/trunk/libf/dyn3dmem/top_bound_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/top_bound_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/top_bound_loc.f90	(revision 5271)
@@ -8,7 +8,8 @@
   USE comvert_mod, ONLY: presnivs, preff, scaleheight
 
-  IMPLICIT NONE
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   include "paramet.h"
   include "comgeom2.h"
@@ -27,5 +28,5 @@
   !   ------
   !
-  !   Dissipation linéaire (ex top_bound de la physique)
+  !   Dissipation lin�aire (ex top_bound de la physique)
   !
   !=======================================================================
Index: /LMDZ6/trunk/libf/dyn3dmem/tourpot_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/tourpot_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/tourpot_loc.f90	(revision 5271)
@@ -7,6 +7,7 @@
   USE parallel_lmdz
   USE mod_filtreg_p
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/vitvert_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/vitvert_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/vitvert_loc.f90	(revision 5271)
@@ -8,6 +8,7 @@
   USE comvert_mod, ONLY: bp
   
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
 !===============================================================================
Index: /LMDZ6/trunk/libf/dyn3dmem/vlsplt_loc.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/vlsplt_loc.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/vlsplt_loc.F90	(revision 5271)
@@ -16,7 +16,8 @@
   USE infotrac, ONLY : nqtot,tracers, & ! CRisi                 &
         min_qParent,min_qMass,min_ratio ! MVals et CRisi
-  IMPLICIT NONE
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   include "paramet.h"
   include "iniprint.h"
@@ -418,7 +419,8 @@
         min_qParent,min_qMass,min_ratio ! MVals et CRisi
   USE comconst_mod, ONLY: pi
-  IMPLICIT NONE
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   include "paramet.h"
   include "comgeom.h"
@@ -886,7 +888,8 @@
         min_qParent,min_qMass,min_ratio ! MVals et CRisi
 
-  IMPLICIT NONE
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   include "paramet.h"
   include "iniprint.h"
@@ -1207,5 +1210,5 @@
  ! SUBROUTINE minmaxq(zq,qmin,qmax,comment)
 !
-!  INCLUDE "dimensions.h"
+!  INCLUDE "dimensions_mod.f90"
 !  INCLUDE "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3dmem/vlspltgen_loc.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/vlspltgen_loc.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/vlspltgen_loc.F90	(revision 5271)
@@ -34,8 +34,9 @@
   USE logic_mod, ONLY: adv_qsat_liq
   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO
-  IMPLICIT NONE
-
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+  !
+
   include "paramet.h"
 
Index: /LMDZ6/trunk/libf/dyn3dmem/vlspltgen_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/vlspltgen_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/vlspltgen_mod.f90	(revision 5271)
@@ -16,6 +16,7 @@
   USE infotrac
   USE vlz_mod,ONLY : vlz_allocate 
-  IMPLICIT NONE
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   INCLUDE "paramet.h"
   TYPE(distrib),POINTER :: d
Index: /LMDZ6/trunk/libf/dyn3dmem/vlspltqs_loc.F90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/vlspltqs_loc.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/vlspltqs_loc.F90	(revision 5271)
@@ -14,7 +14,8 @@
   USE infotrac, ONLY : nqtot,tracers, & ! CRisi                 &
         min_qParent,min_qMass,min_ratio ! MVals et CRisi
-  IMPLICIT NONE
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   include "paramet.h"
   !
@@ -423,7 +424,8 @@
         min_qParent,min_qMass,min_ratio ! MVals et CRisi
   USE comconst_mod, ONLY: pi
-  IMPLICIT NONE
-  !
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/vlz_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/vlz_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/vlz_mod.f90	(revision 5271)
@@ -15,6 +15,5 @@
   USE parallel_lmdz
   USE infotrac
-  USE dimensions_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm  IMPLICIT NONE
   TYPE(distrib),POINTER :: d
     
Index: /LMDZ6/trunk/libf/dyn3dmem/write_field_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/write_field_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/write_field_loc.f90	(revision 5271)
@@ -37,6 +37,7 @@
     USE write_field
     USE mod_hallo
-    implicit none
-    include 'dimensions.h'
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
     include 'paramet.h'
       
@@ -102,6 +103,7 @@
     USE write_field
     USE mod_hallo
-    implicit none
-    include 'dimensions.h'
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
     include 'paramet.h'
       
Index: /LMDZ6/trunk/libf/dyn3dmem/writedyn_xios.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/writedyn_xios.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/writedyn_xios.f90	(revision 5271)
@@ -14,5 +14,6 @@
       USE mod_xios_dyn3dmem, ONLY : writefield_dyn_u, writefield_dyn_v
       
-      implicit none
+      USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 !
 !   Ecriture du fichier histoire au format xios
@@ -28,5 +29,5 @@
 !      ps   :pression au sol
 !      phis : geopotentiel au sol
-!      
+!
 !   L. Fairhead, LMD, 03/21
 !
@@ -34,5 +35,5 @@
 !
 !   Declarations
-      include "dimensions.h"
+
       include "paramet.h"
       include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/writedynav_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/writedynav_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/writedynav_loc.f90	(revision 5271)
@@ -15,5 +15,6 @@
   USE temps_mod, ONLY: itau_dyn
 
-  implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
   !
@@ -43,5 +44,5 @@
   !
   !   Declarations
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dyn3dmem/writehist_loc.f90
===================================================================
--- /LMDZ6/trunk/libf/dyn3dmem/writehist_loc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dyn3dmem/writehist_loc.f90	(revision 5271)
@@ -15,5 +15,6 @@
   USE temps_mod, ONLY: itau_dyn
 
-  implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
   !
@@ -43,5 +44,5 @@
   !
   !   Declarations
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/dynphy_lonlat/calfis.f90
===================================================================
--- /LMDZ6/trunk/libf/dynphy_lonlat/calfis.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dynphy_lonlat/calfis.f90	(revision 5271)
@@ -35,5 +35,5 @@
   USE comvert_mod, ONLY: preff, presnivs
   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_PHYS
-
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
   IMPLICIT NONE
   !=======================================================================
@@ -90,5 +90,4 @@
   !    ------------------
 
-  include "dimensions.h"
   include "paramet.h"
 
Index: /LMDZ6/trunk/libf/dynphy_lonlat/calfis_loc.F90
===================================================================
--- /LMDZ6/trunk/libf/dynphy_lonlat/calfis_loc.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dynphy_lonlat/calfis_loc.F90	(revision 5271)
@@ -50,7 +50,6 @@
   USE comconst_mod, ONLY: cpp, daysec, dtphys, dtvr, kappa, pi
   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_PHYS
-
-
 #ifdef CPP_PARA
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
   IMPLICIT NONE
   !=======================================================================
@@ -107,6 +106,4 @@
   !    0.  Declarations :
   !    ------------------
-
-  include "dimensions.h"
   include "paramet.h"
 
Index: /LMDZ6/trunk/libf/dynphy_lonlat/mod_interface_dyn_phys.F90
===================================================================
--- /LMDZ6/trunk/libf/dynphy_lonlat/mod_interface_dyn_phys.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dynphy_lonlat/mod_interface_dyn_phys.F90	(revision 5271)
@@ -13,6 +13,7 @@
   SUBROUTINE Init_interface_dyn_phys
     USE mod_phys_lmdz_mpi_data
-    IMPLICIT NONE
-    include 'dimensions.h'    
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
     
     INTEGER :: i,j,k
Index: /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/ce0l.F90
===================================================================
--- /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/ce0l.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/ce0l.F90	(revision 5271)
@@ -46,9 +46,10 @@
   USE lmdz_mpi
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
 !-------------------------------------------------------------------------------
 ! Local variables:
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/etat0dyn_netcdf.F90
===================================================================
--- /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/etat0dyn_netcdf.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/etat0dyn_netcdf.F90	(revision 5271)
@@ -41,5 +41,6 @@
   USE strings_mod, ONLY: strLower
   
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   PRIVATE
@@ -47,5 +48,5 @@
 
   include "iniprint.h"
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.f90
===================================================================
--- /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.f90	(revision 5271)
@@ -53,10 +53,9 @@
 
   USE comconst_mod, ONLY: pi, dtvr
-
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
   PRIVATE
   PUBLIC :: etat0phys_netcdf
 
   include "iniprint.h"
-  include "dimensions.h"
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90	(revision 5271)
@@ -42,5 +42,6 @@
   USE slab_heat_transp_mod, ONLY: ini_slab_transp_geom
   USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_REPROBUS
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
   ! =======================================================================
@@ -49,5 +50,5 @@
   ! =======================================================================
 
-  include "dimensions.h"
+
   include "paramet.h"
   include "iniprint.h"
Index: /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/init_ssrf_m.f90
===================================================================
--- /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/init_ssrf_m.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/init_ssrf_m.f90	(revision 5271)
@@ -12,4 +12,5 @@
   USE comconst_mod,       ONLY: im, pi
   USE surface_data,       ONLY: landice_opt
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
 
   CHARACTER(LEN=256), PARAMETER :: icefname="landiceref.nc", icevar="landice"
@@ -17,5 +18,4 @@
   PUBLIC :: start_init_subsurf
   include "iniprint.h"
-  include "dimensions.h"
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/limit_netcdf.F90
===================================================================
--- /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/limit_netcdf.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/limit_netcdf.F90	(revision 5271)
@@ -81,9 +81,10 @@
   USE phys_cal_mod, ONLY: calend
   USE lmdz_cppkeys_wrapper, ONLY: nf90_format
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 !-------------------------------------------------------------------------------
 ! Arguments:
   include "iniprint.h"
-  include "dimensions.h"
+
   include "paramet.h"
   REAL, DIMENSION(iip1,jjp1), INTENT(INOUT) :: masque ! land mask
@@ -330,6 +331,7 @@
   USE indice_sol_mod
 
-  IMPLICIT NONE
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   include "paramet.h"
   include "comgeom2.h"
Index: /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/test_disvert_m.f90
===================================================================
--- /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/test_disvert_m.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/dynphy_lonlat/phylmd/test_disvert_m.f90	(revision 5271)
@@ -1,5 +1,6 @@
 module test_disvert_m
 
-  implicit none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
 contains
@@ -18,5 +19,5 @@
 
     ! For llm:
-    include "dimensions.h"
+
 
     ! Local:
Index: /LMDZ6/trunk/libf/filtrez/eigen.f90
===================================================================
--- /LMDZ6/trunk/libf/filtrez/eigen.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/filtrez/eigen.f90	(revision 5271)
@@ -3,6 +3,7 @@
 !
 SUBROUTINE eigen( e,d)
-  IMPLICIT NONE
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
   real :: e( iim,iim ), d( iim )
   real :: asm( iim )
Index: /LMDZ6/trunk/libf/filtrez/filtreg.F90
===================================================================
--- /LMDZ6/trunk/libf/filtrez/filtreg.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/filtrez/filtreg.F90	(revision 5271)
@@ -7,5 +7,6 @@
   USE filtreg_mod
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !=======================================================================
   !
@@ -46,5 +47,5 @@
   !
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   INCLUDE "coefils.h"
Index: /LMDZ6/trunk/libf/filtrez/filtreg_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/filtrez/filtreg_mod.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/filtrez/filtreg_mod.F90	(revision 5271)
@@ -20,5 +20,6 @@
     !    ... H. Upadhyaya, O.Sharma   ...
     !
-    IMPLICIT NONE
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
     !
     !     version 3 .....
@@ -26,5 +27,5 @@
     !     Correction  le 28/10/97    P. Le Van .
     !  -------------------------------------------------------------------
-    include "dimensions.h"
+
     include "paramet.h"
     !  -------------------------------------------------------------------
Index: /LMDZ6/trunk/libf/filtrez/inifgn.F90
===================================================================
--- /LMDZ6/trunk/libf/filtrez/inifgn.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/filtrez/inifgn.F90	(revision 5271)
@@ -6,7 +6,8 @@
   !    ...  H.Upadyaya , O.Sharma  ...
   !
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  include "dimensions.h"
+
   include "paramet.h"
   include "comgeom.h"
Index: /LMDZ6/trunk/libf/filtrez/mod_fft_fftw.F90
===================================================================
--- /LMDZ6/trunk/libf/filtrez/mod_fft_fftw.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/filtrez/mod_fft_fftw.F90	(revision 5271)
@@ -18,5 +18,5 @@
   SUBROUTINE Init_fft(iim,nvectmax)
   IMPLICIT NONE
-#include <fftw3.f>
+INCLUDE <fftw3.f>
     INTEGER :: iim
     INTEGER :: nvectmax
@@ -86,5 +86,5 @@
   SUBROUTINE fft_forward(vect,TF_vect,nb_vect)
     IMPLICIT NONE
-#include <fftw3.f>
+INCLUDE <fftw3.f>
     INTEGER,INTENT(IN)     :: nb_vect
     REAL,INTENT(IN)        :: vect(vsize+inc,nb_vect)
@@ -99,5 +99,5 @@
   SUBROUTINE fft_backward(TF_vect,vect,nb_vect)
     IMPLICIT NONE
-#include <fftw3.f>
+INCLUDE <fftw3.f>
     INTEGER,INTENT(IN)     :: nb_vect
     REAL,INTENT(OUT)       :: vect(vsize+inc,nb_vect)
Index: /LMDZ6/trunk/libf/filtrez/mod_filtre_fft.F90
===================================================================
--- /LMDZ6/trunk/libf/filtrez/mod_filtre_fft.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/filtrez/mod_filtre_fft.F90	(revision 5271)
@@ -14,6 +14,7 @@
   SUBROUTINE Init_filtre_fft(coeffu,modfrstu,jfiltnu,jfiltsu,coeffv,modfrstv,jfiltnv,jfiltsv)
     USE mod_fft
-    IMPLICIT NONE
-    include 'dimensions.h'
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
     REAL,   INTENT(IN) :: coeffu(iim,jjm)
     INTEGER,INTENT(IN) :: modfrstu(jjm)
@@ -120,6 +121,7 @@
     USE parallel_lmdz,ONLY : OMP_CHUNK
 #endif
-    IMPLICIT NONE
-    include 'dimensions.h'
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
     INTEGER,INTENT(IN) :: nlat
     INTEGER,INTENT(IN) :: jj_begin
@@ -181,6 +183,7 @@
     USE parallel_lmdz,ONLY : OMP_CHUNK
 #endif
-    IMPLICIT NONE
-    INCLUDE 'dimensions.h'
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
     INTEGER,INTENT(IN) :: nlat
     INTEGER,INTENT(IN) :: jj_begin
@@ -243,6 +246,7 @@
     USE parallel_lmdz,ONLY : OMP_CHUNK
 #endif
-    IMPLICIT NONE
-    INCLUDE 'dimensions.h'
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
     INTEGER,INTENT(IN) :: nlat
     INTEGER,INTENT(IN) :: jj_begin
Index: /LMDZ6/trunk/libf/filtrez/mod_filtre_fft_loc.F90
===================================================================
--- /LMDZ6/trunk/libf/filtrez/mod_filtre_fft_loc.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/filtrez/mod_filtre_fft_loc.F90	(revision 5271)
@@ -10,6 +10,7 @@
   SUBROUTINE Init_filtre_fft(coeffu,modfrstu,jfiltnu,jfiltsu,coeffv,modfrstv,jfiltnv,jfiltsv)
     USE mod_fft
-    IMPLICIT NONE
-    include 'dimensions.h'
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
     REAL,   INTENT(IN) :: coeffu(iim,jjm)
     INTEGER,INTENT(IN) :: modfrstu(jjm)
@@ -109,6 +110,7 @@
     USE parallel_lmdz,ONLY : OMP_CHUNK
 #endif
-    IMPLICIT NONE
-    include 'dimensions.h'
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
     INTEGER,INTENT(IN) :: jjb
     INTEGER,INTENT(IN) :: jje
@@ -189,6 +191,7 @@
     USE parallel_lmdz,ONLY : OMP_CHUNK
 #endif
-    IMPLICIT NONE
-    INCLUDE 'dimensions.h'
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
     INTEGER,INTENT(IN) :: jjb
     INTEGER,INTENT(IN) :: jje
@@ -252,6 +255,7 @@
     USE parallel_lmdz,ONLY : OMP_CHUNK
 #endif
-    IMPLICIT NONE
-    INCLUDE 'dimensions.h'
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
     INTEGER,INTENT(IN) :: jjb
     INTEGER,INTENT(IN) :: jje
Index: /LMDZ6/trunk/libf/grid/dimension/makdim
===================================================================
--- /LMDZ6/trunk/libf/grid/dimension/makdim	(revision 5270)
+++ /LMDZ6/trunk/libf/grid/dimension/makdim	(revision 5271)
@@ -1,8 +1,7 @@
 #!/bin/bash
-#set -xv
+set -eu
 
 # sanity check: do we have the required argument ?
-if (( $# < 1 )) || (( $# > 3 ))
-then
+if (( $# < 1 )) || (( $# > 3 )); then
     echo "Wrong number of parameters in $0 !!!"
     echo " Usage:"
@@ -12,6 +11,5 @@
 fi
 
-if ( (( $1 % 8 != 0 )) && (( $# == 3 )) || (( $1 == 1 )) )
-then
+if ( (( $1 % 8 != 0 )) && (( $# == 3 )) || (( $1 == 1 )) ); then
     echo "The number of longitudes must be a multiple of 8."
     echo "See the files dyn3d/groupe.F and dyn3dmem/groupe_loc.F."
@@ -20,29 +18,21 @@
 
 # build "fichnom", the relevant 'dimensions.im.jm.lm' file name
-for i in $*
-do
-    list=$list.$i
-done
+list=""
+for i in "$@"; do list=$list.$i; done
 fichdim=dimensions${list}
 
-if [ ! -f $fichdim ]
-then
-#    echo "$fichdim does not exist"
-
+if [[ ! -f $fichdim ]]; then
     # assign values of im, jm and lm
-    if [ $# -ge 3 ]
-    then
+    if [ $# -ge 3 ]; then
         im=$1
         jm=$2
         lm=$3
         ndm=1
-    elif [ $# -ge 2 ]
-    then
+    elif [ $# -ge 2 ]; then
         im=1
         jm=$1
         lm=$2
         ndm=1
-    elif [ $# -ge 1 ]
-    then
+    elif [ $# -ge 1 ]; then
         im=1
         jm=1
@@ -52,25 +42,22 @@
 
 # since the file doesn't exist, we create it
-    cat << EOF > $fichdim
-!-----------------------------------------------------------------------
-!   INCLUDE 'dimensions.h'
-!
-!   dimensions.h contient les dimensions du modele
-!   ndm est tel que iim=2**ndm
-!-----------------------------------------------------------------------
+    cat << EOF > "$fichdim"
+! This module was automatically generated during the installation of LMDZ
+! It contains the spatial resolution of the model
 
-      INTEGER iim,jjm,llm,ndm
+MODULE dimensions_mod
+  IMPLICIT NONE; PRIVATE
+  PUBLIC iim, jjm, llm, ndm
+  ! ndm is computed such that iim=2**ndm
 
-      PARAMETER (iim= $im,jjm=$jm,llm=$lm,ndm=$ndm)
-
-!-----------------------------------------------------------------------
+  INTEGER, PARAMETER :: iim = $im, jjm = $jm, llm = $lm, ndm = $ndm
+END MODULE dimensions_mod
 EOF
-
 fi
 
-# remove 'old' dimensions.h file (if any) and replace it with new one
-if [ -f ../dimensions.h ] ; then
-    \rm ../dimensions.h
+# remove 'old' dimensions_mod.f90 file (if any) and replace it with new one
+if [[ -f ../dimensions_mod.f90 ]]; then
+    rm ../dimensions_mod.f90
 fi
-tar cf - $fichdim | ( cd .. ; tar xf - ; mv $fichdim dimensions.h )
-# line above is a trick to preserve time of creation of dimensions.h files
+tar cf - "$fichdim" | ( cd .. ; tar xf - ; mv "$fichdim" dimensions_mod.f90 )
+# line above is a trick to preserve time of creation of dimensions_mod.f90 files
Index: /LMDZ6/trunk/libf/misc/lmdz_reprobus_wrappers.F90
===================================================================
--- /LMDZ6/trunk/libf/misc/lmdz_reprobus_wrappers.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/misc/lmdz_reprobus_wrappers.F90	(revision 5271)
@@ -6,7 +6,7 @@
   USE CHEM_REP, ONLY: init_chem_rep_trac, itroprep
 #else
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
 
   ! TODO ugly temp solution until we properly wrap the REPROBUS code
-  INCLUDE "dimensions.h"
   INTEGER :: itroprep(iim), iter, ndimozon
   REAL :: rsuntime(2), pdt_rep, daynum, solaireTIME, ptrop(iim), ttrop(iim), ztrop(iim), gravit, Z1, &
Index: /LMDZ6/trunk/libf/phylmd/Dust/aeropt_spl.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/aeropt_spl.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/aeropt_spl.f90	(revision 5271)
@@ -10,8 +10,9 @@
   USE dimphy
   USE infotrac
-  IMPLICIT none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT none
   !
   INCLUDE "chem.h"
-  INCLUDE "dimensions.h"
+
   !INCLUDE "dimphy.h"
   INCLUDE "YOMCST.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/bcscav_spl.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/bcscav_spl.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/bcscav_spl.f90	(revision 5271)
@@ -2,5 +2,6 @@
 
   USE dimphy
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !=====================================================================
   ! Objet : below-cloud scavenging of tracers
@@ -9,5 +10,5 @@
   !=====================================================================
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "chem.h"
   INCLUDE "YOMCST.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/bl_for_dms.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/bl_for_dms.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/bl_for_dms.f90	(revision 5271)
@@ -2,5 +2,6 @@
         ,t,q,tsol,ustar,obklen)
   USE dimphy
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
   !===================================================================
@@ -17,5 +18,5 @@
   !===================================================================
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "YOMCST.h"
   INCLUDE "YOETHF.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/blcloud_scav.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/blcloud_scav.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/blcloud_scav.f90	(revision 5271)
@@ -8,7 +8,8 @@
   USE indice_sol_mod
   USE infotrac
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "chem.h"
   INCLUDE "YOMCST.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/blcloud_scav_lsc.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/blcloud_scav_lsc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/blcloud_scav_lsc.f90	(revision 5271)
@@ -8,7 +8,8 @@
   USE indice_sol_mod
   USE infotrac
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "chem.h"
   INCLUDE "YOMCST.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/cltrac_spl.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/cltrac_spl.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/cltrac_spl.f90	(revision 5271)
@@ -3,5 +3,6 @@
 
   USE dimphy
-  IMPLICIT none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT none
   !======================================================================
   ! Auteur(s): O. Boucher (LOA/LMD) date: 19961127
@@ -26,5 +27,5 @@
   ! flux_tr--output-R- flux de tr
   !======================================================================
-  INCLUDE "dimensions.h"
+
   REAL :: dtime
   REAL :: coef(klon,klev)
Index: /LMDZ6/trunk/libf/phylmd/Dust/cm3_to_kg.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/cm3_to_kg.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/cm3_to_kg.f90	(revision 5271)
@@ -5,7 +5,8 @@
   USE indice_sol_mod
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "YOMCST.h"
   !
Index: /LMDZ6/trunk/libf/phylmd/Dust/coarsemission.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/coarsemission.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/coarsemission.f90	(revision 5271)
@@ -31,7 +31,8 @@
   USE dustemission_mod,  ONLY : dustemission
    ! USE phytracr_spl_mod, ONLY : nbreg_dust, nbreg_ind, nbreg_bb
-  IMPLICIT NONE
-
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
   INCLUDE "chem.h"
   INCLUDE "chem_spla.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/condsurfc.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/condsurfc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/condsurfc.f90	(revision 5271)
@@ -5,10 +5,11 @@
   USE dimphy
   USE netcdf, ONLY: nf90_close, nf90_noerr, nf90_inq_varid, nf90_open, nf90_nowrite, nf90_get_var
-  IMPLICIT none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT none
   !
   ! Lire les conditions aux limites du modele pour la chimie.
   ! --------------------------------------------------------
   !
-  INCLUDE "dimensions.h"
+
 
   REAL :: lmt_bcff(klon), lmt_bcbb(klon),lmt_bc_penner(klon)
Index: /LMDZ6/trunk/libf/phylmd/Dust/condsurfc_new.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/condsurfc_new.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/condsurfc_new.f90	(revision 5271)
@@ -7,10 +7,11 @@
   USE dimphy
   USE netcdf, ONLY: nf90_get_var, nf90_close, nf90_noerr, nf90_inq_varid, nf90_open, nf90_nowrite
-  IMPLICIT none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT none
   !
   ! Lire les conditions aux limites du modele pour la chimie.
   ! --------------------------------------------------------
   !
-  INCLUDE "dimensions.h"
+
 
   REAL :: lmt_bcff(klon), lmt_bcnff(klon), lmt_bcba(klon)
Index: /LMDZ6/trunk/libf/phylmd/Dust/condsurfs.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/condsurfs.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/condsurfs.f90	(revision 5271)
@@ -6,10 +6,11 @@
    USE netcdf, ONLY: nf90_close, nf90_noerr, nf90_inq_varid, nf90_open, &
           nf90_nowrite, nf90_get_var
-  IMPLICIT none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT none
   !
   ! Lire les conditions aux limites du modele pour la chimie.
   ! --------------------------------------------------------
   !
-  INCLUDE "dimensions.h"
+
   !
   REAL :: lmt_so2h(klon), lmt_so2b(klon), lmt_so2bb(klon)
Index: /LMDZ6/trunk/libf/phylmd/Dust/condsurfs_new.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/condsurfs_new.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/condsurfs_new.f90	(revision 5271)
@@ -10,10 +10,11 @@
   USE dimphy
   USE netcdf, ONLY: nf90_get_var, nf90_inq_varid, nf90_close, nf90_noerr, nf90_open, nf90_nowrite
-  IMPLICIT none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT none
   !
   ! Lire les conditions aux limites du modele pour la chimie.
   ! --------------------------------------------------------
   !
-  INCLUDE "dimensions.h"
+
   !
   REAL :: lmt_so2b(klon), lmt_so2h(klon), lmt_so2nff(klon)
Index: /LMDZ6/trunk/libf/phylmd/Dust/deposition.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/deposition.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/deposition.f90	(revision 5271)
@@ -10,7 +10,8 @@
   USE indice_sol_mod
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "chem.h"
   INCLUDE "YOMCST.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/finemission.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/finemission.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/finemission.f90	(revision 5271)
@@ -15,7 +15,8 @@
   USE infotrac
    ! USE phytracr_spl_mod, ONLY : nbreg_dust, nbreg_ind, nbreg_bb
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "chem.h"
   INCLUDE "YOMCST.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/gastoparticle.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/gastoparticle.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/gastoparticle.f90	(revision 5271)
@@ -8,7 +8,8 @@
    ! USE indice_sol_mod
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "chem.h"
   INCLUDE "chem_spla.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/incloud_scav.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/incloud_scav.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/incloud_scav.f90	(revision 5271)
@@ -9,7 +9,8 @@
   USE indice_sol_mod
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "chem.h"
   INCLUDE "YOMCST.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/incloud_scav_lsc.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/incloud_scav_lsc.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/incloud_scav_lsc.f90	(revision 5271)
@@ -9,7 +9,8 @@
   USE indice_sol_mod
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "chem.h"
   INCLUDE "YOMCST.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/inscav_spl.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/inscav_spl.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/inscav_spl.f90	(revision 5271)
@@ -3,5 +3,6 @@
         his_dh)
   USE dimphy
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !=====================================================================
   ! Objet : depot humide de traceurs
@@ -10,5 +11,5 @@
   !=====================================================================
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "chem.h"
   INCLUDE "YOMCST.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/kg_to_cm3.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/kg_to_cm3.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/kg_to_cm3.f90	(revision 5271)
@@ -3,7 +3,8 @@
   USE dimphy
   USE infotrac
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "YOMCST.h"
   !
Index: /LMDZ6/trunk/libf/phylmd/Dust/lsc_scav_orig.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/lsc_scav_orig.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/lsc_scav_orig.f90	(revision 5271)
@@ -13,5 +13,6 @@
   USE iophy
 
-  IMPLICIT NONE 
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 !=====================================================================
 ! Objet : depot humide (lessivage et evaporation) de traceurs
@@ -21,5 +22,5 @@
 !=====================================================================
 
-  include "dimensions.h"
+
   include "chem.h"
   include "YOMCST.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/lsc_scav_spl.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/lsc_scav_spl.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/lsc_scav_spl.f90	(revision 5271)
@@ -14,5 +14,6 @@
 !  USE comgeomphy
   USE iophy
-  IMPLICIT NONE 
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 !=====================================================================
 ! Objet : depot humide (lessivage et evaporation) de traceurs
@@ -23,5 +24,5 @@
 ! SPLA version taken from trunk revision 2041
 
-  include "dimensions.h"
+
   include "chem.h"
   include "YOMCST.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/minmaxqfi2.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/minmaxqfi2.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/minmaxqfi2.f90	(revision 5271)
@@ -3,5 +3,5 @@
   USE dimphy
   USE infotrac
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
 
    ! character*20 comment
Index: /LMDZ6/trunk/libf/phylmd/Dust/minmaxsource.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/minmaxsource.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/minmaxsource.f90	(revision 5271)
@@ -3,6 +3,5 @@
   USE dimphy
   USE infotrac
-
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
 
    ! character*20 comment
Index: /LMDZ6/trunk/libf/phylmd/Dust/neutral.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/neutral.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/neutral.f90	(revision 5271)
@@ -28,5 +28,5 @@
   !
   USE dimphy
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
   !
     real :: u10_mps(klon),ustar_mps(klon),obklen_m(klon)
Index: /LMDZ6/trunk/libf/phylmd/Dust/nightingale.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/nightingale.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/nightingale.f90	(revision 5271)
@@ -5,7 +5,8 @@
   USE dimphy
   USE indice_sol_mod
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "YOMCST.h"
   !
Index: /LMDZ6/trunk/libf/phylmd/Dust/phys_output_write_spl_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/phys_output_write_spl_mod.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/phys_output_write_spl_mod.F90	(revision 5271)
@@ -396,5 +396,6 @@
     USE phys_cal_mod, ONLY : mth_len
 
-    IMPLICIT NONE
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
 !   INCLUDE "temps.h"
@@ -403,5 +404,5 @@
     INCLUDE "compbl.h"
     INCLUDE "YOMCST.h"
-    INCLUDE "dimensions.h"
+
     include "iniprint.h"
 
Index: /LMDZ6/trunk/libf/phylmd/Dust/phytracr_spl_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/phytracr_spl_mod.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/phytracr_spl_mod.F90	(revision 5271)
@@ -807,5 +807,5 @@
       USE phys_cal_mod, only: jD_1jan,year_len, mth_len, days_elapsed, jh_1jan, year_cur, &
                               mth_cur, phys_cal_update
-
+      USE dimensions_mod, ONLY: iim, jjm, llm, ndm
 !
       IMPLICIT none
@@ -823,5 +823,4 @@
 !!   et c'est encore different avec le parser de DC ?
 !======================================================================
-      INCLUDE "dimensions.h"
       INCLUDE "chem.h"
       INCLUDE "chem_spla.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/precuremission.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/precuremission.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/precuremission.f90	(revision 5271)
@@ -20,7 +20,8 @@
   USE infotrac
    ! USE phytracr_spl_mod, ONLY : nbreg_dust, nbreg_ind, nbreg_bb
-  IMPLICIT NONE
-
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
   INCLUDE "chem.h"
   INCLUDE "chem_spla.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/read_dust.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/read_dust.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/read_dust.f90	(revision 5271)
@@ -4,7 +4,8 @@
   USE mod_phys_lmdz_para
   USE netcdf, ONLY: nf90_get_var, nf90_nowrite, nf90_open, nf90_inq_varid
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "paramet.h"
   !
Index: /LMDZ6/trunk/libf/phylmd/Dust/read_newemissions.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/read_newemissions.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/read_newemissions.f90	(revision 5271)
@@ -23,8 +23,9 @@
   USE mod_phys_lmdz_para
 
-  IMPLICIT NONE
-
-
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
+
    ! INCLUDE 'dimphy.h'
   INCLUDE 'paramet.h'
Index: /LMDZ6/trunk/libf/phylmd/Dust/read_surface.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/read_surface.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/read_surface.f90	(revision 5271)
@@ -11,6 +11,7 @@
        USE iophy
        USE netcdf, ONLY: nf90_inq_varid,nf90_noerr,nf90_get_var,nf90_nowrite,nf90_inq_varid,nf90_open
-       IMPLICIT NONE
-       INCLUDE "dimensions.h"
+       USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
        INCLUDE "paramet.h"
 
Index: /LMDZ6/trunk/libf/phylmd/Dust/read_vent.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/read_vent.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/read_vent.f90	(revision 5271)
@@ -5,6 +5,7 @@
   USE netcdf, ONLY: nf90_get_var, nf90_open, nf90_inq_varid, nf90_nowrite
    ! USE write_field_phy
-  IMPLICIT NONE
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
     ! INCLUDE "dimphy.h"
   INCLUDE "paramet.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/seasalt.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/seasalt.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/seasalt.f90	(revision 5271)
@@ -5,7 +5,8 @@
 
   USE dimphy
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
   !
-  INCLUDE "dimensions.h"
+
   INCLUDE "chem.h"
   INCLUDE "chem_spla.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/sediment_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/sediment_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/sediment_mod.f90	(revision 5271)
@@ -10,7 +10,8 @@
    USE dimphy
    USE infotrac
-  IMPLICIT NONE
-  !
-  INCLUDE "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+  !
+
   INCLUDE "chem.h"
     ! INCLUDE "dimphy.h"
Index: /LMDZ6/trunk/libf/phylmd/Dust/tiedqneg.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/tiedqneg.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/tiedqneg.f90	(revision 5271)
@@ -2,5 +2,6 @@
   !
   USE dimphy
-  IMPLICIT none
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT none
   !======================================================================
   ! Auteur(s): CG (LGGE/CNRS) date: 19950201
@@ -15,5 +16,5 @@
   !======================================================================
   !
-  INCLUDE "dimensions.h"
+
     ! INCLUDE "dimphy.h"
   REAL :: pres_h(klon,klev+1)
Index: /LMDZ6/trunk/libf/phylmd/Dust/trconvect.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/trconvect.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/Dust/trconvect.f90	(revision 5271)
@@ -8,7 +8,8 @@
   USE indice_sol_mod
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "chem.h"
   INCLUDE "YOMCST.h"
Index: /LMDZ6/trunk/libf/phylmd/StratAer/calcaerosolstrato_rrtm.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/StratAer/calcaerosolstrato_rrtm.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/StratAer/calcaerosolstrato_rrtm.f90	(revision 5271)
@@ -11,7 +11,8 @@
   USE yomcst_mod_h
 
-  IMPLICIT NONE
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 
-  INCLUDE "dimensions.h"
+
   INCLUDE "clesphys.h"
   INCLUDE "paramet.h"
Index: /LMDZ6/trunk/libf/phylmd/StratAer/interp_sulf_input.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/StratAer/interp_sulf_input.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/StratAer/interp_sulf_input.f90	(revision 5271)
@@ -21,7 +21,8 @@
   USE strataer_local_var_mod, ONLY : flag_newclim_file,flag_verbose_strataer
 
-  IMPLICIT NONE
-
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
 
 ! Variable input
Index: /LMDZ6/trunk/libf/phylmd/StratAer/stratH2O_methox.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/StratAer/stratH2O_methox.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/StratAer/stratH2O_methox.f90	(revision 5271)
@@ -22,7 +22,8 @@
   USE strataer_local_var_mod, ONLY : flag_newclim_file
   
-  IMPLICIT NONE
-  
-  include "dimensions.h"
+  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
   
 ! Input variables
Index: /LMDZ6/trunk/libf/phylmd/acama_gwd_rando_m.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/acama_gwd_rando_m.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/acama_gwd_rando_m.f90	(revision 5271)
@@ -29,5 +29,5 @@
     include "clesphys.h"
 !  OFFLINE:
-!   include "dimensions.h"
+!   include "dimensions_mod.f90"
 !   include "dimphy.h"
 !END DIFFERENCE
Index: /LMDZ6/trunk/libf/phylmd/carbon_cycle_mod.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/carbon_cycle_mod.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/carbon_cycle_mod.f90	(revision 5271)
@@ -225,7 +225,8 @@
     USE print_control_mod, ONLY: lunout
 
-    IMPLICIT NONE
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
     INCLUDE "clesphys.h"
- 
+
 ! Local variables
     INTEGER               :: ierr
@@ -286,5 +287,5 @@
 !=======================================================================
 !
-!   Authors: Patricia Cadule and Laurent Fairhead  
+!   Authors: Patricia Cadule and Laurent Fairhead
 !   -------
 !
@@ -313,5 +314,5 @@
 ! field name         coupling          model 1         model 2         long_name
 !                    direction
-!   10char  -3spaces-  3char  -3spaces- 4char -3spaces- 4char -3spaces-  30char 
+!   10char  -3spaces-  3char  -3spaces- 4char -3spaces- 4char -3spaces-  30char
 !
 ! n
@@ -321,6 +322,6 @@
 ! FIELD(j+1) OUT LMDZ ORC
 ! ...
-! FIELDn OUT LMDZ ORC   
-! 
+! FIELDn OUT LMDZ ORC
+!
 !=======================================================================
 !   ... 22/12/2017 ....
@@ -329,5 +330,5 @@
 
   INCLUDE "clesphys.h"
-  INCLUDE "dimensions.h"
+
   INCLUDE "iniprint.h"
 
Index: /LMDZ6/trunk/libf/phylmd/cosp/mod_cosp.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/cosp/mod_cosp.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/cosp/mod_cosp.F90	(revision 5271)
@@ -23,5 +23,5 @@
 ! OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-#include "cosp_defs.h"
+INCLUDE "cosp_defs.h"
 MODULE MOD_COSP
   USE MOD_COSP_TYPES
Index: /LMDZ6/trunk/libf/phylmd/cosp/mod_cosp_constants.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/cosp/mod_cosp_constants.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/cosp/mod_cosp_constants.F90	(revision 5271)
@@ -33,5 +33,5 @@
 ! 
 
-!!#INCLUDE "cosp_defs.h"
+!!INCLUDE "cosp_defs.h"
 #define MMF_V3_SINGLE_MOMENT mmf_v3_single_momen
 MODULE MOD_COSP_CONSTANTS
Index: /LMDZ6/trunk/libf/phylmd/cosp/mod_cosp_simulator.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/cosp/mod_cosp_simulator.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/cosp/mod_cosp_simulator.F90	(revision 5271)
@@ -31,5 +31,5 @@
 !
 
-#include "cosp_defs.h" 
+INCLUDE "cosp_defs.h"
 MODULE MOD_COSP_SIMULATOR
   USE MOD_COSP_CONSTANTS, ONLY: I_RADAR, I_LIDAR, I_ISCCP, I_MISR, I_MODIS, &
Index: /LMDZ6/trunk/libf/phylmd/cosp/mod_cosp_stats.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/cosp/mod_cosp_stats.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/cosp/mod_cosp_stats.F90	(revision 5271)
@@ -36,5 +36,5 @@
 !
 !
-#include "cosp_defs.h" 
+INCLUDE "cosp_defs.h"
 MODULE MOD_COSP_STATS
   USE MOD_COSP_CONSTANTS
Index: /LMDZ6/trunk/libf/phylmd/cosp/phys_cosp.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/cosp/phys_cosp.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/cosp/phys_cosp.F90	(revision 5271)
@@ -73,5 +73,5 @@
 
 !! AI rajouter
-#include "cosp_defs.h" 
+INCLUDE "cosp_defs.h"
   USE MOD_COSP_CONSTANTS
   USE MOD_COSP_TYPES
Index: /LMDZ6/trunk/libf/phylmd/dyn1d/1DUTILS.h
===================================================================
--- /LMDZ6/trunk/libf/phylmd/dyn1d/1DUTILS.h	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/dyn1d/1DUTILS.h	(revision 5271)
@@ -1,3 +1,3 @@
-#include "conf_gcm.f90"
+INCLUDE "conf_gcm.f90"
 
 !
@@ -18,9 +18,9 @@
 !   --------------
 
-#include "compar1d.h"
-#include "flux_arp.h"
-#include "tsoilnudge.h"
-#include "fcg_gcssold.h"
-#include "fcg_racmo.h"
+INCLUDE "compar1d.h"
+INCLUDE "flux_arp.h"
+INCLUDE "tsoilnudge.h"
+INCLUDE "fcg_gcssold.h"
+INCLUDE "fcg_racmo.h"
 !
 !
@@ -670,5 +670,6 @@
       USE temps_mod, ONLY: annee_ref, day_ini, day_ref, itau_dyn
 
-      IMPLICIT NONE
+      USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 !=======================================================
 ! Ecriture du fichier de redemarrage sous format NetCDF
@@ -676,6 +677,6 @@
 !   Declarations:
 !   -------------
-      include "dimensions.h"
-!!#include "control.h"
+
+!!INCLUDE "control.h"
 
 !   Arguments:
@@ -816,5 +817,6 @@
       USE temps_mod, ONLY: annee_ref,day_end,day_ref,itau_dyn,itaufin
 
-      IMPLICIT NONE
+      USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 !=======================================================
 ! Ecriture du fichier de redemarrage sous format NetCDF
@@ -822,6 +824,6 @@
 !   Declarations:
 !   -------------
-      include "dimensions.h"
-!!#include "control.h"
+
+!!INCLUDE "control.h"
 
 !   Arguments:
@@ -1128,7 +1130,8 @@
 !    Auteur :  P. Le Van .
 !
-      IMPLICIT NONE
- 
-      include "dimensions.h"
+      USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
+
+
       include "paramet.h"
 !
@@ -1348,5 +1351,5 @@
 !----------------------------------------------------------------------  
         implicit none
-#include "YOMCST.h"
+INCLUDE "YOMCST.h"
 !        argument
         integer llm
@@ -1422,5 +1425,5 @@
 !----------------------------------------------------------------------  
         implicit none
-#include "YOMCST.h"
+INCLUDE "YOMCST.h"
 !        argument
         integer llm,nqtot
@@ -1741,8 +1744,9 @@
      &         ,dth_mod_cas,hth_mod_cas,vth_mod_cas,mxcalc)
  
-       implicit none
- 
-#include "YOMCST.h"
-#include "dimensions.h"
+       USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
+INCLUDE "YOMCST.h"
+
 
 !-------------------------------------------------------------------------
Index: /LMDZ6/trunk/libf/phylmd/dyn1d/1Dconv.h
===================================================================
--- /LMDZ6/trunk/libf/phylmd/dyn1d/1Dconv.h	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/dyn1d/1Dconv.h	(revision 5271)
@@ -459,7 +459,8 @@
      &                     ,d_t_adv,d_q_adv)
       use dimphy
-      implicit none
-
-      INCLUDE "dimensions.h"
+      USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
+
 !cccc      INCLUDE "dimphy.h"
 
Index: /LMDZ6/trunk/libf/phylmd/dyn1d/lmdz1d.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/dyn1d/lmdz1d.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/dyn1d/lmdz1d.F90	(revision 5271)
@@ -3,8 +3,8 @@
 !
 !#ifdef CPP_1D
-!#include "../dyn3d/mod_const_mpi.F90"
-!#include "../dyn3d_common/control_mod.F90"
-!#include "../dyn3d_common/infotrac.F90"
-!#include "../dyn3d_common/disvert.F90"
+!INCLUDE "../dyn3d/mod_const_mpi.F90"
+!INCLUDE "../dyn3d_common/control_mod.F90"
+!INCLUDE "../dyn3d_common/infotrac.F90"
+!INCLUDE "../dyn3d_common/disvert.F90"
 
 
@@ -26,6 +26,6 @@
 
 
-#include "1DUTILS.h"
-#include "1Dconv.h"
+INCLUDE "1DUTILS.h"
+INCLUDE "1Dconv.h"
 
 !#endif
Index: /LMDZ6/trunk/libf/phylmd/dyn1d/mod_1D_cases_read_std.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/dyn1d/mod_1D_cases_read_std.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/dyn1d/mod_1D_cases_read_std.f90	(revision 5271)
@@ -931,8 +931,9 @@
        ,dth_mod_cas,hth_mod_cas,vth_mod_cas,mxcalc)
 
-    implicit none
+    USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
     INCLUDE "YOMCST.h"
-    INCLUDE "dimensions.h"
+
 
     !-------------------------------------------------------------------------
Index: /LMDZ6/trunk/libf/phylmd/dyn1d/old_1DUTILS_read_interp.h
===================================================================
--- /LMDZ6/trunk/libf/phylmd/dyn1d/old_1DUTILS_read_interp.h	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/dyn1d/old_1DUTILS_read_interp.h	(revision 5271)
@@ -542,7 +542,8 @@
      &         ,omega_mod,o3mmr_mod,mxcalc)
 
-       implicit none
-
-      INCLUDE "dimensions.h"
+       USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
+
 
 !-------------------------------------------------------------------------
@@ -656,7 +657,8 @@
      &         ,tke_mod,o3mmr_mod,mxcalc)
 
-       implicit none
-
-      INCLUDE "dimensions.h"
+       USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
+
 
 !-------------------------------------------------------------------------
@@ -775,10 +777,11 @@
      &             ,ts_rico,t_rico,q_rico,u_rico,v_rico,w_rico             &
      &             ,dth_dyn,dqh_dyn)
-      implicit none
+      USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
 !-------------------------------------------------------------------------
-! Read RICO forcing data 
+! Read RICO forcing data
 !-------------------------------------------------------------------------
-      INCLUDE "dimensions.h"
+
 
 
@@ -1054,7 +1057,8 @@
      &         ,ht_mod,vt_mod,hq_mod,vq_mod,mxcalc)
  
-       implicit none
- 
-      INCLUDE "dimensions.h"
+       USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
+
 
 !-------------------------------------------------------------------------
@@ -1176,7 +1180,8 @@
      &         ,dt_mod_cas,ht_mod_cas,vt_mod_cas,dtrad_mod_cas,dq_mod_cas,hq_mod_cas,vq_mod_cas,mxcalc)
  
-       implicit none
- 
-       INCLUDE "dimensions.h"
+       USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
+
 
 !-------------------------------------------------------------------------
@@ -1335,7 +1340,8 @@
      &         ,ht_mod,hq_mod,hu_mod,hv_mod,w_mod,omega_mod,mxcalc)
  
-       implicit none
- 
-       INCLUDE "dimensions.h"
+       USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
+
 
 !-------------------------------------------------------------------------
Index: /LMDZ6/trunk/libf/phylmd/dyn1d/old_lmdz1d.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/dyn1d/old_lmdz1d.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/dyn1d/old_lmdz1d.f90	(revision 5271)
@@ -48,6 +48,7 @@
    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_OUTPUTPHYSSCM
 
-      implicit none
-      INCLUDE "dimensions.h"
+      USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
       INCLUDE "YOMCST.h"
 !!      INCLUDE "control.h"
Index: /LMDZ6/trunk/libf/phylmd/dyn1d/replay1d.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/dyn1d/replay1d.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/dyn1d/replay1d.f90	(revision 5271)
@@ -10,6 +10,7 @@
 
 
-      implicit none
-      INCLUDE "dimensions.h"
+      USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
 
 real :: airefi
Index: /LMDZ6/trunk/libf/phylmd/dyn1d/scm.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/dyn1d/scm.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/dyn1d/scm.f90	(revision 5271)
@@ -44,6 +44,7 @@
    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_OUTPUTPHYSSCM
 
-      implicit none
-      INCLUDE "dimensions.h"
+      USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
       INCLUDE "YOMCST.h"
 !!      INCLUDE "control.h"
Index: /LMDZ6/trunk/libf/phylmd/flott_gwd_rando_m.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/flott_gwd_rando_m.f90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/flott_gwd_rando_m.f90	(revision 5271)
@@ -29,5 +29,5 @@
       include "clesphys.h"
     ! OFFLINE:
-    ! include "dimensions.h"
+    ! include "dimensions_mod.f90"
     ! include "dimphy.h"
     ! END OF DIFFERENCE ONLINE-OFFLINE
Index: /LMDZ6/trunk/libf/phylmd/infotrac_phy.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/infotrac_phy.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmd/infotrac_phy.F90	(revision 5271)
@@ -133,5 +133,6 @@
    USE lmdz_reprobus_wrappers, ONLY: Init_chem_rep_trac
    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_REPROBUS, CPPKEY_STRATAER
-   IMPLICIT NONE
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+IMPLICIT NONE
 !==============================================================================================================================
 !
@@ -153,5 +154,5 @@
 !------------------------------------------------------------------------------------------------------------------------------
 ! Declarations:
-   INCLUDE "dimensions.h"
+
    INCLUDE "iniprint.h"
 
Index: /LMDZ6/trunk/libf/phylmdiso/cv30_routines.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmdiso/cv30_routines.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmdiso/cv30_routines.F90	(revision 5271)
@@ -6360,7 +6360,7 @@
         ! Toutes les autres variables fn de ep sont calculees plus bas.
 
-#include "cvthermo.h"
-#include "cv30param.h"
-#include "conema3.h"
+INCLUDE "cvthermo.h"
+INCLUDE "cv30param.h"
+INCLUDE "conema3.h"
 
 ! inputs:
Index: /LMDZ6/trunk/libf/phylmdiso/isotopes_routines_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmdiso/isotopes_routines_mod.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmdiso/isotopes_routines_mod.F90	(revision 5271)
@@ -28,5 +28,5 @@
 implicit none
 
-#include "YOMCST.h"       
+INCLUDE "YOMCST.h"
 
 ! inputs
@@ -12969,5 +12969,6 @@
     USE isotrac_mod, ONLY: izone_cont,index_zone,index_iso
 #endif
-        implicit none
+        USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
 
         ! gestion de la neige: on precipte dessus, sublime, effondre,
@@ -12975,9 +12976,9 @@
         ! commun aux dfférentes sous-surfaces.
 
-#include "YOETHF.h" 
-#include "FCTTRE.h"   
-#include "YOMCST.h"
-!#include "dimensions.h"
-!#include "paramet.h"
+INCLUDE "YOETHF.h"
+INCLUDE "FCTTRE.h"
+INCLUDE "YOMCST.h"
+!
+!INCLUDE "paramet.h"
 
          ! inputs
@@ -13543,7 +13544,7 @@
         implicit none
 
-#include "YOETHF.h"         
-#include "FCTTRE.h"   
-#include "YOMCST.h"
+INCLUDE "YOETHF.h"
+INCLUDE "FCTTRE.h"
+INCLUDE "YOMCST.h"
         
         ! inputs
@@ -14456,11 +14457,12 @@
 #endif
 
-        implicit none
-
-#include "YOETHF.h" 
-#include "FCTTRE.h"   
-#include "YOMCST.h"
-!#include "dimensions.h"
-!#include "paramet.h"
+        USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
+INCLUDE "YOETHF.h"
+INCLUDE "FCTTRE.h"
+INCLUDE "YOMCST.h"
+!
+!INCLUDE "paramet.h"
         
         ! inputs
@@ -15875,7 +15877,7 @@
       ! equivalent de phyetat0 pour les isotopes  
 
-#include "dimsoil.h"
-#include "clesphys.h"
-#include "compbl.h"      
+INCLUDE "dimsoil.h"
+INCLUDE "clesphys.h"
+INCLUDE "compbl.h"
 
 !#ifdef ISOVERIF
@@ -16050,8 +16052,8 @@
         implicit none
 
-#include "dimsoil.h"
-#include "clesphys.h"
-!  #include "thermcell.h"
-#include "compbl.h"
+INCLUDE "dimsoil.h"
+INCLUDE "clesphys.h"
+!  INCLUDE "thermcell.h"
+INCLUDE "compbl.h"
 
         ! arguments  
@@ -16427,7 +16429,7 @@
    IMPLICIT NONE
 
-#include "dimsoil.h"
-#include "clesphys.h"
-#include "compbl.h"    
+INCLUDE "dimsoil.h"
+INCLUDE "clesphys.h"
+INCLUDE "compbl.h"
 
    REAL, INTENT(IN) ::             snow     (klon,nbsrf)
@@ -16638,5 +16640,5 @@
       implicit none
 
-#include "YOMCST.h"
+INCLUDE "YOMCST.h"
 
 ! input
@@ -18234,8 +18236,9 @@
         USE isotopes_verif_mod
 #endif
-      implicit none
-
-#include "YOMCST.h"
-#include "dimensions.h"
+      USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+implicit none
+
+INCLUDE "YOMCST.h"
+
 ! pour avoir iim et jjm
 
@@ -18379,5 +18382,5 @@
       implicit none
 
-#include "YOMCST.h"
+INCLUDE "YOMCST.h"
 
 !     Arguments
@@ -18543,5 +18546,5 @@
         ! normallement, niso en dimension suffirait, mais serait pas
         ! cohérent avec les dimensions dans condiso_liq_ice
-!#include "iso_verif.h"
+!INCLUDE "iso_verif.h"
 
         ! verif que qt n'est pas nul
Index: /LMDZ6/trunk/libf/phylmdiso/phyredem.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmdiso/phyredem.F90	(revision 5270)
+++ /LMDZ6/trunk/libf/phylmdiso/phyredem.F90	(revision 5271)
@@ -519,8 +519,8 @@
         ! equivalent isotopique de phyredem
 
-#include "dimsoil.h"
-#include "clesphys.h"
-#include "alpale.h"
-#include "compbl.h"      
+INCLUDE "dimsoil.h"
+INCLUDE "clesphys.h"
+INCLUDE "alpale.h"
+INCLUDE "compbl.h"
       ! inputs
       !REAL xtsol(niso,klon)
Index: /LMDZ6/trunk/makegcm
===================================================================
--- /LMDZ6/trunk/makegcm	(revision 5270)
+++ /LMDZ6/trunk/makegcm	(revision 5271)
@@ -392,5 +392,5 @@
              et couches verticales. 
              L'effet des options -d est d'ecraser le fichier 
-             $LMDGCM/libf/grid/dimensions.h
+             $LMDGCM/libf/grid/dimensions_mod.f90
              qui contient sous forme de 3 PARAMETER FORTRAN les 3 dimensions
              de la grille horizontale im, jm et verticale lm, par un nouveu fichier
@@ -739,5 +739,5 @@
 
 cd $libf/grid
-if ( -f dimensions.h ) then
+if ( -f dimensions_mod.f90 ) then
 echo 'ATTENTION: vous etes sans doute en train de compiler le modele par ailleurs'
 echo "Attendez que la premiere compilation soit terminee pour relancer la suivante."
@@ -746,5 +746,5 @@
 echo "Voulez-vous vraiment continuer?"
 if ( $< == "oui" ) then
-\rm -f $libf/grid/dimensions.h
+\rm -f $libf/grid/dimensions_mod.f90
 else
 exit
@@ -754,5 +754,5 @@
 cd dimension
 ./makdim $dim
-cat $libf/grid/dimensions.h
+cat $libf/grid/dimensions_mod.f90
 
 cd $LMDGCM
@@ -824,5 +824,5 @@
 ########################################################################
 ##########################################
-# On adapte d'abord certains include à F90
+# On adapte d'abord certains include � F90
 ##########################################
 ##########################################
@@ -1169,3 +1169,3 @@
 PROG=$code
 
-\rm -f $libf/grid/dimensions.h
+\rm -f $libf/grid/dimensions_mod.f90
Index: /LMDZ6/trunk/makelmdz
===================================================================
--- /LMDZ6/trunk/makelmdz	(revision 5270)
+++ /LMDZ6/trunk/makelmdz	(revision 5271)
@@ -587,9 +587,9 @@
 
 cd $LIBFGCM/grid
-if [[ -f dimensions.h ]]
+if [[ -f dimensions_mod.f90 ]]
 then
     if [[ $force_compile == true ]]
     then
-        \rm -f $LIBFGCM/grid/dimensions.h
+        \rm -f $LIBFGCM/grid/dimensions_mod.f90
     else
         echo "WARNING: you are probably already compiling the model somewhere else."
@@ -597,5 +597,5 @@
         echo "If you are sure that you are not compiling elsewhere, "
         echo "If you are sure that you are not compiling elsewhere, then"
-        echo rm -f $LIBFGCM/grid/dimensions.h
+        echo rm -f $LIBFGCM/grid/dimensions_mod.f90
         echo "before reruning the compilation"
         echo "or run makelmdz with option -force_compile"
@@ -607,5 +607,5 @@
 cd $LIBFGCM/grid/dimension
 ./makdim $dim
-cat $LIBFGCM/grid/dimensions.h
+cat $LIBFGCM/grid/dimensions_mod.f90
 cd $LMDGCM
 
@@ -842,7 +842,7 @@
 set +v
 
-if [[ -r $LIBFGCM/grid/dimensions.h ]]
+if [[ -r $LIBFGCM/grid/dimensions_mod.f90 ]]
 then
   # Cleanup: remove dimension.h file
-  \rm -f $LIBFGCM/grid/dimensions.h
-fi
+  \rm -f $LIBFGCM/grid/dimensions_mod.f90
+fi
Index: /LMDZ6/trunk/makelmdz_fcm
===================================================================
--- /LMDZ6/trunk/makelmdz_fcm	(revision 5270)
+++ /LMDZ6/trunk/makelmdz_fcm	(revision 5271)
@@ -569,9 +569,9 @@
 
 cd $LIBFGCM/grid
-if [[ -f dimensions.h ]]
+if [[ -f dimensions_mod.f90 ]]
 then
     if [[ $force_compile == true ]]
     then
-        \rm -f $LIBFGCM/grid/dimensions.h
+        \rm -f $LIBFGCM/grid/dimensions_mod.f90
     else
         echo "WARNING: you are probably already compiling the model somewhere else."
@@ -579,5 +579,5 @@
         echo "If you are sure that you are not compiling elsewhere, "
         echo "If you are sure that you are not compiling elsewhere, then"
-        echo rm -f $LIBFGCM/grid/dimensions.h
+        echo rm -f $LIBFGCM/grid/dimensions_mod.f90
         echo "before reruning the compilation"
         echo "or run makelmdz_fcm with option -force_compile"
@@ -590,5 +590,5 @@
 cd $LIBFGCM/grid/dimension
 ./makdim $dim
-cat $LIBFGCM/grid/dimensions.h
+cat $LIBFGCM/grid/dimensions_mod.f90
 cd $LMDGCM
 
@@ -803,8 +803,8 @@
 ln -s $LIBOGCM/${arch}${SUFF_NAME}/.config/ppsrc tmp_src
 
-if [[ -r $LIBFGCM/grid/dimensions.h ]]
+if [[ -r $LIBFGCM/grid/dimensions_mod.f90 ]]
 then
   # Cleanup: remove dimension.h file
-  \rm -f $LIBFGCM/grid/dimensions.h
+  \rm -f $LIBFGCM/grid/dimensions_mod.f90
 fi
 
