Index: XIOS/branchs/xios-2.5/src/io/nc4_data_output.cpp
===================================================================
--- XIOS/branchs/xios-2.5/src/io/nc4_data_output.cpp	(revision 1572)
+++ XIOS/branchs/xios-2.5/src/io/nc4_data_output.cpp	(revision 1624)
@@ -154,5 +154,5 @@
 */
 
-         CArray<size_t, 1>& indexToWrite = domain->localIndexToWriteOnServer;
+         CArray<int, 1>& indexToWrite = domain->localIndexToWriteOnServer;
          int nbWritten = indexToWrite.numElements();
          CArray<double,1> writtenLat, writtenLon;
@@ -166,16 +166,15 @@
            for (int idx = 0; idx < nbWritten; ++idx)
            {
-        	  if (idx < domain->latvalue.numElements())
-        	  {
-                writtenLat(idx) = domain->latvalue(indexToWrite(idx));
-                writtenLon(idx) = domain->lonvalue(indexToWrite(idx));
-        	  }
-        	  else
-        	  {
-                writtenLat(idx) = 0.;
-                writtenLon(idx) = 0.;
-        	  }
+             if (indexToWrite(idx) < 0)
+             {
+               writtenLat(idx) = -1.;   // hole
+               writtenLon(idx) = -1.;
+             }
+             else
+             {
+               writtenLat(idx) = domain->latvalue(indexToWrite(idx));
+               writtenLon(idx) = domain->lonvalue(indexToWrite(idx));
+             }
            }
-         
 
            if (domain->hasBounds)
@@ -189,14 +188,14 @@
                for (int nv = 0; nv < nvertex; ++nv)
                {
-            	 if (idx < boundslat.columns())
-            	 {
+                 if (indexToWrite(idx) < 0)
+                 {
+                   writtenBndsLat(nv, idx) = -1.;  // hole
+                   writtenBndsLon(nv, idx) = -1.;
+                 }
+                 else
+                 {
                    writtenBndsLat(nv, idx) = boundslat(nv, int(indexToWrite(idx)));
                    writtenBndsLon(nv, idx) = boundslon(nv, int(indexToWrite(idx)));
-            	 }
-            	 else
-            	 {
-                   writtenBndsLat(nv, idx) = 0.;
-                   writtenBndsLon(nv, idx) = 0.;
-            	 }
+                 }
                }
            }
@@ -208,8 +207,8 @@
            for (int idx = 0; idx < nbWritten; ++idx)
            {
-        	  if (idx < domain->areavalue.numElements())
-                writtenArea(idx) = domain->areavalue(indexToWrite(idx));
+        	  if (indexToWrite(idx) < 0)
+              writtenArea(idx) = -1.;
         	  else
-                writtenArea(idx) = 0.;
+              writtenArea(idx) = domain->areavalue(indexToWrite(idx));
            }
          }
@@ -221,12 +220,4 @@
               case (MULTI_FILE) :
               {
-  //               if (domain->isEmpty()) return;
-
-                 if (server->intraCommSize > 1)
-                 {
-  //                 SuperClassWriter::addDimension(lonid, domain->zoom_ni.getValue());
-  //                 SuperClassWriter::addDimension(latid, domain->zoom_nj.getValue());
-                 }
-
                  switch (domain->type)
                  {
@@ -434,10 +425,11 @@
                      std::vector<StdSize> start(2) ;
                      std::vector<StdSize> count(2) ;
-                     if (domain->isEmpty())
-                     {
-                       start[0]=0 ; start[1]=0 ;
-                       count[0]=0 ; count[1]=0 ;
-                     }
-                     else
+// Comment out because it is not working for a hole
+//                     if (domain->isEmpty())
+//                     {
+//                       start[0]=0 ; start[1]=0 ;
+//                       count[0]=0 ; count[1]=0 ;
+//                     }
+//                     else
                      {
                        start[1]=domain->zoom_ibegin-domain->global_zoom_ibegin;
@@ -883,4 +875,7 @@
           case (MULTI_FILE) :
           {
+            ERROR("CNc4DataOutput::writeDomain(domain)",
+            << "[ type = multiple_file ]"
+            << " is not yet implemented for UGRID files !");
             break;
           }
@@ -948,5 +943,5 @@
          int nvertex = (domain->nvertex.isEmpty()) ? 0 : domain->nvertex;
 
-         CArray<size_t, 1>& indexToWrite = domain->localIndexToWriteOnServer;
+         CArray<int, 1>& indexToWrite = domain->localIndexToWriteOnServer;
          int nbWritten = indexToWrite.numElements();
          CArray<double,1> writtenLat, writtenLon;
@@ -960,14 +955,14 @@
            for (int idx = 0; idx < nbWritten; ++idx)
            {
-       	     if (idx < domain->latvalue.numElements())
-     	     {
-               writtenLat(idx) = domain->latvalue(indexToWrite(idx));
-               writtenLon(idx) = domain->lonvalue(indexToWrite(idx));
-     	     }
-     	     else
-     	     {
-               writtenLat(idx) = 0.;
-               writtenLon(idx) = 0.;
-     	     }
+       	     if (indexToWrite(idx) < 0)
+       	     {
+               writtenLat(idx) = -1.;
+               writtenLon(idx) = -1.;
+       	     }
+       	     else
+       	     {
+       	       writtenLat(idx) = domain->latvalue(indexToWrite(idx));
+       	       writtenLon(idx) = domain->lonvalue(indexToWrite(idx));
+       	     }
            }
          }
@@ -984,13 +979,13 @@
              for (int nv = 0; nv < nvertex; ++nv)
              {
-               if (idx < boundslat.columns())
+               if (indexToWrite(idx) < 0)
+               {
+                 writtenBndsLat(nv, idx) = -1.;
+                 writtenBndsLon(nv, idx) = -1.;
+               }
+               else
                {
                  writtenBndsLat(nv, idx) = boundslat(nv, int(indexToWrite(idx)));
                  writtenBndsLon(nv, idx) = boundslon(nv, int(indexToWrite(idx)));
-               }
-               else
-               {
-                 writtenBndsLat(nv, idx) = 0.;
-                 writtenBndsLon(nv, idx) = 0.;
                 }
              }
@@ -1003,8 +998,8 @@
            for (int idx = 0; idx < nbWritten; ++idx)
            {
-        	  if (idx < domain->areavalue.numElements())
-                writtenArea(idx) = domain->areavalue(indexToWrite(idx));
-        	  else
-                writtenArea(idx) = 0.;
+             if (indexToWrite(idx) < 0)
+               writtenArea(idx) = -1.;
+             else
+               writtenArea(idx) = domain->areavalue(indexToWrite(idx));
            }
          }
@@ -1288,5 +1283,5 @@
           SuperClassWriter::definition_end();
 
-          CArray<size_t, 1>& indexToWrite = axis->localIndexToWriteOnServer;
+          CArray<int, 1>& indexToWrite = axis->localIndexToWriteOnServer;
           int nbWritten = indexToWrite.numElements();
           CArray<double,1> axis_value(indexToWrite.numElements());
@@ -1295,8 +1290,8 @@
             for (int i = 0; i < nbWritten; i++)
             {
-              if (i < axis->value.numElements())
+              if (indexToWrite(i) < 0)
+                axis_value(i) = -1;   // Some value in case of a hole
+              else
                 axis_value(i) = axis->value(indexToWrite(i));
-              else
-                axis_value(i) = 0.;
             }
           }
@@ -1308,8 +1303,8 @@
             for (int i = 0; i < nbWritten; i++)
             {
-              if (i < axis->label.numElements())
+              if (indexToWrite(i) < 0)
+                axis_label(i) = boost::lexical_cast<string>(-1);  // Some value in case of a hole
+              else
                 axis_label(i) = axis->label(indexToWrite(i));
-              else
-                axis_label(i) = boost::lexical_cast<string>(0);  // Write 0 as a label
             }
           }
@@ -1329,14 +1324,13 @@
                   for (int i = 0; i < nbWritten; ++i)
                   {
-                    if (i < axis->bounds.columns())
+                    if (indexToWrite(i) < 0)
+                    {
+                      axis_bounds(0, i) = -1.; // Some value in case of a hole
+                      axis_bounds(1, i) = -1.;
+                    }
+                    else
                     {
                       axis_bounds(0, i) = axis->bounds(0, int(indexToWrite(i)));
                       axis_bounds(1, i) = axis->bounds(1, int(indexToWrite(i)));
-                    }
-                    else
-                    {
-                      axis_bounds(0, i) = 0.;
-                      axis_bounds(1, i) = 0.;
-
                     }
                   }
@@ -1369,13 +1363,13 @@
                   for (int i = 0; i < nbWritten; ++i)
                   {
-                    if (i < axis->bounds.columns())
+                    if (indexToWrite(i) < 0)
+                    {
+                      axis_bounds(0, i) = -1.;
+                      axis_bounds(1, i) = -1.;
+                    }
+                    else
                     {
                       axis_bounds(0, i) = axis->bounds(0, int(indexToWrite(i)));
                       axis_bounds(1, i) = axis->bounds(1, int(indexToWrite(i)));
-                    }
-                    else
-                    {
-                      axis_bounds(0, i) = 0.;
-                      axis_bounds(1, i) = 0.;
                     }
                   }
@@ -2512,6 +2506,4 @@
                    if ( wtimeData)
                    {
-//                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1);
-//                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1);
                        SuperClassWriter::writeTimeAxisData(time_data, timeAxisId, isCollective, field->getNStep() - 1, isRoot);
                        SuperClassWriter::writeTimeAxisDataBounds(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1, isRoot);
@@ -2519,6 +2511,4 @@
                    if (wtimeCounter)
                    {
-//                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1);
-//                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1);
                      SuperClassWriter::writeTimeAxisData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1,isRoot);
                      if (timeCounterType!=record) SuperClassWriter::writeTimeAxisDataBounds(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1, isRoot);
@@ -2596,5 +2586,4 @@
                           count.push_back(nZoomSizeServer[idx]);
                         }
-
                         --idxAxis;
                         --idx;
@@ -2610,5 +2599,5 @@
                   int numElement = axisDomainOrder.numElements();
                   int idxDomain = domainList.size() - 1, idxAxis = axisList.size() - 1;
-                  int idx = domainList.size() * 2 + axisList.size() - 1;// nZoomBeginGlobal.size() - 1;
+                  int idx = domainList.size() * 2 + axisList.size() - 1;
 
                   start.reserve(nZoomBeginGlobal.size());
@@ -2662,6 +2651,4 @@
                    if ( wtimeData)
                    {
-//                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1);
-//                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1);
                      SuperClassWriter::writeTimeAxisData(time_data, timeAxisId, isCollective, field->getNStep() - 1, isRoot);
                      SuperClassWriter::writeTimeAxisDataBounds(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1, isRoot);
@@ -2669,6 +2656,4 @@
                    if (wtimeCounter)
                    {
-//                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1);
-//                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1);
                      SuperClassWriter::writeTimeAxisData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1,isRoot);
                      if (timeCounterType!=record) SuperClassWriter::writeTimeAxisDataBounds(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1, isRoot);
Index: XIOS/branchs/xios-2.5/src/node/axis.cpp
===================================================================
--- XIOS/branchs/xios-2.5/src/node/axis.cpp	(revision 1572)
+++ XIOS/branchs/xios-2.5/src/node/axis.cpp	(revision 1624)
@@ -657,5 +657,5 @@
           connectedServerRank_[nbServer].push_back(client->clientRank % client->serverSize);
 
-         nbSenders[nbServer] = CClientServerMapping::computeConnectedClients(client->serverSize, client->clientSize, client->intraComm, connectedServerRank_[nbServer]);
+        nbSenders[nbServer] = CClientServerMapping::computeConnectedClients(client->serverSize, client->clientSize, client->intraComm, connectedServerRank_[nbServer]);
 
         delete clientServerMap;
@@ -703,4 +703,20 @@
         }                 
       }
+
+//    localIndexToWriteOnServer.resize(writtenGlobalIndex.numElements());
+//    nbWritten = 0;
+//    for (itSrv = itSrvb; itSrv != itSrve; ++itSrv)
+//    {
+//      indGlo = *itSrv;
+//      if (ite != globalLocalIndexMap_.find(indGlo))
+//      {
+//        localIndexToWriteOnServer(nbWritten) = globalLocalIndexMap_[indGlo];
+//      }
+//      else
+//      {
+//        localIndexToWriteOnServer(nbWritten) = -1;
+//      }
+//      ++nbWritten;
+//    }
 
       localIndexToWriteOnServer.resize(writtenGlobalIndex.numElements());
@@ -1293,6 +1309,8 @@
          if (0 == globalLocalIndexMap_.count(gloInd))
          {
-           index(nbIndLoc) = gloInd % n_glo;           
-           globalLocalIndexMap_[gloInd] = nbIndLoc;  
+           index(nbIndexGlob) = gloInd % n_glo;
+           globalLocalIndexMap_[gloInd] = nbIndexGlob;
+//           index(nbIndLoc) = gloInd % n_glo; 
+//           globalLocalIndexMap_[gloInd] = nbIndLoc;  
            ++nbIndexGlob;
          } 
@@ -1345,9 +1363,9 @@
     }
     
-    int nbCompressedData = 0; 
+    int nbCompressedData = 0;
     for (idx = 0; idx < nonCompressedData.numElements(); ++idx)
     {
       if (0 <= nonCompressedData(idx))
-        ++nbCompressedData;        
+        ++nbCompressedData;
     }
 
@@ -1359,5 +1377,5 @@
       {
         data_index(nbCompressedData) = idx % n;
-        ++nbCompressedData;        
+        ++nbCompressedData;
       }
     }
@@ -1476,5 +1494,5 @@
       clientsSet.insert(contextClient);
     }
-}
+  }
 
   void CAxis::parse(xml::CXMLNode & node)
Index: XIOS/branchs/xios-2.5/src/node/axis.hpp
===================================================================
--- XIOS/branchs/xios-2.5/src/node/axis.hpp	(revision 1572)
+++ XIOS/branchs/xios-2.5/src/node/axis.hpp	(revision 1624)
@@ -124,6 +124,6 @@
 
       public: 
-        bool hasValue;        
-        CArray<size_t,1> localIndexToWriteOnServer;        
+        bool hasValue;
+        CArray<int,1> localIndexToWriteOnServer;
 
       private:
Index: XIOS/branchs/xios-2.5/src/node/domain.cpp
===================================================================
--- XIOS/branchs/xios-2.5/src/node/domain.cpp	(revision 1572)
+++ XIOS/branchs/xios-2.5/src/node/domain.cpp	(revision 1624)
@@ -33,5 +33,5 @@
       , lonvalue(), latvalue(), bounds_lonvalue(), bounds_latvalue()
       , globalLocalIndexMap_(), computedWrittenIndex_(false)
-	  , clients()
+      , clients()
    {
    }
@@ -45,5 +45,5 @@
       , lonvalue(), latvalue(), bounds_lonvalue(), bounds_latvalue()
       , globalLocalIndexMap_(), computedWrittenIndex_(false)
-	  , clients()
+      , clients()
    {
     }
@@ -160,10 +160,4 @@
        // size estimation for sendIndex (and sendArea which is always smaller or equal)
        size_t sizeIndexEvent = 2 * sizeof(size_t) + 2 * CArray<int,1>::size(idxCount);
-       // if (isCompressible_)
-       // {
-       //   std::map<int, std::vector<int> >::const_iterator itWritten = indWrittenSrv_.find(rank);
-       //   size_t writtenIdxCount = (itWritten != itWrittenIndexEnd) ? itWritten->second.size() : 0;
-       //   sizeIndexEvent += CArray<int,1>::size(writtenIdxCount);
-       // }
 
        // size estimation for sendLonLat
@@ -184,6 +178,5 @@
    bool CDomain::isEmpty(void) const
    {
-      return ((this->zoom_i_index.isEmpty()) || (0 == this->zoom_i_index.numElements()));
-
+     return ((this->i_index.isEmpty()) || (0 == this->i_index.numElements()));
    }
 
@@ -1455,5 +1448,5 @@
                << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
                << "'bounds_lon_1d' dimension is not compatible with 'nvertex'." << std::endl
-               << "'bounds_lon_1d' dimension is " << bounds_lon_1d.extent(1)
+               << "'bounds_lon_1d' dimension is " << bounds_lon_1d.extent(0)
                << " but nvertex is " << nvertex.getValue() << ".");
 
@@ -1462,5 +1455,5 @@
                << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
                << "'bounds_lon_2d' dimension is not compatible with 'nvertex'." << std::endl
-               << "'bounds_lon_2d' dimension is " << bounds_lon_2d.extent(2)
+               << "'bounds_lon_2d' dimension is " << bounds_lon_2d.extent(0)
                << " but nvertex is " << nvertex.getValue() << ".");
 
@@ -1479,5 +1472,5 @@
                << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
                << "'bounds_lat_1d' dimension is not compatible with 'nvertex'." << std::endl
-               << "'bounds_lat_1d' dimension is " << bounds_lat_1d.extent(1)
+               << "'bounds_lat_1d' dimension is " << bounds_lat_1d.extent(0)
                << " but nvertex is " << nvertex.getValue() << ".");
 
@@ -1486,5 +1479,5 @@
                << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
                << "'bounds_lat_2d' dimension is not compatible with 'nvertex'." << std::endl
-               << "'bounds_lat_2d' dimension is " << bounds_lat_2d.extent(2)
+               << "'bounds_lat_2d' dimension is " << bounds_lat_2d.extent(0)
                << " but nvertex is " << nvertex.getValue() << ".");
 
@@ -1901,16 +1894,5 @@
                                        itSrve = writtenGlobalIndex.end(), itSrv;
 
-//      for (itSrv = itSrvb; itSrv != itSrve; ++itSrv)
-//      {
-//        indGlo = *itSrv;
-//        if (ite != globalLocalIndexMap_.find(indGlo))
-//        {
-//          ++nbWritten;
-//        }
-//      }
-
-//      localIndexToWriteOnServer.resize(nbWritten);
       localIndexToWriteOnServer.resize(writtenGlobalIndex.numElements());
-
       nbWritten = 0;
       for (itSrv = itSrvb; itSrv != itSrve; ++itSrv)
@@ -1920,57 +1902,11 @@
         {
           localIndexToWriteOnServer(nbWritten) = globalLocalIndexMap_[indGlo];
-          ++nbWritten;
         }
         else
         {
-          localIndexToWriteOnServer(nbWritten) = 0;
-          ++nbWritten;
-        }
-      }
-      
-      // if (isCompressible())
-      // {
-      //   nbWritten = 0;
-      //   boost::unordered_map<size_t,size_t> localGlobalIndexMap;
-      //   for (itSrv = itSrvb; itSrv != itSrve; ++itSrv)
-      //   {
-      //     indGlo = *itSrv;
-      //     if (ite != globalLocalIndexMap_.find(indGlo))
-      //     {
-      //       localGlobalIndexMap[localIndexToWriteOnServer(nbWritten)] = indGlo;
-      //       ++nbWritten;
-      //     }                 
-      //   }
-
-      //   nbWritten = 0;
-      //   for (int idx = 0; idx < data_i_index.numElements(); ++idx)
-      //   {
-      //     if (localGlobalIndexMap.end() != localGlobalIndexMap.find(data_i_index(idx)))
-      //     {
-      //       ++nbWritten;
-      //     }
-      //   }
-
-      //   compressedIndexToWriteOnServer.resize(nbWritten);
-      //   nbWritten = 0;
-      //   for (int idx = 0; idx < data_i_index.numElements(); ++idx)
-      //   {
-      //     if (localGlobalIndexMap.end() != localGlobalIndexMap.find(data_i_index(idx)))
-      //     {
-      //       compressedIndexToWriteOnServer(nbWritten) = localGlobalIndexMap[data_i_index(idx)];
-      //       ++nbWritten;
-      //     }
-      //   }
-
-      //   numberWrittenIndexes_ = nbWritten;
-      //   if (isDistributed())
-      //   {            
-      //     MPI_Allreduce(&numberWrittenIndexes_, &totalNumberWrittenIndexes_, 1, MPI_INT, MPI_SUM, server->intraComm);
-      //     MPI_Scan(&numberWrittenIndexes_, &offsetWrittenIndexes_, 1, MPI_INT, MPI_SUM, server->intraComm);
-      //     offsetWrittenIndexes_ -= numberWrittenIndexes_;
-      //   }
-      //   else
-      //     totalNumberWrittenIndexes_ = numberWrittenIndexes_;
-      // }      
+          localIndexToWriteOnServer(nbWritten) = -1;
+        }
+        ++nbWritten;
+      }
    }
 
@@ -2510,6 +2446,10 @@
     
     globalLocalIndexMap_.rehash(std::ceil(nbIndGlob/globalLocalIndexMap_.max_load_factor()));
-    i_index.resize(nbIndGlob);
-    j_index.resize(nbIndGlob);   
+//    i_index.resize(nbIndGlob);
+//    j_index.resize(nbIndGlob);
+    i_index.resize(ni*nj);
+    j_index.resize(ni*nj);
+    i_index = -1;
+    j_index = -1;
     int nbIndexGlobMax = nbIndGlob, nbIndLoc;
 
@@ -2528,29 +2468,36 @@
            jIndex = (jIndex < 0) ? 0 : jIndex;
            nbIndLoc = iIndex + ni * jIndex;
-           if (nbIndLoc < nbIndexGlobMax)
-           {
-             i_index(nbIndLoc) = index % ni_glo;
-             j_index(nbIndLoc) = index / ni_glo;
-             globalLocalIndexMap_[index] = nbIndLoc;  
-             ++nbIndGlob;
-           }
-           // i_index(nbIndGlob) = index % ni_glo;
-           // j_index(nbIndGlob) = index / ni_glo;
-           // globalLocalIndexMap_[index] = nbIndGlob;  
-           // ++nbIndGlob;
+           i_index(nbIndLoc) = index % ni_glo;
+           j_index(nbIndLoc) = index / ni_glo;
+           globalLocalIndexMap_[index] = nbIndLoc;
+//           i_index(nbIndGlob) = index % ni_glo;
+//           j_index(nbIndGlob) = index / ni_glo;
+//           globalLocalIndexMap_[index] = nbIndGlob;
+           ++nbIndGlob;
+//           if (nbIndLoc < nbIndexGlobMax)
+//          {
+//             i_index(nbIndLoc) = index % ni_glo;
+//             j_index(nbIndLoc) = index / ni_glo;
+//             globalLocalIndexMap_[index] = nbIndLoc;  
+//             ++nbIndGlob;
+//           }
+//           // i_index(nbIndGlob) = index % ni_glo;
+//           // j_index(nbIndGlob) = index / ni_glo;
+//           // globalLocalIndexMap_[index] = nbIndGlob;  
+//           // ++nbIndGlob;
          } 
       } 
     } 
 
-    if (nbIndGlob==0)
-    {
-      i_index.resize(nbIndGlob);
-      j_index.resize(nbIndGlob);
-    }
-    else
-    {
-      i_index.resizeAndPreserve(nbIndGlob);
-      j_index.resizeAndPreserve(nbIndGlob);
-    }
+//    if (nbIndGlob==0)
+//    {
+//      i_index.resize(nbIndGlob);
+//      j_index.resize(nbIndGlob);
+//    }
+//    else
+//    {
+//      i_index.resizeAndPreserve(nbIndGlob);
+//      j_index.resizeAndPreserve(nbIndGlob);
+//    }
   }
 
@@ -2661,6 +2608,8 @@
 
     nbMaskInd = globalLocalIndexMap_.size();
-    mask_1d.resize(nbMaskInd);
-    domainMask.resize(nbMaskInd);
+//    mask_1d.resize(nbMaskInd);
+//    domainMask.resize(nbMaskInd);
+    mask_1d.resize(ni*nj);
+    domainMask.resize(ni*nj);
     mask_1d = false;
     
@@ -2737,9 +2686,13 @@
 
       nbLonInd = globalLocalIndexMap_.size();
-      lonvalue.resize(nbLonInd);
+//      lonvalue.resize(nbLonInd);
+      lonvalue.resize(ni*nj);
+      lonvalue = -1.0;
       if (hasBounds)
       {
-        bounds_lonvalue.resize(nvertex,nbLonInd);
-        bounds_lonvalue = 0.;
+//        bounds_lonvalue.resize(nvertex,nbLonInd);
+//        bounds_lonvalue = 0.;
+        bounds_lonvalue.resize(nvertex,ni*nj);
+        bounds_lonvalue = -1.0;
       }
 
@@ -2821,9 +2774,12 @@
 
       nbLatInd = globalLocalIndexMap_.size();
-      latvalue.resize(nbLatInd);
+//      latvalue.resize(nbLatInd);
+      latvalue.resize(ni*nj);
       if (hasBounds)
       {
-        bounds_latvalue.resize(nvertex,nbLatInd);
-        bounds_latvalue = 0. ;
+//        bounds_latvalue.resize(nvertex,nbLatInd);
+//        bounds_latvalue = 0. ;
+        bounds_latvalue.resize(nvertex,ni*nj);
+        bounds_latvalue = -1. ;
       }
 
@@ -2903,6 +2859,8 @@
 
       nbAreaInd = globalLocalIndexMap_.size();
-      areavalue.resize(nbAreaInd);
-      nbAreaInd = 0;      
+//      areavalue.resize(nbAreaInd);
+//      nbAreaInd = 0;
+      areavalue.resize(ni*nj);
+      nbAreaInd = -1.0;
       for (i = 0; i < nbReceived; ++i)
       {
@@ -3015,9 +2973,4 @@
          dataIIndex(lInd) = (-1 == dataIIndex(lInd)) ? tmpI(ind) : dataIIndex(lInd); // Only fill in dataIndex if there is no data
          dataJIndex(lInd) = (-1 == dataJIndex(lInd)) ? tmpJ(ind) : dataJIndex(lInd);  
-
-         if (!domainMask(lInd))   // Include mask info into data index on the RECEIVE getServerDimensionSizes    
-         {
-           dataIIndex(lInd) = dataJIndex(lInd) = -1;
-         }
       } 
     }
Index: XIOS/branchs/xios-2.5/src/node/domain.hpp
===================================================================
--- XIOS/branchs/xios-2.5/src/node/domain.hpp	(revision 1572)
+++ XIOS/branchs/xios-2.5/src/node/domain.hpp	(revision 1624)
@@ -142,5 +142,5 @@
          CArray<double, 1> areavalue;
 
-         CArray<size_t,1> localIndexToWriteOnServer;         
+         CArray<int,1> localIndexToWriteOnServer;
 
          CArray<bool, 1> domainMask; // mask_1d, mask_2d -> domainMask
Index: XIOS/branchs/xios-2.5/src/node/grid.cpp
===================================================================
--- XIOS/branchs/xios-2.5/src/node/grid.cpp	(revision 1572)
+++ XIOS/branchs/xios-2.5/src/node/grid.cpp	(revision 1624)
@@ -978,5 +978,6 @@
 
      nbIndexOnServer = 0;
-     for (size_t j = 0; j < globalIndexElementOnServerMap.size(); ++j)
+//     for (size_t j = 0; j < globalIndexElementOnServerMap.size(); ++j)
+     for (size_t j = 0; j < globalIndexElementOnClient.numElements(); ++j)
      {
        it = globalIndexElementOnServerMap.find(globalIndexElementOnClient(j));
@@ -1305,9 +1306,5 @@
   {
     CContext* context = CContext::getCurrent();    
-//    int nbSrvPools = (context->hasServer) ? (context->hasClient ? context->clientPrimServer.size() : 1) : 1; // This should be changed soon
-//    for (int p = 0; p < nbSrvPools; ++p)
-    {
-//      CContextClient* client = (context->hasServer) ? (context->hasClient ? context->clientPrimServer[p] : context->client)
-//                                                    : context->client;
+    {
       CContextClient* client = context->client;
 
