Index: dynamico_lmdz/aquaplanet/LMDZ5/libf/dyn3dmem/mod_hallo.F90
===================================================================
--- dynamico_lmdz/aquaplanet/LMDZ5/libf/dyn3dmem/mod_hallo.F90	(revision 3891)
+++ dynamico_lmdz/aquaplanet/LMDZ5/libf/dyn3dmem/mod_hallo.F90	(revision 3892)
@@ -46,17 +46,21 @@
 
   INTERFACE Register_SwapField_u
-    MODULE PROCEDURE Register_SwapField1d_u,Register_SwapField2d_u1d,Register_SwapField3d_u
+    MODULE PROCEDURE Register_SwapField1d_u,Register_SwapField2d_u1d,Register_SwapField3d_u, &
+                     Register_SwapField1d_u_bis,Register_SwapField2d_u1d_bis,Register_SwapField3d_u_bis
   END INTERFACE Register_SwapField_u
 
   INTERFACE Register_SwapField_v
-    MODULE PROCEDURE Register_SwapField1d_v,Register_SwapField2d_v1d,Register_SwapField3d_v
+    MODULE PROCEDURE Register_SwapField1d_v,Register_SwapField2d_v1d,Register_SwapField3d_v,&
+                     Register_SwapField1d_v_bis,Register_SwapField2d_v1d_bis,Register_SwapField3d_v_bis
   END INTERFACE Register_SwapField_v
 
   INTERFACE Register_SwapField2d_u
-    MODULE PROCEDURE Register_SwapField1d_u2d,Register_SwapField2d_u2d,Register_SwapField3d_u2d
+    MODULE PROCEDURE Register_SwapField1d_u2d,Register_SwapField2d_u2d,Register_SwapField3d_u2d, &
+                     Register_SwapField1d_u2d_bis,Register_SwapField2d_u2d_bis,Register_SwapField3d_u2d_bis
   END INTERFACE Register_SwapField2d_u
 
   INTERFACE Register_SwapField2d_v
-    MODULE PROCEDURE Register_SwapField1d_v2d,Register_SwapField2d_v2d,Register_SwapField3d_v2d
+    MODULE PROCEDURE Register_SwapField1d_v2d,Register_SwapField2d_v2d,Register_SwapField3d_v2d, &
+                     Register_SwapField1d_v2d_bis,Register_SwapField2d_v2d_bis,Register_SwapField3d_v2d_bis
   END INTERFACE Register_SwapField2d_v
 
@@ -352,44 +356,64 @@
 
 
-  SUBROUTINE Register_SwapField1d_u(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
-  USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
-    
-    REAL, DIMENSION(:),INTENT(IN)     :: FieldS
-    REAL, DIMENSION(:),INTENT(OUT)    :: FieldR
-    TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
+  SUBROUTINE Register_SwapField1d_u(FieldS,FieldR,new_dist,a_request,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+    
     TYPE(distrib),INTENT(IN)          :: new_dist
-    INTEGER,OPTIONAL,INTENT(IN)       :: up
-    INTEGER,OPTIONAL,INTENT(IN)       :: down      
-    TYPE(request),INTENT(INOUT)         :: a_request
-
-    INTEGER                           :: halo_up
-    INTEGER                           :: halo_down
-    
-    
-    halo_up=0
-    halo_down=0
-    IF (PRESENT(up))   halo_up=up
-    IF (PRESENT(down)) halo_down=down
-
-    IF (PRESENT(old_dist)) THEN
-      CALL  Register_SwapField_gen_u(FieldS,FieldR,1,old_dist,new_dist,halo_up,halo_down,a_request)
-    ELSE
-      CALL  Register_SwapField_gen_u(FieldS,FieldR,1,current_dist,new_dist,halo_up,halo_down,a_request)
-    ENDIF
+    REAL, DIMENSION(current_dist%ijb_u:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%ijb_u:),INTENT(OUT)    :: FieldR
+    INTEGER,OPTIONAL,INTENT(IN)       :: up
+    INTEGER,OPTIONAL,INTENT(IN)       :: down      
+    TYPE(request),INTENT(INOUT)         :: a_request
+
+    INTEGER                           :: halo_up
+    INTEGER                           :: halo_down
+    
+    
+    halo_up=0
+    halo_down=0
+    IF (PRESENT(up))   halo_up=up
+    IF (PRESENT(down)) halo_down=down
+
+    CALL  Register_SwapField_gen_u(FieldS,FieldR,1,current_dist,new_dist,halo_up,halo_down,a_request)
         
   END SUBROUTINE  Register_SwapField1d_u 
 
-
-  SUBROUTINE Register_SwapField2d_u1d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
+  SUBROUTINE Register_SwapField1d_u_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+    
+    TYPE(distrib),INTENT(IN)          :: new_dist
+    TYPE(distrib),INTENT(IN)          :: old_dist
+    REAL, DIMENSION(old_dist%ijb_u:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%ijb_u:),INTENT(OUT)    :: FieldR
+    INTEGER,OPTIONAL,INTENT(IN)       :: up
+    INTEGER,OPTIONAL,INTENT(IN)       :: down      
+    TYPE(request),INTENT(INOUT)         :: a_request
+
+    INTEGER                           :: halo_up
+    INTEGER                           :: halo_down
+    
+    
+    halo_up=0
+    halo_down=0
+    IF (PRESENT(up))   halo_up=up
+    IF (PRESENT(down)) halo_down=down
+
+    CALL  Register_SwapField_gen_u(FieldS,FieldR,1,old_dist,new_dist,halo_up,halo_down,a_request)
+        
+  END SUBROUTINE  Register_SwapField1d_u_bis 
+
+
+  SUBROUTINE Register_SwapField2d_u1d(FieldS,FieldR,new_dist,a_request,up,down)
   USE parallel_lmdz
   USE dimensions_mod
     IMPLICIT NONE
     
-    REAL, DIMENSION(:,:),INTENT(IN)     :: FieldS
-    REAL, DIMENSION(:,:),INTENT(OUT)    :: FieldR
-    TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
     TYPE(distrib),INTENT(IN)          :: new_dist
+    REAL, DIMENSION(current_dist%ijb_u:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%ijb_u:,:),INTENT(OUT)    :: FieldR
     INTEGER,OPTIONAL,INTENT(IN)       :: up
     INTEGER,OPTIONAL,INTENT(IN)       :: down      
@@ -408,22 +432,17 @@
     ll=size(FieldS,2)
     
-    IF (PRESENT(old_dist)) THEN
-      CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
-    ELSE
-      CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
-    ENDIF
+    CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
     
   END SUBROUTINE  Register_SwapField2d_u1d
-   
-
-  SUBROUTINE Register_SwapField3d_u(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
-  USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
-    
-    REAL, DIMENSION(:,:,:),INTENT(IN)     :: FieldS
-    REAL, DIMENSION(:,:,:),INTENT(OUT)    :: FieldR
-    TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
+
+  SUBROUTINE Register_SwapField2d_u1d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+    IMPLICIT NONE
+    
     TYPE(distrib),INTENT(IN)          :: new_dist
+    TYPE(distrib),INTENT(IN) :: old_dist
+    REAL, DIMENSION(old_dist%ijb_u:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%ijb_u:,:),INTENT(OUT)    :: FieldR
     INTEGER,OPTIONAL,INTENT(IN)       :: up
     INTEGER,OPTIONAL,INTENT(IN)       :: down      
@@ -440,58 +459,133 @@
     IF (PRESENT(down)) halo_down=down
     
+    ll=size(FieldS,2)
+    
+    CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
+    
+  END SUBROUTINE  Register_SwapField2d_u1d_bis
+   
+
+  SUBROUTINE Register_SwapField3d_u(FieldS,FieldR,new_dist,a_request,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+    
+    TYPE(distrib),INTENT(IN)          :: new_dist
+    REAL, DIMENSION(current_dist%ijb_u:,:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%ijb_u:,:,:),INTENT(OUT)    :: FieldR
+    INTEGER,OPTIONAL,INTENT(IN)       :: up
+    INTEGER,OPTIONAL,INTENT(IN)       :: down      
+    TYPE(request),INTENT(INOUT)         :: a_request
+
+    INTEGER                           :: halo_up
+    INTEGER                           :: halo_down
+    INTEGER                           :: ll
+        
+    
+    halo_up=0
+    halo_down=0
+    IF (PRESENT(up))   halo_up=up
+    IF (PRESENT(down)) halo_down=down
+    
     ll=size(FieldS,2)*size(FieldS,3)
     
-    IF (PRESENT(old_dist)) THEN
-      CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
-    ELSE
-      CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
-    ENDIF
+    CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
     
   END SUBROUTINE  Register_SwapField3d_u 
-  
-
-
- SUBROUTINE Register_SwapField1d_u2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
-  USE parallel_lmdz
-  USE dimensions_mod
-
-      IMPLICIT NONE
-    
-    REAL, DIMENSION(:,:),INTENT(IN)     :: FieldS
-    REAL, DIMENSION(:,:),INTENT(OUT)    :: FieldR
-    TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
-    TYPE(distrib),OPTIONAL,INTENT(IN)          :: new_dist !LF
-    INTEGER,OPTIONAL,INTENT(IN)       :: up
-    INTEGER,OPTIONAL,INTENT(IN)       :: down      
-    TYPE(request),INTENT(INOUT)         :: a_request
-
-    INTEGER                           :: halo_up
-    INTEGER                           :: halo_down
-    
-    
-    halo_up=0
-    halo_down=0
-    IF (PRESENT(up))   halo_up=up
-    IF (PRESENT(down)) halo_down=down
-
-    IF (PRESENT(old_dist)) THEN
-      CALL  Register_SwapField_gen_u(FieldS,FieldR,1,old_dist,new_dist,halo_up,halo_down,a_request)
-    ELSE
-      CALL  Register_SwapField_gen_u(FieldS,FieldR,1,current_dist,new_dist,halo_up,halo_down,a_request)
-    ENDIF
+
+  SUBROUTINE Register_SwapField3d_u_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+    
+    TYPE(distrib),INTENT(IN)          :: new_dist
+    TYPE(distrib),INTENT(IN) :: old_dist
+    REAL, DIMENSION(old_dist%ijb_u:,:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%ijb_u:,:,:),INTENT(OUT)    :: FieldR
+    INTEGER,OPTIONAL,INTENT(IN)       :: up
+    INTEGER,OPTIONAL,INTENT(IN)       :: down      
+    TYPE(request),INTENT(INOUT)         :: a_request
+
+    INTEGER                           :: halo_up
+    INTEGER                           :: halo_down
+    INTEGER                           :: ll
+        
+    
+    halo_up=0
+    halo_down=0
+    IF (PRESENT(up))   halo_up=up
+    IF (PRESENT(down)) halo_down=down
+    
+    ll=size(FieldS,2)*size(FieldS,3)
+    
+    CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
+    
+  END SUBROUTINE  Register_SwapField3d_u_bis 
+  
+
+
+ SUBROUTINE Register_SwapField1d_u2d(FieldS,FieldR,new_dist,a_request,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+
+      IMPLICIT NONE
+
+    TYPE(distrib),INTENT(IN)          :: new_dist !LF
+    REAL, DIMENSION(current_dist%jjb_u:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%jjb_u:,:),INTENT(OUT)    :: FieldR
+    INTEGER,OPTIONAL,INTENT(IN)       :: up
+    INTEGER,OPTIONAL,INTENT(IN)       :: down      
+    TYPE(request),INTENT(INOUT)         :: a_request
+
+    INTEGER                           :: halo_up
+    INTEGER                           :: halo_down
+    
+    
+    halo_up=0
+    halo_down=0
+    IF (PRESENT(up))   halo_up=up
+    IF (PRESENT(down)) halo_down=down
+
+    CALL  Register_SwapField_gen_u(FieldS,FieldR,1,current_dist,new_dist,halo_up,halo_down,a_request)
         
   END SUBROUTINE  Register_SwapField1d_u2d 
 
-
-  SUBROUTINE Register_SwapField2d_u2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
-  USE parallel_lmdz
-  USE dimensions_mod
-
-      IMPLICIT NONE
-    
-    REAL, DIMENSION(:,:,:),INTENT(IN)     :: FieldS
-    REAL, DIMENSION(:,:,:),INTENT(OUT)    :: FieldR
-    TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
+ SUBROUTINE Register_SwapField1d_u2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+
+      IMPLICIT NONE
+
+    TYPE(distrib),INTENT(IN)          :: new_dist !LF
+    TYPE(distrib),INTENT(IN)          :: old_dist
+    REAL, DIMENSION(old_dist%jjb_u:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%jjb_u:,:),INTENT(OUT)    :: FieldR
+    INTEGER,OPTIONAL,INTENT(IN)       :: up
+    INTEGER,OPTIONAL,INTENT(IN)       :: down      
+    TYPE(request),INTENT(INOUT)         :: a_request
+
+    INTEGER                           :: halo_up
+    INTEGER                           :: halo_down
+    
+    
+    halo_up=0
+    halo_down=0
+    IF (PRESENT(up))   halo_up=up
+    IF (PRESENT(down)) halo_down=down
+
+    CALL  Register_SwapField_gen_u(FieldS,FieldR,1,old_dist,new_dist,halo_up,halo_down,a_request)
+        
+  END SUBROUTINE  Register_SwapField1d_u2d_bis 
+
+
+  SUBROUTINE Register_SwapField2d_u2d(FieldS,FieldR,new_dist,a_request,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+
+      IMPLICIT NONE
+    
     TYPE(distrib),INTENT(IN)          :: new_dist
+    REAL, DIMENSION(current_dist%jjb_u:,:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%jjb_u:,:,:),INTENT(OUT)    :: FieldR
     INTEGER,OPTIONAL,INTENT(IN)       :: up
     INTEGER,OPTIONAL,INTENT(IN)       :: down      
@@ -510,22 +604,18 @@
     ll=size(FieldS,3)
     
-    IF (PRESENT(old_dist)) THEN
-      CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
-    ELSE
-      CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
-    ENDIF
+    CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
     
   END SUBROUTINE  Register_SwapField2d_u2d
-   
-
-  SUBROUTINE Register_SwapField3d_u2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
-  USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
-    
-    REAL, DIMENSION(:,:,:,:),INTENT(IN)     :: FieldS
-    REAL, DIMENSION(:,:,:,:),INTENT(OUT)    :: FieldR
-    TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
+
+  SUBROUTINE Register_SwapField2d_u2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+
+      IMPLICIT NONE
+    
     TYPE(distrib),INTENT(IN)          :: new_dist
+    TYPE(distrib),INTENT(IN) :: old_dist
+    REAL, DIMENSION(old_dist%jjb_u:,:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%jjb_u:,:,:),INTENT(OUT)    :: FieldR
     INTEGER,OPTIONAL,INTENT(IN)       :: up
     INTEGER,OPTIONAL,INTENT(IN)       :: down      
@@ -542,60 +632,134 @@
     IF (PRESENT(down)) halo_down=down
     
+    ll=size(FieldS,3)
+    
+    CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
+    
+  END SUBROUTINE  Register_SwapField2d_u2d_bis
+   
+
+  SUBROUTINE Register_SwapField3d_u2d(FieldS,FieldR,new_dist,a_request,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+    
+    TYPE(distrib),INTENT(IN)          :: new_dist
+    REAL, DIMENSION(current_dist%jjb_u:,:,:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%jjb_u:,:,:,:),INTENT(OUT)    :: FieldR
+    INTEGER,OPTIONAL,INTENT(IN)       :: up
+    INTEGER,OPTIONAL,INTENT(IN)       :: down      
+    TYPE(request),INTENT(INOUT)         :: a_request
+
+    INTEGER                           :: halo_up
+    INTEGER                           :: halo_down
+    INTEGER                           :: ll
+        
+    
+    halo_up=0
+    halo_down=0
+    IF (PRESENT(up))   halo_up=up
+    IF (PRESENT(down)) halo_down=down
+    
     ll=size(FieldS,3)*size(FieldS,4)
     
-    IF (PRESENT(old_dist)) THEN
-      CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
-    ELSE
-      CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
-    ENDIF
+    CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
     
   END SUBROUTINE  Register_SwapField3d_u2d 
 
-
-
-
-
-
-
-  SUBROUTINE Register_SwapField1d_v(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
-  USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
-    
-    REAL, DIMENSION(:),INTENT(IN)     :: FieldS
-    REAL, DIMENSION(:),INTENT(OUT)    :: FieldR
-    TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
+  SUBROUTINE Register_SwapField3d_u2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+    
     TYPE(distrib),INTENT(IN)          :: new_dist
-    INTEGER,OPTIONAL,INTENT(IN)       :: up
-    INTEGER,OPTIONAL,INTENT(IN)       :: down      
-    TYPE(request),INTENT(INOUT)         :: a_request
-
-    INTEGER                           :: halo_up
-    INTEGER                           :: halo_down
-    
-    
-    halo_up=0
-    halo_down=0
-    IF (PRESENT(up))   halo_up=up
-    IF (PRESENT(down)) halo_down=down
-
-    IF (PRESENT(old_dist)) THEN
-      CALL  Register_SwapField_gen_v(FieldS,FieldR,1,old_dist,new_dist,halo_up,halo_down,a_request)
-    ELSE
-      CALL  Register_SwapField_gen_v(FieldS,FieldR,1,current_dist,new_dist,halo_up,halo_down,a_request)
-    ENDIF
+    TYPE(distrib),INTENT(IN) :: old_dist
+    REAL, DIMENSION(old_dist%jjb_u:,:,:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%jjb_u:,:,:,:),INTENT(OUT)    :: FieldR
+    INTEGER,OPTIONAL,INTENT(IN)       :: up
+    INTEGER,OPTIONAL,INTENT(IN)       :: down      
+    TYPE(request),INTENT(INOUT)         :: a_request
+
+    INTEGER                           :: halo_up
+    INTEGER                           :: halo_down
+    INTEGER                           :: ll
+        
+    
+    halo_up=0
+    halo_down=0
+    IF (PRESENT(up))   halo_up=up
+    IF (PRESENT(down)) halo_down=down
+    
+    ll=size(FieldS,3)*size(FieldS,4)
+    
+    CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
+    
+  END SUBROUTINE  Register_SwapField3d_u2d_bis 
+
+
+
+
+
+
+
+  SUBROUTINE Register_SwapField1d_v(FieldS,FieldR,new_dist,a_request,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+    
+    TYPE(distrib),INTENT(IN)          :: new_dist
+    REAL, DIMENSION(current_dist%ijb_v:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%ijb_v:),INTENT(OUT)    :: FieldR
+    INTEGER,OPTIONAL,INTENT(IN)       :: up
+    INTEGER,OPTIONAL,INTENT(IN)       :: down      
+    TYPE(request),INTENT(INOUT)         :: a_request
+
+    INTEGER                           :: halo_up
+    INTEGER                           :: halo_down
+    
+    
+    halo_up=0
+    halo_down=0
+    IF (PRESENT(up))   halo_up=up
+    IF (PRESENT(down)) halo_down=down
+
+    CALL  Register_SwapField_gen_v(FieldS,FieldR,1,current_dist,new_dist,halo_up,halo_down,a_request)
         
   END SUBROUTINE  Register_SwapField1d_v 
 
-
-  SUBROUTINE Register_SwapField2d_v1d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
-  USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
-   
-    REAL, DIMENSION(:,:),INTENT(IN)     :: FieldS
-    REAL, DIMENSION(:,:),INTENT(OUT)    :: FieldR
-    TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
+  SUBROUTINE Register_SwapField1d_v_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+    
     TYPE(distrib),INTENT(IN)          :: new_dist
+    TYPE(distrib),INTENT(IN) :: old_dist
+    REAL, DIMENSION(old_dist%ijb_v:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%ijb_v:),INTENT(OUT)    :: FieldR
+    INTEGER,OPTIONAL,INTENT(IN)       :: up
+    INTEGER,OPTIONAL,INTENT(IN)       :: down      
+    TYPE(request),INTENT(INOUT)         :: a_request
+
+    INTEGER                           :: halo_up
+    INTEGER                           :: halo_down
+    
+    
+    halo_up=0
+    halo_down=0
+    IF (PRESENT(up))   halo_up=up
+    IF (PRESENT(down)) halo_down=down
+
+    CALL  Register_SwapField_gen_v(FieldS,FieldR,1,old_dist,new_dist,halo_up,halo_down,a_request)
+        
+  END SUBROUTINE  Register_SwapField1d_v_bis 
+
+
+  SUBROUTINE Register_SwapField2d_v1d(FieldS,FieldR,new_dist,a_request,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+   
+    TYPE(distrib),INTENT(IN)          :: new_dist
+    REAL, DIMENSION(current_dist%ijb_v:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%ijb_v:,:),INTENT(OUT)    :: FieldR
     INTEGER,OPTIONAL,INTENT(IN)       :: up
     INTEGER,OPTIONAL,INTENT(IN)       :: down      
@@ -614,22 +778,17 @@
     ll=size(FieldS,2)
     
-    IF (PRESENT(old_dist)) THEN
-      CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
-    ELSE
-      CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
-    ENDIF
+    CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
     
   END SUBROUTINE  Register_SwapField2d_v1d
-   
-
-  SUBROUTINE Register_SwapField3d_v(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
-  USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
-    
-    REAL, DIMENSION(:,:,:),INTENT(IN)     :: FieldS
-    REAL, DIMENSION(:,:,:),INTENT(OUT)    :: FieldR
-    TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
+  
+  SUBROUTINE Register_SwapField2d_v1d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+   
     TYPE(distrib),INTENT(IN)          :: new_dist
+    TYPE(distrib),INTENT(IN)          :: old_dist
+    REAL, DIMENSION(old_dist%ijb_v:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%ijb_v:,:),INTENT(OUT)    :: FieldR
     INTEGER,OPTIONAL,INTENT(IN)       :: up
     INTEGER,OPTIONAL,INTENT(IN)       :: down      
@@ -646,57 +805,132 @@
     IF (PRESENT(down)) halo_down=down
     
+    ll=size(FieldS,2)
+    
+    CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
+    
+  END SUBROUTINE  Register_SwapField2d_v1d_bis
+  
+   
+
+  SUBROUTINE Register_SwapField3d_v(FieldS,FieldR,new_dist,a_request,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+    
+    TYPE(distrib),INTENT(IN)          :: new_dist
+    REAL, DIMENSION(current_dist%ijb_v:,:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%ijb_v:,:,:),INTENT(OUT)    :: FieldR
+    INTEGER,OPTIONAL,INTENT(IN)       :: up
+    INTEGER,OPTIONAL,INTENT(IN)       :: down      
+    TYPE(request),INTENT(INOUT)         :: a_request
+
+    INTEGER                           :: halo_up
+    INTEGER                           :: halo_down
+    INTEGER                           :: ll
+        
+    
+    halo_up=0
+    halo_down=0
+    IF (PRESENT(up))   halo_up=up
+    IF (PRESENT(down)) halo_down=down
+    
     ll=size(FieldS,2)*size(FieldS,3)
     
-    IF (PRESENT(old_dist)) THEN
-      CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
-    ELSE
-      CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
-    ENDIF
+    CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
     
   END SUBROUTINE  Register_SwapField3d_v 
 
-
-
-
-  SUBROUTINE Register_SwapField1d_v2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
-  USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
-    
-    REAL, DIMENSION(:,:),INTENT(IN)     :: FieldS
-    REAL, DIMENSION(:,:),INTENT(OUT)    :: FieldR
-    TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
-    TYPE(distrib),OPTIONAL,INTENT(IN)          :: new_dist !LF
-    INTEGER,OPTIONAL,INTENT(IN)       :: up
-    INTEGER,OPTIONAL,INTENT(IN)       :: down      
-    TYPE(request),INTENT(INOUT)         :: a_request
-
-    INTEGER                           :: halo_up
-    INTEGER                           :: halo_down
-    
-    
-    halo_up=0
-    halo_down=0
-    IF (PRESENT(up))   halo_up=up
-    IF (PRESENT(down)) halo_down=down
-
-    IF (PRESENT(old_dist)) THEN
-      CALL  Register_SwapField_gen_v(FieldS,FieldR,1,old_dist,new_dist,halo_up,halo_down,a_request)
-    ELSE
-      CALL  Register_SwapField_gen_v(FieldS,FieldR,1,current_dist,new_dist,halo_up,halo_down,a_request)
-    ENDIF
+  SUBROUTINE Register_SwapField3d_v_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+    
+    TYPE(distrib),INTENT(IN)          :: new_dist
+    TYPE(distrib),INTENT(IN) :: old_dist
+    REAL, DIMENSION(old_dist%ijb_v:,:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%ijb_v:,:,:),INTENT(OUT)    :: FieldR
+    INTEGER,OPTIONAL,INTENT(IN)       :: up
+    INTEGER,OPTIONAL,INTENT(IN)       :: down      
+    TYPE(request),INTENT(INOUT)         :: a_request
+
+    INTEGER                           :: halo_up
+    INTEGER                           :: halo_down
+    INTEGER                           :: ll
+        
+    
+    halo_up=0
+    halo_down=0
+    IF (PRESENT(up))   halo_up=up
+    IF (PRESENT(down)) halo_down=down
+    
+    ll=size(FieldS,2)*size(FieldS,3)
+    
+    CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
+    
+  END SUBROUTINE  Register_SwapField3d_v_bis 
+
+
+
+
+  SUBROUTINE Register_SwapField1d_v2d(FieldS,FieldR,new_dist,a_request,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+    
+    TYPE(distrib),INTENT(IN)          :: new_dist !LF
+    REAL, DIMENSION(current_dist%jjb_v:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%jjb_v:,:),INTENT(OUT)    :: FieldR
+    INTEGER,OPTIONAL,INTENT(IN)       :: up
+    INTEGER,OPTIONAL,INTENT(IN)       :: down      
+    TYPE(request),INTENT(INOUT)         :: a_request
+
+    INTEGER                           :: halo_up
+    INTEGER                           :: halo_down
+    
+    
+    halo_up=0
+    halo_down=0
+    IF (PRESENT(up))   halo_up=up
+    IF (PRESENT(down)) halo_down=down
+
+    CALL  Register_SwapField_gen_v(FieldS,FieldR,1,current_dist,new_dist,halo_up,halo_down,a_request)
         
   END SUBROUTINE  Register_SwapField1d_v2d
 
-
-  SUBROUTINE Register_SwapField2d_v2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
-  USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
-    
-    REAL, DIMENSION(:,:,:),INTENT(IN)     :: FieldS
-    REAL, DIMENSION(:,:,:),INTENT(OUT)    :: FieldR
-    TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
+  SUBROUTINE Register_SwapField1d_v2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+    
+    TYPE(distrib),INTENT(IN)          :: new_dist !LF
+    TYPE(distrib),INTENT(IN) :: old_dist
+    REAL, DIMENSION(old_dist%jjb_v:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%jjb_v:,:),INTENT(OUT)    :: FieldR
+    INTEGER,OPTIONAL,INTENT(IN)       :: up
+    INTEGER,OPTIONAL,INTENT(IN)       :: down      
+    TYPE(request),INTENT(INOUT)         :: a_request
+
+    INTEGER                           :: halo_up
+    INTEGER                           :: halo_down
+    
+    
+    halo_up=0
+    halo_down=0
+    IF (PRESENT(up))   halo_up=up
+    IF (PRESENT(down)) halo_down=down
+
+    CALL  Register_SwapField_gen_v(FieldS,FieldR,1,old_dist,new_dist,halo_up,halo_down,a_request)
+        
+  END SUBROUTINE  Register_SwapField1d_v2d_bis
+
+
+  SUBROUTINE Register_SwapField2d_v2d(FieldS,FieldR,new_dist,a_request,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+    
     TYPE(distrib),INTENT(IN)          :: new_dist
+    REAL, DIMENSION(current_dist%jjb_v:,:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%jjb_v:,:,:),INTENT(OUT)    :: FieldR
     INTEGER,OPTIONAL,INTENT(IN)       :: up
     INTEGER,OPTIONAL,INTENT(IN)       :: down      
@@ -715,22 +949,17 @@
     ll=size(FieldS,3)
     
-    IF (PRESENT(old_dist)) THEN
-      CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
-    ELSE
-      CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
-    ENDIF
+    CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
     
   END SUBROUTINE  Register_SwapField2d_v2d
    
-
-  SUBROUTINE Register_SwapField3d_v2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
-  USE parallel_lmdz
-  USE dimensions_mod
-      IMPLICIT NONE
-    
-    REAL, DIMENSION(:,:,:,:),INTENT(IN)     :: FieldS
-    REAL, DIMENSION(:,:,:,:),INTENT(OUT)    :: FieldR
-    TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
+  SUBROUTINE Register_SwapField2d_v2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+    
     TYPE(distrib),INTENT(IN)          :: new_dist
+    TYPE(distrib),INTENT(IN) :: old_dist
+    REAL, DIMENSION(old_dist%jjb_v:,:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%jjb_v:,:,:),INTENT(OUT)    :: FieldR
     INTEGER,OPTIONAL,INTENT(IN)       :: up
     INTEGER,OPTIONAL,INTENT(IN)       :: down      
@@ -747,13 +976,67 @@
     IF (PRESENT(down)) halo_down=down
     
+    ll=size(FieldS,3)
+    
+    CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
+    
+  END SUBROUTINE  Register_SwapField2d_v2d_bis
+   
+
+  SUBROUTINE Register_SwapField3d_v2d(FieldS,FieldR,new_dist,a_request,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+    
+    TYPE(distrib),INTENT(IN)          :: new_dist
+    REAL, DIMENSION(current_dist%jjb_v:,:,:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%jjb_v:,:,:,:),INTENT(OUT)    :: FieldR
+    INTEGER,OPTIONAL,INTENT(IN)       :: up
+    INTEGER,OPTIONAL,INTENT(IN)       :: down      
+    TYPE(request),INTENT(INOUT)         :: a_request
+
+    INTEGER                           :: halo_up
+    INTEGER                           :: halo_down
+    INTEGER                           :: ll
+        
+    
+    halo_up=0
+    halo_down=0
+    IF (PRESENT(up))   halo_up=up
+    IF (PRESENT(down)) halo_down=down
+    
     ll=size(FieldS,3)*size(FieldS,4)
     
-    IF (PRESENT(old_dist)) THEN
-      CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
-    ELSE
-      CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
-    ENDIF
+    CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
     
   END SUBROUTINE  Register_SwapField3d_v2d 
+  
+  SUBROUTINE Register_SwapField3d_v2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
+  USE parallel_lmdz
+  USE dimensions_mod
+      IMPLICIT NONE
+    
+    TYPE(distrib),INTENT(IN)          :: new_dist
+    TYPE(distrib),INTENT(IN) :: old_dist
+    REAL, DIMENSION(old_dist%jjb_v:,:,:,:),INTENT(IN)     :: FieldS
+    REAL, DIMENSION(new_dist%jjb_v:,:,:,:),INTENT(OUT)    :: FieldR
+    INTEGER,OPTIONAL,INTENT(IN)       :: up
+    INTEGER,OPTIONAL,INTENT(IN)       :: down      
+    TYPE(request),INTENT(INOUT)         :: a_request
+
+    INTEGER                           :: halo_up
+    INTEGER                           :: halo_down
+    INTEGER                           :: ll
+        
+    
+    halo_up=0
+    halo_down=0
+    IF (PRESENT(up))   halo_up=up
+    IF (PRESENT(down)) halo_down=down
+    
+    ll=size(FieldS,3)*size(FieldS,4)
+    
+    CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
+    
+  END SUBROUTINE  Register_SwapField3d_v2d_bis 
   
   
