Index: codes/icosagcm/trunk/src/nectdf_mod.F90
===================================================================
--- codes/icosagcm/trunk/src/nectdf_mod.F90	(revision 30)
+++ codes/icosagcm/trunk/src/nectdf_mod.F90	(revision 31)
@@ -2,5 +2,5 @@
   USE netcdf
 
-#ifndef CPP_USING_MPI
+!#ifndef CPP_USING_MPI
   INTEGER ::  NF90_NETCDF4
   INTEGER ::  NF90_MPIIO
@@ -9,9 +9,9 @@
   INTEGER,EXTERNAL :: NF90_CREATE_PAR
   INTEGER,EXTERNAL :: NF90_DEF_VAR_CHUNKING 
-#endif
+!#endif
 
 END MODULE netcdf_mod
 
-#ifndef CPP_USING_MPI
+!#ifndef CPP_USING_MPI
    SUBROUTINE NF90_CREATE_PAR
    END
@@ -19,4 +19,4 @@
    SUBROUTINE NF90_DEF_VAR_CHUNKING
    END
-#endif
+!#endif
   
Index: codes/icosagcm/trunk/src/transfert.F90
===================================================================
--- codes/icosagcm/trunk/src/transfert.F90	(revision 30)
+++ codes/icosagcm/trunk/src/transfert.F90	(revision 31)
@@ -1,5 +1,5 @@
 MODULE transfert_mod
 
-#ifdef CPP_USIN_MPI
+#ifdef CPP_USING_MPI
   USE transfert_mpi_mod, ONLY : init_transfert, transfert_request=>transfert_request_mpi, req_i1,req_e1, &
                                 request_add_point, create_request, gather_field
Index: codes/icosagcm/trunk/src/transfert_mpi.f90
===================================================================
--- codes/icosagcm/trunk/src/transfert_mpi.f90	(revision 30)
+++ codes/icosagcm/trunk/src/transfert_mpi.f90	(revision 31)
@@ -794,5 +794,5 @@
 
           ELSE IF (field_glo(ind_glo)%ndim==4) THEN
-            CALL MPI_IRECV(field_glo(ind_glo)%rval4d,size(field_glo(ind_glo)%rval3d) , MPI_REAL8 ,   &
+            CALL MPI_IRECV(field_glo(ind_glo)%rval4d,size(field_glo(ind_glo)%rval4d) , MPI_REAL8 ,   &
                          domglo_rank(ind_glo),domglo_loc_ind(ind_glo), comm_icosa, mpi_req(ireq), ierr)
           ENDIF
Index: codes/icosagcm/trunk/src/write_field.f90
===================================================================
--- codes/icosagcm/trunk/src/write_field.f90	(revision 30)
+++ codes/icosagcm/trunk/src/write_field.f90	(revision 31)
@@ -649,6 +649,6 @@
           ENDDO
 !           DO l=1,size(field(ind)%rval3d,2)
-            status=NF90_PUT_VAR(FieldId(Index),FieldVarId(index)%nc_id(1),Field_val3d,start=(/ displ+ncell,1,FieldIndex(Index) /),   &
-                               count=(/n,size(field(ind)%rval3d,2),1 /))
+            status=NF90_PUT_VAR(FieldId(Index),FieldVarId(index)%nc_id(1),Field_val3d,  &
+                                start=(/ displ+ncell,1,FieldIndex(Index) /), count=(/n,size(field(ind)%rval3d,2),1 /))
 !           ENDDO
           DEALLOCATE(field_val3d)
@@ -669,6 +669,6 @@
              ENDDO
 !            DO l=1,size(field(ind)%rval4d,2)
-            status=NF90_PUT_VAR(FieldId(Index),FieldVarId(index)%nc_id(q),Field_val3d(:,l),start=(/ displ+ncell,l,FieldIndex(Index) /),   &
-                               count=(/n,size(field(ind)%rval4d,2),1 /))
+            status=NF90_PUT_VAR(FieldId(Index),FieldVarId(index)%nc_id(q),Field_val3d(:,l), &
+                                start=(/ displ+ncell,l,FieldIndex(Index) /), count=(/n,size(field(ind)%rval4d,2),1 /))
 !            ENDDO
             DEALLOCATE(field_val3d)
@@ -747,6 +747,6 @@
           ENDDO
 !           DO l=1,size(field(ind)%rval3d,2)
-           status=NF90_PUT_VAR(FieldId(Index),FieldVarId(index)%nc_id(1),Field_val3d,start=(/ displ+ncell,1,FieldIndex(Index) /),   &
-                               count=(/n,size(field(ind)%rval3d,2),1 /))
+           status=NF90_PUT_VAR(FieldId(Index),FieldVarId(index)%nc_id(1),Field_val3d,    &
+                               start=(/ displ+ncell,1,FieldIndex(Index) /), count=(/n,size(field(ind)%rval3d,2),1 /))
 !           ENDDO
           DEALLOCATE(field_val3d)
@@ -774,6 +774,6 @@
 !            DO l=1,size(field(ind)%rval4d,2)
 
-            status=NF90_PUT_VAR(FieldId(Index),FieldVarId(index)%nc_id(q),Field_val3d,start=(/ displ+ncell,1,FieldIndex(Index) /),   &
-                                count=(/n,size(field(ind)%rval4d,2),1 /))
+            status=NF90_PUT_VAR(FieldId(Index),FieldVarId(index)%nc_id(q),Field_val3d,  &
+                                start=(/ displ+ncell,1,FieldIndex(Index) /), count=(/n,size(field(ind)%rval4d,2),1 /))
 !            ENDDO
             DEALLOCATE(field_val3d)
@@ -1523,5 +1523,6 @@
           status = NF90_DEF_VAR(ncid,TRIM(ADJUSTL(name)),NF90_DOUBLE,(/ ncellId,dim3id,timeId /),FieldVarId(NbField)%nc_id(1))
           status = NF90_PUT_ATT(ncid,FieldVarId(NbField)%nc_id(1),"coordinates","lon lat")
-          status = NF90_DEF_VAR_CHUNKING(ncid, FieldVarId(NbField)%nc_id(1), NF90_CHUNKED, (/ncell_tot,size(field(ind_b)%rval3d,2),1/))
+          status = NF90_DEF_VAR_CHUNKING(ncid, FieldVarId(NbField)%nc_id(1), NF90_CHUNKED,   &
+                                         (/ncell_tot,size(field(ind_b)%rval3d,2),1/))
         ELSE IF (Field(ind_b)%ndim==4) THEN
           DO i=1,FieldVarId(NbField)%size
@@ -1529,5 +1530,6 @@
                                   FieldVarId(NbField)%nc_id(i))
             status = NF90_PUT_ATT(ncid,FieldVarId(NbField)%nc_id(i),"coordinates","lon lat")
-            status = NF90_DEF_VAR_CHUNKING(ncid, FieldVarId(NbField)%nc_id(q), NF90_CHUNKED, (/ncell_tot,size(field(ind_b)%rval4d,2),1/))
+            status = NF90_DEF_VAR_CHUNKING(ncid, FieldVarId(NbField)%nc_id(q), NF90_CHUNKED,   &
+                                           (/ncell_tot,size(field(ind_b)%rval4d,2),1/))
           ENDDO        
         ENDIF 
@@ -1644,5 +1646,6 @@
           status = NF90_DEF_VAR(ncid,TRIM(ADJUSTL(name)),NF90_DOUBLE,(/ ncellId,dim3id,timeId /),FieldVarId(NbField)%nc_id(1))
           status = NF90_PUT_ATT(ncid,FieldVarId(NbField)%nc_id(1),"coordinates","lon lat")
-          status = NF90_DEF_VAR_CHUNKING(ncid, FieldVarId(NbField)%nc_id(1), NF90_CHUNKED, (/ncell_tot,size(field(ind_b)%rval3d,2),1/))
+          status = NF90_DEF_VAR_CHUNKING(ncid, FieldVarId(NbField)%nc_id(1), NF90_CHUNKED,   &
+                                         (/ncell_tot,size(field(ind_b)%rval3d,2),1/))
         ELSE IF (Field(ind_b)%ndim==4) THEN
           DO q=1,FieldVarId(NbField)%size
@@ -1650,5 +1653,6 @@
                                   (/ ncellId,dim3id,timeId /),FieldVarId(NbField)%nc_id(q))
             status = NF90_PUT_ATT(ncid,FieldVarId(NbField)%nc_id(q),"coordinates","lon lat")
-           status = NF90_DEF_VAR_CHUNKING(ncid, FieldVarId(NbField)%nc_id(q), NF90_CHUNKED, (/ncell_tot,size(field(ind_b)%rval4d,2),1/))
+           status = NF90_DEF_VAR_CHUNKING(ncid, FieldVarId(NbField)%nc_id(q), NF90_CHUNKED, &
+                                          (/ncell_tot,size(field(ind_b)%rval4d,2),1/))
           ENDDO        
         ENDIF 
