Index: XMLIO_V2/dev/dev_rv/Makefile.wk
===================================================================
--- XMLIO_V2/dev/dev_rv/Makefile.wk	(revision 216)
+++ XMLIO_V2/dev/dev_rv/Makefile.wk	(revision 229)
@@ -13,9 +13,9 @@
 MCOLOR    = no
 SHOWCMD   = yes
-VTK       = no
+VTK       = yes
 GUI       = no
-NPROC     = 6
+NPROC     = 1
 #VERSION   = 4
-CSUITE    = intel
+CSUITE    = gnu
 PFORME    = fedora-wk
 FORTEXT   = .f90
@@ -23,4 +23,9 @@
 
 ifeq ($(HOSTNAME), localhost.localdomain)
+	PFORME = fedora-wk
+	CSUITE = gnu
+endif
+
+ifeq ($(HOSTNAME), gaia)
 	PFORME = fedora-wk
 	CSUITE = gnu
@@ -75,4 +80,8 @@
 	HDF5_PATH   = $(DEV_PATH)/extra/hdf5
 	MPI_PATH    = /usr/lib/openmpi
+endif
+
+ifeq ($(HOSTNAME), gaia)
+	BOOST_PATH  = /usr/include
 endif
 
@@ -199,4 +208,5 @@
 OUPT_PATH = $(SRC_PATH)/output
 MNGR_PATH = $(SRC_PATH)/manager
+NCDF_PATH = $(SRC_PATH)/netcdf
 GUI_PATH  = $(SRC_PATH)/qt
 VTK_PATH  = $(SRC_PATH)/vtk
@@ -208,5 +218,5 @@
 
 VPATH = $(DEP_PATH):$(SRC_PATH):$(CSRC_PATH):$(NODE_PATH) $(XML_PATH)\
-:$(FUNC_PATH):$(DATE_PATH):$(GUI_PATH):$(VTK_PATH):$(INPT_PATH)\
+:$(FUNC_PATH):$(DATE_PATH):$(GUI_PATH):$(VTK_PATH):$(INPT_PATH) $(NCDF_PATH)\
 :$(OUPT_PATH):$(MNGR_PATH):$(FAKE_PATH):$(FSRC_PATH):$(CONF_PATH)
 
@@ -390,5 +400,5 @@
 
 ifeq ($(VERSION), 4)
-	ELEMS_CPP = object exception xml_node xml_parser
+	ELEMS_CPP = object exception xml_node xml_parser inetcdf4 inetcdf4_adv lscereader
 endif
 
Index: XMLIO_V2/dev/dev_rv/src/xmlio/data_treatment.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/data_treatment.hpp	(revision 216)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/data_treatment.hpp	(revision 229)
@@ -93,9 +93,10 @@
             (const StdString & fieldId, const ARRAY(float, N) & data)
       {
-         std::vector<boost::multi_array<double, N>::size_type shape() > shape;
-         const size_type *	shapearr = data->shape();
+		 typedef typename boost::multi_array<double, N>::size_type sizetp;
+         std::vector<sizetp> shape;
+         const sizetp *	shapearr = data->shape();
 
          shape.assign(shapearr, shapearr + N);
-         ARRAY_CREATE(datad, double, N, shape);
+         ARRAY_CREATE(datad, double, N, [shape]);
          datad->assign(data->begin(), data->end());
 
@@ -123,5 +124,5 @@
                { 
                    boost::shared_ptr<comm::CClient> client = comm::CClient::GetClient();
-                   client.sendData(fieldId, file->getId(), field->getData());
+                   client->sendData(fieldId, file->getId(), field->getData());
                }
                else
Index: XMLIO_V2/dev/dev_rv/src/xmlio/date.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/date.cpp	(revision 216)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/date.cpp	(revision 229)
@@ -15,6 +15,8 @@
       {
          if(!this->checkDate())
+         {
             DEBUG(<< "La date initialisÃ©e a Ã©tÃ© modifiÃ©e "
                   << "car elle Ã©tait incorrecte par rapport au calendrier souhaitÃ©.");
+         }
       }
 
@@ -25,6 +27,8 @@
       {
          if(!this->checkDate())
+         {
             DEBUG(<< "La date initialisÃ©e a Ã©tÃ© modifiÃ©e "
                   << "car elle Ã©tait incorrecte par rapport au calendrier souhaitÃ©.");
+         }
       }
 
@@ -67,7 +71,9 @@
          in >> date.hour >> c >> date.minute >> c >> date.second;
          if(!date.checkDate())
+         {
             DEBUG("La date initialisÃ©e (depuis une chaÃ®ne de caractÃšres) "
                   << "a Ã©tÃ© modifiÃ©e car elle Ã©tait incorrecte "
                   << "par rapport au calendrier souhaitÃ©.");
+         }
          return (in);
       }
Index: XMLIO_V2/dev/dev_rv/src/xmlio/node/field.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/node/field.hpp	(revision 216)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/node/field.hpp	(revision 229)
@@ -10,4 +10,5 @@
 #include "date.hpp"
 #include "declare_group.hpp"
+#include "calendar_util.hpp"
 
 namespace xmlioserver {
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/exception.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/exception.cpp	(revision 216)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/exception.cpp	(revision 229)
@@ -20,5 +20,4 @@
 // XMLIOServer headers
 #include "xmlioserver_spl.hpp"
-#include "exception.hpp"
 
 // /////////////////////////////// DÃ©finitions ////////////////////////////// //
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/main_server.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/main_server.cpp	(revision 216)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/main_server.cpp	(revision 229)
@@ -16,11 +16,18 @@
 #include "xmlioserver_spl.hpp"
 
+#include "inetcdf4.hpp"
+#include "inetcdf4_impl.hpp"
+#include "inetcdf4_adv.hpp"
+#include "inetcdf4_adv_impl.hpp"
+#include "lscereader.hpp"
+
 namespace xios = xmlioserver;
 //~ using namespace xios::data;
-//~ using namespace xios::io;
+using namespace xios::io;
 //~ using namespace xios::tree;
 //~ using namespace xios::xml;
 //~ using namespace xios::comm;
 //~ using namespace xios::func;
+using namespace xios::vtk;
 
 // Point d'entrÃ©e du programme serveur principal.
@@ -29,4 +36,57 @@
    try
    {
+       std::cout << "Test input"  << std::endl;
+       CINetCDF4Adv file_coslatgrid("test/vtk/file_coslatgrid.nc4");
+       CINetCDF4Adv file_xboundsybounds("test/vtk/file_xboundsybounds.nc4");
+       CINetCDF4Adv sampleCurveGrid4("test/vtk/sampleCurveGrid4.nc4");
+       CINetCDF4Adv sampleGenGrid3("test/vtk/sampleGenGrid3.nc4");
+       CINetCDF4Adv ucov("test/vtk/ucov.nc4");
+       
+       std::vector<CINetCDF4Adv*> listinput;
+       listinput.push_back(&file_coslatgrid);
+       listinput.push_back(&file_xboundsybounds);
+       listinput.push_back(&sampleCurveGrid4);
+       listinput.push_back(&sampleGenGrid3);
+       listinput.push_back(&ucov);
+       std::vector<CINetCDF4Adv*>::iterator it = listinput.begin(), end = listinput.end();
+       
+       for (; it != end; it++)
+       {
+           std::cout << "-------------" << std::endl;
+           std::map<std::string, std::size_t> dims = (*it)->getDimensions();
+           std::map<std::string, std::size_t>::iterator it0 = dims.begin(), end0 = dims.end();
+           
+           for (; it0 != end0; it0++)
+           {
+               std::cout << "dimensions " << it0->first << " : " << it0->second << std::endl;
+           }
+           
+           std::vector<std::string> vars = (*it)->getVariables();
+           std::vector<std::string>::iterator it1 = vars.begin(), end1 = vars.end();
+           for (; it1 != end1; it1++)
+           {
+               std::map<std::string, std::size_t> dims = (*it)->getDimensions(&(*it1));
+               std::map<std::string, std::size_t>::iterator it3 = dims.begin(), end3 = dims.end();
+
+               std::cout << "Variable " << *it1 << " [";
+               for (; it3 != end3; it3++)
+               {
+                   std::cout << it3->first << ":" << it3->second << " ";
+               }
+               std::cout << "] :" << std::endl;
+           }
+       }
+       
+       boost::multi_array<float, 1> data;
+       file_coslatgrid.readData(data, "NTEMP", 1);
+       std::cout << data.size() << std::endl;
+
+       
+       //vtkLSCEReader::ShowVariable("test/vtk/file_coslatgrid.nc4", "NTEMP");
+       //vtkLSCEReader::ShowVariable("test/vtk/ucov.nc4", "ucov");
+       vtkLSCEReader::ShowVariable("test/vtk/sampleCurveGrid4.nc4", "sample");
+       //vtkLSCEReader::ShowVariable("test/vtk/sampleGenGrid3.nc4", "sample");
+       //vtkLSCEReader::ShowVariable("test/vtk/file_xboundsybounds.nc4", "A");
+       
 
    }
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4.cpp	(revision 229)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4.cpp	(revision 229)
@@ -0,0 +1,390 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+/**
+ * \file    inetcdf4.hpp
+ * \brief   Lecture des fichiers de donnÃ©es au format netCDF-4 (implÃ©mentation).
+ * \author  HervÃ© Ozdoba
+ * \version 0.4
+ * \date    15 Juin 2011
+ */
+
+// XMLIOServer headers
+#include "inetcdf4.hpp"
+#include "inetcdf4_impl.hpp"
+
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+namespace xmlioserver {
+namespace io {
+    
+   CINetCDF4::CINetCDF4(const std::string & filename)
+   {
+      CheckError(nc_open(filename.c_str(), NC_NOWRITE, &this->ncidp));
+   }
+
+   CINetCDF4::~CINetCDF4(void)
+   {
+       CheckError(nc_close(this->ncidp));
+   }
+   
+   void CINetCDF4::CheckError(int _status) throw (CException)
+   {
+      if (_status != NC_NOERR)
+      {
+         std::string errormsg (nc_strerror(_status)); // fuite mÃ©moire ici ?
+         XIOS_ERROR("CONetCDF4::CheckError(int status)",
+              << "[ status = " << _status << " ] " << errormsg);
+      }
+   }
+   
+   int CINetCDF4::getCurrentGroup(void)
+   {
+      return (this->getGroup(this->getCurrentPath()));
+   }
+   
+   int CINetCDF4::getGroup(const CNetCDF4Path & path)
+   {
+      int retvalue = this->ncidp;
+      
+      CNetCDF4Path::const_iterator
+         it  = path.begin(), end = path.end();
+
+      for (;it != end; it++)
+      {
+         const std::string & groupid = *it;
+         CheckError(nc_inq_ncid(retvalue, const_cast<char*>(groupid.c_str()), &retvalue));
+      }
+      return (retvalue);
+   }
+   
+   int CINetCDF4::getVariable(const std::string & varname)
+   {
+      int varid = 0;
+      int grpid = this->getCurrentGroup();
+      CheckError(nc_inq_varid (grpid, varname.c_str(), &varid));
+      return (varid);
+   }
+   
+   int CINetCDF4::getDimension(const std::string & dimname)
+   {
+      int dimid = 0;
+      int grpid = this->getCurrentGroup();
+      CheckError(nc_inq_dimid (grpid, dimname.c_str(), &dimid));
+      return (dimid);
+   }
+   
+   int CINetCDF4::getUnlimitedDimension(void)
+   {
+      int dimid = 0;
+      int grpid = this->getCurrentGroup();
+      CheckError(nc_inq_unlimdim (grpid, &dimid));
+      return (dimid);
+   }
+   
+   std::vector<std::size_t> CINetCDF4::getDimensions(const std::string & varname)
+   {
+      std::size_t size = 0;
+      std::vector<std::size_t> retvalue;
+      int grpid = this->getCurrentGroup();
+      int varid = this->getVariable(varname);
+      int nbdim = 0, *dimid = NULL;
+
+      CheckError(nc_inq_varndims(grpid, varid, &nbdim));
+      dimid = new int[nbdim]();
+      CheckError(nc_inq_vardimid(grpid, varid, dimid));
+
+      for (int i = 0; i < nbdim; i++)
+      {
+         CheckError(nc_inq_dimlen (grpid, dimid[i], &size));
+         if (size == NC_UNLIMITED)
+             size = UNLIMITED_DIM;
+         retvalue.push_back(size);
+      }
+
+      return (retvalue);
+   }
+   
+   const CINetCDF4::CNetCDF4Path & CINetCDF4::getCurrentPath(void) const
+   { 
+       return (this->path); 
+   }
+
+   void CINetCDF4::setCurrentPath(const CNetCDF4Path & path)
+   { 
+       this->path = path; 
+   }
+   
+   void CINetCDF4::getReadDataInfos(const std::string & _varname,
+                                    std::size_t   _record, 
+                                    std::size_t & _array_size,
+                                    std::vector<std::size_t> & _sstart,
+                                    std::vector<std::size_t> & _scount,
+                                    const std::vector<std::size_t> * _start,
+                                    const std::vector<std::size_t> * _count)
+   {
+      std::vector<std::size_t> sizes = this->getDimensions(_varname);       
+      std::vector<std::size_t>::const_iterator
+         it  = sizes.begin(), end = sizes.end();
+      int i = 0;
+
+      for (;it != end; it++)
+      {
+         std::size_t  s = *it;
+         if ((_start != NULL) && (_count != NULL))
+         {
+            if (s == UNLIMITED_DIM)
+            {
+               _sstart.push_back(_record);
+               _scount.push_back(1);
+            }
+            else
+            {
+               _sstart.push_back((*_start)[i]);
+               _scount.push_back((*_count)[i]);
+               _array_size *= (*_count)[i];
+               i++;
+            }
+         }
+         else
+         {
+            if (s == UNLIMITED_DIM)
+            {
+               _sstart.push_back(_record);
+               _scount.push_back(1);
+            }
+            else
+            {
+               _sstart.push_back(0);
+               _scount.push_back(sizes[i]);
+               _array_size *= sizes[i];
+            }
+            i++;
+         }
+      }
+   }
+   
+   void CINetCDF4::readAttribute
+      (const std::string & _attname, std::string & _value, const std::string * _varname)
+   {
+        std::vector<char> chart;
+        this->readAttribute(_attname,chart , _varname);
+        _value.assign(&(chart[0]), chart.size());
+   }
+
+   std::vector<std::string> CINetCDF4::getAttributes(const std::string * const _varname)
+   {
+      int nbatt = 0;
+      char full_name_in[NC_MAX_NAME +1];
+      std::vector<std::string> retvalue;
+      int grpid = this->getCurrentGroup();
+      int varid = (_varname != NULL) ? this->getVariable(*_varname) : NC_GLOBAL;
+
+      if (_varname != NULL)
+         CheckError(nc_inq_varnatts (grpid, varid, &nbatt));
+      else
+         CheckError(nc_inq_natts(grpid, &nbatt));
+
+      for (int i = 0; i < nbatt; i++)
+      {
+         CheckError(nc_inq_attname(grpid, varid, i, full_name_in));
+         std::string attname(full_name_in);
+         retvalue.push_back(attname);
+      }
+      return (retvalue);
+   }
+   
+   
+   std::map<std::string, std::size_t> CINetCDF4::getDimensions(const std::string * const _varname)
+   {
+      std::size_t size = 0;
+      char full_name_in[NC_MAX_NAME +1];
+      int nbdim = 0, *dimid = NULL;
+      int grpid = this->getCurrentGroup();
+      int varid = (_varname != NULL) ? this->getVariable(*_varname) : NC_GLOBAL;
+      std::map<std::string, std::size_t> retvalue;
+
+      if (_varname != NULL)
+      {
+         CheckError(nc_inq_varndims(grpid, varid, &nbdim));
+         dimid = new int[nbdim]();
+         CheckError(nc_inq_vardimid(grpid, varid, dimid));
+      }
+      else
+      {
+         CheckError(nc_inq_dimids(grpid, &nbdim, NULL, 1));
+         dimid = new int[nbdim]();
+         CheckError(nc_inq_dimids(grpid, NULL, dimid, 1));
+      }
+
+      for (int i = 0; i < nbdim; i++)
+      {
+         CheckError(nc_inq_dimname(grpid, dimid[i], full_name_in));
+         CheckError(nc_inq_dimlen (grpid, dimid[i], &size));
+
+         std::string dimname(full_name_in);
+         retvalue.insert(retvalue.end(), std::make_pair(dimname, size));
+      }
+      delete [] dimid;
+
+      return (retvalue);
+   }
+   
+   std::vector<std::string> CINetCDF4::getGroups(void)
+   {
+      std::size_t strlen = 0;
+      char full_name_in[NC_MAX_NAME +1];
+      int nbgroup = 0, *groupid = NULL;
+      int grpid = this->getCurrentGroup();
+      std::vector<std::string> retvalue;
+
+      CheckError(nc_inq_grps(grpid, &nbgroup, NULL));
+      groupid = new int[nbgroup]();
+      CheckError(nc_inq_grps(grpid, NULL, groupid));
+
+      for (int i = 0; i < nbgroup; i++)
+      {
+         CheckError(nc_inq_grpname_full(groupid[i], &strlen, full_name_in));
+         std::string groupname(full_name_in, strlen);
+         retvalue.push_back(groupname);
+      }
+
+      delete [] groupid;
+      return (retvalue);
+   }
+   
+   std::vector<std::string> CINetCDF4::getVariables(void)
+   {
+      char full_name_in[NC_MAX_NAME +1];
+      int nbvar = 0, *varid = NULL;
+      int grpid = this->getCurrentGroup();
+      std::vector<std::string> retvalue;
+
+      CheckError(nc_inq_varids(grpid, &nbvar, NULL));
+      varid = new int[nbvar]();
+      CheckError(nc_inq_varids(grpid, NULL, varid));
+
+      for (int i = 0; i < nbvar; i++)
+      {
+         CheckError(nc_inq_varname(grpid, varid[i], full_name_in));
+         std::string varname(full_name_in);
+         retvalue.push_back(varname);
+      }
+
+      delete [] varid;
+      return (retvalue);
+   }
+   
+   std::size_t CINetCDF4::getNbOfTimestep(void)
+   {
+       return (this->getDimensions(NULL)[this->getUnlimitedDimensionName()]);
+   }
+            
+   std::string CINetCDF4::getUnlimitedDimensionName(void)
+   {
+      char full_name_in[NC_MAX_NAME +1];
+      int grpid = this->getGroup(path);
+      int dimid = this->getUnlimitedDimension();
+      CheckError(nc_inq_dimname(grpid, dimid, full_name_in));
+
+      std::string dimname(full_name_in);
+      return (dimname);
+   }
+ 
+   std::vector<std::string> CINetCDF4::getDimensionsIdList (const std::string * _varname)
+   {
+      char full_name_in[NC_MAX_NAME +1];
+      int nbdim = 0, *dimid = NULL;
+      int grpid = this->getCurrentGroup();
+      int varid = (_varname != NULL) ? this->getVariable(*_varname) : NC_GLOBAL;
+      std::vector<std::string> retvalue;
+
+      if (_varname != NULL)
+      {
+         CheckError(nc_inq_varndims(grpid, varid, &nbdim));
+         dimid = new int[nbdim]();
+         CheckError(nc_inq_vardimid(grpid, varid, dimid));
+      }
+      else
+      {
+         CheckError(nc_inq_dimids(grpid, &nbdim, NULL, 1));
+         dimid = new int[nbdim]();
+         CheckError(nc_inq_dimids(grpid, NULL, dimid, 1));
+      }
+
+      for (int i = 0; i < nbdim; i++)
+      {
+         CheckError(nc_inq_dimname(grpid, dimid[i], full_name_in));
+         std::string dimname(full_name_in);
+         retvalue.push_back(dimname);
+      }
+      delete [] dimid;
+
+      return (retvalue);
+   }
+   
+   template <>
+      void CINetCDF4::readData_(int _grpid, int _varid,
+                                const std::vector<std::size_t> & _sstart,
+                                const std::vector<std::size_t> & _scount,
+                                float * _data)
+   {
+      CheckError(nc_get_vara_float(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data));       
+   }
+   
+   template <>
+      void CINetCDF4::readData_(int _grpid, int _varid,
+                                const std::vector<std::size_t> & _sstart,
+                                const std::vector<std::size_t> & _scount,
+                                int * _data)
+   {
+      CheckError(nc_get_vara_int(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data));       
+   }
+   
+   template <>
+      void CINetCDF4::readData_(int _grpid, int _varid,
+                                const std::vector<std::size_t> & _sstart,
+                                const std::vector<std::size_t> & _scount,
+                                double * _data)
+   {
+      CheckError(nc_get_vara_double(_grpid, _varid, &(_sstart[0]), &(_scount[0]), _data));       
+   }
+   
+   template <>
+      void CINetCDF4::readAttribute_
+         (const std::string & _attname, double * _value, int _grpid, int _varid)
+   {       
+        CheckError(nc_get_att_double(_grpid, _varid, _attname.c_str(), _value));
+   }
+   
+   template <>
+      void CINetCDF4::readAttribute_
+         (const std::string & _attname, float * _value, int _grpid, int _varid)
+   {
+       CheckError(nc_get_att_float(_grpid, _varid, _attname.c_str(), _value));
+   }
+   
+   template <>
+      void CINetCDF4::readAttribute_
+         (const std::string & _attname, int * _value, int _grpid, int _varid)
+   {
+       CheckError(nc_get_att_int(_grpid, _varid, _attname.c_str(), _value));
+   }
+   
+   template <>
+      void CINetCDF4::readAttribute_
+         (const std::string & _attname, char * _value, int _grpid, int _varid)
+   {
+       CheckError(nc_get_att_text(_grpid, _varid, _attname.c_str(), _value));
+   }
+   
+   bool CINetCDF4::varExist(const std::string & _varname)
+   {
+      int varid = 0;
+      int grpid = this->getCurrentGroup();
+      return (nc_inq_varid (grpid, _varname.c_str(), &varid) == NC_NOERR);
+   }
+   
+} // namespace io
+} // namespace xmlioserver
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4.hpp	(revision 216)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4.hpp	(revision 229)
@@ -18,13 +18,23 @@
 // M(essage) P(assing) I(nterface) headers
 #include <mpi.h>
-
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
 // NetCDF headers
 #define MPI_INCLUDED
 #include <netcdf.h>
 
+// C++ standard headers
+#  include <vector>
+
+// boost Headers
+#include <boost/multi_array.hpp>
+
 #endif // __XIOS_NO_EXTERN
 
 // XMLIOServer headers
 #include "xmlioserver_spl.hpp"
+
+#ifndef UNLIMITED_DIM
+   #define UNLIMITED_DIM (size_t)(-1)
+#endif  //UNLIMITED_DIM
 
 // ////////////////////////////// DÃ©clarations ///////////////////////////// //
@@ -72,5 +82,50 @@
          
             //! \brief Destructeur de l'objet (le fichier est clos lors de son appel).
-            ~CINetCDF4(void);
+            virtual ~CINetCDF4(void);
+            
+            
+                
+         public : // Accesseur de parcours (d'exploration)
+             
+            std::size_t getNbOfTimestep(void);
+            
+            std::string getUnlimitedDimensionName(void);
+             
+            std::map<std::string, std::size_t> 
+               getDimensions(const std::string * const _varname  = NULL); 
+            
+            std::vector<std::string> getDimensionsIdList (const std::string * _varname);
+            
+            std::vector<std::string> getAttributes(const std::string * const _varname  = NULL);            
+            std::vector<std::string> getGroups   (void);
+            std::vector<std::string> getVariables(void);
+            
+         public : // Mutateur
+            
+            void setCurrentPath(const CNetCDF4Path & _path);
+            
+         public : // Accesseurs
+            
+            const CNetCDF4Path & getCurrentPath(void) const;
+            
+         public : // Lecture
+            
+            template <class DataType>
+               void readAttribute
+                  (const std::string &     _attname,
+                   std::vector<DataType> & _value,
+                   const std::string *     _varname = NULL);
+            
+           void readAttribute
+                  (const std::string & _attname,
+                   std::string       & _value,
+                   const std::string * _varname = NULL);
+
+            template <class DataType, std::size_t ndim>
+               void readData( boost::multi_array<DataType, ndim> & _data,
+                              const std::string                  & _varname,
+                              std::size_t                          _record = 1,
+                              const std::vector<std::size_t>     * _start  = NULL,
+                              const std::vector<std::size_t>     * _count  = NULL);
 
          protected : // Accesseurs protÃ©gÃ©s
@@ -123,5 +178,5 @@
             /*!
              * \brief Retourne l'identifiant de la dimension non limitÃ© dans le fichier.
-             * \return l'identifiant de la dimension non limitÃ©.
+             * \return l'identifiant de la dimension non limitÃ© ou <b>-1</b> s'il n'y en a pas.
              */
             int getUnlimitedDimension(void);
@@ -134,5 +189,30 @@
             bool varExist(const std::string & _varname);
 
-
+         private : // Obtention des informations de lecture
+            
+            void getReadDataInfos(const std::string              & _varname,
+                                  std::size_t                      _record, 
+                                  std::size_t                    & _array_size,
+                                  std::vector<std::size_t>       & _sstart,
+                                  std::vector<std::size_t>       & _scount,
+                                  const std::vector<std::size_t> * _start,
+                                  const std::vector<std::size_t> * _count);
+            
+         private : // Lecture
+             
+             template <class DataType>
+                void readData_(int                              _grpid,
+                               int                              _varid,
+                               const std::vector<std::size_t> & _sstart,
+                               const std::vector<std::size_t> & _scount,
+                               DataType                       * _data);
+             
+             template <class DataType>
+                void readAttribute_
+                        (const std::string & _attname,
+                         DataType          * _value,
+                         int                 _grpid,
+                         int                 _varid = NC_GLOBAL);
+             
          private : // VÃ©rification des erreurs NetCDF
 
@@ -150,10 +230,10 @@
              * \endcode
              */
-            static void CheckError(int _status);
+            static void CheckError(int _status) throw (CException);
 
          public : // PropriÃ©tÃ©s privÃ©es
          
-            CONetCDF4Path path; /*!< \brief Chemin vers le groupe de donnÃ©es en cours de lecture. */
-            int ncidp;          /*!< \brief Identifiant de fichiers netCDF. */
+            std::vector<std::string> path; /*!< \brief Chemin vers le groupe de donnÃ©es en cours de lecture. */
+            int ncidp;                     /*!< \brief Identifiant de fichiers netCDF. */
          
       }; // class CINetCDF4
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4_adv.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4_adv.cpp	(revision 229)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4_adv.cpp	(revision 229)
@@ -0,0 +1,430 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+/**
+ * \file    inetcdf4_adv.hpp
+ * \brief   Lecture des fichiers de donnÃ©es au format netCDF-4, fonctionnalitÃ©s avancÃ©es (implÃ©mentation).
+ * \author  HervÃ© Ozdoba
+ * \version 0.4
+ * \date    15 Juin 2011
+ */
+
+#ifndef __XIOS_NO_EXTERN
+
+// Boost headers
+#include <boost/algorithm/string.hpp>
+
+#endif // __XIOS_NO_EXTERN
+
+// XMLIOServer headers
+#include "inetcdf4_adv.hpp"
+#include "inetcdf4_adv_impl.hpp"
+
+
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+namespace xmlioserver {
+namespace io {
+    
+   CINetCDF4Adv::CINetCDF4Adv(const std::string & filename)
+        : CINetCDF4(filename)
+   { /* Ne rien faire de plus */ }
+
+   CINetCDF4Adv::~CINetCDF4Adv(void)
+   { /* Ne rien faire de plus */ }
+   
+   bool CINetCDF4Adv::hasAttribute(const std::string & name,
+                                   const std::string * const _varname)
+   {
+      std::vector<std::string > atts = this->getAttributes(_varname);
+      std::vector<std::string >::const_iterator it = atts.begin(), end = atts.end();
+      for (; it != end; it++)
+      {
+         const std::string  & attname = *it;
+         if (attname.compare(name) == 0) return (true);
+      }
+      return (false);
+   }
+   
+   bool CINetCDF4Adv::hasVariable    (const std::string & _varname)
+   {
+       return (SuperClass::varExist(_varname));
+   }
+   
+   bool CINetCDF4Adv::hasMissingValue(const std::string & _varname)
+   {
+      return (this->hasAttribute("missing_value", &_varname) ||
+              this->hasAttribute("_FillValue", &_varname));
+   }
+   
+   bool CINetCDF4Adv::hasCoordinates (const std::string & _varname)
+   {
+      return (this->hasAttribute("coordinates", &_varname));
+   }
+   
+   bool CINetCDF4Adv::hasBounds      (const std::string & _varname)
+   {
+      return (this->hasAttribute("bounds", &_varname));
+   }
+
+   bool CINetCDF4Adv::hasTemporalDim(void)
+   {
+      return (this->getUnlimitedDimension() != -1);
+   }
+
+   bool CINetCDF4Adv::isBound(const std::string & _varname)
+   {
+      std::set<std::string> bounds = this->getBoundVariables();
+      return (bounds.find(_varname) != bounds.end());
+   }
+   
+   bool CINetCDF4Adv::isCoordinate(const std::string & _varname)
+   {
+      std::set<std::string> coords = this->getCoordVariables();
+      return (coords.find(_varname) != coords.end());
+   }
+   
+   bool CINetCDF4Adv::isRectilinear(const std::string & _varname)
+   {
+      std::vector<std::string> coords = this->getCoordinatesIdList(_varname);
+      std::vector<std::string>::const_iterator it = coords.begin(), end = coords.end();
+      for (; it != end; it++)
+      {
+         const std::string & coord = *it;
+         if (this->hasVariable(coord) && !this->isTemporal(coord))
+         {
+            std::map<std::string, std::size_t> dimvar = this->getDimensions(&coord);
+            if ((dimvar.size() == 1) && (dimvar.find(coord) != dimvar.end()))
+               continue;
+            else
+               return (false);
+         }
+      }
+      return (true);
+   }
+   
+   bool CINetCDF4Adv::isCurvilinear(const std::string & _varname)
+   {
+      if (this->isRectilinear(_varname) ||
+         !this->hasCoordinates(_varname))
+         return (false);
+
+      std::vector<std::string> coords = this->getCoordinatesIdList(_varname);
+      std::vector<std::string>::const_iterator it = coords.begin(), end = coords.end();
+      for (; it != end; it++)
+      {
+         const std::string & coord = *it;
+         if (this->hasVariable(coord))
+         {
+            std::map<std::string, std::size_t> dimvar = this->getDimensions(&coord);
+            if (dimvar.size() != 2) return (false);
+         }
+         else return (false);
+      }
+      return (true);
+   }
+   
+   bool CINetCDF4Adv::isUnknown(const std::string & _varname)
+   {
+      return !(this->isRectilinear(_varname) ||
+               this->isCurvilinear(_varname) ||
+               this->isUnstructured(_varname));
+   }
+   
+   bool CINetCDF4Adv::isUnstructured(const std::string & _varname)
+   {
+      if (this->isRectilinear(_varname)    ||
+          this->isCurvilinear(_varname)    ||
+         !this->hasCoordinates(_varname))
+          return (false);
+
+      std::string dimname = this->getDimensionsIdList(&_varname).back();
+
+      std::vector<std::string> coords = this->getCoordinatesIdList(_varname);
+      std::vector<std::string>::const_iterator it = coords.begin(), end = coords.end();
+      for (; it != end; it++)
+      {
+         const std::string & coord = *it;
+         if (this->hasVariable(coord))
+         {
+            std::map<std::string, std::size_t> dimvar = this->getDimensions(&coord);
+            if ((dimvar.size() == 1) &&
+                (dimvar.find(dimname) != dimvar.end()))
+               continue;
+            else
+               return (false);
+         }
+            else return (false);
+      }
+
+      return (true);
+   }
+   
+   bool CINetCDF4Adv::isTemporal(const std::string & _varname)
+   {
+      if (!this->hasTemporalDim()) return (false);
+      std::map<std::string, std::size_t> dims = this->getDimensions(&_varname);
+      if (dims.find(this->getUnlimitedDimensionName()) != dims.end())
+         return (true);
+      return (false);
+   }
+   
+   bool CINetCDF4Adv::is3Dim(const std::string & _varname)
+   {
+      int i = 0;
+      std::vector<std::string> coords = this->getCoordinatesIdList(_varname);
+      std::vector<std::string>::const_iterator it = coords.begin(), end = coords.end();
+      for (; it != end; it++)
+      {
+         const std::string & coord = *it;
+         if (this->hasVariable(coord))
+         {
+            if (this->isTemporal(coord))
+               continue;
+            i++;
+         }
+         else
+         {
+            if (coord.compare(this->getUnlimitedDimensionName()) == 0)
+               continue;
+            i++;
+         }
+      }
+      return (i == 3);
+   }
+   
+   bool CINetCDF4Adv::isCellGrid(const std::string & _varname)
+   {
+      if (this->isCoordinate(_varname))
+      {
+         return (this->hasBounds(_varname));
+      }
+      else
+      {
+         std::vector<std::string> coords = this->getCoordinatesIdList(_varname);
+         std::vector<std::string>::const_iterator it = coords.begin(), end = coords.end();
+         for (; it != end; it++)
+         {
+            const std::string & coord = *it;
+            if (this->hasVariable(coord))
+            {
+               if (this->isTemporal(coord))
+                  continue;
+               if (this->isCellGrid(coord))
+                  continue;
+               return (false);
+            }
+            else
+            {
+               if (coord.compare(this->getUnlimitedDimensionName()) == 0)
+                  continue;
+               return (false);
+            }
+         }
+      }
+
+      return (true);
+   }
+   
+   std::size_t CINetCDF4Adv::getNbVertex(const std::string & _varname)
+   {
+      if (this->isRectilinear(_varname) ||
+          this->isCurvilinear(_varname))
+      {
+         if (this->is3Dim(_varname)) return (8);
+         else return (4);
+      }
+      if (this->isUnstructured(_varname))
+      {
+         std::string bound = this->getBoundsId
+                  (this->getCoordinatesIdList(_varname).back());
+         std::string dim = this->getDimensionsIdList(&bound).back();
+         return (this->getDimensions(&bound)[dim]);
+      }
+      return ((size_t)(-1));
+   }
+             
+   std::set<std::string> CINetCDF4Adv::getCoordVariables(void)
+   {
+      std::set<std::string> retvalue;
+      std::vector<std::string> variables = this->getVariables();
+      std::vector<std::string>::const_iterator it = variables.begin(), end = variables.end();
+      for (; it != end; it++)
+      {
+         const std::string & var = *it;
+         std::vector<std::string> coords = this->getCoordinatesIdList(var);
+         std::vector<std::string>::const_iterator it = coords.begin(), end = coords.end();
+         for (; it != end; it++)
+         {
+            const std::string & coord = *it;
+            if (this->hasVariable(coord))
+               retvalue.insert(retvalue.end(), coord);
+         }
+      }
+      return (retvalue);
+   }
+   
+   std::set<std::string> CINetCDF4Adv::getBoundVariables(void)
+   {
+      std::set<std::string> retvalue;         
+      std::vector<std::string> variables = this->getVariables();
+      std::vector<std::string>::const_iterator it = variables.begin(), end = variables.end();
+      for (; it != end; it++)
+      {
+         const std::string & var = *it;
+         if (this->hasBounds(var))
+            retvalue.insert(retvalue.end(), this->getBoundsId(var));
+      }
+      return (retvalue);
+   }
+            
+   std::string CINetCDF4Adv::getCoordinatesId(const std::string & _varname)
+   {
+         std::string retvalue;
+         if (this->hasAttribute("coordinates", &_varname))
+         {
+            this->readAttribute("coordinates", retvalue, &_varname);
+            return (retvalue);
+         }
+         else
+         {
+            std::vector<std::string> dims = this->getDimensionsIdList(&_varname);
+            std::vector<std::string>::const_iterator it = dims.begin(), end = dims.end();
+            for (; it != end; it++)
+            {
+               const std::string & value = *it;               
+               retvalue.append(value).push_back(' ');
+            }
+            retvalue.erase (retvalue.end()-1) ;
+         }
+
+         return (retvalue);
+   }
+   
+   std::string CINetCDF4Adv::getBoundsId (const std::string & _varname)
+   {
+      std::string retvalue;
+      if (this->hasAttribute("bounds", &_varname))
+            this->readAttribute("bounds", retvalue, &_varname);
+
+      return (retvalue);
+   }
+           
+            
+   std::vector<std::string> CINetCDF4Adv::getCoordinatesIdList(const std::string & _varname)
+   {
+      std::vector<std::string> retvalue;
+      std::string value = this->getCoordinatesId(_varname);
+         
+      boost::split(retvalue, value, boost::is_any_of(" "));
+         
+      std::vector<std::string>::iterator it = retvalue.begin(), end = retvalue.end();
+      for (; it != end; it++)
+      {
+         std::string & coord = *it;
+         coord.assign(coord.data());
+      }
+      return (retvalue);
+   }
+   
+   std::vector<std::string> CINetCDF4Adv::getDataVariables
+        (bool _is3D, bool _isRecti, bool _isCurvi, bool _isUnstr, bool _isCellData, bool _isTemporal)
+   {
+      std::vector<std::string> retvalue;
+      std::vector<std::string> allvars  = this->getVariables();
+
+      std::vector<std::string>::const_iterator it = allvars.begin(), end = allvars.end();
+      for (; it != end; it++)
+      {
+         const std::string & var = *it;
+         if (this->isCoordinate(var)) continue;
+
+         if (!_isRecti && this->isRectilinear(var) ) continue;
+         if (!_isCurvi && this->isCurvilinear(var) ) continue;
+         if (!_isUnstr && this->isUnstructured(var)) continue;
+
+         if (!_isTemporal && this->isTemporal(var)) continue;
+         if (!_is3D       && this->is3Dim(var)    ) continue;
+         if (!_isCellData && this->isCellGrid(var)) continue;
+
+         if (this->isUnknown(var)) continue;
+
+         retvalue.push_back(var);
+      }
+      return (retvalue);
+    }
+   
+    std::string CINetCDF4Adv::getLonCoordName (const std::string & _varname)
+    {
+       std::vector<std::string> clist = this->getCoordinatesIdList(_varname);
+       std::vector<std::string>::const_iterator it = clist.begin(), end = clist.end();
+       if (this->hasCoordinates(_varname))
+       {
+          for (; it != end; it++)
+          {
+              const std::string & var = *it;
+              if (this->hasVariable(var) && this->hasAttribute("axis", &var))
+              {
+                  std::string axis_name;
+                  this->readAttribute("axis", axis_name, &var);
+                  if (axis_name.compare("X") == 0)
+                      return (var);
+              }
+          }
+          return (*clist.begin());
+       }
+       else
+          return (*clist.rbegin());
+    }
+            
+    std::string CINetCDF4Adv::getLatCoordName (const std::string & _varname)
+    {
+       std::vector<std::string> clist = this->getCoordinatesIdList(_varname);
+       std::vector<std::string>::const_iterator it = clist.begin(), end = clist.end();
+       if (this->hasCoordinates(_varname))
+       {
+          for (; it != end; it++)
+          {
+              const std::string & var = *it;
+              if (this->hasVariable(var) && this->hasAttribute("axis", &var))
+              {
+                  std::string axis_name;
+                  this->readAttribute("axis", axis_name, &var);
+                  if (axis_name.compare("Y") == 0)
+                      return (var);
+              }
+          }
+          return (*(++clist.begin()));
+       }
+       else
+          return (*(++clist.rbegin()));
+    }
+            
+    std::string CINetCDF4Adv::getVertCoordName(const std::string & _varname)
+    {
+       if (!this->is3Dim(_varname)) return (std::string());
+       std::vector<std::string> clist = this->getCoordinatesIdList(_varname);
+       std::vector<std::string>::const_iterator it = clist.begin(), end = clist.end();
+       if (this->hasCoordinates(_varname))
+       {
+          for (; it != end; it++)
+          {
+              const std::string & var = *it;
+              if (this->hasVariable(var) && this->hasAttribute("axis", &var))
+              {
+                  std::string axis_name;
+                  this->readAttribute("axis", axis_name, &var);
+                  if (axis_name.compare("Z") == 0)
+                      return (var);
+              }
+          }
+          return (*(++(++clist.begin())));
+       }
+       else
+          return (*(++(++clist.rbegin())));
+    }
+   
+   
+} // namespace io
+} // namespace xmlioserver
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4_adv.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4_adv.hpp	(revision 229)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4_adv.hpp	(revision 229)
@@ -0,0 +1,126 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#ifndef __INETCDF4_ADV_HPP__
+#define	__INETCDF4_ADV_HPP__
+
+/**
+ * \file    inetcdf4_adv.hpp
+ * \brief   Lecture des fichiers de donnÃ©es au format netCDF-4, fonctionnalitÃ©s avancÃ©es (entÃªte).
+ * \author  HervÃ© Ozdoba
+ * \version 0.4
+ * \date    15 Juin 2011
+ */
+
+#ifndef __XIOS_NO_EXTERN
+
+// C++ standard headers
+#  include <set>
+#  include <algorithm>
+
+#endif // __XIOS_NO_EXTERN
+
+// XMLIOServer headers
+#include "inetcdf4.hpp"
+
+// ////////////////////////////// DÃ©clarations ///////////////////////////// //
+
+namespace xmlioserver
+{
+   namespace io
+   {
+      class CINetCDF4Adv : public CINetCDF4
+      {
+            typedef CINetCDF4 SuperClass; /*!< RedÃ©finition de CINetCDF4. */
+            
+         public : // Constructeurs
+         
+            //! \brief Constructeur simple.
+            CINetCDF4Adv(void); // NIY
+            
+            /*!
+             * \brief Constructeur Ã  partir d'un nom de fichier au format netCDF4.
+             * \param _filename : un nom de fichier au format netCDF4.
+             */
+            explicit CINetCDF4Adv(const std::string & _filename);
+            
+            /*!
+             * \brief Constructeur par copie .
+             * \param _inetcdf4 : rÃ©fÃ©rence de l'objet Ã  copier.
+             */
+            CINetCDF4Adv(const CINetCDF4Adv & _inetcdfadv);// NIY
+            
+            /*!
+             * \brief Constructeur par copie.
+             * \param _inetcdf4_ptr : le pointeur sur l'objet Ã  copier.
+             */
+            CINetCDF4Adv(const CINetCDF4Adv * const _inetcdfadv); // NIY
+            
+         public : // Destructeur
+         
+            //! \brief Destructeur de l'objet (le fichier est clos lors de son appel).
+            virtual ~CINetCDF4Adv(void);
+            
+         public : // Divers accesseurs
+
+            std::string getLonCoordName (const std::string & _varname);
+            std::string getLatCoordName (const std::string & _varname);
+            std::string getVertCoordName(const std::string & _varname);
+             
+            std::set<std::string> getCoordVariables(void);
+            std::set<std::string> getBoundVariables(void);
+            
+            std::string getCoordinatesId(const std::string & _varname);
+            std::string getBoundsId     (const std::string & _varname);
+            
+            template <class DataType>
+               void getMissingValue(DataType & _value, const std::string & _varname);
+            
+            std::vector<std::string> getCoordinatesIdList(const std::string & _varname);
+            
+            std::vector<std::string> getDataVariables(bool _is3D       = true,
+                                                      bool _isRecti    = true,
+                                                      bool _isCurvi    = true,
+                                                      bool _isUnstr    = true,
+                                                      bool _isCellData = true,
+                                                      bool _isTemporal = true);
+            
+
+            std::size_t getNbVertex(const std::string & _varname);
+            
+         public : // Divers mutateurs
+             
+             template <class DataType, std::size_t ndim>
+                 bool replaceMissingValue(const std::string & _varname,
+                                          boost::multi_array<DataType, ndim> & _data,
+                                          const DataType & newValue);
+            
+         public : // Divers mÃ©thodes de tests           
+
+            bool hasAttribute(const std::string & name,
+                              const std::string * const _varname  = NULL);
+
+            bool hasVariable    (const std::string & _varname);
+            bool hasMissingValue(const std::string & _varname);
+            bool hasCoordinates (const std::string & _varname);
+            bool hasBounds      (const std::string & _varname);
+
+            bool hasTemporalDim(void);
+
+            bool isBound       (const std::string & _varname);
+            bool isCoordinate  (const std::string & _varname);
+            bool isRectilinear (const std::string & _varname);
+            bool isCurvilinear (const std::string & _varname);
+            bool isUnknown     (const std::string & _varname);
+            bool isUnstructured(const std::string & _varname);
+            bool isTemporal    (const std::string & _varname);
+            bool is3Dim        (const std::string & _varname);
+            bool isCellGrid    (const std::string & _varname);            
+            
+      }; // class CINetCDF4Adv
+   } // namespace io
+} // namespace xmlioserver
+
+#endif	// __INETCDF4_ADV_HPP__ 
+
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4_adv_impl.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4_adv_impl.hpp	(revision 229)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4_adv_impl.hpp	(revision 229)
@@ -0,0 +1,56 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#ifndef __INETCDF4_ADV_IMPL_H__
+#define	__INETCDF4_ADV_IMPL_H__
+
+/**
+ * \file    inetcdf4_adv.hpp
+ * \brief   Lecture des fichiers de donnÃ©es au format netCDF-4, fonctionnalitÃ©s avancÃ©es (implÃ©mentation template).
+ * \author  HervÃ© Ozdoba
+ * \version 0.4
+ * \date    15 Juin 2011
+ */
+
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+namespace xmlioserver {
+namespace io {
+    
+   template <class DataType>
+      void CINetCDF4Adv::getMissingValue(DataType & _value, const std::string & _varname)
+   {
+      std::vector<DataType> value;
+      if (this->hasAttribute("missing_value", &_varname))
+      {
+         this->readAttribute("missing_value", value, &_varname);
+         _value = value[0];
+      }
+      if (this->hasAttribute("_FillValue", &_varname))
+      {
+         this->readAttribute("_FillValue", value, &_varname);
+         _value = value[0];
+      }
+   }
+   
+   template <class DataType, std::size_t ndim>
+      bool CINetCDF4Adv::replaceMissingValue(const std::string & _varname,
+                                             boost::multi_array<DataType, ndim> & _data,
+                                             const DataType & newValue)
+   {
+       if (this->hasMissingValue(_varname))
+       {
+           DataType mvalue;
+           this->CINetCDF4Adv::getMissingValue(mvalue, _varname);
+           std::replace(_data.begin(), _data.end(), mvalue, newValue);
+           return (true);
+       }
+       return (false);
+   }
+    
+} // namespace io
+} // namespace xmlioserver
+
+#endif	// __INETCDF4_ADV_IMPL_H__
+
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4_impl.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4_impl.hpp	(revision 229)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/netcdf/inetcdf4_impl.hpp	(revision 229)
@@ -0,0 +1,57 @@
+/* ************************************************************************** *
+ *      Copyright Â© IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011         *
+ * ************************************************************************** */
+
+#ifndef __INETCDF4_IMPL_HPP__
+#define __INETCDF4_IMPL_HPP__
+
+/**
+ * \file    inetcdf4_impl.hpp
+ * \brief   Lecture des fichiers de donnÃ©es au format netCDF-4 (implÃ©mentation template).
+ * \author  HervÃ© Ozdoba
+ * \version 0.4
+ * \date    15 Juin 2011
+ */
+
+// XMLIOServer headers
+#include "xmlioserver_spl.hpp"
+
+// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+
+namespace xmlioserver{
+namespace io {
+   
+   template <class DataType, std::size_t ndim>
+      void CINetCDF4::readData(boost::multi_array<DataType, ndim> & _data,
+                               const std::string & _varname,
+                               std::size_t _record,
+                               const std::vector<std::size_t> * _start,
+                               const std::vector<std::size_t> * _count)
+   {
+      int grpid = this->getCurrentGroup();
+      int varid = this->getVariable(_varname);
+      std::size_t _array_size = 1;
+      std::vector<std::size_t> _sstart, _scount;
+      this->getReadDataInfos
+         (_varname, _record, _array_size,  _sstart, _scount, _start, _count);
+      _data.resize(boost::extents[_array_size]);
+      this->readData_(grpid, varid, _sstart, _scount, _data.data());
+   }
+
+   template <class DataType>
+      void CINetCDF4::readAttribute
+          (const std::string & _attname, std::vector<DataType> & _value, const std::string * _varname)
+   {
+       std::pair<nc_type, std::size_t> attinfos;
+       int grpid = this->getCurrentGroup();                                 
+       int varid = (_varname != NULL) ? this->getVariable(*_varname) : NC_GLOBAL;
+       CheckError(nc_inq_att(grpid, varid, _attname.c_str(), &attinfos.first, &attinfos.second));
+       _value.resize(attinfos.second); 
+       this->readAttribute_(_attname, &_value[0], grpid, varid);
+       
+   }
+   
+} // namespace io
+} // namespace xmlioserver
+
+#endif	// __INETCDF4_IMPL_HPP__
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/vtk/lscereader.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/vtk/lscereader.cpp	(revision 229)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/vtk/lscereader.cpp	(revision 229)
@@ -0,0 +1,783 @@
+
+#ifndef LSCE_EXPORTS
+#       include "lscereader.hpp"
+#else
+#       include "vtkLSCEReader.h"
+#endif //LSCE_EXPORTS
+
+
+// BibliothÃšque VTK
+#include "vtkObjectFactory.h"
+#include "vtkInformation.h"
+#include "vtkInformationVector.h"
+#include "vtkStreamingDemandDrivenPipeline.h"
+
+#include <vtkProperty.h>
+#include <vtkDataSetMapper.h>
+#include <vtkActor.h>
+#include <vtkRenderWindow.h>
+#include <vtkRenderer.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtkLegendScaleActor.h>
+
+#include "vtkMath.h"
+
+#include "inetcdf4_impl.hpp"
+#include "inetcdf4_adv_impl.hpp"
+
+// Type Fortran
+#define ARRAY(valuetype, numdims) boost::shared_ptr<boost::multi_array<valuetype, numdims> >
+
+#define ARRAY_ASSIGN(value, valuetype, numdims, extent)\
+   value.reset(new boost::multi_array<valuetype, numdims>(boost::extents extent)) 
+
+#define ARRAY_CREATE(value, valuetype, numdims, extent)\
+   ARRAY(valuetype, numdims) value =                   \
+   ARRAY(valuetype, numdims)(new boost::multi_array<valuetype, numdims>(boost::extents extent))
+
+// Type C
+#define ARRAY_C_ASSIGN(value, valuetype, numdims, extent)\
+   value = ARRAY(valuetype, numdims)                     \
+   (new boost::multi_array<valuetype, numdims>(boost::extents extent, c_storage_order()))
+
+#define ARRAY_C_CREATE(value, valuetype, numdims, extent)\
+   ARRAY_C_ASSIGN(ARRAY(valuetype, numdims) value, valuetype, numdims, extent)
+
+
+#ifndef LSCE_EXPORTS
+namespace xmlioserver
+{
+   namespace vtk
+   {
+#endif //LSCE_EXPORTS
+       
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
+      vtkStandardNewMacro(vtkLSCEReader);
+
+      vtkLSCEReader::vtkLSCEReader(void)
+         : FileName(), CurGridType(RECTILINEAR), VarNames()
+         , A3D(true), ATemporal(true), ACell(true)
+         , Reader()
+      {
+         this->SetNumberOfInputPorts (0);
+         this->SetNumberOfOutputPorts(1);
+      }
+
+      vtkLSCEReader::~vtkLSCEReader(void)
+      {
+
+      }
+
+      ///---------------------------------------------------------------
+
+      void vtkLSCEReader::SetFileName(const vtkStdString & fileName)
+      {
+         this->FileName = fileName;
+         this->Reader   = boost::shared_ptr<xmlioserver::io::CINetCDF4Adv>
+                                       (new xmlioserver::io::CINetCDF4Adv(fileName));
+         this->Modified();
+      }
+      
+      void vtkLSCEReader::SetVariable(const vtkStdString & variable)
+      {
+         this->RemoveAllSelectedVariables();
+         this->AddVariableToSelection(variable);
+         this->Modified();
+      }
+
+      const char * vtkLSCEReader::GetFileName(void) const
+      {
+         return (this->FileName.c_str());
+      }
+
+      void vtkLSCEReader::PrintSelf(ostream& os, vtkIndent indent)
+      {
+        this->Superclass::PrintSelf(os,indent);
+      }
+
+      //----------------------------------------------------------------
+      void vtkLSCEReader::AddVariableToSelection(const vtkStdString & varName)
+      {
+         if (this->Reader->isRectilinear(varName))
+            this->SetGridType (RECTILINEAR);
+         else if (this->Reader->isCurvilinear(varName))
+            this->SetGridType (CURVILINEAR);
+         else
+            this->SetGridType (UNSTRUCTURED);
+
+         this->VarNames.insert(varName);
+      }
+
+      void vtkLSCEReader::RemoveSelectedVariable(const vtkStdString & varName)
+      {
+         std::set<vtkStdString>::iterator it = this->VarNames.find(varName);
+         if (it != this->VarNames.end()) this->VarNames.erase(it);
+      }
+
+      void vtkLSCEReader::RemoveAllSelectedVariables(void)
+      {
+         this->VarNames.clear();
+      }
+
+      const std::set<vtkStdString> &
+            vtkLSCEReader::GetSelectedVariables(void) const
+      {
+         return (this->VarNames);
+      }
+
+      bool vtkLSCEReader::HasSelectedVariable(void) const
+      {
+         return (this->VarNames.size() != 0);
+      }
+
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::SetGridType (GridType type)
+      {
+         if ((this->IsUnstructured() && (type == CURVILINEAR)) ||
+             (this->IsUnstructured() && (type == RECTILINEAR)) ||
+             (this->IsCurvilinear()  && (type == RECTILINEAR)))
+            this->RemoveAllSelectedVariables();
+         this->CurGridType = type;
+      }
+
+      bool vtkLSCEReader::IsUnstructured(void) const
+      {
+         return (this->CurGridType == UNSTRUCTURED);
+      }
+
+      bool vtkLSCEReader::IsCurvilinear(void) const
+      {
+         return (this->CurGridType == CURVILINEAR);
+      }
+
+      bool vtkLSCEReader::IsRectilinear(void) const
+      {
+         return (this->CurGridType == RECTILINEAR);
+      }
+
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::AcceptTemporalOnly(bool value)
+      {
+         this->ATemporal = value;
+      }
+
+      void vtkLSCEReader::Accept3DOnly(bool value)
+      {
+         this->A3D = value;
+      }
+
+      void vtkLSCEReader::AcceptCellOnly(bool value)
+      {
+         this->ACell = value;
+      }
+
+      //----------------------------------------------------------------
+
+      int vtkLSCEReader::ProcessRequest
+                           (vtkInformation       *  request,
+                            vtkInformationVector ** vtkNotUsed(inputVector),
+                            vtkInformationVector *  outputVector)
+      {
+          
+         if(request->Has(vtkDemandDrivenPipeline::REQUEST_DATA()))
+         {
+            return (this->RequestData(NULL, NULL, outputVector));
+         }
+
+         if(request->Has(vtkDemandDrivenPipeline::REQUEST_DATA_OBJECT()))
+         {
+         //   return (this->RequestDataObject(NULL, NULL, outputVector));
+         }
+
+         if(request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION()))
+         {
+              return (this->RequestInformation(NULL, NULL, outputVector));
+         }
+
+         if(request->Has(vtkStreamingDemandDrivenPipeline::REQUEST_UPDATE_EXTENT()))
+         {
+            return (this->RequestUpdateExtent(NULL, NULL, outputVector));
+         }
+
+         return (1);
+      }
+
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::ShowVariable(const vtkStdString & filename,
+                                       const vtkStdString & varname)
+      {
+         vtkSmartPointer<vtkLSCEReader> lscereader =
+               vtkSmartPointer<vtkLSCEReader>::New();
+
+         lscereader->SetFileName(filename);
+         lscereader->AddVariableToSelection(varname);
+         lscereader->Update();
+
+         // CrÃ©ation d'un mappeur et d'un acteur.
+         vtkSmartPointer<vtkDataSetMapper> mapper = vtkSmartPointer<vtkDataSetMapper>::New();
+         mapper->SetInputConnection(lscereader->GetOutput()->GetProducerPort());
+         mapper->SetScalarRange  (1000, 10000);
+
+         vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
+         actor->SetMapper(mapper);
+         actor->GetProperty()->SetRepresentationToWireframe();
+
+         // CrÃ©ation d'une fenÃªtre de rendu.
+         vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New();
+         vtkSmartPointer<vtkRenderWindow> renderWindow = vtkSmartPointer<vtkRenderWindow>::New();
+         renderWindow->AddRenderer(renderer);
+         vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =
+            vtkSmartPointer<vtkRenderWindowInteractor>::New();
+         renderWindowInteractor->SetRenderWindow(renderWindow);
+
+
+         vtkSmartPointer<vtkLegendScaleActor> legendScaleActor =
+            vtkSmartPointer<vtkLegendScaleActor>::New();
+
+         // Ajout de l'acteur Ã  la scÃšne.
+         renderer->AddActor(actor);
+         renderer->AddActor(legendScaleActor);
+
+         renderer->GradientBackgroundOn();
+         renderer->SetBackground(1,1,1);
+         renderer->SetBackground2(0,0,0);
+
+         // Rendu et intÃ©raction
+         renderWindow->Render();
+         renderWindowInteractor->Start();
+      }
+
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::CreateRectilinearGrid(vtkRectilinearGrid * grid,
+                                                vtkInformation     * outInfo,
+                                                vtkFloatArray      * xspacing,
+                                                vtkFloatArray      * yspacing,
+                                                vtkFloatArray      * zspacing,
+                                                vtkIntArray        * dimensions)
+      {
+            int extent[6] = { 0, dimensions->GetValue(0) - 1
+                            , 0, dimensions->GetValue(1) - 1
+                            , 0, dimensions->GetValue(2) - 1};
+            outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),extent,6);
+            grid->SetExtent (extent);
+            grid->SetDimensions (dimensions->GetValue(0),
+                                 dimensions->GetValue(1),
+                                 dimensions->GetValue(2));
+            grid->SetXCoordinates (xspacing);
+            grid->SetYCoordinates (yspacing);
+            grid->SetZCoordinates (zspacing);
+      }
+
+      void vtkLSCEReader::CreateStructuredGrid(vtkStructuredGrid * grid,
+                                               vtkInformation    * outInfo,
+                                               vtkPoints         * points,
+                                               vtkIntArray       * dimensions)
+      {
+            int extent[6] = { 0, dimensions->GetValue(0) - 1
+                            , 0, dimensions->GetValue(1) - 1
+                            , 0, dimensions->GetValue(2) - 1};
+            outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),extent,6);
+            grid->SetExtent (extent);
+            grid->SetDimensions (dimensions->GetValue(0),
+                                 dimensions->GetValue(1),
+                                 dimensions->GetValue(2));
+            grid->SetPoints(points);
+      }
+
+      void vtkLSCEReader::CreateUnstructuredGrid(vtkUnstructuredGrid * grid,
+                                                 vtkInformation      * outInfo,
+                                                 vtkPoints           * points,
+                                                 vtkCellArray        * cells,
+                                                 int                   celltype)
+      {
+         grid->SetPoints(points);
+         grid->SetCells(celltype, cells);
+      }
+
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::GetRectilinearConnectivity(int dimZ, int dimY, int dimX, vtkCellArray * cells)
+      {
+         if (dimZ == 1 && dimY >  1 && dimX >  1) // 2D
+         {
+            vtkIdType pts[4] ;
+
+            for (int i = 0, k = 0; i < (dimX - 1); i++)
+               for (int j = 0; j < (dimY - 1); j++, k++)
+            {
+               pts[0] =  i * dimY + j;
+               pts[1] =  i * dimY + j + 1;
+               pts[2] =  (i+1) * dimY + j + 1;
+               pts[3] =  (i+1) * dimY + j;
+               cells->InsertNextCell(4,  pts);
+            }
+         }
+         else if (dimZ > 1 && dimY >  1 && dimX >  1) // 3D
+         {
+            vtkIdType pts[8];
+            for (int i = 0, l = 0; i < (dimX - 1); i++)
+               for (int j = 0; j < (dimY - 1); j++)
+                  for (int k = 0; k < (dimZ - 1); k++, l++)
+            {
+               pts[0] =  i * dimY * dimZ + j * dimZ + k;
+               pts[1] =  i * dimY * dimZ + j * dimZ + k + 1;
+               pts[2] =  (i+1) * dimY * dimZ + j * dimZ + k + 1;
+               pts[3] =  (i+1) * dimY * dimZ + j * dimZ + k;
+
+               pts[4] =  i * dimY * dimZ  + (j + 1) * dimZ + k ;
+               pts[5] =  i * dimY * dimZ  + (j + 1) * dimZ + k +1;
+               pts[6] =  (i+1) * dimY * dimZ + (j + 1) * dimZ + k + 1;
+               pts[7] =  (i+1) * dimY * dimZ + (j + 1) * dimZ + k ;
+               cells->InsertNextCell(8,  pts);
+            }
+         }
+      }
+
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::CreateSimpleGrid (int xi, int xf,
+                                            int yi, int yf,
+                                            int zi, int zf,
+                                            vtkFloatArray * xspacing,
+                                            vtkFloatArray * yspacing,
+                                            vtkFloatArray * zspacing,
+                                            vtkIntArray   * dimensions)
+      {
+         dimensions->InsertNextValue (xf - xi + 1); // X
+         dimensions->InsertNextValue (yf - yi + 1); // Y
+         dimensions->InsertNextValue (zf - zi + 1); // Z
+         for (int i = xi; i <= xf; i++)
+            xspacing->InsertNextValue (i);
+         for (int j = yi; j <= yf; j++)
+            yspacing->InsertNextValue (j);
+         for (int k = zi; k <= zf; k++)
+            zspacing->InsertNextValue (k);
+      }
+
+      void vtkLSCEReader::CreateSimpleGrid (int xi, int xf,
+                                            int yi, int yf,
+                                            int zi, int zf,
+                                            vtkPoints   * points,
+                                            vtkIntArray * dimensions)
+      {
+         dimensions->InsertNextValue (xf - xi + 1); // X
+         dimensions->InsertNextValue (yf - yi + 1); // Y
+         dimensions->InsertNextValue (zf - zi + 1); // Z
+         for (int i = xi; i <= xf; i++)
+            for (int j = yi; j <= yf; j++)
+               for (int k = zi; k <= zf; k++)
+                  points->InsertNextPoint(i, j, k);
+      }
+
+      void vtkLSCEReader::CreateSimpleGrid (int xi, int xf,
+                                            int yi, int yf,
+                                            int zi, int zf,
+                                            vtkPoints    * points,
+                                            vtkCellArray * cells,
+                                            vtkIntArray  * dimensions)
+      {
+         this->CreateSimpleGrid (xi, xf, yi, yf, zi, zf, points, dimensions);
+         int dimX = dimensions->GetValue(0),
+             dimY = dimensions->GetValue(1),
+             dimZ = dimensions->GetValue(2);
+         this->GetRectilinearConnectivity(dimZ, dimY, dimX, cells);
+      }
+
+      //----------------------------------------------------------------
+      void vtkLSCEReader::GetSpacings(const vtkStdString & coordinate,
+                                      bool bounds, vtkFloatArray * spacing)
+      {
+         std::size_t size = (Reader->getDimensions(&coordinate).begin())->second;
+         ARRAY_CREATE(data_arr, float, 1, [1]);
+         if (Reader->hasVariable(coordinate))
+         {
+            if (bounds)
+            {
+               if (Reader->hasBounds(coordinate))
+               { // CellData, variable de coordonnÃ©e avec attributes bounds.
+                  vtkStdString boundid = Reader->getBoundsId(coordinate);
+                  float f;
+                  Reader->readData(*data_arr, boundid);
+                  spacing->InsertNextValue (f = (*data_arr)[0]);
+                  for (std::size_t j = 1; j < (2 * size); j++) // << Super laid
+                     if (f != (*data_arr)[j])
+                        spacing->InsertNextValue (f = (*data_arr)[j]);
+               }
+               else
+               { // CellData, variable de coordonnÃ©e sans attributes bounds.
+                  Reader->readData(*data_arr, coordinate);
+                  spacing->InsertNextValue ((*data_arr)[0] - ((*data_arr)[1] - (*data_arr)[0])/2);
+                  for (std::size_t j = 0; j < (size-1); j++)
+                     spacing->InsertNextValue ((*data_arr)[j] + ((*data_arr)[j+1]-(*data_arr)[j])/2);
+                  spacing->InsertNextValue ((*data_arr)[size-2] + ((*data_arr)[size-1] - (*data_arr)[size-2])/2);
+               }
+            }
+            else
+            { // PointData, variable de coordonnÃ©e.
+               Reader->readData(*data_arr, coordinate);
+               for (std::size_t j = 0; j < (size-1); j++)
+                  spacing->InsertNextValue ((*data_arr)[j]);
+            }
+         }
+         else
+         {
+            if (bounds) // CellData, dimension de coordonnÃ©e.
+               for (float i = -0.5; i < ((float)size + 1.); i = i + 1.)
+                  spacing->InsertNextValue (i);
+            else // PointData, dimension de coordonnÃ©e.
+               for (float j = 0.; j < (float)size; j = j + 1.)
+                  spacing->InsertNextValue (j);
+         }
+      }
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::AddPoint(vtkPoints * points, float *  value, bool proj)
+      {
+         if (proj)
+         {
+            double h = 1.0;
+            double cartesianCoord[3];
+            value[0] =  0.017453292519943295 * value[0];
+            value[1] =  0.017453292519943295 * value[1];
+
+            cartesianCoord[0] = h * cos(value[0]) * cos(value[1]);
+            cartesianCoord[1] = h * sin(value[0]) * cos(value[1]);
+            cartesianCoord[2] = h * sin(value[1]);
+            points->InsertNextPoint (cartesianCoord);
+         }
+         else
+         {
+            points->InsertNextPoint (value);
+         }
+      }
+
+      //----------------------------------------------------------------
+      void vtkLSCEReader::GetPoints(const vtkStdString & xcoordinate,
+                                    const vtkStdString & ycoordinate,
+                                    const vtkStdString & zcoordinate,
+                                    bool bounds, bool proj,
+                                    vtkPoints * points, vtkIntArray * dimensions)
+      {
+         float value[3];
+         bool is2D = true;
+         ARRAY_CREATE(xvalue, float, 1, [1]);
+         ARRAY_CREATE(yvalue, float, 1, [1]);
+         vtkSmartPointer<vtkFloatArray> zspacing = vtkSmartPointer<vtkFloatArray>::New();
+         if (zcoordinate.size() > 0)
+         {
+            GetSpacings(zcoordinate, bounds, zspacing);
+            is2D = false;
+         }
+         else
+            zspacing->InsertNextValue(0);
+
+         dimensions->InsertNextValue
+            (Reader->getDimensions(&xcoordinate)[Reader->getLonCoordName(xcoordinate)]);
+         dimensions->InsertNextValue
+            (Reader->getDimensions(&xcoordinate)[Reader->getLatCoordName(xcoordinate)]);
+         dimensions->InsertNextValue(zspacing->GetNumberOfTuples());
+
+         if (!bounds)
+         {
+            Reader->readData(*xvalue, xcoordinate);
+            Reader->readData(*yvalue, ycoordinate);
+
+            for (int i = 0; i < dimensions->GetValue(0); i++)
+               for (int j = 0; j < dimensions->GetValue(1); j++)
+                  for (int k = 0; k < dimensions->GetValue(2); k++)
+                  {
+                     value[0] = (*xvalue)[i*dimensions->GetValue(1) + j];
+                     value[1] = (*yvalue)[i*dimensions->GetValue(1) + j];
+                     value[2] = zspacing->GetValue(k);
+                     AddPoint(points, value, proj);
+                  }
+            return;
+         }
+
+         dimensions->SetValue(0, dimensions->GetValue(0)+1);
+         dimensions->SetValue(1, dimensions->GetValue(1)+1);
+
+         if (Reader->hasBounds(xcoordinate))
+         {
+            vtkStdString boundid = Reader->getBoundsId(xcoordinate);
+            Reader->readData(*xvalue, boundid);
+         }
+         if (Reader->hasBounds(ycoordinate))
+         {
+            vtkStdString boundid = Reader->getBoundsId(ycoordinate);
+            Reader->readData(*yvalue, boundid);
+         }
+         int ydim = dimensions->GetValue(0) - 1 ,
+             xdim = dimensions->GetValue(1) - 1;
+
+         for (int i = 0; i <= xdim; i++)
+            for (int j = 0; j <= ydim; j++)
+               for (int k = 0; k < dimensions->GetValue(2); k++)
+               {
+                  if ((j != ydim) && (i != xdim))
+                  {
+                     value[0] = (*xvalue)[4 * (i * ydim + j) + 0];
+                     value[1] = (*yvalue)[4 * (i * ydim + j) + 0];
+                     value[2] = zspacing->GetValue(k);
+                     AddPoint(points, value, proj);
+
+                     continue;
+                  }
+                  else if ((j == ydim) && (i != xdim))
+                  {
+                     value[0] = (*xvalue)[4 * (i * ydim + j - 1) + 1];
+                     value[1] = (*yvalue)[4 * (i * ydim + j - 1) + 1];
+                     value[2] = zspacing->GetValue(k);
+                     AddPoint(points, value, proj);
+
+                     continue;
+                  }
+                  else if ((j != ydim) && (i == xdim))
+                  {
+                     value[0] = (*xvalue)[4 * ((i-1) * ydim + j) + 3];
+                     value[1] = (*yvalue)[4 * ((i-1) * ydim + j) + 3];
+                     value[2] = zspacing->GetValue(k);
+                     AddPoint(points, value, proj);
+
+                     continue;
+                  }
+                  else if ((j == ydim) && (i == xdim))
+                  {
+                     value[0] = (*xvalue)[4 * ((i-1) * ydim + j - 1) + 2];
+                     value[1] = (*yvalue)[4 * ((i-1) * ydim + j - 1) + 2];
+                     value[2] = zspacing->GetValue(k);
+                     AddPoint(points, value, proj);
+
+                     continue;
+                  }
+               }
+      }
+
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::GetCellsAndPoints(const vtkStdString & xcoordinate,
+                                            const vtkStdString & ycoordinate,
+                                            const vtkStdString & zcoordinate,
+                                            bool bounds, bool proj, std::size_t nbvertex,
+                                            vtkCellArray * cells, vtkPoints * points,
+                                            vtkIntArray * dimensions)
+      {
+         float value[3];
+         double h = 1.0;
+         double cartesianCoord[3];
+         vtkIdType pts[nbvertex] ;
+         bool is2D = true;
+         ARRAY_CREATE(xvalue, float, 1, [1]);
+         ARRAY_CREATE(yvalue, float, 1, [1]);
+         vtkSmartPointer<vtkFloatArray> zspacing = vtkSmartPointer<vtkFloatArray>::New();
+         if (zcoordinate.size() > 0)
+         {
+            GetSpacings(zcoordinate, bounds, zspacing);
+            is2D = false;
+         }
+         else
+            zspacing->InsertNextValue(0);
+
+         std::size_t size = (*Reader->getDimensions(&xcoordinate).begin()).second;
+         if (Reader->hasBounds(xcoordinate))
+         {
+            vtkStdString boundid = Reader->getBoundsId(xcoordinate);
+            Reader->readData(*xvalue, boundid);
+         }
+         if (Reader->hasBounds(ycoordinate))
+         {
+            vtkStdString boundid = Reader->getBoundsId(ycoordinate);
+            Reader->readData(*yvalue, boundid);
+         }
+
+         for (std::size_t u = 0; u < size; u++)
+         {
+            for (int v = 0; v < zspacing->GetNumberOfTuples(); v++)
+            {
+               for (std::size_t w = 0; w < nbvertex; w++)
+               {
+                  value[0] = (*xvalue)[nbvertex * u + w];
+                  value[1] = (*yvalue)[nbvertex * u + w];
+                  value[2] = zspacing->GetValue(v);
+                  pts[w] = nbvertex * u + w;
+
+                  if (proj)
+                  {
+                     value[0] = 0.017453292519943295 * value[0];
+                     value[1] = 0.017453292519943295 * value[1];
+
+                     cartesianCoord[0] = h * cos(value[0]) * cos(value[1]);
+                     cartesianCoord[1] = h * sin(value[0]) * cos(value[1]);
+                     cartesianCoord[2] = h * sin(value[1]);
+                     points->InsertPoint (pts[w], cartesianCoord);
+                  }
+                  else
+                  {
+                     points->InsertPoint (pts[w], value);
+                  }
+               }
+               cells->InsertNextCell(nbvertex,  pts);
+            }
+         }
+      }
+
+      //----------------------------------------------------------------
+
+      void vtkLSCEReader::AddScalarData(vtkDataSet * output,
+                                        const vtkStdString & varname,
+                                        std::size_t record, bool bounds)
+      {
+         vtkSmartPointer<vtkDoubleArray> data = vtkDoubleArray::New();
+         data->SetName(varname.c_str());
+         ARRAY_CREATE(data_arr, double, 1, [1]);
+         Reader->readData(*data_arr, varname);
+         Reader->replaceMissingValue(varname, *data_arr, vtkMath::Nan());
+         
+         
+         data->SetNumberOfValues (data_arr->size());
+         for (std::size_t i = 0; i < data_arr->size(); i++)
+            data->SetValue (i, (*data_arr)[i]);
+
+         if (bounds)
+         {
+            output->GetCellData()->AddArray(data);
+            output->GetCellData()->SetActiveScalars (varname.c_str());
+         }
+         else
+         {
+            output->GetPointData()->AddArray(data);
+            output->GetPointData()->SetActiveScalars (varname.c_str());
+         }
+      }
+
+      //----------------------------------------------------------------
+
+      int vtkLSCEReader::RequestData
+                           (vtkInformation       *  vtkNotUsed(request),
+                            vtkInformationVector ** vtkNotUsed(inputVector),
+                            vtkInformationVector *  outputVector)
+      {
+         vtkInformation *  outInfo = outputVector->GetInformationObject(0);
+         vtkDataSet     *  output  = vtkDataSet::GetData(outInfo);
+         
+         std::cout << this->CurGridType << std::endl;
+
+         if (!output)
+         {
+            switch (this->CurGridType)
+            {
+               case(RECTILINEAR)  :
+                  output = vtkRectilinearGrid::New();
+                  break;
+               case(CURVILINEAR)  :
+                  output = vtkStructuredGrid::New();
+                  break;
+               default :
+                  output = vtkUnstructuredGrid::New();
+                  break;
+            }
+            output->SetPipelineInformation(outInfo);
+            output->Delete();
+         }
+
+         vtkUnstructuredGrid * uoutput  = vtkUnstructuredGrid::SafeDownCast(output);
+         vtkRectilinearGrid  * routput  = vtkRectilinearGrid::SafeDownCast(output);
+         vtkStructuredGrid   * soutput  = vtkStructuredGrid::SafeDownCast(output);
+
+         if (routput)
+         { // Grille rectiliniÃ©aire
+            vtkSmartPointer<vtkFloatArray>
+                           xspacing = vtkSmartPointer<vtkFloatArray>::New(),
+                           yspacing = vtkSmartPointer<vtkFloatArray>::New(),
+                           zspacing = vtkSmartPointer<vtkFloatArray>::New();
+            vtkSmartPointer<vtkIntArray> dims = vtkSmartPointer<vtkIntArray>::New();
+
+            //CreateSimpleGrid (-1, 10, -1, 10, -1, 10, xspacing, yspacing, zspacing, dims);
+            GetSpacings(Reader->getLonCoordName(*VarNames.begin()), true, xspacing);
+            GetSpacings(Reader->getLatCoordName(*VarNames.begin()), true, yspacing);
+            GetSpacings(Reader->getVertCoordName(*VarNames.begin()), true, zspacing);
+            /*std::cout << zspacing->GetNumberOfTuples() << std::endl;*/
+
+            dims->InsertNextValue(xspacing->GetNumberOfTuples());
+            dims->InsertNextValue(yspacing->GetNumberOfTuples());
+            dims->InsertNextValue(zspacing->GetNumberOfTuples());
+
+            AddScalarData(routput, *VarNames.begin(), 0, true);
+            CreateRectilinearGrid(routput, outInfo, xspacing, yspacing, zspacing, dims);
+         }
+
+         if (soutput)
+         { // Grille structurÃ©e
+             
+            vtkSmartPointer<vtkPoints>   pts  = vtkSmartPointer<vtkPoints>::New();
+            vtkSmartPointer<vtkIntArray> dims = vtkSmartPointer<vtkIntArray>::New();
+            
+            //CreateSimpleGrid (-1, 10, -1, 10, -1, 10, pts, dims);
+            GetPoints(Reader->getLonCoordName(*VarNames.begin()),
+                      Reader->getLatCoordName(*VarNames.begin()),
+                      Reader->getVertCoordName(*VarNames.begin()), false, true, pts, dims);
+
+            AddScalarData(soutput, *VarNames.begin(), 0, false);
+            CreateStructuredGrid(soutput, outInfo, pts, dims);
+         }
+
+         if (uoutput)
+         { // Grille non-structurÃ©e
+
+            vtkSmartPointer<vtkPoints>    pts   = vtkSmartPointer<vtkPoints>::New();
+            vtkSmartPointer<vtkIntArray>  dims  = vtkSmartPointer<vtkIntArray>::New();
+            vtkSmartPointer<vtkCellArray> cells = vtkSmartPointer<vtkCellArray>::New();
+            // VTK_QUAD, VTK_HEXAHEDRON, VTK_POLYGON
+            //CreateSimpleGrid (0, 12, 0, 12, 0, 12, pts, cells, dims);
+            //std::cout << Reader->getVertCoordName(*VarNames.begin()) << std::endl;
+            GetCellsAndPoints(Reader->getLonCoordName(*VarNames.begin()),
+                              Reader->getLatCoordName(*VarNames.begin()),
+                              Reader->getVertCoordName(*VarNames.begin()), true, true,
+                              Reader->getNbVertex(*VarNames.begin()), cells, pts, dims);
+            
+            AddScalarData(uoutput, *VarNames.begin(), 0, true);
+            CreateUnstructuredGrid(uoutput, outInfo, pts, cells, VTK_POLYGON);
+
+
+         }
+         return (1);
+      }
+      
+      int vtkLSCEReader::RequestInformation
+                           (vtkInformation       *  vtkNotUsed(request),
+                            vtkInformationVector ** vtkNotUsed(inputVector),
+                            vtkInformationVector *  outputVector)
+      {
+         vtkInformation *  outInfo = outputVector->GetInformationObject(0);
+         vtkDataSet     *  output  = vtkDataSet::GetData(outInfo);
+
+         if (true)
+         {
+            switch (this->CurGridType)
+            {
+               case(RECTILINEAR)  :
+                  output = vtkRectilinearGrid::New();
+                  break;
+               case(CURVILINEAR)  :
+                  output = vtkStructuredGrid::New();
+                  break;
+               default :
+                  output = vtkUnstructuredGrid::New();
+                  break;
+            }
+            output->SetPipelineInformation(outInfo);
+            output->Delete();
+         }
+         return (1);
+      }
+
+      ///---------------------------------------------------------------
+
+#ifndef LSCE_EXPORTS
+   } // namespace vtk
+} // namespace xmlioserver
+#endif //LSCE_EXPORTS
Index: XMLIO_V2/dev/dev_rv/src4/xmlio/vtk/lscereader.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src4/xmlio/vtk/lscereader.hpp	(revision 229)
+++ XMLIO_V2/dev/dev_rv/src4/xmlio/vtk/lscereader.hpp	(revision 229)
@@ -0,0 +1,210 @@
+#ifndef __XMLIO_LSCE_READER__
+#define __XMLIO_LSCE_READER__
+
+/// xmlioserver headers ///
+#include "xmlioserver_spl.hpp"
+#include "inetcdf4.hpp"
+#include "inetcdf4_adv.hpp"
+
+/// boost header ///
+#include <boost/shared_ptr.hpp>
+
+/// VTK headers ///
+#include "vtkDataObjectAlgorithm.h"
+
+#include "vtkStdString.h"
+
+#include "vtkUnstructuredGrid.h"
+#include "vtkStructuredGrid.h"
+#include "vtkRectilinearGrid.h"
+
+#include "vtkSmartPointer.h"
+
+#include "vtkStringArray.h"
+#include "vtkFloatArray.h"
+#include "vtkIntArray.h"
+#include "vtkDoubleArray.h"
+#include "vtkCellArray.h"
+#include "vtkDataArraySelection.h"
+
+#include "vtkCellData.h"
+#include "vtkPointData.h"
+
+//BTX
+#ifndef LSCE_EXPORTS
+namespace xmlioserver
+{
+   namespace vtk
+   {
+#endif //LSCE_EXPORTS
+//ETX
+      /// ////////////////////// DÃ©clarations ////////////////////// ///
+
+      class VTK_EXPORT vtkLSCEReader : public vtkDataObjectAlgorithm
+      {
+         public :
+             
+            //BTX
+            typedef enum _gridtype
+            { RECTILINEAR = 0, CURVILINEAR, UNSTRUCTURED } GridType; 
+            //ETX
+
+            /// SpÃ©cifique VTK ///
+            static vtkLSCEReader * New(void);
+            vtkTypeMacro(vtkLSCEReader, vtkDataObjectAlgorithm);
+            void PrintSelf(ostream& os, vtkIndent indent);
+
+   
+            /// Mutateurs ///
+            void SetFileName(const vtkStdString & fileName);
+            void SetVariable(const vtkStdString & variable);
+      
+            //BTX
+            void AddVariableToSelection(const vtkStdString & varName);
+            void RemoveSelectedVariable(const vtkStdString & varName);
+            void RemoveAllSelectedVariables(void);
+
+            void SetGridType (GridType type);
+
+            void AcceptTemporalOnly(bool value);
+            void Accept3DOnly(bool value);
+            void AcceptCellOnly(bool value);  
+
+            //ETX
+            /// Accesseurs ///
+            const char * GetFileName(void) const;
+            
+            vtkGetMacro(ReplaceFillValueWithNan, int);
+            vtkSetMacro(ReplaceFillValueWithNan, int);
+            vtkBooleanMacro(ReplaceFillValueWithNan, int);
+             
+            vtkGetMacro(SphericalCoordinates, int);
+            vtkSetMacro(SphericalCoordinates, int);
+            vtkBooleanMacro(SphericalCoordinates, int);
+            //BTX
+            
+            const std::set<vtkStdString> & GetSelectedVariables(void) const;
+
+   
+            /// Tests ///
+            bool IsUnstructured(void) const;
+            bool IsCurvilinear(void) const;
+            bool IsRectilinear(void) const;
+
+            bool HasSelectedVariable(void) const;
+
+            /// Visualisation ///
+            static void ShowVariable(const vtkStdString & filename,
+                                     const vtkStdString & varname);
+  
+
+         protected:
+
+            /// Constructeur ///
+            vtkLSCEReader(void);
+
+            /// Destructeur ///
+            virtual ~vtkLSCEReader(void);
+ 
+            void GetSpacings(const vtkStdString & coordinate,
+                             bool bounds, vtkFloatArray * spacing);
+
+ 
+
+            void CreateRectilinearGrid(vtkRectilinearGrid *, vtkInformation *,
+                                        vtkFloatArray *, vtkFloatArray *, vtkFloatArray *,
+                                        vtkIntArray *);
+
+            void CreateStructuredGrid(vtkStructuredGrid *, vtkInformation *,
+                                      vtkPoints *, vtkIntArray *);
+
+            void CreateUnstructuredGrid(vtkUnstructuredGrid *, vtkInformation *,
+                                        vtkPoints *, vtkCellArray *, int);
+
+ 
+
+            void CreateSimpleGrid (int xi, int xf, int yi, int yf, int zi, int zf,
+                                   vtkFloatArray *, vtkFloatArray *, vtkFloatArray *,
+                                   vtkIntArray *);
+
+            void CreateSimpleGrid (int xi, int xf, int yi, int yf, int zi, int zf,
+                                   vtkPoints *, vtkIntArray *);
+
+            void CreateSimpleGrid (int xi, int xf, int yi, int yf, int zi, int zf,
+                                   vtkPoints *, vtkCellArray *, vtkIntArray *);
+
+ 
+
+            void GetRectilinearConnectivity(int, int, int, vtkCellArray *);
+
+ 
+
+            void AddPoint(vtkPoints * points, float *  value, bool proj);
+
+            void GetPoints(const vtkStdString & xcoordinate,
+                           const vtkStdString & ycoordinate,
+                           const vtkStdString & zcoordinate,
+                           bool bounds, bool proj,
+                           vtkPoints * points, vtkIntArray * dimensions);
+
+ 
+
+            void GetCellsAndPoints(const vtkStdString & xcoordinate,
+                                   const vtkStdString & ycoordinate,
+                                   const vtkStdString & zcoordinate,
+                                   bool bounds, bool proj, std::size_t nbvertex,
+                                   vtkCellArray * cells, vtkPoints * points,
+                                   vtkIntArray * dimensions);
+
+ 
+
+            void AddScalarData(vtkDataSet * output, const vtkStdString & varname,
+                               std::size_t record, bool bounds);
+            
+            //ETX
+            
+            /// Traitements ///
+            virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
+
+            virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
+
+            //virtual int RequestDataObject
+            //   (vtkInformation *, vtkInformationVector **, vtkInformationVector *);
+
+            virtual int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
+            
+
+            
+         private:
+
+            /// Constructeurs ///
+            vtkLSCEReader(const vtkLSCEReader &);        // Not implemented 
+            //vtkLSCEReader(const vtkLSCEReader * const);  // Not implemented  
+            
+            /// OpÃ©rateur ///
+            void operator=(const vtkLSCEReader &);       // Not implemented    
+            
+            //BTX
+            /// PropriÃ©tÃ©s privÃ©es ///
+            vtkStdString FileName;
+
+            GridType CurGridType;
+            std::set<vtkStdString> VarNames;
+            bool A3D, ATemporal, ACell;
+            
+            int ReplaceFillValueWithNan;
+            int SphericalCoordinates;
+
+            boost::shared_ptr<xmlioserver::io::CINetCDF4Adv> Reader;
+            //ETX
+
+      }; // class vtkLSCEReader
+      
+//BTX
+#ifndef LSCE_EXPORTS
+   } // namespace vtk
+} // namespace xmlioserver
+#endif //LSCE_EXPORTS
+//ETX
+
+#endif //__XMLIO_LSCE_READER__
