Index: codes/icosagcm/devel/src/diagnostics/compute_rhodz.F90
===================================================================
--- codes/icosagcm/devel/src/diagnostics/compute_rhodz.F90	(revision 911)
+++ codes/icosagcm/devel/src/diagnostics/compute_rhodz.F90	(revision 912)
@@ -13,10 +13,4 @@
 
 CONTAINS
-
-  SUBROUTINE check_interface
-    USE compute_diagnostics_mod
-    compute_rhodz => compute_rhodz_hex
-    compute_rhodz => compute_rhodz_unst
-  END SUBROUTINE check_interface
 
 #if BEGIN_DYSL
@@ -117,4 +111,3 @@
   END SUBROUTINE compute_rhodz_handmade
  
-
 END MODULE compute_rhodz_mod
Index: codes/icosagcm/devel/src/dynamics/caldyn.f90
===================================================================
--- codes/icosagcm/devel/src/dynamics/caldyn.f90	(revision 911)
+++ codes/icosagcm/devel/src/dynamics/caldyn.f90	(revision 912)
@@ -1,18 +1,17 @@
 MODULE caldyn_mod
   USE icosa
+  IMPLICIT NONE
   PRIVATE
   SAVE
-  CHARACTER(LEN=255),SAVE :: caldyn_type
+  CHARACTER(LEN=255) :: caldyn_type
 !$OMP THREADPRIVATE(caldyn_type)
  
-  PUBLIC init_caldyn, caldyn, caldyn_BC, dysl
+  PUBLIC init_caldyn, caldyn, caldyn_BC
   
 CONTAINS
 
   SUBROUTINE init_caldyn
-  USE icosa
-  USE caldyn_gcm_mod, ONLY : init_caldyn_gcm=>init_caldyn
-  USE caldyn_adv_mod, ONLY : init_caldyn_adv=>init_caldyn
-  IMPLICIT NONE
+    USE caldyn_gcm_mod, ONLY : init_caldyn_gcm=>init_caldyn
+    USE caldyn_adv_mod, ONLY : init_caldyn_adv=>init_caldyn
   
     caldyn_type="gcm"
Index: codes/icosagcm/devel/src/dynamics/compute_pvort_only.F90
===================================================================
--- codes/icosagcm/devel/src/dynamics/compute_pvort_only.F90	(revision 911)
+++ codes/icosagcm/devel/src/dynamics/compute_pvort_only.F90	(revision 912)
@@ -10,10 +10,4 @@
 CONTAINS
 
-  SUBROUTINE check_interface
-    USE compute_caldyn_mod
-    compute_pvort_only => compute_pvort_only_unst
-    compute_pvort_only => compute_pvort_only_hex
-  END SUBROUTINE check_interface
-  
 #if BEGIN_DYSL
 
Index: codes/icosagcm/devel/src/output/restart.f90
===================================================================
--- codes/icosagcm/devel/src/output/restart.f90	(revision 911)
+++ codes/icosagcm/devel/src/output/restart.f90	(revision 912)
@@ -1,4 +1,17 @@
 MODULE restart_mod
+  USE prec, ONLY : rstd
   USE field_mod
+  USE domain_mod
+  USE xios_mod
+  USE netcdf_mod
+  USE omp_para, ONLY : is_omp_master
+  USE mpipara, ONLY : is_mpi_master, is_mpi_root
+  USE time_mod, ONLY : itaumax
+  USE metric, ONLY : ncell_glo, cell_glo
+  USE getin_mod, ONLY : getin
+  USE spherical_geom_mod, ONLY : xyz2lonlat
+  USE transfert_mod, ONLY : gather_field, scatter_field
+  IMPLICIT NONE
+  PRIVATE
 
   TYPE t_field_array
@@ -8,12 +21,9 @@
   LOGICAL,SAVE :: write_start=.TRUE.
 
+  PUBLIC :: write_start, init_restart, write_restart, read_start
+
 CONTAINS
   
   SUBROUTINE init_restart
-  USE xios_mod
-  USE icosa
-  USE time_mod
-  USE omp_para
-  IMPLICIT NONE
   CHARACTER(LEN=255) :: start_file_name
   CHARACTER(LEN=255) :: restart_file_name
@@ -37,18 +47,7 @@
   SUBROUTINE write_restart(it,field0 ,field1 ,field2 ,field3 ,field4 ,field5 ,field6 ,field7 ,field8 ,field9,   &
                            field10,field11,field12,field13,field14,field15,field16,field17,field18,field19 )
-  USE prec
-  USE metric
-  USE field_mod
-  USE domain_mod
-  USE netcdf_mod
-  USE mpipara
-  USE omp_para
-  USE getin_mod
-  USE spherical_geom_mod
-  USE transfert_mod
-  USE disvert_mod
-  USE xios_mod
-  IMPLICIT NONE 
-  INTEGER,INTENT(IN)     :: it
+    USE disvert_mod, ONLY : presnivs
+
+    INTEGER,INTENT(IN)     :: it
 
   TYPE(t_field),POINTER,OPTIONAL,DIMENSION(:) :: field0 ,field1 ,field2 ,field3 ,field4 ,field5 ,field6 ,field7 ,field8 ,field9
@@ -233,15 +232,4 @@
   
   SUBROUTINE write_restart_field(field,fieldId,ncid)
-  USE prec
-  USE metric
-  USE field_mod
-  USE domain_mod
-  USE netcdf_mod
-  USE mpipara
-  USE getin_mod
-  USE spherical_geom_mod
-  USE transfert_mod
-  USE xios_mod
-  IMPLICIT NONE
     TYPE(t_field),POINTER :: field(:)
     INTEGER,INTENT(IN)     :: fieldId
@@ -398,16 +386,5 @@
   SUBROUTINE read_start(it,field0 ,field1 ,field2 ,field3 ,field4 ,field5 ,field6 ,field7 ,field8 ,field9,   &
                            field10,field11,field12,field13,field14,field15,field16,field17,field18,field19 )
-  USE prec
-  USE metric
-  USE field_mod
-  USE domain_mod
-  USE netcdf_mod
-  USE mpipara
-  USE getin_mod
-  USE spherical_geom_mod
-  USE transfert_mod
-  USE xios_mod
  
-  IMPLICIT NONE
   INTEGER, INTENT(OUT)  :: it
   TYPE(t_field),POINTER,OPTIONAL,DIMENSION(:) :: field0 ,field1 ,field2 ,field3 ,field4 ,field5 ,field6 ,field7 ,field8 ,field9
@@ -514,14 +491,4 @@
 
   SUBROUTINE read_start_field(field,fieldId,ncid)
-  USE prec
-  USE metric
-  USE field_mod
-  USE domain_mod
-  USE netcdf_mod
-  USE mpipara
-  USE getin_mod
-  USE spherical_geom_mod
-  USE transfert_mod
-  IMPLICIT NONE
     TYPE(t_field),POINTER :: field(:)
     INTEGER,INTENT(IN)     :: fieldId
Index: codes/icosagcm/devel/src/vertical/disvert_dcmip200.f90
===================================================================
--- codes/icosagcm/devel/src/vertical/disvert_dcmip200.f90	(revision 911)
+++ codes/icosagcm/devel/src/vertical/disvert_dcmip200.f90	(revision 912)
@@ -1,5 +1,9 @@
   MODULE disvert_dcmip200_mod
-  USE icosa
- 
+    USE prec, ONLY : rstd
+    USE grid_param, ONLY : llm
+
+  IMPLICIT NONE
+  PRIVATE
+
   REAL(rstd), SAVE, ALLOCATABLE,TARGET :: ap(:)
 !$OMP THREADPRIVATE(ap)
@@ -9,12 +13,12 @@
 !$OMP THREADPRIVATE(presnivs)
 
+  PUBLIC :: init_disvert, ap, bp, presnivs
+
 CONTAINS
 !=========================================================================
 
   SUBROUTINE init_disvert
-  USE icosa
-  USE mpipara
-  IMPLICIT NONE
-  
+    USE mpipara
+    
     ALLOCATE(ap(llm+1))
     ALLOCATE(bp(llm+1))
@@ -22,50 +26,49 @@
     
     CALL disvert(ap,bp,presnivs)    
-
-  END SUBROUTINE init_disvert  
+    
+  END SUBROUTINE init_disvert
 
   SUBROUTINE disvert(ap,bp,presnivs)
-  USE icosa
-  USE mpipara
-  IMPLICIT NONE
-  REAL(rstd),INTENT(OUT) :: ap(:)
-  REAL(rstd),INTENT(OUT) :: bp(:)
-  REAL(rstd),INTENT(OUT) :: presnivs(:)
-  ! reads from run.def : ncar_dz, ncar_T0, ncar_p0, ncar_disvert_c
-  INTEGER :: l,cindx
-  REAL(rstd) ::  eta_top, eta
-  REAL(rstd),PARAMETER :: N=0.01         ! Brunt-Vaisala frequency (s-1)
-  REAL(rstd),PARAMETER :: T0=300.       ! Surface temperature at the equator (K)
-  REAL(rstd) :: Rd       
-  REAL(rstd), PARAMETER :: Gamma=0.0065       
-
-  Rd=cpp*kappa
-  ncar_dz=400 ; CALL getin('ncar_dz',ncar_dz);
-  cindx=1 ; CALL getin('ncar_disvert_c',cindx)
-
+    USE earth_const, ONLY : cpp, kappa, preff, g
+    USE icosa, ONLY       : ncar_dz, ncar_T0, ncar_p0
+    USE getin_mod, ONLY   : getin
+    USE mpipara, ONLY     : is_mpi_root
+    REAL(rstd),INTENT(OUT) :: ap(:)
+    REAL(rstd),INTENT(OUT) :: bp(:)
+    REAL(rstd),INTENT(OUT) :: presnivs(:)
+    ! reads from run.def : ncar_dz, ncar_T0, ncar_p0, ncar_disvert_c
+    INTEGER :: l,cindx
+    REAL(rstd) ::  eta_top, eta
+    REAL(rstd),PARAMETER :: N=0.01         ! Brunt-Vaisala frequency (s-1)
+    REAL(rstd),PARAMETER :: T0=300.       ! Surface temperature at the equator (K)
+    REAL(rstd) :: Rd       
+    REAL(rstd), PARAMETER :: Gamma=0.0065       
+    
+    Rd=cpp*kappa
+    ncar_dz=400 ; CALL getin('ncar_dz',ncar_dz);
+    cindx=1 ; CALL getin('ncar_disvert_c',cindx)  
+    
+    eta_top = (1-Gamma/T0*llm*ncar_dz)**(g/(Rd*Gamma))  
+    do l = 1,llm+1
+       eta = (1-Gamma/T0*(l-1)*ncar_dz)**(g/(Rd*Gamma))
+       PRINT *,'eta ->', eta
+       bp(l) = ((eta - eta_top)/(1 - eta_top))**cindx
+       ap(l) = preff * ( eta - bp(l) )
+    ENDDO
+    bp(1)=1.
+    ap(1)=0.
+    bp(llm+1) = 0
+    
+    DO l = 1, llm
+       presnivs(l) = 0.5 *( ap(l)+bp(l)*preff + ap(l+1)+bp(l+1)*preff )
+    ENDDO
+    
+    !$OMP MASTER  
+    IF (is_mpi_root) PRINT *, 'Vertical placement of model levels according to DCMIP Appendix E.3'
+    IF (is_mpi_root) PRINT *, 'Parameters : ncar_dz=', ncar_dz, '  ncar_p0=',ncar_p0, '  ncar_disvert_c=',cindx
+    IF (is_mpi_root) PRINT *, 'Isothermal amtosphere with ncar_T0=',ncar_T0 
+    !$OMP END MASTER  
+    
+  END SUBROUTINE disvert
   
-    
-  eta_top = (1-Gamma/T0*llm*ncar_dz)**(g/(Rd*Gamma))  
-  do l = 1,llm+1
-     eta = (1-Gamma/T0*(l-1)*ncar_dz)**(g/(Rd*Gamma))
-     PRINT *,'eta ->', eta
-     bp(l) = ((eta - eta_top)/(1 - eta_top))**cindx
-     ap(l) = preff * ( eta - bp(l) )
-  ENDDO
-  bp(1)=1.
-  ap(1)=0.
-  bp(llm+1) = 0
-  
-  DO l = 1, llm
-     presnivs(l) = 0.5 *( ap(l)+bp(l)*preff + ap(l+1)+bp(l+1)*preff )
-  ENDDO
-
-!$OMP MASTER  
-  IF (is_mpi_root) PRINT *, 'Vertical placement of model levels according to DCMIP Appendix E.3'
-  IF (is_mpi_root) PRINT *, 'Parameters : ncar_dz=', ncar_dz, '  ncar_p0=',ncar_p0, '  ncar_disvert_c=',cindx
-  IF (is_mpi_root) PRINT *, 'Isothermal amtosphere with ncar_T0=',ncar_T0 
-!$OMP END MASTER  
-
-END SUBROUTINE disvert
-
 END  MODULE disvert_dcmip200_mod
