Index: XIOS/trunk/src/node/domain.cpp
===================================================================
--- XIOS/trunk/src/node/domain.cpp	(revision 1542)
+++ XIOS/trunk/src/node/domain.cpp	(revision 1549)
@@ -77,4 +77,5 @@
      m["expand_domain"] = TRANS_EXPAND_DOMAIN;
      m["reorder_domain"] = TRANS_REORDER_DOMAIN;
+     m["extract_domain"] = TRANS_EXTRACT_DOMAIN;
    }
 
@@ -1212,6 +1213,6 @@
 
    /*
-     Fill in longitude and latitude value from clients (or models) into internal values lonvalue, latvalue which
-     will be used by XIOS.
+     Fill in longitude, latitude, bounds, and area into internal values (lonvalue, latvalue, bounds_lonvalue, bounds_latvalue, areavalue)
+     which will be used by XIOS.
    */
    void CDomain::completeLonLatClient(void)
@@ -1219,4 +1220,6 @@
      bool lonlatValueExisted = (0 != lonvalue.numElements()) || (0 != latvalue.numElements());
      checkBounds() ;
+     checkArea() ;
+
      if (!lonvalue_2d.isEmpty() && !lonlatValueExisted)
      {
@@ -1313,4 +1316,17 @@
        }
      }
+
+     if (!area.isEmpty() && areavalue.isEmpty())
+     {
+        areavalue.resize(ni*nj);
+       for (int j = 0; j < nj; ++j)
+       {
+         for (int i = 0; i < ni; ++i)
+         {
+           int k = j * ni + i;
+           areavalue(k) = area(i,j);
+         }
+       }
+     }
    }
 
@@ -1455,5 +1471,5 @@
                << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
                << "'bounds_lon_1d' dimension is not compatible with 'nvertex'." << std::endl
-               << "'bounds_lon_1d' dimension is " << bounds_lon_1d.extent(1)
+               << "'bounds_lon_1d' dimension is " << bounds_lon_1d.extent(0)
                << " but nvertex is " << nvertex.getValue() << ".");
 
@@ -1462,5 +1478,5 @@
                << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
                << "'bounds_lon_2d' dimension is not compatible with 'nvertex'." << std::endl
-               << "'bounds_lon_2d' dimension is " << bounds_lon_2d.extent(2)
+               << "'bounds_lon_2d' dimension is " << bounds_lon_2d.extent(0)
                << " but nvertex is " << nvertex.getValue() << ".");
 
@@ -1479,5 +1495,5 @@
                << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
                << "'bounds_lat_1d' dimension is not compatible with 'nvertex'." << std::endl
-               << "'bounds_lat_1d' dimension is " << bounds_lat_1d.extent(1)
+               << "'bounds_lat_1d' dimension is " << bounds_lat_1d.extent(0)
                << " but nvertex is " << nvertex.getValue() << ".");
 
@@ -1486,5 +1502,5 @@
                << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] "
                << "'bounds_lat_2d' dimension is not compatible with 'nvertex'." << std::endl
-               << "'bounds_lat_2d' dimension is " << bounds_lat_2d.extent(2)
+               << "'bounds_lat_2d' dimension is " << bounds_lat_2d.extent(0)
                << " but nvertex is " << nvertex.getValue() << ".");
 
@@ -1525,16 +1541,16 @@
                << "Area size is " << area.extent(0) << " x " << area.extent(1) << ".");
        }
-       if (areavalue.isEmpty())
-       {
-          areavalue.resize(ni*nj);
-         for (int j = 0; j < nj; ++j)
-         {
-           for (int i = 0; i < ni; ++i)
-           {
-             int k = j * ni + i;
-             areavalue(k) = area(i,j);
-           }
-         }
-       }
+//       if (areavalue.isEmpty())
+//       {
+//          areavalue.resize(ni*nj);
+//         for (int j = 0; j < nj; ++j)
+//         {
+//           for (int i = 0; i < ni; ++i)
+//           {
+//             int k = j * ni + i;
+//             areavalue(k) = area(i,j);
+//           }
+//         }
+//       }
      }
    }
Index: XIOS/trunk/src/node/extract_domain.cpp
===================================================================
--- XIOS/trunk/src/node/extract_domain.cpp	(revision 1549)
+++ XIOS/trunk/src/node/extract_domain.cpp	(revision 1549)
@@ -0,0 +1,74 @@
+#include "extract_domain.hpp"
+#include "type.hpp"
+
+namespace xios {
+
+  /// ////////////////////// DÃ©finitions ////////////////////// ///
+
+  CExtractDomain::CExtractDomain(void)
+    : CObjectTemplate<CExtractDomain>(), CExtractDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CExtractDomain::CExtractDomain(const StdString & id)
+    : CObjectTemplate<CExtractDomain>(id), CExtractDomainAttributes(), CTransformation<CDomain>()
+  { /* Ne rien faire de plus */ }
+
+  CExtractDomain::~CExtractDomain(void)
+  {}
+
+  CTransformation<CDomain>* CExtractDomain::create(const StdString& id, xml::CXMLNode* node)
+  {
+    CExtractDomain* extractDomain = CExtractDomainGroup::get("extract_domain_definition")->createChild(id);
+    if (node) extractDomain->parse(*node);
+    return static_cast<CTransformation<CDomain>*>(extractDomain);
+  }
+
+  bool CExtractDomain::_dummyRegistered = CExtractDomain::registerTrans();
+  bool CExtractDomain::registerTrans()
+  {
+    registerTransformation(TRANS_EXTRACT_DOMAIN, CExtractDomain::create);
+  }
+
+  //----------------------------------------------------------------
+
+  StdString CExtractDomain::GetName(void)    { return StdString("extract_domain"); }
+  StdString CExtractDomain::GetDefName(void) { return StdString("extract_domain"); }
+  ENodeType CExtractDomain::GetType(void)    { return eExtractDomain; }
+
+  void CExtractDomain::checkValid(CDomain* domainSrc)
+  {
+    int ni_glo = domainSrc->ni_glo.getValue();
+    int nj_glo = domainSrc->nj_glo.getValue();
+
+    // RÃ©solution et vÃ©rification des donnÃ©es globales de extract.
+    if (!this->ni.isEmpty() || !this->nj.isEmpty() ||
+        !this->ibegin.isEmpty() || !this->jbegin.isEmpty())
+    {
+       if (this->ni.isEmpty()     || this->nj.isEmpty() ||
+           this->ibegin.isEmpty() || this->jbegin.isEmpty())
+       {
+         ERROR("CExtractDomain::checkValid(CDomain* domainSrc)",
+               << "If one of extract attributes is defined then all extract attributes must be defined.") ;
+       }
+       else
+       {
+          int iend = ibegin + ni - 1;
+          int jend = jbegin + nj - 1;
+
+          if (ibegin < 0  || jbegin < 0 || iend > ni_glo - 1 || jend > nj_glo - 1)
+            ERROR("CExtractDomain::checkValid(CDomain* domainSrc)",
+                  << "Extract is wrongly defined, "
+                  << "please check the values : 'ni' (" << ni.getValue() << "), 'nj' (" << nj.getValue() << "), "
+                  << "'ibegin' (" << ibegin.getValue() << "), 'jbegin' (" << jbegin.getValue() << ")");
+       }
+    }
+    else
+    {
+       ni = ni_glo;
+       nj = nj_glo;
+       ibegin = 0;
+       jbegin = 0;
+    }
+  }
+
+}
Index: XIOS/trunk/src/node/extract_domain.hpp
===================================================================
--- XIOS/trunk/src/node/extract_domain.hpp	(revision 1549)
+++ XIOS/trunk/src/node/extract_domain.hpp	(revision 1549)
@@ -0,0 +1,67 @@
+#ifndef __XIOS_CExtractDomain__
+#define __XIOS_CExtractDomain__
+
+/// 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 CExtractDomainGroup;
+  class CExtractDomainAttributes;
+  class CExtractDomain;
+  class CDomain;
+
+  ///--------------------------------------------------------------
+
+  // Declare/Define CFileAttribute
+  BEGIN_DECLARE_ATTRIBUTE_MAP(CExtractDomain)
+#include "extract_domain_attribute.conf"
+  END_DECLARE_ATTRIBUTE_MAP(CExtractDomain)
+
+  ///--------------------------------------------------------------
+  /*!
+    \class CExtractDomain
+    This class describes extract_domain in xml file.
+  */
+  class CExtractDomain
+    : public CObjectTemplate<CExtractDomain>
+    , public CExtractDomainAttributes
+    , public CTransformation<CDomain>
+  {
+    public :
+      typedef CObjectTemplate<CExtractDomain> SuperClass;
+      typedef CExtractDomainAttributes SuperClassAttribute;
+
+    public :
+      /// Constructeurs ///
+      CExtractDomain(void);
+      explicit CExtractDomain(const StdString& id);
+
+      /// Destructeur ///
+      virtual ~CExtractDomain(void);
+
+      virtual void checkValid(CDomain* axisDest);
+
+      /// 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 CExtractDomain
+
+  DECLARE_GROUP(CExtractDomain);
+} // namespace xios
+
+#endif // __XIOS_CExtractDomain__
Index: XIOS/trunk/src/node/node_enum.hpp
===================================================================
--- XIOS/trunk/src/node/node_enum.hpp	(revision 1542)
+++ XIOS/trunk/src/node/node_enum.hpp	(revision 1549)
@@ -38,5 +38,6 @@
          eDuplicateScalarToAxis,
          eReduceScalarToScalar,
-         eReorderDomain
+         eReorderDomain,
+         eExtractDomain
        } ENodeType;
 
Index: XIOS/trunk/src/node/node_type.hpp
===================================================================
--- XIOS/trunk/src/node/node_type.hpp	(revision 1542)
+++ XIOS/trunk/src/node/node_type.hpp	(revision 1549)
@@ -29,4 +29,5 @@
 #include "reduce_scalar_to_scalar.hpp"
 #include "reorder_domain.hpp"
+#include "extract_domain.hpp"
 
 
Index: XIOS/trunk/src/node/transformation_enum.hpp
===================================================================
--- XIOS/trunk/src/node/transformation_enum.hpp	(revision 1542)
+++ XIOS/trunk/src/node/transformation_enum.hpp	(revision 1549)
@@ -24,5 +24,6 @@
         TRANS_DUPLICATE_SCALAR_TO_AXIS = 15,
         TRANS_REDUCE_SCALAR_TO_SCALAR = 16,
-        TRANS_REORDER_DOMAIN = 17
+        TRANS_REORDER_DOMAIN = 17,
+        TRANS_EXTRACT_DOMAIN = 18
       } ETranformationType;
 
