Index: trunk/AGRIF/AGRIF_FILES/modinterp.F
===================================================================
--- trunk/AGRIF/AGRIF_FILES/modinterp.F	(revision 779)
+++ trunk/AGRIF/AGRIF_FILES/modinterp.F	(revision 898)
@@ -631,6 +631,7 @@
       INTEGER,DIMENSION(nbdim,4)           :: tab3
       INTEGER,DIMENSION(nbdim,4,0:Agrif_Nbprocs-1) :: tab4
-      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1,4) :: tab4t
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1,8) :: tab4t
       LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: memberinall
+      LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: sendtoproc1,recvfromproc1      
       LOGICAL, DIMENSION(1) :: memberin1
 C
@@ -650,5 +651,5 @@
      &       pttruetab,cetruetab,member,memberin,find_list_interp
 #if defined AGRIF_MPI
-     &       ,tab4t,memberinall
+     &       ,tab4t,memberinall,sendtoproc1,recvfromproc1
 #endif
      &    )
@@ -823,11 +824,22 @@
       CALL MPI_ALLGATHER(memberin1,1,MPI_LOGICAL,memberinall,
      &                  1,MPI_LOGICAL,MPI_COMM_WORLD,code)
-     
+
+       Call Get_External_Data_first(tab4t(:,:,1),
+     &            tab4t(:,:,2),
+     &            tab4t(:,:,3),tab4t(:,:,4),nbdim,member,memberin,
+     &            memberinall,sendtoproc1,recvfromproc1,tab4t(:,:,5),
+     & tab4t(:,:,6),tab4t(:,:,7),tab4t(:,:,8))
+          
       endif     
            
-      Call Get_External_Data(tempP,tempPextend,tab4t(:,:,1),
-     &            tab4t(:,:,2),
-     &            tab4t(:,:,3),tab4t(:,:,4),nbdim,member,memberin,
-     &            memberinall)
+!      Call Get_External_Data(tempP,tempPextend,tab4t(:,:,1),
+!     &            tab4t(:,:,2),
+!     &            tab4t(:,:,3),tab4t(:,:,4),nbdim,member,memberin,
+!     &            memberinall)
+     
+      Call ExchangeSameLevel2(sendtoproc1,recvfromproc1,nbdim,
+     &            tab4t(:,:,3),tab4t(:,:,4),tab4t(:,:,5),tab4t(:,:,6),
+     &            tab4t(:,:,7),tab4t(:,:,8),memberin,tempP,
+     &            tempPextend)
 #else
       tempPextend%var => tempP%var
@@ -840,5 +852,5 @@
      &   pttruetab,cetruetab,member,memberin,nbdim
 #if defined AGRIF_MPI
-     &   ,tab4t,memberinall
+     &   ,tab4t,memberinall,sendtoproc1,recvfromproc1
 #endif
      &    )
@@ -2048,5 +2060,5 @@
      &      find_list_interp
 #if defined AGRIF_MPI
-     &     ,tab4t,memberinall
+     &     ,tab4t,memberinall,sendtoproc1,recvfromproc1
 #endif
      &    )     
@@ -2065,6 +2077,7 @@
 #ifdef AGRIF_MPI
 C
-      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1,4) :: tab4t
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1,8) :: tab4t
       LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: memberinall
+      LOGICAL, DIMENSION(0:Agrif_Nbprocs-1) :: sendtoproc1,recvfromproc1
 #endif 
                     
@@ -2098,6 +2111,9 @@
         parentarray = parcours%interp_loc%parentarray(1:nbdim,:,:)
         member = parcours%interp_loc%member
-        tab4t = parcours%interp_loc%tab4t(1:nbdim,0:Agrif_Nbprocs-1,1:4)
+        tab4t = parcours%interp_loc%tab4t(1:nbdim,0:Agrif_Nbprocs-1,1:8)
         memberinall = parcours%interp_loc%memberinall(0:Agrif_Nbprocs-1)
+        sendtoproc1 = parcours%interp_loc%sendtoproc1(0:Agrif_Nbprocs-1)
+        recvfromproc1 = 
+     &    parcours%interp_loc%recvfromproc1(0:Agrif_Nbprocs-1)
 #endif        
         memberin = parcours%interp_loc%memberin
@@ -2115,5 +2131,5 @@
      &                          member,memberin,nbdim
 #if defined AGRIF_MPI
-     &      ,tab4t,memberinall
+     &      ,tab4t,memberinall,sendtoproc1,recvfromproc1
 #endif
      &    )
@@ -2130,6 +2146,8 @@
 #ifdef AGRIF_MPI
 C
-      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1,4) :: tab4t
+      INTEGER,DIMENSION(nbdim,0:Agrif_Nbprocs-1,8) :: tab4t
       LOGICAL,DIMENSION(0:Agrif_Nbprocs-1) :: memberinall
+      LOGICAL,DIMENSION(0:Agrif_Nbprocs-1) :: sendtoproc1
+      LOGICAL,DIMENSION(0:Agrif_Nbprocs-1) :: recvfromproc1
 #endif                   
       Type(Agrif_List_Interp_loc), Pointer :: parcours
@@ -2157,8 +2175,12 @@
      &       = parentarray(1:nbdim,:,:)
       parcours%interp_loc%member = member
-      Allocate(parcours%interp_loc%tab4t(nbdim,0:Agrif_Nbprocs-1,4))
+      Allocate(parcours%interp_loc%tab4t(nbdim,0:Agrif_Nbprocs-1,8))
       Allocate(parcours%interp_loc%memberinall(0:Agrif_Nbprocs-1))
+      Allocate(parcours%interp_loc%sendtoproc1(0:Agrif_Nbprocs-1))
+      Allocate(parcours%interp_loc%recvfromproc1(0:Agrif_Nbprocs-1))                  
       parcours%interp_loc%tab4t=tab4t   
       parcours%interp_loc%memberinall=memberinall   
+      parcours%interp_loc%sendtoproc1=sendtoproc1
+      parcours%interp_loc%recvfromproc1=recvfromproc1            
 #endif      
 
