Index: /LMDZ5/trunk/libf/phylmd/physiq.F90
===================================================================
--- /LMDZ5/trunk/libf/phylmd/physiq.F90	(revision 2089)
+++ /LMDZ5/trunk/libf/phylmd/physiq.F90	(revision 2090)
@@ -11,5 +11,5 @@
 
   USE ioipsl, only: histbeg, histvert, histdef, histend, histsync, &
-       histwrite, ju2ymds, ymds2ju, ioget_year_len
+       histwrite, ju2ymds, ymds2ju, ioget_year_len, getin
   USE comgeomphy
   USE phys_cal_mod
@@ -710,5 +710,6 @@
   character*20 modname
   character*80 abort_message
-  logical ok_sync
+  logical, save ::  ok_sync, ok_sync_omp
+  !$OMP THREADPRIVATE(ok_sync)
   real date0
   integer idayref
@@ -946,5 +947,4 @@
      END DO
   END IF
-  ok_sync=.false.
 
   IF (debut) THEN
@@ -1230,4 +1230,8 @@
 
      !$OMP MASTER
+! FH : if ok_sync=.true. , the time axis is written at each time step
+! in the output files. Only at the end in the opposite case
+     ok_sync_omp=.false.
+     CALL getin('ok_sync',ok_sync_omp)
      call phys_output_open(rlon,rlat,nCFMIP,tabijGCM, &
           iGCM,jGCM,lonGCM,latGCM, &
@@ -1239,7 +1243,8 @@
           flag_aerosol_strat, pdtphys, paprs, pphis,  &
           pplay, lmax_th, ptconv, ptconvth, ivap,  &
-          d_t, qx, d_qx, zmasse, ok_sync)
+          d_t, qx, d_qx, zmasse, ok_sync_omp)
      !$OMP END MASTER
      !$OMP BARRIER
+     ok_sync=ok_sync_omp
 
      freq_outNMC(1) = ecrit_files(7)
