Index: /trunk/ICOSA_LMDZ/src/distrib_icosa_lmdz.f90
===================================================================
--- /trunk/ICOSA_LMDZ/src/distrib_icosa_lmdz.f90	(revision 1999)
+++ /trunk/ICOSA_LMDZ/src/distrib_icosa_lmdz.f90	(revision 2000)
@@ -90,4 +90,5 @@
     INTEGER,POINTER :: index(:)
     
+!$OMP BARRIER
     pos=0
     DO ind=1,ndomain_distrib
@@ -114,4 +115,5 @@
     INTEGER :: l
     
+!$OMP BARRIER
     DO l=1,size(field_lmdz,2)  
       pos=0
@@ -141,4 +143,5 @@
     INTEGER :: l,q
 
+!$OMP BARRIER
     DO q=1,size(field_lmdz,3)  
       DO l=1,size(field_lmdz,2)  
@@ -167,4 +170,5 @@
     INTEGER,POINTER :: index(:)
     
+!$OMP BARRIER
     pos=0
     DO ind=1,ndomain_distrib
@@ -189,4 +193,5 @@
     INTEGER :: l
     
+!$OMP BARRIER
     DO l=1,size(field_lmdz,2)  
       pos=0
@@ -215,4 +220,5 @@
     INTEGER :: l,q
     
+!$OMP BARRIER
     DO q=1,size(field_lmdz,3)  
       DO l=1,size(field_lmdz,2)  
Index: /trunk/ICOSA_LMDZ/src/phystd/interface_icosa_lmdz.f90
===================================================================
--- /trunk/ICOSA_LMDZ/src/phystd/interface_icosa_lmdz.f90	(revision 1999)
+++ /trunk/ICOSA_LMDZ/src/phystd/interface_icosa_lmdz.f90	(revision 2000)
@@ -255,5 +255,4 @@
     ENDDO
 
-!$OMP BARRIER
       
     CALL transfer_icosa_to_lmdz(f_ind_cell_glo,ind_cell_glo)
@@ -276,5 +275,4 @@
 
     ! Initialize tracer names, numbers, etc. for physics
-!$OMP MASTER
     !Config  Key  = type_trac
     !Config  Desc = Choix de couplage avec model de chimie INCA ou REPROBUS
@@ -290,5 +288,8 @@
 !    nqo=2
 !    nbtr=2
+!$OMP MASTER
     ALLOCATE(tname(nqtot))
+!$OMP END MASTER
+!$OMP BARRIER
 !    ALLOCATE(ttext(nqtot))
 !    ALLOCATE(niadv(nqtot))
@@ -299,4 +300,6 @@
 
 ! read tname() from traceur.def file
+    IF (is_mpi_root) THEN
+!$OMP MASTER
     OPEN(unit=42,file="traceur.def",form="formatted",status="old",iostat=ierr)
     IF (ierr==0) THEN
@@ -313,4 +316,9 @@
 !$OMP END MASTER
 !$OMP BARRIER
+    ENDIF ! of (is_mpi_root)
+
+    DO i=1,nqtot
+      CALL bcast(tname(i))
+    ENDDO
 
 !    CALL init_infotrac_phy(nqtot,nqo,nbtr,tname,ttext,type_trac,&
@@ -325,5 +333,4 @@
 !    CALL inifis(klon_omp,nlayer,nqtot,pdayref,punjours,nday,ptimestep, &
 !            latitude,longitude,cell_area,prad,pg,pr,pcpp)
-!$OMP MASTER
 
     startphy_file=.true.
@@ -332,4 +339,6 @@
     IF (startphy_file) THEN
 
+      IF (is_mpi_root) THEN
+!$OMP MASTER      
       status=nf90_open('startfi.nc',NF90_NOWRITE,ncid)
       if (status.ne.nf90_noerr) then
@@ -348,6 +357,11 @@
       status=nf90_get_var(ncid,varid,tab_cntrl)
       start_day=tab_cntrl(3)
-      print*,"start_day YORGL",start_day
+      print*,"initialize_physics_omp: start_day",start_day
       status=nf90_close(ncid)
+!$OMP END MASTER      
+!$OMP BARRIER
+      ENDIF ! of !IF (is_mpi_root)
+      
+      CALL bcast(start_day)
 
     ELSE
@@ -364,6 +378,5 @@
     ndays=nint(itaumax*(dt/day_length))! number of days to run
     physics_timestep=dt*itau_physics
-!$OMP END MASTER
-!$OMP BARRIER
+
     CALL inifis(klon_omp,llm,nqtot,start_day,day_length,ndays,physics_timestep, &
             latfi,lonfi,airefi,radius,g,kappa*cpp,cpp)
@@ -596,5 +609,7 @@
 
     DO l=1,llm
-      wflux_phy(:,l)=wflux_phy(:,l)*cell_area(:)
+      ! Warning: In the physics, vertical flux convention is positive if downwards!
+      wflux_phy(:,l)= - wflux_phy(:,l)*cell_area(:)
+      ! Compute relative geopotential
       phi_phy(:,l)=phi_phy(:,l)-phis_phy(:)
     ENDDO
Index: /trunk/ICOSA_LMDZ/src/phyvenus/interface_icosa_lmdz.f90
===================================================================
--- /trunk/ICOSA_LMDZ/src/phyvenus/interface_icosa_lmdz.f90	(revision 1999)
+++ /trunk/ICOSA_LMDZ/src/phyvenus/interface_icosa_lmdz.f90	(revision 2000)
@@ -38,4 +38,5 @@
   
   CHARACTER(len=30),SAVE,ALLOCATABLE :: tname(:) ! tracer names
+  CHARACTER(len=33),SAVE,ALLOCATABLE :: ttext(:) ! tracer long name for diagnostics
   REAL,SAVE :: pday ! number of ellapsed sols since Ls=0
   REAL,SAVE :: ptime ! "universal time" as fraction of sol (e.g. 0.5 for noon)
@@ -213,5 +214,5 @@
   CHARACTER(len=4)              :: type_trac
 !  CHARACTER(len=30),ALLOCATABLE :: tname(:)    ! tracer short name for restart and diagnostics
-  CHARACTER(len=33),ALLOCATABLE :: ttext(:)     ! tracer long name for diagnostics
+!  CHARACTER(len=33),ALLOCATABLE :: ttext(:)     ! tracer long name for diagnostics
   TYPE(t_field),POINTER,SAVE    :: f_ind_cell_glo(:)
   
@@ -259,5 +260,4 @@
     ENDDO
 
-!$OMP BARRIER
       
     CALL transfer_icosa_to_lmdz(f_ind_cell_glo,ind_cell_glo)
@@ -284,11 +284,15 @@
 
     ! Initialize tracer names, numbers, etc. for physics
+
+! init tracers model for standard lmdz case
 !$OMP MASTER
-
-! init tracers model for standard lmdz case
     ALLOCATE(tname(nqtot))
     ALLOCATE(ttext(nqtot))
+!$OMP END MASTER
+!$OMP BARRIER
 
 ! read tname() from traceur.def file
+    IF (is_mpi_root) THEN
+!$OMP MASTER
     OPEN(unit=42,file="traceur.def",form="formatted",status="old",iostat=ierr)
     IF (ierr==0) THEN
@@ -306,8 +310,13 @@
 !$OMP END MASTER
 !$OMP BARRIER
+    ENDIF ! of (is_mpi_root)
+
+    DO i=1,nqtot
+      CALL bcast(tname(i))
+      CALL bcast(ttext(i))
+    ENDDO
 
    ! Get/set some constants for the physics
 
-!$OMP MASTER
 
     startphy_file=.true.
@@ -326,4 +335,6 @@
       ! Read in some information from the startphy.nc file
 
+      IF (is_mpi_root) THEN
+!$OMP MASTER      
       status=nf90_open('startphy.nc',NF90_NOWRITE,ncid)
       if (status.ne.nf90_noerr) then
@@ -347,4 +358,11 @@
 
       status=nf90_close(ncid)
+!$OMP END MASTER      
+!$OMP BARRIER
+      ENDIF ! of !IF (is_mpi_root)
+      
+      CALL bcast(day_ini)
+      CALL bcast(annee_ref)
+      CALL bcast(ptime)
 
     ELSE
@@ -365,6 +383,4 @@
     CALL getin('iflag_trac',iflag_trac)
 
-!$OMP END MASTER
-!$OMP BARRIER
 
     ! Initialize some physical constants
@@ -597,5 +613,7 @@
 
     DO l=1,llm
-      wflux_phy(:,l)=wflux_phy(:,l)*cell_area(:)
+      ! Warning: In the physics, vertical flux convention is positive if downwards!
+      wflux_phy(:,l)= - wflux_phy(:,l)*cell_area(:)
+      ! Compute relative geopotential
       phi_phy(:,l)=phi_phy(:,l)-phis_phy(:)
     ENDDO
