Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/extract_domain_to_axis.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/extract_domain_to_axis.cpp	(revision 2254)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/node/extract_domain_to_axis.cpp	(revision 2255)
@@ -48,5 +48,4 @@
        << "Axis destination " << axisDst->getId());
 
-    int axis_n_glo = axisDst->n_glo;
     int domain_ni_glo = domainSrc->ni_glo;
     int domain_nj_glo = domainSrc->nj_glo;
@@ -67,9 +66,4 @@
     {
       case direction_attr::jDir:
-        if (axis_n_glo != domain_nj_glo)
-          ERROR("CExtractDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",
-            << "Extract domain along j, axis destination should have n_glo equal to nj_glo of domain source"
-            << "Domain source " <<domainSrc->getId() << " has nj_glo " << domain_nj_glo << std::endl
-            << "Axis destination " << axisDst->getId() << " has n_glo " << axis_n_glo);
         if ((position < 0) || (position >= domain_ni_glo))
         ERROR("CExtractDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",
@@ -81,9 +75,4 @@
 
       case direction_attr::iDir:
-        if (axis_n_glo != domain_ni_glo)
-          ERROR("CExtractDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",
-            << "Extract domain along i, axis destination should have n_glo equal to ni_glo of domain source"
-            << "Domain source " <<domainSrc->getId() << " has ni_glo " << domain_ni_glo << std::endl
-            << "Axis destination " << axisDst->getId() << " has n_glo " << axis_n_glo);
         if ((position < 0) || (position >= domain_nj_glo))
         ERROR("CExtractDomainToAxis::checkValid(CAxis* axisDst, CDomain* domainSrc)",
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_extract.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_extract.cpp	(revision 2254)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_extract.cpp	(revision 2255)
@@ -44,4 +44,19 @@
 TRY
 {
+  axisDestination->axis_type.reset();
+  axisDestination->n_glo.reset();
+  axisDestination->index.reset();
+  axisDestination->n.reset();
+  axisDestination->begin.reset();
+
+  axisDestination->mask.reset();
+  axisDestination->data_index.reset();
+  axisDestination->data_n.reset();
+  axisDestination->data_begin.reset();
+
+  axisDestination->value.reset();
+  axisDestination->label.reset();
+  axisDestination->bounds.reset();
+
   extractAxis->checkValid(axisSource);
   extractBegin_ = extractAxis->begin.getValue();
@@ -68,15 +83,13 @@
     }
   }
-  beginDestGlo = beginDestLoc + axisSrc_->begin - extractBegin_;
+  
   axisDest_->n_glo.setValue(extractN_);
-  axisDest_->n.setValue(nDest);
-  axisDest_->begin.setValue(beginDestGlo);
   axisDest_->index.resize(nDest);
+  if (nDest==0)
+  {
+    axisDest_->n.setValue( 0 );
+    axisDest_->begin.setValue( 0 );
+  }
 
-  axisDest_->data_n.setValue(nDest);
-  axisDest_->data_begin.setValue(0);
-  axisDest_->data_index.resize(nDest);
-
-  axisDest_->mask.resize(nDest);
   if (axisSrc_->hasValue) axisDest_->value.resize(nDest);
   if (axisSrc_->hasLabel) axisDest_->label.resize(nDest);
@@ -85,27 +98,67 @@
   auto& transMap = this->transformationMapping_;
 
-  for (int iDest = 0; iDest < nDest; iDest++)
+  // Set attributes required to define domainDestination->localElement_ and associated views, full and workflow)
+  CArray<size_t,1> sourceGlobalIdx = axisSource->getLocalElement()->getGlobalIndex();
+  int indexSize = sourceGlobalIdx.numElements();
+
+  CArray<int,1> sourceWorkflowIdx = axisSource->getLocalView(CElementView::WORKFLOW)->getIndex();
+  int srcWorkflowSize = sourceWorkflowIdx.numElements();
+  axisDest_->data_index.resize(nDest);
+  axisDest_->data_index = -1;
+
+  int idxMin = INT_MAX;
+  for (int countSrc = 0; countSrc < indexSize ; ++countSrc)
   {
-    iSrc = iDest + beginDestLoc;
-    axisDest_->index(iDest) = iDest + beginDestGlo;
-    axisDest_->data_index(iDest) = axisSrc_->data_index(iSrc) - beginDestLoc;
-    axisDest_->mask(iDest) = axisSrc_->mask(iSrc);
-
-    if (axisSrc_->hasValue)
-      axisDest_->value(iDest) = axisSrc_->value(iSrc);
-    if (axisSrc_->hasLabel)
-      axisDest_->label(iDest) = axisSrc_->label(iSrc);
-    if (axisSrc_->hasBounds)
-    {
-      axisDest_->bounds(0,iDest) = axisSrc_->bounds(0,iSrc);
-      axisDest_->bounds(1,iDest) = axisSrc_->bounds(1,iSrc);
-    }
-    indGloDest = axisDest_->index(iDest);
-    indGloSrc = axisSrc_->index(iSrc);
-    
-    transMap[indGloDest]=indGloSrc;
-
+    if ( sourceGlobalIdx(countSrc) < idxMin )
+      idxMin = sourceGlobalIdx(countSrc);
   }
 
+  int countDest(0); // increment of the position in destination domain 
+  for (int countSrc = 0; countSrc < indexSize ; ++countSrc)
+  {
+    int idxSrc = sourceGlobalIdx(countSrc);
+    if ( (idxSrc >= extractBegin_) && (idxSrc <= extractEnd_) )
+    {
+      axisDest_->index(countDest) = idxSrc-extractBegin_;
+
+      // ------------------ define transformation only if in the WF ------------------ 
+      int iIdxSrc2 = (countSrc+idxMin)%axisSource->n_glo;
+      int convert_locally_global_idx = (iIdxSrc2-idxMin) ;
+      bool concerned_by_WF(false);
+      for ( int i = 0 ; i<sourceWorkflowIdx.numElements() ; ++i )
+      {
+        if (sourceWorkflowIdx(i)==convert_locally_global_idx)
+        {      
+          concerned_by_WF = true;
+          break;
+        }
+      }
+
+      if (concerned_by_WF)
+      {
+        transformationMapping_[idxSrc-extractBegin_]=sourceGlobalIdx(countSrc);
+        axisDest_->data_index( countDest ) = countDest;
+      }
+      // -----------------------------------------------------------------------------
+
+      if (axisSrc_->hasValue)
+      {
+        axisDest_->value(countDest) = axisSrc_->value(countSrc);
+      }
+      if (axisSrc_->hasLabel)
+      {
+        axisDest_->label(countDest) = axisSrc_->label(countSrc);
+      }
+      if (axisSrc_->hasBounds)
+      {
+        axisDest_->bounds(0,countDest) = axisSrc_->bounds(0,countSrc);
+        axisDest_->bounds(1,countDest) = axisSrc_->bounds(1,countSrc);
+      }
+      
+      // if point i has been identified as extracted, increment position in destination domain for the next point
+      countDest++;
+    }
+  }
+  
   axisDestination->checkAttributes() ;
 
Index: /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_extract_domain.cpp
===================================================================
--- /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_extract_domain.cpp	(revision 2254)
+++ /XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_extract_domain.cpp	(revision 2255)
@@ -51,18 +51,48 @@
 TRY
 {
-  axisDestination->checkAttributes() ;
+  axisDestination->axis_type.reset();
+  axisDestination->n_glo.reset();
+  axisDestination->index.reset();
+  axisDestination->n.reset();
+  axisDestination->begin.reset();
+
+  axisDestination->mask.reset();
+  axisDestination->data_index.reset();
+  axisDestination->data_n.reset();
+  axisDestination->data_begin.reset();
+
+  axisDestination->value.reset();
+  axisDestination->label.reset();
+  axisDestination->bounds.reset();
+
   algo->checkValid(axisDestination, domainSource);
   StdString op = "extract";
 
+  int nglo,nloc;
   switch (algo->direction)
   {
     case CExtractDomainToAxis::direction_attr::jDir:
       dir_ = jDir;
+      nglo = domainSource->nj_glo.getValue();
+      nloc = domainSource->nj.getValue();
       break;
     case CExtractDomainToAxis::direction_attr::iDir:
       dir_ = iDir;
+      nglo = domainSource->ni_glo.getValue();
+      nloc = domainSource->ni.getValue();
       break;
     default:
       break;
+  }
+  
+  axisDestination->n_glo.setValue( nglo );
+  axisDestination->index.resize( nloc );
+  axisDestination->data_index.resize( nloc );
+  axisDestination->data_index = -1;
+
+  if ( axisDestination->index.isEmpty() )
+  {
+    axisDestination->n.setValue( 0 );
+    axisDestination->begin.setValue( 0 );
   }
 
@@ -70,23 +100,80 @@
 
   auto& transMap = this->transformationMapping_;
+  
+  CArray<size_t,1> sourceGlobalIdx = domainSource->getLocalElement()->getGlobalIndex();
+  int indexSize = sourceGlobalIdx.numElements();
 
-  CArray<int,1>& axisDstIndex = axisDest_->index;
-  int ni_glo = domainSrc_->ni_glo, nj_glo = domainSrc_->nj_glo;
+  CArray<int,1> sourceWorkflowIdx = domainSource->getLocalView(CElementView::WORKFLOW)->getIndex();
+  int srcWorkflowSize = sourceWorkflowIdx.numElements();
+  
+  int iIdxSrcMin = INT_MAX;
+  int jIdxSrcMin = INT_MAX;
+  int IdxMin = INT_MAX;
+  for (int countSrc = 0; countSrc < indexSize ; ++countSrc)
+  {
+    if ( sourceGlobalIdx(countSrc)%domainSource->ni_glo < iIdxSrcMin )
+      iIdxSrcMin = sourceGlobalIdx(countSrc)%domainSource->ni_glo;
+    if ( sourceGlobalIdx(countSrc)/domainSource->ni_glo < jIdxSrcMin )
+      jIdxSrcMin = sourceGlobalIdx(countSrc)/domainSource->ni_glo;
+    if ( sourceGlobalIdx(countSrc) < IdxMin )
+      IdxMin = sourceGlobalIdx(countSrc);
+  }
+  
   if (jDir == dir_)
   {
-    int nbAxisIdx = axisDstIndex.numElements();
-    for (int idxAxis = 0; idxAxis < nbAxisIdx; ++idxAxis)
+    int countDest(0);
+    for (int countSrc = 0; countSrc < indexSize ; ++countSrc)
     {
-      int globalAxisIdx = axisDstIndex(idxAxis);
-      transMap[globalAxisIdx] = globalAxisIdx * ni_glo + pos_;
+      if ( sourceGlobalIdx(countSrc)%domainSource->ni_glo == pos_ )
+      {
+	axisDest_->index(countDest) = sourceGlobalIdx(countSrc)/domainSource->ni_glo;
+	int iIdxSrc2 = (countSrc+IdxMin)%domainSource->ni_glo;
+	int jIdxSrc2 = (countSrc+IdxMin)/domainSource->ni_glo;
+	int convert_locally_global_idx = (jIdxSrc2-jIdxSrcMin)*domainSource->ni + (iIdxSrc2-iIdxSrcMin) ;
+	bool concerned_by_WF(false);
+	for ( int i = 0 ; i<sourceWorkflowIdx.numElements() ; ++i )
+	{
+	  if (sourceWorkflowIdx(i)==convert_locally_global_idx)
+	  {      
+	  	concerned_by_WF = true;
+	  	break;
+	  }
+	}
+	if (concerned_by_WF)
+	{
+	  axisDest_->data_index(countDest) = countDest;
+	  transMap[axisDest_->index(countDest)] = sourceGlobalIdx(countSrc);
+	}
+        countDest++;
+      }
     }
   }
   else if (iDir == dir_)
   {
-    int nbAxisIdx = axisDstIndex.numElements();
-    for (int idxAxis = 0; idxAxis < nbAxisIdx; ++idxAxis)
+    int countDest(0);
+    for (int countSrc = 0; countSrc < indexSize ; ++countSrc)
     {
-      int globalAxisIdx = axisDstIndex(idxAxis);
-      transMap[globalAxisIdx] = globalAxisIdx + ni_glo * pos_;
+      if ( sourceGlobalIdx(countSrc)/domainSource->ni_glo == pos_ )
+      {
+        axisDest_->index(countDest) = sourceGlobalIdx(countSrc)%domainSource->ni_glo;
+	int iIdxSrc2 = (countSrc+IdxMin)%domainSource->ni_glo;
+	int jIdxSrc2 = (countSrc+IdxMin)/domainSource->ni_glo;
+	int convert_locally_global_idx = (jIdxSrc2-jIdxSrcMin)*domainSource->ni + (iIdxSrc2-iIdxSrcMin) ;
+	bool concerned_by_WF(false);
+	for ( int i = 0 ; i<sourceWorkflowIdx.numElements() ; ++i )
+	{
+	  if (sourceWorkflowIdx(i)==convert_locally_global_idx)
+	  {      
+	  	concerned_by_WF = true;
+	  	break;
+	  }
+	}
+	if (concerned_by_WF)
+	{
+	  axisDest_->data_index(countDest) = countDest;
+	  transMap[axisDest_->index(countDest)] = sourceGlobalIdx(countSrc);
+	}
+        countDest++;
+      }
     }
   }
