Index: XIOS/dev/dev_olga/src/node/file.cpp
===================================================================
--- XIOS/dev/dev_olga/src/node/file.cpp	(revision 1144)
+++ XIOS/dev/dev_olga/src/node/file.cpp	(revision 1158)
@@ -14,5 +14,7 @@
 #include "type.hpp"
 #include "xios_spl.hpp"
+#include "context_client.hpp"
 #include "mpi.hpp"
+#include "timer.hpp"
 
 namespace xios {
@@ -49,7 +51,7 @@
    //----------------------------------------------------------------
 
-   const StdString& CFile::getFileOutputName(void) const
-   {
-     return name.isEmpty() ? getId() : name;
+   const StdString CFile::getFileOutputName(void) const
+   {
+     return (name.isEmpty() ? getId() : name) + (name_suffix.isEmpty() ? StdString("") :  name_suffix.getValue());
    }
 
@@ -215,9 +217,10 @@
       if (!split_freq.isEmpty())
       {
-        if (context->registryIn->foundKey("splitStart") && context->registryIn->foundKey("splitEnd"))
+        StdString keySuffix("CContext_"+CContext::getCurrent()->getId()+"::CFile_"+getFileOutputName()+"::") ; 
+        if (context->registryIn->foundKey(keySuffix+"splitStart") && context->registryIn->foundKey(keySuffix+"splitEnd"))
         {
           CDate savedSplitStart(*context->getCalendar()), savedSplitEnd(*context->getCalendar());
-          context->registryIn->getKey("splitStart", savedSplitStart);
-          context->registryIn->getKey("splitEnd",   savedSplitEnd);
+          context->registryIn->getKey(keySuffix+"splitStart", savedSplitStart);
+          context->registryIn->getKey(keySuffix+"splitEnd",   savedSplitEnd);
 
           if (savedSplitStart <= lastSplit && lastSplit <= savedSplitEnd)
@@ -234,6 +237,4 @@
       const int recordOffset = record_offset.isEmpty() ? 0 : record_offset;
 
-//      set<CAxis*> setAxis;
-//      set<CDomain*> setDomains;
       set<StdString> setAxis;
       set<StdString> setDomains;
@@ -263,5 +264,5 @@
       if (allDomainEmpty) MPI_Comm_free(&fileComm);
 
-      if (time_counter.isEmpty()) time_counter.setValue(time_counter_attr::centered);
+      // if (time_counter.isEmpty()) time_counter.setValue(time_counter_attr::centered);
       if (time_counter_name.isEmpty()) time_counter_name = "time_counter";
     }
@@ -281,5 +282,7 @@
         if (mode.isEmpty() || mode.getValue() == mode_attr::write)
         {
+          CTimer::get("Files : create headers").resume();
           if (!isOpen) createHeader();
+          CTimer::get("Files : create headers").suspend();
           checkSync();
         }        
@@ -303,5 +306,7 @@
         if (!mode.isEmpty() && mode.getValue() == mode_attr::read)
         {
+          CTimer::get("Files : open headers").resume();
           if (!isOpen) openInReadMode(&(context->server->intraComm));
+          CTimer::get("Files : open headers").suspend();
         }
         //checkSplit(); // Really need for reading?
@@ -374,5 +379,4 @@
       {
          StdString filename = getFileOutputName();
-         if (!name_suffix.isEmpty()) filename+=name_suffix.getValue();
 
 // determine splitting format in the file name  : firstPart%start_date%middlePart%end_date%lastPart
@@ -441,6 +445,7 @@
            oss << lastPart ;
 
-           context->registryOut->setKey("splitStart", lastSplit);
-           context->registryOut->setKey("splitEnd",   splitEnd);
+           StdString keySuffix("CContext_"+CContext::getCurrent()->getId()+"::CFile_"+getFileOutputName()+"::") ; 
+           context->registryOut->setKey(keySuffix+"splitStart", lastSplit);
+           context->registryOut->setKey(keySuffix+"splitEnd",   splitEnd);
          }
          else oss<<firstPart<<lastPart ;
@@ -489,5 +494,5 @@
          if (isOpen) data_out->closeFile();
 
-        data_out = shared_ptr<CDataOutput>(new CNc4DataOutput(oss.str(), append, useClassicFormat, useCFConvention,
+        data_out = shared_ptr<CDataOutput>(new CNc4DataOutput(this, oss.str(), append, useClassicFormat, useCFConvention,
                                                               fileComm, multifile, isCollective, time_counter_name));
         isOpen = true;
@@ -509,4 +514,10 @@
           {
             CField* field = *it;
+            this->data_out->writeFieldTimeAxis(field);
+          }
+          
+          for (it = this->enabledFields.begin(); it != end; it++)
+          {
+            CField* field = *it;
             this->data_out->writeField(field);
           }
@@ -517,4 +528,14 @@
 
           this->data_out->definition_end();
+        }
+        else
+        {
+          // check time axis even in append mode
+          std::vector<CField*>::iterator it, end = this->enabledFields.end();
+          for (it = this->enabledFields.begin(); it != end; it++)
+          {
+            CField* field = *it;
+            this->data_out->writeFieldTimeAxis(field);
+          }
         }
       }
@@ -535,5 +556,4 @@
       StdOStringStream oss;
       oss << filename;
-      if (!name_suffix.isEmpty()) oss << name_suffix.getValue();
 
       if (!split_freq.isEmpty())
@@ -872,5 +892,4 @@
    }
 
-
    /*!
    \brief Send a message to create a field on server side
