Index: XIOS/trunk/src/config/interpolate_axis_attribute.conf
===================================================================
--- XIOS/trunk/src/config/interpolate_axis_attribute.conf	(revision 2029)
+++ XIOS/trunk/src/config/interpolate_axis_attribute.conf	(revision 2033)
@@ -5,3 +5,4 @@
 DECLARE_ATTRIBUTE(StdString, coordinate_src)
 DECLARE_ATTRIBUTE(StdString, coordinate_dst)
+DECLARE_ATTRIBUTE(bool, extrapolate)
 
Index: XIOS/trunk/src/transformation/axis_algorithm_interpolate.cpp
===================================================================
--- XIOS/trunk/src/transformation/axis_algorithm_interpolate.cpp	(revision 2029)
+++ XIOS/trunk/src/transformation/axis_algorithm_interpolate.cpp	(revision 2033)
@@ -55,4 +55,7 @@
   interpAxis->checkValid(axisSource);
   order_ = interpAxis->order.getValue();
+  if (interpAxis->extrapolate.isEmpty()) extrapolate_=false ;
+  else extrapolate_=interpAxis->extrapolate ;
+  
   this->idAuxInputs_.clear();
   if (!interpAxis->coordinate.isEmpty())
@@ -132,6 +135,6 @@
   if(!coordinateDST_.empty())
   {
-    int nDomPoint = (*dataAuxInputs[0]).numElements()/numValue ;
     int dst_position_in_data = dataAuxInputs.size()-1;
+    int nDomPoint = (*dataAuxInputs[dst_position_in_data]).numElements()/numValue ;
     for(int ii=0; ii<numValue; ii++)
     {
@@ -192,6 +195,40 @@
 
     }
-  }
-  computeWeightedValueAndMapping(interpolatingIndexValues, transPos);
+    else
+    {
+      it=itb ;
+      if (destValue <= *it) 
+      {
+        int numVal=0 ;
+        while(numVal <= order_ && it!=ite)
+        {
+          if (*it != sfmax)
+          { 
+            interpolatingIndexValues[idx+ibegin].push_back(make_pair(indexVec[std::distance(itb, it)],*it));
+            ++numVal ;
+          }
+          ++it ;
+        }
+      }
+      
+      it=ite ;
+      --it ;
+      if (destValue >= *it) 
+      {
+        int numVal=0 ;
+        do
+        {
+          if (*it != sfmax)
+          {
+            interpolatingIndexValues[idx+ibegin].push_back(make_pair(indexVec[std::distance(itb, it)],*it));
+            ++numVal ;
+          }
+          --it ;
+        } while(it!=itb && numVal<=order_) ;
+      }
+    }
+  }
+  
+  computeWeightedValueAndMapping(axisDestValue, interpolatingIndexValues, transPos);
 }
 CATCH
@@ -203,5 +240,5 @@
   \param [in] interpolatingIndexValues the necessary axis value to calculate the coeffs
 */
-void CAxisAlgorithmInterpolate::computeWeightedValueAndMapping(const std::map<int, std::vector<std::pair<int,double> > >& interpolatingIndexValues, int transPos)
+void CAxisAlgorithmInterpolate::computeWeightedValueAndMapping(CArray<double,1>& axisDestValue, const std::map<int, std::vector<std::pair<int,double> > >& interpolatingIndexValues, int transPos)
 TRY
 {
@@ -214,5 +251,6 @@
   {
     int globalIndexDest = it->first;
-    double localValue = axisDest_->value(globalIndexDest - ibegin);
+//    double localValue = axisDest_->value(globalIndexDest - ibegin);
+    double localValue = axisDestValue(globalIndexDest - ibegin);
     const std::vector<std::pair<int,double> >& interpVal = it->second;
     int interpSize = interpVal.size();
Index: XIOS/trunk/src/transformation/axis_algorithm_interpolate.hpp
===================================================================
--- XIOS/trunk/src/transformation/axis_algorithm_interpolate.hpp	(revision 2029)
+++ XIOS/trunk/src/transformation/axis_algorithm_interpolate.hpp	(revision 2033)
@@ -18,5 +18,5 @@
 class CGrid;
 class CInterpolateAxis;
-
+ 
 /*!
   \class CAxisAlgorithmInterpolate
@@ -45,5 +45,5 @@
   void computeInterpolantPoint(const std::vector<double>& recvBuff, const std::vector<int>&, 
                                const std::vector<CArray<double,1>* >& dataAuxInputs, int transPos = 0);
-  void computeWeightedValueAndMapping(const std::map<int, std::vector<std::pair<int,double> > >& interpolatingIndexValues, int transPos = 0);
+  void computeWeightedValueAndMapping(CArray<double,1>& axisDestValue, const std::map<int, std::vector<std::pair<int,double> > >& interpolatingIndexValues, int transPos = 0);
   void fillInAxisValue(std::vector<CArray<double,1> >& vecAxisValue,
                        const std::vector<CArray<double,1>* >& dataAuxInputs);
@@ -52,4 +52,5 @@
   // Interpolation order
   int order_;
+  bool extrapolate_ ;
   StdString coordinate_;
   StdString coordinateDST_;
