Index: XIOS/dev/XIOS_DEV_CMIP6/src/config/node_type.conf
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/config/node_type.conf	(revision 1456)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/config/node_type.conf	(revision 1457)
@@ -103,4 +103,8 @@
 #endif //__XIOS_CReduceScalarToScalar_
 
+#ifdef __XIOS_CReorderDomain__
+   DECLARE_NODE(ReorderDomain, reorder_domain)
+#endif //__XIOS_CReduceScalarToScalar_
+
 #ifdef __XIOS_CContext__
    DECLARE_NODE_PAR(Context, context)
Index: XIOS/dev/XIOS_DEV_CMIP6/src/config/reorder_domain_attribute.conf
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/config/reorder_domain_attribute.conf	(revision 1457)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/config/reorder_domain_attribute.conf	(revision 1457)
@@ -0,0 +1,4 @@
+DECLARE_ATTRIBUTE(bool, invert_lat)
+DECLARE_ATTRIBUTE(double, shift_lon_fraction)
+DECLARE_ATTRIBUTE(double, min_lon)
+DECLARE_ATTRIBUTE(double, max_lon)
Index: XIOS/dev/XIOS_DEV_CMIP6/src/generate_fortran_interface.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/generate_fortran_interface.cpp	(revision 1456)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/generate_fortran_interface.cpp	(revision 1457)
@@ -35,4 +35,5 @@
   CComputeConnectivityDomain compConDomain;
   CExpandDomain expandDomain;
+  CReorderDomain reorderDomain;
 
   CInterpolateAxis interpolateAxis;
@@ -301,4 +302,16 @@
   file.open((path+"iexpand_domain_attr.F90").c_str());
   expandDomain.generateFortranInterface(file);
+
+  file.open((path+"reorder_domain_interface_attr.F90").c_str());
+  reorderDomain.generateFortran2003Interface(file);
+  file.close();
+
+  file.open((path+"icreorder_domain_attr.cpp").c_str());
+  reorderDomain.generateCInterface(file);
+  file.close();
+
+  file.open((path+"ireorder_domain_attr.F90").c_str());
+  reorderDomain.generateFortranInterface(file);
+
   file.close();
   
Index: XIOS/dev/XIOS_DEV_CMIP6/src/group_factory_decl.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/group_factory_decl.cpp	(revision 1456)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/group_factory_decl.cpp	(revision 1457)
@@ -43,4 +43,4 @@
   macro(CDuplicateScalarToAxisGroup)
   macro(CReduceScalarToScalarGroup)
-
+  macro(CReorderDomainGroup)
 }
Index: XIOS/dev/XIOS_DEV_CMIP6/src/group_template_decl.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/group_template_decl.cpp	(revision 1456)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/group_template_decl.cpp	(revision 1457)
@@ -32,3 +32,5 @@
   macro(DuplicateScalarToAxis)
   macro(ReduceScalarToScalar)
+  macro(ReorderDomain)
+
 }
Index: XIOS/dev/XIOS_DEV_CMIP6/src/node/domain.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/node/domain.cpp	(revision 1456)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/node/domain.cpp	(revision 1457)
@@ -76,4 +76,5 @@
      m["compute_connectivity_domain"] = TRANS_COMPUTE_CONNECTIVITY_DOMAIN;
      m["expand_domain"] = TRANS_EXPAND_DOMAIN;
+     m["reorder_domain"] = TRANS_REORDER_DOMAIN;
    }
 
Index: XIOS/dev/XIOS_DEV_CMIP6/src/node/node_enum.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/node/node_enum.hpp	(revision 1456)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/node/node_enum.hpp	(revision 1457)
@@ -37,5 +37,6 @@
          eTemporalSplitting,
          eDuplicateScalarToAxis,
-         eReduceScalarToScalar
+         eReduceScalarToScalar,
+         eReorderDomain
        } ENodeType;
 
Index: XIOS/dev/XIOS_DEV_CMIP6/src/node/node_type.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/node/node_type.hpp	(revision 1456)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/node/node_type.hpp	(revision 1457)
@@ -28,5 +28,5 @@
 #include "duplicate_scalar_to_axis.hpp"
 #include "reduce_scalar_to_scalar.hpp"
-
+#include "reorder_domain.hpp"
 
 
Index: XIOS/dev/XIOS_DEV_CMIP6/src/node/reorder_domain.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/node/reorder_domain.cpp	(revision 1457)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/node/reorder_domain.cpp	(revision 1457)
@@ -0,0 +1,43 @@
+#include "reorder_domain.hpp"
+#include "type.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CReorderDomain::CReorderDomain(void)
+    : CObjectTemplate<CReorderDomain>(), CReorderDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CReorderDomain::CReorderDomain(const StdString & id)
+    : CObjectTemplate<CReorderDomain>(id), CReorderDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CReorderDomain::~CReorderDomain(void)
+  {}
+
+  CTransformation<CDomain>* CReorderDomain::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CReorderDomain* reorderDomain = CReorderDomainGroup::get("reorder_domain_definition")->createChild(id);
+    if (node) reorderDomain->parse(*node);
+    return static_cast<CTransformation<CDomain>*>(reorderDomain);
+  }
+
+  bool CReorderDomain::_dummyRegistered = CReorderDomain::registerTrans();
+  bool CReorderDomain::registerTrans()
+  {
+    registerTransformation(TRANS_REORDER_DOMAIN, CReorderDomain::create);
+  }
+
+  //----------------------------------------------------------------
+
+  StdString CReorderDomain::GetName(void)    { return StdString("reorder_domain"); }
+  StdString CReorderDomain::GetDefName(void) { return StdString("reorder_domain"); }
+  ENodeType CReorderDomain::GetType(void)    { return eReorderDomain; }
+
+  void CReorderDomain::checkValid(CDomain* domainSrc)
+  {
+    
+  }
+
+}
Index: XIOS/dev/XIOS_DEV_CMIP6/src/node/reorder_domain.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/node/reorder_domain.hpp	(revision 1457)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/node/reorder_domain.hpp	(revision 1457)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CReorderDomain__
+#define __XIOS_CReorderDomain__
+
+/// xios headers ///
+#include "xios_spl.hpp"
+#include "attribute_enum.hpp"
+#include "attribute_enum_impl.hpp"
+#include "attribute_array.hpp"
+#include "declare_attribute.hpp"
+#include "object_template.hpp"
+#include "group_factory.hpp"
+#include "declare_group.hpp"
+#include "transformation.hpp"
+#include "domain.hpp"
+
+namespace xios {
+  /// ////////////////////// DÃ©clarations ////////////////////// ///
+  class CReorderDomainGroup;
+  class CReorderDomainAttributes;
+  class CReorderDomain;
+  class CDomain;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CReorderDomainAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CReorderDomain)
+#include "reorder_domain_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CReorderDomain)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CReorderDomain
+    This class describes reorder_domain in xml file.
+  */
+  class CReorderDomain
+    : public CObjectTemplate<CReorderDomain>
+    , public CReorderDomainAttributes
+    , public CTransformation<CDomain>
+  {
+    public :
+      typedef CObjectTemplate<CReorderDomain> SuperClass;
+      typedef CReorderDomainAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CReorderDomain(void);
+      explicit CReorderDomain(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CReorderDomain(void);
+
+      virtual void checkValid(CDomain* domainSrc);
+
+      /// Accesseurs statiques ///
+      static StdString GetName(void);
+      static StdString GetDefName(void);
+      static ENodeType GetType(void);
+    private:
+      static bool registerTrans();
+      static CTransformation<CDomain>* create(const StdString& id, xml::CXMLNode* node);
+      static bool _dummyRegistered;
+  }; // class CReorderDomain
+
+  DECLARE_GROUP(CReorderDomain);
+} // namespace xios
+
+#endif // __XIOS_CReorderDomain__
Index: XIOS/dev/XIOS_DEV_CMIP6/src/node/transformation_enum.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/node/transformation_enum.hpp	(revision 1456)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/node/transformation_enum.hpp	(revision 1457)
@@ -24,4 +24,5 @@
         TRANS_DUPLICATE_SCALAR_TO_AXIS = 15,
         TRANS_REDUCE_SCALAR_TO_SCALAR = 16,
+        TRANS_REORDER_DOMAIN = 17
       } ETranformationType;
 
Index: XIOS/dev/XIOS_DEV_CMIP6/src/object_factory_decl.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/object_factory_decl.cpp	(revision 1456)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/object_factory_decl.cpp	(revision 1457)
@@ -44,5 +44,6 @@
   macro(CDuplicateScalarToAxis)
   macro(CReduceScalarToScalar)
-
+  macro(CReorderDomain)
+  
   macro(CFieldGroup)
   macro(CFileGroup)
@@ -70,4 +71,4 @@
   macro(CDuplicateScalarToAxisGroup)
   macro(CReduceScalarToScalarGroup)
-
+  macro(CReorderDomainGroup)
 }
Index: XIOS/dev/XIOS_DEV_CMIP6/src/object_template_decl.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/object_template_decl.cpp	(revision 1456)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/object_template_decl.cpp	(revision 1457)
@@ -31,5 +31,6 @@
   template class CObjectTemplate<CDuplicateScalarToAxis>;
   template class CObjectTemplate<CReduceScalarToScalar>;
-
+  template class CObjectTemplate<CReorderDomain>;
+  
   template class CObjectTemplate<CContextGroup>;
   template class CObjectTemplate<CFieldGroup>;
@@ -57,4 +58,4 @@
   template class CObjectTemplate<CDuplicateScalarToAxisGroup>;
   template class CObjectTemplate<CReduceScalarToScalarGroup>;
-
+  template class CObjectTemplate<CReorderDomainGroup>;
 }
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/algo_types.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/algo_types.hpp	(revision 1456)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/algo_types.hpp	(revision 1457)
@@ -29,4 +29,5 @@
 #include "axis_algorithm_duplicate_scalar.hpp"
 #include "scalar_algorithm_reduce_scalar.hpp"
+#include "domain_algorithm_reorder.hpp"
 
 
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/domain_algorithm_reorder.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/domain_algorithm_reorder.cpp	(revision 1457)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/domain_algorithm_reorder.cpp	(revision 1457)
@@ -0,0 +1,130 @@
+/*!
+   \file domain_algorithm_reorder.cpp
+   \brief Algorithm for reorder a domain.
+ */
+#include "domain_algorithm_reorder.hpp"
+#include "reorder_domain.hpp"
+#include "domain.hpp"
+#include "grid.hpp"
+#include "grid_transformation_factory_impl.hpp"
+
+namespace xios {
+CGenericAlgorithmTransformation* CDomainAlgorithmReorder::create(CGrid* gridDst, CGrid* gridSrc,
+                                                             CTransformation<CDomain>* 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<CDomain*> domainListDestP = gridDst->getDomains();
+  std::vector<CDomain*> domainListSrcP  = gridSrc->getDomains();
+
+  CReorderDomain* reorderDomain = dynamic_cast<CReorderDomain*> (transformation);
+  int domainDstIndex = elementPositionInGridDst2DomainPosition[elementPositionInGrid];
+  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid];
+
+  return (new CDomainAlgorithmReorder(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], reorderDomain));
+}
+
+bool CDomainAlgorithmReorder::registerTrans()
+{
+  CGridTransformationFactory<CDomain>::registerTransformation(TRANS_REORDER_DOMAIN, create);
+}
+
+CDomainAlgorithmReorder::CDomainAlgorithmReorder(CDomain* domainDestination, CDomain* domainSource, CReorderDomain* reorderDomain)
+: CDomainAlgorithmTransformation(domainDestination, domainSource)
+{
+  reorderDomain->checkValid(domainSource);
+  if (domainDestination->type !=  CDomain::type_attr::rectilinear)
+  {
+      ERROR("CDomainAlgorithmReorder::CDomainAlgorithmReorder(CDomain* domainDestination, CDomain* domainSource, CReorderDomain* reorderDomain)",
+           << "Domain destination is not rectilinear. This filter work only for rectilinear domain and destination domain with < id = "
+           <<domainDestination->getId() <<" > is of type "<<domainDestination->type<<std::endl);
+  }
+  
+  if (domainDestination == domainSource)
+  {
+    ERROR("CDomainAlgorithmReorder::CDomainAlgorithmReorder(CDomain* domainDestination, CDomain* domainSource, CReorderDomain* reorderDomain)",
+           << "Domain source and domain destination are the same. Please make sure domain destination refers to domain source" << std::endl
+           << "Domain source " <<domainSource->getId() << std::endl
+           << "Domain destination " <<domainDestination->getId() << std::endl);
+  }
+  this->type_ = (ELEMENT_MODIFICATION_WITHOUT_DATA);
+
+  if (!reorderDomain->invert_lat.isEmpty())
+  {
+    CArray<int,1>& j_index=domainDestination->j_index ;
+    int nglo = j_index.numElements() ;
+    int nj_glo =domainDestination->nj_glo ;
+    
+    for (size_t i = 0; i < nglo ; ++i)
+    {
+      j_index(i)=(nj_glo-1)-j_index(i) ;
+    }
+  }
+
+  if (!reorderDomain->shift_lon_fraction.isEmpty())
+  {
+    int ni_glo =domainDestination->ni_glo ;
+    int  offset = ni_glo*reorderDomain->shift_lon_fraction ;
+    CArray<int,1>& i_index=domainDestination->i_index ;
+    int nglo = i_index.numElements() ;
+    
+    for (size_t i = 0; i < nglo ; ++i)
+    {
+      i_index(i)=  (i_index(i)+offset+ni_glo)%ni_glo ;
+    }
+  }
+
+  if (!reorderDomain->min_lon.isEmpty() && !reorderDomain->max_lon.isEmpty())
+  {
+    double min_lon=reorderDomain->min_lon ;
+    double max_lon=reorderDomain->max_lon ;
+    double delta=max_lon-min_lon ;
+    
+    if (!domainDestination->lonvalue_1d.isEmpty() )
+    {
+      CArray<double,1>& lon=domainDestination->lonvalue_1d ;
+      for (int i=0;i<lon.numElements();++i)
+      {
+        while  (lon(i) > max_lon) lon(i)=lon(i)-delta ;
+        while  (lon(i) < min_lon) lon(i)=lon(i)+delta ;
+      }
+    }
+
+    if (!domainDestination->bounds_lon_1d.isEmpty() )
+    {
+      CArray<double,2>& bounds_lon=domainDestination->bounds_lon_1d ;
+      for (int i=0;i<bounds_lon.extent(0);++i)
+      {
+        while  (bounds_lon(0,i) > max_lon) bounds_lon(0,i)=bounds_lon(0,i)-delta ;
+        while  (bounds_lon(1,i) > max_lon) bounds_lon(1,i)=bounds_lon(1,i)-delta ;
+
+        while  (bounds_lon(0,i) < min_lon) bounds_lon(0,i)=bounds_lon(0,i)+delta ;
+        while  (bounds_lon(1,i) < min_lon) bounds_lon(1,i)=bounds_lon(1,i)+delta ;
+      }
+    }
+  }
+    
+  
+}
+
+/*!
+  Compute the index mapping between domain on grid source and one on grid destination
+*/
+void CDomainAlgorithmReorder::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
+{
+/*
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+*/
+}
+
+
+}
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/domain_algorithm_reorder.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/domain_algorithm_reorder.hpp	(revision 1457)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/domain_algorithm_reorder.hpp	(revision 1457)
@@ -0,0 +1,46 @@
+/*!
+   \brief Algorithm for reordering domain.
+ */
+#ifndef __XIOS_DOMAIN_ALGORITHM_REORDER_HPP__
+#define __XIOS_DOMAIN_ALGORITHM_REORDER_HPP__
+
+#include "domain_algorithm_transformation.hpp"
+#include "transformation.hpp"
+
+namespace xios {
+
+class CDomain;
+class CReorderDomain;
+
+/*!
+  \class CDomainAlgorithmReorder
+  Reordering data on domain
+*/
+class CDomainAlgorithmReorder : public CDomainAlgorithmTransformation
+{
+public:
+  CDomainAlgorithmReorder(CDomain* domainDestination, CDomain* domainSource, CReorderDomain* reorderDomain);
+
+  virtual ~CDomainAlgorithmReorder() {}
+
+  static bool registerTrans();
+
+protected:
+  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
+
+
+private:
+
+  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
+                                                CTransformation<CDomain>* 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_DOMAIN_ALGORITHM_REORDER_HPP__
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/grid_transformation_selector.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/grid_transformation_selector.cpp	(revision 1456)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/grid_transformation_selector.cpp	(revision 1457)
@@ -39,4 +39,5 @@
   CDomainAlgorithmZoom::registerTrans();
   CDomainAlgorithmExpand::registerTrans();
+  CDomainAlgorithmReorder::registerTrans();
 }
 
Index: XIOS/dev/XIOS_DEV_CMIP6/src/type/type_util.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/type/type_util.hpp	(revision 1456)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/type/type_util.hpp	(revision 1457)
@@ -56,5 +56,7 @@
     class CReduceScalarToScalar;
     class CReduceScalarToScalarGroup;
-  
+    class CReorderDomain;
+    class CReorderDomainGroup;
+     
   template <typename T> inline string getStrType(void);
 
@@ -128,4 +130,6 @@
   macro(CReduceScalarToScalar)
   macro(CReduceScalarToScalarGroup)
+  macro(CReorderDomain)
+  macro(CReorderDomainGroup)
   
 #undef macro
Index: XIOS/dev/XIOS_DEV_CMIP6/src/xml_parser_decl.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/xml_parser_decl.cpp	(revision 1456)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/xml_parser_decl.cpp	(revision 1457)
@@ -37,4 +37,5 @@
     macro( DuplicateScalarToAxis )
     macro( ReduceScalarToScalar )
+    macro( ReorderDomain )
   }
 }
