Index: XIOS/trunk/src/client.cpp
===================================================================
--- XIOS/trunk/src/client.cpp	(revision 1134)
+++ XIOS/trunk/src/client.cpp	(revision 1135)
@@ -42,5 +42,5 @@
           }
           CTimer::get("XIOS").resume() ;
-          CTimer::get("XIOS init").resume() ;
+          CTimer::get("XIOS init/finalize").resume() ;
           boost::hash<string> hashString ;
 
@@ -132,5 +132,5 @@
 
         CTimer::get("XIOS").resume() ;
-        CTimer::get("XIOS init").resume() ;
+        CTimer::get("XIOS init/finalize").resume() ;
 
         if (CXios::usingServer)
@@ -235,5 +235,5 @@
       MPI_Comm_free(&intraComm);
 
-      CTimer::get("XIOS finalize").suspend() ;
+      CTimer::get("XIOS init/finalize").suspend() ;
       CTimer::get("XIOS").suspend() ;
 
@@ -245,11 +245,13 @@
       
       info(20) << "Client side context is finalized"<<endl ;
+      report(0) <<" Performance report : Whole time from XIOS init and finalize: "<< CTimer::get("XIOS init/finalize").getCumulatedTime()<<" s"<<endl ;
       report(0) <<" Performance report : total time spent for XIOS : "<< CTimer::get("XIOS").getCumulatedTime()<<" s"<<endl ;
       report(0)<< " Performance report : time spent for waiting free buffer : "<< CTimer::get("Blocking time").getCumulatedTime()<<" s"<<endl ;
-      report(0)<< " Performance report : Ratio : "<< CTimer::get("Blocking time").getCumulatedTime()/CTimer::get("XIOS").getCumulatedTime()*100.<<" %"<<endl ;
+      report(0)<< " Performance report : Ratio : "<< CTimer::get("Blocking time").getCumulatedTime()/CTimer::get("XIOS init/finalize").getCumulatedTime()*100.<<" %"<<endl ;
       report(0)<< " Performance report : This ratio must be close to zero. Otherwise it may be usefull to increase buffer size or numbers of server"<<endl ;
 //      report(0)<< " Memory report : Current buffer_size : "<<CXios::bufferSize<<endl ;
       report(0)<< " Memory report : Minimum buffer size required : " << CClientBuffer::maxRequestSize << " bytes" << endl ;
       report(0)<< " Memory report : increasing it by a factor will increase performance, depending of the volume of data wrote in file at each time step of the file"<<endl ;
+      report(100)<<CTimer::getAllCumulatedTime()<<endl ;
    }
 
Index: XIOS/trunk/src/config/file_attribute.conf
===================================================================
--- XIOS/trunk/src/config/file_attribute.conf	(revision 1134)
+++ XIOS/trunk/src/config/file_attribute.conf	(revision 1135)
@@ -14,4 +14,5 @@
 DECLARE_ENUM2(format,        netcdf4, netcdf4_classic)
 DECLARE_ENUM2(convention,    CF, UGRID)
+DECLARE_ATTRIBUTE(StdString, convention_str)
 DECLARE_ENUM2(par_access,    collective, independent)
 DECLARE_ATTRIBUTE(bool,      append)
Index: XIOS/trunk/src/io/nc4_data_output.cpp
===================================================================
--- XIOS/trunk/src/io/nc4_data_output.cpp	(revision 1134)
+++ XIOS/trunk/src/io/nc4_data_output.cpp	(revision 1135)
@@ -11,6 +11,6 @@
 #include "netCdfException.hpp"
 #include "exception.hpp"
+#include "timer.hpp"
 #include "uuid.hpp"
-
 namespace xios
 {
@@ -1832,17 +1832,18 @@
          singleDomain = (file->nbDomains == 1);
 
+         StdString conv_str ;
+         if (file->convention_str.isEmpty())
+         {
+            if (SuperClassWriter::useCFConvention) conv_str="CF-1.6" ;
+            else conv_str="UGRID" ;
+         }
+         else conv_str=file->convention_str ;
+           
          try
          {
-       if (SuperClassWriter::useCFConvention)
-             this->writeFileAttributes(filename, description,
-                                       StdString("CF-1.6"),
-                                       StdString("An IPSL model"),
-                                       this->getTimeStamp());
-           else
-             this->writeFileAttributes(filename, description,
-                                       StdString("UGRID"),
-                                       StdString("An IPSL model"),
-                                       this->getTimeStamp());
-
+           this->writeFileAttributes(filename, description,
+                                      conv_str,
+                                      StdString("An IPSL model"),
+                                      this->getTimeStamp());
 
            if (!appendMode)
@@ -1989,9 +1990,16 @@
         CGrid* grid = field->grid;
 
-        if (field->getNStep()<1) return ;
+        if (field->getNStep()<1) 
+        {
+          return;
+        }
         
         if (!grid->doGridHaveDataToWrite())
-          if (SuperClass::type == MULTI_FILE || !isCollective) return;
-
+          if (SuperClass::type == MULTI_FILE || !isCollective)
+          {
+            return;
+          }
+
+          
         StdString fieldid = field->getFieldOutputName();
 
@@ -2118,17 +2126,25 @@
               case (MULTI_FILE) :
               {
+                 CTimer::get("Files : writing data").resume();
                  SuperClassWriter::writeData(fieldData, fieldid, isCollective, field->getNStep() - 1);
+                 CTimer::get("Files : writing data").suspend();
                  if (wtime)
                  {
+                   CTimer::get("Files : writing time axis").resume();
                    if ( wtimeData)
                    {
-                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1);
-                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1);
-                   }
+//                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1);
+//                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1);
+                       SuperClassWriter::writeTimeAxisData(time_data, timeAxisId, isCollective, field->getNStep() - 1, isRoot);
+                       SuperClassWriter::writeTimeAxisDataBounds(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1, isRoot);
+                  }
                    if (wtimeCounter)
                    {
-                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1);
-                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1);
+//                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1);
+//                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1);
+                     SuperClassWriter::writeTimeAxisData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1,isRoot);
+                     if (timeCounterType!=record) SuperClassWriter::writeTimeAxisDataBounds(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1, isRoot);
                    }
+                   CTimer::get("Files : writing time axis").suspend();
                  }
                  break;
@@ -2256,17 +2272,28 @@
                 }
 
+
+                CTimer::get("Files : writing data").resume();
                 SuperClassWriter::writeData(fieldData, fieldid, isCollective, field->getNStep() - 1, &start, &count);
+                CTimer::get("Files : writing data").suspend();
+
                  if (wtime)
                  {
+                   CTimer::get("Files : writing time axis").resume();
                    if ( wtimeData)
                    {
-                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1);
-                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1);
+//                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1);
+//                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1);
+                     SuperClassWriter::writeTimeAxisData(time_data, timeAxisId, isCollective, field->getNStep() - 1, isRoot);
+                     SuperClassWriter::writeTimeAxisDataBounds(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1, isRoot);
                    }
                    if (wtimeCounter)
                    {
-                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1);
-                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1);
+//                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1);
+//                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1);
+                     SuperClassWriter::writeTimeAxisData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1,isRoot);
+                     if (timeCounterType!=record) SuperClassWriter::writeTimeAxisDataBounds(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1, isRoot);
+
                    }
+                   CTimer::get("Files : writing time axis").suspend();  
                  }
 
Index: XIOS/trunk/src/io/onetcdf4.cpp
===================================================================
--- XIOS/trunk/src/io/onetcdf4.cpp	(revision 1134)
+++ XIOS/trunk/src/io/onetcdf4.cpp	(revision 1135)
@@ -7,4 +7,5 @@
 #include "netCdfInterface.hpp"
 #include "netCdfException.hpp"
+#include "timer.hpp"
 
 namespace xios
@@ -55,9 +56,11 @@
          if (!append || !std::ifstream(filename.c_str()))
          {
+            CTimer::get("Files : create").resume();
             if (wmpi)
                CNetCdfInterface::createPar(filename, mode, *comm, MPI_INFO_NULL, this->ncidp);
             else
                CNetCdfInterface::create(filename, mode, this->ncidp);
-
+            CTimer::get("Files : create").suspend();
+ 
             this->appendMode = false;
          }
@@ -65,9 +68,10 @@
          {
             mode |= NC_WRITE;
+            CTimer::get("Files : open").resume();
             if (wmpi)
                CNetCdfInterface::openPar(filename, mode, *comm, MPI_INFO_NULL, this->ncidp);
             else
                CNetCdfInterface::open(filename, mode, this->ncidp);
-
+            CTimer::get("Files : open").suspend();
             this->appendMode = true;
          }
@@ -83,5 +87,7 @@
       void CONetCDF4::close()
       {
+        CTimer::get("Files : close").resume();
         CNetCdfInterface::close(this->ncidp);
+        CTimer::get("Files : close").suspend();
       }
 
@@ -557,5 +563,7 @@
 
          this->getWriteDataInfos(name, 0, array_size,  sstart, scount, NULL, NULL);
+
          this->writeData_(grpid, varid, sstart, scount, data.dataFirst());
+
       }
 
@@ -583,15 +591,34 @@
 
          this->getWriteDataInfos(name, record, array_size,  sstart, scount, NULL, NULL);
-         if (using_netcdf_internal)
-         {
-           if (!isRoot)
-           {
-             sstart[0] = sstart[0] + 1;
-             scount[0] = 0;
-           }
-         }
          this->writeData_(grpid, varid, sstart, scount, data.dataFirst());
        }
 
+      void CONetCDF4::writeTimeAxisDataBounds(const CArray<double, 1>& data, const StdString& name,
+                                        bool collective, StdSize record, bool isRoot)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = this->getVariable(name);
+
+         map<int,size_t>::iterator it=timeAxis.find(varid);
+         if (it == timeAxis.end()) timeAxis[varid] = record;
+         else
+         {
+           if (it->second >= record) return;
+           else it->second =record;
+         }
+
+         StdSize array_size = 1;
+         std::vector<StdSize> sstart, scount;
+
+         if (this->wmpi && collective)
+            CNetCdfInterface::varParAccess(grpid, varid, NC_COLLECTIVE);
+         if (this->wmpi && !collective)
+            CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT);
+
+         this->getWriteDataInfos(name, record, array_size,  sstart, scount, NULL, NULL);
+         this->writeData_(grpid, varid, sstart, scount, data.dataFirst());
+       }
+
+
       //---------------------------------------------------------------
 
Index: XIOS/trunk/src/io/onetcdf4.hpp
===================================================================
--- XIOS/trunk/src/io/onetcdf4.hpp	(revision 1134)
+++ XIOS/trunk/src/io/onetcdf4.hpp	(revision 1135)
@@ -71,4 +71,6 @@
             void writeTimeAxisData(const CArray<double,1>& data, const StdString& name,
                                    bool collective, StdSize record, bool Isroot);
+            void writeTimeAxisDataBounds(const CArray<double,1>& data, const StdString& name,
+                                   bool collective, StdSize record, bool Isroot);
             /// Accesseur ///
             const CONetCDF4Path& getCurrentPath(void) const;
Index: XIOS/trunk/src/io/onetcdf4_impl.hpp
===================================================================
--- XIOS/trunk/src/io/onetcdf4_impl.hpp	(revision 1134)
+++ XIOS/trunk/src/io/onetcdf4_impl.hpp	(revision 1135)
@@ -4,4 +4,5 @@
 #include "onetcdf4.hpp"
 #include "netCdfInterface.hpp"
+#include "timer.hpp"
 
 namespace xios
@@ -23,6 +24,9 @@
     CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT);
 
+    CTimer::get("Files : get data infos").resume();
     this->getWriteDataInfos
     (name, record, array_size,  sstart, scount, start, count);
+    CTimer::get("Files : get data infos").suspend();
+
     if (data.numElements() != array_size)
     {
@@ -52,6 +56,8 @@
     CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT);
 
-    this->getWriteDataInfos
-    (name, record, array_size,  sstart, scount, start, count);
+    CTimer::get("CONetCDF4::writeData getWriteDataInfos").resume();
+    this->getWriteDataInfos(name, record, array_size,  sstart, scount, start, count);
+    CTimer::get("CONetCDF4::writeData getWriteDataInfos").suspend();
+ 
     if (data.numElements()*stringArrayLen != array_size)
     {
@@ -70,5 +76,7 @@
       PtrArrayStr[it->size()]='\0' ;
     }
+    CTimer::get("CONetCDF4::writeData writeData_").resume();
     this->writeData_(grpid, varid, sstart, scount, ArrayStr);
+    CTimer::get("CONetCDF4::writeData writeData_").suspend();
     delete [] ArrayStr ;
   }
Index: XIOS/trunk/src/node/context.cpp
===================================================================
--- XIOS/trunk/src/node/context.cpp	(revision 1134)
+++ XIOS/trunk/src/node/context.cpp	(revision 1135)
@@ -14,4 +14,5 @@
 #include "type.hpp"
 #include "xios_spl.hpp"
+#include "timer.hpp"
 
 
@@ -389,4 +390,5 @@
    void CContext::closeDefinition(void)
    {
+     CTimer::get("Context : close definition").resume() ;
      // There is nothing client need to send to server
      if (hasClient)
@@ -442,4 +444,5 @@
       startPrefetchingOfEnabledReadModeFiles();
     }
+    CTimer::get("Context : close definition").suspend() ;
    }
 
Index: XIOS/trunk/src/node/field.cpp
===================================================================
--- XIOS/trunk/src/node/field.cpp	(revision 1134)
+++ XIOS/trunk/src/node/field.cpp	(revision 1135)
@@ -125,5 +125,5 @@
   void CField::sendUpdateData(const CArray<double,1>& data)
   {
-    CTimer::get("XIOS Send Data").resume();
+    CTimer::get("Field : send data").resume();
 
     CContext* context = CContext::getCurrent();
@@ -177,5 +177,5 @@
     }
 
-    CTimer::get("XIOS Send Data").suspend();
+    CTimer::get("Field : send data").suspend();
   }
 
@@ -187,5 +187,5 @@
     list<CEventServer::SSubEvent>::iterator it;
     string fieldId;
-
+    CTimer::get("Field : recv data").resume();
     for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it)
     {
@@ -197,4 +197,5 @@
     }
     get(fieldId)->recvUpdateData(ranks,buffers);
+    CTimer::get("Field : recv data").suspend();
   }
 
Index: XIOS/trunk/src/node/file.cpp
===================================================================
--- XIOS/trunk/src/node/file.cpp	(revision 1134)
+++ XIOS/trunk/src/node/file.cpp	(revision 1135)
@@ -16,4 +16,5 @@
 #include "context_client.hpp"
 #include "mpi.hpp"
+#include "timer.hpp"
 
 namespace xios {
@@ -274,10 +275,14 @@
       if (mode.isEmpty() || mode.getValue() == mode_attr::write)
       {
+        CTimer::get("Files : create headers").resume();
         if (!isOpen) createHeader();
+        CTimer::get("Files : create headers").suspend();
         checkSync();
       }
       else
       {
+        CTimer::get("Files : open headers").resume();
         if (!isOpen) openInReadMode();
+        CTimer::get("Files : open headers").suspend();
       }
       checkSplit();
Index: XIOS/trunk/src/server.cpp
===================================================================
--- XIOS/trunk/src/server.cpp	(revision 1134)
+++ XIOS/trunk/src/server.cpp	(revision 1135)
@@ -163,4 +163,5 @@
       report(0)<<"Performance report : Time spent in processing events : "<<CTimer::get("Process events").getCumulatedTime()<<endl  ;
       report(0)<<"Performance report : Ratio : "<<CTimer::get("Process events").getCumulatedTime()/CTimer::get("XIOS server").getCumulatedTime()*100.<<"%"<<endl  ;
+      report(100)<<CTimer::getAllCumulatedTime()<<endl ;
     }
 
Index: XIOS/trunk/src/timer.cpp
===================================================================
--- XIOS/trunk/src/timer.cpp	(revision 1134)
+++ XIOS/trunk/src/timer.cpp	(revision 1135)
@@ -3,4 +3,6 @@
 #include <string>
 #include <map>
+#include <iostream>
+#include <sstream>
 #include "tracer.hpp"
 
@@ -57,3 +59,11 @@
     return it->second;
   }
+
+  string CTimer::getAllCumulatedTime(void)
+  {
+    std::ostringstream strOut ;
+    for(std::map<std::string,CTimer>::iterator it=allTimer.begin();it!=allTimer.end();++it)
+      strOut<<"Timer : "<<it->first<<"    -->   cumulated time : "<<it->second.getCumulatedTime()<<std::endl ;
+    return strOut.str() ;
+  }
 }
Index: XIOS/trunk/src/timer.hpp
===================================================================
--- XIOS/trunk/src/timer.hpp	(revision 1134)
+++ XIOS/trunk/src/timer.hpp	(revision 1135)
@@ -23,4 +23,5 @@
       static double getTime(void);
       static CTimer& get(std::string name);
+      static std::string getAllCumulatedTime(void) ;
   };
 }
