Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/NetCDF4_data_output.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/NetCDF4_data_output.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/NetCDF4_data_output.hpp	(revision 138)
@@ -7,5 +7,4 @@
 namespace XMLIOSERVER
 {
-
    static const char* TimeName = "time";
 
@@ -81,11 +80,29 @@
          }
 
-         void writeCoords(const string& id, const Array<double, 1>& cdata)
+         void writeCoords(const string& id, const Array<double, 1>& cdata, const CDomain * dom = NULL)
          {
             NcVar *cVar = dataFile->get_var(id.c_str());
 
-            if (!cVar->put(cdata.dataFirst(), cdata.size()))
-               throw XMLIOUndefinedValueException
-                  ("Impossible d'Ã©crire les valeurs de coordonnÃ©es "+ id +" !");
+            if (dom == NULL)
+            {
+               if (!cVar->put(cdata.dataFirst(), cdata.size()))
+                  XMLIOError
+                     ("Impossible d'Ã©crire les valeurs de coordonnÃ©es "+ id +" !");
+            }
+            else
+            {
+               if( dom->lonvalue.getValueConst()->size() == (dom->ni * dom->nj))
+               { // curvilineaire
+                  if (!cVar->put(cdata.dataFirst(), dom->nj, dom->ni))
+                     XMLIOError
+                        ("Impossible d'Ã©crire les valeurs de coordonnÃ©es "+ id +" !");
+               }
+               else
+               { // rectilineaire
+                  if (!cVar->put(cdata.dataFirst(), cdata.size()))
+                     XMLIOError
+                        ("Impossible d'Ã©crire les valeurs de coordonnÃ©es "+ id +" !");
+               }
+            }
          }
 
@@ -108,5 +125,5 @@
 
                if (!(oVar = dataFile->add_var(cid.c_str(), ncDouble, dataFile->get_dim(TimeName))))
-                  throw XMLIOUndefinedValueException
+                  XMLIOError
                      ("Impossible d'ajouter la coordonnÃ©e temporelle "+cid+" !");
 
@@ -131,5 +148,5 @@
             dataFile = new NcFile(filename.c_str(), NcFile::Replace);
             if(!dataFile->is_valid())
-               throw XMLIOUndefinedValueException
+               XMLIOError
                   ("Impossible d'ouvrir le fichier '"+ filename +"' pour l'Ã©criture des donnÃ©es' !");
 
@@ -152,10 +169,10 @@
             for (it = allDim.begin() ; it != allDim.end(); it++)
                if (NULL == dataFile->add_dim((*it).first.c_str(), (*it).second))
-                  throw XMLIOUndefinedValueException("Impossible d'ajouter la dimension "+ (*it).first +" !");
+                  XMLIOError("Impossible d'ajouter la dimension "+ (*it).first +" !");
 
             // Ajout de la dimension temporelle non limitÃ©e.
             if (withTime)
                if (NULL == dataFile->add_dim(TimeName))
-                  throw XMLIOUndefinedValueException("Impossible d'ajouter la dimension temporelle !");
+                  XMLIOError("Impossible d'ajouter la dimension temporelle !");
          }
 
@@ -175,13 +192,38 @@
             for ( itt = sdom.begin() ; itt != sdom.end(); itt++ )
             {
-               string domid = ((*itt)->name.hasValue()) ? (string)(*itt)->name : (*itt)->getId();
-               string lonid = (sdom.size() == 1)? string("lon"): string("lon_").append(domid);
-               string latid = (sdom.size() == 1)? string("lat"): string("lat_").append(domid);
-
-               if (!(latVar = dataFile->add_var(latid.c_str(), ncFloat, dataFile->get_dim(latid.c_str()))))
-                  throw XMLIOUndefinedValueException("Impossible d'ajouter la variable de latitude !");
-
-               if (!(lonVar = dataFile->add_var(lonid.c_str(), ncFloat, dataFile->get_dim(lonid.c_str()))))
-                  throw XMLIOUndefinedValueException("Impossible d'ajouter la variable de longitude !");
+               string domid = (*itt)->name.hasValue()
+                              ? (string)(*itt)->name : (*itt)->getId();
+               string lonid = (sdom.size() == 1)
+                              ? string("lon"): string("lon_").append(domid);
+               string latid = (sdom.size() == 1)
+                              ? string("lat"): string("lat_").append(domid);
+
+
+               if( (*itt)->lonvalue.getValueConst()->size() == ((*itt)->ni * (*itt)->nj))
+               { // cas curvilinÃ©aire
+
+                  string clonid = (sdom.size() == 1)
+                                  ? string("nav_lon"): string("nav_lon_").append(domid);
+                  string clatid = (sdom.size() == 1)
+                                  ? string("nav_lat"): string("nav_lat_").append(domid);
+                  if (!(latVar = dataFile->add_var(clatid.c_str(), ncFloat,
+                                 dataFile->get_dim(latid.c_str()), dataFile->get_dim(lonid.c_str()))))
+                     XMLIOError("Impossible d'ajouter la variable de latitude !");
+
+                  if (!(lonVar = dataFile->add_var(clonid.c_str(), ncFloat,
+                                 dataFile->get_dim(latid.c_str()), dataFile->get_dim(lonid.c_str()))))
+                     XMLIOError("Impossible d'ajouter la variable de longitude !");
+
+                  lonid = clonid; // beurk
+                  latid = clatid;
+               }
+               else
+               { // cas rectilineaire
+                  if (!(latVar = dataFile->add_var(latid.c_str(), ncFloat, dataFile->get_dim(latid.c_str()))))
+                     XMLIOError("Impossible d'ajouter la variable de latitude !");
+
+                  if (!(lonVar = dataFile->add_var(lonid.c_str(), ncFloat, dataFile->get_dim(lonid.c_str()))))
+                     XMLIOError("Impossible d'ajouter la variable de longitude !");
+               }
 
                // Attribut de latitude.
@@ -218,11 +260,11 @@
 
                if ((*itt)->lonvalue.hasValue())
-                  this->writeCoords(lonid, (*itt)->lonvalue);
-               else throw XMLIOUndefinedValueException
+                  this->writeCoords(lonid, (*itt)->lonvalue, *itt);
+               else XMLIOError
                   ("Les coordonnÃ©es de longitude (xvalue) ne sont pas dÃ©finies pour le domaine \""+domid+"\".");
 
                if ((*itt)->latvalue.hasValue())
-                  this->writeCoords(latid, (*itt)->latvalue);
-               else throw XMLIOUndefinedValueException
+                  this->writeCoords(latid, (*itt)->latvalue, *itt);
+               else XMLIOError
                   ("Les coordonnÃ©es de latitude (yvalue) ne sont pas dÃ©finies pour le domaine \""+domid+"\".");
             }
@@ -234,5 +276,5 @@
                string axisid = ((*it)->name.hasValue()) ? (string)(*it)->name : (*it)->getId();
                if (!(othvar = dataFile->add_var(axisid.c_str(), ncFloat, dataFile->get_dim(axisid.c_str()))))
-                  throw XMLIOUndefinedValueException("Impossible d'ajouter la variable "+ (*it)->getId() +" !");
+                  XMLIOError("Impossible d'ajouter la variable "+ (*it)->getId() +" !");
 
                hm["axis"]     = "Z" ;
@@ -255,5 +297,5 @@
                if ((*it)->zvalue.hasValue())
                   this->writeCoords(axisid, (*it)->zvalue);
-               else throw XMLIOUndefinedValueException
+               else XMLIOError
                   ("Les coordonnÃ©es de l'axe \""+axisid+"\" (value) ne sont pas dÃ©finies.");
             }
@@ -317,5 +359,5 @@
                                  dataFile->get_dim(latid.c_str()),
                                  dataFile->get_dim(lonid.c_str()))))
-                        throw XMLIOUndefinedValueException("Impossible d'ajouter le champ "+ field->getId() +" !");
+                        XMLIOError("Impossible d'ajouter le champ "+ field->getId() +" !");
                   }
                   else // 3D spatio + temps
@@ -326,5 +368,5 @@
                                  dataFile->get_dim(latid.c_str()),
                                  dataFile->get_dim(lonid.c_str()))))
-                        throw XMLIOUndefinedValueException("Impossible d'ajouter le champ "+ field->getId() +" !");
+                        XMLIOError("Impossible d'ajouter le champ "+ field->getId() +" !");
                   }
                }
@@ -336,5 +378,5 @@
                                  dataFile->get_dim(latid.c_str()),
                                  dataFile->get_dim(lonid.c_str()))))
-                        throw XMLIOUndefinedValueException("Impossible d'ajouter le champ "+ field->getId() +" !");
+                        XMLIOError("Impossible d'ajouter le champ "+ field->getId() +" !");
                   }
                   else // 3D spatio sans temps
@@ -344,5 +386,5 @@
                                  dataFile->get_dim(latid.c_str()),
                                  dataFile->get_dim(lonid.c_str()))))
-                        throw XMLIOUndefinedValueException("Impossible d'ajouter le champ "+ field->getId() +" !");
+                        XMLIOError("Impossible d'ajouter le champ "+ field->getId() +" !");
                   }
                }
@@ -377,5 +419,5 @@
             for ( it = attr.begin() ; it != attr.end(); it++ )
                if (!var->add_att((*it).first.c_str(), (*it).second))
-                  throw XMLIOUndefinedValueException
+                  XMLIOError
                      ("Impossible d'ajouter l'attribut' "+ (*it).first +" Ã  la variable "+ var->name() +" !");
          }
@@ -387,5 +429,5 @@
             for ( it = attr.begin() ; it != attr.end(); it++ )
                if (!var->add_att((*it).first.c_str(), (*it).second.c_str()))
-                  throw XMLIOUndefinedValueException
+                  XMLIOError
                      ("Impossible d'ajouter l'attribut' "+ (*it).first +" Ã  la variable "+ var->name() +" !");
          }
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/abstract_calendar.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/abstract_calendar.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/abstract_calendar.hpp	(revision 138)
@@ -1,4 +1,6 @@
 #ifndef __XMLIO_ABSTRACT_CALENDAR__
 #define __XMLIO_ABSTRACT_CALENDAR__
+
+#include "abstract_object.hpp"
 
 namespace XMLIOSERVER
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/abstract_object.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/abstract_object.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/abstract_object.hpp	(revision 138)
@@ -8,8 +8,8 @@
       public :
 
-         const std::string& getId(void) const throw (XMLIOUndefinedValueException)
+         const std::string& getId(void) const
          {
             if (!hasId()) // Si l'identifiant de l'objet n'est pas dÃ©fini.
-               throw XMLIOSERVER::XMLIOUndefinedValueException("Appel de la mÃ©thode AbstractObject::getId invalide.");
+               XMLIOError("Appel de la mÃ©thode AbstractObject::getId invalide.");
             return (id);
          }
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/attribut.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/attribut.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/attribut.hpp	(revision 138)
@@ -5,5 +5,4 @@
 
 using XMLIOSERVER::BaseAttribut;
-using XMLIOSERVER::XMLIOUndefinedValueException;
 using std::ostringstream;
 using namespace blitz ;
@@ -38,9 +37,15 @@
          {
             if (!_hasValue)
-               throw XMLIOUndefinedValueException("L'attribut \"" + this->getName() + "\" est invalide !");
+               XMLIOError("L'attribut \"" + this->getName() + "\" est invalide !");
             return (value) ;
          }
 
          Ctype* getValue(void)
+         {
+            //if (!_hasValue) return(NULL); // REVOIR: 4 h de debug Ã  cause de Ã§a !!!
+            return (&value);
+         }
+
+         const Ctype * getValueConst(void) const
          {
             //if (!_hasValue) return(NULL); // REVOIR: 4 h de debug Ã  cause de Ã§a !!!
@@ -81,5 +86,5 @@
          virtual void getValue(Ctype & value_) const
          {
-            if (!_hasValue) throw XMLIOUndefinedValueException("L'attribut \"" + this->getName() + "\" est invalide !");
+            if (!_hasValue) XMLIOError("L'attribut \"" + this->getName() + "\" est invalide !");
             value_ = value ;
          }
@@ -160,5 +165,5 @@
                   iss >> c >> d;
                   if (c != ',')
-                     throw XMLIOUndefinedValueException("Le tableau de valeur est mal dÃ©fini !");
+                     XMLIOError("Le tableau de valeur est mal dÃ©fini !");
                   vect.push_back(d);
                }
@@ -171,5 +176,5 @@
                   iss >> size >> c >> d;
                   if ((c != ')') || (size <= 0))
-                     throw XMLIOUndefinedValueException("Le tableau de valeur est mal dÃ©fini !");
+                     XMLIOError("Le tableau de valeur est mal dÃ©fini !");
                   valsup = d;
                }
@@ -179,5 +184,5 @@
                break;
             default :
-               throw XMLIOUndefinedValueException("Le tableau de valeur est mal dÃ©fini !");
+               XMLIOError("Le tableau de valeur est mal dÃ©fini !");
          }
       }
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/attribut_registrar.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/attribut_registrar.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/attribut_registrar.hpp	(revision 138)
@@ -30,5 +30,5 @@
          const StrHashMap<BaseAttribut>& getAttrList(void) const { return (attrList); }
 
-         BaseAttribut* getAttribut(const string& _id) throw (XMLIOUndefinedValueException) { return (attrList[_id]); }
+         BaseAttribut* getAttribut(const string& _id)  { return (attrList[_id]); }
 
          friend ostream& operator<< (ostream& out, const AttributRegistrar& c)
@@ -65,5 +65,5 @@
          {
             if (hasAttribut(att_name)) getAttribut(att_name)->setFromString(value);
-            else throw XMLIOUndefinedValueException("Impossible de trouver l'attribut nommÃ© \""
+            else XMLIOError("Impossible de trouver l'attribut nommÃ© \""
                + att_name +"\" dans la liste des attributs enregistrÃ©s !");
          }
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/base_attribut.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/base_attribut.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/base_attribut.hpp	(revision 138)
@@ -4,6 +4,4 @@
 using std::ostream;
 using namespace blitz ;
-
-using XMLIOSERVER::XMLIOIncompatibleTypeException;
 
 namespace XMLIOSERVER
@@ -62,9 +60,9 @@
 
          static void error_set(void)
-         { throw XMLIOIncompatibleTypeException
+         { XMLIOError
            ("BaseAttribut::set<type> > Setting value type is incompatible with attribut type"); }
 
          static void error_get(void)
-         { throw XMLIOIncompatibleTypeException
+         { XMLIOError
            ("BaseAttribut::set<type> >Getting value type is incompatible with attribut type"); }
 
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/c_interface.cpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/c_interface.cpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/c_interface.cpp	(revision 138)
@@ -44,13 +44,13 @@
 void xios_xml_parse_file(const XString _filename, XSize _filename_len)
 {
-   MAKE_STRING(__filename, _filename, _filename_len);
-   std::ifstream __istr( __filename.c_str() , std::ifstream::in );
-
-   // On commence la lecture du flux de donnÃ©e xml.
-   XMLNode node = XMLNode::CreateNode(__istr, Context::GetRootName());
-   // On parse le fichier xml noeud par noeud
-   // (ie on construit dynamiquement notre arbre d'objets).
-   XMLParser::Parse(node);
-
+
+      MAKE_STRING(__filename, _filename, _filename_len);
+      std::ifstream __istr( __filename.c_str() , std::ifstream::in );
+
+      // On commence la lecture du flux de donnÃ©e xml.
+      XMLNode node = XMLNode::CreateNode(__istr, Context::GetRootName());
+      // On parse le fichier xml noeud par noeud
+      // (ie on construit dynamiquement notre arbre d'objets).
+      XMLParser::Parse(node);
 }
 
@@ -76,5 +76,7 @@
 
 void xios_context_create (XPtr * _ctx, const XString _ctx_id,
-                          XSize _ctx_id_len, XCalendarType _calType)
+                          XSize _ctx_id_len, XCalendarType _calType,
+                          XInt yr, XInt mth, XInt dd,
+                          XInt hr, XInt min, XInt sec)
 {
    MAKE_STRING(__ctx_id, _ctx_id, _ctx_id_len);
@@ -92,13 +94,18 @@
    {
       case (D360) :
-         context->setCalendar(new D360Calendar());      return;
+         context->setCalendar(new D360Calendar(yr, mth, dd, hr, min, sec));
+         return;
       case (ALLLEAP) :
-         context->setCalendar(new AllLeapCalendar());   return;
+         context->setCalendar(new AllLeapCalendar(yr, mth, dd, hr, min, sec));
+         return;
       case (NOLEAP) :
-         context->setCalendar(new NoLeapCalendar());    return;
+         context->setCalendar(new NoLeapCalendar(yr, mth, dd, hr, min, sec));
+         return;
       case (JULIAN) :
-         context->setCalendar(new JulianCalendar());    return;
+         context->setCalendar(new JulianCalendar(yr, mth, dd, hr, min, sec));
+         return;
       case (GREGORIAN) :
-         context->setCalendar(new GregorianCalendar()); return;
+         context->setCalendar(new GregorianCalendar(yr, mth, dd, hr, min, sec));
+         return;
       default:
          std::cerr << "[context_create] Type de calendrier invalide [0-5]" << std::endl;
@@ -149,5 +156,6 @@
          CFile * _file = (CFile *) _parent;
          FieldGroup * _field_group = _file->createVirtualFieldGroup(_file->getId());
-         xios_xml_tree_add (_field_group, GFIELD, _child, _child_type, _child_id, _child_id_len);
+         xios_xml_tree_add (_field_group, GFIELD,
+                            _child, _child_type, _child_id, _child_id_len);
          return;
       }
@@ -279,5 +287,6 @@
 XML_SET_STRING(Axis, axis, unit, unit)
 
-void xios_xml_set_axis_value(XPtr const _axis, XDType _dtype, double value[], XSize value_size)
+void xios_xml_set_axis_value(XPtr const _axis, XDType _dtype,
+                             double value[], XSize value_size)
 {
    Array<double, 1> __arr(value, shape(value_size), neverDeleteData, FortranArray<1>());
@@ -312,5 +321,6 @@
 XML_SET(Domain, domain, int, nj, nj)
 
-void xios_xml_set_domain_mask(XPtr const _domain, XDType _dtype, bool * _mask , XSize _maskXsize, XSize _maskYsize)
+void xios_xml_set_domain_mask(XPtr const _domain, XDType _dtype, bool * _mask ,
+                              XSize _maskXsize, XSize _maskYsize)
 {
    Array<bool, 2> __arr(_mask, shape(_maskXsize, _maskYsize), neverDeleteData, FortranArray<2>());
@@ -336,5 +346,6 @@
 XML_SET(Domain, domain, int, dnindex, data_n_index)
 
-void xios_xml_set_domain_diindex(XPtr const _domain, XDType _dtype, int _diindex[], XSize _diindex_size)
+void xios_xml_set_domain_diindex(XPtr const _domain, XDType _dtype,
+                                 int _diindex[], XSize _diindex_size)
 {
    Array<int, 1> __arr(_diindex, shape(_diindex_size), neverDeleteData, FortranArray<1>());
@@ -351,5 +362,6 @@
 }
 
-void xios_xml_set_domain_djindex(XPtr const _domain, XDType _dtype, int _djindex[], XSize _djindex_size)
+void xios_xml_set_domain_djindex(XPtr const _domain, XDType _dtype,
+                                 int _djindex[], XSize _djindex_size)
 {
    Array<int, 1> __arr(_djindex, shape(_djindex_size), neverDeleteData, FortranArray<1>());
@@ -366,5 +378,6 @@
 }
 
-void xios_xml_set_domain_lonvalue(XPtr const _domain, XDType _dtype, double _lonvalue[], XSize _lonvalue_Xsize, XSize _lonvalue_Ysize)
+void xios_xml_set_domain_lonvalue(XPtr const _domain, XDType _dtype, double _lonvalue[],
+                                  XSize _lonvalue_Xsize, XSize _lonvalue_Ysize)
 {
    XSize __size = (_lonvalue_Ysize == -1)
@@ -383,5 +396,6 @@
 }
 
-void xios_xml_set_domain_latvalue(XPtr const _domain, XDType _dtype, double _latvalue[], XSize _latvalue_Xsize, XSize _latvalue_Ysize)
+void xios_xml_set_domain_latvalue(XPtr const _domain, XDType _dtype, double _latvalue[],
+                                  XSize _latvalue_Xsize, XSize _latvalue_Ysize)
 {
    XSize __size = (_latvalue_Ysize == -1)
@@ -428,5 +442,88 @@
          called = true;
       }
-   }
+      switch(filetype)
+      {
+         case (NETCDF4):
+            __dtrt->createDataOutput<NetCDF4DataOutput>();
+            return;
+         // Autres formats de fichiers si disponibles...
+         default:
+            return;
+      }
+   }
+}
+
+void xios_dtreatment_end(void)
+{
+
+
+}
+
+void xios_write_data(const XString _field_id, XSize _field_id_len, double * data_k8,
+                     XSize data_Xsize, XSize data_Ysize, XSize data_Zsize)
+{
+   MAKE_STRING(__field_id, _field_id, _field_id_len);
+
+   Context          * const __ctxt = Context::GetCurrentContext();
+   DataTreatment    * __dtrt = __ctxt->getDataTreatment();
+   AbstractCalendar * __cald = __ctxt->getCalendar();
+   if (__dtrt != NULL)
+   {
+      std::cout << "> ItÃ©ration de calcul effectuÃ©e Ã   la date t = " << __cald->getCurrentDate()
+                << " (soit aprÃšs " << (Time)__cald->getCurrentDate() << " sec.)." << std::endl;
+      std::cout << __field_id << " : "
+                << data_Xsize << " : "
+                << data_Ysize << " : "
+                << data_Zsize << std::endl;
+      if ((data_Zsize == -1) && (data_Ysize == -1))
+      { // cas 1D
+         Array<double, 1> __arr(data_k8, shape(data_Xsize),
+                                neverDeleteData, FortranArray<1>());
+         __dtrt->writeData<Array<double, 1> >(__field_id, __arr);
+      }
+      else if (data_Zsize == -1)
+      { // cas 2D
+         Array<double, 2> __arr(data_k8, shape(data_Xsize, data_Ysize),
+                                neverDeleteData, FortranArray<2>());
+         __dtrt->writeData<Array<double, 2> >(__field_id, __arr);
+      }
+      else
+      { // cas 3D
+         Array<double, 3> __arr(data_k8, shape(data_Xsize, data_Ysize, data_Zsize),
+                                neverDeleteData, FortranArray<3>());
+         __dtrt->writeData<Array<double, 3> >(__field_id, __arr);
+      }
+   }
+}
+
+/* ********************************************************** */
+/*                      CALENDAR INTERFACE                    */
+/* ********************************************************** */
+
+void xios_update_calendar(int step)
+{
+   Context * current = Context::GetCurrentContext();
+   AbstractCalendar * calendar =  current->getCalendar();
+   if (current->getDataTreatment() == NULL)
+   {
+      std::cerr << "Error : Le traitement n'a pas Ã©tÃ© effectuÃ©" << std::endl;
+      return;
+   }
+   calendar->update();
+}
+
+void xios_set_timestep(double ts_year, double ts_month, double ts_day,
+                       double ts_hour, double ts_minute, double ts_second)
+{
+   Context * current = Context::GetCurrentContext();
+   AbstractCalendar * calendar =  current->getCalendar();
+   struct _duration dr = { ts_year, ts_month , ts_day,
+                           ts_hour, ts_minute, ts_second };
+   if (current->getDataTreatment() == NULL)
+   {
+      std::cerr << "Error : Le traitement n'a pas Ã©tÃ© effectuÃ©" << std::endl;
+      return;
+   }
+   calendar->setTimeStep(dr);
 }
 
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/c_interface.f03
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/c_interface.f03	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/c_interface.f03	(revision 138)
@@ -23,5 +23,5 @@
    INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
 
-      SUBROUTINE xios_handle_create(ret, dtype, idt, idt_size) bind(C)
+      SUBROUTINE xios_handle_create(ret, dtype, idt, idt_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT)                :: ret
@@ -71,4 +71,38 @@
    END TYPE XDuration
 
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE xios_set_timestep(ts_year, ts_month, ts_day,          &
+                                   ts_hour, ts_minute, ts_second) BIND(C)
+         import C_DOUBLE
+         REAL (kind = C_DOUBLE), VALUE :: ts_year, ts_month, ts_day,   &
+                                          ts_hour, ts_minute, ts_second
+      END SUBROUTINE xios_set_timestep
+
+      SUBROUTINE xios_update_calendar(step) BIND(C)
+         import C_INT
+         INTEGER  (kind = C_INT), VALUE :: step
+      END SUBROUTINE xios_update_calendar
+
+   END INTERFACE
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE set_timestep(timestep)
+      TYPE(XDuration), INTENT(IN):: timestep
+
+      CALL xios_set_timestep(timestep%year, timestep%month , timestep%day,   &
+                             timestep%hour, timestep%minute, timestep%second)
+   END SUBROUTINE set_timestep
+
+   SUBROUTINE update_calendar(step)
+      INTEGER, INTENT(IN):: step
+      IF (step < 1) THEN
+         PRINT *, "L'argument 'step' ne peut Ãªtre nÃ©gatif ou nul"
+         STOP
+      END IF
+      CALL xios_update_calendar(step)
+   END SUBROUTINE update_calendar
+
 END MODULE ICALENDAR
 
@@ -82,5 +116,5 @@
    INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
 
-      SUBROUTINE xios_xml_tree_add(parent_, parent_type, child_, child_type, child_id, child_id_size) bind(C)
+      SUBROUTINE xios_xml_tree_add(parent_, parent_type, child_, child_type, child_id, child_id_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: parent_
@@ -92,5 +126,5 @@
       END SUBROUTINE xios_xml_tree_add
 
-      SUBROUTINE  xios_xml_tree_show(filename, filename_size) bind(C)
+      SUBROUTINE  xios_xml_tree_show(filename, filename_size) BIND(C)
          import C_CHAR, C_INT
          CHARACTER(kind = C_CHAR), DIMENSION(*) :: filename
@@ -101,5 +135,5 @@
       ! Attribut des Ã©lÃ©ments de type field et field_group !
       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-      SUBROUTINE  xios_xml_set_field_name(field, ftype, fname, fname_size) bind(C)
+      SUBROUTINE  xios_xml_set_field_name(field, ftype, fname, fname_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: field, ftype
@@ -108,5 +142,5 @@
       END SUBROUTINE xios_xml_set_field_name
 
-      SUBROUTINE  xios_xml_set_field_sname(field, ftype, fsname, fsname_size) bind(C)
+      SUBROUTINE  xios_xml_set_field_sname(field, ftype, fsname, fsname_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: field, ftype
@@ -115,5 +149,5 @@
       END SUBROUTINE xios_xml_set_field_sname
 
-      SUBROUTINE  xios_xml_set_field_lname(field, ftype, flname, flname_size) bind(C)
+      SUBROUTINE  xios_xml_set_field_lname(field, ftype, flname, flname_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: field, ftype
@@ -122,5 +156,5 @@
       END SUBROUTINE xios_xml_set_field_lname
 
-      SUBROUTINE  xios_xml_set_field_unit(field, ftype, funit, funit_size) bind(C)
+      SUBROUTINE  xios_xml_set_field_unit(field, ftype, funit, funit_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: field, ftype
@@ -129,5 +163,5 @@
       END SUBROUTINE xios_xml_set_field_unit
 
-      SUBROUTINE  xios_xml_set_field_operation(field, ftype, foperation, foperation_size) bind(C)
+      SUBROUTINE  xios_xml_set_field_operation(field, ftype, foperation, foperation_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: field, ftype
@@ -136,5 +170,5 @@
       END SUBROUTINE xios_xml_set_field_operation
 
-      SUBROUTINE  xios_xml_set_field_freq_op(field, ftype, year, month, day, hour, minute, second) bind(C)
+      SUBROUTINE  xios_xml_set_field_freq_op(field, ftype, year, month, day, hour, minute, second) BIND(C)
          import C_DOUBLE, C_INT
          INTEGER (kind = C_INT), VALUE  :: field, ftype
@@ -142,5 +176,5 @@
       END SUBROUTINE xios_xml_set_field_freq_op
 
-      SUBROUTINE  xios_xml_set_field_level(field, ftype, flevel) bind(C)
+      SUBROUTINE  xios_xml_set_field_level(field, ftype, flevel) BIND(C)
          import C_INT
          INTEGER (kind = C_INT), VALUE  :: field, ftype
@@ -148,5 +182,5 @@
       END SUBROUTINE xios_xml_set_field_level
 
-      SUBROUTINE  xios_xml_set_field_prec(field, ftype, fprec) bind(C)
+      SUBROUTINE  xios_xml_set_field_prec(field, ftype, fprec) BIND(C)
          import C_INT
          INTEGER (kind = C_INT), VALUE  :: field, ftype
@@ -154,5 +188,5 @@
       END SUBROUTINE xios_xml_set_field_prec
 
-      SUBROUTINE  xios_xml_set_field_enabled(field, ftype, fenabled) bind(C)
+      SUBROUTINE  xios_xml_set_field_enabled(field, ftype, fenabled) BIND(C)
          import C_INT, C_BOOL
          INTEGER (kind = C_INT), VALUE  :: field, ftype
@@ -160,5 +194,5 @@
       END SUBROUTINE xios_xml_set_field_enabled
 
-      SUBROUTINE  xios_xml_set_field_dref(field, ftype, fdref, fdref_size) bind(C)
+      SUBROUTINE  xios_xml_set_field_dref(field, ftype, fdref, fdref_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: field, ftype
@@ -167,5 +201,5 @@
       END SUBROUTINE xios_xml_set_field_dref
 
-      SUBROUTINE  xios_xml_set_field_aref(field, ftype, faref, faref_size) bind(C)
+      SUBROUTINE  xios_xml_set_field_aref(field, ftype, faref, faref_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: field, ftype
@@ -174,5 +208,5 @@
       END SUBROUTINE xios_xml_set_field_aref
 
-      SUBROUTINE  xios_xml_set_field_gref(field, ftype, fgref, fgref_size) bind(C)
+      SUBROUTINE  xios_xml_set_field_gref(field, ftype, fgref, fgref_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: field, ftype
@@ -181,5 +215,5 @@
       END SUBROUTINE xios_xml_set_field_gref
 
-      SUBROUTINE  xios_xml_set_field_zref(field, ftype, fzref, fzref_size) bind(C)
+      SUBROUTINE  xios_xml_set_field_zref(field, ftype, fzref, fzref_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: field, ftype
@@ -188,5 +222,5 @@
       END SUBROUTINE xios_xml_set_field_zref
 
-      SUBROUTINE  xios_xml_set_field_fref(field, ftype, ffref, ffref_size) bind(C)
+      SUBROUTINE  xios_xml_set_field_fref(field, ftype, ffref, ffref_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: field, ftype
@@ -199,5 +233,5 @@
       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-      SUBROUTINE  xios_xml_set_file_name(file_, ftype, fname, fname_size) bind(C)
+      SUBROUTINE  xios_xml_set_file_name(file_, ftype, fname, fname_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: file_, ftype
@@ -206,5 +240,5 @@
       END SUBROUTINE xios_xml_set_file_name
 
-      SUBROUTINE  xios_xml_set_file_description(file_, ftype, fdescription, fdescription_size) bind(C)
+      SUBROUTINE  xios_xml_set_file_description(file_, ftype, fdescription, fdescription_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: file_, ftype
@@ -213,5 +247,5 @@
       END SUBROUTINE xios_xml_set_file_description
 
-      SUBROUTINE  xios_xml_set_file_output_freq(file_, ftype, year, month, day, hour, minute, second) bind(C)
+      SUBROUTINE  xios_xml_set_file_output_freq(file_, ftype, year, month, day, hour, minute, second) BIND(C)
          import C_DOUBLE, C_INT
          INTEGER (kind = C_INT), VALUE :: file_, ftype
@@ -219,5 +253,5 @@
       END SUBROUTINE xios_xml_set_file_output_freq
 
-      SUBROUTINE  xios_xml_set_file_olevel(file_, ftype, folevel) bind(C)
+      SUBROUTINE  xios_xml_set_file_olevel(file_, ftype, folevel) BIND(C)
          import C_INT
          INTEGER (kind = C_INT), VALUE :: file_, ftype
@@ -225,5 +259,5 @@
       END SUBROUTINE xios_xml_set_file_olevel
 
-      SUBROUTINE  xios_xml_set_file_enabled(file_, ftype, fenabled) bind(C)
+      SUBROUTINE  xios_xml_set_file_enabled(file_, ftype, fenabled) BIND(C)
          import C_INT, C_BOOL
          INTEGER (kind = C_INT), VALUE  :: file_, ftype
@@ -234,5 +268,5 @@
       ! Attribut des Ã©lÃ©ments de type grid et grid_group !
       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-      SUBROUTINE  xios_xml_set_grid_name(grid, ftype, gname, gname_size) bind(C)
+      SUBROUTINE  xios_xml_set_grid_name(grid, ftype, gname, gname_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: grid, ftype
@@ -241,5 +275,5 @@
       END SUBROUTINE xios_xml_set_grid_name
 
-      SUBROUTINE  xios_xml_set_grid_description(grid, ftype, gdescription, gdescription_size) bind(C)
+      SUBROUTINE  xios_xml_set_grid_description(grid, ftype, gdescription, gdescription_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: grid, ftype
@@ -248,5 +282,5 @@
       END SUBROUTINE xios_xml_set_grid_description
 
-      SUBROUTINE  xios_xml_set_grid_dref(grid, ftype, dref, dref_size) bind(C)
+      SUBROUTINE  xios_xml_set_grid_dref(grid, ftype, dref, dref_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: grid, ftype
@@ -255,5 +289,5 @@
       END SUBROUTINE xios_xml_set_grid_dref
 
-      SUBROUTINE  xios_xml_set_grid_aref(grid, ftype, aref, aref_size) bind(C)
+      SUBROUTINE  xios_xml_set_grid_aref(grid, ftype, aref, aref_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: grid, ftype
@@ -265,5 +299,5 @@
       ! Attribut des Ã©lÃ©ments de type axis et axis_group !
       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-      SUBROUTINE  xios_xml_set_axis_name(axis, ftype, aname, aname_size) bind(C)
+      SUBROUTINE  xios_xml_set_axis_name(axis, ftype, aname, aname_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: axis, ftype
@@ -272,5 +306,5 @@
       END SUBROUTINE xios_xml_set_axis_name
 
-      SUBROUTINE  xios_xml_set_axis_sname(axis, ftype, asname, asname_size) bind(C)
+      SUBROUTINE  xios_xml_set_axis_sname(axis, ftype, asname, asname_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: axis, ftype
@@ -279,5 +313,5 @@
       END SUBROUTINE xios_xml_set_axis_sname
 
-      SUBROUTINE  xios_xml_set_axis_lname(axis, ftype, alname, alname_size) bind(C)
+      SUBROUTINE  xios_xml_set_axis_lname(axis, ftype, alname, alname_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: axis, ftype
@@ -286,5 +320,5 @@
       END SUBROUTINE xios_xml_set_axis_lname
 
-      SUBROUTINE  xios_xml_set_axis_unit(axis, ftype, aunit, aunit_size) bind(C)
+      SUBROUTINE  xios_xml_set_axis_unit(axis, ftype, aunit, aunit_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: axis, ftype
@@ -293,5 +327,5 @@
       END SUBROUTINE xios_xml_set_axis_unit
 
-      SUBROUTINE  xios_xml_set_axis_value(axis, ftype, avalue, avalue_size) bind(C)
+      SUBROUTINE  xios_xml_set_axis_value(axis, ftype, avalue, avalue_size) BIND(C)
          import C_DOUBLE, C_INT
          INTEGER  (kind = C_INT), VALUE      :: axis, ftype
@@ -304,5 +338,5 @@
       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-      SUBROUTINE  xios_xml_set_domain_name(domain, ftype, dname, dname_size) bind(C)
+      SUBROUTINE  xios_xml_set_domain_name(domain, ftype, dname, dname_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: domain, ftype
@@ -311,5 +345,5 @@
       END SUBROUTINE xios_xml_set_domain_name
 
-      SUBROUTINE  xios_xml_set_domain_sname(domain, ftype, dsname, dsname_size) bind(C)
+      SUBROUTINE  xios_xml_set_domain_sname(domain, ftype, dsname, dsname_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: domain, ftype
@@ -318,5 +352,5 @@
       END SUBROUTINE xios_xml_set_domain_sname
 
-      SUBROUTINE  xios_xml_set_domain_lname(domain, ftype, dlname, dlname_size) bind(C)
+      SUBROUTINE  xios_xml_set_domain_lname(domain, ftype, dlname, dlname_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: domain, ftype
@@ -325,45 +359,45 @@
       END SUBROUTINE xios_xml_set_domain_lname
 
-      SUBROUTINE  xios_xml_set_domain_niglo(domain, ftype, niglo) bind(C)
+      SUBROUTINE  xios_xml_set_domain_niglo(domain, ftype, niglo) BIND(C)
          import C_INT
          INTEGER  (kind = C_INT), VALUE :: domain, ftype, niglo
       END SUBROUTINE xios_xml_set_domain_niglo
 
-      SUBROUTINE  xios_xml_set_domain_njglo(domain, ftype, njglo) bind(C)
+      SUBROUTINE  xios_xml_set_domain_njglo(domain, ftype, njglo) BIND(C)
          import C_INT
          INTEGER  (kind = C_INT), VALUE :: domain, ftype, njglo
       END SUBROUTINE xios_xml_set_domain_njglo
 
-      SUBROUTINE  xios_xml_set_domain_ibegin(domain, ftype, ibegin) bind(C)
+      SUBROUTINE  xios_xml_set_domain_ibegin(domain, ftype, ibegin) BIND(C)
          import C_INT
          INTEGER  (kind = C_INT), VALUE :: domain, ftype, ibegin
       END SUBROUTINE xios_xml_set_domain_ibegin
 
-      SUBROUTINE  xios_xml_set_domain_iend(domain, ftype, iend) bind(C)
+      SUBROUTINE  xios_xml_set_domain_iend(domain, ftype, iend) BIND(C)
          import C_INT
          INTEGER  (kind = C_INT), VALUE :: domain, ftype, iend
       END SUBROUTINE xios_xml_set_domain_iend
 
-      SUBROUTINE  xios_xml_set_domain_ni(domain, ftype, ni) bind(C)
+      SUBROUTINE  xios_xml_set_domain_ni(domain, ftype, ni) BIND(C)
          import C_INT
          INTEGER  (kind = C_INT), VALUE :: domain, ftype, ni
       END SUBROUTINE xios_xml_set_domain_ni
 
-      SUBROUTINE  xios_xml_set_domain_jbegin(domain, ftype, jbegin) bind(C)
+      SUBROUTINE  xios_xml_set_domain_jbegin(domain, ftype, jbegin) BIND(C)
          import C_INT
          INTEGER  (kind = C_INT), VALUE :: domain, ftype, jbegin
       END SUBROUTINE xios_xml_set_domain_jbegin
 
-      SUBROUTINE  xios_xml_set_domain_jend(domain, ftype, jend) bind(C)
+      SUBROUTINE  xios_xml_set_domain_jend(domain, ftype, jend) BIND(C)
          import C_INT
          INTEGER  (kind = C_INT), VALUE :: domain, ftype, jend
       END SUBROUTINE xios_xml_set_domain_jend
 
-      SUBROUTINE  xios_xml_set_domain_nj(domain, ftype, nj) bind(C)
+      SUBROUTINE  xios_xml_set_domain_nj(domain, ftype, nj) BIND(C)
          import C_INT
          INTEGER  (kind = C_INT), VALUE :: domain, ftype, nj
       END SUBROUTINE xios_xml_set_domain_nj
 
-      SUBROUTINE  xios_xml_set_domain_mask(domain, ftype, mask, maskXsize, maskYsize) bind(C)
+      SUBROUTINE  xios_xml_set_domain_mask(domain, ftype, mask, maskXsize, maskYsize) BIND(C)
          import C_BOOL, C_INT
          INTEGER  (kind = C_INT), VALUE       :: domain, ftype
@@ -372,35 +406,35 @@
       END SUBROUTINE xios_xml_set_domain_mask
 
-      SUBROUTINE  xios_xml_set_domain_ddim(domain, ftype, dadim) bind(C)
+      SUBROUTINE  xios_xml_set_domain_ddim(domain, ftype, dadim) BIND(C)
          import C_INT
          INTEGER  (kind = C_INT), VALUE :: domain, ftype, dadim
       END SUBROUTINE xios_xml_set_domain_ddim
 
-      SUBROUTINE  xios_xml_set_domain_dni(domain, ftype, dni) bind(C)
+      SUBROUTINE  xios_xml_set_domain_dni(domain, ftype, dni) BIND(C)
          import C_INT
          INTEGER  (kind = C_INT), VALUE :: domain, ftype, dni
       END SUBROUTINE xios_xml_set_domain_dni
 
-      SUBROUTINE  xios_xml_set_domain_dnj(domain, ftype, dnj) bind(C)
+      SUBROUTINE  xios_xml_set_domain_dnj(domain, ftype, dnj) BIND(C)
          import C_INT
          INTEGER  (kind = C_INT), VALUE :: domain, ftype, dnj
       END SUBROUTINE xios_xml_set_domain_dnj
 
-      SUBROUTINE  xios_xml_set_domain_dibegin(domain, ftype, dibegin) bind(C)
+      SUBROUTINE  xios_xml_set_domain_dibegin(domain, ftype, dibegin) BIND(C)
          import C_INT
          INTEGER  (kind = C_INT), VALUE :: domain, ftype, dibegin
       END SUBROUTINE xios_xml_set_domain_dibegin
 
-      SUBROUTINE  xios_xml_set_domain_djbegin(domain, ftype, djbegin) bind(C)
+      SUBROUTINE  xios_xml_set_domain_djbegin(domain, ftype, djbegin) BIND(C)
          import C_INT
          INTEGER  (kind = C_INT), VALUE :: domain, ftype, djbegin
       END SUBROUTINE xios_xml_set_domain_djbegin
 
-      SUBROUTINE  xios_xml_set_domain_dnindex(domain, ftype, dnindex) bind(C)
+      SUBROUTINE  xios_xml_set_domain_dnindex(domain, ftype, dnindex) BIND(C)
          import C_INT
          INTEGER  (kind = C_INT), VALUE :: domain, ftype, dnindex
       END SUBROUTINE xios_xml_set_domain_dnindex
 
-      SUBROUTINE  xios_xml_set_domain_diindex(domain, ftype, diindex, diindex_size) bind(C)
+      SUBROUTINE  xios_xml_set_domain_diindex(domain, ftype, diindex, diindex_size) BIND(C)
          import C_INT
          INTEGER  (kind = C_INT), VALUE      :: domain, ftype
@@ -409,5 +443,5 @@
       END SUBROUTINE xios_xml_set_domain_diindex
 
-      SUBROUTINE  xios_xml_set_domain_djindex(domain, ftype, djindex, djindex_size) bind(C)
+      SUBROUTINE  xios_xml_set_domain_djindex(domain, ftype, djindex, djindex_size) BIND(C)
          import C_INT
          INTEGER  (kind = C_INT), VALUE      :: domain, ftype
@@ -416,5 +450,5 @@
       END SUBROUTINE xios_xml_set_domain_djindex
 
-      SUBROUTINE  xios_xml_set_domain_lonvalue(domain, ftype, lonvalue, lonvalue_xsize, lonvalue_ysize) bind(C)
+      SUBROUTINE  xios_xml_set_domain_lonvalue(domain, ftype, lonvalue, lonvalue_xsize, lonvalue_ysize) BIND(C)
          import C_DOUBLE, C_INT
          INTEGER  (kind = C_INT), VALUE      :: domain, ftype
@@ -423,5 +457,5 @@
       END SUBROUTINE xios_xml_set_domain_lonvalue
 
-      SUBROUTINE  xios_xml_set_domain_latvalue(domain, ftype, latvalue, latvalue_xsize, lonvalue_ysize) bind(C)
+      SUBROUTINE  xios_xml_set_domain_latvalue(domain, ftype, latvalue, latvalue_xsize, lonvalue_ysize) BIND(C)
          import C_DOUBLE, C_INT
          INTEGER  (kind = C_INT), VALUE      :: domain, ftype
@@ -430,5 +464,5 @@
       END SUBROUTINE xios_xml_set_domain_latvalue
 
-      SUBROUTINE  xios_xml_set_domain_domtype(domain, ftype, domtype, domtype_size) bind(C)
+      SUBROUTINE  xios_xml_set_domain_domtype(domain, ftype, domtype, domtype_size) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT), VALUE         :: domain, ftype
@@ -829,5 +863,5 @@
    INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
 
-      SUBROUTINE xios_xml_Parse_File(filename, filename_size) bind(C)
+      SUBROUTINE xios_xml_Parse_File(filename, filename_size) BIND(C)
          import C_CHAR, C_INT
          CHARACTER(kind = C_CHAR), DIMENSION(*) :: filename
@@ -835,5 +869,5 @@
       END SUBROUTINE xios_xml_Parse_File
 
-      SUBROUTINE xios_xml_Parse_String(xmlcontent, xmlcontent_size) bind(C)
+      SUBROUTINE xios_xml_Parse_String(xmlcontent, xmlcontent_size) BIND(C)
          import C_CHAR, C_INT
          CHARACTER(kind = C_CHAR), DIMENSION(*) :: xmlcontent
@@ -868,5 +902,5 @@
    INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
 
-      SUBROUTINE xios_context_set_current(context, withswap) bind(C)
+      SUBROUTINE xios_context_set_current(context, withswap) BIND(C)
          import C_BOOL, C_INT
          INTEGER  (kind = C_INT), VALUE :: context
@@ -874,10 +908,11 @@
       END SUBROUTINE xios_context_set_current
 
-      SUBROUTINE xios_context_create(context, context_id, context_id_size, calendar_type) bind(C)
+      SUBROUTINE xios_context_create(context, context_id, context_id_size, calendar_type, &
+                                     year, month, day, hour, minute, second) BIND(C)
          import C_CHAR, C_INT
          INTEGER  (kind = C_INT)                :: context
          CHARACTER(kind = C_CHAR), DIMENSION(*) :: context_id
          INTEGER  (kind = C_INT), VALUE         :: context_id_size
-         INTEGER  (kind = C_INT), VALUE         :: calendar_type
+         INTEGER  (kind = C_INT), VALUE         :: calendar_type, year, month, day, hour, minute, second
       END SUBROUTINE xios_context_create
 
@@ -905,10 +940,19 @@
 
    ! CrÃ©er un nouveau contexte Ã  partir d'un id, d'un type de calendrier et d'une date.
-   SUBROUTINE context_create(context_hdl, context_id, calendar_type)
-      USE IXHANDLE
-      TYPE(XHandle), INTENT(OUT)     :: context_hdl
-      CHARACTER(len = *), INTENT(IN) :: context_id
-      INTEGER, INTENT(IN)            :: calendar_type
-      CALL xios_context_create(context_hdl%daddr, context_id, len(context_id), calendar_type)
+   SUBROUTINE context_create(context_hdl, context_id, calendar_type, init_date)
+      USE IXHANDLE
+      USE ICALENDAR
+      TYPE(XHandle), INTENT(OUT)        :: context_hdl
+      CHARACTER(len = *), INTENT(IN)    :: context_id
+      INTEGER, INTENT(IN)               :: calendar_type
+      TYPE(XDate), INTENT(IN), OPTIONAL :: init_date
+      IF (PRESENT(init_date)) THEN
+         CALL xios_context_create(context_hdl%daddr, context_id, len(context_id), calendar_type, &
+                                  init_date%year, init_date%month, init_date%day,                &
+                                  init_date%hour, init_date%minute, init_date%second)
+      ELSE
+         CALL xios_context_create(context_hdl%daddr, context_id, len(context_id), calendar_type, &
+                                  0, 1, 1, 0, 0, 0)
+      END IF
       IF (context_hdl%daddr .EQ. 0) THEN
          PRINT *, "(F2003 interface) Impossible de crÃ©er le context !"
@@ -934,9 +978,21 @@
    INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
 
-      SUBROUTINE xios_dtreatment_start(context_hdl, filetype) bind(C)
+      SUBROUTINE xios_dtreatment_start(context_hdl, filetype) BIND(C)
          import C_INT
          INTEGER  (kind = C_INT), VALUE  :: context_hdl
          INTEGER  (kind = C_INT), VALUE  :: filetype
       END SUBROUTINE xios_dtreatment_start
+
+      SUBROUTINE xios_dtreatment_end() BIND(C)
+         ! Sans argument
+      END SUBROUTINE xios_dtreatment_end
+
+      SUBROUTINE xios_write_data(fieldid, fieldid_size, data_k8, data_Xsize, data_Ysize, data_Zsize) BIND(C)
+         import C_INT, C_CHAR, C_PTR, C_FLOAT, C_DOUBLE, C_BOOL
+         CHARACTER(kind = C_CHAR), DIMENSION(*) :: fieldid
+         INTEGER  (kind = C_INT),  VALUE        :: fieldid_size
+         REAL(kind = C_DOUBLE), DIMENSION(*)    :: data_k8
+         INTEGER  (kind = C_INT), VALUE         :: data_Xsize, data_Ysize, data_Zsize
+      END SUBROUTINE xios_write_data
 
    END INTERFACE
@@ -963,4 +1019,38 @@
    END SUBROUTINE dtreatment_start
 
+   SUBROUTINE dtreatment_end(context_hdl)
+      USE ICONTEXT
+      USE IXHANDLE
+      TYPE(XHandle), INTENT(IN), VALUE :: context_hdl
+      IF ((context_hdl%dtype .NE. ECONTEXT) .OR. (context_hdl%daddr .EQ. 0)) THEN
+         PRINT *, "(F2003 interface) Impossible de traiter un contexte invalide !"
+         STOP
+      END IF
+      CALL context_set_current(context_hdl)
+      CALL xios_dtreatment_end()
+   END SUBROUTINE dtreatment_end
+
+   SUBROUTINE write_data (fieldid,                         &
+                          data1d_k8, data2d_k8, data3d_k8)
+      CHARACTER(len = *), INTENT(IN)                     :: fieldid
+      REAL(kind = 8), DIMENSION(*), OPTIONAL, INTENT(IN) :: data1d_k8(:), data2d_k8(:,:), data3d_k8(:,:,:)
+      IF((.NOT. PRESENT(data1d_k8)) .AND. &
+         (.NOT. PRESENT(data2d_k8)) .AND. &
+         (.NOT. PRESENT(data3d_k8))) THEN
+         PRINT *, "(F2003 interface) Veuillez spÃ©cifier des donnÃ©es Ã  Ã©crire !"
+         STOP
+      END IF
+      IF (PRESENT (data1d_k8)) THEN
+         CALL xios_write_data(fieldid, len(fieldid), data1d_k8, &
+                              size(data1d_k8, 1), -1, -1)
+      ELSE IF (PRESENT (data2d_k8)) THEN
+         CALL xios_write_data(fieldid, len(fieldid), data2d_k8, &
+                              size(data2d_k8, 1), size(data2d_k8, 2), -1)
+      ELSE IF (PRESENT (data3d_k8)) THEN
+         CALL xios_write_data(fieldid, len(fieldid), data3d_k8, &
+                              size(data3d_k8, 1), size(data3d_k8, 2), size(data3d_k8, 3))
+      END IF
+   END SUBROUTINE
+
 END MODULE IDATATREATMENT
 
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/c_interface.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/c_interface.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/c_interface.hpp	(revision 138)
@@ -58,5 +58,8 @@
 /* ******************** CONTEXT INTERFACE ******************* */
 void xios_context_set_current (XPtr const _ctx, bool _wswap);
-void xios_context_create (XPtr * _ctx, const XString _ctx_id, XSize _ctx_id_len, XCalendarType _calType);
+void xios_context_create (XPtr * _ctx, const XString _ctx_id,
+                          XSize _ctx_id_len, XCalendarType _calType,
+                          XInt yr, XInt mth, XInt dd,
+                          XInt hr, XInt min, XInt sec);
 
 /* ******************  XML TREE INTERFACE ******************* */
@@ -146,6 +149,18 @@
 XML_SET_STRING(domain, domtype, domtype) ;
 
-/* ******************  DATA TREATMENT INTERFACE ******************* */
+/* ******************* DATA TREATMENT INTERFACE ******************* */
 void xios_dtreatment_start(XPtr const _context, XFileType filetype);
+void xios_dtreatment_end(void);
+
+void xios_write_data(const XString _field_id, XSize _field_id_len, double * data_k8,
+                     XSize data_Xsize, XSize data_Ysize, XSize data_Zsize);
+
+/* ********************** CALENDAR INTERFACE ********************* */
+
+void xios_update_calendar(int step);
+void xios_set_timestep(double ts_year, double ts_month, double ts_day,
+                       double ts_hour, double ts_minute, double ts_second);
+
+
 
 #ifdef __cplusplus
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/calendar.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/calendar.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/calendar.hpp	(revision 138)
@@ -8,10 +8,11 @@
       public :
 
-         JulianCalendar(void)
-            : AbstractCalendar("Julian")
+         JulianCalendar(const string& _dateStr)
+            : AbstractCalendar("Julian", _dateStr)
          { /* Ne rien faire de plus */ }
 
-         JulianCalendar(const string& _dateStr)
-            : AbstractCalendar("Julian", _dateStr)
+         JulianCalendar(int yr = 0, int mth = 1, int d   = 1,
+                        int hr = 0, int min = 0, int sec = 0)
+             : AbstractCalendar("Julian", yr, mth, d, hr, min, sec)
          { /* Ne rien faire de plus */ }
 
@@ -36,8 +37,9 @@
          }
 
-         virtual string getType(void) const { return (string("julian")); }
+         virtual string getType(void) const
+         { return (string("julian")); }
 
          virtual ~JulianCalendar(void)
-         {/* Ne rien faire de plus */}
+         { /* Ne rien faire de plus */ }
 
    }; // class JulianCalendar
@@ -47,11 +49,12 @@
       public :
 
-         GregorianCalendar(void)
-            : AbstractCalendar("Gregorian")
-         {/* Ne rien faire de plus */}
+         GregorianCalendar(int yr = 0, int mth = 1, int d   = 1,
+                           int hr = 0, int min = 0, int sec = 0)
+             : AbstractCalendar("Gregorian", yr, mth, d, hr, min, sec)
+         { /* Ne rien faire de plus */ }
 
          GregorianCalendar(const string& dateStr)
             : AbstractCalendar("Gregorian", dateStr)
-         {/* Ne rien faire de plus */}
+         { /* Ne rien faire de plus */ }
 
       public : /* virtual */
@@ -59,5 +62,8 @@
          virtual int getYearTotalLength(const Date& d) const
          { // Retourne la durÃ©e d'une annÃ©e en seconde.
-            if ((d.getYear() % 4 == 0) && (d.getYear() % 100 != 0 || d.getYear() % 400 == 0)) return (366 * 86400);
+            if ((d.getYear() % 4   == 0) &&
+               ((d.getYear() % 100 != 0)  ||
+                (d.getYear() % 400 == 0)  ))
+               return (366 * 86400);
             return (365 * 86400);
          }
@@ -76,8 +82,9 @@
          }
 
-         virtual string getType(void) const { return (string("gregorian")); }
+         virtual string getType(void) const
+         { return (string("gregorian")); }
 
          virtual ~GregorianCalendar(void)
-         {/* Ne rien faire de plus */}
+         { /* Ne rien faire de plus */ }
 
    }; // class GregorianCalendar
@@ -87,11 +94,12 @@
       public :
 
-         NoLeapCalendar(void)
-            : AbstractCalendar("NoLeap")
-         {/* Ne rien faire de plus */}
+         NoLeapCalendar(int yr = 0, int mth = 1, int d   = 1,
+                        int hr = 0, int min = 0, int sec = 0)
+             : AbstractCalendar("NoLeap", yr, mth, d, hr, min, sec)
+         { /* Ne rien faire de plus */ }
 
          NoLeapCalendar(const string& dateStr)
             : AbstractCalendar("NoLeap", dateStr)
-         {/* Ne rien faire de plus */}
+         { /* Ne rien faire de plus */ }
 
       public : /* virtual */
@@ -101,5 +109,5 @@
 
          virtual ~NoLeapCalendar(void)
-         {/* Ne rien faire de plus */}
+         { /* Ne rien faire de plus */ }
 
    }; // class NoLeapCalendar
@@ -109,11 +117,12 @@
       public :
 
-         AllLeapCalendar(void)
-            : AbstractCalendar("AllLeap")
-         {/* Ne rien faire de plus */}
+         AllLeapCalendar(int yr = 0, int mth = 1, int d   = 1,
+                         int hr = 0, int min = 0, int sec = 0)
+             : AbstractCalendar("AllLeap", yr, mth, d, hr, min, sec)
+         { /* Ne rien faire de plus */ }
 
          AllLeapCalendar(const string& dateStr)
             : AbstractCalendar("AllLeap", dateStr)
-         {/* Ne rien faire de plus */}
+         { /* Ne rien faire de plus */ }
 
       public : /* virtual */
@@ -133,5 +142,5 @@
 
          virtual ~AllLeapCalendar(void)
-         {/* Ne rien faire de plus */}
+         { /* Ne rien faire de plus */ }
 
    }; // class NoLeapCalendar
@@ -141,11 +150,12 @@
       public :
 
-         D360Calendar(void)
-            : AbstractCalendar("D360")
-         {/* Ne rien faire de plus */}
+         D360Calendar(int yr = 0, int mth = 1, int d   = 1,
+                      int hr = 0, int min = 0, int sec = 0)
+             : AbstractCalendar("D360", yr, mth, d, hr, min, sec)
+         { /* Ne rien faire de plus */ }
 
          D360Calendar(const string& dateStr)
             : AbstractCalendar("D360", dateStr)
-         {/* Ne rien faire de plus */}
+         { /* Ne rien faire de plus */ }
 
       public : /* virtual */
@@ -161,5 +171,5 @@
 
          virtual ~D360Calendar(void)
-         {/* Ne rien faire de plus */}
+         { /* Ne rien faire de plus */ }
 
    }; // class D360Calendar
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/container.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/container.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/container.hpp	(revision 138)
@@ -17,8 +17,7 @@
 
          Mapped* operator[] (const Key& kval)
-                     throw (XMLIOUndefinedValueException)
          {
             if(!hasMappedValue(kval))
-               throw XMLIOSERVER::XMLIOUndefinedValueException
+               XMLIOError
                   ("Appel de la mÃ©thode ExHashMap::operator["+kval+"] invalide.");
             return (find(kval)->second);
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/context.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/context.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/context.hpp	(revision 138)
@@ -26,14 +26,14 @@
          {
             if (hasChild()) return false;
-            this->fieldDef  =
-               (FieldDefinition*) FieldDefinition ::CreateObject(FieldDefinition ::GetDefName());
-            this->fileDef   =
-               (FileDefinition*)  FileDefinition  ::CreateObject(FileDefinition  ::GetDefName());
-            this->axisDef   =
-               (AxisDefinition*)  AxisDefinition  ::CreateObject(AxisDefinition  ::GetDefName());
-            this->gridDef   =
-               (GridDefinition*)  GridDefinition  ::CreateObject(GridDefinition  ::GetDefName());
-            this->domainDef =
-               (DomainDefinition*)DomainDefinition::CreateObject(DomainDefinition::GetDefName());
+            this->fieldDef  = (FieldDefinition*)
+               FieldDefinition ::CreateObject(FieldDefinition ::GetDefName());
+            this->fileDef   = (FileDefinition*)
+               FileDefinition  ::CreateObject(FileDefinition  ::GetDefName());
+            this->axisDef   = (AxisDefinition*)
+               AxisDefinition  ::CreateObject(AxisDefinition  ::GetDefName());
+            this->gridDef   = (GridDefinition*)
+               GridDefinition  ::CreateObject(GridDefinition  ::GetDefName());
+            this->domainDef = (DomainDefinition*)
+               DomainDefinition::CreateObject(DomainDefinition::GetDefName());
             return (true);
          }
@@ -72,5 +72,5 @@
          template <class T>
             DataTreatment * setDataTreatment(void)
-         { return (dtreatment = (ccalendar == NULL)? NULL : new T(this)); }
+         { return (dtreatment = (ccalendar == NULL) ? NULL : new T(this)); }
 
       public : /* virtual */
@@ -111,20 +111,20 @@
                   if (name.compare(FieldDefinition::GetDefName())  == 0)
                   // Parsing pour la dÃ©finition des champs.
-                  { fieldDef  = CreateInstanceAndParse<FieldDefinition >
+                  { fieldDef  = CreateInstanceAndParse<FieldDefinition>
                                  (_node, FieldDefinition::GetDefName().c_str()); continue; }
 
                   if (name.compare(FileDefinition::GetDefName())  == 0)
                   // Parsing pour la dÃ©finition des fichiers.
-                  { fileDef   = CreateInstanceAndParse<FileDefinition  >
+                  { fileDef   = CreateInstanceAndParse<FileDefinition>
                                  (_node, FileDefinition  ::GetDefName().c_str()); continue; }
 
                   if (name.compare(AxisDefinition::GetDefName())  == 0)
                   // Parsing pour la dÃ©finition des axes.
-                  { axisDef   = CreateInstanceAndParse<AxisDefinition  >
+                  { axisDef   = CreateInstanceAndParse<AxisDefinition>
                                  (_node, AxisDefinition  ::GetDefName().c_str()); continue; }
 
                   if (name.compare(GridDefinition::GetDefName())  == 0)
                   // Parsing pour la dÃ©finition des grilles.
-                  { gridDef   = CreateInstanceAndParse<GridDefinition  >
+                  { gridDef   = CreateInstanceAndParse<GridDefinition>
                                  (_node, GridDefinition  ::GetDefName().c_str()); continue; }
 
@@ -165,4 +165,12 @@
          }
 
+         virtual std::string getXmlExtraAttributes(void) const
+         {
+            std::ostringstream oss;
+            oss << " calendar_type=\""<< ccalendar->getId() <<"\""
+                << " start_date=\""   << ccalendar->getInitDate() <<"\"";
+            return (oss.str());
+         }
+
       public : /* static */
 
@@ -173,4 +181,6 @@
          static void ShowTree(ostream& os = std::clog)
          {
+            std::string __curCtxt = Context::GetCurrentContext()->getId();
+
             os << NIndent << "<?xml version=\"1.0\"?>" << std::endl;
             os << NIndent << "<" << Context::GetRootName() << ">" << std::endl;
@@ -189,4 +199,5 @@
             os << NIndent << std::endl;
             os << NIndent << "</" << Context::GetRootName() << ">" << std::endl  ;
+            Context::SetCurrentContext(__curCtxt);
          }
 
@@ -196,6 +207,10 @@
             Poco::HashMap<string, StrHashMap<Context> >::Iterator it;
 
-            for (it = AllListContext.begin(); it != AllListContext.end(); it++)
-            { Context::SetCurrentContext((*it).first); delete ((*it).second)[(*it).first]; }
+            for (it  = AllListContext.begin();
+                 it != AllListContext.end(); it++)
+            {
+               Context::SetCurrentContext((*it).first);
+               delete ((*it).second)[(*it).first];
+            }
          }
 
@@ -223,5 +238,8 @@
 
          static bool HasContext(const string& id)
-         { return (Context::GetAllListObject().find(id) != Context::GetAllListObject().end()); }
+         {
+            return (Context::GetAllListObject().find(id) !=
+                    Context::GetAllListObject().end());
+         }
 
          static Context* GetContext(const string& id)
@@ -250,5 +268,5 @@
 
             if (!Context::HasContext(id) && withcheck)
-               throw new XMLIOUndefinedValueException
+               XMLIOError
                      ("Impossible de se placer dans le contexte "+id+" car celui-ci n'existe pas dans l'arborescence!");
 
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/data_treatment.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/data_treatment.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/data_treatment.hpp	(revision 138)
@@ -103,5 +103,5 @@
          }
 
-         std::vector<CFile*> enabledFiles; // Liste des fichiers Ã  crÃ©er dans un context donnÃ©.
+         std::vector<CFile *> enabledFiles; // Liste des fichiers Ã  crÃ©er dans un context donnÃ©.
 
       private :
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/declare_attribut.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/declare_attribut.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/declare_attribut.hpp	(revision 138)
@@ -25,5 +25,5 @@
    };                                                                               \
                                                                                     \
-   const Attr_##att_name& getAttr_##att_name(void) const { return (att_name); }     \
+   const Attr_##att_name& get_##att_name(void) const { return (att_name); }     \
    void set_##att_name (const Attr_##att_name& _newattr) { att_name = _newattr; }   \
    void set_##att_name (const att_type& _newattr) { att_name.setValue(_newattr); }  \
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/domain.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/domain.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/domain.hpp	(revision 138)
@@ -35,8 +35,8 @@
       if ((!ni_glo.hasValue() || ni_glo <= 0 ) ||
           (!nj_glo.hasValue() || nj_glo <= 0 ))
-        ERROR("Le domaine global est mal dÃ©fini, vÃ©rifiez les valeurs de \'ni_glo\' et \'nj_glo\' !") ;
+         ERROR("Le domaine global est mal dÃ©fini, vÃ©rifiez les valeurs de \'ni_glo\' et \'nj_glo\' !") ;
 
       // Domaine local en i //
-      if (ni.hasValue() && ibegin.hasValue() && !iend.hasValue())
+           if (ni.hasValue() && ibegin.hasValue() && !iend.hasValue())
          iend = ibegin + ni - 1 ;
       else if (ni.hasValue() && iend.hasValue() && !ibegin.hasValue())
@@ -55,5 +55,5 @@
 
       // Domaine local en j //
-      if (nj.hasValue() && jbegin.hasValue() && !jend.hasValue())
+           if (nj.hasValue() && jbegin.hasValue() && !jend.hasValue())
          jend = jbegin + nj - 1 ;
       else if (nj.hasValue() && jend.hasValue() && !jbegin.hasValue())
@@ -87,9 +87,11 @@
 
       // DonnÃ©es du domaine //
-      if (!data_jbegin.hasValue()) data_jbegin = 0 ;
-      if (!data_ibegin.hasValue()) data_ibegin = 0 ;
+      if (!data_ibegin.hasValue())
+           data_ibegin = 0 ;
+      if (!data_jbegin.hasValue() && (data_dim == 2))
+           data_jbegin = 0 ;
 
       if (data_dim.hasValue() &&
-        !(data_dim==1 || data_dim==2))
+        !(data_dim == 1 || data_dim == 2))
          ERROR("Dimension des donnÃ©es non comptatible (doit Ãªtre 1 ou 2) !") ;
       else if (! data_dim.hasValue())
@@ -101,8 +103,11 @@
          data_ni = (data_dim == 1) ? (ni * nj) : (int) ni;
 
-      if (data_nj.hasValue() && (data_nj <= 0))
-         ERROR("Dimension des donnÃ©es nÃ©gative (data_nj).") ;
-      else if (!data_nj.hasValue())
-         data_nj = (int) nj ;
+      if (data_dim == 2)
+      {
+         if (data_nj.hasValue() && (data_nj <= 0) )
+            ERROR("Dimension des donnÃ©es nÃ©gative (data_nj).") ;
+         else if (!data_nj.hasValue())
+            data_nj = (int) nj ;
+      }
 
       // Gestion de la compression //
@@ -132,5 +137,5 @@
 
       if (!data_n_index.hasValue())
-      { // -> bloc re-vÃ©rfiÃ© OK
+      { // -> bloc re-vÃ©rifiÃ© OK
          if (data_dim == 1)
          {
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/exception.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/exception.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/exception.hpp	(revision 138)
@@ -10,94 +10,63 @@
 namespace XMLIOSERVER
 {
-   class XMLIOException : public Exception
+
+   class XMLIOError : public std::ostringstream
    {
+      private :
+
+         class XMLIOException : public Exception
+         {
+            public :
+
+               XMLIOException(int _code)
+                  : Exception(_code)
+               { /* Ne rien faire de plus */ }
+
+               XMLIOException(const std::string& _msg, int _code = 0)
+                  : Exception(_msg, _code)
+               { /* Ne rien faire de plus */ }
+
+               XMLIOException(const std::string& _msg, const std::string& _arg, int _code)
+                  : Exception(_msg, _arg, _code)
+               { /* Ne rien faire de plus */ }
+
+               XMLIOException(const std::string& _msg, const Poco::Exception& _exc, int _code)
+                  : Exception(_msg, _exc, _code)
+               { /* Ne rien faire de plus */ }
+
+               XMLIOException(const XMLIOException& _exc)
+                  : Exception(_exc)
+               { /* Ne rien faire de plus */ }
+
+               ~XMLIOException(void) throw()
+               { std::cerr << displayText() << std::endl; }
+
+               XMLIOException& operator = (const XMLIOException& _exc)
+               { Exception::operator = (_exc); return *this; }
+
+            public : /* virtual */
+
+               virtual const char* name(void) const throw() { return ("XMLIO>XMLIOException"); }
+               virtual const char* className(void) const throw() { return (typeid(*this).name()); }
+
+               virtual Exception* clone(void) const { return new XMLIOException(*this); }
+               virtual void rethrow(void) const { throw *this; }
+
+         }; // class XMLIOException
+
       public :
 
-         XMLIOException(int _code)
-            : Exception(_code)
+         XMLIOError(const std::string _msg)
+            : msg(_msg)
          { /* Ne rien faire de plus */ }
 
-         XMLIOException(const std::string& _msg, int _code)
-            : Exception(_msg, _code)
-         { /* Ne rien faire de plus */ }
+         ~XMLIOError(void)
+         { throw  XMLIOException(msg); }
 
-         XMLIOException(const std::string& _msg, const std::string& _arg, int _code)
-            : Exception(_msg, _arg, _code)
-         { /* Ne rien faire de plus */ }
+      private :
 
-         XMLIOException(const std::string& _msg, const Poco::Exception& _exc, int _code)
-            : Exception(_msg, _exc, _code)
-         { /* Ne rien faire de plus */ }
-
-         XMLIOException(const XMLIOException& _exc)
-            : Exception(_exc)
-         { /* Ne rien faire de plus */ }
-
-         ~XMLIOException(void) throw()
-         { std::cerr << displayText() << std::endl; }
-
-         XMLIOException& operator = (const XMLIOException& _exc)
-         { Exception::operator = (_exc); return *this; }
-
-         virtual const char* name(void) const throw() { return ("XMLIO>XMLIOException"); }
-         virtual const char* className(void) const throw() { return (typeid(*this).name()); }
-
-         virtual Exception* clone(void) const { return new XMLIOException(*this); }
-         virtual void rethrow(void) const { throw *this; }
+         std::string msg;
 
    }; // class XMLIOException
-
-   class XMLIOUndefinedValueException : public XMLIOException
-   {
-      public :
-         XMLIOUndefinedValueException(const std::string& _msg)
-            : XMLIOException(_msg, 1001)
-         { /* Ne rien faire de plus */ }
-
-         const char* name(void) const throw()
-         { return ("XMLIO>UndefinedValueException"); }
-
-         ~XMLIOUndefinedValueException(void) throw()
-         { std::cerr << displayText() << std::endl; }
-
-   }; //class XMLIOUndefinedException
-
-   class XMLIOStreamException : public XMLIOException
-   {
-      public :
-         XMLIOStreamException(const std::string& _msg)
-            : XMLIOException(_msg, 1002)
-         { /* Ne rien faire de plus */ }
-
-         const char* name(void) const throw()
-         { return ("XMLIO>StreamException"); }
-
-   }; //class XMLIOStreamException
-
-   class XMLParsingException : public XMLIOException
-   {
-      public :
-         XMLParsingException(const std::string& _msg)
-            : XMLIOException(_msg, 1003)
-         { /* Ne rien faire de plus */ }
-
-         const char* name(void) const throw()
-         { return ("XMLIO>XMLParsingException"); }
-
-   }; //class XMLParsingException
-
-   class XMLIOIncompatibleTypeException : public XMLIOException
-   {
-      public :
-         XMLIOIncompatibleTypeException(const std::string& _msg)
-            : XMLIOException(_msg, 1003)
-         { /* Ne rien faire de plus */ }
-
-         const char* name(void) const throw()
-         { return ("XMLIO>XMLIOIncompatibeTypeException"); }
-
-   }; //class XMLIOIncompatibleTypeException
-
-   // A complÃ©ter.
 
 }// namespace XMLIOSERVER
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/field.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/field.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/field.hpp	(revision 138)
@@ -112,6 +112,6 @@
    {
       if (!_ori->hasId())
-         throw (new XMLIOUndefinedValueException
-            ("Impossible de crÃ©er une rÃ©fÃ©rence Ã  un Ã©lÃ©ment sans identifiant !"));
+         XMLIOError
+            ("Impossible de crÃ©er une rÃ©fÃ©rence Ã  un Ã©lÃ©ment sans identifiant !");
 
       CField& obj = *ObjectTemplate<CField>::CreateObject();
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/field_gridrefsolver.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/field_gridrefsolver.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/field_gridrefsolver.hpp	(revision 138)
@@ -12,5 +12,5 @@
       {
          if (CDomain::HasObject(domain_ref)) domain = CDomain::GetObject(domain_ref) ;
-         else throw XMLIOSERVER::XMLIOUndefinedValueException("RÃ©fÃ©rence au domaine nommÃ© \'"+ (string)domain_ref +"\' incorrecte") ;
+         else XMLIOError("RÃ©fÃ©rence au domaine nommÃ© \'"+ (string)domain_ref +"\' incorrecte") ;
       }
 
@@ -18,5 +18,5 @@
       {
          if (CAxis::HasObject(axis_ref)) axis = CAxis::GetObject(axis_ref) ;
-         else throw XMLIOSERVER::XMLIOUndefinedValueException("RÃ©fÃ©rence Ã  l'axe nommÃ© \'"+ (string)axis_ref +"\' incorrecte") ;
+         else XMLIOError("RÃ©fÃ©rence Ã  l'axe nommÃ© \'"+ (string)axis_ref +"\' incorrecte") ;
       }
 
@@ -24,5 +24,5 @@
       {
          if (CGrid::HasObject(grid_ref)) grid = CGrid::GetObject(grid_ref) ;
-         else throw XMLIOSERVER::XMLIOUndefinedValueException("RÃ©fÃ©rence Ã  la grille nommÃ©e \'"+ (string)grid_ref +"\' incorrecte");
+         else XMLIOError("RÃ©fÃ©rence Ã  la grille nommÃ©e \'"+ (string)grid_ref +"\' incorrecte");
       }
 
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/file.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/file.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/file.hpp	(revision 138)
@@ -35,5 +35,5 @@
          {
             if (_output != NULL) output = _output;
-            else throw XMLIOSERVER::XMLIOUndefinedValueException
+            else XMLIOError
                ("Impossible d'initialiser la sortie de donnÃ©es pour le fichier nommÃ© '"+ getId() +"'.") ;
          }
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/grid.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/grid.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/grid.hpp	(revision 138)
@@ -78,7 +78,9 @@
          static string GetDefName(void) { return (CGrid::GetName()); }
 
-         static CGrid* CreateObject(const CDomain* const a_domain, const CAxis* const a_axis)
-         {
-            string new_id = string("___") + a_domain->getId() + string("_") + a_axis->getId() + string("__") ;
+         static CGrid* CreateObject(const CDomain * const a_domain,
+                                    const CAxis   * const a_axis)
+         {
+            string new_id = string("___") + a_domain->getId() +
+                            string("_") + a_axis->getId() + string("__") ;
             CGrid* const grid = ObjectTemplate<CGrid>::CreateObject(new_id) ;
 
@@ -124,62 +126,69 @@
    void CGrid::computeIndex(void)
    {
-      int ni = domain->ni ;
-      int nj = domain->nj ;
-      int size = (hasAxis) ? (int)axis->size : 1 ;
-      int data_dim = domain->data_dim ;
-      int data_n_index = domain->data_n_index ;
-      int data_ibegin  = domain->data_ibegin ;
-      int data_jbegin  = (data_dim == 2) ? (int)domain->data_jbegin : -1;
-
-      Array<int, 1>& data_i_index =* domain->data_i_index ;
-      Array<int, 1>& data_j_index =* domain->data_j_index ;
-      Array<bool, 2>& mask =* domain->mask ;
-      int i, j, l, n ;
-      int count, indexCount ;
-
-      for(indexCount=0, l=0; l<size ; l++)
+      const int ni   = domain->ni ,
+                nj   = domain->nj ,
+                size = (hasAxis) ? (int)axis->size : 1 ;
+
+      /*std::cout << ni   << " : "
+                  << nj   << " : "
+                  << size << std::endl;*/
+
+      const int data_dim     = domain->data_dim ,
+                data_n_index = domain->data_n_index ,
+                data_ibegin  = domain->data_ibegin ,
+                data_jbegin  = (data_dim == 2) ? (int)domain->data_jbegin : -1;
+
+      Array<int, 1>& data_i_index =* domain->data_i_index ,
+                     data_j_index =* domain->data_j_index ;
+
+      /*std::cout << data_n_index        << " : "
+                  << data_i_index.size() << " : "
+                  << data_j_index.size()  << std::endl;*/
+
+      Array<bool, 2>& mask = *domain->mask ;
+
+      int indexCount = 0;
+
+      for(int l = 0; l < size ; l++)
       {
-         for(n=0; n<data_n_index; n++)
-         {
-            if (data_dim == 1)
-            {
-               i = (data_i_index(n) + data_ibegin) % ni ;
-               j = (data_i_index(n) + data_ibegin) / ni ;
-               //cout<<i<<" "<<j<<" "<<mask(i,j)<<endl ;
-            }
-            else
-            {
-               i = data_i_index(n) + data_ibegin ;
-               j = data_j_index(n) + data_jbegin ;
-               //cout<<i<<" "<<j<<" "<<mask(i,j)<<endl ;
-            }
-
-            if (i>=0 && i<ni && j>=0 && j<nj && mask(i,j) ) indexCount++ ;
+         for(int n = 0, i = 0, j = 0; n < data_n_index; n++)
+         {
+            int temp_i = data_i_index(n) + data_ibegin,
+                temp_j = (data_dim == 1) ? -1
+                       : data_j_index(n) + data_jbegin;
+            i = (data_dim == 1) ? (temp_i - 2) % ni
+                                : (temp_i - 1) ;
+            j = (data_dim == 1) ? (temp_i - 2) / ni
+                                : (temp_j - 1) ;
+
+            if ((i >= 0 && i < ni) &&
+                (j >= 0 && j < nj) && mask(i, j))
+               indexCount++ ;
          }
       }
 
-      storeIndex.resize(indexCount) ;
+      //std::cout << indexCount  << std::endl;
+
+       storeIndex.resize(indexCount) ;
       out_l_index.resize(indexCount) ;
       out_i_index.resize(indexCount) ;
       out_j_index.resize(indexCount) ;
 
-      for(count=0, indexCount=0, l=0; l<size; l++)
+      for(int count = 0, indexCount = 0,  l = 0; l < size; l++)
       {
-         for(n=0; n<data_n_index; n++, count++)
-         {
-            if (data_dim == 1)
+         for(int n = 0, i = 0, j = 0; n < data_n_index; n++, count++)
+         {
+            int temp_i = data_i_index(n) + data_ibegin,
+                temp_j = (data_dim == 1) ? -1
+                       : data_j_index(n) + data_jbegin;
+            i = (data_dim == 1) ? (temp_i - 2) % ni
+                                : (temp_i - 1) ;
+            j = (data_dim == 1) ? (temp_i - 2) / ni
+                                : (temp_j - 1) ;
+
+            if ((i >= 0 && i < ni) &&
+                (j >= 0 && j < nj) && mask(i, j))
             {
-               i = (data_i_index(n) + data_ibegin) % ni ;
-               j = (data_i_index(n) + data_ibegin) / ni ;
-            }
-            else // (dat_dim == 2)
-            {
-               i = data_i_index(n) + data_ibegin ;
-               j = data_j_index(n) + data_jbegin ;
-            }
-
-            if (i>=0 && i<ni && j>=0 && j<nj && mask(i,j))
-            {
-               storeIndex(indexCount) = count ;
+               storeIndex(indexCount)  = count ;
                out_l_index(indexCount) = l ;
                out_i_index(indexCount) = i ;
@@ -192,5 +201,6 @@
 
    template<>
-      void CGrid::outputField(const Array<double, 1>& stored, Array<double, 2>& outField) const
+      void CGrid::outputField(const Array<double, 1>& stored,
+                                    Array<double, 2>& outField) const
    {
       for(int n = 0; n < storeIndex.size(); n++)
@@ -199,5 +209,6 @@
 
    template<>
-      void CGrid::outputField(const Array<double, 1>& stored, Array<double, 3>& outField) const
+      void CGrid::outputField(const Array<double, 1>& stored,
+                                    Array<double, 3>& outField) const
    {
       for(int n = 0; n < storeIndex.size(); n++)
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/group_template.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/group_template.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/group_template.hpp	(revision 138)
@@ -9,5 +9,6 @@
       public:
 
-         DECLARE_ATTR(group_ref, string) ; // Attribut prÃ©sent uniqument dans les groupes.
+         // Attribut prÃ©sent uniqument dans les groupes.
+         DECLARE_ATTR(group_ref, string) ;
 
          GroupTemplate(void)
@@ -22,5 +23,5 @@
 
          GroupTemplate<T, U>& createGroup(const string& _id)
-            throw (XMLIOUndefinedValueException)
+
          {
             GroupTemplate<T, U> &obj = *GroupTemplate<T, U>::CreateObject(_id);
@@ -39,8 +40,9 @@
 
          GroupTemplate<T, U>& getGroup(const string& _id) const
-            throw (XMLIOUndefinedValueException)
+
          { return (*groupList[_id]); }
 
-         bool hasGroup(const string& _id) const { return (groupList.hasMappedValue(_id)); }
+         bool hasGroup(const string& _id) const
+         { return (groupList.hasMappedValue(_id)); }
 
          const StrHashMap<GroupTemplate<T, U>* >& getGroupList(void) const { return (groupList); }
@@ -51,5 +53,5 @@
 
          T& createChild(const string& _id)
-            throw (XMLIOUndefinedValueException)
+
          {
             T& obj = *ObjectTemplate<T>::CreateObject(_id);
@@ -69,8 +71,9 @@
 
          T& getChild(const string& _id) const
-            throw (XMLIOUndefinedValueException)
+
          { return (*childList[_id]); }
 
-         bool hasChild(const string& _id) const { return (childList.hasMappedValue(_id)); }
+         bool hasChild(const string& _id) const
+         { return (childList.hasMappedValue(_id)); }
 
          const StrHashMap<T*> & getCurrentListChild  (void) const { return (childList); }
@@ -82,5 +85,6 @@
          {
             const vector<GroupTemplate<T, U>*>& groupvect = groupList.getVector();
-            _allc.insert (_allc.end(), getCurrentVectorChild().begin(), getCurrentVectorChild().end());
+            _allc.insert (_allc.end(), getCurrentVectorChild().begin(),
+                                       getCurrentVectorChild().end());
 
             for(unsigned int i = 0; i < groupvect.size() ; i++)
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/logger.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/logger.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/logger.hpp	(revision 138)
@@ -74,5 +74,5 @@
          ~ILogger(void) { this->flush(); }
 
-   }; // class XMLIOLogger
+   }; // class ILogger
 
    // Initialisation de la classe de Logging
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/main.f90
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/main.f90	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/main.f90	(revision 138)
@@ -4,4 +4,5 @@
 
 PROGRAM MAIN
+
    USE IXHANDLE
    USE IXML
@@ -13,37 +14,33 @@
 
    INTEGER       :: compt = 0
-
    TYPE(XHandle) :: nemo_style_ctxt     = NULLHANDLE, &
                     orchidee_style_ctxt = NULLHANDLE, &
                     lmdz_style_ctxt     = NULLHANDLE
-
    TYPE(XHandle) :: temp_mod  = NULLHANDLE, &
                     temp_mod_ = NULLHANDLE
-
-   ! Axes verticaux
+   ! Les axes verticaux
    REAL(kind = 8), DIMENSION(10) :: vaxis  = (/(i, i=1, 10)/)
                                     !vvaxis = (/(i, i=1, 5)/)
-
-   ! Domaines horizontaux
-   REAL(kind = 8), DIMENSION(20) :: lonrect_orch0  = (/(i, i=11, 30)/),&
-                                    latrect_orch0  = (/(i, i=11, 30)/)
-
+   ! Les domaines horizontaux
+   REAL(kind = 8), DIMENSION(20)    :: lonrect_orch0  = (/(i, i=11, 30)/),&
+                                       latrect_orch0  = (/(i, i=11, 30)/)
    REAL(kind = 8), DIMENSION(10,10) :: loncurv_nemo0  = 1, &
                                        latcurv_nemo0  = 1
-
    ! Les durÃ©es
    TYPE(XDuration) :: timestep_1h = XDuration(0., 0., 0., 1., 0., 0.)
                       !timestep_2h = XDuration(0., 0., 0., 2., 0., 0.)
-
+   ! Les dates
+   TYPE(XDate) :: init_date_orchidee = XDate(1985, 03, 15, 17, 35, 00)
    ! Les masques
    LOGICAL(kind = 1), DIMENSION(20, 20) :: mask0  = .TRUE._1
 
-   CHARACTER(len = *), PARAMETER :: filename = &
-            "/local/XMLIOSERVER_DEV/dev_rv/test/iodef_simple_test.xml"
+   ! Les donnÃ©es
+   REAL(kind = 8), DIMENSION(400, 10)    :: orchdata  = 2.0
+   REAL(kind = 8), DIMENSION(10, 10, 20) :: nemodata  = 3.0
 
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
    ! Parsing du document xml depuis un fichier situÃ© sur le disque.
-   CALL xml_Parse_File(filename)
+   CALL xml_Parse_File("/local/XMLIOSERVER_DEV/dev_rv/test/iodef_simple_test.xml")
 
    ! CrÃ©ation de handle sur les contextes exstants dans lequels on souhaite travailler.
@@ -64,7 +61,8 @@
    CALL context_create(context_hdl   = orchidee_style_ctxt, &
                        context_id    = "orchidee_style",    &
-                       calendar_type = GREGORIAN)
-
-   ! ---------> field_dÃ©finition
+                       calendar_type = GREGORIAN,           &
+                       init_date     = init_date_orchidee)
+
+   ! ---------> field_definition
    CALL handle_create(temp_mod, GFIELD,  "field_definition")
       CALL xml_tree_add(parent_hdl = temp_mod,        &
@@ -88,5 +86,6 @@
                                     ffreq_op       = timestep_1h,    &
                                     fgrid_ref      = "grid0")
-   ! ---------> axis_dÃ©finition
+
+   ! ---------> axis_definition
    CALL handle_create(temp_mod, GAXIS,   "axis_definition")
       CALL xml_tree_add(parent_hdl = temp_mod,        &
@@ -106,5 +105,5 @@
                                    avalue         = vaxis)
 
-   ! ---------> domain_dÃ©finition
+   ! ---------> domain_definition
    CALL handle_create(temp_mod, GDOMAIN, "domain_definition")
       CALL xml_tree_add(parent_hdl = temp_mod,        &
@@ -135,5 +134,5 @@
                                      domtype        = "rectilinear")
 
-   ! ---------> file_dÃ©finition
+   ! ---------> file_definition
    CALL handle_create(temp_mod, GFILE,   "file_definition")
       CALL xml_tree_add(parent_hdl = temp_mod,        &
@@ -181,11 +180,42 @@
 
    ! ----------- DÃ©but du traitement ----------- !
-   ! On choisit le context dans lequel on va travailler et on commence le traitement des donnÃ©es.
+
+   ! <<<------------- orchidÃ©e
+   PRINT *, "Style OrchydÃ©e"
+   ! On choisit le context dans lequel on va travailler
+   ! et on commence le traitement des donnÃ©es.
    CALL dtreatment_start(orchidee_style_ctxt, NETCDF4)
+   CALL set_timestep(XDuration(0., 0., 0., 1., 0., 0.)) ! UNE heure
 
    ! ExÃ©cution de la boucle de calcul-Ã©criture.
-   DO compt = 0, 9
-
+   DO compt = 1, 9
+      CALL update_calendar(compt)
+         CALL write_data("field0", data2d_k8 = orchdata)
    END DO
+   CALL dtreatment_end(orchidee_style_ctxt)
+
+   ! <<<------------- lmdz
+   PRINT *, "Style Lmdz"
+   CALL dtreatment_start(lmdz_style_ctxt, NETCDF4)
+   CALL set_timestep(XDuration(0., 0., 0., 1., 0., 0.)) ! UNE heure
+
+   ! ExÃ©cution de la boucle de calcul-Ã©criture.
+   DO compt = 1, 9
+      CALL update_calendar(compt)
+
+   END DO
+   CALL dtreatment_end(lmdz_style_ctxt)
+
+   ! <<<------------- nemo
+   PRINT *, "Style Nemo"
+   CALL dtreatment_start(nemo_style_ctxt, NETCDF4)
+   CALL set_timestep(XDuration(0., 0., 0., 1., 0., 0.)) ! UNE heure
+
+   ! ExÃ©cution de la boucle de calcul-Ã©criture.
+   DO compt = 1, 9
+      CALL update_calendar(compt)
+      CALL write_data("champ0",  data3d_k8 = nemodata)
+   END DO
+   CALL dtreatment_end(nemo_style_ctxt)
 
    ! Affichage de l'arbre xml au niveau de la sortie.
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/object_template.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/object_template.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/object_template.hpp	(revision 138)
@@ -25,4 +25,5 @@
          {
             const AttributRegistrar &ar = c;
+            std::string extraAttributes = c.getXmlExtraAttributes();
 
             if (c.baseObject != NULL)
@@ -32,18 +33,32 @@
             if (c.isDefinition())
             {
-               out << NIndent << std::endl;
-               out << NIndent << "<!-- Groupe de dÃ©finition dans le contexte \"" << ObjectTemplate<T>::GetCurrentContextId() << "\" courant -->" << std::endl;
+               out << NIndent << std::endl
+                   << NIndent << "<!-- Groupe de dÃ©finition dans le contexte \""
+                   << ObjectTemplate<T>::GetCurrentContextId() << "\" courant -->"
+                   << std::endl;
             }
 
             if (c.hasChild())
             {
-               out << IncIndent  << "<"  << c.getName()  << c.printId() << ar << ">" << std::endl;
-               c.printChild(out); // << Ecriture des objets enfants ici.
-               if (c.hasId() && (c.getName().compare("context") == 0))
-                  out << NIndent << std::endl;
+               bool __isContext = false;
+               if (c.hasId() &&
+                  (c.getName().compare("context") == 0))
+               {
+                  out << IncIndent       << "<" << c.getName() << c.printId()
+                      << extraAttributes << ">" << std::endl;
+                  __isContext = true;
+               }
+               else
+                  out << IncIndent   << "<"  << c.getName()
+                      << c.printId() << ar << ">" << std::endl;
+               c.printChild(out);
+               if (__isContext) out << NIndent << std::endl;
                out << NIndent    << "</" << c.getName()  << ">" << DecEndl;
             }
             else
-               out << IncIndent << "<" << c.getName()  << c.printId() << ar << "/>" << DecEndl;
+            {
+               out << IncIndent << "<" << c.getName() << c.printId()
+                   << extraAttributes << ar << "/>" << DecEndl;
+            }
 
             return (out);
@@ -56,5 +71,5 @@
          }
 
-         string getName(void) const
+         std::string getName(void) const
          {
             if (this->hasId())
@@ -98,4 +113,7 @@
          }
 
+         virtual std::string getXmlExtraAttributes(void) const
+         { return (std::string("")); }
+
          virtual void parse (XMLNode& _node)
          {
@@ -117,5 +135,5 @@
       public : /* static */
 
-         static T* CreateObject(const string& _id) throw (XMLIOUndefinedValueException)
+         static T* CreateObject(const string& _id)
          {
             // Si l'identifiant est rÃ©pertoriÃ©, on retourne l'Ã©lÃ©ment existant.
@@ -136,5 +154,5 @@
          }
 
-         static T* GetObject(const string& _id) throw (XMLIOUndefinedValueException)
+         static T* GetObject(const string& _id)
          { return (ObjectTemplate<T>::AllListObj[CurrContext][_id]); }
 
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/xml_node.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/xml_node.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/xml_node.hpp	(revision 138)
@@ -97,8 +97,8 @@
                   node.setCNode(node.pDoc->documentElement());
                   if (node.getElementName().compare(_rootName) != 0) // << A passer en avertissement.
-                     throw XMLParsingException("L'Ã©lÃ©ment racine doit avoir pour valeur <" + _rootName + "> (\"" + node.getElementName() + "\" lue)");
+                     XMLIOError("L'Ã©lÃ©ment racine doit avoir pour valeur <" + _rootName + "> (\"" + node.getElementName() + "\" lue)");
                }
                else
-                  throw XMLIOStreamException("Impossible de lire le flux en entrÃ©e pour le parsing XML !");
+                  XMLIOError("Impossible de lire le flux en entrÃ©e pour le parsing XML !");
 
                return (node);
Index: /XMLIO_V2/dev/dev_rv/src/XMLIO/xml_parser.hpp
===================================================================
--- /XMLIO_V2/dev/dev_rv/src/XMLIO/xml_parser.hpp	(revision 137)
+++ /XMLIO_V2/dev/dev_rv/src/XMLIO/xml_parser.hpp	(revision 138)
@@ -29,9 +29,15 @@
 
                   if (attributes.end() == attributes.find("id"))
-                  { WARNING("Le context ne sera pas traitÃ© car il n'est pas identifiÃ© !"); continue; }
+                  {
+                     WARNING("Le context ne sera pas traitÃ© car il n'est pas identifiÃ© !");
+                     continue;
+                  }
 
                   if( Context::GetAllListObject().find(attributes["id"]) !=
                       Context::GetAllListObject().end())
-                  { WARNING("Le context ne sera pas traitÃ© car il existe dÃ©jÃ  un autre context possÃ©dant le mÃªme nom !"); continue; }
+                  {
+                     WARNING("Le context ne sera pas traitÃ© car il existe dÃ©jÃ  un autre context possÃ©dant le mÃªme nom !");
+                     continue;
+                  }
 
                   Context::SetCurrentContext(attributes["id"], false, false);
@@ -40,5 +46,6 @@
                   if ((attributes.end() != attributes.find("calendar_type")) &&
                       (attributes.end() != attributes.find("start_date")))
-                     context.setCalendar(attributes["calendar_type"], attributes["start_date"]);
+                     context.setCalendar(attributes["calendar_type"],
+                                         attributes["start_date"]);
 
                   context.parse(_node);
