Index: LMDZ6/trunk/libf/phy_common/mod_phys_lmdz_omp_data.F90
===================================================================
--- LMDZ6/trunk/libf/phy_common/mod_phys_lmdz_omp_data.F90	(revision 5290)
+++ LMDZ6/trunk/libf/phy_common/mod_phys_lmdz_omp_data.F90	(revision 5291)
@@ -109,5 +109,4 @@
   USE print_control_mod, ONLY: lunout
   IMPLICIT NONE
-!  INCLUDE "iniprint.h"
 
 !$OMP CRITICAL  
Index: LMDZ6/trunk/libf/phylmd/calltherm.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/calltherm.F90	(revision 5290)
+++ LMDZ6/trunk/libf/phylmd/calltherm.F90	(revision 5291)
@@ -41,6 +41,6 @@
 #endif
       USE clesphys_mod_h
+      USE thermcell_old_mod_h, ONLY: r_aspect_thermals, l_mix_thermals, w2di_thermals
       implicit none
-      include "thermcell_old.h"
 
 
Index: LMDZ6/trunk/libf/phylmd/iophys.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/iophys.F90	(revision 5290)
+++ LMDZ6/trunk/libf/phylmd/iophys.F90	(revision 5291)
@@ -216,10 +216,7 @@
 
       SUBROUTINE iotd_ecrit_seq(nom,lllm,titre,unite,px)
+        USE iotd_mod_h
 
       IMPLICIT NONE
-
-! px arrive 
-
-      INCLUDE "iotd.h"
 
 
Index: LMDZ6/trunk/libf/phylmd/iotd.h
===================================================================
--- LMDZ6/trunk/libf/phylmd/iotd.h	(revision 5290)
+++ 	(revision )
@@ -1,22 +1,0 @@
-!=======================================================================
-!
-!   Auteur:  F. Hourdin
-!   -------
-!
-!   Objet:
-!   ------
-!   Light interface for netcdf outputs. can be used outside LMDZ
-!
-!=======================================================================
-
-      integer imax,jmax,lmax,nid
-      INTEGER dim_coord(4)
-      real iotd_ts,iotd_t0
-      integer :: n_names_iotd_def
-      character*20, dimension(200) :: names_iotd_def
-      character*20 :: un_nom
-
-      common/iotd_ca/imax,jmax,lmax,nid,dim_coord,iotd_t0,iotd_ts
-      common/iotd_cb/n_names_iotd_def,names_iotd_def
-!$OMP THREADPRIVATE(/iotd_ca/)
-!$OMP THREADPRIVATE(/iotd_cb/)
Index: LMDZ6/trunk/libf/phylmd/iotd_ecrit.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/iotd_ecrit.f90	(revision 5290)
+++ LMDZ6/trunk/libf/phylmd/iotd_ecrit.f90	(revision 5291)
@@ -24,8 +24,6 @@
       USE netcdf, ONLY: nf90_put_var, nf90_inq_varid, nf90_enddef, nf90_redef, nf90_sync, nf90_noerr, &
             nf90_float, nf90_def_var
+      USE iotd_mod_h
       implicit none
-
-! Commons
-      INCLUDE "iotd.h"
 
 
Index: LMDZ6/trunk/libf/phylmd/iotd_fin.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/iotd_fin.f90	(revision 5290)
+++ LMDZ6/trunk/libf/phylmd/iotd_fin.f90	(revision 5291)
@@ -1,23 +1,22 @@
-      SUBROUTINE iotd_fin
-      USE netcdf, ONLY: nf90_close
-      IMPLICIT NONE
+SUBROUTINE iotd_fin
+  USE iotd_mod_h, ONLY: nid
+  USE netcdf, ONLY: nf90_close
+  IMPLICIT NONE
 
-!=======================================================================
-!
-!   Auteur:  F. Hourdin
-!   -------
-!
-!   Objet:
-!   ------
-!   Light interface for netcdf outputs. can be used outside LMDZ
-!
-!=======================================================================
-      INCLUDE "iotd.h"
-      integer ierr
+  !=======================================================================
+  !
+  !   Auteur:  F. Hourdin
+  !   -------
+  !
+  !   Objet:
+  !   ------
+  !   Light interface for netcdf outputs. can be used outside LMDZ
+  !
+  !=======================================================================
+  integer ierr
 
-!   Arguments:
-!   ----------
+  !   Arguments:
+  !   ----------
 
-      ierr=nf90_close(nid)
-
-      END
+  ierr = nf90_close(nid)
+END
Index: LMDZ6/trunk/libf/phylmd/iotd_ini.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/iotd_ini.f90	(revision 5290)
+++ LMDZ6/trunk/libf/phylmd/iotd_ini.f90	(revision 5291)
@@ -2,4 +2,5 @@
       USE netcdf, ONLY: nf90_enddef, nf90_put_att, nf90_float, nf90_def_var, nf90_redef, &
             nf90_global, nf90_def_dim, nf90_create, nf90_clobber, nf90_unlimited, nf90_put_var
+      USE iotd_mod_h
       IMPLICIT NONE
 
@@ -15,7 +16,4 @@
 !=======================================================================
 !-----------------------------------------------------------------------
-!   Declarations:
-!   -------------
-      INCLUDE "iotd.h"
 
 !   Arguments:
Index: LMDZ6/trunk/libf/phylmd/iotd_mod_h.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/iotd_mod_h.f90	(revision 5291)
+++ LMDZ6/trunk/libf/phylmd/iotd_mod_h.f90	(revision 5291)
@@ -0,0 +1,25 @@
+MODULE iotd_mod_h
+  IMPLICIT NONE; PRIVATE
+  PUBLIC imax, jmax, lmax, nid, dim_coord, iotd_ts, iotd_t0, n_names_iotd_def, names_iotd_def, &
+          un_nom
+  !=======================================================================
+  !
+  !   Auteur:  F. Hourdin
+  !   -------
+  !
+  !   Objet:
+  !   ------
+  !   Light interface for netcdf outputs. can be used outside LMDZ
+  !
+  !=======================================================================
+
+  integer imax, jmax, lmax, nid
+  INTEGER dim_coord(4)
+  real iotd_ts, iotd_t0
+  integer :: n_names_iotd_def
+  character*20, dimension(200) :: names_iotd_def
+  character*20 :: un_nom
+
+  !$OMP THREADPRIVATE(imax,jmax,lmax,nid,dim_coord,iotd_ts,iotd_t0,n_names_iotd_def,names_iotd_def,&
+  !$OMP un_nom)
+END MODULE iotd_mod_h
Index: LMDZ6/trunk/libf/phylmd/thermcell_old.h
===================================================================
--- LMDZ6/trunk/libf/phylmd/thermcell_old.h	(revision 5290)
+++ 	(revision )
@@ -1,4 +1,0 @@
-
-      real,parameter     :: r_aspect_thermals=2.
-      real,parameter     :: l_mix_thermals=30.
-      integer,parameter  :: w2di_thermals=0
Index: LMDZ6/trunk/libf/phylmd/thermcell_old_mod_h.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/thermcell_old_mod_h.f90	(revision 5291)
+++ LMDZ6/trunk/libf/phylmd/thermcell_old_mod_h.f90	(revision 5291)
@@ -0,0 +1,7 @@
+MODULE thermcell_old_mod_h
+  IMPLICIT NONE; PRIVATE
+  PUBLIC r_aspect_thermals, l_mix_thermals, w2di_thermals
+  real, parameter :: r_aspect_thermals = 2.
+  real, parameter :: l_mix_thermals = 30.
+  integer, parameter :: w2di_thermals = 0
+END MODULE thermcell_old_mod_h
Index: LMDZ6/trunk/libf/phylmdiso/iotd.h
===================================================================
--- LMDZ6/trunk/libf/phylmdiso/iotd.h	(revision 5290)
+++ 	(revision )
@@ -1,1 +1,0 @@
-link ../phylmd/iotd.h
Index: LMDZ6/trunk/libf/phylmdiso/iotd_mod_h.f90
===================================================================
--- LMDZ6/trunk/libf/phylmdiso/iotd_mod_h.f90	(revision 5291)
+++ LMDZ6/trunk/libf/phylmdiso/iotd_mod_h.f90	(revision 5291)
@@ -0,0 +1,1 @@
+link ../phylmd/iotd_mod_h.f90
Index: LMDZ6/trunk/libf/phylmdiso/thermcell_old.h
===================================================================
--- LMDZ6/trunk/libf/phylmdiso/thermcell_old.h	(revision 5290)
+++ 	(revision )
@@ -1,1 +1,0 @@
-link ../phylmd/thermcell_old.h
Index: LMDZ6/trunk/libf/phylmdiso/thermcell_old_mod_h.f90
===================================================================
--- LMDZ6/trunk/libf/phylmdiso/thermcell_old_mod_h.f90	(revision 5291)
+++ LMDZ6/trunk/libf/phylmdiso/thermcell_old_mod_h.f90	(revision 5291)
@@ -0,0 +1,1 @@
+link ../phylmd/thermcell_old_mod_h.f90
