Index: /XIOS/dev/dev_olga/arch/arch-X64_IRENE.env
===================================================================
--- /XIOS/dev/dev_olga/arch/arch-X64_IRENE.env	(revision 1588)
+++ /XIOS/dev/dev_olga/arch/arch-X64_IRENE.env	(revision 1589)
@@ -1,3 +1,4 @@
-module unload netcdf-c netcdf-fortran hdf5 flavor perl hdf5 boost blitz mpi
+module unload netcdf-c netcdf-fortran hdf5 flavor perl hdf5 boost blitz mpi gnu
+module load gnu
 module load mpi/openmpi/2.0.2
 module load flavor/hdf5/parallel
Index: /XIOS/dev/dev_olga/src/distribution_client.cpp
===================================================================
--- /XIOS/dev/dev_olga/src/distribution_client.cpp	(revision 1588)
+++ /XIOS/dev/dev_olga/src/distribution_client.cpp	(revision 1589)
@@ -15,5 +15,5 @@
    , axisDomainOrder_()
    , nLocal_(), nGlob_(), nBeginLocal_(), nBeginGlobal_()
-   , dataNIndex_(), dataDims_(), dataBegin_(), dataIndex_()//, domainMasks_()//, axisMasks_()
+   , dataNIndex_(), dataDims_(), dataBegin_(), dataIndex_()
    , gridMask_(), indexMap_()
    , isDataDistributed_(true), axisNum_(0), domainNum_(0)
@@ -61,5 +61,4 @@
   // Then check mask of grid
   int gridDim = domList.size() * 2 + axisList.size();
-//  grid->checkMask();
   switch (gridDim) {
     case 0:
@@ -117,19 +116,4 @@
   axisDomainOrder_ = axisDomainOrder;
 
-//  // Each domain or axis has its mask, of course
-//  domainMasks_.resize(domainNum_);
-//  for (int i = 0; i < domainNum_;++i)
-//  {
-//    domainMasks_[i].resize(domList[i]->domainMask.numElements());
-//    domainMasks_[i] = domList[i]->domainMask;
-//  }
-
-//  axisMasks_.resize(axisNum_);
-//  for (int i = 0; i < axisNum_; ++i)
-//  {
-//    axisMasks_[i].resize(axisList[i]->mask.numElements());
-//    axisMasks_[i] = axisList[i]->mask;
-//  }
-
   // Because domain and axis can be in any order (axis1, domain1, axis2, axis3, )
   // their position should be specified. In axisDomainOrder, domain == true, axis == false
@@ -283,5 +267,4 @@
         if ((iIdx >= nBeginLocal_[indexMap_[i]]) && (iIdx < nLocal_[indexMap_[i]]) &&
            (jIdx >= nBeginLocal_[indexMap_[i]+1]) && (jIdx < nLocal_[indexMap_[i]+1]))
-//           && (domainMasks_[idxDomain](iIdx + jIdx*nLocal_[indexMap_[i]])))
         {
           ++count;
@@ -413,56 +396,4 @@
 
   for (int i = 0; i < numElement_; ++i) ssize *= eachElementSize[i];
-//  while (idx < ssize)
-//  {
-//    for (int i = 0; i < numElement_-1; ++i)
-//    {
-//      if (idxLoop[i] == eachElementSize[i])
-//      {
-//        idxLoop[i] = 0;
-//        ++idxLoop[i+1];
-//      }
-//    }
-//
-//    // Find out outer index
-//    // Depending the inner-most element is axis or domain,
-//    // The outer loop index begins correspondingly at one (1) or zero (0)
-//    for (int i = 1; i < numElement_; ++i)
-//    {
-//      currentIndex[i] = elementLocalIndex_[i](idxLoop[i]);
-//    }
-//
-//    // Inner most index
-//    for (int i = 0; i < innerLoopSize; ++i)
-//    {
-//      int gridMaskIndex = 0;
-//      currentIndex[0] = elementLocalIndex_[0](i);
-//
-//      bool maskTmp = true;
-//      int idxDomain = 0, idxAxis = 0;
-//      for (int elem = 0; elem < numElement_; ++elem)
-//      {
-//        if (2 == axisDomainOrder_(elem))
-//        {
-//          maskTmp = maskTmp && domainMasks_[idxDomain](currentIndex[elem]);
-//          ++idxDomain;
-//        }
-//        else if (1 == axisDomainOrder_(elem))
-//        {
-//          maskTmp = maskTmp && axisMasks_[idxAxis](currentIndex[elem]);
-//          ++idxAxis;
-//        }
-//      }
-//      if (maskTmp) ++indexLocalDataOnClientCount;
-//    }
-//    idxLoop[0] += innerLoopSize;
-//    idx += innerLoopSize;
-//  }
-
-  // Now allocate these arrays
-//  localDataIndex_.resize(indexLocalDataOnClientCount);
-//  localMaskIndex_.resize(indexLocalDataOnClientCount);
-//  localMaskedDataIndex_.resize(indexLocalDataOnClientCount);
-//  globalDataIndex_.rehash(std::ceil(indexLocalDataOnClientCount/globalDataIndex_.max_load_factor()));
-//  globalLocalDataSendToServerMap_.rehash(std::ceil(indexLocalDataOnClientCount/globalLocalDataSendToServerMap_.max_load_factor()));
 
   localDataIndex_.resize(ssize);
@@ -530,33 +461,13 @@
           bool maskTmp = true;
           bool maskGridTmp = true;
-
-//          // Domain or axis mask: only unmasked values will be sent
-//          int idxDomain = 0, idxAxis = 0;
-//          for (int elem = 0; elem < numElement_; ++elem)
-//          {
-//            if (2 == axisDomainOrder_(elem))
-//            {
-//              maskTmp = maskTmp && domainMasks_[idxDomain](currentIndex[elem]);
-//              ++idxDomain;
-//            }
-//            else if (1 == axisDomainOrder_(elem))
-//            {
-//              maskTmp = maskTmp && axisMasks_[idxAxis](currentIndex[elem]);
-//              ++idxAxis;
-//            }
-//          }
-
-//          if (maskTmp)
-//          {
-            size_t globalIndex = 0;
-            for (int k = 0; k < numElement_; ++k)
-            {
-              globalIndex += (currentGlobalIndex[k])*elementNGlobal_[k];
-            }
-            globalDataIndex_[globalIndex] = indexLocalDataOnClientCount;
-            localDataIndex_[indexLocalDataOnClientCount] = countLocalData;
-            globalLocalDataSendToServerMap_[globalIndex] = indexLocalDataOnClientCount;
-            localMaskedDataIndex_[indexLocalDataOnClientCount] = indexLocalDataOnClientCount;
-//          }
+          size_t globalIndex = 0;
+          for (int k = 0; k < numElement_; ++k)
+          {
+            globalIndex += (currentGlobalIndex[k])*elementNGlobal_[k];
+          }
+          globalDataIndex_[globalIndex] = indexLocalDataOnClientCount;
+          localDataIndex_[indexLocalDataOnClientCount] = countLocalData;
+          globalLocalDataSendToServerMap_[globalIndex] = indexLocalDataOnClientCount;
+          localMaskedDataIndex_[indexLocalDataOnClientCount] = indexLocalDataOnClientCount;
 
           // Grid mask: unmasked values will be replaces by NaN and then all values will be sent
Index: /XIOS/dev/dev_olga/src/distribution_client.hpp
===================================================================
--- /XIOS/dev/dev_olga/src/distribution_client.hpp	(revision 1588)
+++ /XIOS/dev/dev_olga/src/distribution_client.hpp	(revision 1589)
@@ -118,7 +118,4 @@
     std::vector<CArray<int,1> > infoIndex_; //!< i_index, j_index
 
-//    std::vector<CArray<bool,1> > domainMasks_; //!< Domain mask
-//    std::vector<CArray<bool,1> > axisMasks_; //!< Axis mask
-
     std::vector<int> indexMap_; //!< Mapping element index to dimension index
     std::vector<CArray<int,1> > elementLocalIndex_;  //!< Local index of each element
@@ -185,3 +182,2 @@
 } // namespace xios
 #endif // __XIOS_DISTRIBUTIONCLIENT_HPP__
-
Index: /XIOS/dev/dev_olga/src/filter/spatial_transform_filter.cpp
===================================================================
--- /XIOS/dev/dev_olga/src/filter/spatial_transform_filter.cpp	(revision 1588)
+++ /XIOS/dev/dev_olga/src/filter/spatial_transform_filter.cpp	(revision 1589)
@@ -68,8 +68,4 @@
       onOutputReady(outputPacket);
   }
-
-
-
-
 
   CSpatialTemporalFilter::CSpatialTemporalFilter(CGarbageCollector& gc, CSpatialTransformFilterEngine* engine, CGridTransformation* gridTransformation, double outputValue, size_t inputSlotsCount)
@@ -201,5 +197,4 @@
     const std::list<CGridTransformation::RecvIndexGridDestinationMap>& listLocalIndexToReceive = gridTransformation->getLocalIndexToReceiveOnGridDest();
     const std::list<size_t>& listNbLocalIndexToReceive = gridTransformation->getNbLocalIndexToReceiveOnGridDest();
-//    const std::list<std::vector<bool> >& listLocalIndexMaskOnDest = gridTransformation->getLocalMaskIndexOnGridDest();
     const std::vector<CGenericAlgorithmTransformation*>& listAlgos = gridTransformation->getAlgos();
 
@@ -210,8 +205,6 @@
     std::list<CGridTransformation::RecvIndexGridDestinationMap>::const_iterator itListRecv = listLocalIndexToReceive.begin();
     std::list<size_t>::const_iterator itNbListRecv = listNbLocalIndexToReceive.begin();
-//    std::list<std::vector<bool> >::const_iterator itLocalMaskIndexOnDest = listLocalIndexMaskOnDest.begin();
     std::vector<CGenericAlgorithmTransformation*>::const_iterator itAlgo = listAlgos.begin();
 
-//    for (; itListSend != iteListSend; ++itListSend, ++itListRecv, ++itNbListRecv, ++itLocalMaskIndexOnDest, ++itAlgo)
     for (; itListSend != iteListSend; ++itListSend, ++itListRecv, ++itNbListRecv, ++itAlgo)
     {
@@ -268,8 +261,4 @@
       dataCurrentDest.resize(*itNbListRecv);
       dataCurrentDest = 0.0;
-//      const std::vector<bool>& localMaskDest = *itLocalMaskIndexOnDest;
-//      for (int i = 0; i < localMaskDest.size(); ++i)
-//        if (localMaskDest[i]) dataCurrentDest(i) = 0.0;
-//        else dataCurrentDest(i) = defaultValue;
 
       std::vector<bool> localInitFlag(dataCurrentDest.numElements(), true);
Index: /XIOS/dev/dev_olga/src/io/nc4_data_input.cpp
===================================================================
--- /XIOS/dev/dev_olga/src/io/nc4_data_input.cpp	(revision 1588)
+++ /XIOS/dev/dev_olga/src/io/nc4_data_input.cpp	(revision 1589)
@@ -494,4 +494,23 @@
       domain->ni_glo.setValue(itMapNi->second);
     }
+
+// determine if coordinates values are present in file
+    if ((CDomain::type_attr::rectilinear == domain->type))
+    {
+      // Ok, try to read some attributes such as longitude and latitude
+      domain->hasLatInReadFile_ = SuperClassWriter::hasVariable(itMapNj->first);
+      domain->hasLonInReadFile_  = SuperClassWriter::hasVariable(itMapNi->first);
+    }
+    else if ((CDomain::type_attr::curvilinear == domain->type) || (CDomain::type_attr::unstructured == domain->type) )
+    {
+      StdString latName = this->getLatCoordName(fieldId);
+      domain->hasLatInReadFile_ = SuperClassWriter::hasVariable(latName) ;
+      StdString lonName = this->getLonCoordName(fieldId);        
+      domain->hasLonInReadFile_ = SuperClassWriter::hasVariable(lonName) ; 
+      StdString boundsLatName = this->getBoundsId(latName);
+      domain->hasBoundsLatInReadFile_ = SuperClassWriter::hasVariable(boundsLatName) ; 
+      StdString boundsLonName = this->getBoundsId(lonName);
+      domain->hasBoundsLonInReadFile_ = SuperClassWriter::hasVariable(boundsLonName) ;
+    }
   }
 
Index: /XIOS/dev/dev_olga/src/io/nc4_data_output.cpp
===================================================================
--- /XIOS/dev/dev_olga/src/io/nc4_data_output.cpp	(revision 1588)
+++ /XIOS/dev/dev_olga/src/io/nc4_data_output.cpp	(revision 1589)
@@ -166,16 +166,15 @@
            for (int idx = 0; idx < nbWritten; ++idx)
            {
-        	  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 (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)
@@ -999,8 +998,8 @@
            for (int idx = 0; idx < nbWritten; ++idx)
            {
-        	  if (indexToWrite(idx) < 0)
-              writtenArea(idx) = -1.;
-        	  else
-        	    writtenArea(idx) = domain->areavalue(indexToWrite(idx));
+             if (indexToWrite(idx) < 0)
+               writtenArea(idx) = -1.;
+             else
+               writtenArea(idx) = domain->areavalue(indexToWrite(idx));
            }
          }
@@ -1329,5 +1328,4 @@
                       axis_bounds(0, i) = axis->bounds(0, int(indexToWrite(i)));
                       axis_bounds(1, i) = axis->bounds(1, int(indexToWrite(i)));
-
                     }
                   }
Index: /XIOS/dev/dev_olga/src/node/axis.cpp
===================================================================
--- /XIOS/dev/dev_olga/src/node/axis.cpp	(revision 1588)
+++ /XIOS/dev/dev_olga/src/node/axis.cpp	(revision 1589)
@@ -696,16 +696,6 @@
     CArray<size_t,1>::const_iterator itSrvb = writtenGlobalIndex.begin(),
                                      itSrve = writtenGlobalIndex.end(), itSrv;  
-//    for (itSrv = itSrvb; itSrv != itSrve; ++itSrv)
-//    {
-//      indGlo = *itSrv;
-//      if (ite != globalLocalIndexMap_.find(indGlo))
-//      {
-//        ++nbWritten;
-//      }
-//    }
 
     localIndexToWriteOnServer.resize(writtenGlobalIndex.numElements());
-//    localIndexToWriteOnServer.resize(nbWritten);
-
     nbWritten = 0;
     for (itSrv = itSrvb; itSrv != itSrve; ++itSrv)
@@ -1033,5 +1023,4 @@
       list<CMessage> listData;
       list<CArray<int,1> > list_indi, list_dataInd;
-      list<CArray<bool,1> > list_mask;
       list<CArray<double,1> > list_val;
       list<CArray<double,2> > list_bounds;
@@ -1060,5 +1049,4 @@
         list_indi.push_back(CArray<int,1>(nbData));
         list_dataInd.push_back(CArray<int,1>(nbData));
-        list_mask.push_back(CArray<bool,1>(nbData));
 
         if (hasValue)
@@ -1074,5 +1062,4 @@
         CArray<int,1>& dataIndi = list_dataInd.back();
         dataIndi = -1;
-        CArray<bool,1>& maskIndi = list_mask.back();
 
         for (int n = 0; n < nbData; ++n)
@@ -1083,5 +1070,4 @@
           ind = globalLocalIndexMap_[idx];
           dataIndi(n) = dataIndex(ind);
-//          maskIndi(n) = mask(ind);
 
           if (hasValue)
@@ -1107,5 +1093,5 @@
         listData.push_back(CMessage());
         listData.back() << this->getId()
-                        << list_indi.back() << list_dataInd.back(); //<< list_mask.back();
+                        << list_indi.back() << list_dataInd.back();
 
         listData.back() << hasValue;
@@ -1168,5 +1154,4 @@
       buffer >> vec_indi[idx];
       buffer >> vec_dataInd[idx];      
-//      buffer >> vec_mask[idx];
 
       buffer >> hasValue;
@@ -1205,7 +1190,4 @@
          if (0 == globalLocalIndexMap_.count(gloInd))
          {
-//           index(nbIndLoc) = gloInd % n_glo;
-//           globalLocalIndexMap_[gloInd] = nbIndLoc;
-//           ++nbIndexGlob;
            index(nbIndexGlob) = gloInd % n_glo;
            globalLocalIndexMap_[gloInd] = nbIndexGlob;
@@ -1222,6 +1204,4 @@
     CArray<int,1> nonCompressedData(nbData);
     nonCompressedData = -1;   
-//    mask.resize(nbData);
-//    mask = true;
     // Mask is incorporated into data_index and is not sent/received anymore
     mask.resize(0);
@@ -1238,5 +1218,4 @@
       CArray<int,1>& indi = vec_indi[idx];
       CArray<int,1>& dataIndi = vec_dataInd[idx];
-//      CArray<bool,1>& maskIndi = vec_mask[idx];
       int nb = indi.numElements();
       for (int n = 0; n < nb; ++n)
@@ -1246,7 +1225,4 @@
         nonCompressedData(locInd) = (-1 == nonCompressedData(locInd)) ? dataIndi(n) : nonCompressedData(locInd);
 
-//        if (!mask(locInd)) // Only rewrite mask if it's not true
-//          mask(locInd) = maskIndi(n);
-        
         if (hasValue)
           value(locInd) = vec_val[idx](n);
Index: /XIOS/dev/dev_olga/src/node/axis.hpp
===================================================================
--- /XIOS/dev/dev_olga/src/node/axis.hpp	(revision 1588)
+++ /XIOS/dev/dev_olga/src/node/axis.hpp	(revision 1589)
@@ -114,7 +114,4 @@
          void computeWrittenIndex();
          void computeWrittenCompressedIndex(MPI_Comm);
-
-         template <class T> void outputAxis(CArray<T,1>& valueIn, CArray<T,1>& valueOut);
-
          bool hasTransformation();
          void solveInheritanceTransformation();
@@ -129,7 +126,5 @@
         bool hasLabel;
 
-//        CArray<size_t,1> localIndexToWriteOnServer;
         CArray<int,1> localIndexToWriteOnServer;
-        CArray<size_t,1> localIndexToWriteOnClient;
 
       private:
@@ -188,30 +183,4 @@
    }; // class CAxis
 
-   ///--------------------------------------------------------------
-
-   template <class T> void CAxis::outputAxis(CArray<T,1>& valueIn, CArray<T,1>& valueOut)
-   {
-     int sizeServer = localIndexToWriteOnServer.numElements();
-     int sizeClient = localIndexToWriteOnClient.numElements();
-     valueOut.resize(sizeClient);
-
-     if (sizeServer == sizeClient)
-     {
-       valueOut = valueIn;
-     }
-     else
-     // a hole
-     {
-       valueOut = valueIn;
-       //valueOut = -1; initialize here to some value ????
-     }
-//      CArray<size_t,1>& outIndexClient = grid->localIndexToWriteOnClient;
-//      CArray<size_t,1>& outIndexServer = grid->localIndexToWriteOnServer;
-//      for (size_t idx = 0; idx < outIndexServer.numElements(); ++idx)
-//      {
-//        fieldOut(outIndexServer(idx)) = recvDataSrv(outIndexClient(idx));
-//      }
-   }
-
    // Declare/Define CAxisGroup and CAxisDefinition
    DECLARE_GROUP(CAxis);
Index: /XIOS/dev/dev_olga/src/node/domain.cpp
===================================================================
--- /XIOS/dev/dev_olga/src/node/domain.cpp	(revision 1588)
+++ /XIOS/dev/dev_olga/src/node/domain.cpp	(revision 1589)
@@ -33,5 +33,6 @@
       , lonvalue(), latvalue(), bounds_lonvalue(), bounds_latvalue()
       , globalLocalIndexMap_(), computedWrittenIndex_(false)
-      , clients()
+      , clients(), hasLatInReadFile_(false), hasBoundsLatInReadFile_(false)
+      , hasLonInReadFile_(false), hasBoundsLonInReadFile_(false)
    {
    }
@@ -45,5 +46,6 @@
       , lonvalue(), latvalue(), bounds_lonvalue(), bounds_latvalue()
       , globalLocalIndexMap_(), computedWrittenIndex_(false)
-      , clients()
+      , clients(), hasLatInReadFile_(false), hasBoundsLatInReadFile_(false)
+      , hasLonInReadFile_(false), hasBoundsLonInReadFile_(false)
    {
     }
@@ -161,10 +163,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
@@ -1908,16 +1904,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)
@@ -1934,49 +1919,4 @@
         ++nbWritten;
       }
-      
-      // if (isCompressible())
-      // {
-      //   nbWritten = 0;
-      //   std::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_;
-      // }      
    }
 
@@ -2533,15 +2473,8 @@
            jIndex = (jIndex < 0) ? 0 : jIndex;
            nbIndLoc = iIndex + ni * jIndex;
-//           if (nbIndLoc < nbIndexGlobMax)  // THIS CONDITION IMPEDES THE CASE OF A HOLE
-//           {
-//             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(nbIndGlob) = index % ni_glo;
+           j_index(nbIndGlob) = index / ni_glo;
+           globalLocalIndexMap_[index] = nbIndGlob;
+           ++nbIndGlob;
          } 
       } 
@@ -3001,9 +2934,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/dev/dev_olga/src/node/domain.hpp
===================================================================
--- /XIOS/dev/dev_olga/src/node/domain.hpp	(revision 1588)
+++ /XIOS/dev/dev_olga/src/node/domain.hpp	(revision 1589)
@@ -151,4 +151,8 @@
          bool hasLonLat;
          bool hasPole ;
+         bool hasLatInReadFile_ ; // specify if latitude is defined on read file, so it can be read later when grid distribution will be defined
+         bool hasBoundsLatInReadFile_ ; // specify if latitude boundarues are defined on read file, so it can be read later when grid distribution will be defined
+         bool hasLonInReadFile_ ; // specify if longitude is defined on read file, so it can be read later when grid distribution will be defined
+         bool hasBoundsLonInReadFile_ ; // specify if longitude boundaries are defined on read file, so it can be read later when grid distribution will be defined
 
          void computeLocalMask(void) ;
Index: /XIOS/dev/dev_olga/src/node/grid.cpp
===================================================================
--- /XIOS/dev/dev_olga/src/node/grid.cpp	(revision 1588)
+++ /XIOS/dev/dev_olga/src/node/grid.cpp	(revision 1589)
@@ -423,49 +423,4 @@
       }
    }
-
-
-/*!
-  A grid can have multiple dimension, so can its mask in the form of multi-dimension array.
-It's not a good idea to store all multi-dimension arrays corresponding to each mask.
-One of the ways is to convert this array into 1-dimension one and every process is taken place on it.
-  \param [in] multi-dimension array grid mask
-*/
-
-//  void CGrid::getLocalMask(CArray<bool,1>& localMask)
-//  {
-//      std::vector<CDomain*> domainP = this->getDomains();
-//      std::vector<CAxis*> axisP = this->getAxis();
-//      int dim = domainP.size() * 2 + axisP.size();
-//
-//      switch (dim)
-//      {
-//        case 0:
-//          getLocalMask(mask_0d, localMask);
-//          break;
-//        case 1:
-//          getLocalMask(mask_1d, localMask);
-//          break;
-//        case 2:
-//          getLocalMask(mask_2d, localMask);
-//          break;
-//        case 3:
-//          getLocalMask(mask_3d, localMask);
-//          break;
-//        case 4:
-//          getLocalMask(mask_4d, localMask);
-//          break;
-//        case 5:
-//          getLocalMask(mask_5d, localMask);
-//          break;
-//        case 6:
-//          getLocalMask(mask_6d, localMask);
-//          break;
-//        case 7:
-//          getLocalMask(mask_7d, localMask);
-//          break;
-//        default:
-//          break;
-//      }
-//  }
       
    /*
@@ -1788,41 +1743,4 @@
           nGlob.push_back(1);  
         }
-
-//        modifyMaskSize(nSize, false);
-//        modifyMaskSize(nSize, true);   // Grid mask should be gone beyond client source filter
-//
-//        // These below codes are reserved for future
-//        CDistributionServer srvDist(server->intraCommRank, nBegin, nSize, nBeginGlobal, nGlob);
-//        map<int, CArray<size_t, 1> >::iterator itb = outGlobalIndexFromClient.begin(),
-//                                               ite = outGlobalIndexFromClient.end(), it;
-//        const CDistributionServer::GlobalLocalMap&  globalLocalMask = srvDist.getGlobalLocalIndex();
-//        CDistributionServer::GlobalLocalMap::const_iterator itSrv;
-//        size_t nb = 0;
-//        for (it = itb; it != ite; ++it)
-//        {
-//          CArray<size_t,1>& globalInd = it->second;
-//          for (size_t idx = 0; idx < globalInd.numElements(); ++idx)
-//          {
-//            if (globalLocalMask.end() != globalLocalMask.find(globalInd(idx))) ++nb;
-//          }
-//        }
-//
-//        CArray<int,1> indexToModify(nb);
-//        nb = 0;
-//        for (it = itb; it != ite; ++it)
-//        {
-//          CArray<size_t,1>& globalInd = it->second;
-//          for (size_t idx = 0; idx < globalInd.numElements(); ++idx)
-//          {
-//            itSrv = globalLocalMask.find(globalInd(idx));
-//            if (globalLocalMask.end() != itSrv)
-//            {
-//              indexToModify(nb) = itSrv->second;
-//              ++nb;
-//            }
-//          }
-//        }
-
-//        modifyMask(indexToModify, true);
       }
 
Index: /XIOS/dev/dev_olga/src/transformation/generic_algorithm_transformation.cpp
===================================================================
--- /XIOS/dev/dev_olga/src/transformation/generic_algorithm_transformation.cpp	(revision 1588)
+++ /XIOS/dev/dev_olga/src/transformation/generic_algorithm_transformation.cpp	(revision 1589)
@@ -846,8 +846,4 @@
                                                                                  vector<int>& localSrc, vector<int>& localDst, vector<double>& weight,
                                                                                  int nlocalIndexDest)
-
-//void CGenericAlgorithmTransformation::computeTransformationMappingNonDistributed(int elementPositionInGrid, CGrid* gridSrc, CGrid* gridDst,
-//                                                                                 vector<int>& localSrc, vector<int>& localDst, vector<double>& weight,
-//                                                                                 vector<bool>& localMaskOnGridDest)
 {
 
@@ -985,17 +981,4 @@
   }
 
-// just get the local src mask
-//  CArray<bool,1> localMaskOnSrcGrid;
-//  gridSrc->getLocalMask(localMaskOnSrcGrid) ;
-// intermediate grid, mask is not initialized => set up mask to true
-//  if (localMaskOnSrcGrid.isEmpty())
-//  {
-//    localMaskOnSrcGrid.resize(nlocalIndexSrc) ;
-//    localMaskOnSrcGrid=true ;
-//  }
-  
-
-//  localMaskOnGridDest.resize(nlocalIndexDest,false) ;
-
   vector<vector<vector<pair<int,double> > > > dstIndWeight(transformationMapping_.size()) ;
    
@@ -1038,6 +1021,4 @@
                                                                    int& t, vector<vector<vector<pair<int,double> > > >& dstIndWeight, int currentInd,
                                                                    vector<int>& localSrc, vector<int>& localDst, vector<double>& weight)
-//                                                                   CArray<bool,1>& localMaskOnGridSrc
-//                                                                   , vector<bool>& localMaskOnGridDest )
 {
   int masked_ ;
@@ -1052,7 +1033,6 @@
         masked_=masked ;
         if (!mask(i)) masked_=false ;
-//        nonDistributedrecursiveFunct(currentPos-1, masked_, elementPositionInGrid, maskSrc, maskDst, srcInd, srcIndCompressed, nIndexSrc, t, dstIndWeight, currentInd, localSrc, localDst, weight, localMaskOnGridSrc, localMaskOnGridDest) ;
         nonDistributedrecursiveFunct(currentPos-1, masked_, elementPositionInGrid, maskSrc, maskDst, srcInd, srcIndCompressed, nIndexSrc, t,
-                                     dstIndWeight, currentInd, localSrc, localDst, weight);//, localMaskOnGridDest) ;
+                                     dstIndWeight, currentInd, localSrc, localDst, weight);
       }
     }
@@ -1068,16 +1048,11 @@
             for(vector<pair<int,double> >::iterator it = dstIndWeight[t][currentInd].begin(); it!=dstIndWeight[t][currentInd].end(); ++it)
             {
-//              if (localMaskOnGridSrc(srcInd))
-              {
-                localSrc.push_back(srcIndCompressed) ;
-                localDst.push_back(it->first) ;
-                weight.push_back(it->second) ;
-//                localMaskOnGridDest[it->first]=true ;
-              }
+              localSrc.push_back(srcIndCompressed) ;
+              localDst.push_back(it->first) ;
+              weight.push_back(it->second) ;
               (it->first)++ ;
             }
           }
           if (t < dstIndWeight.size()-1) t++ ;
-//          if (localMaskOnGridSrc(srcInd))
             srcIndCompressed ++ ;
         }
@@ -1100,6 +1075,4 @@
         nonDistributedrecursiveFunct(currentPos-1, masked_, elementPositionInGrid, maskSrc, maskDst, srcInd,
                                      srcIndCompressed, nIndexSrc, t, dstIndWeight , i,  localSrc, localDst, weight);
-//                                     localMaskOnGridSrc,
-//                                     localMaskOnGridDest) ;
       }
     }
@@ -1115,17 +1088,12 @@
             for(vector<pair<int,double> >::iterator it = dstIndWeight[t][i].begin(); it!=dstIndWeight[t][i].end(); ++it)
             {
-//              if (localMaskOnGridSrc(srcInd))
-              {
-                localSrc.push_back(srcIndCompressed) ;
-                localDst.push_back(it->first) ;
-                weight.push_back(it->second) ;
-//                localMaskOnGridDest[it->first]=true ;
-              }
+              localSrc.push_back(srcIndCompressed) ;
+              localDst.push_back(it->first) ;
+              weight.push_back(it->second) ;
               (it->first)++ ;
             }
            }
           if (t < dstIndWeight.size()-1) t++ ;
-//          if (localMaskOnGridSrc(srcInd))
-            srcIndCompressed ++ ;
+          srcIndCompressed ++ ;
         }
         srcInd++ ;
@@ -1135,14 +1103,4 @@
 
 }
-
-
-
-
-
-
-
-
-
-
 
 /*!
Index: /XIOS/dev/dev_olga/src/transformation/generic_algorithm_transformation.hpp
===================================================================
--- /XIOS/dev/dev_olga/src/transformation/generic_algorithm_transformation.hpp	(revision 1588)
+++ /XIOS/dev/dev_olga/src/transformation/generic_algorithm_transformation.hpp	(revision 1589)
@@ -91,10 +91,4 @@
   void computeTransformationMappingNonDistributed(int elementPositionInGrid, CGrid* gridSrc, CGrid* gridDst,
                                                   vector<int>& localSrc, vector<int>& localDst, vector<double>& weight, int nbLocalIndexOnGridDest);
-//  void nonDistributedrecursiveFunct(int currentPos, bool masked, int elementPositionInGrid,  vector< CArray<bool,1>* >& maskSrc, vector< CArray<bool,1>* >& maskDst, int& srcInd, int& srcIndCompressed, vector<int>& nIndexSrc, int& t, vector<vector<vector<pair<int,double> > > >& dstIndWeight, int currentInd,
-//                                     vector<int>& localSrc, vector<int>& localDst, vector<double>& weight, CArray<bool,1>& localMaskOnGridSrc, vector<bool>& localMaskOnGridDest) ;
-//  void nonDistributedrecursiveFunct(int currentPos, bool masked, int elementPositionInGrid,  vector< CArray<bool,1>* >& maskSrc, vector< CArray<bool,1>* >& maskDst,
-//                                    int& srcInd, int& srcIndCompressed, vector<int>& nIndexSrc,
-//                                    int& t, vector<vector<vector<pair<int,double> > > >& dstIndWeight, int currentInd,
-//                                    vector<int>& localSrc, vector<int>& localDst, vector<double>& weight, vector<bool>& localMaskOnGridDest) ;
   void nonDistributedrecursiveFunct(int currentPos, bool masked, int elementPositionInGrid,  vector< CArray<bool,1>* >& maskSrc, vector< CArray<bool,1>* >& maskDst,
                                     int& srcInd, int& srcIndCompressed, vector<int>& nIndexSrc,
Index: /XIOS/dev/dev_olga/src/transformation/grid_transformation.cpp
===================================================================
--- /XIOS/dev/dev_olga/src/transformation/grid_transformation.cpp	(revision 1588)
+++ /XIOS/dev/dev_olga/src/transformation/grid_transformation.cpp	(revision 1589)
@@ -346,5 +346,4 @@
       std::list<RecvIndexGridDestinationMap>().swap(localIndexToReceiveOnGridDest_);
       std::list<size_t>().swap(nbLocalIndexOnGridDest_);
-//      std::list<std::vector<bool> >().swap(localMaskOnGridDest_);
     }
     else
@@ -400,5 +399,4 @@
         vector<double> weight ;
         int nbLocalIndexOnGridDest;
-//        localMaskOnGridDest_.push_back(vector<bool>()) ;
         CTimer::get("computeTransformationMappingNonDistributed").resume();  
 //        algo->computeTransformationMappingNonDistributed(elementPosition, gridSource_, tmpGridDestination_,
@@ -409,6 +407,4 @@
 
         CTimer::get("computeTransformationMappingConvert").resume();  
-//        nbLocalIndexOnGridDest_.push_back(localMaskOnGridDest_.back().size()) ;
-//        nbLocalIndexOnGridDest_.push_back(localMaskOnGridDest_.back().size()) ;
         nbLocalIndexOnGridDest_.push_back(nbLocalIndexOnGridDest) ;
         int clientRank=client->clientRank ;
@@ -662,5 +658,4 @@
         recvTmp[recvRank][realRecvSize].first = globalLocalIndexGridDestSendToServer[recvIndexDst(idx)];
         recvTmp[recvRank][realRecvSize].second = recvWeightDst(idx);
-//        tmpMask[globalLocalIndexGridDestSendToServer[recvIndexDst(idx)]] = true;
          ++realRecvSize;
       }
@@ -715,12 +710,3 @@
 }
 
-/*!
-  Local mask of data which will be received on the grid destination
-  \return local mask of data
-*/
-//const std::list<std::vector<bool> >& CGridTransformation::getLocalMaskIndexOnGridDest() const
-//{
-//  return localMaskOnGridDest_;
-//}
-
-}
+}
Index: /XIOS/dev/dev_olga/src/transformation/grid_transformation.hpp
===================================================================
--- /XIOS/dev/dev_olga/src/transformation/grid_transformation.hpp	(revision 1588)
+++ /XIOS/dev/dev_olga/src/transformation/grid_transformation.hpp	(revision 1589)
@@ -49,5 +49,4 @@
   const std::list<RecvIndexGridDestinationMap>& getLocalIndexToReceiveOnGridDest() const;
   const std::list<size_t>& getNbLocalIndexToReceiveOnGridDest() const;
-//  const std::list<std::vector<bool> >& getLocalMaskIndexOnGridDest() const;
 
   CGrid* getGridSource() { return originalGridSource_; }
@@ -84,5 +83,4 @@
   //! Number of local index of data to receive on grid destination
   std::list<size_t> nbLocalIndexOnGridDest_;
-//  std::list<std::vector<bool> > localMaskOnGridDest_;
 
   bool dynamicalTransformation_;
