Index: /XIOS/trunk/src/config/domain_attribute.conf
===================================================================
--- /XIOS/trunk/src/config/domain_attribute.conf	(revision 1552)
+++ /XIOS/trunk/src/config/domain_attribute.conf	(revision 1553)
@@ -62,7 +62,2 @@
 DECLARE_ATTRIBUTE(StdString, domain_ref)
 DECLARE_ATTRIBUTE(int,       prec)
-
-DECLARE_ATTRIBUTE_PRIVATE(int,  global_zoom_ibegin)
-DECLARE_ATTRIBUTE_PRIVATE(int,  global_zoom_ni)
-DECLARE_ATTRIBUTE_PRIVATE(int,  global_zoom_jbegin)
-DECLARE_ATTRIBUTE_PRIVATE(int,  global_zoom_nj)
Index: /XIOS/trunk/src/config/domain_attribute_private.conf
===================================================================
--- /XIOS/trunk/src/config/domain_attribute_private.conf	(revision 1552)
+++ /XIOS/trunk/src/config/domain_attribute_private.conf	(revision 1553)
@@ -25,17 +25,2 @@
 DECLARE_ARRAY_PRIVATE(double, 2, bounds_lonvalue_unstructured_read_from_file)
 DECLARE_ARRAY_PRIVATE(double, 2, bounds_latvalue_unstructured_read_from_file)
-
-//DECLARE_ATTRIBUTE_PRIVATE(int,  global_zoom_ibegin)
-//DECLARE_ATTRIBUTE_PRIVATE(int,  global_zoom_ni)
-//DECLARE_ATTRIBUTE_PRIVATE(int,  global_zoom_jbegin)
-//DECLARE_ATTRIBUTE_PRIVATE(int,  global_zoom_nj)
-
-// Local zoom information
-DECLARE_ATTRIBUTE_PRIVATE(int,  zoom_ibegin)
-DECLARE_ATTRIBUTE_PRIVATE(int,  zoom_ni)
-DECLARE_ATTRIBUTE_PRIVATE(int,  zoom_jbegin)
-DECLARE_ATTRIBUTE_PRIVATE(int,  zoom_nj)
-
-
-DECLARE_ARRAY_PRIVATE(int    ,   1 , zoom_i_index, false)
-DECLARE_ARRAY_PRIVATE(int    ,   1 , zoom_j_index, false)
Index: /XIOS/trunk/src/distribution_server.cpp
===================================================================
--- /XIOS/trunk/src/distribution_server.cpp	(revision 1552)
+++ /XIOS/trunk/src/distribution_server.cpp	(revision 1553)
@@ -12,23 +12,23 @@
 namespace xios {
 
-CDistributionServer::CDistributionServer(int rank, const std::vector<int>& nZoomBegin,
-                                         const std::vector<int>& nZoomSize,
-                                         const std::vector<int>& nZoomBeginGlobal,
+CDistributionServer::CDistributionServer(int rank, const std::vector<int>& nBegin,
+                                         const std::vector<int>& nSize,
+                                         const std::vector<int>& nBeginGlobal,
                                          const std::vector<int>& nGlobal)
-  : CDistribution(rank, nGlobal.size()), nGlobal_(nGlobal), nZoomBeginGlobal_(nZoomBeginGlobal),
-    nZoomSize_(nZoomSize), nZoomBegin_(nZoomBegin), globalLocalIndexMap_()
+  : CDistribution(rank, nGlobal.size()), nGlobal_(nGlobal), nBeginGlobal_(nBeginGlobal),
+    nSize_(nSize), nBegin_(nBegin), globalLocalIndexMap_()
 {
   createGlobalIndex();
 }
 
-CDistributionServer::CDistributionServer(int rank, 
+CDistributionServer::CDistributionServer(int rank,
                                         const std::vector<CArray<int,1> >& globalIndexElements,
                                         const CArray<int,1>& elementOrder,
-                                        const std::vector<int>& nZoomBegin,
-                                        const std::vector<int>& nZoomSize,
-                                        const std::vector<int>& nZoomBeginGlobal,
+                                        const std::vector<int>& nBegin,
+                                        const std::vector<int>& nSize,
+                                        const std::vector<int>& nBeginGlobal,
                                         const std::vector<int>& nGlobal)
-  : CDistribution(rank, nGlobal.size()), nGlobal_(nGlobal), nZoomBeginGlobal_(nZoomBeginGlobal),
-    nZoomSize_(nZoomSize), nZoomBegin_(nZoomBegin), globalLocalIndexMap_()
+  : CDistribution(rank, nGlobal.size()), nGlobal_(nGlobal), nBeginGlobal_(nBeginGlobal),
+    nSize_(nSize), nBegin_(nBegin), globalLocalIndexMap_()
 {
   createGlobalIndex(globalIndexElements, elementOrder);
@@ -48,10 +48,10 @@
 {
   size_t idx = 0, ssize = 1;
-  for (int i = 0; i < nZoomSize_.size(); ++i) ssize *= nZoomSize_[i];
+  for (int i = 0; i < nSize_.size(); ++i) ssize *= nSize_[i];
 
   this->globalIndex_.resize(ssize);
   std::vector<int> idxLoop(this->getDims(),0);
   std::vector<int> currentIndex(this->getDims());
-  int innerLoopSize = nZoomSize_[0];
+  int innerLoopSize = nSize_[0];
 
   globalLocalIndexMap_.rehash(std::ceil(ssize/globalLocalIndexMap_.max_load_factor()));
@@ -60,5 +60,5 @@
     for (int i = 0; i < this->dims_-1; ++i)
     {
-      if (idxLoop[i] == nZoomSize_[i])
+      if (idxLoop[i] == nSize_[i])
       {
         idxLoop[i] = 0;
@@ -67,5 +67,5 @@
     }
 
-    for (int i = 1; i < this->dims_; ++i)  currentIndex[i] = idxLoop[i] + nZoomBegin_[i];
+    for (int i = 1; i < this->dims_; ++i)  currentIndex[i] = idxLoop[i] + nBegin_[i];
 
     size_t mulDim, globalIndex;
@@ -73,5 +73,5 @@
     {
       mulDim = 1;
-      globalIndex = i + nZoomBegin_[0];
+      globalIndex = i + nBegin_[0];
 
       for (int k = 1; k < this->dims_; ++k)
@@ -215,19 +215,4 @@
 }
 
-const std::vector<int>& CDistributionServer::getZoomBeginGlobal() const
-{
-  return nZoomBeginGlobal_;
-}
-
-const std::vector<int>& CDistributionServer::getZoomBeginServer() const
-{
-  return nZoomBegin_;
-}
-
-const std::vector<int>& CDistributionServer::getZoomSizeServer() const
-{
-  return nZoomSize_;
-}
-
 void CDistributionServer::partialClear(void)
 {
Index: /XIOS/trunk/src/distribution_server.hpp
===================================================================
--- /XIOS/trunk/src/distribution_server.hpp	(revision 1552)
+++ /XIOS/trunk/src/distribution_server.hpp	(revision 1553)
@@ -24,17 +24,17 @@
     /** Default constructor */
     CDistributionServer(int rank, int dims, const CArray<size_t,1>& globalIndex = CArray<size_t,1>());
-    CDistributionServer(int rank, const std::vector<int>& nZoomBeginServer,
-                        const std::vector<int>& nZoomSizeServer, const std::vector<int>& nGlobal);
-    CDistributionServer(int rank, const std::vector<int>& nZoomBeginServer,
-                        const std::vector<int>& nZoomSizeServer,
-                        const std::vector<int>& nZoomBeginGlobal,
+    CDistributionServer(int rank, const std::vector<int>& nBeginServer,
+                        const std::vector<int>& nSizeServer, const std::vector<int>& nGlobal);
+    CDistributionServer(int rank, const std::vector<int>& nBeginServer,
+                        const std::vector<int>& nSizeServer,
+                        const std::vector<int>& nBeginGlobal,
                         const std::vector<int>& nGlobal);
 
-    CDistributionServer(int rank, 
+    CDistributionServer(int rank,
                         const std::vector<CArray<int,1> >& globalIndexElements,
                         const CArray<int,1>& elementOrder,
-                        const std::vector<int>& nZoomBeginServer,
-                        const std::vector<int>& nZoomSizeServer,
-                        const std::vector<int>& nZoomBeginGlobal,
+                        const std::vector<int>& nBeginServer,
+                        const std::vector<int>& nSizeServer,
+                        const std::vector<int>& nBeginGlobal,
                         const std::vector<int>& nGlobal);
 
@@ -42,7 +42,4 @@
     virtual ~CDistributionServer();
 
-    const std::vector<int>& getZoomBeginGlobal() const;
-    const std::vector<int>& getZoomBeginServer() const;
-    const std::vector<int>& getZoomSizeServer() const;
     const GlobalLocalMap& getGlobalLocalIndex() const { return globalLocalIndexMap_; }    
     int getGridSize() const;
@@ -62,7 +59,7 @@
   private:
     std::vector<int> nGlobal_;
-    std::vector<int> nZoomBeginGlobal_;
-    std::vector<int> nZoomSize_;
-    std::vector<int> nZoomBegin_;
+    std::vector<int> nBeginGlobal_;
+    std::vector<int> nSize_;
+    std::vector<int> nBegin_;
 
 };
Index: /XIOS/trunk/src/io/nc4_data_input.cpp
===================================================================
--- /XIOS/trunk/src/io/nc4_data_input.cpp	(revision 1552)
+++ /XIOS/trunk/src/io/nc4_data_input.cpp	(revision 1553)
@@ -63,25 +63,4 @@
       case ONE_FILE:
       {
-/*
-        std::vector<int> nZoomBeginGlobal = grid->getDistributionServer()->getZoomBeginGlobal();
-        std::vector<int> nZoomBeginServer = grid->getDistributionServer()->getZoomBeginServer();
-        std::vector<int> nZoomSizeServer  = grid->getDistributionServer()->getZoomSizeServer();
-
-        int ssize = nZoomBeginGlobal.size();
-
-        std::vector<StdSize> start(ssize);
-        std::vector<StdSize> count(ssize);
-
-        for (int i = 0; i < ssize; ++i)
-        {
-          start[i] = nZoomBeginServer[ssize - i - 1] - nZoomBeginGlobal[ssize - i - 1];
-          count[i] = nZoomSizeServer[ssize - i - 1];
-        }
-*/
-
-        std::vector<int> nZoomBeginGlobal = grid->getDistributionServer()->getZoomBeginGlobal();
-        std::vector<int> nZoomBeginServer = grid->getDistributionServer()->getZoomBeginServer();
-        std::vector<int> nZoomSizeServer  = grid->getDistributionServer()->getZoomSizeServer();
-
         std::vector<StdSize> start, count;
 
@@ -91,8 +70,8 @@
         int numElement = axisDomainOrder.numElements();
         int idxDomain = domainList.size() - 1, idxAxis = axisList.size() - 1;
-        int idx = nZoomBeginGlobal.size() - 1;
-
-        start.reserve(nZoomBeginGlobal.size());
-        count.reserve(nZoomBeginGlobal.size());
+        int idx = domainList.size() * 2 + axisList.size() - 1;
+
+        start.reserve(idx+1);
+        count.reserve(idx+1);
 
         for (int i = numElement - 1; i >= 0; --i)
@@ -103,10 +82,11 @@
             if ((domain->type) != CDomain::type_attr::unstructured)
             {
-              start.push_back(nZoomBeginServer[idx] - nZoomBeginGlobal[idx]);
-              count.push_back(nZoomSizeServer[idx]);
+              start.push_back(domain->jbegin);
+              count.push_back(domain->nj);
             }
             --idx ;
-            start.push_back(nZoomBeginServer[idx] - nZoomBeginGlobal[idx]);
-            count.push_back(nZoomSizeServer[idx]);
+            start.push_back(domain->ibegin);
+            count.push_back(domain->ni);
+
             --idx ;
             --idxDomain;
@@ -114,6 +94,7 @@
           else if (1 == axisDomainOrder(i))
           {
-            start.push_back(nZoomBeginServer[idx] - nZoomBeginGlobal[idx]);
-            count.push_back(nZoomSizeServer[idx]);
+            CAxis* axis = CAxis::get(axisList[idxAxis]);
+            start.push_back(axis->begin);
+            count.push_back(axis->n);
             --idx;
           }
Index: /XIOS/trunk/src/io/nc4_data_output.cpp
===================================================================
--- /XIOS/trunk/src/io/nc4_data_output.cpp	(revision 1552)
+++ /XIOS/trunk/src/io/nc4_data_output.cpp	(revision 1553)
@@ -221,12 +221,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)
                  {
@@ -248,6 +240,6 @@
                  else bounds_latid = "bounds_"+latName+appendDomid;
 
-                 SuperClassWriter::addDimension(dimXid, domain->zoom_ni);
-                 SuperClassWriter::addDimension(dimYid, domain->zoom_nj);
+                 SuperClassWriter::addDimension(dimXid, domain->ni);
+                 SuperClassWriter::addDimension(dimYid, domain->nj);
 
                  if (domain->hasBounds)
@@ -256,16 +248,16 @@
                  if (server->intraCommSize > 1)
                  {
-                   this->writeLocalAttributes(domain->zoom_ibegin,
-                                              domain->zoom_ni,
-                                              domain->zoom_jbegin,
-                                              domain->zoom_nj,
+                   this->writeLocalAttributes(domain->ibegin,
+                                              domain->ni,
+                                              domain->jbegin,
+                                              domain->nj,
                                               appendDomid);
 
                    if (singleDomain)
                     this->writeLocalAttributes_IOIPSL(dimXid, dimYid,
-                                                      domain->zoom_ibegin,
-                                                      domain->zoom_ni,
-                                                      domain->zoom_jbegin,
-                                                      domain->zoom_nj,
+                                                      domain->ibegin,
+                                                      domain->ni,
+                                                      domain->jbegin,
+                                                      domain->nj,
                                                       domain->ni_glo,domain->nj_glo,
                                                       server->intraCommRank,server->intraCommSize);
@@ -340,7 +332,7 @@
                        break;
                      case CDomain::type_attr::rectilinear :
-                       CArray<double,1> lat = writtenLat(Range(fromStart,toEnd,domain->zoom_ni)) ;
+                       CArray<double,1> lat = writtenLat(Range(fromStart,toEnd,domain->ni)) ;
                        SuperClassWriter::writeData(CArray<double,1>(lat.copy()), latid, isCollective, 0);
-                       CArray<double,1> lon = writtenLon(Range(0,domain->zoom_ni-1)) ;
+                       CArray<double,1> lon = writtenLon(Range(0,domain->ni-1)) ;
                        SuperClassWriter::writeData(CArray<double,1>(lon.copy()), lonid, isCollective, 0);
                        break;
@@ -365,6 +357,6 @@
               case (ONE_FILE) :
               {
-                 SuperClassWriter::addDimension(dimXid, domain->global_zoom_ni);
-                 SuperClassWriter::addDimension(dimYid, domain->global_zoom_nj);
+                SuperClassWriter::addDimension(dimXid, domain->ni_glo);
+                SuperClassWriter::addDimension(dimYid, domain->nj_glo);
 
                  if (domain->hasBounds)
@@ -441,7 +433,7 @@
                      else
                      {
-                       start[1]=domain->zoom_ibegin-domain->global_zoom_ibegin;
-                       start[0]=domain->zoom_jbegin-domain->global_zoom_jbegin;
-                       count[1]=domain->zoom_ni ; count[0]=domain->zoom_nj ;
+                       start[1]=domain->ibegin;
+                       start[0]=domain->jbegin;
+                       count[1]=domain->ni ; count[0]=domain->nj ;
                      }
 
@@ -468,12 +460,12 @@
                        else
                        { 
-                         start[0]=domain->zoom_jbegin-domain->global_zoom_jbegin;
-                         count[0]=domain->zoom_nj;                         
-                         CArray<double,1> lat = writtenLat(Range(fromStart,toEnd,domain->zoom_ni));
+                         start[0]=domain->jbegin;
+                         count[0]=domain->nj;
+                         CArray<double,1> lat = writtenLat(Range(fromStart,toEnd,domain->ni));
                          SuperClassWriter::writeData(CArray<double,1>(lat.copy()), latid, isCollective, 0,&start,&count);
 
-                         start[0]=domain->zoom_ibegin-domain->global_zoom_ibegin;
-                         count[0]=domain->zoom_ni;                         
-                         CArray<double,1> lon = writtenLon(Range(0,domain->zoom_ni-1));
+                         start[0]=domain->ibegin;
+                         count[0]=domain->ni;
+                         CArray<double,1> lon = writtenLon(Range(0,domain->ni-1));
                          SuperClassWriter::writeData(CArray<double,1>(lon.copy()), lonid, isCollective, 0,&start,&count);
                        }
@@ -495,9 +487,9 @@
                    {
                      start[2] = 0;
-                     start[1] = domain->zoom_ibegin - domain->global_zoom_ibegin;
-                     start[0] = domain->zoom_jbegin - domain->global_zoom_jbegin;
+                     start[1] = domain->ibegin;
+                     start[0] = domain->jbegin;
                      count[2] = domain->nvertex;
-                     count[1] = domain->zoom_ni;
-                     count[0] = domain->zoom_nj;
+                     count[1] = domain->ni;
+                     count[0] = domain->nj;
                    }
                  
@@ -518,8 +510,8 @@
                    else
                    {
-                     start[1] = domain->zoom_ibegin - domain->global_zoom_ibegin;
-                     start[0] = domain->zoom_jbegin - domain->global_zoom_jbegin;
-                     count[1] = domain->zoom_ni;
-                     count[0] = domain->zoom_nj;
+                     start[1] = domain->ibegin;
+                     start[0] = domain->jbegin;
+                     count[1] = domain->ni;
+                     count[0] = domain->nj;
                    }
                    
@@ -786,6 +778,6 @@
                else
                {
-                 startNodes[0] = domain->zoom_ibegin-domain->global_zoom_ibegin;
-                 countNodes[0] = domain->zoom_ni ;
+                 startNodes[0] = domain->ibegin;
+                 countNodes[0] = domain->ni ;
                }
 
@@ -809,11 +801,11 @@
                else
                {
-                 startEdges[0] = domain->zoom_ibegin-domain->global_zoom_ibegin;
-                 countEdges[0] = domain->zoom_ni;
+                 startEdges[0] = domain->ibegin;
+                 countEdges[0] = domain->ni;
                  startNodes[0] = domain->mesh->node_start;
                  countNodes[0] = domain->mesh->node_count;
-                 startEdgeNodes[0] = domain->zoom_ibegin-domain->global_zoom_ibegin;
+                 startEdgeNodes[0] = domain->ibegin;
                  startEdgeNodes[1] = 0;
-                 countEdgeNodes[0] = domain->zoom_ni;
+                 countEdgeNodes[0] = domain->ni;
                  countEdgeNodes[1] = 2;
                }
@@ -845,6 +837,6 @@
                else
                {
-                 startFaces[0] = domain->zoom_ibegin-domain->global_zoom_ibegin;
-                 countFaces[0] = domain->zoom_ni ;
+                 startFaces[0] = domain->ibegin;
+                 countFaces[0] = domain->ni ;
                  startNodes[0] = domain->mesh->node_start;
                  countNodes[0] = domain->mesh->node_count;
@@ -859,7 +851,7 @@
                  countEdgeFaces[0] = domain->mesh->edge_count;
                  countEdgeFaces[1]= 2;
-                 startFaceConctv[0] = domain->zoom_ibegin-domain->global_zoom_ibegin;
+                 startFaceConctv[0] = domain->ibegin;
                  startFaceConctv[1] = 0;
-                 countFaceConctv[0] = domain->zoom_ni;
+                 countFaceConctv[0] = domain->ni;
                  countFaceConctv[1] = domain->nvertex;
                }
@@ -1017,5 +1009,5 @@
               {
                  dim0.push_back(dimXid);
-                 SuperClassWriter::addDimension(dimXid, domain->zoom_ni);
+                 SuperClassWriter::addDimension(dimXid, domain->ni);
 
                  lonid = lonName+appendDomid;
@@ -1130,9 +1122,9 @@
                  else
                  {
-                   start[0]=domain->zoom_ibegin - domain->global_zoom_ibegin;
-                   count[0]=domain->zoom_ni;
-                   startBounds[0]=domain->zoom_ibegin-domain->global_zoom_ibegin;
+                   start[0]=domain->ibegin;
+                   count[0]=domain->ni;
+                   startBounds[0]=domain->ibegin;
                    startBounds[1]=0 ;
-                   countBounds[0]=domain->zoom_ni;
+                   countBounds[0]=domain->ni;
                    countBounds[1]=nvertex ;
                  }
@@ -1188,6 +1180,4 @@
         int zoom_count = axis->zoom_n;                                                 
         int zoom_begin = axis->zoom_begin;
-        // int zoom_begin = (MULTI_FILE == SuperClass::type) ? axis->global_zoom_begin 
-        //                                                   : axis->zoom_begin;
 
         if ((0 == axis->zoom_n) && (MULTI_FILE == SuperClass::type)) return;
@@ -2512,6 +2502,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 +2507,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);
@@ -2530,7 +2516,4 @@
               case (ONE_FILE) :
               {
-                const std::vector<int>& nZoomBeginGlobal = grid->getDistributionServer()->getZoomBeginGlobal();
-                const std::vector<int>& nZoomBeginServer = grid->getDistributionServer()->getZoomBeginServer();
-                const std::vector<int>& nZoomSizeServer  = grid->getDistributionServer()->getZoomSizeServer();
 
                 std::vector<StdSize> start, count;
@@ -2550,9 +2533,8 @@
                     int numElement = axisDomainOrder.numElements();
                     int idxDomain = domainList.size() - 1, idxAxis = axisList.size() - 1;
-                    int idx = nZoomBeginGlobal.size() - 1;
-
-                    start.reserve(nZoomBeginGlobal.size());
-                    count.reserve(nZoomBeginGlobal.size());
-
+                    int idx = domainList.size() * 2 + axisList.size() - 1;
+
+                    start.reserve(idx+1);
+                    count.reserve(idx+1);
 
                     for (int i = numElement - 1; i >= 0; --i)
@@ -2572,10 +2554,10 @@
                           if ((domain->type) != CDomain::type_attr::unstructured)
                           {
-                            start.push_back(nZoomBeginServer[idx] - nZoomBeginGlobal[idx]);
-                            count.push_back(nZoomSizeServer[idx]);
+                            start.push_back(domain->jbegin);
+                            count.push_back(domain->nj);
                           }
                           --idx;
-                          start.push_back(nZoomBeginServer[idx] - nZoomBeginGlobal[idx]);
-                          count.push_back(nZoomSizeServer[idx]);
+                          start.push_back(domain->ibegin);
+                          count.push_back(domain->ni);
                           --idx;
                         }
@@ -2593,8 +2575,7 @@
                         else
                         {
-                          start.push_back(nZoomBeginServer[idx] - nZoomBeginGlobal[idx]);
-                          count.push_back(nZoomSizeServer[idx]);
+                          start.push_back(axis->begin);
+                          count.push_back(axis->n);
                         }
-
                         --idxAxis;
                         --idx;
@@ -2610,8 +2591,8 @@
                   int numElement = axisDomainOrder.numElements();
                   int idxDomain = domainList.size() - 1, idxAxis = axisList.size() - 1;
-                  int idx = domainList.size() * 2 + axisList.size() - 1;// nZoomBeginGlobal.size() - 1;
-
-                  start.reserve(nZoomBeginGlobal.size());
-                  count.reserve(nZoomBeginGlobal.size());
+                  int idx = domainList.size() * 2 + axisList.size() - 1;
+
+                  start.reserve(idx+1);
+                  count.reserve(idx+1);
 
                   for (int i = numElement - 1; i >= 0; --i)
@@ -2622,11 +2603,11 @@
                       if ((domain->type) != CDomain::type_attr::unstructured)
                       {
-                        start.push_back(domain->zoom_jbegin - domain->global_zoom_jbegin);
-                        count.push_back(domain->zoom_nj);
+                        start.push_back(domain->jbegin);
+                        count.push_back(domain->nj);
                       }
                       --idx ;
 
-                        start.push_back(domain->zoom_ibegin - domain->global_zoom_ibegin);
-                        count.push_back(domain->zoom_ni);
+                        start.push_back(domain->ibegin);
+                        count.push_back(domain->ni);
                       --idx ;
                       --idxDomain;
@@ -2662,6 +2643,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 +2648,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/trunk/src/node/domain.cpp
===================================================================
--- /XIOS/trunk/src/node/domain.cpp	(revision 1552)
+++ /XIOS/trunk/src/node/domain.cpp	(revision 1553)
@@ -30,8 +30,8 @@
       , hasBounds(false), hasArea(false), isCompressible_(false), isUnstructed_(false)
       , isClientAfterTransformationChecked(false), hasLonLat(false)
-      , isRedistributed_(false), hasPole(false), doZoomByIndex_(false)
+      , isRedistributed_(false), hasPole(false)
       , lonvalue(), latvalue(), bounds_lonvalue(), bounds_latvalue()
       , globalLocalIndexMap_(), computedWrittenIndex_(false)
-	  , clients()
+      , clients()
    {
    }
@@ -42,8 +42,8 @@
       , hasBounds(false), hasArea(false), isCompressible_(false), isUnstructed_(false)
       , isClientAfterTransformationChecked(false), hasLonLat(false)
-      , isRedistributed_(false), hasPole(false), doZoomByIndex_(false)
+      , isRedistributed_(false), hasPole(false)
       , lonvalue(), latvalue(), bounds_lonvalue(), bounds_latvalue()
       , globalLocalIndexMap_(), computedWrittenIndex_(false)
-	  , clients()
+      , clients()
    {
     }
@@ -185,6 +185,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()));
    }
 
@@ -866,31 +865,9 @@
          for (int i = 0; i < ni; ++i) j_index(i+j*ni) = j+jbegin;
      }
-     
-     checkZoom();
-   }
-
-   // Check global zoom of a domain
-   // If there is no zoom defined for the domain, zoom will have value of global doamin
-   void CDomain::checkZoom(void)
-   {
-     if (global_zoom_ibegin.isEmpty())
-      global_zoom_ibegin.setValue(0);
-     if (global_zoom_ni.isEmpty())
-      global_zoom_ni.setValue(ni_glo);
-     if (global_zoom_jbegin.isEmpty())
-      global_zoom_jbegin.setValue(0);
-     if (global_zoom_nj.isEmpty())
-      global_zoom_nj.setValue(nj_glo);
-    if (zoom_i_index.isEmpty()) zoom_i_index.setValue(i_index.getValue());
-    if (zoom_j_index.isEmpty()) zoom_j_index.setValue(j_index.getValue());
-    if (zoom_ibegin.isEmpty()) zoom_ibegin.setValue(ibegin);
-    if (zoom_ni.isEmpty()) zoom_ni.setValue(ni);
-    if (zoom_jbegin.isEmpty()) zoom_jbegin.setValue(jbegin);
-    if (zoom_nj.isEmpty()) zoom_nj.setValue(nj);
    }
 
    size_t CDomain::getGlobalWrittenSize(void)
    {
-      return global_zoom_ni*global_zoom_nj ;
+     return ni_glo*nj_glo ;
    }
    //----------------------------------------------------------------
@@ -1738,151 +1715,82 @@
         if (indSrv_.find(nbServer) == indSrv_.end())
         {
-          int i,j,i_ind,j_ind, nbIndex, nbIndexZoom;
-          int global_zoom_iend=global_zoom_ibegin+global_zoom_ni-1;
-          int global_zoom_jend=global_zoom_jbegin+global_zoom_nj-1;
-
-           // Precompute number of index
-           int globalIndexCountZoom = 0;
-           nbIndex = i_index.numElements();
-
-           if (doZoomByIndex_)
-           {
-             globalIndexCountZoom = zoom_i_index.numElements();
-           }
-           else
-           {
-             for (i = 0; i < nbIndex; ++i)
-             {
-               i_ind=i_index(i);
-               j_ind=j_index(i);
-
-               if (i_ind >= global_zoom_ibegin && i_ind <= global_zoom_iend && j_ind >= global_zoom_jbegin && j_ind <= global_zoom_jend)
-               {
-                  ++globalIndexCountZoom;
-               }
-             }
-           }
-
-           // Fill in index
-           CArray<size_t,1> globalIndexDomainZoom(globalIndexCountZoom);
-           CArray<size_t,1> localIndexDomainZoom(globalIndexCountZoom);
-           CArray<size_t,1> globalIndexDomain(nbIndex);
-           size_t globalIndex;
-           int globalIndexCount = 0;
-
-           for (i = 0; i < nbIndex; ++i)
-           {
-             i_ind=i_index(i);
-             j_ind=j_index(i);
-             globalIndex = i_ind + j_ind * ni_glo;
-             globalIndexDomain(i) = globalIndex;
-           }
-
-           if (globalLocalIndexMap_.empty())
-           {
-             for (i = 0; i < nbIndex; ++i)
-               globalLocalIndexMap_[globalIndexDomain(i)] = i;
-           }
-
-           globalIndexCountZoom = 0;
-           if (doZoomByIndex_)
-           {
-             int nbIndexZoom = zoom_i_index.numElements();
-
-             for (i = 0; i < nbIndexZoom; ++i)
-             {
-               i_ind=zoom_i_index(i);
-               j_ind=zoom_j_index(i);
-               globalIndex = i_ind + j_ind * ni_glo;
-               globalIndexDomainZoom(globalIndexCountZoom) = globalIndex;
-               ++globalIndexCountZoom;
-             }
-           }
-           else
-           {
-             int global_zoom_iend=global_zoom_ibegin+global_zoom_ni-1;
-             int global_zoom_jend=global_zoom_jbegin+global_zoom_nj-1;
-             for (i = 0; i < nbIndex; ++i)
-             {
-               i_ind=i_index(i);
-               j_ind=j_index(i);
-               globalIndex = i_ind + j_ind * ni_glo;
-               if (i_ind >= global_zoom_ibegin && i_ind <= global_zoom_iend && j_ind >= global_zoom_jbegin && j_ind <= global_zoom_jend)
-               {
-                  globalIndexDomainZoom(globalIndexCountZoom) = globalIndex;
-                  ++globalIndexCountZoom;
-               }
-             }
-
-             int iend = ibegin + ni -1;
-             int jend = jbegin + nj -1;
-             zoom_ibegin = global_zoom_ibegin > ibegin ? global_zoom_ibegin.getValue() : ibegin;
-             int zoom_iend  = global_zoom_iend < iend ? zoom_iend : iend ;
-             zoom_ni     = zoom_iend-zoom_ibegin+1 ;
-
-             zoom_jbegin = global_zoom_jbegin > jbegin ? global_zoom_jbegin.getValue() : jbegin ;
-             int zoom_jend   = global_zoom_jend < jend ? zoom_jend : jend;
-             zoom_nj     = zoom_jend-zoom_jbegin+1;
-           }
-
-           size_t globalSizeIndex = 1, indexBegin, indexEnd;
-           int range, clientSize = client->clientSize;
-           std::vector<int> nGlobDomain(2);
-           nGlobDomain[0] = this->ni_glo;
-           nGlobDomain[1] = this->nj_glo;
-           for (int i = 0; i < nGlobDomain.size(); ++i) globalSizeIndex *= nGlobDomain[i];
-           indexBegin = 0;
-           if (globalSizeIndex <= clientSize)
-           {
-             indexBegin = rank%globalSizeIndex;
-             indexEnd = indexBegin;
-           }
-           else
-           {
-             for (int i = 0; i < clientSize; ++i)
-             {
-               range = globalSizeIndex / clientSize;
-               if (i < (globalSizeIndex%clientSize)) ++range;
-               if (i == client->clientRank) break;
-               indexBegin += range;
-             }
-             indexEnd = indexBegin + range - 1;
-           }
-
-           // Even if servers have no index, they must received something from client
-           // We only use several client to send "empty" message to these servers
-           CServerDistributionDescription serverDescription(nGlobDomain, nbServer);
-           std::vector<int> serverZeroIndex;
-           if (isUnstructed_) serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t&,size_t&>(indexBegin, indexEnd), 0);
-           else serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t&,size_t&>(indexBegin, indexEnd), 1);
-
-           std::list<int> serverZeroIndexLeader;
-           std::list<int> serverZeroIndexNotLeader;
-           CContextClient::computeLeader(client->clientRank, client->clientSize, serverZeroIndex.size(), serverZeroIndexLeader, serverZeroIndexNotLeader);
-           for (std::list<int>::iterator it = serverZeroIndexLeader.begin(); it != serverZeroIndexLeader.end(); ++it)
-              *it = serverZeroIndex[*it];
-
-           CClientServerMapping* clientServerMap = new CClientServerMappingDistributed(serverDescription.getGlobalIndexRange(),
-                 client->intraComm);
-           clientServerMap->computeServerIndexMapping(globalIndexDomain, nbServer);
-           CClientServerMapping::GlobalIndexMap& globalIndexDomainOnServer = clientServerMap->getGlobalIndexOnServer();
-
-           CClientServerMapping::GlobalIndexMap::const_iterator it  = globalIndexDomainOnServer.begin(),
+          int i,j,i_ind,j_ind, nbIndex=i_index.numElements();
+          int globalIndexCount = i_index.numElements();
+          // Fill in index
+          CArray<size_t,1> globalIndexDomain(nbIndex);
+          size_t globalIndex;
+
+          for (i = 0; i < nbIndex; ++i)
+          {
+            i_ind=i_index(i);
+            j_ind=j_index(i);
+            globalIndex = i_ind + j_ind * ni_glo;
+            globalIndexDomain(i) = globalIndex;
+          }
+
+          if (globalLocalIndexMap_.empty())
+          {
+            for (i = 0; i < nbIndex; ++i)
+              globalLocalIndexMap_[globalIndexDomain(i)] = i;
+          }
+
+          size_t globalSizeIndex = 1, indexBegin, indexEnd;
+          int range, clientSize = client->clientSize;
+          std::vector<int> nGlobDomain(2);
+          nGlobDomain[0] = this->ni_glo;
+          nGlobDomain[1] = this->nj_glo;
+          for (int i = 0; i < nGlobDomain.size(); ++i) globalSizeIndex *= nGlobDomain[i];
+          indexBegin = 0;
+          if (globalSizeIndex <= clientSize)
+          {
+            indexBegin = rank%globalSizeIndex;
+            indexEnd = indexBegin;
+          }
+          else
+          {
+            for (int i = 0; i < clientSize; ++i)
+            {
+              range = globalSizeIndex / clientSize;
+              if (i < (globalSizeIndex%clientSize)) ++range;
+              if (i == client->clientRank) break;
+              indexBegin += range;
+            }
+            indexEnd = indexBegin + range - 1;
+          }
+
+          // Even if servers have no index, they must received something from client
+          // We only use several client to send "empty" message to these servers
+          CServerDistributionDescription serverDescription(nGlobDomain, nbServer);
+          std::vector<int> serverZeroIndex;
+          if (isUnstructed_) serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t&,size_t&>(indexBegin, indexEnd), 0);
+          else serverZeroIndex = serverDescription.computeServerGlobalIndexInRange(std::make_pair<size_t&,size_t&>(indexBegin, indexEnd), 1);
+
+          std::list<int> serverZeroIndexLeader;
+          std::list<int> serverZeroIndexNotLeader;
+          CContextClient::computeLeader(client->clientRank, client->clientSize, serverZeroIndex.size(), serverZeroIndexLeader, serverZeroIndexNotLeader);
+          for (std::list<int>::iterator it = serverZeroIndexLeader.begin(); it != serverZeroIndexLeader.end(); ++it)
+            *it = serverZeroIndex[*it];
+
+          CClientServerMapping* clientServerMap = new CClientServerMappingDistributed(serverDescription.getGlobalIndexRange(), client->intraComm);
+          clientServerMap->computeServerIndexMapping(globalIndexDomain, nbServer);
+          CClientServerMapping::GlobalIndexMap& globalIndexDomainOnServer = clientServerMap->getGlobalIndexOnServer();
+
+          CClientServerMapping::GlobalIndexMap::const_iterator it  = globalIndexDomainOnServer.begin(),
                  ite = globalIndexDomainOnServer.end();
-           indSrv_[nbServer].swap(globalIndexDomainOnServer);
-           connectedServerRank_[nbServer].clear();
-           for (it = indSrv_[nbServer].begin(); it != ite; ++it)
-             connectedServerRank_[nbServer].push_back(it->first);
-
-           for (std::list<int>::const_iterator it = serverZeroIndexLeader.begin(); it != serverZeroIndexLeader.end(); ++it)
-              connectedServerRank_[nbServer].push_back(*it);
-
-           // Even if a client has no index, it must connect to at least one server and
-           // send an "empty" data to this server
-           if (connectedServerRank_[nbServer].empty())
-              connectedServerRank_[nbServer].push_back(client->clientRank % client->serverSize);
-
-           nbSenders[nbServer] = clientServerMap->computeConnectedClients(client->serverSize, client->clientSize, client->intraComm, connectedServerRank_[nbServer]);
-           delete clientServerMap;
+          indSrv_[nbServer].swap(globalIndexDomainOnServer);
+          connectedServerRank_[nbServer].clear();
+          for (it = indSrv_[nbServer].begin(); it != ite; ++it)
+            connectedServerRank_[nbServer].push_back(it->first);
+
+          for (std::list<int>::const_iterator it = serverZeroIndexLeader.begin(); it != serverZeroIndexLeader.end(); ++it)
+            connectedServerRank_[nbServer].push_back(*it);
+
+          // Even if a client has no index, it must connect to at least one server and
+          // send an "empty" data to this server
+          if (connectedServerRank_[nbServer].empty())
+            connectedServerRank_[nbServer].push_back(client->clientRank % client->serverSize);
+
+          nbSenders[nbServer] = clientServerMap->computeConnectedClients(client->serverSize, client->clientSize, client->intraComm, connectedServerRank_[nbServer]);
+          delete clientServerMap;
         }
       }
@@ -1904,6 +1812,6 @@
 
       std::vector<int> nBegin(2), nSize(2), nBeginGlobal(2), nGlob(2);
-      nBegin[0]       = zoom_ibegin;  nBegin[1] = zoom_jbegin;
-      nSize[0]        = zoom_ni;      nSize[1]  = zoom_nj;
+      nBegin[0]       = ibegin;  nBegin[1] = jbegin;
+      nSize[0]        = ni;      nSize[1]  = nj;
       nBeginGlobal[0] = 0; nBeginGlobal[1] = 0;
       nGlob[0]        = ni_glo;   nGlob[1] = nj_glo;
@@ -2005,6 +1913,6 @@
 
       std::vector<int> nBegin(2), nSize(2), nBeginGlobal(2), nGlob(2);
-      nBegin[0]       = zoom_ibegin;  nBegin[1] = zoom_jbegin;
-      nSize[0]        = zoom_ni;      nSize[1]  = zoom_nj;
+      nBegin[0]       = ibegin;  nBegin[1] = jbegin;
+      nSize[0]        = ni;      nSize[1]  = nj;
       nBeginGlobal[0] = 0; nBeginGlobal[1] = 0;
       nGlob[0]        = ni_glo;   nGlob[1] = nj_glo;
@@ -2075,6 +1983,5 @@
 
   /*!
-    Send global index and zoom index from client to connected client(s)
-    zoom index can be smaller than global index
+    Send global index from client to connected client(s)
   */
   void CDomain::sendIndex()
@@ -2090,5 +1997,5 @@
 
       list<CMessage> list_msgsIndex;
-      list<CArray<int,1> > list_indZoom, list_writtenInd, list_indGlob;
+      list<CArray<int,1> > list_indGlob;
 
       std::unordered_map<int, vector<size_t> >::const_iterator itIndex, iteIndex;
@@ -2164,5 +2071,5 @@
           msg << isUnstructed_;
           msg << ni_srv << ibegin_srv << nj_srv << jbegin_srv;
-          msg << global_zoom_ni.getValue() << global_zoom_ibegin.getValue() << global_zoom_nj.getValue() << global_zoom_jbegin.getValue();        
+          msg << ni_glo.getValue() << nj_glo.getValue();
           msg << isCompressible_;
 
@@ -2584,5 +2491,5 @@
 
   /*!
-    Receive attributes from client(s): zoom info and begin and n of each server
+    Receive attributes from client(s)
     \param[in] rank rank of client source
     \param[in] buffer message containing attributes info
@@ -2591,36 +2498,15 @@
   {
     int ni_tmp, ibegin_tmp, nj_tmp, jbegin_tmp;
-    int global_zoom_ni_tmp, global_zoom_ibegin_tmp, global_zoom_nj_tmp, global_zoom_jbegin_tmp;
+    int ni_glo_tmp, nj_glo_tmp;
     buffer >> isUnstructed_ >> ni_tmp >> ibegin_tmp >> nj_tmp >> jbegin_tmp
-           >> global_zoom_ni_tmp >> global_zoom_ibegin_tmp >> global_zoom_nj_tmp >> global_zoom_jbegin_tmp           
+           >> ni_glo_tmp >> nj_glo_tmp
            >> isCompressible_;
+
     ni.setValue(ni_tmp);
     ibegin.setValue(ibegin_tmp);
     nj.setValue(nj_tmp);
     jbegin.setValue(jbegin_tmp);
-
-    global_zoom_ni.setValue(global_zoom_ni_tmp);
-    global_zoom_ibegin.setValue(global_zoom_ibegin_tmp);
-    global_zoom_nj.setValue(global_zoom_nj_tmp);
-    global_zoom_jbegin.setValue(global_zoom_jbegin_tmp);
-
-    int iend = ibegin + ni  - 1;
-    int jend = jbegin + nj  - 1;
-    int zoom_iend_glob = global_zoom_ibegin + global_zoom_ni - 1;
-    int zoom_jend_glob = global_zoom_jbegin + global_zoom_nj - 1;
-
-    zoom_ibegin.setValue(global_zoom_ibegin > ibegin ? global_zoom_ibegin.getValue() : ibegin);
-    int zoom_iend = zoom_iend_glob < iend ? zoom_iend_glob : iend ;
-    zoom_ni.setValue(zoom_iend-zoom_ibegin+1);
-
-    zoom_jbegin.setValue(global_zoom_jbegin > jbegin ? global_zoom_jbegin.getValue() : jbegin);
-    int zoom_jend = zoom_jend_glob < jend ? zoom_jend_glob : jend ;
-    zoom_nj.setValue(zoom_jend-zoom_jbegin+1);
-
-    if (zoom_ni<=0 || zoom_nj<=0)
-    {
-      zoom_ni=0 ; zoom_ibegin=global_zoom_ibegin ; //=0; zoom_iend=0 ; 
-      zoom_nj=0 ; zoom_jbegin=global_zoom_jbegin ; //=0; zoom_jend=0 ;
-    }
+    ni_glo.setValue(ni_glo_tmp);
+    nj_glo.setValue(nj_glo_tmp);
 
   }
Index: /XIOS/trunk/src/node/domain.hpp
===================================================================
--- /XIOS/trunk/src/node/domain.hpp	(revision 1552)
+++ /XIOS/trunk/src/node/domain.hpp	(revision 1553)
@@ -165,5 +165,4 @@
          void checkArea(void);
          void checkLonLat();
-         void checkZoom(void);
 
          void setTransformations(const TransMapTypes&);         
@@ -183,5 +182,4 @@
          static void recvDistributionAttributes(CEventServer& event);
          static void recvIndex(CEventServer& event);
-         static void recvIndexZoom(CEventServer& event);
          static void recvMask(CEventServer& event);         
          static void recvLon(CEventServer& event);
@@ -206,5 +204,4 @@
          std::set<CContextClient*> clientsSet;
 
-         bool doZoomByIndex_;
          bool isChecked, computedWrittenIndex_;
          std::set<StdString> relFiles, relFilesCompressed;
Index: /XIOS/trunk/src/node/grid.cpp
===================================================================
--- /XIOS/trunk/src/node/grid.cpp	(revision 1552)
+++ /XIOS/trunk/src/node/grid.cpp	(revision 1553)
@@ -1632,5 +1632,5 @@
           std::vector<CAxis*> axisList = getAxis();
           std::vector<int> nZoomBegin(ssize), nZoomSize(ssize), nGlob(ssize), nZoomBeginGlobal(ssize), nGlobElement(numElement);
-          std::vector<CArray<int,1> > globalZoomIndex(numElement);
+          std::vector<CArray<int,1> > globalZoomIndex(numElement);  // RENAME INTO globalIndex
           for (int i = 0; i < numElement; ++i)
           {
@@ -1638,12 +1638,12 @@
             if (2 == axis_domain_order(i)) //domain
             {
-              nZoomBegin[indexMap[i]] = domainList[domainId]->zoom_ibegin;
-              nZoomSize[indexMap[i]]  = domainList[domainId]->zoom_ni;
-              nZoomBeginGlobal[indexMap[i]] = domainList[domainId]->global_zoom_ibegin;              
+              nZoomBegin[indexMap[i]] = domainList[domainId]->ibegin;
+              nZoomSize[indexMap[i]]  = domainList[domainId]->ni;
+              nZoomBeginGlobal[indexMap[i]] = 0;
               nGlob[indexMap[i]] = domainList[domainId]->ni_glo;
 
-              nZoomBegin[indexMap[i] + 1] = domainList[domainId]->zoom_jbegin;
-              nZoomSize[indexMap[i] + 1] = domainList[domainId]->zoom_nj;
-              nZoomBeginGlobal[indexMap[i] + 1] = domainList[domainId]->global_zoom_jbegin;              
+              nZoomBegin[indexMap[i] + 1] = domainList[domainId]->jbegin;
+              nZoomSize[indexMap[i] + 1] = domainList[domainId]->nj;
+              nZoomBeginGlobal[indexMap[i] + 1] = 0;
               nGlob[indexMap[i] + 1] = domainList[domainId]->nj_glo;
 
Index: /XIOS/trunk/src/transformation/domain_algorithm_expand.cpp
===================================================================
--- /XIOS/trunk/src/transformation/domain_algorithm_expand.cpp	(revision 1552)
+++ /XIOS/trunk/src/transformation/domain_algorithm_expand.cpp	(revision 1553)
@@ -228,6 +228,4 @@
   domainDestination->ni.setValue(niDst);
   domainDestination->nj.setValue(njDst);
-  domainDestination->global_zoom_ni.setValue(domainSource->global_zoom_ni+2);
-  domainDestination->global_zoom_nj.setValue(domainSource->global_zoom_nj+2);
 
   CArray<bool,1>& mask_1d_dst = domainDestination->domainMask;
Index: /XIOS/trunk/src/transformation/domain_algorithm_extract.cpp
===================================================================
--- /XIOS/trunk/src/transformation/domain_algorithm_extract.cpp	(revision 1552)
+++ /XIOS/trunk/src/transformation/domain_algorithm_extract.cpp	(revision 1553)
@@ -140,9 +140,4 @@
   }
   if (domainSrc_->hasArea) domainDest_->area.resize(niDest,njDest);
-
-  domainDest_->global_zoom_ni.setValue(extractNi_);
-  domainDest_->global_zoom_ibegin.setValue(0);
-  domainDest_->global_zoom_nj.setValue(extractNj_);
-  domainDest_->global_zoom_jbegin.setValue(0);
 
   this->transformationMapping_.resize(1);
Index: /XIOS/trunk/src/transformation/domain_algorithm_zoom.cpp
===================================================================
--- /XIOS/trunk/src/transformation/domain_algorithm_zoom.cpp	(revision 1552)
+++ /XIOS/trunk/src/transformation/domain_algorithm_zoom.cpp	(revision 1553)
@@ -1,10 +1,2 @@
-/*!
-   \file domain_algorithm_zoom.cpp
-   \author Ha NGUYEN
-   \since 02 Jul 2015
-   \date 02 Jul 2015
-
-   \brief Algorithm for zooming on an domain.
- */
 #include "domain_algorithm_zoom.hpp"
 #include "zoom_domain.hpp"
@@ -12,4 +4,5 @@
 #include "grid.hpp"
 #include "grid_transformation_factory_impl.hpp"
+#include "attribute_template.hpp"
 
 namespace xios {
@@ -67,4 +60,163 @@
            << "Zoom size is " << zoomNj_ );
   }
+
+  // Calculate the size of local domain
+  int ind, indLocSrc, indLocDest, iIdxSrc, jIdxSrc, destIBegin = -1, destJBegin = -1, niDest = 0, njDest = 0, ibeginDest, jbeginDest ;
+  int indGloDest, indGloSrc, niGloSrc = domainSrc_->ni_glo, iSrc, jSrc;
+  for (int j = 0; j < domainSrc_->nj.getValue(); j++)
+  {
+    for (int i = 0; i < domainSrc_->ni.getValue(); i++)
+    {
+      ind = j*domainSrc_->ni + i;
+      iIdxSrc = domainSrc_->i_index(ind);
+      if ((iIdxSrc >= zoomIBegin_) && (iIdxSrc <= zoomIEnd_))
+      {
+        jIdxSrc = domainSrc_->j_index(ind);
+        if ((jIdxSrc >= zoomJBegin_) && (jIdxSrc <= zoomJEnd_))
+        {
+          if ((niDest == 0) && (njDest == 0))
+          {
+            destIBegin = i;
+            destJBegin = j;
+          }
+          if (i == destIBegin) ++njDest;
+        }
+        if (j == destJBegin) ++niDest;
+
+      }
+    }
+  }
+  ibeginDest = destIBegin + domainSrc_->ibegin - zoomIBegin_;
+  jbeginDest = destJBegin + domainSrc_->jbegin - zoomJBegin_;
+  domainDest_->ni_glo.setValue(zoomNi_);
+  domainDest_->nj_glo.setValue(zoomNj_);
+  domainDest_->ni.setValue(niDest);
+  domainDest_->nj.setValue(njDest);
+  domainDest_->ibegin.setValue(ibeginDest);
+  domainDest_->jbegin.setValue(jbeginDest);
+  domainDest_->i_index.resize(niDest*njDest);
+  domainDest_->j_index.resize(niDest*njDest);
+
+  domainDest_->data_ni.setValue(niDest);
+  domainDest_->data_nj.setValue(njDest);
+  domainDest_->data_ibegin.setValue(0);  // local position
+  domainDest_->data_jbegin.setValue(0);  // local position
+  domainDest_->data_i_index.resize(niDest*njDest); // local position
+  domainDest_->data_j_index.resize(niDest*njDest); // local position
+
+  domainDest_->domainMask.resize(niDest*njDest);
+
+  if (!domainSrc_->lonvalue_1d.isEmpty())
+  {
+    if (domainDest_->type == CDomain::type_attr::rectilinear)
+    {
+      domainDest_->lonvalue_1d.resize(niDest);
+      domainDest_->latvalue_1d.resize(njDest);
+    }
+    else if (domainDest_->type == CDomain::type_attr::unstructured)
+    {
+      domainDest_->lonvalue_1d.resize(niDest);
+      domainDest_->latvalue_1d.resize(niDest);
+    }
+  }
+  else if (!domainSrc_->lonvalue_2d.isEmpty())
+  {
+    domainDest_->lonvalue_2d.resize(niDest,njDest);
+    domainDest_->latvalue_2d.resize(niDest,njDest);
+  }
+
+  if (domainSrc_->hasBounds)
+  {
+    if (!domainSrc_->bounds_lon_2d.isEmpty())
+    {
+      domainDest_->bounds_lon_2d.resize(domainDest_->nvertex, niDest, njDest);
+      domainDest_->bounds_lon_2d.resize(domainDest_->nvertex, niDest, njDest);
+    }
+    else if (!domainSrc_->bounds_lon_1d.isEmpty())
+    {
+      domainDest_->bounds_lon_1d.resize(domainDest_->nvertex, niDest);
+      domainDest_->bounds_lon_1d.resize(domainDest_->nvertex, niDest);
+    }
+  }
+  if (domainSrc_->hasArea) domainDest_->area.resize(niDest,njDest);
+
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  for (int iDest = 0; iDest < niDest; iDest++)
+  {
+    iSrc = iDest + destIBegin;
+    for (int jDest = 0; jDest < njDest; jDest++)
+    {
+      jSrc = jDest + destJBegin;
+      ind = jSrc * domainSrc_->ni + iSrc;
+      iIdxSrc = domainSrc_->i_index(ind);
+      jIdxSrc = domainSrc_->j_index(ind);
+      indLocDest = jDest*niDest + iDest;
+      indGloDest = (jDest + jbeginDest)*zoomNi_ + (iDest + ibeginDest);
+      indLocSrc = (jDest+destJBegin)*domainSrc_->ni + (iDest+destIBegin);
+      indGloSrc = (jIdxSrc )* niGloSrc + iIdxSrc;
+      domainDest_->i_index(indLocDest) = iDest + ibeginDest;                                             // i_index contains global positions
+      domainDest_->j_index(indLocDest) = jDest + jbeginDest;                                             // i_index contains global positions
+      domainDest_->data_i_index(indLocDest) = (domainSrc_->data_dim == 1) ? indLocDest : iDest;          // data_i_index contains local positions
+      domainDest_->data_j_index(indLocDest) = (domainSrc_->data_dim == 1) ? 0 :jDest;                    // data_i_index contains local positions
+      domainDest_->domainMask(indLocDest) = domainSrc_->domainMask(indLocSrc);
+
+      if (domainSrc_->hasArea)
+        domainDest_->area(iDest,jDest) = domainSrc_->area(iSrc,jSrc);
+
+      if (domainSrc_->hasBounds)
+      {
+        if (!domainSrc_->bounds_lon_2d.isEmpty())
+        {
+          for (int n = 0; n < domainSrc_->nvertex; ++n)
+          {
+            domainDest_->bounds_lon_2d(n,iDest,jDest) = domainSrc_->bounds_lon_2d(n,iSrc,jSrc);
+            domainDest_->bounds_lat_2d(n,iDest,jDest) = domainSrc_->bounds_lat_2d(n,iSrc,jSrc);
+          }
+        }
+        else if (!domainSrc_->bounds_lon_1d.isEmpty())
+        {
+          for (int n = 0; n < domainSrc_->nvertex; ++n)
+          {
+            domainDest_->bounds_lon_1d(n,iDest) = domainSrc_->bounds_lon_1d(n,iSrc);
+            domainDest_->bounds_lat_1d(n,iDest) = domainSrc_->bounds_lat_1d(n,iSrc);
+          }
+        }
+      }
+
+      if (domainSrc_->hasLonLat)
+      {
+        if (domainDest_->type == CDomain::type_attr::rectilinear)
+        {
+          domainDest_->latvalue_1d(jDest) = domainSrc_->latvalue_1d(jSrc);
+        }
+        else if (domainDest_->type == CDomain::type_attr::curvilinear)
+        {
+          domainDest_->lonvalue_2d(iDest,jDest) = domainSrc_->lonvalue_2d(iSrc,jSrc);
+          domainDest_->latvalue_2d(iDest,jDest) = domainSrc_->latvalue_2d(iSrc,jSrc);
+        }
+      }
+
+      transMap[indGloDest].push_back(indGloSrc);
+      transWeight[indGloDest].push_back(1.0);
+
+    }
+    if (domainSrc_->hasLonLat)
+    {
+      if (domainDest_->type == CDomain::type_attr::unstructured)
+      {
+        domainDest_->lonvalue_1d(iDest) = domainSrc_->lonvalue_1d(iSrc);
+        domainDest_->latvalue_1d(iDest) = domainSrc_->latvalue_1d(iSrc);
+      }
+      else if (domainDest_->type == CDomain::type_attr::rectilinear)
+      {
+        domainDest_->lonvalue_1d(iDest) = domainSrc_->lonvalue_1d(iSrc);
+      }
+    }
+  }
+
 }
 
@@ -74,71 +226,6 @@
 void CDomainAlgorithmZoom::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
 {
-
-  int niGlob = domainSrc_->ni_glo.getValue();
-  int njGlob = domainSrc_->nj_glo.getValue();
-
-  this->transformationMapping_.resize(1);
-  this->transformationWeight_.resize(1);
-
-  TransformationIndexMap& transMap = this->transformationMapping_[0];
-  TransformationWeightMap& transWeight = this->transformationWeight_[0];
-
-  int domainGlobalIndex;
-  int iglob ;
-  int jglob ;
-  const CArray<int,1>& i_index = domainSrc_->i_index.getValue() ;
-  const CArray<int,1>& j_index = domainSrc_->j_index.getValue() ;
-
-  int nglo = i_index.numElements() ;
-  for (size_t i = 0; i < nglo ; ++i)
-  {
-    iglob=i_index(i) ; jglob=j_index(i) ;
-    if (iglob>=zoomIBegin_ && iglob<=zoomIEnd_ && jglob>=zoomJBegin_ && jglob<=zoomJEnd_)
-    {
-      domainGlobalIndex = jglob*niGlob + iglob;
-      transMap[domainGlobalIndex].push_back(domainGlobalIndex);
-      transWeight[domainGlobalIndex].push_back(1.0);
-    }
-  }
-  updateZoom();
-}
-
-/*!
-  After a zoom on domain, it should be certain that (global) zoom begin and (global) zoom size are updated
-*/
-void CDomainAlgorithmZoom::updateZoom()
-{
-  domainDest_->global_zoom_ibegin = zoomIBegin_;
-  domainDest_->global_zoom_jbegin = zoomJBegin_;
-  domainDest_->global_zoom_ni  = zoomNi_;
-  domainDest_->global_zoom_nj  = zoomNj_;
-}
-
-/*!
-  Update mask on domain
-  Because only zoomed region on domain is not masked, the remaining must be masked to make sure
-correct index be extracted
-*/
-// void CDomainAlgorithmZoom::updateDomainDestinationMask()
-// {
-//   int niMask     = domainDest_->ni.getValue();
-//   int iBeginMask = domainDest_->ibegin.getValue();
-//   int njMask     = domainDest_->nj.getValue();
-//   int jBeginMask = domainDest_->jbegin.getValue();
-//   int niGlob = domainDest_->ni_glo.getValue();
-//   int globalIndexMask = 0;
-
-//   TransformationIndexMap& transMap = this->transformationMapping_[0];
-//   TransformationIndexMap::const_iterator ite = (transMap).end();
-//   for (int j = 0; j < njMask; ++j)
-//   {
-//     for (int i = 0; i < niMask; ++i)
-//     {
-//       globalIndexMask = (j+jBeginMask) * niGlob + (i + iBeginMask);
-//       if (transMap.find(globalIndexMask) == ite)
-//         (domainDest_->mask_1d)(i+j*niMask) = false;
-//     }
-//   }
-// }
-
-}
+}
+
+
+}
Index: /XIOS/trunk/src/transformation/domain_algorithm_zoom.hpp
===================================================================
--- /XIOS/trunk/src/transformation/domain_algorithm_zoom.hpp	(revision 1552)
+++ /XIOS/trunk/src/transformation/domain_algorithm_zoom.hpp	(revision 1553)
@@ -1,10 +1,3 @@
-/*!
-   \file domain_algorithm_zoom.hpp
-   \author Ha NGUYEN
-   \since 03 June 2015
-   \date 12 June 2015
 
-   \brief Algorithm for zooming on an domain.
- */
 #ifndef __XIOS_DOMAIN_ALGORITHM_ZOOM_HPP__
 #define __XIOS_DOMAIN_ALGORITHM_ZOOM_HPP__
@@ -20,7 +13,5 @@
 /*!
   \class CDomainAlgorithmZoom
-  Implementing zoom on domain
-  A zoomed region can be considered as region that isnt masked.
-  Only this zoomed region is extracted to write on Netcdf.
+  Implementing zoom (alternative zoom) on domain
 */
 class CDomainAlgorithmZoom : public CDomainAlgorithmTransformation
@@ -33,8 +24,8 @@
   static bool registerTrans();
 protected:
+  void updateDomainAttributes();
   void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
 
 private:
-  // void updateDomainDestinationMask();
   void updateZoom();
 
