Index: trunk/LMDZ.COMMON/libf/dyn3dpar/ce0l.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3dpar/ce0l.F90	(revision 271)
+++ trunk/LMDZ.COMMON/libf/dyn3dpar/ce0l.F90	(revision 492)
@@ -1,4 +1,4 @@
 !
-! $Id: ce0l.F90 1511 2011-04-28 15:21:47Z jghattas $
+! $Id: ce0l.F90 1600 2011-12-06 13:16:30Z jghattas $
 !
 !-------------------------------------------------------------------------------
@@ -19,5 +19,8 @@
   USE dimphy
   USE comgeomphy
+  USE mod_phys_lmdz_para, mpi_root_xx=>mpi_root
+  USE mod_const_mpi
   USE infotrac
+  USE parallel, ONLY: finalize_parallel
 
 #ifdef CPP_IOIPSL
@@ -28,5 +31,5 @@
   IMPLICIT NONE
 #ifndef CPP_EARTH
-  WRITE(lunout,*)'limit_netcdf: Earth-specific routine, needs Earth physics'
+  WRITE(*,*)'limit_netcdf: Earth-specific routine, needs Earth physics'
 #else
 !-------------------------------------------------------------------------------
@@ -39,5 +42,10 @@
 #include "temps.h"
 #include "logic.h"
+#ifdef CPP_MPI
+      include 'mpif.h'
+#endif
+
   INTEGER, PARAMETER            :: longcles=20
+  INTEGER                       :: ierr
   REAL,    DIMENSION(longcles)  :: clesphy0
   REAL,    DIMENSION(iip1,jjp1) :: masque
@@ -47,6 +55,16 @@
   CALL conf_gcm( 99, .TRUE. , clesphy0 )
 
+#ifdef CPP_MPI
+  CALL init_mpi
+#endif
+
   CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/))
   WRITE(lunout,*)'---> klon=',klon
+  IF (mpi_size>1 .OR. omp_size>1) THEN
+       CALL abort_gcm('ce0l','In parallel mode,                         &
+ &                 ce0l must be called only                             &
+ &                 for 1 process and 1 task',1)
+  ENDIF
+
   CALL InitComgeomphy
 
@@ -67,9 +85,12 @@
 #endif
 
-  IF (config_inca /= 'none') THEN
+  IF (type_trac == 'inca') THEN
 #ifdef INCA
-    CALL init_const_lmdz(nbtr,anneeref,dayref,iphysiq,day_step,nday)
-    CALL init_inca_para(iim,jjm+1,klon,1,klon_mpi_para_nb,0)
-    WRITE(lunout,*)'nbtr =' , nbtr 
+      CALL init_const_lmdz( &
+         nbtr,anneeref,dayref,&
+         iphysiq,day_step,nday,& 
+         nbsrf, is_oce,is_sic,&
+         is_ter,is_lic)
+      
 #endif
   END IF
@@ -100,4 +121,12 @@
      CALL grilles_gcm_netcdf_sub(masque,phis)
   END IF
+  
+#ifdef CPP_MPI
+!$OMP MASTER
+  CALL MPI_FINALIZE(ierr)
+  IF (ierr /= 0) CALL abort_gcm('ce0l','Error in MPI_FINALIZE',1)
+!$OMP END MASTER
+#endif
+
 #endif
 ! of #ifndef CPP_EARTH #else
Index: trunk/LMDZ.COMMON/libf/dyn3dpar/conf_gcm.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3dpar/conf_gcm.F	(revision 271)
+++ trunk/LMDZ.COMMON/libf/dyn3dpar/conf_gcm.F	(revision 492)
@@ -17,4 +17,5 @@
       use parallel, ONLY : omp_chunk
       USE control_mod
+      USE infotrac, ONLY : type_trac
       IMPLICIT NONE
 c-----------------------------------------------------------------------
@@ -97,5 +98,7 @@
       CALL getin('lunout', lunout)
       IF (lunout /= 5 .and. lunout /= 6) THEN
-        OPEN(lunout,FILE='lmdz.out')
+        OPEN(UNIT=lunout,FILE='lmdz.out_0000',ACTION='write', 
+     &          STATUS='unknown',FORM='formatted')
+
       ENDIF
 
@@ -166,4 +169,12 @@
       nday = 10
       CALL getin('nday',nday)
+
+!Config  Key  = starttime
+!Config  Desc = Heure de depart de la simulation
+!Config  Def  = 0
+!Config  Help = Heure de depart de la simulation
+!Config         en jour
+      starttime = 0
+      CALL getin('starttime',starttime)
 
 !Config  Key  = less1day
@@ -623,4 +634,14 @@
        END IF
        
+!Config  Key  = type_trac
+!Config  Desc = Choix de couplage avec model de chimie INCA ou REPROBUS
+!Config  Def  = lmdz
+!Config  Help = 
+!Config         'lmdz' = pas de couplage, pur LMDZ
+!Config         'inca' = model de chime INCA 
+!Config         'repr' = model de chime REPROBUS
+      type_trac = 'lmdz'
+      CALL getin('type_trac',type_trac)
+
 !Config  Key  = config_inca
 !Config  Desc = Choix de configuration de INCA
@@ -699,4 +720,5 @@
       write(lunout,*)' tauyy = ', tauyy
       write(lunout,*)' offline = ', offline
+      write(lunout,*)' type_trac = ', type_trac
       write(lunout,*)' config_inca = ', config_inca
       write(lunout,*)' ok_dynzon = ', ok_dynzon 
@@ -825,4 +847,14 @@
      &         'only the file phystoke.nc will still be created ' 
        END IF
+
+!Config  Key  = type_trac
+!Config  Desc = Choix de couplage avec model de chimie INCA ou REPROBUS
+!Config  Def  = lmdz
+!Config  Help = 
+!Config         'lmdz' = pas de couplage, pur LMDZ
+!Config         'inca' = model de chime INCA 
+!Config         'repr' = model de chime REPROBUS
+      type_trac = 'lmdz'
+      CALL getin('type_trac',type_trac)
 
 !Config  Key  = config_inca
@@ -974,4 +1006,5 @@
       write(lunout,*)' tauy = ', tauy
       write(lunout,*)' offline = ', offline
+      write(lunout,*)' type_trac = ', type_trac
       write(lunout,*)' config_inca = ', config_inca
       write(lunout,*)' ok_dynzon = ', ok_dynzon 
Index: trunk/LMDZ.COMMON/libf/dyn3dpar/control_mod.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3dpar/control_mod.F90	(revision 271)
+++ trunk/LMDZ.COMMON/libf/dyn3dpar/control_mod.F90	(revision 492)
@@ -10,5 +10,5 @@
   IMPLICIT NONE
 
-  REAL    :: periodav
+  REAL    :: periodav, starttime
   INTEGER :: nday,day_step,iperiod,iapp_tracvl,nsplit_phys
   INTEGER :: iconser,iecri,dissip_period,iphysiq,iecrimoy
Index: trunk/LMDZ.COMMON/libf/dyn3dpar/dynetat0.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3dpar/dynetat0.F	(revision 271)
+++ trunk/LMDZ.COMMON/libf/dyn3dpar/dynetat0.F	(revision 492)
@@ -119,4 +119,5 @@
       day_ini = tab_cntrl(30)
       itau_dyn = tab_cntrl(31)
+      start_time = tab_cntrl(32)
 c   .................................................................
 c
Index: trunk/LMDZ.COMMON/libf/dyn3dpar/dynredem.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3dpar/dynredem.F	(revision 271)
+++ trunk/LMDZ.COMMON/libf/dyn3dpar/dynredem.F	(revision 492)
@@ -120,4 +120,6 @@
        tab_cntrl(30) = REAL(iday_end)
        tab_cntrl(31) = REAL(itau_dyn + itaufin)
+c start_time: start_time of simulation (not necessarily 0.)
+       tab_cntrl(32) = start_time
 c
 c    .........................................................
@@ -136,5 +138,5 @@
 c
       ierr = NF_PUT_ATT_TEXT (nid, NF_GLOBAL, "title", 27,
-     .                       "Fichier demmarage dynamique")
+     .                       "Fichier demarrage dynamique")
 c
 c Definir les dimensions du fichiers:
@@ -536,5 +538,4 @@
 #include "iniprint.h"
 
-
       INTEGER l
       REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) 
@@ -641,5 +642,5 @@
 #endif
 
-      IF (config_inca /= 'none') THEN
+      IF (type_trac == 'inca') THEN
 ! Ajout Anne pour lecture valeurs traceurs dans un fichier start_trac.nc
          ierr_file = NF_OPEN ("start_trac.nc", NF_NOWRITE,nid_trac)
@@ -654,5 +655,5 @@
       do iq=1,nqtot 
 
-         IF (config_inca == 'none') THEN
+         IF (type_trac /= 'inca') THEN
             ierr = NF_INQ_VARID(nid, tname(iq), nvarid)
             IF (ierr .NE. NF_NOERR) THEN
@@ -666,5 +667,5 @@
             ierr = NF_PUT_VAR_REAL (nid,nvarid,q(1,1,iq))
 #endif
-        ELSE ! config_inca = 'chem' ou 'aero'
+        ELSE ! type_trac = inca
 ! lecture de la valeur du traceur dans start_trac.nc
            IF (ierr_file .ne. 2) THEN
@@ -730,5 +731,5 @@
 #endif
           ENDIF ! (ierr_file .ne. 2)
-       END IF   ! config_inca
+       END IF   !type_trac
       
       ENDDO
Index: trunk/LMDZ.COMMON/libf/dyn3dpar/dynredem_p.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3dpar/dynredem_p.F	(revision 271)
+++ trunk/LMDZ.COMMON/libf/dyn3dpar/dynredem_p.F	(revision 492)
@@ -1,4 +1,4 @@
 !
-! $Id: dynredem_p.F 1403 2010-07-01 09:02:53Z fairhead $
+! $Id: dynredem_p.F 1577 2011-10-20 15:06:47Z fairhead $
 !
 c
@@ -120,4 +120,6 @@
        tab_cntrl(30) =  REAL(iday_end)
        tab_cntrl(31) =  REAL(itau_dyn + itaufin)
+c start_time: start_time of simulation (not necessarily 0.)
+       tab_cntrl(32) = start_time
 c
 c    .........................................................
@@ -650,5 +652,5 @@
 #endif
 
-      IF (config_inca /= 'none') THEN
+      IF (type_trac == 'inca') THEN
 ! Ajout Anne pour lecture valeurs traceurs dans un fichier start_trac.nc
          inquire(FILE="start_trac.nc", EXIST=exist_file) 
@@ -667,5 +669,5 @@
       do iq=1,nqtot 
 
-         IF (config_inca == 'none') THEN
+         IF (type_trac /= 'inca') THEN
             ierr = NF_INQ_VARID(nid, tname(iq), nvarid)
             IF (ierr .NE. NF_NOERR) THEN
@@ -678,5 +680,5 @@
             ierr = NF_PUT_VAR_REAL (nid,nvarid,q(1,1,iq))
 #endif
-        ELSE ! config_inca = 'chem' ou 'aero'
+        ELSE ! type_trac = inca
 ! lecture de la valeur du traceur dans start_trac.nc
            IF (ierr_file .ne. 2) THEN
@@ -732,5 +734,5 @@
 #endif
           ENDIF ! (ierr_file .ne. 2)
-       END IF   ! config_inca
+       END IF   ! type_trac
       
       ENDDO
Index: trunk/LMDZ.COMMON/libf/dyn3dpar/filtreg_p.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3dpar/filtreg_p.F	(revision 271)
+++ trunk/LMDZ.COMMON/libf/dyn3dpar/filtreg_p.F	(revision 492)
@@ -208,24 +208,39 @@
                IF( ifiltre.EQ.-2 )   THEN
                   DO j = jdfil,jffil
+#ifdef BLAS
                      CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 
      &                    matrinvn(1,1,j), iim, 
      &                    champ_loc(1,j,1), iip1*nlat, 0.0,
      &                    champ_fft(1,j-jdfil+1,1), iip1*nlat)
+#else
+                     champ_fft(:,j-jdfil+1,:)
+     &                    =matmul(matrinvn(:,:,j),champ_loc(:iim,j,:))
+#endif
                   ENDDO
                   
                ELSE IF ( griscal )     THEN
                   DO j = jdfil,jffil
+#ifdef BLAS
                      CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 
      &                    matriceun(1,1,j), iim, 
      &                    champ_loc(1,j,1), iip1*nlat, 0.0,
      &                    champ_fft(1,j-jdfil+1,1), iip1*nlat)
+#else
+                     champ_fft(:,j-jdfil+1,:)
+     &                    =matmul(matriceun(:,:,j),champ_loc(:iim,j,:))
+#endif
                   ENDDO
                   
                ELSE 
                   DO j = jdfil,jffil
+#ifdef BLAS
                      CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 
      &                    matricevn(1,1,j), iim, 
      &                    champ_loc(1,j,1), iip1*nlat, 0.0, 
      &                    champ_fft(1,j-jdfil+1,1), iip1*nlat)
+#else
+                     champ_fft(:,j-jdfil+1,:)
+     &                    =matmul(matricevn(:,:,j),champ_loc(:iim,j,:))
+#endif
                   ENDDO
                   
@@ -236,8 +251,14 @@
                IF( ifiltre.EQ.-2 )   THEN
                   DO j = jdfil,jffil
+#ifdef BLAS
                      CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 
      &                    matrinvs(1,1,j-jfiltsu+1), iim, 
      &                    champ_loc(1,j,1), iip1*nlat, 0.0, 
      &                    champ_fft(1,j-jdfil+1,1), iip1*nlat)
+#else
+                     champ_fft(:,j-jdfil+1,:)
+     &                    =matmul(matrinvs(:,:,j-jfiltsu+1),
+     &                            champ_loc(:iim,j,:))
+#endif
                   ENDDO
                   
@@ -245,8 +266,14 @@
                   
                   DO j = jdfil,jffil
+#ifdef BLAS
                      CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 
      &                    matriceus(1,1,j-jfiltsu+1), iim, 
      &                    champ_loc(1,j,1), iip1*nlat, 0.0, 
      &                    champ_fft(1,j-jdfil+1,1), iip1*nlat)
+#else
+                     champ_fft(:,j-jdfil+1,:)
+     &                    =matmul(matriceus(:,:,j-jfiltsu+1),
+     &                            champ_loc(:iim,j,:))
+#endif
                   ENDDO
                   
@@ -254,8 +281,14 @@
                   
                   DO j = jdfil,jffil
+#ifdef BLAS
                      CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 
      &                    matricevs(1,1,j-jfiltsv+1), iim, 
      &                    champ_loc(1,j,1), iip1*nlat, 0.0, 
      &                    champ_fft(1,j-jdfil+1,1), iip1*nlat)
+#else
+                     champ_fft(:,j-jdfil+1,:)
+     &                    =matmul(matricevs(:,:,j-jfiltsv+1),
+     &                            champ_loc(:iim,j,:))
+#endif
                   ENDDO
                   
Index: trunk/LMDZ.COMMON/libf/dyn3dpar/gcm.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3dpar/gcm.F	(revision 271)
+++ trunk/LMDZ.COMMON/libf/dyn3dpar/gcm.F	(revision 492)
@@ -250,5 +250,5 @@
 c-----------------------------------------------------------------------
 
-      IF (config_inca /= 'none') THEN
+      IF (type_trac == 'inca') THEN
 #ifdef INCA
          call init_const_lmdz(
@@ -337,4 +337,15 @@
 C on remet le calendrier à zero si demande
 c
+      IF (start_time /= starttime) then
+        WRITE(lunout,*)' GCM: Attention l''heure de depart lue dans le'
+     &,' fichier restart ne correspond pas à celle lue dans le run.def'
+        IF (raz_date == 1) then
+          WRITE(lunout,*)'Je prends l''heure lue dans run.def'
+          start_time = starttime
+        ELSE
+          WRITE(lunout,*)'Je m''arrete'
+          CALL abort
+        ENDIF
+      ENDIF
       IF (raz_date == 1) THEN
         annee_ref = anneeref
@@ -480,5 +491,5 @@
 c   Initialisation des dimensions d'INCA :
 c   --------------------------------------
-      IF (config_inca /= 'none') THEN
+      IF (type_trac == 'inca') THEN
 #ifdef INCA
 !$OMP PARALLEL
Index: trunk/LMDZ.COMMON/libf/dyn3dpar/infotrac.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3dpar/infotrac.F90	(revision 271)
+++ trunk/LMDZ.COMMON/libf/dyn3dpar/infotrac.F90	(revision 492)
@@ -32,4 +32,7 @@
   SUBROUTINE infotrac_init
     USE control_mod
+#ifdef REPROBUS
+    USE CHEM_REP, ONLY : Init_chem_rep_trac
+#endif
     IMPLICIT NONE
 !=======================================================================
@@ -85,12 +88,37 @@
     
     IF (planet_type=='earth') THEN
-     IF (config_inca=='none') THEN
-       type_trac='lmdz'
+     ! Coherence test between parameter type_trac, config_inca and preprocessing keys
+     IF (type_trac=='inca') THEN
+       WRITE(lunout,*) 'You have choosen to couple with INCA chemestry model : type_trac=', &
+            type_trac,' config_inca=',config_inca
+       IF (config_inca/='aero' .AND. config_inca/='chem') THEN
+          WRITE(lunout,*) 'Incoherence between type_trac and config_inca. Model stops. Modify run.def'
+          CALL abort_gcm('infotrac_init','Incoherence between type_trac and config_inca',1)
+       END IF
+#ifndef INCA
+       WRITE(lunout,*) 'To run this option you must add cpp key INCA and compile with INCA code'
+       CALL abort_gcm('infotrac_init','You must compile with cpp key INCA',1)
+#endif
+     ELSE IF (type_trac=='repr') THEN
+       WRITE(lunout,*) 'You have choosen to couple with REPROBUS chemestry model : type_trac=', type_trac
+#ifndef REPROBUS
+       WRITE(lunout,*) 'To run this option you must add cpp key REPROBUS and compile with REPRPBUS code'
+       CALL abort_gcm('infotrac_init','You must compile with cpp key REPROBUS',1)
+#endif
+     ELSE IF (type_trac == 'lmdz') THEN
+       WRITE(lunout,*) 'Tracers are treated in LMDZ only : type_trac=', type_trac
      ELSE
-       type_trac='inca'
+       WRITE(lunout,*) 'type_trac=',type_trac,' not possible. Model stops'
+       CALL abort_gcm('infotrac_init','bad parameter',1)
+     END IF
+
+     ! Test if config_inca is other then none for run without INCA
+     IF (type_trac/='inca' .AND. config_inca/='none') THEN
+       WRITE(lunout,*) 'config_inca will now be changed to none as you do not couple with INCA model'
+       config_inca='none'
      END IF
     ELSE
      type_trac='plnt'  ! planets... May want to dissociate between each later.
-    ENDIF
+    ENDIF ! of IF (planet_type=='earth')
 
 !-----------------------------------------------------------------------
@@ -101,17 +129,17 @@
 !-----------------------------------------------------------------------
     IF (planet_type=='earth') THEN
-     IF (type_trac == 'lmdz') THEN
+     IF (type_trac == 'lmdz' .OR. type_trac == 'repr') THEN
        OPEN(90,file='traceur.def',form='formatted',status='old', iostat=ierr)
        IF(ierr.EQ.0) THEN
-          WRITE(lunout,*) 'Open traceur.def : ok'
+          WRITE(lunout,*) trim(modname),': Open traceur.def : ok'
           READ(90,*) nqtrue
        ELSE 
-          WRITE(lunout,*) 'Problem in opening traceur.def'
-          WRITE(lunout,*) 'ATTENTION using defaut values'
+          WRITE(lunout,*) trim(modname),': Problem in opening traceur.def'
+          WRITE(lunout,*) trim(modname),': WARNING using defaut values'
           nqtrue=4 ! Defaut value
        END IF
        ! For Earth, water vapour & liquid tracers are not in the physics
        nbtr=nqtrue-2
-     ELSE
+     ELSE ! type_trac=inca
        ! nbtr has been read from INCA by init_cont_lmdz() in gcm.F 
        nqtrue=nbtr+2
@@ -121,4 +149,11 @@
        WRITE(lunout,*) trim(modname),': nqtrue=',nqtrue, ' is not allowded. 2 tracers is the minimum'
        CALL abort_gcm('infotrac_init','Not enough tracers',1)
+     END IF
+
+! Transfert number of tracers to Reprobus
+     IF (type_trac == 'repr') THEN
+#ifdef REPROBUS
+       CALL Init_chem_rep_trac(nbtr)
+#endif
      END IF
 
@@ -173,5 +208,5 @@
 !---------------------------------------------------------------------
     IF (planet_type=='earth') THEN
-     IF (type_trac == 'lmdz') THEN
+     IF (type_trac == 'lmdz' .OR. type_trac == 'repr') THEN
        IF(ierr.EQ.0) THEN
           ! Continue to read tracer.def
Index: trunk/LMDZ.COMMON/libf/dyn3dpar/iniacademic.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3dpar/iniacademic.F90	(revision 271)
+++ trunk/LMDZ.COMMON/libf/dyn3dpar/iniacademic.F90	(revision 492)
@@ -209,8 +209,13 @@
         ! surface pressure
         if (iflag_phys>2) then
-           ps(:)=108080.  ! Earth aqua/terra planets
-        else
+           ! specific value for CMIP5 aqua/terra planets
+           ! "Specify the initial dry mass to be equivalent to
+           !  a global mean surface pressure (101325 minus 245) Pa."
+           ps(:)=101080.  
+        else
+           ! use reference surface pressure
            ps(:)=preff
         endif
+        
         ! ground geopotential
         phis(:)=0.
Index: trunk/LMDZ.COMMON/libf/dyn3dpar/leapfrog_p.F
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3dpar/leapfrog_p.F	(revision 271)
+++ trunk/LMDZ.COMMON/libf/dyn3dpar/leapfrog_p.F	(revision 492)
@@ -198,5 +198,4 @@
 
       INTEGER :: true_itau
-      LOGICAL :: verbose=.true.
       INTEGER :: iapptrac
       INTEGER :: AdjustCount
@@ -282,7 +281,12 @@
    1  CONTINUE
 
-      jD_cur = jD_ref + day_ini - day_ref + int (itau * dtvr / daysec) 
-      jH_cur = jH_ref +                                                 &
+      jD_cur = jD_ref + day_ini - day_ref +                             &
+     &          int (itau * dtvr / daysec) 
+      jH_cur = jH_ref + start_time +                                    &
      &          (itau * dtvr / daysec - int(itau * dtvr / daysec)) 
+      if (jH_cur > 1.0 ) then
+        jD_cur = jD_cur +1.
+        jH_cur = jH_cur -1.
+      endif
 
 
@@ -441,5 +445,5 @@
            call allgather_timer_average
 
-        if (Verbose) then
+        if (prt_level > 9) then
         
         print *,'*********************************'
@@ -761,7 +765,11 @@
            jD_cur = jD_ref + day_ini - day_ref
      $        + int (itau * dtvr / daysec) 
-           jH_cur = jH_ref +                                            &
+           jH_cur = jH_ref + start_time +                                &
      &              (itau * dtvr / daysec - int(itau * dtvr / daysec)) 
 !         call ju2ymds(jD_cur+jH_cur, an, mois, jour, secondes)
+           if (jH_cur > 1.0 ) then
+             jD_cur = jD_cur +1.
+             jH_cur = jH_cur -1.
+           endif
 
 c rajout debug
Index: trunk/LMDZ.COMMON/libf/dyn3dpar/parallel.F90
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3dpar/parallel.F90	(revision 271)
+++ trunk/LMDZ.COMMON/libf/dyn3dpar/parallel.F90	(revision 492)
@@ -1,4 +1,4 @@
 ! 
-! $Id: parallel.F90 1487 2011-02-11 15:07:54Z jghattas $
+! $Id: parallel.F90 1575 2011-09-21 13:57:48Z jghattas $
 !
   module parallel
@@ -43,5 +43,7 @@
       integer, dimension(3) :: blocklen,type
       integer :: comp_id
-
+      character(len=4)  :: num
+      character(len=20) :: filename
+ 
 #ifdef CPP_OMP    
       INTEGER :: OMP_GET_NUM_THREADS
@@ -75,5 +77,16 @@
         mpi_rank=0
       ENDIF
-  
+
+
+! Open text output file with mpi_rank in suffix of file name 
+      IF (lunout /= 5 .and. lunout /= 6) THEN
+         WRITE(num,'(I4.4)') mpi_rank
+         filename='lmdz.out_'//num
+         IF (mpi_rank .NE. 0) THEN
+            OPEN(UNIT=lunout,FILE=TRIM(filename),ACTION='write', &
+               STATUS='unknown',FORM='formatted',IOSTAT=ierr) 
+         ENDIF
+      ENDIF
+
       
       allocate(jj_begin_para(0:mpi_size-1))
Index: trunk/LMDZ.COMMON/libf/dyn3dpar/temps.h
===================================================================
--- trunk/LMDZ.COMMON/libf/dyn3dpar/temps.h	(revision 271)
+++ trunk/LMDZ.COMMON/libf/dyn3dpar/temps.h	(revision 492)
@@ -14,10 +14,12 @@
 
       COMMON/temps/itaufin, dt, day_ini, day_end, annee_ref, day_ref,   &
-     &             itau_dyn, itau_phy, jD_ref, jH_ref, calend
+     &             itau_dyn, itau_phy, jD_ref, jH_ref, calend,          &
+     &             start_time
+
 
       INTEGER   itaufin
       INTEGER itau_dyn, itau_phy
       INTEGER day_ini, day_end, annee_ref, day_ref
-      REAL      dt, jD_ref, jH_ref
+      REAL      dt, jD_ref, jH_ref, start_time
       CHARACTER (len=10) :: calend
 
