Index: /XIOS/dev/XIOS_DEV_CMIP6/src/distribution_client.cpp
===================================================================
--- /XIOS/dev/XIOS_DEV_CMIP6/src/distribution_client.cpp	(revision 1310)
+++ /XIOS/dev/XIOS_DEV_CMIP6/src/distribution_client.cpp	(revision 1311)
@@ -108,6 +108,6 @@
   for (int i = 0; i < domainNum_;++i)
   {
-    domainMasks_[i].resize(domList[i]->mask_1d.numElements());
-    domainMasks_[i] = domList[i]->mask_1d;
+    domainMasks_[i].resize(domList[i]->domainMask.numElements());
+    domainMasks_[i] = domList[i]->domainMask;
   }
 
Index: /XIOS/dev/XIOS_DEV_CMIP6/src/node/domain.cpp
===================================================================
--- /XIOS/dev/XIOS_DEV_CMIP6/src/node/domain.cpp	(revision 1310)
+++ /XIOS/dev/XIOS_DEV_CMIP6/src/node/domain.cpp	(revision 1311)
@@ -1040,13 +1040,13 @@
       if (!mask_2d.isEmpty())
       {
-        mask_1d.resize(mask_2d.extent(0) * mask_2d.extent(1));
+        domainMask.resize(mask_2d.extent(0) * mask_2d.extent(1));
         for (int j = 0; j < nj; ++j)
-          for (int i = 0; i < ni; ++i) mask_1d(i+j*ni) = mask_2d(i,j);
-        mask_2d.reset();
+          for (int i = 0; i < ni; ++i) domainMask(i+j*ni) = mask_2d(i,j);
+//        mask_2d.reset();
       }
       else if (mask_1d.isEmpty())
       {
-        mask_1d.resize(i_index.numElements());
-        for (int i = 0; i < i_index.numElements(); ++i) mask_1d(i) = true;
+        domainMask.resize(i_index.numElements());
+        for (int i = 0; i < i_index.numElements(); ++i) domainMask(i) = true;
       }
    }
@@ -1197,5 +1197,5 @@
          {
            ind=i+ni*j ;
-           localMask(ind)=mask_1d(ind) ;
+           localMask(ind)=domainMask(ind) ;
          }
      }
@@ -2186,5 +2186,5 @@
         {
           idx = static_cast<int>(it->second[n]);
-          list_mask.back()(n) = mask_1d(globalLocalIndexMap_[idx]);
+          list_mask.back()(n) = domainMask(globalLocalIndexMap_[idx]);
         }
 
@@ -2660,4 +2660,5 @@
     nbMaskInd = globalLocalIndexMap_.size();
     mask_1d.resize(nbMaskInd);
+    domainMask.resize(nbMaskInd);
     mask_1d = false;
     
@@ -2672,5 +2673,6 @@
           mask_1d(lInd) = tmp(ind);
       }
-    }    
+    }
+    domainMask=mask_1d ;
   }
 
@@ -3012,5 +3014,5 @@
          dataJIndex(lInd) = (-1 == dataJIndex(lInd)) ? tmpJ(ind) : dataJIndex(lInd);  
 
-         if (!mask_1d(lInd))   // Include mask info into data index on the RECEIVE getServerDimensionSizes    
+         if (!domainMask(lInd))   // Include mask info into data index on the RECEIVE getServerDimensionSizes    
          {
            dataIIndex(lInd) = dataJIndex(lInd) = -1;
Index: /XIOS/dev/XIOS_DEV_CMIP6/src/node/domain.hpp
===================================================================
--- /XIOS/dev/XIOS_DEV_CMIP6/src/node/domain.hpp	(revision 1310)
+++ /XIOS/dev/XIOS_DEV_CMIP6/src/node/domain.hpp	(revision 1311)
@@ -142,5 +142,6 @@
          CArray<size_t,1> localIndexToWriteOnServer;         
 
-         CArray<bool, 1> localMask;
+         CArray<bool, 1> domainMask; // mask_1d, mask_2d -> domainMask
+         CArray<bool, 1> localMask; // domainMask + indexing
          bool isCurvilinear ;
          bool hasBounds ;
Index: /XIOS/dev/XIOS_DEV_CMIP6/src/node/grid.cpp
===================================================================
--- /XIOS/dev/XIOS_DEV_CMIP6/src/node/grid.cpp	(revision 1310)
+++ /XIOS/dev/XIOS_DEV_CMIP6/src/node/grid.cpp	(revision 1311)
@@ -362,5 +362,5 @@
 
       std::vector<CArray<bool,1>* > domainMasks(domainP.size());
-      for (int i = 0; i < domainMasks.size(); ++i) domainMasks[i] = &(domainP[i]->mask_1d);
+      for (int i = 0; i < domainMasks.size(); ++i) domainMasks[i] = &(domainP[i]->domainMask);
       std::vector<CArray<bool,1>* > axisMasks(axisP.size());
       for (int i = 0; i < axisMasks.size(); ++i) axisMasks[i] = &(axisP[i]->mask);
@@ -404,5 +404,5 @@
 
       std::vector<CArray<bool,1>* > domainMasks(domainP.size());
-      for (int i = 0; i < domainMasks.size(); ++i) domainMasks[i] = &(domainP[i]->mask_1d);
+      for (int i = 0; i < domainMasks.size(); ++i) domainMasks[i] = &(domainP[i]->domainMask);
       std::vector<CArray<bool,1>* > axisMasks(axisP.size());
       for (int i = 0; i < axisMasks.size(); ++i) axisMasks[i] = &(axisP[i]->mask);
@@ -1775,5 +1775,6 @@
                                         const CArray<int,1>& axisDomainOrder)
   {
-    globalDim.resize(domains.size()*2+axis.size()+scalars.size());
+ //   globalDim.resize(domains.size()*2+axis.size()+scalars.size());
+    globalDim.resize(domains.size()*2+axis.size());
     int positionDimensionDistributed = 1;
     int idx = 0, idxDomain = 0, idxAxis = 0, idxScalar = 0;
@@ -1805,7 +1806,7 @@
       else
       {
-        globalDim[idx] = 1;
+//        globalDim[idx] = 1;
         ++idxScalar;
-        ++idx;
+//        ++idx;
       }
     }
Index: /XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_interpolate.cpp
===================================================================
--- /XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_interpolate.cpp	(revision 1310)
+++ /XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_interpolate.cpp	(revision 1311)
@@ -313,5 +313,5 @@
     for (size_t idx = 0; idx < vecAxisValueSize; ++idx)
     {
-      if (dom->mask_1d(idx)) ++vecAxisValueSizeWithMask;
+      if (dom->domainMask(idx)) ++vecAxisValueSizeWithMask;
     }
 
@@ -324,5 +324,5 @@
       for (size_t idx = 0; idx < vecAxisValueSize; ++idx)
       {
-        if (dom->mask_1d(idx))
+        if (dom->domainMask(idx))
         {
           transPosition_[indexMask].resize(1);
@@ -345,5 +345,5 @@
     for (size_t idx = 0; idx < vecAxisValueSize; ++idx)
     {
-      if (dom->mask_1d(idx))
+      if (dom->domainMask(idx))
       {
         size_t axisValueSize = 0;
Index: /XIOS/dev/XIOS_DEV_CMIP6/src/transformation/domain_algorithm_expand.cpp
===================================================================
--- /XIOS/dev/XIOS_DEV_CMIP6/src/transformation/domain_algorithm_expand.cpp	(revision 1310)
+++ /XIOS/dev/XIOS_DEV_CMIP6/src/transformation/domain_algorithm_expand.cpp	(revision 1311)
@@ -168,5 +168,5 @@
   int njSrc = domainSource->nj, jbegin = domainSource->jbegin;
   int dataDimSrc = domainSource->data_dim;
-  CArray<bool,1>& mask_1d_src = domainSource->mask_1d;
+  CArray<bool,1>& mask_1d_src = domainSource->domainMask;
   CArray<int,1>& i_index_src = domainSource->i_index;
   CArray<int,1>& j_index_src = domainSource->j_index;
@@ -231,5 +231,5 @@
   domainDestination->global_zoom_nj.setValue(domainSource->global_zoom_nj+2);
 
-  CArray<bool,1>& mask_1d_dst = domainDestination->mask_1d;
+  CArray<bool,1>& mask_1d_dst = domainDestination->domainMask;
   CArray<int,1>& i_index_dst  = domainDestination->i_index;
   CArray<int,1>& j_index_dst  = domainDestination->j_index;  
@@ -453,4 +453,6 @@
      domainDestination->latvalue_1d = (lat_dst);
   }
+   domainDestination->mask_1d.resize(domainDestination->domainMask.numElements()) ;
+   domainDestination->mask_1d=domainDestination->domainMask ;
    domainDestination->computeLocalMask() ;
 }
@@ -485,5 +487,5 @@
   // Now extend domain destination
   int niGlob = domainSource->ni_glo;
-  CArray<bool,1>& mask_1d_src = domainSource->mask_1d;
+  CArray<bool,1>& mask_1d_src = domainSource->domainMask;
   CArray<int,1>& i_index_src = domainSource->i_index;
   CArray<double,1>& lon_src = domainSource->lonvalue_1d;
@@ -508,5 +510,5 @@
   }
 
-  CArray<bool,1>& mask_1d_dst = domainDestination->mask_1d;
+  CArray<bool,1>& mask_1d_dst = domainDestination->domainMask;
   CArray<int,1>& i_index_dst = domainDestination->i_index;
   CArray<int,1>& j_index_dst = domainDestination->j_index;
@@ -665,4 +667,6 @@
   // Update ni
   domainDestination->ni.setValue(newNbLocalDst);
+  domainDestination->mask_1d.resize(domainDestination->domainMask.numElements()) ;
+  domainDestination->mask_1d=domainDestination->domainMask ;
   domainDestination->computeLocalMask() ;
 }
