Index: LMDZ6/branches/Optimisation_LMDZ/libf/dyn3dmem/gcm.F90
===================================================================
--- LMDZ6/branches/Optimisation_LMDZ/libf/dyn3dmem/gcm.F90	(revision 3698)
+++ LMDZ6/branches/Optimisation_LMDZ/libf/dyn3dmem/gcm.F90	(revision 3703)
@@ -454,9 +454,8 @@
 
   !!$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/,/logici/,/logicl/)
+  !     Copy all threadprivate variables in temps_mod logic_mod 
   !$OMP PARALLEL DEFAULT(SHARED) &
-  !     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) &
-  !     Copy all threadprivate variables from logic_mod
   !$OMP COPYIN(purmats,forward,leapf,apphys,statcl,conser,apdiss,apdelq) &
   !$OMP COPYIN(saison,ecripar,fxyhypb,ysinus,read_start,ok_guide) &
Index: LMDZ6/branches/Optimisation_LMDZ/libf/dyn3dmem/vlsplt_loc.F
===================================================================
--- LMDZ6/branches/Optimisation_LMDZ/libf/dyn3dmem/vlsplt_loc.F	(revision 3698)
+++ LMDZ6/branches/Optimisation_LMDZ/libf/dyn3dmem/vlsplt_loc.F	(revision 3703)
@@ -1056,5 +1056,5 @@
          ENDDO
        ENDDO
-c$OMP END DO NO WAIT
+c$OMP END DO NOWAIT
 
 c Reindicage vertical en accumulant les flux sur
@@ -1090,5 +1090,5 @@
          ENDDO
       ENDDO
-c$OMP END DO NO WAIT
+c$OMP END DO NOWAIT
 
       ENDDO ! WHILE (countcfl>=1)
Index: LMDZ6/branches/Optimisation_LMDZ/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90
===================================================================
--- LMDZ6/branches/Optimisation_LMDZ/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90	(revision 3698)
+++ LMDZ6/branches/Optimisation_LMDZ/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90	(revision 3703)
@@ -109,7 +109,6 @@
   
 !!$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)
+!$OMP PARALLEL DEFAULT(SHARED) COPYIN(annee_ref,day_ini,day_ref,start_time)
 
   ! Initialize physical constants in physics:
Index: LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/cosp/dsd.F90
===================================================================
--- LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/cosp/dsd.F90	(revision 3698)
+++ LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/cosp/dsd.F90	(revision 3703)
@@ -1,3 +1,3 @@
-  subroutine dsd(Q,Re,Np,D,N,nsizes,dtype,rho_a,tk, &
+  subroutine dsd(Q,Re_,Np,D,N,nsizes,dtype,rho_a,tk, &
              dmin,dmax,apm,bpm,rho_c,p1,p2,p3)
   use array_lib
@@ -57,5 +57,5 @@
   integer, intent(in) :: nsizes
   integer, intent(in) :: dtype
-  real*8, intent(in)  :: Q,Re,Np,D(nsizes)
+  real*8, intent(in)  :: Q,Re_,Np,D(nsizes)
   real*8, intent(in)  :: rho_a,tk,dmin,dmax,rho_c,p1,p2,p3
     
@@ -78,6 +78,9 @@
   real*8 :: tmp1, tmp2
   real*8 :: pi,rc,tc
+  real*8 :: Re
 
   integer k,lidx,uidx
+
+  Re = Re_
 
   tc = tk - 273.15
Index: LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/cosp/radar_simulator.F90
===================================================================
--- LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/cosp/radar_simulator.F90	(revision 3698)
+++ LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/cosp/radar_simulator.F90	(revision 3703)
@@ -96,5 +96,5 @@
   real*8, dimension(hp%nhclass,nprof,ngate), intent(in) :: hm_matrix
   real*8, dimension(hp%nhclass,nprof,ngate), intent(inout) :: re_matrix
-  real*8, dimension(hp%nhclass,nprof,ngate), intent(in)    :: Np_matrix
+  real*8, dimension(hp%nhclass,nprof,ngate), intent(inout)    :: Np_matrix
 
 ! ----- OUTPUTS -----
Index: LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/mo_simple_plumes.F90
===================================================================
--- LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/mo_simple_plumes.F90	(revision 3698)
+++ LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/mo_simple_plumes.F90	(revision 3703)
@@ -280,5 +280,5 @@
 
     IF ((iweek > ntimes) .OR. (iweek < 1) .OR. (iyear > nyears) .OR. (iyear < 1)) THEN 
-      CALL abort_physic('set_time_weight','Time out of bounds')
+      CALL abort_physic('set_time_weight','Time out of bounds',1)
     ENDIF
 
Index: LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/o3_chem_m.F90
===================================================================
--- LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/o3_chem_m.F90	(revision 3698)
+++ LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/o3_chem_m.F90	(revision 3703)
@@ -24,5 +24,5 @@
 
     integer, intent(in):: julien ! jour julien, 1 <= julien <= 360
-    real, intent(in):: gmtime ! heure de la journée en fraction de jour
+    real, intent(in):: gmtime ! heure de la journ�e en fraction de jour
     real, intent(in):: t_seri(:, :) ! (klon, nbp_lev) temperature, in K
 
@@ -59,5 +59,5 @@
     real earth_long
     ! (longitude vraie de la Terre dans son orbite solaire, par
-    ! rapport au point vernal (21 mars), en degrés)
+    ! rapport au point vernal (21 mars), en degr�s)
 
     real pmu0(klon) ! mean of cosine of solar zenith angle during "pdtphys"
@@ -85,5 +85,5 @@
     ! Heterogeneous chemistry is only during daytime:
     call orbite(real(julien), earth_long, trash1)
-    call zenang(earth_long, gmtime, pdtphys, rlat, rlon, pmu0, trash2)
+    call zenang(earth_long, gmtime, 0., pdtphys, rlat, rlon, pmu0, trash2)
     forall (k = 1: nbp_lev)
        where (pmu0 <= cos(87. / 180. * pi)) b(:, k) = 0.
Index: LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/readaerosol_mod.F90
===================================================================
--- LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/readaerosol_mod.F90	(revision 3698)
+++ LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/readaerosol_mod.F90	(revision 3703)
@@ -10,5 +10,4 @@
 !$OMP THREADPRIVATE(nbp_lat_src)  
   REAL, ALLOCATABLE, SAVE    :: psurf_interp(:,:)
-!$OMP THREADPRIVATE(psurf_interp)  
 
 CONTAINS
@@ -692,5 +691,6 @@
         CALL xios_send_field("load_"//TRIM(varname)//"_in",load_glo2D)
         CALL xios_recv_field("load_"//TRIM(varname)//"_out",load_out_mpi)
-        IF (first) THEN
+        IF (.not. allocated(psurf_interp)) THEN
+         ! psurf_interp is a shared array
           ALLOCATE(psurf_interp(klon_mpi,12))
           CALL xios_send_field("psurf_aerosol_in",psurf_glo2D)
Index: LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/rrtm/abor1.intfb.h
===================================================================
--- LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/rrtm/abor1.intfb.h	(revision 3698)
+++ LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/rrtm/abor1.intfb.h	(revision 3703)
@@ -1,5 +1,5 @@
 INTERFACE
 SUBROUTINE ABOR1(CDTEXT)
-CHARACTER(LEN=*) :: CDTEXT
+CHARACTER(LEN=*), INTENT(IN) :: CDTEXT
 END SUBROUTINE ABOR1
 END INTERFACE
Index: LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/rrtm/tpm_fft.F90
===================================================================
--- LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/rrtm/tpm_fft.F90	(revision 3698)
+++ LMDZ6/branches/Optimisation_LMDZ/libf/phylmd/rrtm/tpm_fft.F90	(revision 3703)
@@ -7,6 +7,6 @@
 
 TYPE FFT_TYPE
-  REAL(KIND=JPRB)   ,POINTER :: TRIGS(:,:)
-  INTEGER(KIND=JPIM),POINTER :: NFAX(:,:)
+  REAL(KIND=JPRB)   ,ALLOCATABLE :: TRIGS(:,:)
+  INTEGER(KIND=JPIM),ALLOCATABLE :: NFAX(:,:)
 END TYPE FFT_TYPE
 
