Index: LMDZ4/trunk/libf/phylmd/mod_phys_lmdz_mpi_transfert.F90
===================================================================
--- LMDZ4/trunk/libf/phylmd/mod_phys_lmdz_mpi_transfert.F90	(revision 775)
+++ LMDZ4/trunk/libf/phylmd/mod_phys_lmdz_mpi_transfert.F90	(revision 1001)
@@ -66,21 +66,21 @@
     CHARACTER(LEN=*),INTENT(INOUT) :: Var1
    
-#ifndef CPP_PARA
-    RETURN
-#endif
-
     CALL bcast_mpi_cgen(Var1,len(Var1))
+
   END SUBROUTINE bcast_mpi_c
 
 !! -- Les entiers -- !!
   
-  SUBROUTINE bcast_mpi_i(var1)
+  SUBROUTINE bcast_mpi_i(var)
+  USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root
   IMPLICIT NONE
-    INTEGER,INTENT(INOUT) :: Var1
-   
-#ifndef CPP_PARA
-    RETURN
-#endif
-    CALL bcast_mpi_igen(Var1,1)
+    INTEGER,INTENT(INOUT) :: Var
+    
+    INTEGER               :: var_tmp(1)
+    
+    IF (is_mpi_root) var_tmp(1)=var
+    CALL bcast_mpi_igen(Var_tmp,1)
+    var=var_tmp(1)
+    
   END SUBROUTINE bcast_mpi_i
 
@@ -88,9 +88,7 @@
   IMPLICIT NONE
     INTEGER,INTENT(INOUT) :: Var(:)
-   
-#ifndef CPP_PARA
-    RETURN
-#endif
+
     CALL bcast_mpi_igen(Var,size(Var))
+    
   END SUBROUTINE bcast_mpi_i1
 
@@ -99,8 +97,6 @@
     INTEGER,INTENT(INOUT) :: Var(:,:)
    
-#ifndef CPP_PARA
-    RETURN
-#endif
     CALL bcast_mpi_igen(Var,size(Var))
+  
   END SUBROUTINE bcast_mpi_i2
 
@@ -109,8 +105,6 @@
     INTEGER,INTENT(INOUT) :: Var(:,:,:)
    
-#ifndef CPP_PARA
-    RETURN
-#endif
     CALL bcast_mpi_igen(Var,size(Var))
+
   END SUBROUTINE bcast_mpi_i3
 
@@ -119,8 +113,6 @@
     INTEGER,INTENT(INOUT) :: Var(:,:,:,:)
    
-#ifndef CPP_PARA
-    RETURN
-#endif
     CALL bcast_mpi_igen(Var,size(Var))
+
   END SUBROUTINE bcast_mpi_i4
 
@@ -129,11 +121,13 @@
 
   SUBROUTINE bcast_mpi_r(var)
+  USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root
   IMPLICIT NONE
     REAL,INTENT(INOUT) :: Var
-   
-#ifndef CPP_PARA
-    RETURN
-#endif
-    CALL bcast_mpi_rgen(Var,1)
+    REAL               :: var_tmp(1)
+    
+    IF (is_mpi_root) var_tmp(1)=var
+    CALL bcast_mpi_rgen(Var_tmp,1)
+    var=var_tmp(1)   
+
   END SUBROUTINE bcast_mpi_r
 
@@ -142,8 +136,6 @@
     REAL,INTENT(INOUT) :: Var(:)
    
-#ifndef CPP_PARA
-    RETURN
-#endif
     CALL bcast_mpi_rgen(Var,size(Var))
+
   END SUBROUTINE bcast_mpi_r1
 
@@ -152,8 +144,6 @@
     REAL,INTENT(INOUT) :: Var(:,:)
    
-#ifndef CPP_PARA
-    RETURN
-#endif
     CALL bcast_mpi_rgen(Var,size(Var))
+
   END SUBROUTINE bcast_mpi_r2
 
@@ -162,8 +152,6 @@
     REAL,INTENT(INOUT) :: Var(:,:,:)
    
-#ifndef CPP_PARA
-    RETURN
-#endif
     CALL bcast_mpi_rgen(Var,size(Var))
+
   END SUBROUTINE bcast_mpi_r3
 
@@ -172,8 +160,6 @@
     REAL,INTENT(INOUT) :: Var(:,:,:,:)
    
-#ifndef CPP_PARA
-    RETURN
-#endif
     CALL bcast_mpi_rgen(Var,size(Var))
+
   END SUBROUTINE bcast_mpi_r4
   
@@ -181,11 +167,13 @@
 
   SUBROUTINE bcast_mpi_l(var)
+  USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root
   IMPLICIT NONE
     LOGICAL,INTENT(INOUT) :: Var
-   
-#ifndef CPP_PARA
-    RETURN
-#endif
-    CALL bcast_mpi_lgen(Var,1)
+    LOGICAL               :: var_tmp(1)
+    
+    IF (is_mpi_root) var_tmp(1)=var
+    CALL bcast_mpi_lgen(Var_tmp,1)
+    var=var_tmp(1)   
+
   END SUBROUTINE bcast_mpi_l
 
@@ -194,8 +182,6 @@
     LOGICAL,INTENT(INOUT) :: Var(:)
    
-#ifndef CPP_PARA
-    RETURN
-#endif
     CALL bcast_mpi_lgen(Var,size(Var))
+
   END SUBROUTINE bcast_mpi_l1
 
@@ -204,8 +190,6 @@
     LOGICAL,INTENT(INOUT) :: Var(:,:)
    
-#ifndef CPP_PARA
-    RETURN
-#endif
     CALL bcast_mpi_lgen(Var,size(Var))
+
   END SUBROUTINE bcast_mpi_l2
 
@@ -214,8 +198,6 @@
     LOGICAL,INTENT(INOUT) :: Var(:,:,:)
    
-#ifndef CPP_PARA
-    RETURN
-#endif
     CALL bcast_mpi_lgen(Var,size(Var))
+
   END SUBROUTINE bcast_mpi_l3
 
@@ -224,8 +206,6 @@
     LOGICAL,INTENT(INOUT) :: Var(:,:,:,:)
    
-#ifndef CPP_PARA
-    RETURN
-#endif
     CALL bcast_mpi_lgen(Var,size(Var))
+
   END SUBROUTINE bcast_mpi_l4
   
@@ -241,16 +221,5 @@
     INTEGER,INTENT(OUT),DIMENSION(:) :: VarOut
 
-    INTEGER :: dummy
-
-#ifndef CPP_PARA
-    VarOut(:)=VarIn(:)
-    RETURN
-#endif
-
-     IF (is_mpi_root) THEN
-      CALL scatter_mpi_igen(VarIn,Varout,1)
-     ELSE
-      CALL scatter_mpi_igen(dummy,Varout,1)
-    ENDIF
+    CALL scatter_mpi_igen(VarIn,Varout,1)
     
   END SUBROUTINE scatter_mpi_i
@@ -263,15 +232,5 @@
     INTEGER,INTENT(OUT),DIMENSION(:,:) :: VarOut
     
-    INTEGER :: dummy
-
-#ifndef CPP_PARA
-    VarOut(:,:)=VarIn(:,:)
-    RETURN
-#endif
-    IF (is_mpi_root) THEN
-      CALL scatter_mpi_igen(VarIn,Varout,Size(VarOut,2))
-    ELSE
-      CALL scatter_mpi_igen(dummy,Varout,Size(VarOut,2))
-    ENDIF
+    CALL scatter_mpi_igen(VarIn,Varout,Size(VarOut,2))
     
   END SUBROUTINE scatter_mpi_i1
@@ -284,15 +243,6 @@
     INTEGER,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
     
-    INTEGER :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:,:)=VarIn(:,:,:)
-    RETURN
-#endif
-    IF (is_mpi_root) THEN
-      CALL scatter_mpi_igen(VarIn,Varout,Size(VarOut,2)*Size(VarOut,3))
-    ELSE
-      CALL scatter_mpi_igen(dummy,Varout,Size(VarOut,2)*Size(VarOut,3))
-    ENDIF
+    CALL scatter_mpi_igen(VarIn,Varout,Size(VarOut,2)*Size(VarOut,3))
+
   END SUBROUTINE scatter_mpi_i2
 
@@ -304,15 +254,5 @@
     INTEGER,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
     
-    INTEGER :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:,:,:)=VarIn(:,:,:,:)
-    RETURN
-#endif
-    IF (is_mpi_root) THEN
-      CALL scatter_mpi_igen(VarIn,Varout,Size(VarOut,2)*Size(VarOut,3)*Size(VarOut,4))
-    ELSE
-      CALL scatter_mpi_igen(dummy,Varout,Size(VarOut,2)*Size(VarOut,3)*Size(VarOut,4))
-    ENDIF
+    CALL scatter_mpi_igen(VarIn,Varout,Size(VarOut,2)*Size(VarOut,3)*Size(VarOut,4))
   
   END SUBROUTINE scatter_mpi_i3
@@ -326,15 +266,5 @@
     REAL,INTENT(OUT),DIMENSION(:) :: VarOut
     
-    REAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:)=VarIn(:)
-    RETURN
-#endif
-    IF (is_mpi_root) THEN
       CALL scatter_mpi_rgen(VarIn,Varout,1)
-    ELSE
-      CALL scatter_mpi_rgen(dummy,Varout,1)
-    ENDIF
   
   END SUBROUTINE scatter_mpi_r
@@ -347,15 +277,5 @@
     REAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
     
-    REAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:)=VarIn(:,:)
-    RETURN
-#endif
-    IF (is_mpi_root) THEN
       CALL scatter_mpi_rgen(VarIn,Varout,Size(VarOut,2))
-    ELSE
-      CALL scatter_mpi_rgen(dummy,Varout,Size(VarOut,2))      
-    ENDIF
   
   END SUBROUTINE scatter_mpi_r1
@@ -368,15 +288,5 @@
     REAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
     
-    REAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:,:)=VarIn(:,:,:)
-    RETURN
-#endif
-    IF (is_mpi_root) THEN
       CALL scatter_mpi_rgen(VarIn,Varout,Size(VarOut,2)*Size(VarOut,3))
-    ELSE
-      CALL scatter_mpi_rgen(dummy,Varout,Size(VarOut,2)*Size(VarOut,3))
-    ENDIF
   
   END SUBROUTINE scatter_mpi_r2
@@ -389,15 +299,5 @@
     REAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
     
-    REAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:,:,:)=VarIn(:,:,:,:)
-    RETURN
-#endif
-    IF (is_mpi_root) THEN
       CALL scatter_mpi_rgen(VarIn,Varout,Size(VarOut,2)*Size(VarOut,3)*Size(VarOut,4))
-    ELSE
-      CALL scatter_mpi_rgen(dummy,Varout,Size(VarOut,2)*Size(VarOut,3)*Size(VarOut,4))
-    ENDIF
   
   END SUBROUTINE scatter_mpi_r3
@@ -411,15 +311,5 @@
     LOGICAL,INTENT(OUT),DIMENSION(:) :: VarOut
     
-    LOGICAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:)=VarIn(:)
-    RETURN
-#endif
-    IF (is_mpi_root) THEN
       CALL scatter_mpi_lgen(VarIn,Varout,1)
-    ELSE
-      CALL scatter_mpi_lgen(dummy,Varout,1)
-    ENDIF
     
   END SUBROUTINE scatter_mpi_l
@@ -432,15 +322,5 @@
     LOGICAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
     
-    LOGICAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:)=VarIn(:,:)
-    RETURN
-#endif
-    IF (is_mpi_root) THEN
       CALL scatter_mpi_lgen(VarIn,Varout,Size(VarOut,2))
-    ELSE
-      CALL scatter_mpi_lgen(dummy,Varout,Size(VarOut,2))      
-    ENDIF
   
   END SUBROUTINE scatter_mpi_l1
@@ -453,15 +333,5 @@
     LOGICAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
     
-    LOGICAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:,:)=VarIn(:,:,:)
-    RETURN
-#endif
-    IF (is_mpi_root) THEN
       CALL scatter_mpi_lgen(VarIn,Varout,Size(VarOut,2)*Size(VarOut,3))
-    ELSE
-      CALL scatter_mpi_lgen(dummy,Varout,Size(VarOut,2)*Size(VarOut,3))
-    ENDIF
   
   END SUBROUTINE scatter_mpi_l2
@@ -474,15 +344,5 @@
     LOGICAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
     
-    LOGICAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:,:,:)=VarIn(:,:,:,:)
-    RETURN
-#endif
-    IF (is_mpi_root) THEN
       CALL scatter_mpi_lgen(VarIn,Varout,Size(VarOut,2)*Size(VarOut,3)*Size(VarOut,4))
-    ELSE
-      CALL scatter_mpi_lgen(dummy,Varout,Size(VarOut,2)*Size(VarOut,3)*Size(VarOut,4))
-    ENDIF
   
   END SUBROUTINE scatter_mpi_l3  
@@ -501,21 +361,7 @@
     INTEGER,INTENT(OUT),DIMENSION(:) :: VarOut
     
-    INTEGER :: dummy
-
-#ifndef CPP_PARA
-    VarOut(:)=VarIn(:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
       CALL gather_mpi_igen(VarIn,VarOut,1)
-    ELSE
-      CALL gather_mpi_igen(VarIn,dummy,1)
-    ENDIF
   
   END SUBROUTINE gather_mpi_i
-  
-  
-  
   
 
@@ -529,16 +375,5 @@
     INTEGER,INTENT(OUT),DIMENSION(:,:) :: VarOut
     
-    INTEGER :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:)=VarIn(:,:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
       CALL gather_mpi_igen(VarIn,VarOut,Size(VarIn,2))
-    ELSE
-      CALL gather_mpi_igen(VarIn,dummy,Size(VarIn,2))
-    ENDIF
   
   END SUBROUTINE gather_mpi_i1
@@ -553,16 +388,5 @@
     INTEGER,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
     
-    INTEGER :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:,:)=VarIn(:,:,:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
       CALL gather_mpi_igen(VarIn,VarOut,Size(VarIn,2)*Size(VarIn,3))
-    ELSE
-      CALL gather_mpi_igen(VarIn,dummy,Size(VarIn,2)*Size(VarIn,3))
-    ENDIF
   
   END SUBROUTINE gather_mpi_i2
@@ -577,16 +401,5 @@
     INTEGER,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
     
-    INTEGER :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:,:,:)=VarIn(:,:,:,:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
       CALL gather_mpi_igen(VarIn,VarOut,Size(VarIn,2)*Size(VarIn,3)*Size(VarIn,4))
-    ELSE
-      CALL gather_mpi_igen(VarIn,dummy,Size(VarIn,2)*Size(VarIn,3)*Size(VarIn,4))
-    ENDIF
   
   END SUBROUTINE gather_mpi_i3
@@ -601,16 +414,5 @@
     REAL,INTENT(OUT),DIMENSION(:) :: VarOut
     
-    REAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:)=VarIn(:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
       CALL gather_mpi_rgen(VarIn,VarOut,1)
-    ELSE
-      CALL gather_mpi_rgen(VarIn,dummy,1)
-    ENDIF
   
   END SUBROUTINE gather_mpi_r
@@ -625,16 +427,5 @@
     REAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
     
-    REAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:)=VarIn(:,:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
       CALL gather_mpi_rgen(VarIn,VarOut,Size(VarIn,2))
-    ELSE
-      CALL gather_mpi_rgen(VarIn,dummy,Size(VarIn,2))
-    ENDIF
   
   END SUBROUTINE gather_mpi_r1
@@ -649,16 +440,5 @@
     REAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
     
-    REAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:,:)=VarIn(:,:,:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
       CALL gather_mpi_rgen(VarIn,VarOut,Size(VarIn,2)*Size(VarIn,3))
-    ELSE
-      CALL gather_mpi_rgen(VarIn,dummy,Size(VarIn,2)*Size(VarIn,3))      
-    ENDIF
   
   END SUBROUTINE gather_mpi_r2
@@ -673,16 +453,5 @@
     REAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
     
-    REAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:,:,:)=VarIn(:,:,:,:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
       CALL gather_mpi_rgen(VarIn,VarOut,Size(VarIn,2)*Size(VarIn,3)*Size(VarIn,4))
-    ELSE
-      CALL gather_mpi_rgen(VarIn,dummy,Size(VarIn,2)*Size(VarIn,3)*Size(VarIn,4))
-    ENDIF
   
   END SUBROUTINE gather_mpi_r3
@@ -697,16 +466,5 @@
     LOGICAL,INTENT(OUT),DIMENSION(:) :: VarOut
     
-    LOGICAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:)=VarIn(:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
       CALL gather_mpi_lgen(VarIn,VarOut,1)
-    ELSE
-      CALL gather_mpi_lgen(VarIn,dummy,1)      
-    ENDIF
   
   END SUBROUTINE gather_mpi_l
@@ -721,16 +479,5 @@
     LOGICAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
     
-    LOGICAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:)=VarIn(:,:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
       CALL gather_mpi_lgen(VarIn,VarOut,Size(VarIn,2))
-    ELSE
-      CALL gather_mpi_lgen(VarIn,dummy,Size(VarIn,2))
-    ENDIF
   
   END SUBROUTINE gather_mpi_l1
@@ -745,16 +492,5 @@
     LOGICAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
     
-    LOGICAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:,:)=VarIn(:,:,:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
       CALL gather_mpi_lgen(VarIn,VarOut,Size(VarIn,2)*Size(VarIn,3))
-    ELSE
-      CALL gather_mpi_lgen(VarIn,dummy,Size(VarIn,2)*Size(VarIn,3))
-    ENDIF
   
   END SUBROUTINE gather_mpi_l2
@@ -769,16 +505,5 @@
     LOGICAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
     
-    LOGICAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:,:,:)=VarIn(:,:,:,:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
-      CALL gather_mpi_lgen(VarIn,VarOut,Size(VarIn,2)*Size(VarIn,3)*Size(VarIn,4))
-    ELSE
-      CALL gather_mpi_lgen(VarIn,dummy,Size(VarIn,2)*Size(VarIn,3)*Size(VarIn,4))      
-    ENDIF
+    CALL gather_mpi_lgen(VarIn,VarOut,Size(VarIn,2)*Size(VarIn,3)*Size(VarIn,4))
   
   END SUBROUTINE gather_mpi_l3
@@ -808,18 +533,8 @@
     INTEGER,INTENT(IN),DIMENSION(:,:,:) :: VarIn
     INTEGER,INTENT(OUT),DIMENSION(:,:) :: VarOut
-    
-    CALL body(VarIn,VarOut,size(VarOut,2))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1)
-        INTEGER,INTENT(IN),DIMENSION(:,:,:) :: VarIn
-        INTEGER,INTENT(OUT),DIMENSION(:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1
-	
-	INTEGER,DIMENSION(klon_glo,s1) :: Var_tmp
-        
-        CALL grid2dTo1d_glo(VarIn,Var_tmp)
-        CALL scatter_mpi(Var_tmp,VarOut)
-      END SUBROUTINE body
+    INTEGER,DIMENSION(klon_glo,size(VarOut,2)) :: Var_tmp
+
+    CALL grid2dTo1d_glo(VarIn,Var_tmp)
+    CALL scatter_mpi(Var_tmp,VarOut)
 
   END SUBROUTINE scatter2D_mpi_i1
@@ -831,18 +546,9 @@
     INTEGER,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
     INTEGER,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
-    
-    CALL body(VarIn,VarOut,size(VarOut,2),size(VarOut,3))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1,s2)
-        INTEGER,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
-        INTEGER,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1,s2
-	
-        INTEGER,DIMENSION(klon_glo,s1,s2) :: Var_tmp
-        
-        CALL grid2dTo1d_glo(VarIn,Var_tmp)
-        CALL scatter_mpi(Var_tmp,VarOut)
-      END SUBROUTINE body
+
+    INTEGER,DIMENSION(klon_glo,size(VarOut,2),size(VarOut,3)) :: Var_tmp
+
+    CALL grid2dTo1d_glo(VarIn,Var_tmp)
+    CALL scatter_mpi(Var_tmp,VarOut)
 
   END SUBROUTINE scatter2D_mpi_i2
@@ -854,20 +560,9 @@
     INTEGER,INTENT(IN),DIMENSION(:,:,:,:,:) :: VarIn
     INTEGER,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
-    
-    CALL body(VarIn,VarOut,size(VarOut,2),size(VarOut,3),size(VarOut,4))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1,s2,s3)
-        INTEGER,INTENT(IN),DIMENSION(:,:,:,:,:) :: VarIn
-        INTEGER,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1,s2,s3
-	
-        INTEGER,DIMENSION(klon_glo,s1,s2,s3) :: Var_tmp
-        
-        CALL grid2dTo1d_glo(VarIn,Var_tmp)
-        CALL scatter_mpi(Var_tmp,VarOut)
-      END SUBROUTINE body
-  
- 
+    INTEGER,DIMENSION(klon_glo,size(VarOut,2),size(VarOut,3),size(VarOut,4)) :: Var_tmp
+
+    CALL grid2dTo1d_glo(VarIn,Var_tmp)
+    CALL scatter_mpi(Var_tmp,VarOut)
+    
   END SUBROUTINE scatter2D_mpi_i3
 
@@ -894,18 +589,9 @@
     REAL,INTENT(IN),DIMENSION(:,:,:) :: VarIn
     REAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
-
-    CALL body(VarIn,VarOut,size(VarOut,2))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1)
-        REAL,INTENT(IN),DIMENSION(:,:,:) :: VarIn
-        REAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1
-	
-        REAL,DIMENSION(klon_glo,s1) :: Var_tmp
-        
-        CALL grid2dTo1d_glo(VarIn,Var_tmp)
-        CALL scatter_mpi(Var_tmp,VarOut)
-      END SUBROUTINE body
+    
+    REAL,DIMENSION(klon_glo,size(VarOut,2)) :: Var_tmp
+    
+    CALL grid2dTo1d_glo(VarIn,Var_tmp)
+    CALL scatter_mpi(Var_tmp,VarOut)
 
   END SUBROUTINE scatter2D_mpi_r1
@@ -918,18 +604,9 @@
     REAL,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
     REAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
-    
-    CALL body(VarIn,VarOut,size(VarOut,2),size(VarOut,3))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1,s2)
-        REAL,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
-        REAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1,s2
-	
-        REAL,DIMENSION(klon_glo,s1,s2) :: Var_tmp
-        
-        CALL grid2dTo1d_glo(VarIn,Var_tmp)
-        CALL scatter_mpi(Var_tmp,VarOut)
-      END SUBROUTINE body
+
+    REAL,DIMENSION(klon_glo,size(VarOut,2),size(VarOut,3)) :: Var_tmp
+    
+    CALL grid2dTo1d_glo(VarIn,Var_tmp)
+    CALL scatter_mpi(Var_tmp,VarOut)
 
   END SUBROUTINE scatter2D_mpi_r2
@@ -942,17 +619,8 @@
     REAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
     
-    CALL body(VarIn,VarOut,size(VarOut,2),size(VarOut,3),size(VarOut,4))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1,s2,s3)
-        REAL,INTENT(IN),DIMENSION(:,:,:,:,:) :: VarIn
-        REAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1,s2,s3
-	
-        REAL,DIMENSION(klon_glo,s1,s2,s3) :: Var_tmp
-        
-        CALL grid2dTo1d_glo(VarIn,Var_tmp)
-        CALL scatter_mpi(Var_tmp,VarOut)
-      END SUBROUTINE body
+    REAL,DIMENSION(klon_glo,size(VarOut,2),size(VarOut,3),size(VarOut,4)) :: Var_tmp
+
+    CALL grid2dTo1d_glo(VarIn,Var_tmp)
+    CALL scatter_mpi(Var_tmp,VarOut)
  
   END SUBROUTINE scatter2D_mpi_r3
@@ -981,17 +649,8 @@
     LOGICAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
     
-    CALL body(VarIn,VarOut,size(VarOut,2))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1)
-        LOGICAL,INTENT(IN),DIMENSION(:,:,:) :: VarIn
-        LOGICAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1
-	
-        LOGICAL,DIMENSION(klon_glo,s1) :: Var_tmp
-        
-        CALL grid2dTo1d_glo(VarIn,Var_tmp)
-        CALL scatter_mpi(Var_tmp,VarOut)
-      END SUBROUTINE body
+    LOGICAL,DIMENSION(klon_glo,size(VarOut,2)) :: Var_tmp
+
+    CALL grid2dTo1d_glo(VarIn,Var_tmp)
+    CALL scatter_mpi(Var_tmp,VarOut)
   
   END SUBROUTINE scatter2D_mpi_l1
@@ -1005,17 +664,8 @@
     LOGICAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
     
-    CALL body(VarIn,VarOut,size(VarOut,2),size(VarOut,3))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1,s2)
-        LOGICAL,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
-        LOGICAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1,s2
-	
-        LOGICAL,DIMENSION(klon_glo,s1,s2) :: Var_tmp
-        
-        CALL grid2dTo1d_glo(VarIn,Var_tmp)
-        CALL scatter_mpi(Var_tmp,VarOut)
-      END SUBROUTINE body
+    LOGICAL, DIMENSION(klon_glo,size(VarOut,2),size(VarOut,3)) :: Var_tmp
+  
+    CALL grid2dTo1d_glo(VarIn,Var_tmp)
+    CALL scatter_mpi(Var_tmp,VarOut)
 
   END SUBROUTINE scatter2D_mpi_l2
@@ -1028,17 +678,8 @@
     LOGICAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
     
-    CALL body(VarIn,VarOut,size(VarOut,2),size(VarOut,3),size(VarOut,4))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1,s2,s3)
-        LOGICAL,INTENT(IN),DIMENSION(:,:,:,:,:) :: VarIn
-        LOGICAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1,s2,s3
-	
-        LOGICAL,DIMENSION(klon_glo,s1,s2,s3) :: Var_tmp
-        
-        CALL grid2dTo1d_glo(VarIn,Var_tmp)
-        CALL scatter_mpi(Var_tmp,VarOut)
-      END SUBROUTINE body
+    LOGICAL,DIMENSION(klon_glo,size(VarOut,2),size(VarOut,3),size(VarOut,4)) :: Var_tmp
+
+    CALL grid2dTo1d_glo(VarIn,Var_tmp)
+    CALL scatter_mpi(Var_tmp,VarOut)
  
   END SUBROUTINE scatter2D_mpi_l3
@@ -1069,18 +710,9 @@
     INTEGER,INTENT(IN),DIMENSION(:,:) :: VarIn
     INTEGER,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
-    
-    CALL body(VarIn,VarOut,size(VarOut,3))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1)
-        INTEGER,INTENT(IN),DIMENSION(:,:) :: VarIn
-        INTEGER,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1
-	
-        INTEGER,DIMENSION(klon_glo,s1) :: Var_tmp
-        
-        CALL gather_mpi(VarIn,Var_tmp)
-        CALL grid1dTo2d_glo(Var_tmp,VarOut)
-      END SUBROUTINE body
+
+    INTEGER,DIMENSION(klon_glo,size(VarOut,3)) :: Var_tmp
+
+    CALL gather_mpi(VarIn,Var_tmp)
+    CALL grid1dTo2d_glo(Var_tmp,VarOut)
 
   END SUBROUTINE gather2D_mpi_i1
@@ -1092,18 +724,9 @@
     INTEGER,INTENT(IN),DIMENSION(:,:,:) :: VarIn
     INTEGER,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
-    
-    CALL body(VarIn,VarOut,size(VarOut,3),SIZE(VarOut,4))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1,s2)
-        INTEGER,INTENT(IN),DIMENSION(:,:,:) :: VarIn
-        INTEGER,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1,s2
-	
-        INTEGER,DIMENSION(klon_glo,s1,s2) :: Var_tmp
-        
-        CALL gather_mpi(VarIn,Var_tmp)
-        CALL grid1dTo2d_glo(Var_tmp,VarOut)
-      END SUBROUTINE body
+
+    INTEGER,DIMENSION(klon_glo,size(VarOut,3),SIZE(VarOut,4)) :: Var_tmp
+    
+    CALL gather_mpi(VarIn,Var_tmp)
+    CALL grid1dTo2d_glo(Var_tmp,VarOut)
 
   END SUBROUTINE gather2D_mpi_i2
@@ -1115,18 +738,9 @@
     INTEGER,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
     INTEGER,INTENT(OUT),DIMENSION(:,:,:,:,:) :: VarOut
-    
-    CALL body(VarIn,VarOut,size(VarOut,3),SIZE(VarOut,4),SIZE(VarOut,5))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1,s2,s3)
-        INTEGER,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
-        INTEGER,INTENT(OUT),DIMENSION(:,:,:,:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1,s2,s3
-	
-        INTEGER,DIMENSION(klon_glo,s1,s2,s3) :: Var_tmp
-        
-        CALL gather_mpi(VarIn,Var_tmp)
-        CALL grid1dTo2d_glo(Var_tmp,VarOut)
-      END SUBROUTINE body
+ 
+    INTEGER,DIMENSION(klon_glo,size(VarOut,3),SIZE(VarOut,4),SIZE(VarOut,5)) :: Var_tmp
+    
+    CALL gather_mpi(VarIn,Var_tmp)
+    CALL grid1dTo2d_glo(Var_tmp,VarOut)
 
   END SUBROUTINE gather2D_mpi_i3
@@ -1155,17 +769,8 @@
     REAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
     
-    CALL body(VarIn,VarOut,size(VarOut,3))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1)
-        REAL,INTENT(IN),DIMENSION(:,:) :: VarIn
-        REAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1
-	
-        REAL,DIMENSION(klon_glo,s1) :: Var_tmp
-        
-        CALL gather_mpi(VarIn,Var_tmp)
-        CALL grid1dTo2d_glo(Var_tmp,VarOut)
-      END SUBROUTINE body
+    REAL,DIMENSION(klon_glo,size(VarOut,3)) :: Var_tmp
+
+    CALL gather_mpi(VarIn,Var_tmp)
+    CALL grid1dTo2d_glo(Var_tmp,VarOut)
 
   END SUBROUTINE gather2D_mpi_r1
@@ -1178,17 +783,8 @@
     REAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
     
-    CALL body(VarIn,VarOut,size(VarOut,3),SIZE(VarOut,4))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1,s2)
-        REAL,INTENT(IN),DIMENSION(:,:,:) :: VarIn
-        REAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1,s2
-	
-        REAL,DIMENSION(klon_glo,s1,s2) :: Var_tmp
-        
-        CALL gather_mpi(VarIn,Var_tmp)
-        CALL grid1dTo2d_glo(Var_tmp,VarOut)
-      END SUBROUTINE body
+    REAL,DIMENSION(klon_glo,size(VarOut,3),SIZE(VarOut,4)) :: Var_tmp
+
+    CALL gather_mpi(VarIn,Var_tmp)
+    CALL grid1dTo2d_glo(Var_tmp,VarOut)
 
   END SUBROUTINE gather2D_mpi_r2
@@ -1201,17 +797,8 @@
     REAL,INTENT(OUT),DIMENSION(:,:,:,:,:) :: VarOut
     
-    CALL body(VarIn,VarOut,size(VarOut,3),SIZE(VarOut,4),SIZE(VarOut,5))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1,s2,s3)
-        REAL,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
-        REAL,INTENT(OUT),DIMENSION(:,:,:,:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1,s2,s3
-	
-        REAL,DIMENSION(klon_glo,s1,s2,s3) :: Var_tmp
-        
-        CALL gather_mpi(VarIn,Var_tmp)
-        CALL grid1dTo2d_glo(Var_tmp,VarOut)
-      END SUBROUTINE body
+    REAL,DIMENSION(klon_glo,size(VarOut,3),SIZE(VarOut,4),SIZE(VarOut,5)) :: Var_tmp
+    
+    CALL gather_mpi(VarIn,Var_tmp)
+    CALL grid1dTo2d_glo(Var_tmp,VarOut)
 
   END SUBROUTINE gather2D_mpi_r3
@@ -1240,17 +827,8 @@
     LOGICAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
     
-    CALL body(VarIn,VarOut,size(VarOut,3))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1)
-        LOGICAL,INTENT(IN),DIMENSION(:,:) :: VarIn
-        LOGICAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1
-	
-        LOGICAL,DIMENSION(klon_glo,s1) :: Var_tmp
-        
-        CALL gather_mpi(VarIn,Var_tmp)
-        CALL grid1dTo2d_glo(Var_tmp,VarOut)
-      END SUBROUTINE body
+    LOGICAL,DIMENSION(klon_glo,size(VarOut,3)) :: Var_tmp
+
+    CALL gather_mpi(VarIn,Var_tmp)
+    CALL grid1dTo2d_glo(Var_tmp,VarOut)
 
   END SUBROUTINE gather2D_mpi_l1
@@ -1263,17 +841,8 @@
     LOGICAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
     
-    CALL body(VarIn,VarOut,size(VarOut,3),SIZE(VarOut,4))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1,s2)
-        LOGICAL,INTENT(IN),DIMENSION(:,:,:) :: VarIn
-        LOGICAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1,s2
-	
-        LOGICAL,DIMENSION(klon_glo,s1,s2) :: Var_tmp
-        
-        CALL gather_mpi(VarIn,Var_tmp)
-        CALL grid1dTo2d_glo(Var_tmp,VarOut)
-      END SUBROUTINE body
+    LOGICAL,DIMENSION(klon_glo,size(VarOut,3),SIZE(VarOut,4)) :: Var_tmp
+
+    CALL gather_mpi(VarIn,Var_tmp)
+    CALL grid1dTo2d_glo(Var_tmp,VarOut)
 
   END SUBROUTINE gather2D_mpi_l2
@@ -1286,17 +855,8 @@
     LOGICAL,INTENT(OUT),DIMENSION(:,:,:,:,:) :: VarOut
     
-    CALL body(VarIn,VarOut,size(VarOut,3),SIZE(VarOut,4),SIZE(VarOut,5))
-  
-    CONTAINS 
-      SUBROUTINE body(VarIn,VarOut,s1,s2,s3)
-        LOGICAL,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn
-        LOGICAL,INTENT(OUT),DIMENSION(:,:,:,:,:) :: VarOut
-        INTEGER,INTENT(IN) :: s1,s2,s3
-	
-        LOGICAL,DIMENSION(klon_glo,s1,s2,s3) :: Var_tmp
-        
-        CALL gather_mpi(VarIn,Var_tmp)
-        CALL grid1dTo2d_glo(Var_tmp,VarOut)
-      END SUBROUTINE body
+    LOGICAL,DIMENSION(klon_glo,size(VarOut,3),SIZE(VarOut,4),SIZE(VarOut,5)) :: Var_tmp
+    
+    CALL gather_mpi(VarIn,Var_tmp)
+    CALL grid1dTo2d_glo(Var_tmp,VarOut)
 
   END SUBROUTINE gather2D_mpi_l3
@@ -1313,18 +873,11 @@
     INTEGER,INTENT(IN)  :: VarIn
     INTEGER,INTENT(OUT) :: VarOut
-    
-    INTEGER :: dummy
-    
-#ifndef CPP_PARA
-    VarOut=VarIn
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
-      CALL reduce_sum_mpi_igen(VarIn,Varout,1)
-    ELSE
-      CALL reduce_sum_mpi_igen(VarIn,dummy,1)
-    ENDIF
-  
+    INTEGER             :: VarIn_tmp(1)
+    INTEGER             :: VarOut_tmp(1)
+    
+    VarIn_tmp(1)=VarIn    
+    CALL reduce_sum_mpi_igen(VarIn_tmp,Varout_tmp,1)
+    VarOut=VarOut_tmp(1)
+    
   END SUBROUTINE reduce_sum_mpi_i
 
@@ -1336,16 +889,5 @@
     INTEGER,INTENT(OUT),DIMENSION(:) :: VarOut
     
-    INTEGER :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:)=VarIn(:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
-      CALL reduce_sum_mpi_igen(VarIn,Varout,SIZE(VarIn))
-    ELSE
-      CALL reduce_sum_mpi_igen(VarIn,dummy,SIZE(VarIn))      
-    ENDIF
+    CALL reduce_sum_mpi_igen(VarIn,Varout,SIZE(VarIn))
   
   END SUBROUTINE reduce_sum_mpi_i1
@@ -1358,16 +900,5 @@
     INTEGER,INTENT(OUT),DIMENSION(:,:) :: VarOut
     
-    INTEGER :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:)=VarIn(:,:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
-      CALL reduce_sum_mpi_igen(VarIn,Varout,SIZE(VarIn))
-    ELSE
-      CALL reduce_sum_mpi_igen(VarIn,dummy,SIZE(VarIn))      
-    ENDIF
+    CALL reduce_sum_mpi_igen(VarIn,Varout,SIZE(VarIn))
   
   END SUBROUTINE reduce_sum_mpi_i2
@@ -1380,16 +911,5 @@
     INTEGER,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
     
-    INTEGER :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:,:)=VarIn(:,:,:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
-      CALL reduce_sum_mpi_igen(VarIn,Varout,SIZE(VarIn))
-    ELSE
-      CALL reduce_sum_mpi_igen(VarIn,dummy,SIZE(VarIn))      
-    ENDIF
+    CALL reduce_sum_mpi_igen(VarIn,Varout,SIZE(VarIn))
   
   END SUBROUTINE reduce_sum_mpi_i3
@@ -1402,16 +922,5 @@
     INTEGER,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
     
-    INTEGER :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:,:,:)=VarIn(:,:,:,:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
-      CALL reduce_sum_mpi_igen(VarIn,Varout,SIZE(VarIn))
-    ELSE
-      CALL reduce_sum_mpi_igen(VarIn,dummy,SIZE(VarIn))      
-    ENDIF
+    CALL reduce_sum_mpi_igen(VarIn,Varout,SIZE(VarIn))
   
   END SUBROUTINE reduce_sum_mpi_i4                  
@@ -1424,17 +933,10 @@
     REAL,INTENT(IN)  :: VarIn
     REAL,INTENT(OUT) :: VarOut
-    
-    REAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut=VarIn
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
-      CALL reduce_sum_mpi_rgen(VarIn,Varout,1)
-    ELSE
-      CALL reduce_sum_mpi_rgen(VarIn,dummy,1)
-    ENDIF
+    REAL             :: VarIn_tmp(1)
+    REAL             :: VarOut_tmp(1)
+    
+    VarIn_tmp(1)=VarIn    
+    CALL reduce_sum_mpi_rgen(VarIn_tmp,Varout_tmp,1)
+    VarOut=VarOut_tmp(1)
   
   END SUBROUTINE reduce_sum_mpi_r
@@ -1447,17 +949,6 @@
     REAL,INTENT(OUT),DIMENSION(:) :: VarOut
     
-    REAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:)=VarIn(:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
-      CALL reduce_sum_mpi_rgen(VarIn,Varout,SIZE(VarIn))
-    ELSE
-      CALL reduce_sum_mpi_rgen(VarIn,dummy,SIZE(VarIn))      
-    ENDIF
-  
+    CALL reduce_sum_mpi_rgen(VarIn,Varout,SIZE(VarIn))
+     
   END SUBROUTINE reduce_sum_mpi_r1
 
@@ -1469,16 +960,5 @@
     REAL,INTENT(OUT),DIMENSION(:,:) :: VarOut
     
-    REAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:)=VarIn(:,:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
-      CALL reduce_sum_mpi_rgen(VarIn,Varout,SIZE(VarIn))
-    ELSE
-      CALL reduce_sum_mpi_rgen(VarIn,dummy,SIZE(VarIn))      
-    ENDIF
+    CALL reduce_sum_mpi_rgen(VarIn,Varout,SIZE(VarIn))
   
   END SUBROUTINE reduce_sum_mpi_r2
@@ -1491,16 +971,5 @@
     REAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut
     
-    REAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:,:)=VarIn(:,:,:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
-      CALL reduce_sum_mpi_rgen(VarIn,Varout,SIZE(VarIn))
-    ELSE
-      CALL reduce_sum_mpi_rgen(VarIn,dummy,SIZE(VarIn))      
-    ENDIF
+    CALL reduce_sum_mpi_rgen(VarIn,Varout,SIZE(VarIn))
   
   END SUBROUTINE reduce_sum_mpi_r3
@@ -1513,16 +982,5 @@
     REAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut
     
-    REAL :: dummy
-    
-#ifndef CPP_PARA
-    VarOut(:,:,:,:)=VarIn(:,:,:,:)
-    RETURN
-#endif
-
-    IF (is_mpi_root) THEN
-      CALL reduce_sum_mpi_rgen(VarIn,Varout,SIZE(VarIn))
-    ELSE
-      CALL reduce_sum_mpi_rgen(VarIn,dummy,SIZE(VarIn))      
-    ENDIF
+    CALL reduce_sum_mpi_rgen(VarIn,Varout,SIZE(VarIn))
   
   END SUBROUTINE reduce_sum_mpi_r4 
@@ -1769,7 +1227,6 @@
   END SUBROUTINE grid2dTo1d_mpi_l3
 
-
-                            
-END MODULE mod_phys_lmdz_mpi_transfert
+               
+
 
 
@@ -1785,12 +1242,12 @@
     INTEGER,INTENT(IN) :: nb
     
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     INCLUDE 'mpif.h'
 #endif
     INTEGER :: ierr
 
-    IF (.not.is_ok_mpi) RETURN
-    
-#ifdef CPP_PARA
+    IF (.not.is_using_mpi) RETURN
+    
+#ifdef CPP_MPI
     CALL MPI_BCAST(Var,nb,MPI_CHARACTER,mpi_root_x,COMM_LMDZ_PHY,ierr)
 #endif
@@ -1807,12 +1264,12 @@
     INTEGER,INTENT(IN) :: nb
     
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     INCLUDE 'mpif.h'
 #endif
     INTEGER :: ierr
 
-    IF (.not.is_ok_mpi) RETURN
-
-#ifdef CPP_PARA
+    IF (.not.is_using_mpi) RETURN
+
+#ifdef CPP_MPI
     CALL MPI_BCAST(Var,nb,MPI_INTEGER,mpi_root_x,COMM_LMDZ_PHY,ierr)
 #endif
@@ -1830,12 +1287,12 @@
     INTEGER,INTENT(IN) :: nb
     
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     INCLUDE 'mpif.h'
 #endif
     INTEGER :: ierr
 
-    IF (.not.is_ok_mpi) RETURN
-
-#ifdef CPP_PARA
+    IF (.not.is_using_mpi) RETURN
+
+#ifdef CPP_MPI
     CALL MPI_BCAST(Var,nb,MPI_REAL_LMDZ,mpi_root_x,COMM_LMDZ_PHY,ierr)
 #endif
@@ -1853,12 +1310,12 @@
     INTEGER,INTENT(IN) :: nb
     
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     INCLUDE 'mpif.h'
 #endif
     INTEGER :: ierr
 
-    IF (.not.is_ok_mpi) RETURN
-
-#ifdef CPP_PARA
+    IF (.not.is_using_mpi) RETURN
+
+#ifdef CPP_MPI
     CALL MPI_BCAST(Var,nb,MPI_LOGICAL,mpi_root_x,COMM_LMDZ_PHY,ierr)
 #endif
@@ -1877,5 +1334,5 @@
     INTEGER,INTENT(OUT),DIMENSION(klon_mpi,dimsize) :: VarOut
   
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     INCLUDE 'mpif.h'
 #endif
@@ -1887,5 +1344,5 @@
 
 
-    IF (.not.is_ok_mpi) THEN
+    IF (.not.is_using_mpi) THEN
       VarOut(:,:)=VarIn(:,:)
       RETURN
@@ -1906,5 +1363,5 @@
     ENDIF
       
-#ifdef CPP_PARA 
+#ifdef CPP_MPI 
     CALL MPI_SCATTERV(VarTmp,counts,displs,MPI_INTEGER,VarOut,klon_mpi*dimsize,   &
                       MPI_INTEGER,mpi_root_x, COMM_LMDZ_PHY,ierr)
@@ -1922,5 +1379,5 @@
     REAL,INTENT(OUT),DIMENSION(klon_mpi,dimsize) :: VarOut
   
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     INCLUDE 'mpif.h'
 #endif
@@ -1932,5 +1389,5 @@
     INTEGER :: ierr
 
-    IF (.not.is_ok_mpi) THEN
+    IF (.not.is_using_mpi) THEN
       VarOut(:,:)=VarIn(:,:)
       RETURN
@@ -1950,5 +1407,5 @@
     ENDIF
       
-#ifdef CPP_PARA 
+#ifdef CPP_MPI 
     CALL MPI_SCATTERV(VarTmp,counts,displs,MPI_REAL_LMDZ,VarOut,klon_mpi*dimsize,   &
                       MPI_REAL_LMDZ,mpi_root_x, COMM_LMDZ_PHY,ierr)
@@ -1968,5 +1425,5 @@
     LOGICAL,INTENT(OUT),DIMENSION(klon_mpi,dimsize) :: VarOut
   
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     INCLUDE 'mpif.h'
 #endif
@@ -1978,5 +1435,5 @@
     INTEGER :: ierr
 
-    IF (.not.is_ok_mpi) THEN
+    IF (.not.is_using_mpi) THEN
       VarOut(:,:)=VarIn(:,:)
       RETURN
@@ -1996,5 +1453,5 @@
     ENDIF
       
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     CALL MPI_SCATTERV(VarTmp,counts,displs,MPI_LOGICAL,VarOut,klon_mpi*dimsize,   &
                       MPI_LOGICAL,mpi_root_x, COMM_LMDZ_PHY,ierr)
@@ -2011,5 +1468,5 @@
     IMPLICIT NONE
   
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     INCLUDE 'mpif.h'
 #endif
@@ -2025,5 +1482,5 @@
     INTEGER :: ierr
 
-    IF (.not.is_ok_mpi) THEN
+    IF (.not.is_using_mpi) THEN
       VarOut(:,:)=VarIn(:,:)
       RETURN
@@ -2041,5 +1498,5 @@
     ENDIF
     
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     CALL MPI_GATHERV(VarIn,klon_mpi*dimsize,MPI_INTEGER,VarTmp,counts,displs,   &
                      MPI_INTEGER,mpi_root_x, COMM_LMDZ_PHY,ierr)
@@ -2065,5 +1522,5 @@
     IMPLICIT NONE
   
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     INCLUDE 'mpif.h'
 #endif
@@ -2089,10 +1546,10 @@
     ENDIF
     
-    IF (.not.is_ok_mpi) THEN
+    IF (.not.is_using_mpi) THEN
       VarOut(:,:)=VarIn(:,:)
       RETURN
     ENDIF
 
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     CALL MPI_GATHERV(VarIn,klon_mpi*dimsize,MPI_REAL_LMDZ,VarTmp,counts,displs,   &
                       MPI_REAL_LMDZ,mpi_root_x, COMM_LMDZ_PHY,ierr)
@@ -2121,5 +1578,5 @@
     LOGICAL,INTENT(OUT),DIMENSION(klon_glo,dimsize) :: VarOut
   
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     INCLUDE 'mpif.h'
 #endif
@@ -2131,5 +1588,5 @@
     INTEGER :: ierr
     
-    IF (.not.is_ok_mpi) THEN
+    IF (.not.is_using_mpi) THEN
       VarOut(:,:)=VarIn(:,:)
       RETURN
@@ -2147,5 +1604,5 @@
     
 
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     CALL MPI_GATHERV(VarIn,klon_mpi*dimsize,MPI_LOGICAL,VarTmp,counts,displs,   &
                       MPI_LOGICAL,mpi_root_x, COMM_LMDZ_PHY,ierr)
@@ -2172,5 +1629,5 @@
     IMPLICIT NONE
     
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     INCLUDE 'mpif.h'
 #endif
@@ -2181,5 +1638,5 @@
     INTEGER :: ierr
    
-    IF (.not.is_ok_mpi) THEN
+    IF (.not.is_using_mpi) THEN
       VarOut(:)=VarIn(:)
       RETURN
@@ -2187,5 +1644,5 @@
 
 
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     CALL MPI_REDUCE(VarIn,VarOut,nb,MPI_INTEGER,MPI_SUM,mpi_root_x,COMM_LMDZ_PHY,ierr)
 #endif
@@ -2199,5 +1656,5 @@
     IMPLICIT NONE
 
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     INCLUDE 'mpif.h'
 #endif
@@ -2208,10 +1665,10 @@
     INTEGER :: ierr
  
-    IF (.not.is_ok_mpi) THEN
+    IF (.not.is_using_mpi) THEN
       VarOut(:)=VarIn(:)
       RETURN
     ENDIF
    
-#ifdef CPP_PARA
+#ifdef CPP_MPI
     CALL MPI_REDUCE(VarIn,VarOut,nb,MPI_REAL_LMDZ,MPI_SUM,mpi_root_x,COMM_LMDZ_PHY,ierr)
 #endif
@@ -2443,2 +1900,3 @@
   END SUBROUTINE grid2dTo1d_mpi_lgen   
 
+END MODULE mod_phys_lmdz_mpi_transfert
