Index: LMDZ6/trunk/libf/phylmd/create_etat0_unstruct_mod.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/create_etat0_unstruct_mod.f90	(revision 5272)
+++ LMDZ6/trunk/libf/phylmd/create_etat0_unstruct_mod.f90	(revision 5273)
@@ -92,7 +92,6 @@
   USE geometry_mod
   USE ioipsl_getin_p_mod, ONLY: getin_p
-
+  USE dimsoil_mod_h, ONLY: nsoilmx
   IMPLICIT NONE
-  INCLUDE 'dimsoil.h'
   include "clesphys.h"
 
Index: LMDZ6/trunk/libf/phylmd/dimsoil.h
===================================================================
--- LMDZ6/trunk/libf/phylmd/dimsoil.h	(revision 5272)
+++ 	(revision )
@@ -1,20 +1,0 @@
-!
-! $Header$
-!
-      INTEGER nsoilmx
-      PARAMETER (nsoilmx=11)
-
-! For Inlandsis, Etienne Vignon:
-
-      INTEGER nsnowmx
-      PARAMETER (nsnowmx=30)
-      
-      INTEGER nsismx
-      PARAMETER (nsismx=41) 
-
-! nsismx should be equal to nsoilmx+nsnowmx 
-
-
-
-
-
Index: LMDZ6/trunk/libf/phylmd/dimsoil_mod_h.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/dimsoil_mod_h.f90	(revision 5273)
+++ LMDZ6/trunk/libf/phylmd/dimsoil_mod_h.f90	(revision 5273)
@@ -0,0 +1,21 @@
+MODULE dimsoil_mod_h
+  IMPLICIT NONE; PRIVATE
+  PUBLIC nsoilmx, nsnowmx, nsismx
+
+  INTEGER nsoilmx
+  PARAMETER (nsoilmx = 11)
+
+  ! For Inlandsis, Etienne Vignon:
+  INTEGER nsnowmx
+  PARAMETER (nsnowmx = 30)
+
+  INTEGER nsismx
+  PARAMETER (nsismx = 41)
+  ! nsismx should be equal to nsoilmx+nsnowmx
+END MODULE dimsoil_mod_h
+
+
+
+
+
+
Index: LMDZ6/trunk/libf/phylmd/dyn1d/old_lmdz1d.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/dyn1d/old_lmdz1d.f90	(revision 5272)
+++ LMDZ6/trunk/libf/phylmd/dyn1d/old_lmdz1d.f90	(revision 5273)
@@ -48,5 +48,6 @@
    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_OUTPUTPHYSSCM
 
-      USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+   USE dimsoil_mod_h, ONLY: nsoilmx
 implicit none
 
@@ -54,5 +55,4 @@
 !!      INCLUDE "control.h"
       INCLUDE "clesphys.h"
-      INCLUDE "dimsoil.h"
 !      INCLUDE "indicesol.h"
 
Index: LMDZ6/trunk/libf/phylmd/dyn1d/scm.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/dyn1d/scm.f90	(revision 5272)
+++ LMDZ6/trunk/libf/phylmd/dyn1d/scm.f90	(revision 5273)
@@ -44,5 +44,6 @@
    USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_OUTPUTPHYSSCM
 
-      USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+   USE dimensions_mod, ONLY: iim, jjm, llm, ndm
+   USE dimsoil_mod_h, ONLY: nsoilmx
 implicit none
 
@@ -50,5 +51,4 @@
 !!      INCLUDE "control.h"
       INCLUDE "clesphys.h"
-      INCLUDE "dimsoil.h"
 !      INCLUDE "indicesol.h"
 
Index: LMDZ6/trunk/libf/phylmd/inlandsis/VAR_SV.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/inlandsis/VAR_SV.f90	(revision 5272)
+++ LMDZ6/trunk/libf/phylmd/inlandsis/VAR_SV.f90	(revision 5273)
@@ -1,8 +1,6 @@
 MODULE VAR_SV
-
-
-IMPLICIT NONE
-
-INCLUDE "dimsoil.h"
+      USE dimsoil_mod_h, ONLY: nsoilmx, nsnowmx
+IMPLICIT NONE; PRIVATE
+      PUBLIC nsol, nsot, nsno, nb_wri, klonv, knonv
 
 ! +
Index: LMDZ6/trunk/libf/phylmd/inlandsis/surf_inlandsis_mod.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/inlandsis/surf_inlandsis_mod.f90	(revision 5272)
+++ LMDZ6/trunk/libf/phylmd/inlandsis/surf_inlandsis_mod.f90	(revision 5273)
@@ -1,5 +1,6 @@
 MODULE surf_inlandsis_mod
 
-    IMPLICIT NONE
+    IMPLICIT NONE; PRIVATE
+    PUBLIC surf_inlandsis, get_soil_levels, SISVAT_ini, sisvatetat0, sisvatredem
 
 CONTAINS
@@ -51,10 +52,7 @@
         USE VARphy
         USE surface_data, only : iflag_tsurf_inlandsis, SnoMod, BloMod, ok_outfor
+        USE dimsoil_mod_h, ONLY: nsoilmx, nsnowmx, nsismx
 
         IMPLICIT NONE
-
-        ! +--INTERFACE Variables
-        ! +  ===================
-        !    include  "dimsoil.h"
 
         ! +--Global Variables
@@ -755,7 +753,5 @@
         USE mod_phys_lmdz_para
         USE VAR_SV
-
-
-        !    INCLUDE "dimsoil.h"
+        USE dimsoil_mod_h, ONLY: nsoilmx, nsnowmx, nsismx
 
         REAL, DIMENSION(nsoilmx), INTENT(OUT) :: dz2, dz1
@@ -1032,9 +1028,7 @@
 
     SUBROUTINE sisvatetat0 (fichnom, ikl2i)
-
         USE dimphy
         USE mod_grid_phy_lmdz
         USE mod_phys_lmdz_para
-
         USE iostart
         USE VAR_SV
@@ -1043,5 +1037,5 @@
         USE VARtSV
         USE indice_sol_mod
-
+        USE dimsoil_mod_h, ONLY: nsoilmx, nsnowmx, nsismx
         IMPLICIT none
         !======================================================================
@@ -1051,5 +1045,5 @@
         !    include "indicesol.h"
 
-        !    include "dimsoil.h"
+        !
         include "clesphys.h"
         include "compbl.h"
@@ -1282,4 +1276,5 @@
         USE indice_sol_mod
         USE dimphy
+        USE dimsoil_mod_h, ONLY: nsoilmx, nsnowmx, nsismx
 
         IMPLICIT none
Index: LMDZ6/trunk/libf/phylmd/ocean_forced_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/ocean_forced_mod.F90	(revision 5272)
+++ LMDZ6/trunk/libf/phylmd/ocean_forced_mod.F90	(revision 5273)
@@ -276,7 +276,7 @@
 #endif
 #endif
+    USE dimsoil_mod_h, ONLY: nsoilmx
 
 !   INCLUDE "indicesol.h"
-    INCLUDE "dimsoil.h"
     INCLUDE "YOMCST.h"
     INCLUDE "clesphys.h"
Index: LMDZ6/trunk/libf/phylmd/pbl_surface_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/pbl_surface_mod.F90	(revision 5272)
+++ LMDZ6/trunk/libf/phylmd/pbl_surface_mod.F90	(revision 5273)
@@ -85,7 +85,6 @@
     USE print_control_mod, ONLY: lunout
     USE ioipsl_getin_p_mod, ONLY : getin_p
+    USE dimsoil_mod_h, ONLY: nsoilmx
     IMPLICIT NONE
-
-    INCLUDE "dimsoil.h"
  
 ! Input variables
@@ -204,7 +203,6 @@
     USE isotopes_verif_mod
 #endif
+    USE dimsoil_mod_h, ONLY: nsoilmx
     IMPLICIT NONE
-
-    INCLUDE "dimsoil.h"
  
 ! Input variables
@@ -416,11 +414,7 @@
     USE wxios, ONLY: missing_val_xios => missing_val, using_xios
     USE netcdf, only: missing_val_netcdf => nf90_fill_real
-
-     
-
+    USE dimsoil_mod_h, ONLY: nsoilmx
 
     IMPLICIT NONE
-
-    INCLUDE "dimsoil.h"
     INCLUDE "YOMCST.h"
     INCLUDE "YOETHF.h"
@@ -4223,6 +4217,5 @@
 #endif    
 #endif
-
-    INCLUDE "dimsoil.h"
+    USE dimsoil_mod_h, ONLY: nsoilmx
 
 ! Ouput variables
@@ -4297,6 +4290,4 @@
          dser, dt_ds
     use config_ocean_skin_m, only: activate_ocean_skin
-
-    INCLUDE "dimsoil.h"
     INCLUDE "clesphys.h"
     INCLUDE "compbl.h"
Index: LMDZ6/trunk/libf/phylmd/phyaqua_mod.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/phyaqua_mod.f90	(revision 5272)
+++ LMDZ6/trunk/libf/phylmd/phyaqua_mod.f90	(revision 5273)
@@ -37,10 +37,10 @@
     USE mod_grid_phy_lmdz
     USE ioipsl_getin_p_mod, ONLY : getin_p
-    USE phys_cal_mod , ONLY: calend, year_len_phy => year_len 
+    USE phys_cal_mod , ONLY: calend, year_len_phy => year_len
+    USE dimsoil_mod_h, ONLY: nsoilmx
     IMPLICIT NONE
 
     include "YOMCST.h"
     include "clesphys.h"
-    include "dimsoil.h"
 
     INTEGER, INTENT (IN) :: nlon, year_len, iflag_phys
Index: LMDZ6/trunk/libf/phylmd/phyetat0_mod.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/phyetat0_mod.f90	(revision 5272)
+++ LMDZ6/trunk/libf/phylmd/phyetat0_mod.f90	(revision 5273)
@@ -43,4 +43,6 @@
   use netcdf, only: missing_val_netcdf => nf90_fill_real
   use config_ocean_skin_m, only: activate_ocean_skin
+  USE dimsoil_mod_h, ONLY: nsoilmx
+
 
   IMPLICIT none
@@ -49,5 +51,4 @@
   ! Objet: Lecture de l'etat initial pour la physique
   !======================================================================
-  include "dimsoil.h"
   include "clesphys.h"
   include "alpale.h"
Index: LMDZ6/trunk/libf/phylmd/phyredem.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/phyredem.f90	(revision 5272)
+++ LMDZ6/trunk/libf/phylmd/phyredem.f90	(revision 5273)
@@ -43,8 +43,6 @@
   USE time_phylmdz_mod, ONLY: annee_ref, day_end, itau_phy, pdtphys
   use config_ocean_skin_m, only: activate_ocean_skin  
-
+  USE dimsoil_mod_h, ONLY: nsoilmx
   IMPLICIT none
-
-  include "dimsoil.h"
   include "clesphys.h"
   include "alpale.h"
Index: LMDZ6/trunk/libf/phylmd/physiq_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/physiq_mod.F90	(revision 5272)
+++ LMDZ6/trunk/libf/phylmd/physiq_mod.F90	(revision 5273)
@@ -412,5 +412,4 @@
 
     include "regdim.h"
-    include "dimsoil.h"
     include "clesphys.h"
     include "alpale.h"
Index: LMDZ6/trunk/libf/phylmd/soil.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/soil.f90	(revision 5272)
+++ LMDZ6/trunk/libf/phylmd/soil.f90	(revision 5273)
@@ -9,4 +9,5 @@
   USE indice_sol_mod
   USE print_control_mod, ONLY: lunout
+  USE dimsoil_mod_h, ONLY: nsoilmx
 
   IMPLICIT NONE
@@ -61,5 +62,4 @@
 !=======================================================================
   INCLUDE "YOMCST.h"
-  INCLUDE "dimsoil.h"
   INCLUDE "comsoil.h"
 !-----------------------------------------------------------------------
Index: LMDZ6/trunk/libf/phylmd/surf_land_bucket_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/surf_land_bucket_mod.F90	(revision 5272)
+++ LMDZ6/trunk/libf/phylmd/surf_land_bucket_mod.F90	(revision 5273)
@@ -44,9 +44,9 @@
 #endif
 #endif
+    USE dimsoil_mod_h, ONLY: nsoilmx
 !****************************************************************************************
 ! Bucket calculations for surface. 
 !
     INCLUDE "clesphys.h"
-    INCLUDE "dimsoil.h"
     INCLUDE "YOMCST.h"
 
Index: LMDZ6/trunk/libf/phylmd/surf_land_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/surf_land_mod.F90	(revision 5272)
+++ LMDZ6/trunk/libf/phylmd/surf_land_mod.F90	(revision 5273)
@@ -74,6 +74,5 @@
 
     USE print_control_mod, ONLY: lunout
-
-    INCLUDE "dimsoil.h"
+    USE dimsoil_mod_h, ONLY: nsoilmx
     INCLUDE "YOMCST.h"
     INCLUDE "clesphys.h"
Index: LMDZ6/trunk/libf/phylmd/surf_landice_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/surf_landice_mod.F90	(revision 5272)
+++ LMDZ6/trunk/libf/phylmd/surf_landice_mod.F90	(revision 5273)
@@ -56,7 +56,7 @@
     USE indice_sol_mod
     USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INLANDSIS
+    USE dimsoil_mod_h, ONLY: nsoilmx
 
 !    INCLUDE "indicesol.h"
-    INCLUDE "dimsoil.h"
     INCLUDE "YOMCST.h"
     INCLUDE "clesphys.h"
Index: LMDZ6/trunk/libf/phylmd/surf_seaice_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/surf_seaice_mod.F90	(revision 5272)
+++ LMDZ6/trunk/libf/phylmd/surf_seaice_mod.F90	(revision 5273)
@@ -37,4 +37,5 @@
   USE infotrac_phy, ONLY : ntiso,niso
 #endif
+  USE dimsoil_mod_h, ONLY: nsoilmx
 
 !
@@ -43,5 +44,4 @@
 ! in here because it is the same calculation for the different modes of ocean.
 !
-    INCLUDE "dimsoil.h"
     INCLUDE "clesphys.h"
 
