Index: codes/icosagcm/branches/SATURN_DYNAMICO/ICOSAGCM/src/restart.f90
===================================================================
--- codes/icosagcm/branches/SATURN_DYNAMICO/ICOSAGCM/src/restart.f90	(revision 315)
+++ codes/icosagcm/branches/SATURN_DYNAMICO/ICOSAGCM/src/restart.f90	(revision 316)
@@ -201,4 +201,5 @@
     ENDIF
 !$OMP END MASTER
+!$OMP BARRIER
   
   END SUBROUTINE write_restart
@@ -399,4 +400,5 @@
     CALL getin("start_file_name",start_file_name)
 
+!$OMP BARRIER
 !$OMP MASTER
 
@@ -427,9 +429,4 @@
     IF (is_mpi_root) THEN
       status = NF90_OPEN(TRIM(ADJUSTL(start_file_name))//'.nc', NF90_NOWRITE, ncid)
-    ENDIF
-   
-    DO nf=1,nfield
-      field=>field_array(nf)%field
-      status = nf90_inq_varid(ncid, TRIM(ADJUSTL(field(1)%name)), fieldId(nf))
       status = nf90_inq_varid(ncid, "iteration",itid)
       IF (status==NF90_NOERR) THEN 
@@ -438,4 +435,9 @@
         status = nf90_get_att(ncid, NF90_GLOBAL, "iteration", it)
       ENDIF
+    ENDIF
+    
+    DO nf=1,nfield
+      field=>field_array(nf)%field
+       IF (is_mpi_root) status = nf90_inq_varid(ncid, TRIM(ADJUSTL(field(1)%name)), fieldId(nf))
       CALL read_start_field(field,fieldId(nf),ncid)
     ENDDO
@@ -446,4 +448,5 @@
     ENDIF
 !$OMP END MASTER
+!$OMP BARRIER
   
   END SUBROUTINE read_start
@@ -468,7 +471,7 @@
     TYPE(t_field),POINTER :: field_glo(:)
     REAL(rstd),ALLOCATABLE :: global_field2d(:)
-    REAL(rstd),ALLOCATABLE :: global_field3d(:,:)
-    REAL(rstd),ALLOCATABLE :: global_field4d(:,:,:)
-    INTEGER :: i,j,ij,k,e,ind,ind_glo
+    REAL(rstd),ALLOCATABLE :: global_field3d(:)
+    REAL(rstd),ALLOCATABLE :: global_field4d(:)
+    INTEGER :: i,j,l,q,ij,k,e,ind,ind_glo
     INTEGER :: ndim, field_type
     INTEGER :: status
@@ -506,26 +509,35 @@
           
           ELSE IF (ndim==3) THEN
-            ALLOCATE(global_field3d(ncell_glo,llm))
-            status=NF90_GET_VAR(ncid,fieldid,global_field3d,start=(/ 1,1 /),count=(/ ncell_glo,llm /))
-            DO ind=1,ndomain_glo
-              d=>domain_glo(ind)
-              DO j=d%jj_begin,d%jj_end
-                DO i=d%ii_begin,d%ii_end
-                  ij=(j-1)*d%iim+i
-                  ind_glo=d%assign_cell_glo(i,j)
-                  field_glo(ind)%rval3d(ij,:) = global_field3d(ind_glo,:)
+
+            ALLOCATE(global_field3d(ncell_glo))
+       
+            DO l=1,llm
+              status=NF90_GET_VAR(ncid,fieldid,global_field3d,start=(/ 1,l /),count=(/ ncell_glo,1 /))
+              DO ind=1,ndomain_glo
+                d=>domain_glo(ind)
+                DO j=d%jj_begin,d%jj_end
+                 DO i=d%ii_begin,d%ii_end
+                    ij=(j-1)*d%iim+i
+                    ind_glo=d%assign_cell_glo(i,j)
+                    field_glo(ind)%rval3d(ij,l) = global_field3d(ind_glo)
+                  ENDDO
                 ENDDO
               ENDDO
             ENDDO
           ELSE IF (ndim==4) THEN
-            ALLOCATE(global_field4d(ncell_glo,llm,nqtot))
-            status=NF90_GET_VAR(ncid,fieldid,global_field4d,start=(/ 1,1,1 /),count=(/ ncell_glo,llm,nqtot /))
-            DO ind=1,ndomain_glo
-              d=>domain_glo(ind)
-              DO j=d%jj_begin,d%jj_end
-                DO i=d%ii_begin,d%ii_end
-                  ij=(j-1)*d%iim+i
-                  ind_glo=d%assign_cell_glo(i,j)
-                  field_glo(ind)%rval4d(ij,:,:) = global_field4d(ind_glo,:,:)
+            ALLOCATE(global_field4d(ncell_glo))
+            
+            DO q=1,nqtot
+              DO l=1,llm         
+                status=NF90_GET_VAR(ncid,fieldid,global_field4d,start=(/ 1,l,q /),count=(/ ncell_glo,1,1 /))
+                  DO ind=1,ndomain_glo
+                    d=>domain_glo(ind)
+                    DO j=d%jj_begin,d%jj_end
+                      DO i=d%ii_begin,d%ii_end
+                        ij=(j-1)*d%iim+i
+                        ind_glo=d%assign_cell_glo(i,j)
+                        field_glo(ind)%rval4d(ij,l,q) = global_field4d(ind_glo)
+                      ENDDO
+                    ENDDO
                 ENDDO
               ENDDO
@@ -553,15 +565,18 @@
             ENDDO
           ELSE IF (ndim==3) THEN
-            ALLOCATE(global_field3d(3*ncell_glo,llm))
-            status=NF90_GET_VAR(ncid,fieldid,global_field3d,start=(/ 1,1 /),count=(/ 3*ncell_glo,llm /))
-            DO ind=1,ndomain_glo
-              d=>domain_glo(ind)
-              DO j=d%jj_begin,d%jj_end
-                DO i=d%ii_begin,d%ii_end
-                  DO k=0,5
-                    ij=(j-1)*d%iim+i
-                    ind_glo=d%assign_cell_glo(i,j)
-                    e=cell_glo(ind_glo)%edge(MOD(k+d%delta(i,j)+6,6))  
-                    field_glo(ind)%rval3d(ij+d%u_pos(k+1),:)=global_field3d(e,:)*d%edge_assign_sign(k,i,j)
+          
+            ALLOCATE(global_field3d(3*ncell_glo))
+            DO l=1,llm
+              status=NF90_GET_VAR(ncid,fieldid,global_field3d,start=(/ 1,l /),count=(/ 3*ncell_glo,1 /))
+              DO ind=1,ndomain_glo
+                d=>domain_glo(ind)
+                DO j=d%jj_begin,d%jj_end
+                  DO i=d%ii_begin,d%ii_end
+                    DO k=0,5
+                      ij=(j-1)*d%iim+i
+                      ind_glo=d%assign_cell_glo(i,j)
+                      e=cell_glo(ind_glo)%edge(MOD(k+d%delta(i,j)+6,6))  
+                      field_glo(ind)%rval3d(ij+d%u_pos(k+1),l)=global_field3d(e)*d%edge_assign_sign(k,i,j)
+                    ENDDO
                   ENDDO
                 ENDDO
@@ -569,17 +584,22 @@
             ENDDO
           ELSE IF (ndim==4) THEN
-            ALLOCATE(global_field4d(3*ncell_glo,llm,nqtot))
-            status=NF90_GET_VAR(ncid,fieldid,global_field4d,start=(/ 1,1,1 /),count=(/ 3*ncell_glo,llm,nqtot /))
-            DO ind=1,ndomain_glo
-              d=>domain_glo(ind)
-              DO j=d%jj_begin,d%jj_end
-                DO i=d%ii_begin,d%ii_end
-                  DO k=0,5
-                    ij=(j-1)*d%iim+i
-                    ind_glo=d%assign_cell_glo(i,j)
-                    e=cell_glo(ind_glo)%edge(MOD(k+d%delta(i,j)+6,6))  
-                    field_glo(ind)%rval4d(ij+d%u_pos(k+1),:,:)=global_field4d(e,:,:)*d%edge_assign_sign(k,i,j)
-                  ENDDO
-                ENDDO
+
+            ALLOCATE(global_field4d(3*ncell_glo))
+            DO q=1,nqtot
+              DO l=1,llm
+               status=NF90_GET_VAR(ncid,fieldid,global_field4d,start=(/ 1,l,q /),count=(/ 3*ncell_glo,1,1 /))
+               DO ind=1,ndomain_glo
+                 d=>domain_glo(ind)
+                 DO j=d%jj_begin,d%jj_end
+                   DO i=d%ii_begin,d%ii_end
+                     DO k=0,5
+                       ij=(j-1)*d%iim+i
+                       ind_glo=d%assign_cell_glo(i,j)
+                       e=cell_glo(ind_glo)%edge(MOD(k+d%delta(i,j)+6,6))  
+                       field_glo(ind)%rval4d(ij+d%u_pos(k+1),l,q)=global_field4d(e)*d%edge_assign_sign(k,i,j)
+                     ENDDO
+                   ENDDO
+                 ENDDO
+               ENDDO
               ENDDO
             ENDDO
Index: codes/icosagcm/branches/SATURN_DYNAMICO/ICOSAGCM/src/transfert_mpi.f90
===================================================================
--- codes/icosagcm/branches/SATURN_DYNAMICO/ICOSAGCM/src/transfert_mpi.f90	(revision 315)
+++ codes/icosagcm/branches/SATURN_DYNAMICO/ICOSAGCM/src/transfert_mpi.f90	(revision 316)
@@ -1596,4 +1596,14 @@
     INTEGER :: ireq,nreq
     INTEGER :: ind_glo,ind_loc    
+    TYPE t_field_tmp
+      REAL,POINTER :: rval2d(:)
+      REAL,POINTER :: rval3d(:,:)
+      REAL,POINTER :: rval4d(:,:,:)
+    END TYPE t_field_tmp
+      
+    TYPE(t_field_tmp),ALLOCATABLE :: field_tmp(:)
+    TYPE(t_field_tmp),ALLOCATABLE :: field_tmp2(:)
+
+
   
     IF (.NOT. using_mpi) THEN
@@ -1615,17 +1625,22 @@
       ireq=0
       IF (mpi_rank==0) THEN
+        ALLOCATE(field_tmp(ndomain_glo))
         DO ind_glo=1,ndomain_glo
           ireq=ireq+1
 
           IF (field_glo(ind_glo)%ndim==2) THEN
-            CALL MPI_IRECV(field_glo(ind_glo)%rval2d,size(field_glo(ind_glo)%rval2d) , MPI_REAL8 ,   &
+            ALLOCATE(field_tmp(ind_glo)%rval2d(size(field_glo(ind_glo)%rval2d,1)))
+            CALL MPI_IRECV(field_tmp(ind_glo)%rval2d(1),size(field_glo(ind_glo)%rval2d) , MPI_REAL8 ,   &
                          domglo_rank(ind_glo),domglo_loc_ind(ind_glo), comm_icosa, mpi_req(ireq), ierr)
    
           ELSE IF (field_glo(ind_glo)%ndim==3) THEN
-            CALL MPI_IRECV(field_glo(ind_glo)%rval3d,size(field_glo(ind_glo)%rval3d) , MPI_REAL8 ,   &
+            ALLOCATE(field_tmp(ind_glo)%rval3d(size(field_glo(ind_glo)%rval3d,1),size(field_glo(ind_glo)%rval3d,2)))
+            CALL MPI_IRECV(field_tmp(ind_glo)%rval3d(1,1),size(field_glo(ind_glo)%rval3d) , MPI_REAL8 ,   &
                          domglo_rank(ind_glo),domglo_loc_ind(ind_glo), comm_icosa, mpi_req(ireq), ierr)
 
           ELSE IF (field_glo(ind_glo)%ndim==4) THEN
-            CALL MPI_IRECV(field_glo(ind_glo)%rval4d,size(field_glo(ind_glo)%rval4d) , MPI_REAL8 ,   &
+            ALLOCATE(field_tmp(ind_glo)%rval4d(size(field_glo(ind_glo)%rval4d,1),size(field_glo(ind_glo)%rval4d,2), &
+                                             size(field_glo(ind_glo)%rval4d,3)))
+            CALL MPI_IRECV(field_tmp(ind_glo)%rval4d(1,1,1),size(field_glo(ind_glo)%rval4d) , MPI_REAL8 ,   &
                          domglo_rank(ind_glo),domglo_loc_ind(ind_glo), comm_icosa, mpi_req(ireq), ierr)
           ENDIF
@@ -1633,4 +1648,6 @@
         ENDDO
       ENDIF
+
+      ALLOCATE(field_tmp2(ndomain))
   
       DO ind_loc=1,ndomain
@@ -1638,11 +1655,18 @@
 
         IF (field_loc(ind_loc)%ndim==2) THEN
-          CALL MPI_ISEND(field_loc(ind_loc)%rval2d,size(field_loc(ind_loc)%rval2d) , MPI_REAL8 ,   &
+          ALLOCATE(field_tmp2(ind_loc)%rval2d(size(field_loc(ind_loc)%rval2d,1)))
+          field_tmp2(ind_loc)%rval2d=field_loc(ind_loc)%rval2d
+          CALL MPI_ISEND(field_tmp2(ind_loc)%rval2d(1),size(field_loc(ind_loc)%rval2d) , MPI_REAL8 ,   &
                          0, ind_loc, comm_icosa, mpi_req(ireq), ierr)
         ELSE IF (field_loc(ind_loc)%ndim==3) THEN
-          CALL MPI_ISEND(field_loc(ind_loc)%rval3d,size(field_loc(ind_loc)%rval3d) , MPI_REAL8 ,   &
+          ALLOCATE(field_tmp2(ind_loc)%rval3d(size(field_loc(ind_loc)%rval3d,1),size(field_loc(ind_loc)%rval3d,2)))
+          field_tmp2(ind_loc)%rval3d=field_loc(ind_loc)%rval3d
+          CALL MPI_ISEND(field_tmp2(ind_loc)%rval3d(1,1),size(field_loc(ind_loc)%rval3d) , MPI_REAL8 ,   &
                          0, ind_loc, comm_icosa, mpi_req(ireq), ierr)
         ELSE IF (field_loc(ind_loc)%ndim==4) THEN
-          CALL MPI_ISEND(field_loc(ind_loc)%rval4d,size(field_loc(ind_loc)%rval4d) , MPI_REAL8 ,   &
+            ALLOCATE(field_tmp2(ind_loc)%rval4d(size(field_loc(ind_loc)%rval4d,1),size(field_loc(ind_loc)%rval4d,2), &
+                                               size(field_loc(ind_loc)%rval4d,3)))
+          field_tmp2(ind_loc)%rval4d=field_loc(ind_loc)%rval4d
+          CALL MPI_ISEND(field_tmp2(ind_loc)%rval4d(1,1,1),size(field_loc(ind_loc)%rval4d) , MPI_REAL8 ,   &
                          0, ind_loc, comm_icosa, mpi_req(ireq), ierr)
         ENDIF
@@ -1651,4 +1675,31 @@
    
       CALL MPI_WAITALL(nreq,mpi_req,status,ierr)
+
+        DO ind_loc=1,ndomain
+          IF (field_loc(ind_loc)%ndim==2) THEN
+            DEALLOCATE(field_tmp2(ind_loc)%rval2d)
+          ELSE IF (field_loc(ind_loc)%ndim==3) THEN
+            DEALLOCATE(field_tmp2(ind_loc)%rval3d)
+          ELSE IF (field_loc(ind_loc)%ndim==4) THEN
+            DEALLOCATE(field_tmp2(ind_loc)%rval4d)
+          ENDIF
+        ENDDO
+
+      IF (mpi_rank==0) THEN
+    
+        DO ind_glo=1,ndomain_glo
+          IF (field_glo(ind_glo)%ndim==2) THEN
+            field_glo(ind_glo)%rval2d=field_tmp(ind_glo)%rval2d
+            DEALLOCATE(field_tmp(ind_glo)%rval2d)
+          ELSE IF (field_glo(ind_glo)%ndim==3) THEN
+            field_glo(ind_glo)%rval3d=field_tmp(ind_glo)%rval3d
+            DEALLOCATE(field_tmp(ind_glo)%rval3d)
+          ELSE IF (field_glo(ind_glo)%ndim==4) THEN
+            field_glo(ind_glo)%rval4d=field_tmp(ind_glo)%rval4d
+            DEALLOCATE(field_tmp(ind_glo)%rval4d)
+          ENDIF
+        ENDDO
+      
+      ENDIF
 
     ENDIF
@@ -1667,7 +1718,17 @@
     INTEGER, ALLOCATABLE :: mpi_req(:)
     INTEGER, ALLOCATABLE :: status(:,:)
-    INTEGER :: ireq,nreq
+    INTEGER :: ireq,nreq, root_request
     INTEGER :: ind_glo,ind_loc    
-  
+    INTEGER :: recv_size(ndomain)
+    LOGICAL :: index
+    INTEGER ::root_status(MPI_STATUS_SIZE)
+    TYPE t_field_tmp
+      REAL,POINTER :: rval2d(:)
+      REAL,POINTER :: rval3d(:,:)
+      REAL,POINTER :: rval4d(:,:,:)
+    END TYPE t_field_tmp
+      
+    TYPE(t_field_tmp),ALLOCATABLE :: field_tmp(:)
+     
     IF (.NOT. using_mpi) THEN
     
@@ -1677,13 +1738,168 @@
         IF (field_loc(ind_loc)%ndim==4) field_loc(ind_loc)%rval4d=field_glo(ind_loc)%rval4d
       ENDDO
+      
+    ELSE IF (.FALSE.) THEN
+
+      CALL MPI_BARRIER(comm_icosa,ierr)          
+
+      IF (mpi_rank/=0) THEN
+        nreq=ndomain
+        ALLOCATE(mpi_req(nreq))
+        ALLOCATE(status(MPI_STATUS_SIZE,nreq))
+        ALLOCATE(field_tmp(ndomain))
+        ireq=0
+        DO ind_loc=1,ndomain
+          ireq=ireq+1
+          IF (field_loc(ind_loc)%ndim==2) THEN
+            ALLOCATE(field_tmp(ind_loc)%rval2d(size(field_loc(ind_loc)%rval2d,1)))
+            CALL MPI_IRECV(field_tmp(ind_loc)%rval2d,size(field_loc(ind_loc)%rval2d) , MPI_REAL8 ,   &
+                           0, ind_loc, comm_icosa, mpi_req(ireq), ierr)
+!            DEALLOCATE(rval2d)
+          ELSE IF (field_loc(ind_loc)%ndim==3) THEN
+            ALLOCATE(field_tmp(ind_loc)%rval3d(size(field_loc(ind_loc)%rval3d,1),size(field_loc(ind_loc)%rval3d,2)))
+            CALL MPI_IRECV(field_tmp(ind_loc)%rval3d,size(field_loc(ind_loc)%rval3d) , MPI_REAL8 ,   &
+                           0, ind_loc, comm_icosa, mpi_req(ireq), ierr)
+!            DEALLOCATE(rval3d)
+          ELSE IF (field_loc(ind_loc)%ndim==4) THEN
+            ALLOCATE(field_tmp(ind_loc)%rval4d(size(field_loc(ind_loc)%rval4d,1),size(field_loc(ind_loc)%rval4d,2), &
+                                               size(field_loc(ind_loc)%rval4d,3)))
+            CALL MPI_IRECV(field_tmp(ind_loc)%rval4d,size(field_loc(ind_loc)%rval4d) , MPI_REAL8 ,   &
+                           0, ind_loc, comm_icosa, mpi_req(ireq), ierr)
+!            DEALLOCATE(rval4d)
+          ENDIF
+       ENDDO
+      
+       DO ind_loc=1,ndomain
+         CALL MPI_WAITANY(nreq,mpi_req,index,status,ierr)
+       ENDDO
+
+       DO ind_loc=1,ndomain
+          IF (field_loc(ind_loc)%ndim==2) THEN
+            field_loc(ind_loc)%rval2d=field_tmp(ind_loc)%rval2d
+            DEALLOCATE(field_tmp(ind_loc)%rval2d)
+          ELSE IF (field_loc(ind_loc)%ndim==3) THEN
+            field_loc(ind_loc)%rval3d=field_tmp(ind_loc)%rval3d
+            DEALLOCATE(field_tmp(ind_loc)%rval3d)
+          ELSE IF (field_loc(ind_loc)%ndim==4) THEN
+            field_loc(ind_loc)%rval4d=field_tmp(ind_loc)%rval4d
+            DEALLOCATE(field_tmp(ind_loc)%rval4d)
+          ENDIF
+
+       ENDDO
+       
+     ELSE    
+    
+        DO ind_glo=1,ndomain_glo
+
+          IF (field_glo(ind_glo)%ndim==2) THEN
+           
+            IF (domglo_rank(ind_glo)/=0) THEN
+              CALL MPI_ISSEND(field_glo(ind_glo)%rval2d,size(field_glo(ind_glo)%rval2d) , MPI_REAL8 ,   &
+                         domglo_rank(ind_glo),domglo_loc_ind(ind_glo), comm_icosa, root_request, ierr)
+              CALL MPI_WAIT(root_request,root_status,ierr)
+            ELSE
+              field_loc(domglo_loc_ind(ind_glo))%rval2d =  field_glo(ind_glo)%rval2d
+            ENDIF
+
+          ELSE IF (field_glo(ind_glo)%ndim==3) THEN
+           
+            IF (domglo_rank(ind_glo)/=0) THEN
+              CALL MPI_ISSEND(field_glo(ind_glo)%rval3d,size(field_glo(ind_glo)%rval3d) , MPI_REAL8 ,   &
+                         domglo_rank(ind_glo),domglo_loc_ind(ind_glo), comm_icosa, root_request, ierr)
+              CALL MPI_WAIT(root_request,root_status,ierr)
+            ELSE
+              field_loc(domglo_loc_ind(ind_glo))%rval3d =  field_glo(ind_glo)%rval3d
+            ENDIF
+
+          ELSE IF (field_glo(ind_glo)%ndim==4) THEN
+           
+            IF (domglo_rank(ind_glo)/=0) THEN
+              CALL MPI_ISSEND(field_glo(ind_glo)%rval4d,size(field_glo(ind_glo)%rval4d) , MPI_REAL8 ,   &
+                         domglo_rank(ind_glo),domglo_loc_ind(ind_glo), comm_icosa, root_request, ierr)
+              CALL MPI_WAIT(root_request,root_status,ierr)
+            ELSE
+              field_loc(domglo_loc_ind(ind_glo))%rval4d =  field_glo(ind_glo)%rval4d
+            ENDIF
+         
+          ENDIF
+                         
+   
+         
+        ENDDO
+      ENDIF
+    
     
     ELSE
-          
+      CALL MPI_BARRIER(comm_icosa,ierr)          
       nreq=ndomain
       IF (mpi_rank==0) nreq=nreq+ndomain_glo 
       ALLOCATE(mpi_req(nreq))
       ALLOCATE(status(MPI_STATUS_SIZE,nreq))
-    
-    
+      ALLOCATE(field_tmp(ndomain))
+    
+    
+      IF (.FALSE.) THEN
+      
+        ireq=0
+        IF (mpi_rank==0) THEN
+          DO ind_glo=1,ndomain_glo
+            ireq=ireq+1
+
+            IF (field_glo(ind_glo)%ndim==2) THEN
+              CALL MPI_ISEND(size(field_glo(ind_glo)%rval2d),1 , MPI_INTEGER ,   &
+                           domglo_rank(ind_glo),domglo_loc_ind(ind_glo), comm_icosa, mpi_req(ireq), ierr)
+     
+            ELSE IF (field_glo(ind_glo)%ndim==3) THEN
+              CALL MPI_ISEND(size(field_glo(ind_glo)%rval3d),1 , MPI_INTEGER ,   &
+                           domglo_rank(ind_glo),domglo_loc_ind(ind_glo), comm_icosa, mpi_req(ireq), ierr)
+
+            ELSE IF (field_glo(ind_glo)%ndim==4) THEN
+              CALL MPI_ISEND(size(field_glo(ind_glo)%rval4d),1 , MPI_INTEGER ,   &
+                           domglo_rank(ind_glo),domglo_loc_ind(ind_glo), comm_icosa, mpi_req(ireq), ierr)
+            ENDIF
+           
+          ENDDO
+        ENDIF
+    
+        DO ind_loc=1,ndomain
+          ireq=ireq+1
+
+          IF (field_loc(ind_loc)%ndim==2) THEN
+            CALL MPI_IRECV(recv_size(ind_loc),1 , MPI_INTEGER ,   &
+                           0, ind_loc, comm_icosa, mpi_req(ireq), ierr)
+          ELSE IF (field_loc(ind_loc)%ndim==3) THEN
+            CALL MPI_IRECV(recv_size(ind_loc),1, MPI_INTEGER ,   &
+                           0, ind_loc, comm_icosa, mpi_req(ireq), ierr)
+          ELSE IF (field_loc(ind_loc)%ndim==4) THEN
+            CALL MPI_IRECV(recv_size(ind_loc),1 , MPI_INTEGER ,   &
+                           0, ind_loc, comm_icosa, mpi_req(ireq), ierr)
+          ENDIF
+        
+        ENDDO
+     
+        CALL MPI_WAITALL(nreq,mpi_req,status,ierr)
+
+        DO ind_loc=1,ndomain
+          IF (field_loc(ind_loc)%ndim==2) THEN
+            IF (recv_size(ind_loc)/=size(field_loc(ind_loc)%rval2d)) THEN 
+              PRINT *,"Pb in  scatter_field : recv_size not conform :",recv_size(ind_loc),size(field_loc(ind_loc)%rval2d)    
+            ENDIF
+          ELSE IF (field_loc(ind_loc)%ndim==3) THEN
+            IF (recv_size(ind_loc)/=size(field_loc(ind_loc)%rval3d)) THEN 
+              PRINT *,"Pb in  scatter_field : recv_size not conform :",recv_size(ind_loc),size(field_loc(ind_loc)%rval3d)    
+            ENDIF
+          ELSE IF (field_loc(ind_loc)%ndim==4) THEN
+            IF (recv_size(ind_loc)/=size(field_loc(ind_loc)%rval4d)) THEN 
+              PRINT *,"Pb in  scatter_field : recv_size not conform :",recv_size(ind_loc),size(field_loc(ind_loc)%rval4d)    
+            ENDIF
+          ENDIF
+        ENDDO
+        PRINT *,"scatter_field : Every thing OK ?"       
+        CALL MPI_BARRIER(comm_icosa,ierr)
+        PRINT *,"YES scatter_field : Every thing is OK ?"       
+      ENDIF
+
+
+
       ireq=0
       IF (mpi_rank==0) THEN
@@ -1711,11 +1927,15 @@
 
         IF (field_loc(ind_loc)%ndim==2) THEN
-          CALL MPI_IRECV(field_loc(ind_loc)%rval2d,size(field_loc(ind_loc)%rval2d) , MPI_REAL8 ,   &
+          ALLOCATE(field_tmp(ind_loc)%rval2d(size(field_loc(ind_loc)%rval2d,1)))
+          CALL MPI_IRECV(field_tmp(ind_loc)%rval2d,size(field_loc(ind_loc)%rval2d) , MPI_REAL8 ,   &
                          0, ind_loc, comm_icosa, mpi_req(ireq), ierr)
         ELSE IF (field_loc(ind_loc)%ndim==3) THEN
-          CALL MPI_IRECV(field_loc(ind_loc)%rval3d,size(field_loc(ind_loc)%rval3d) , MPI_REAL8 ,   &
+          ALLOCATE(field_tmp(ind_loc)%rval3d(size(field_loc(ind_loc)%rval3d,1),size(field_loc(ind_loc)%rval3d,2)))
+          CALL MPI_IRECV(field_tmp(ind_loc)%rval3d,size(field_loc(ind_loc)%rval3d) , MPI_REAL8 ,   &
                          0, ind_loc, comm_icosa, mpi_req(ireq), ierr)
         ELSE IF (field_loc(ind_loc)%ndim==4) THEN
-          CALL MPI_IRECV(field_loc(ind_loc)%rval4d,size(field_loc(ind_loc)%rval4d) , MPI_REAL8 ,   &
+          ALLOCATE(field_tmp(ind_loc)%rval4d(size(field_loc(ind_loc)%rval4d,1),size(field_loc(ind_loc)%rval4d,2), &
+                                             size(field_loc(ind_loc)%rval4d,3)))
+          CALL MPI_IRECV(field_tmp(ind_loc)%rval4d,size(field_loc(ind_loc)%rval4d) , MPI_REAL8 ,   &
                          0, ind_loc, comm_icosa, mpi_req(ireq), ierr)
         ENDIF
@@ -1724,4 +1944,20 @@
    
       CALL MPI_WAITALL(nreq,mpi_req,status,ierr)
+
+      DO ind_loc=1,ndomain
+          IF (field_loc(ind_loc)%ndim==2) THEN
+            field_loc(ind_loc)%rval2d=field_tmp(ind_loc)%rval2d
+            DEALLOCATE(field_tmp(ind_loc)%rval2d)
+          ELSE IF (field_loc(ind_loc)%ndim==3) THEN
+            field_loc(ind_loc)%rval3d=field_tmp(ind_loc)%rval3d
+            DEALLOCATE(field_tmp(ind_loc)%rval3d)
+          ELSE IF (field_loc(ind_loc)%ndim==4) THEN
+            field_loc(ind_loc)%rval4d=field_tmp(ind_loc)%rval4d
+            DEALLOCATE(field_tmp(ind_loc)%rval4d)
+          ENDIF
+
+     ENDDO
+      
+      CALL MPI_BARRIER(comm_icosa,ierr)
 
     ENDIF
