Index: LMDZ5/trunk/libf/dyn3d/advtrac.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3d/advtrac.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d/advtrac.F90	(revision 2601)
@@ -20,5 +20,4 @@
   include "comgeom2.h"
   include "logic.h"
-  include "temps.h"
   include "ener.h"
   include "description.h"
Index: LMDZ5/trunk/libf/dyn3d/bilan_dyn.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d/bilan_dyn.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d/bilan_dyn.F	(revision 2601)
@@ -15,4 +15,5 @@
       USE comconst_mod, ONLY: pi, cpp
       USE comvert_mod, ONLY: presnivs
+      USE temps_mod, ONLY: annee_ref, day_ref, itau_dyn
 
       IMPLICIT NONE
@@ -21,5 +22,4 @@
       include "paramet.h"
       include "comgeom2.h"
-      include "temps.h"
       include "iniprint.h"
 
Index: LMDZ5/trunk/libf/dyn3d/conf_gcm.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3d/conf_gcm.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d/conf_gcm.F90	(revision 2601)
@@ -18,4 +18,5 @@
   USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy, &
                        alphax,alphay,taux,tauy
+  USE temps_mod, ONLY: calend
 
   IMPLICIT NONE
@@ -38,5 +39,4 @@
   include "logic.h"
   include "comdissnew.h"
-  include "temps.h"
   include "iniprint.h"
 
Index: LMDZ5/trunk/libf/dyn3d/dynetat0.f90
===================================================================
--- LMDZ5/trunk/libf/dyn3d/dynetat0.f90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d/dynetat0.f90	(revision 2601)
@@ -14,9 +14,9 @@
   USE comconst_mod, ONLY: cpp, daysec, dtvr, g, im, jm, kappa, lllm, omeg, rad
   USE serre_mod, ONLY: clon, clat, grossismx, grossismy
+  USE temps_mod, ONLY: annee_ref, day_ini, day_ref, itau_dyn, start_time
 
   IMPLICIT NONE
   include "dimensions.h"
   include "paramet.h"
-  include "temps.h"
   include "comgeom2.h"
   include "ener.h"
Index: LMDZ5/trunk/libf/dyn3d/dynredem.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3d/dynredem.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d/dynredem.F90	(revision 2601)
@@ -16,9 +16,10 @@
   USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy, &
                               taux,tauy
+  USE temps_mod, ONLY: annee_ref, day_ref, itau_dyn, itaufin, start_time
+  
   IMPLICIT NONE
   include "dimensions.h"
   include "paramet.h"
   include "comgeom2.h"
-  include "temps.h"
   include "ener.h"
   include "logic.h"
@@ -170,4 +171,6 @@
   USE dynredem_mod, ONLY: dynredem_write_u, dynredem_write_v, dynredem_read_u, &
                           err, modname, fil, msg
+  USE temps_mod, ONLY: itau_dyn, itaufin
+  
   IMPLICIT NONE
   include "dimensions.h"
@@ -175,5 +178,4 @@
   include "description.h"
   include "comgeom.h"
-  include "temps.h"
   include "iniprint.h"
 !===============================================================================
Index: LMDZ5/trunk/libf/dyn3d/fluxstokenc.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d/fluxstokenc.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d/fluxstokenc.F	(revision 2601)
@@ -20,5 +20,4 @@
       include "comgeom.h"
       include "tracstoke.h"
-      include "temps.h"
       include "iniprint.h"
 
Index: LMDZ5/trunk/libf/dyn3d/gcm.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3d/gcm.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d/gcm.F90	(revision 2601)
@@ -23,4 +23,6 @@
   USE control_mod
   USE mod_const_mpi, ONLY: COMM_LMDZ
+  USE temps_mod, ONLY: calend,start_time,annee_ref,day_ref, &
+                     itau_dyn,itau_phy,day_ini,jD_ref,jH_ref,day_end
   USE comconst_mod, ONLY: cpp, daysec, dtphys, dtvr, g, r, rad
 
@@ -71,5 +73,4 @@
   include "comgeom.h"
   include "logic.h"
-  include "temps.h"
   include "ener.h"
   include "description.h"
Index: LMDZ5/trunk/libf/dyn3d/iniacademic.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3d/iniacademic.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d/iniacademic.F90	(revision 2601)
@@ -18,4 +18,5 @@
   USE comconst_mod, ONLY: cpp, kappa, g, daysec, dtvr, pi, im, jm
   USE comvert_mod, ONLY: ap, bp, preff, presnivs, pressure_exner
+  USE temps_mod, ONLY: annee_ref, day_ini, day_ref
 
   !   Author:    Frederic Hourdin      original: 15/01/93
@@ -33,5 +34,4 @@
   include "academic.h"
   include "ener.h"
-  include "temps.h"
   include "iniprint.h"
   include "logic.h"
Index: LMDZ5/trunk/libf/dyn3d/integrd.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d/integrd.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d/integrd.F	(revision 2601)
@@ -10,4 +10,5 @@
       use comconst_mod, only: pi
       use comvert_mod, only: ap, bp
+      USE temps_mod, ONLY: dt
 
       IMPLICIT NONE
@@ -33,5 +34,4 @@
       include "comgeom.h"
       include "logic.h"
-      include "temps.h"
       include "iniprint.h"
 
Index: LMDZ5/trunk/libf/dyn3d/leapfrog.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d/leapfrog.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d/leapfrog.F	(revision 2601)
@@ -22,4 +22,6 @@
       USE comvert_mod, ONLY: ap,bp,pressure_exner,presnivs
       USE comconst_mod, ONLY: cpp, dtphys, dtvr, pi, ihf
+      USE temps_mod, ONLY: jD_ref,jH_ref,itaufin,day_ini,day_ref,
+     &                        start_time,dt
 
       IMPLICIT NONE
@@ -61,5 +63,4 @@
       include "comgeom.h"
       include "logic.h"
-      include "temps.h"
       include "ener.h"
       include "description.h"
Index: LMDZ5/trunk/libf/dyn3d/temps.h
===================================================================
--- LMDZ5/trunk/libf/dyn3d/temps.h	(revision 2600)
+++ 	(revision )
@@ -1,26 +1,0 @@
-!
-! $Id$
-!
-!  ATTENTION!!!!: ce fichier include est compatible format fixe/format libre
-!                 veillez  n'utiliser que des ! pour les commentaires
-!                 et  bien positionner les & des lignes de continuation
-!                 (les placer en colonne 6 et en colonne 73)
-!
-!
-! jD_ref = jour julien de la date de reference (lancement de l'experience)
-! hD_ref = "heure" julienne de la date de reference
-!-----------------------------------------------------------------------
-! INCLUDE 'temps.h'
-
-      COMMON/temps/ dt, jD_ref, jH_ref, start_time,                     &
-     &             day_ini, day_end, annee_ref, day_ref,                &
-     &             itau_dyn, itau_phy, itaufin, calend
-
-
-      INTEGER   itaufin
-      INTEGER itau_dyn, itau_phy 
-      INTEGER day_ini, day_end, annee_ref, day_ref
-      REAL      dt, jD_ref, jH_ref, start_time
-      CHARACTER (len=10) :: calend
-
-!-----------------------------------------------------------------------
Index: LMDZ5/trunk/libf/dyn3d/temps_mod.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3d/temps_mod.F90	(revision 2601)
+++ LMDZ5/trunk/libf/dyn3d/temps_mod.F90	(revision 2601)
@@ -0,0 +1,24 @@
+!
+! $Id$
+!
+MODULE temps_mod
+
+IMPLICIT NONE  
+
+  INTEGER   itaufin ! total number of dynamical steps for the run
+  INTEGER   itau_dyn
+  INTEGER   itau_phy
+  INTEGER   day_ini ! initial day # of simulation sequence
+  INTEGER   day_end ! final day # ; i.e. day # when this simulation ends
+  INTEGER   annee_ref
+  INTEGER   day_ref
+  REAL      dt ! (dynamics) time step (changes if doing Matsuno or LF step)
+  REAL      jD_ref ! reference julian day date (beginning of experiment)
+  REAL      jH_ref ! reference julian "hour" of reference julian date
+  REAL      start_time
+  CHARACTER (len=10) :: calend ! calendar type
+
+  ! Additionnal Mars stuff:
+  REAL hour_ini ! initial fraction of day of simulation sequence (0=<hour_ini<1)
+
+END MODULE temps_mod
Index: LMDZ5/trunk/libf/dyn3d_common/adaptdt.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d_common/adaptdt.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d_common/adaptdt.F	(revision 2601)
@@ -5,5 +5,4 @@
      c                   masse)
 
-!      USE control_mod
       USE comconst_mod, ONLY: dtvr
       IMPLICIT NONE
@@ -14,5 +13,4 @@
       include "comgeom2.h"
       include "logic.h"
-      include "temps.h"
       include "ener.h"
       include "description.h"
Index: LMDZ5/trunk/libf/dyn3d_common/iniconst.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3d_common/iniconst.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d_common/iniconst.F90	(revision 2601)
@@ -24,5 +24,4 @@
   include "dimensions.h"
   include "paramet.h"
-  include "temps.h"
   include "iniprint.h"
 
Index: LMDZ5/trunk/libf/dyn3d_common/initdynav.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3d_common/initdynav.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d_common/initdynav.F90	(revision 2601)
@@ -11,4 +11,6 @@
   USE comconst_mod, ONLY: pi
   USE comvert_mod, ONLY: presnivs
+  USE temps_mod, ONLY: itau_dyn
+  
   implicit none
 
@@ -37,5 +39,4 @@
   include "paramet.h"
   include "comgeom.h"
-  include "temps.h"
   include "ener.h"
   include "logic.h"
Index: LMDZ5/trunk/libf/dyn3d_common/initfluxsto.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d_common/initfluxsto.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d_common/initfluxsto.F	(revision 2601)
@@ -11,4 +11,6 @@
       USE comconst_mod, ONLY: pi
       USE comvert_mod, ONLY: nivsigs
+      USE temps_mod, ONLY: annee_ref, day_ref, itau_dyn
+      
       implicit none
 
@@ -43,5 +45,4 @@
       include "paramet.h"
       include "comgeom.h"
-      include "temps.h"
       include "ener.h"
       include "logic.h"
Index: LMDZ5/trunk/libf/dyn3d_common/inithist.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d_common/inithist.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d_common/inithist.F	(revision 2601)
@@ -12,4 +12,6 @@
        USE comconst_mod, ONLY: pi
        USE comvert_mod, ONLY: presnivs
+       USE temps_mod, ONLY: itau_dyn
+       
       implicit none
 
@@ -42,5 +44,4 @@
       include "paramet.h"
       include "comgeom.h"
-      include "temps.h"
       include "ener.h"
       include "logic.h"
Index: LMDZ5/trunk/libf/dyn3d_common/interpre.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d_common/interpre.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d_common/interpre.F	(revision 2601)
@@ -16,5 +16,4 @@
       include "comgeom2.h"
       include "logic.h"
-      include "temps.h"
       include "ener.h"
       include "description.h"
Index: LMDZ5/trunk/libf/dyn3d_common/sortvarc.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d_common/sortvarc.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d_common/sortvarc.F	(revision 2601)
@@ -31,5 +31,4 @@
       INCLUDE "ener.h"
       INCLUDE "logic.h"
-      INCLUDE "temps.h"
       INCLUDE "iniprint.h"
 
Index: LMDZ5/trunk/libf/dyn3d_common/traceurpole.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d_common/traceurpole.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d_common/traceurpole.F	(revision 2601)
@@ -11,5 +11,4 @@
       include "comgeom2.h"
       include "logic.h"
-      include "temps.h"
       include "ener.h"
       include "description.h"
Index: LMDZ5/trunk/libf/dyn3d_common/writedynav.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3d_common/writedynav.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d_common/writedynav.F90	(revision 2601)
@@ -9,4 +9,5 @@
   use com_io_dyn_mod, only : histaveid, histvaveid, histuaveid
   USE comconst_mod, ONLY: cpp
+  USE temps_mod, ONLY: itau_dyn
 
   implicit none
@@ -33,5 +34,4 @@
   include "paramet.h"
   include "comgeom.h"
-  include "temps.h"
   include "ener.h"
   include "logic.h"
Index: LMDZ5/trunk/libf/dyn3d_common/writehist.F
===================================================================
--- LMDZ5/trunk/libf/dyn3d_common/writehist.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3d_common/writehist.F	(revision 2601)
@@ -9,4 +9,6 @@
       USE infotrac, ONLY : nqtot, ttext
       use com_io_dyn_mod, only : histid,histvid,histuid
+      USE temps_mod, ONLY: itau_dyn
+      
       implicit none
 
@@ -36,5 +38,4 @@
       include "paramet.h"
       include "comgeom.h"
-      include "temps.h"
       include "ener.h"
       include "logic.h"
Index: LMDZ5/trunk/libf/dyn3dmem/advtrac_loc.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dmem/advtrac_loc.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dmem/advtrac_loc.F	(revision 2601)
@@ -35,5 +35,4 @@
       include "comgeom2.h"
       include "logic.h"
-      include "temps.h"
       include "ener.h"
       include "description.h"
Index: LMDZ5/trunk/libf/dyn3dmem/bilan_dyn_loc.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dmem/bilan_dyn_loc.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dmem/bilan_dyn_loc.F	(revision 2601)
@@ -19,4 +19,5 @@
       USE comconst_mod, ONLY: cpp, pi
       USE comvert_mod, ONLY: presnivs
+      USE temps_mod, ONLY: annee_ref, day_ref, itau_dyn
       
       IMPLICIT NONE
@@ -25,5 +26,4 @@
       include "paramet.h"
       include "comgeom2.h"
-      include "temps.h"
       include "iniprint.h"
 
Index: LMDZ5/trunk/libf/dyn3dmem/call_calfis_mod.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3dmem/call_calfis_mod.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dmem/call_calfis_mod.F90	(revision 2601)
@@ -84,8 +84,8 @@
   USE comconst_mod, ONLY: dtphys
   USE comvert_mod, ONLY: ap, bp, pressure_exner
+  USE temps_mod, ONLY: day_ini, day_ref, jd_ref, jh_ref, start_time
   
   IMPLICIT NONE
     INCLUDE "logic.h"
-    INCLUDE "temps.h"
     INCLUDE "iniprint.h"
 
Index: LMDZ5/trunk/libf/dyn3dmem/conf_gcm.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3dmem/conf_gcm.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dmem/conf_gcm.F90	(revision 2601)
@@ -22,4 +22,5 @@
   USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy, &
                        alphax,alphay,taux,tauy
+  USE temps_mod, ONLY: calend
 
   IMPLICIT NONE
@@ -42,5 +43,4 @@
   include "logic.h"
   include "comdissnew.h"
-  include "temps.h"
   include "iniprint.h"
 
Index: LMDZ5/trunk/libf/dyn3dmem/dynetat0_loc.f90
===================================================================
--- LMDZ5/trunk/libf/dyn3dmem/dynetat0_loc.f90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dmem/dynetat0_loc.f90	(revision 2601)
@@ -16,9 +16,10 @@
                           omeg, rad
   USE serre_mod, ONLY: clon, clat, grossismx, grossismy
+  USE temps_mod, ONLY: annee_ref,day_ref,itau_dyn, &
+                       start_time,day_ini,hour_ini
   
   IMPLICIT NONE
   include "dimensions.h"
   include "paramet.h"
-  include "temps.h"
   include "comgeom.h"
   include "ener.h"
Index: LMDZ5/trunk/libf/dyn3dmem/dynredem_loc.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3dmem/dynredem_loc.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dmem/dynredem_loc.F90	(revision 2601)
@@ -18,4 +18,5 @@
   USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy, &
                        taux,tauy
+  USE temps_mod, ONLY: annee_ref, day_ref, itau_dyn, itaufin, start_time
 
   IMPLICIT NONE
@@ -23,5 +24,4 @@
   include "paramet.h"
   include "comgeom.h"
-  include "temps.h"
   include "ener.h"
   include "logic.h"
@@ -179,4 +179,6 @@
   USE dynredem_mod, ONLY: dynredem_write_u, dynredem_write_v, dynredem_read_u, &
                           err, modname, fil, msg
+  USE temps_mod, ONLY: itau_dyn, itaufin
+  
   IMPLICIT NONE
   include "dimensions.h"
@@ -184,5 +186,4 @@
   include "description.h"
   include "comgeom.h"
-  include "temps.h"
   include "iniprint.h"
 !===============================================================================
Index: LMDZ5/trunk/libf/dyn3dmem/gcm.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3dmem/gcm.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dmem/gcm.F90	(revision 2601)
@@ -22,4 +22,8 @@
 #endif
   USE comconst_mod, ONLY: cpp, daysec, dtphys, dtvr, g, r, rad
+  USE temps_mod, ONLY: calend,start_time,annee_ref,day_ref, &
+                       itau_dyn,itau_phy,day_ini,jD_ref,jH_ref,day_end, &
+                       dt,hour_ini,itaufin
+
   IMPLICIT NONE
 
@@ -58,5 +62,4 @@
   include "comgeom.h"
   include "logic.h"
-  include "temps.h"
   include "ener.h"
   include "description.h"
@@ -449,5 +452,9 @@
   !       write(78,*) 'q',q
 
-  !$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/,/logici/,/logicl/)
+  !!$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/,/logici/,/logicl/)
+  !$OMP PARALLEL DEFAULT(SHARED) COPYIN(/logici/,/logicl/) &
+  !     Copy all threadprivate variables in temps_mod
+  !$OMP COPYIN(dt,jD_ref,jH_ref,start_time,hour_ini,day_ini,day_end) &
+  !$OMP COPYIN(annee_ref,day_ref,itau_dyn,itau_phy,itaufin,calend)
   CALL leapfrog_loc(ucov,vcov,teta,ps,masse,phis,q,time_0)
   !$OMP END PARALLEL
Index: LMDZ5/trunk/libf/dyn3dmem/iniacademic_loc.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3dmem/iniacademic_loc.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dmem/iniacademic_loc.F90	(revision 2601)
@@ -20,4 +20,5 @@
   USE comconst_mod, ONLY: cpp, kappa, g, daysec, dtvr, pi, im, jm
   USE comvert_mod, ONLY: ap, bp, preff, presnivs, pressure_exner
+  USE temps_mod, ONLY: annee_ref, day_ini, day_ref
 
   !   Author:    Frederic Hourdin      original: 15/01/93
@@ -35,5 +36,4 @@
   include "academic.h"
   include "ener.h"
-  include "temps.h"
   include "iniprint.h"
   include "logic.h"
Index: LMDZ5/trunk/libf/dyn3dmem/initdynav_loc.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dmem/initdynav_loc.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dmem/initdynav_loc.F	(revision 2601)
@@ -16,4 +16,5 @@
        USE comconst_mod, ONLY: pi
        USE comvert_mod, ONLY: presnivs
+       USE temps_mod, ONLY: itau_dyn
        
        implicit none
@@ -47,5 +48,4 @@
       include "paramet.h"
       include "comgeom.h"
-      include "temps.h"
       include "ener.h"
       include "logic.h"
Index: LMDZ5/trunk/libf/dyn3dmem/initfluxsto_p.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dmem/initfluxsto_p.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dmem/initfluxsto_p.F	(revision 2601)
@@ -15,4 +15,5 @@
        USE comconst_mod, ONLY: pi
        USE comvert_mod, ONLY: nivsigs
+       USE temps_mod, ONLY: annee_ref, day_ref, itau_dyn
        
       implicit none
@@ -48,5 +49,4 @@
       include "paramet.h"
       include "comgeom.h"
-      include "temps.h"
       include "ener.h"
       include "logic.h"
Index: LMDZ5/trunk/libf/dyn3dmem/inithist_loc.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dmem/inithist_loc.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dmem/inithist_loc.F	(revision 2601)
@@ -16,4 +16,5 @@
        USE comconst_mod, ONLY: pi
        USE comvert_mod, ONLY: presnivs
+       USE temps_mod, ONLY: itau_dyn
        
        implicit none
@@ -46,5 +47,4 @@
       include "paramet.h"
       include "comgeom.h"
-      include "temps.h"
       include "ener.h"
       include "logic.h"
Index: LMDZ5/trunk/libf/dyn3dmem/integrd_loc.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dmem/integrd_loc.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dmem/integrd_loc.F	(revision 2601)
@@ -14,4 +14,5 @@
       USE comconst_mod, ONLY: pi
       USE comvert_mod, ONLY: ap, bp
+      USE temps_mod, ONLY: dt
       
       IMPLICIT NONE
@@ -37,5 +38,4 @@
       include "comgeom.h"
       include "logic.h"
-      include "temps.h"
       include "iniprint.h"
 
Index: LMDZ5/trunk/libf/dyn3dmem/leapfrog_loc.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dmem/leapfrog_loc.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dmem/leapfrog_loc.F	(revision 2601)
@@ -34,4 +34,6 @@
        USE comconst_mod, ONLY: cpp, dtvr, ihf
        USE comvert_mod, ONLY: ap, bp, pressure_exner
+       USE temps_mod, ONLY: itaufin,jD_ref,jH_ref,day_ini,
+     &                        day_ref,start_time,dt
        
       IMPLICIT NONE
@@ -73,5 +75,4 @@
       include "comgeom.h"
       include "logic.h"
-      include "temps.h"
       include "ener.h"
       include "description.h"
Index: LMDZ5/trunk/libf/dyn3dmem/temps.h
===================================================================
--- LMDZ5/trunk/libf/dyn3dmem/temps.h	(revision 2600)
+++ 	(revision )
@@ -1,27 +1,0 @@
-!
-! $Id$
-!
-!  ATTENTION!!!!: ce fichier include est compatible format fixe/format libre
-!                 veillez  n'utiliser que des ! pour les commentaires
-!                 et  bien positionner les & des lignes de continuation
-!                 (les placer en colonne 6 et en colonne 73)
-!
-!
-! jD_ref = jour julien de la date de reference (lancement de l'experience)
-! hD_ref = "heure" julienne de la date de reference
-!-----------------------------------------------------------------------
-! INCLUDE 'temps.h'
-
-      COMMON/temps/ dt, jD_ref, jH_ref, start_time,                     &
-     &             day_ini, day_end, annee_ref, day_ref,                &
-     &             itau_dyn, itau_phy, itaufin, calend
-
-
-      INTEGER   itaufin
-      INTEGER itau_dyn, itau_phy 
-      INTEGER day_ini, day_end, annee_ref, day_ref
-      REAL      dt, jD_ref, jH_ref, start_time
-      CHARACTER (len=10) :: calend
-
-!$OMP THREADPRIVATE(/temps/)
-!-----------------------------------------------------------------------
Index: LMDZ5/trunk/libf/dyn3dmem/temps_mod.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3dmem/temps_mod.F90	(revision 2601)
+++ LMDZ5/trunk/libf/dyn3dmem/temps_mod.F90	(revision 2601)
@@ -0,0 +1,33 @@
+!
+! $Id: temps_mod.F90 -1   $
+!
+MODULE temps_mod
+
+IMPLICIT NONE  
+
+  INTEGER   itaufin ! total number of dynamical steps for the run
+  INTEGER   itau_dyn
+  INTEGER   itau_phy
+  INTEGER   day_ini ! initial day # of simulation sequence
+  INTEGER   day_end ! final day # ; i.e. day # when this simulation ends
+  INTEGER   annee_ref
+  INTEGER   day_ref
+  REAL      dt ! (dynamics) time step (changes if doing Matsuno or LF step)
+  REAL      jD_ref ! reference julian day date (beginning of experiment)
+  REAL      jH_ref ! reference julian "hour" of reference julian date
+  REAL      start_time
+  CHARACTER (len=10) :: calend ! calendar type
+
+  ! Additionnal Mars stuff:
+  REAL hour_ini ! initial fraction of day of simulation sequence (0=<hour_ini<1)
+
+!$OMP THREADPRIVATE(dt,jD_ref,jH_ref,start_time,hour_ini,                        &
+!$OMP                day_ini,day_end,annee_ref,day_ref,itau_dyn,itau_phy,itaufin,&
+!$OMP                calend)        
+
+!WARNING: when adding a threadprivate variable in this module
+!        do not forget to add it to the copyin clause when opening an OpenMP
+!        parallel section. e.g. in gcm before call leapfrog_loc and/or
+!        possibly in iniphysiq
+
+END MODULE temps_mod
Index: LMDZ5/trunk/libf/dyn3dmem/writedynav_loc.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dmem/writedynav_loc.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dmem/writedynav_loc.F	(revision 2601)
@@ -14,4 +14,6 @@
       use com_io_dyn_mod, only : histaveid,histvaveid,histuaveid
       USE comconst_mod, ONLY: cpp
+      USE temps_mod, ONLY: itau_dyn
+      
       implicit none
 
@@ -45,5 +47,4 @@
       include "paramet.h"
       include "comgeom.h"
-      include "temps.h"
       include "ener.h"
       include "logic.h"
Index: LMDZ5/trunk/libf/dyn3dmem/writehist_loc.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dmem/writehist_loc.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dmem/writehist_loc.F	(revision 2601)
@@ -14,4 +14,6 @@
       use com_io_dyn_mod, only : histid,histvid,histuid
       USE comconst_mod, ONLY: cpp
+      USE temps_mod, ONLY: itau_dyn
+      
       implicit none
 
@@ -45,5 +47,4 @@
       include "paramet.h"
       include "comgeom.h"
-      include "temps.h"
       include "ener.h"
       include "logic.h"
Index: LMDZ5/trunk/libf/dyn3dpar/advtrac_p.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/advtrac_p.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dpar/advtrac_p.F90	(revision 2601)
@@ -27,5 +27,4 @@
   include "comgeom2.h"
   include "logic.h"
-  include "temps.h"
   include "ener.h"
   include "description.h"
Index: LMDZ5/trunk/libf/dyn3dpar/bilan_dyn_p.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/bilan_dyn_p.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dpar/bilan_dyn_p.F	(revision 2601)
@@ -19,4 +19,5 @@
       USE comconst_mod, ONLY: cpp, pi
       USE comvert_mod, ONLY: presnivs
+      USE temps_mod, ONLY: annee_ref, day_ref, itau_dyn
       
       IMPLICIT NONE
@@ -25,5 +26,4 @@
 #include "paramet.h"
 #include "comgeom2.h"
-#include "temps.h"
 #include "iniprint.h"
 
Index: LMDZ5/trunk/libf/dyn3dpar/conf_gcm.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/conf_gcm.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dpar/conf_gcm.F90	(revision 2601)
@@ -21,4 +21,5 @@
   USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy, &
                        alphax,alphay,taux,tauy
+  USE temps_mod, ONLY: calend
 
   IMPLICIT NONE
@@ -41,5 +42,4 @@
   include "logic.h"
   include "comdissnew.h"
-  include "temps.h"
   include "iniprint.h"
 
Index: LMDZ5/trunk/libf/dyn3dpar/dynetat0.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/dynetat0.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dpar/dynetat0.F	(revision 2601)
@@ -14,4 +14,6 @@
 
       USE serre_mod, ONLY: clon,clat,grossismx,grossismy
+      USE temps_mod, ONLY: annee_ref,day_ref,itau_dyn,
+     &                     start_time,day_ini,hour_ini
 
       IMPLICIT NONE
@@ -34,5 +36,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "temps.h"
 #include "comgeom2.h"
 #include "ener.h"
Index: LMDZ5/trunk/libf/dyn3dpar/dynredem.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/dynredem.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dpar/dynredem.F	(revision 2601)
@@ -14,4 +14,6 @@
       USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy,
      &                     taux,tauy
+      USE temps_mod, ONLY: annee_ref,day_ref,itau_dyn,itaufin,
+     &                        start_time,hour_ini
  
       IMPLICIT NONE
@@ -24,5 +26,4 @@
 #include "paramet.h"
 #include "comgeom2.h"
-#include "temps.h"
 #include "ener.h"
 #include "logic.h"
@@ -473,4 +474,5 @@
       use netcdf, only: NF90_get_VAR
       use netcdf95, only: NF95_PUT_VAR
+      USE temps_mod, ONLY: itau_dyn, itaufin
  
       IMPLICIT NONE
@@ -483,5 +485,4 @@
 #include "netcdf.inc"
 #include "comgeom.h"
-#include "temps.h"
 #include "iniprint.h"
 
Index: LMDZ5/trunk/libf/dyn3dpar/dynredem_p.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/dynredem_p.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dpar/dynredem_p.F	(revision 2601)
@@ -15,4 +15,6 @@
       USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy,
      &                     taux,tauy
+      USE temps_mod, ONLY: annee_ref,day_ref,itau_dyn,itaufin,
+     &                        start_time,hour_ini
  
       IMPLICIT NONE
@@ -25,5 +27,4 @@
 #include "paramet.h"
 #include "comgeom2.h"
-#include "temps.h"
 #include "ener.h"
 #include "logic.h"
@@ -474,4 +475,5 @@
       use netcdf, only: NF90_get_VAR
       use netcdf95, only: NF95_PUT_VAR
+      USE temps_mod, ONLY: itau_dyn, itaufin
  
       IMPLICIT NONE
@@ -484,5 +486,4 @@
 #include "netcdf.inc"
 #include "comgeom.h"
-#include "temps.h"
 
 
Index: LMDZ5/trunk/libf/dyn3dpar/fluxstokenc_p.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/fluxstokenc_p.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dpar/fluxstokenc_p.F	(revision 2601)
@@ -23,5 +23,4 @@
 #include "comgeom.h"
 #include "tracstoke.h"
-#include "temps.h"
 #include "iniprint.h"
 
Index: LMDZ5/trunk/libf/dyn3dpar/gcm.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/gcm.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dpar/gcm.F	(revision 2601)
@@ -33,4 +33,7 @@
 #endif
       USE comconst_mod, ONLY: cpp, daysec, dtphys, dtvr, g, r, rad
+      USE temps_mod, ONLY: calend,start_time,annee_ref,day_ref,
+     &                itau_dyn,itau_phy,day_ini,jD_ref,jH_ref,day_end,
+     &                dt,hour_ini,itaufin
 
       IMPLICIT NONE
@@ -70,5 +73,4 @@
 #include "comgeom.h"
 #include "logic.h"
-#include "temps.h"
 #include "ener.h"
 #include "description.h"
@@ -498,5 +500,9 @@
 c       write(78,*) 'q',q
 
-c$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/,/logici/,/logicl/)
+!c$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/,/logici/,/logicl/)
+c$OMP PARALLEL DEFAULT(SHARED) COPYIN(/logici/,/logicl/)
+c        Copy all threadprivate variables from temps_mod
+c$OMP1 COPYIN(dt,jD_ref,jH_ref,start_time,hour_ini,day_ini,day_end)
+c$OMP1 COPYIN(annee_ref,day_ref,itau_dyn,itau_phy,itaufin,calend)
       CALL leapfrog_p(ucov,vcov,teta,ps,masse,phis,q,time_0)
 c$OMP END PARALLEL
Index: LMDZ5/trunk/libf/dyn3dpar/iniacademic.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/iniacademic.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dpar/iniacademic.F90	(revision 2601)
@@ -18,4 +18,5 @@
   USE comconst_mod, ONLY: cpp, kappa, g, daysec, dtvr, pi, im, jm
   USE comvert_mod, ONLY: ap, bp, preff, presnivs, pressure_exner
+  USE temps_mod, ONLY: annee_ref, day_ini, day_ref
 
   !   Author:    Frederic Hourdin      original: 15/01/93
@@ -33,5 +34,4 @@
   include "academic.h"
   include "ener.h"
-  include "temps.h"
   include "iniprint.h"
   include "logic.h"
Index: LMDZ5/trunk/libf/dyn3dpar/initdynav_p.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/initdynav_p.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dpar/initdynav_p.F	(revision 2601)
@@ -14,4 +14,5 @@
        USE comconst_mod, ONLY: pi
        USE comvert_mod, ONLY: nivsigs
+       USE temps_mod, ONLY: itau_dyn
 
       implicit none
@@ -46,5 +47,4 @@
 #include "paramet.h"
 #include "comgeom.h"
-#include "temps.h"
 #include "ener.h"
 #include "logic.h"
Index: LMDZ5/trunk/libf/dyn3dpar/initfluxsto_p.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/initfluxsto_p.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dpar/initfluxsto_p.F	(revision 2601)
@@ -15,4 +15,5 @@
        USE comconst_mod, ONLY: pi
        USE comvert_mod, ONLY: nivsigs
+       USE temps_mod, ONLY: annee_ref, day_ref, itau_dyn
        
       implicit none
@@ -48,5 +49,4 @@
 #include "paramet.h"
 #include "comgeom.h"
-#include "temps.h"
 #include "ener.h"
 #include "logic.h"
Index: LMDZ5/trunk/libf/dyn3dpar/inithist_p.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/inithist_p.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dpar/inithist_p.F	(revision 2601)
@@ -15,4 +15,5 @@
        USE comconst_mod, ONLY: pi
        USE comvert_mod, ONLY: nivsigs
+       USE temps_mod, ONLY: itau_dyn
 
       implicit none
@@ -48,5 +49,4 @@
 #include "paramet.h"
 #include "comgeom.h"
-#include "temps.h"
 #include "ener.h"
 #include "logic.h"
Index: LMDZ5/trunk/libf/dyn3dpar/integrd_p.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/integrd_p.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dpar/integrd_p.F	(revision 2601)
@@ -9,4 +9,6 @@
       USE comconst_mod, ONLY: pi
       USE comvert_mod, ONLY: ap, bp
+      USE temps_mod, ONLY: dt
+      
       IMPLICIT NONE
 
@@ -31,5 +33,4 @@
 #include "comgeom.h"
 #include "logic.h"
-#include "temps.h"
 #include "iniprint.h"
 
@@ -283,5 +284,5 @@
       ije=ij_end
 
-	 if (planet_type.eq."earth") then
+         if (planet_type.eq."earth") then
 ! Earth-specific treatment of first 2 tracers (water)
 c$OMP BARRIER
@@ -384,6 +385,6 @@
           DO l = 1, llm
             massem1(ijb:ije,l)=massescr(ijb:ije,l)
-	  ENDDO
-c$OMP END DO NOWAIT	  
+          ENDDO
+c$OMP END DO NOWAIT  
       END IF
 c$OMP BARRIER
Index: LMDZ5/trunk/libf/dyn3dpar/leapfrog_p.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/leapfrog_p.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dpar/leapfrog_p.F	(revision 2601)
@@ -30,4 +30,7 @@
        USE comvert_mod, ONLY: ap,bp,pressure_exner,presnivs
        USE comconst_mod, ONLY: cpp, dtvr, ihf, dtphys, pi, jmp1
+       USE temps_mod, ONLY: itaufin,jD_ref,jH_ref,day_ini,
+     &                        day_ref,start_time,dt
+
       IMPLICIT NONE
 
@@ -68,5 +71,4 @@
 #include "comgeom.h"
 #include "logic.h"
-#include "temps.h"
 #include "ener.h"
 #include "description.h"
Index: LMDZ5/trunk/libf/dyn3dpar/temps.h
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/temps.h	(revision 2600)
+++ 	(revision )
@@ -1,27 +1,0 @@
-!
-! $Id$
-!
-!  ATTENTION!!!!: ce fichier include est compatible format fixe/format libre
-!                 veillez  n'utiliser que des ! pour les commentaires
-!                 et  bien positionner les & des lignes de continuation
-!                 (les placer en colonne 6 et en colonne 73)
-!
-!
-! jD_ref = jour julien de la date de reference (lancement de l'experience)
-! hD_ref = "heure" julienne de la date de reference
-!-----------------------------------------------------------------------
-! INCLUDE 'temps.h'
-
-      COMMON/temps/ dt, jD_ref, jH_ref, start_time,                     &
-     &             day_ini, day_end, annee_ref, day_ref,                &
-     &             itau_dyn, itau_phy, itaufin, calend
-
-
-      INTEGER   itaufin
-      INTEGER itau_dyn, itau_phy 
-      INTEGER day_ini, day_end, annee_ref, day_ref
-      REAL      dt, jD_ref, jH_ref, start_time
-      CHARACTER (len=10) :: calend
-
-!$OMP THREADPRIVATE(/temps/)
-!-----------------------------------------------------------------------
Index: LMDZ5/trunk/libf/dyn3dpar/temps_mod.F90
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/temps_mod.F90	(revision 2601)
+++ LMDZ5/trunk/libf/dyn3dpar/temps_mod.F90	(revision 2601)
@@ -0,0 +1,33 @@
+!
+! $Id$
+!
+MODULE temps_mod
+
+IMPLICIT NONE  
+
+  INTEGER   itaufin ! total number of dynamical steps for the run
+  INTEGER   itau_dyn
+  INTEGER   itau_phy
+  INTEGER   day_ini ! initial day # of simulation sequence
+  INTEGER   day_end ! final day # ; i.e. day # when this simulation ends
+  INTEGER   annee_ref
+  INTEGER   day_ref
+  REAL      dt ! (dynamics) time step (changes if doing Matsuno or LF step)
+  REAL      jD_ref ! reference julian day date (beginning of experiment)
+  REAL      jH_ref ! reference julian "hour" of reference julian date
+  REAL      start_time
+  CHARACTER (len=10) :: calend ! calendar type
+
+  ! Additionnal Mars stuff:
+  REAL hour_ini ! initial fraction of day of simulation sequence (0=<hour_ini<1)
+
+!$OMP THREADPRIVATE(dt,jD_ref,jH_ref,start_time,hour_ini,                        &
+!$OMP                day_ini,day_end,annee_ref,day_ref,itau_dyn,itau_phy,itaufin,&
+!$OMP                calend)        
+
+!WARNING: when adding a threadprivate variable in this module
+!        do not forget to add it to the copyin clause when opening an OpenMP
+!        parallel section. e.g. in gcm before call leapfrog_loc and/or
+!        possibly in iniphysiq
+
+END MODULE temps_mod
Index: LMDZ5/trunk/libf/dyn3dpar/writedynav_p.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/writedynav_p.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dpar/writedynav_p.F	(revision 2601)
@@ -13,4 +13,6 @@
       USE infotrac
       USE comconst_mod, ONLY: cpp
+      USE temps_mod, ONLY: itau_dyn
+      
       implicit none
 
@@ -44,5 +46,4 @@
 #include "paramet.h"
 #include "comgeom.h"
-#include "temps.h"
 #include "ener.h"
 #include "logic.h"
Index: LMDZ5/trunk/libf/dyn3dpar/writehist_p.F
===================================================================
--- LMDZ5/trunk/libf/dyn3dpar/writehist_p.F	(revision 2600)
+++ LMDZ5/trunk/libf/dyn3dpar/writehist_p.F	(revision 2601)
@@ -12,4 +12,6 @@
       USE misc_mod
       USE infotrac
+      USE temps_mod, ONLY: itau_dyn
+      
       implicit none
 
@@ -44,5 +46,4 @@
 #include "paramet.h"
 #include "comgeom.h"
-#include "temps.h"
 #include "ener.h"
 #include "logic.h"
Index: LMDZ5/trunk/libf/dynphy_lonlat/calfis.F
===================================================================
--- LMDZ5/trunk/libf/dynphy_lonlat/calfis.F	(revision 2600)
+++ LMDZ5/trunk/libf/dynphy_lonlat/calfis.F	(revision 2601)
@@ -93,5 +93,4 @@
       include "dimensions.h"
       include "paramet.h"
-      include "temps.h"
 
       INTEGER ngridmx
Index: LMDZ5/trunk/libf/dynphy_lonlat/calfis_loc.F
===================================================================
--- LMDZ5/trunk/libf/dynphy_lonlat/calfis_loc.F	(revision 2600)
+++ LMDZ5/trunk/libf/dynphy_lonlat/calfis_loc.F	(revision 2601)
@@ -111,5 +111,4 @@
       include "dimensions.h"
       include "paramet.h"
-      include "temps.h"
 
       INTEGER ngridmx
Index: LMDZ5/trunk/libf/dynphy_lonlat/calfis_p.F
===================================================================
--- LMDZ5/trunk/libf/dynphy_lonlat/calfis_p.F	(revision 2600)
+++ LMDZ5/trunk/libf/dynphy_lonlat/calfis_p.F	(revision 2601)
@@ -107,5 +107,4 @@
 #include "dimensions.h"
 #include "paramet.h"
-#include "temps.h"
 
       INTEGER ngridmx
Index: LMDZ5/trunk/libf/dynphy_lonlat/phylmd/ce0l.F90
===================================================================
--- LMDZ5/trunk/libf/dynphy_lonlat/phylmd/ce0l.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dynphy_lonlat/phylmd/ce0l.F90	(revision 2601)
@@ -37,4 +37,5 @@
                           pi, jmp1
   USE comvert_mod, ONLY: pa, preff, pressure_exner
+  USE temps_mod, ONLY: calend, day_ini, dt
 
   IMPLICIT NONE
@@ -46,5 +47,4 @@
   include "comgeom2.h"
   include "iniprint.h"
-  include "temps.h"
   include "logic.h"
   REAL               :: masque(iip1,jjp1)             !--- CONTINENTAL MASK
Index: LMDZ5/trunk/libf/dynphy_lonlat/phylmd/etat0dyn_netcdf.F90
===================================================================
--- LMDZ5/trunk/libf/dynphy_lonlat/phylmd/etat0dyn_netcdf.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dynphy_lonlat/phylmd/etat0dyn_netcdf.F90	(revision 2601)
@@ -38,4 +38,6 @@
   USE comconst_mod, ONLY: pi, cpp, kappa
   USE comvert_mod, ONLY: ap, bp, preff, pressure_exner
+  USE temps_mod, ONLY: annee_ref, day_ref, itau_dyn, itau_phy
+  
   IMPLICIT NONE
 
@@ -47,5 +49,4 @@
   include "paramet.h"
   include "comgeom2.h"
-  include "temps.h"
   include "comdissnew.h"
   REAL, SAVE :: deg2rad
Index: LMDZ5/trunk/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90
===================================================================
--- LMDZ5/trunk/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90	(revision 2601)
@@ -54,5 +54,4 @@
   include "comgeom2.h"
   include "dimsoil.h"
-  include "temps.h"
   include "clesphys.h"
   REAL, SAVE :: deg2rad
Index: LMDZ5/trunk/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90
===================================================================
--- LMDZ5/trunk/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90	(revision 2600)
+++ LMDZ5/trunk/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90	(revision 2601)
@@ -32,4 +32,5 @@
   USE inifis_mod, ONLY: inifis
   USE time_phylmdz_mod, ONLY: init_time
+  USE temps_mod, ONLY: annee_ref, day_ini, day_ref, start_time
   USE infotrac_phy, ONLY: init_infotrac_phy
   USE phystokenc_mod, ONLY: init_phystokenc
@@ -52,5 +53,4 @@
   include "dimensions.h"
   include "iniprint.h"
-  include "temps.h"
   include "tracstoke.h"
 
@@ -98,5 +98,8 @@
   ! --> now initialize things specific to the phylmd physics package
   
-!$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/)
+!!$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/)
+!$OMP PARALLEL DEFAULT(SHARED) &
+!	Copy all threadprivate variables in temps_mod
+!$OMP COPYIN(annee_ref, day_ini, day_ref, start_time)
 
   ! copy over preff , ap(), bp(), etc 
@@ -144,6 +147,7 @@
 #endif
   END IF
-!$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/)
 
+!!$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/)
+!$OMP PARALLEL DEFAULT(SHARED)
   ! Additional initializations for aquaplanets 
   IF (iflag_phys>=100) THEN
Index: LMDZ5/trunk/libf/phylmd/dyn1d/1DUTILS.h
===================================================================
--- LMDZ5/trunk/libf/phylmd/dyn1d/1DUTILS.h	(revision 2600)
+++ LMDZ5/trunk/libf/phylmd/dyn1d/1DUTILS.h	(revision 2601)
@@ -436,4 +436,5 @@
       use control_mod
       USE comconst_mod, ONLY: im, jm, lllm
+      USE temps_mod, ONLY: annee_ref, day_ini, day_ref, itau_dyn
 
       IMPLICIT NONE
@@ -444,5 +445,4 @@
 !   -------------
       include "dimensions.h"
-      include "temps.h"
 !!#include "control.h"
       include "logic.h"
@@ -580,4 +580,5 @@
       use control_mod
       USE comconst_mod, ONLY: cpp, daysec, dtvr, g, kappa, omeg, rad
+      USE temps_mod, ONLY: annee_ref,day_end,day_ref,itau_dyn,itaufin
 
       IMPLICIT NONE
@@ -588,5 +589,4 @@
 !   -------------
       include "dimensions.h"
-      include "temps.h"
 !!#include "control.h"
       include "logic.h"
Index: LMDZ5/trunk/libf/phylmd/dyn1d/lmdz1d.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/dyn1d/lmdz1d.F90	(revision 2600)
+++ LMDZ5/trunk/libf/phylmd/dyn1d/lmdz1d.F90	(revision 2601)
@@ -37,9 +37,10 @@
    USE mod_const_mpi, ONLY: comm_lmdz
    USE physiq_mod, ONLY: physiq
+   USE temps_mod, ONLY: annee_ref, calend, day_end, day_ini, day_ref, &
+                        itau_dyn, itau_phy, start_time
 
       implicit none
 #include "dimensions.h"
 #include "YOMCST.h"
-#include "temps.h"
 !!#include "control.h"
 #include "clesphys.h"
Index: LMDZ5/trunk/libf/phylmd/dyn1d/temps.h
===================================================================
--- LMDZ5/trunk/libf/phylmd/dyn1d/temps.h	(revision 2600)
+++ 	(revision )
@@ -1,1 +1,0 @@
-link ../../dyn3d/temps.h
Index: LMDZ5/trunk/libf/phylmd/dyn1d/temps_mod.F90
===================================================================
--- LMDZ5/trunk/libf/phylmd/dyn1d/temps_mod.F90	(revision 2601)
+++ LMDZ5/trunk/libf/phylmd/dyn1d/temps_mod.F90	(revision 2601)
@@ -0,0 +1,1 @@
+link ../../dyn3d/temps_mod.F90
