Index: XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.cpp	(revision 174)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.cpp	(revision 180)
@@ -4,4 +4,6 @@
 #include "object_template_impl.hpp"
 #include "group_template_impl.hpp"
+
+#include <algorithm>
 
 namespace xmlioserver {
@@ -13,4 +15,5 @@
       : CObjectTemplate<CDomain>(), CDomainAttributes()
       , isChecked(false), local_mask(new CMask()), relFiles()
+      , ibegin_sub(), iend_sub(), jbegin_sub(), jend_sub()
    { /* Ne rien faire de plus */ }
 
@@ -18,4 +21,5 @@
       : CObjectTemplate<CDomain>(id), CDomainAttributes()
       , isChecked(false), local_mask(new CMask()), relFiles()
+      , ibegin_sub(), iend_sub(), jbegin_sub(), jend_sub()
    { /* Ne rien faire de plus */ }
 
@@ -30,4 +34,6 @@
    }
 
+   //----------------------------------------------------------------
+
    bool CDomain::IsWritten(const StdString & filename) const
    {
@@ -35,7 +41,53 @@
    }
 
+   //----------------------------------------------------------------
+
    void CDomain::addRelFile(const StdString & filename)
    {
       this->relFiles.insert(filename);
+   }
+
+   //----------------------------------------------------------------
+
+   void CDomain::fromBinary(StdIStream & is)
+   {
+      SuperClass::fromBinary(is);
+      
+      this->ibegin_sub.push_back(this->ibegin.getValue());
+      this->jbegin_sub.push_back(this->jbegin.getValue());
+      this->iend_sub.push_back(this->iend.getValue());
+      this->jend_sub.push_back(this->jend.getValue());      
+      
+#define CLEAR_ATT(name_)\
+      SuperClassAttribute::operator[](#name_)->clear()
+
+         CLEAR_ATT(mask);
+         CLEAR_ATT(data_n_index);
+         CLEAR_ATT(data_i_index);
+         CLEAR_ATT(data_j_index);
+         
+         CLEAR_ATT(data_ni);
+         CLEAR_ATT(data_nj);
+         CLEAR_ATT(data_ibegin);
+         CLEAR_ATT(data_jbegin);
+         
+         CLEAR_ATT(ni);
+         CLEAR_ATT(nj);
+         
+         CLEAR_ATT(latvalue);
+         CLEAR_ATT(lonvalue);
+#undef CLEAR_ATT
+
+      this->ibegin.setValue(*std::min_element(this->ibegin_sub.begin(),this->ibegin_sub.end()));
+      this->jbegin.setValue(*std::min_element(this->jbegin_sub.begin(),this->jbegin_sub.end()));
+      this->iend.setValue(*std::max_element(this->iend_sub.begin(),this->iend_sub.end()));
+      this->jend.setValue(*std::max_element(this->jend_sub.begin(),this->jend_sub.end()));
+      
+      this->checkGlobalDomain();
+      this->checkLocalIDomain();
+      this->checkLocalJDomain();
+      this->completeMask();
+      
+      this->isChecked = true;
    }
 
@@ -150,5 +202,4 @@
          mask.setValue(__arr);
       }
-
    }
 
@@ -157,5 +208,5 @@
 
    void CDomain::checkDomainData(void)
-   {
+   {     
       if (!data_dim.isEmpty() &&
          !(data_dim.getValue() == 1 || data_dim.getValue() == 2))
@@ -252,4 +303,5 @@
          {
             const int dni = data_ni.getValue() * data_nj.getValue();
+            
             ARRAY_CREATE(__arri, int, 1, [dni]);
             ARRAY_CREATE(__arrj, int, 1, [dni]);               
@@ -289,5 +341,5 @@
    void CDomain::completeMask(void)
    {
-      this->local_mask->resize(data_ni.getValue(), data_nj.getValue());
+      this->local_mask->resize(ni.getValue(), nj.getValue());
       /*this->local_mask->setDataPosition
          (data_dim.getValue(), data_ni.getValue(), data_nj.getValue(),
Index: XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.hpp	(revision 174)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.hpp	(revision 180)
@@ -63,4 +63,7 @@
 
       public :
+      
+         /// Autres ///
+         virtual void fromBinary(StdIStream & is);
 
          /// Accesseurs ///
@@ -90,4 +93,6 @@
          std::set<StdString> relFiles;
 
+         std::vector<int> ibegin_sub, iend_sub, jbegin_sub, jend_sub;
+
    }; // class CDomain
 
Index: XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.cpp	(revision 174)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.cpp	(revision 180)
@@ -34,18 +34,49 @@
 
    const ARRAY(int, 1) & CGrid::getStoreIndex(void) const
-   { return (this->storeIndex ); }
+   { 
+      return (this->storeIndex );
+   }
+
+   //---------------------------------------------------------------
+
    const ARRAY(int, 1) & CGrid::getOutIIndex(void)  const
-   { return (this->out_i_index ); }
+   { 
+      return (this->out_i_index ); 
+   }
+
+   //---------------------------------------------------------------
+
    const ARRAY(int, 1) & CGrid::getOutJIndex(void)  const
-   { return (this->out_j_index ); }
+   { 
+      return (this->out_j_index ); 
+   }
+
+   //---------------------------------------------------------------
+
    const ARRAY(int, 1) & CGrid::getOutLIndex(void)  const
-   { return (this->out_l_index ); }
+   { 
+      return (this->out_l_index ); 
+   }
+
+   //---------------------------------------------------------------
 
    const boost::shared_ptr<CAxis>   CGrid::getRelAxis  (void) const
-   { return (this->axis ); }
+   { 
+      return (this->axis ); 
+   }
+
+   //---------------------------------------------------------------
+
    const boost::shared_ptr<CDomain> CGrid::getRelDomain(void) const
-   { return (this->domain ); }
-
-   bool CGrid::hasAxis(void) const { return (this->withAxis); }
+   { 
+      return (this->domain ); 
+   }
+
+   //---------------------------------------------------------------
+
+   bool CGrid::hasAxis(void) const 
+   { 
+      return (this->withAxis); 
+   }
 
    //---------------------------------------------------------------
@@ -59,4 +90,6 @@
       this->isChecked = true;
    }
+
+   //---------------------------------------------------------------
 
    void CGrid::solveDomainRef(void)
@@ -76,4 +109,6 @@
    }
 
+   //---------------------------------------------------------------
+
    void CGrid::solveAxisRef(void)
    {
@@ -95,5 +130,5 @@
 
    void CGrid::computeIndex(void)
-   {
+   {    
       const int ni   = domain->ni.getValue() ,
                 nj   = domain->nj.getValue() ,
@@ -113,7 +148,7 @@
                     data_j_index = domain->data_j_index.getValue() ;
 
-      /*std::cout << data_n_index        << " : "
-                  << data_i_index.size() << " : "
-                  << data_j_index.size() << std::endl;*/
+      /*std::cout << data_n_index  << " : "
+                  << data_i_index  << " : "
+                  << data_j_index  << std::endl; */
 
       ARRAY(bool, 2) mask = domain->mask.getValue() ;
@@ -204,4 +239,6 @@
    }
 
+   //---------------------------------------------------------------
+
    template <>
       void CGrid::outputField
@@ -211,4 +248,6 @@
          (*field)[(*out_i_index)[n]][(*out_j_index)[n]] = (*stored)[n] ;
    }
+
+   //---------------------------------------------------------------
 
    template <>
@@ -230,4 +269,33 @@
          (*stored)[i] = data[(*storeIndex)[i]] ;
    }
+   
+   //---------------------------------------------------------------
+   
+   void CGrid::toBinary  (StdOStream & os) const
+   {
+      SuperClass::toBinary(os);
+      this->storeIndex->toBinary(os);
+      this->out_i_index->toBinary(os);
+      this->out_j_index->toBinary(os);
+      this->out_l_index->toBinary(os);
+   }
+
+   //---------------------------------------------------------------
+   
+   void CGrid::fromBinary(StdIStream & is)
+   {
+      SuperClass::fromBinary(is);
+      
+      ARRAY_CREATE(storeIndex_ , int, 1, [1]);
+      ARRAY_CREATE(out_l_index_, int, 1, [1]);
+      ARRAY_CREATE(out_i_index_, int, 1, [1]);
+      ARRAY_CREATE(out_j_index_, int, 1, [1]);
+      
+      storeIndex_ ->fromBinary(is);
+      out_i_index_->fromBinary(is);
+      out_j_index_->fromBinary(is);
+      out_l_index_->fromBinary(is);
+      
+   }
 
    ///---------------------------------------------------------------
Index: XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.hpp	(revision 174)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.hpp	(revision 180)
@@ -49,4 +49,7 @@
          /// Traitements ///
          void solveReference(void);
+
+         virtual void toBinary  (StdOStream & os) const;
+         virtual void fromBinary(StdIStream & is);
 
          /// Tests ///
