Index: /XIOS/trunk/src/io/nc4_data_output.cpp
===================================================================
--- /XIOS/trunk/src/io/nc4_data_output.cpp	(revision 704)
+++ /XIOS/trunk/src/io/nc4_data_output.cpp	(revision 705)
@@ -449,4 +449,7 @@
          StdString domid     = (!domain->name.isEmpty())
                              ? domain->name.getValue() : domain->getId();
+         if (isWrittenDomain(domid)) return ;
+         else writtenDomains.insert(domid) ; 
+
          StdString appendDomid  = (singleDomain) ? "" : "_"+domid ;
 
@@ -527,5 +530,5 @@
                  bounds_latid = StdString("bounds_lat").append(appendDomid);
                  dim0.push_back(dimXid);
-                 SuperClassWriter::addDimension(dimXid, domain->nj_glo);
+                 SuperClassWriter::addDimension(dimXid, domain->ni_glo);
                  if (domain->hasLonLat)
                  {
@@ -573,9 +576,9 @@
                  else
                  {
-                   start[0]=domain->zoom_jbegin_srv-domain->global_zoom_jbegin;
-                   count[0]=domain->zoom_nj_srv ;
-                   startBounds[0]=domain->zoom_jbegin_srv-domain->global_zoom_jbegin;
+                   start[0]=domain->zoom_ibegin_srv-domain->global_zoom_ibegin;
+                   count[0]=domain->zoom_ni_srv ;
+                   startBounds[0]=domain->zoom_ibegin_srv-domain->global_zoom_ibegin;
                    startBounds[1]=0 ;
-                   countBounds[0]=domain->zoom_nj_srv ;
+                   countBounds[0]=domain->zoom_ni_srv ;
                    countBounds[1]=domain->nvertex ;
                  }
@@ -633,4 +636,7 @@
         std::vector<StdString> dims;
         StdString axisid = !axis->name.isEmpty() ? axis->name.getValue() : axis->getId();
+        if (isWrittenAxis(axisid)) return ;
+        else writtenAxis.insert(axisid) ; 
+
         try
         {
@@ -1575,5 +1581,42 @@
                 else
                 {
+
+                  CArray<bool,1> axisDomainOrder = grid->axis_domain_order;
+                  std::vector<StdString> domainList = grid->getDomainList();
+                  std::vector<StdString> axisList   = grid->getAxisList();
+                  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());
+
+                  for (int i = numElement - 1; i >= 0; --i)
+                  {
+                    if (axisDomainOrder(i))
+                    {
+                      CDomain* domain = CDomain::get(domainList[idxDomain]);
+                      if (! domain->type == CDomain::type_attr::unstructured)
+                      {
+                        start.push_back(nZoomBeginServer[idx] - nZoomBeginGlobal[idx]);
+                        count.push_back(nZoomSizeServer[idx]);
+                      }
+                      --idx ;
+                      start.push_back(nZoomBeginServer[idx] - nZoomBeginGlobal[idx]);
+                      count.push_back(nZoomSizeServer[idx]);
+                      --idx ;
+                      --idxDomain;
+                    }
+                    else
+                    {
+                      start.push_back(nZoomBeginServer[idx] - nZoomBeginGlobal[idx]);
+                      count.push_back(nZoomSizeServer[idx]);
+                      --idx;
+                     }
+                  }
+/*
                   int ssize = nZoomBeginGlobal.size();
+                  for (int i = numElement - 1; i >= 0; --i)
+
 
                   start.resize(ssize);
@@ -1585,4 +1628,5 @@
                     count[i] = nZoomSizeServer[ssize - i - 1];
                   }
+*/
                 }
 
Index: /XIOS/trunk/src/io/nc4_data_output.hpp
===================================================================
--- /XIOS/trunk/src/io/nc4_data_output.hpp	(revision 704)
+++ /XIOS/trunk/src/io/nc4_data_output.hpp	(revision 705)
@@ -96,4 +96,8 @@
             MPI_Comm comm_file;
             const StdString filename;
+            std::set<std::string> writtenDomains ; 
+            std::set<std::string> writtenAxis ;
+            bool isWrittenDomain(const std::string& domainName) { return this->writtenDomains.find(domainName) != this->writtenDomains.end(); }
+            bool isWrittenAxis(const std::string& axisName) { return this->writtenAxis.find(axisName) != this->writtenAxis.end(); }
 
       }; // class CNc4DataOutput
