Index: XIOS/trunk/src/transformation/algo_types.hpp
===================================================================
--- XIOS/trunk/src/transformation/algo_types.hpp	(revision 1553)
+++ XIOS/trunk/src/transformation/algo_types.hpp	(revision 1558)
@@ -17,4 +17,5 @@
 #include "axis_algorithm_zoom.hpp"
 #include "axis_algorithm_interpolate.hpp"
+#include "axis_algorithm_extract.hpp"
 #include "axis_algorithm_reduce_domain.hpp"
 #include "axis_algorithm_reduce_axis.hpp"
Index: XIOS/trunk/src/transformation/axis_algorithm_extract.cpp
===================================================================
--- XIOS/trunk/src/transformation/axis_algorithm_extract.cpp	(revision 1558)
+++ XIOS/trunk/src/transformation/axis_algorithm_extract.cpp	(revision 1558)
@@ -0,0 +1,114 @@
+/*!
+   \file axis_algorithm_extract.cpp
+   \brief Algorithm for extracting an axis.
+ */
+#include "axis_algorithm_extract.hpp"
+#include "axis.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+#include "extract_axis.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CAxisAlgorithmExtract::create(CGrid* gridDst, CGrid* gridSrc,
+                                                           CTransformation<CAxis>* transformation,
+                                                           int elementPositionInGrid,
+                                                           std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                           std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                           std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                           std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                           std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                           std::map<int, int>& elementPositionInGridDst2DomainPosition)
+{
+  std::vector<CAxis*> axisListDestP = gridDst->getAxis();
+  std::vector<CAxis*> axisListSrcP  = gridSrc->getAxis();
+
+  CExtractAxis* extractAxis = dynamic_cast<CExtractAxis*> (transformation);
+  int axisDstIndex = elementPositionInGridDst2AxisPosition[elementPositionInGrid];
+  int axisSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid];
+
+  return (new CAxisAlgorithmExtract(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], extractAxis));
+}
+bool CAxisAlgorithmExtract::registerTrans()
+{
+  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_EXTRACT_AXIS, create);
+}
+
+CAxisAlgorithmExtract::CAxisAlgorithmExtract(CAxis* axisDestination, CAxis* axisSource, CExtractAxis* extractAxis)
+: CAxisAlgorithmTransformation(axisDestination, axisSource)
+{
+  extractAxis->checkValid(axisSource);
+  extractBegin_ = extractAxis->begin.getValue();
+  extractN_  = extractAxis->n.getValue();
+  extractEnd_   = extractBegin_ + extractN_ - 1;
+
+  if (extractN_ > axisSource->n_glo.getValue())
+  {
+    ERROR("CAxisAlgorithmExtract::CAxisAlgorithmExtract(CAxis* axisDestination, CAxis* axisSource, CExtractAxis* extractAxis)",
+           << "Extract size is greater than global size of source axis"
+           << "Global size of source axis " <<axisSource->getId() << " is " << axisSource->n_glo.getValue()  << std::endl
+           << "Extract size is " << extractN_ );
+  }
+
+  int idxSrc, nDest = 0, beginDestLoc, beginDestGlo = 0 ;
+  int indGloDest, indGloSrc, iSrc;
+  for (int i = 0; i < axisSrc_->n.getValue(); i++)
+  {
+    idxSrc = axisSrc_->index(i);
+    if ((idxSrc >= extractBegin_) && (idxSrc <= extractEnd_))
+    {
+      if (nDest == 0) beginDestLoc = i;
+      ++nDest;
+    }
+  }
+  beginDestGlo = beginDestLoc + axisSrc_->begin - extractBegin_;
+  axisDest_->n_glo.setValue(extractN_);
+  axisDest_->n.setValue(nDest);
+  axisDest_->begin.setValue(beginDestGlo);
+  axisDest_->index.resize(nDest);
+
+  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);
+  if (axisSrc_->hasBounds) axisDest_->bounds.resize(2,nDest);
+
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  for (int iDest = 0; iDest < nDest; iDest++)
+  {
+    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].push_back(indGloSrc);
+    transWeight[indGloDest].push_back(1.0);
+
+  }
+}
+
+/*!
+  Compute the index mapping between domain on grid source and one on grid destination
+*/
+void CAxisAlgorithmExtract::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+{
+}
+
+}
Index: XIOS/trunk/src/transformation/axis_algorithm_extract.hpp
===================================================================
--- XIOS/trunk/src/transformation/axis_algorithm_extract.hpp	(revision 1558)
+++ XIOS/trunk/src/transformation/axis_algorithm_extract.hpp	(revision 1558)
@@ -0,0 +1,60 @@
+/*!
+   \file axis_algorithm_extract.hpp
+   \brief Algorithm for extracting an axis.
+ */
+#ifndef __XIOS_AXIS_ALGORITHM_EXTRACT_HPP__
+#define __XIOS_AXIS_ALGORITHM_EXTRACT_HPP__
+
+#include "axis_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+class CAxis;
+class CExtractAxis;
+
+/*!
+  \class CAxisAlgorithmExtract
+  Implementing extract on axis
+  A extracted region can be considered as region that isn't masked.
+  Only this extracted region is extracted to write on Netcdf.
+*/
+class CAxisAlgorithmExtract : public CAxisAlgorithmTransformation
+{
+public:
+  CAxisAlgorithmExtract(CAxis* axisDestination, CAxis* axisSource, CExtractAxis* extractAxis);
+
+  virtual ~CAxisAlgorithmExtract() {}
+
+  static bool registerTrans();
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+private:
+
+private:
+  //! Global extract begin on axis
+  StdSize extractBegin_;
+
+  //! Global extract end on axis
+  StdSize extractEnd_;
+
+  //! Global extract size on axis
+  StdSize extractN_;
+
+  std::vector<int> extractIndex_;
+
+private:
+
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CAxis>* transformation,
+                                                int elementPositionInGrid,
+                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
+                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
+                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
+                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
+};
+
+}
+#endif // __XIOS_AXIS_ALGORITHM_EXTRACT_HPP__
Index: XIOS/trunk/src/transformation/grid_transformation_selector.cpp
===================================================================
--- XIOS/trunk/src/transformation/grid_transformation_selector.cpp	(revision 1553)
+++ XIOS/trunk/src/transformation/grid_transformation_selector.cpp	(revision 1558)
@@ -28,4 +28,5 @@
   CAxisAlgorithmExtractDomain::registerTrans();
   CAxisAlgorithmInterpolate::registerTrans();
+  CAxisAlgorithmExtract::registerTrans();
   CAxisAlgorithmInverse::registerTrans();
   CAxisAlgorithmReduceDomain::registerTrans();
