Index: /XIOS3/trunk/src/io/nc4_data_output.cpp
===================================================================
--- /XIOS3/trunk/src/io/nc4_data_output.cpp	(revision 2388)
+++ /XIOS3/trunk/src/io/nc4_data_output.cpp	(revision 2389)
@@ -20,5 +20,5 @@
             , SuperClassWriter(filename, exist)
             , filename(filename)
-            , file(file),hasTimeInstant(false),hasTimeCentered(false), timeCounterType(none), relElements_()
+            , file(file),hasTimeInstant(false),hasTimeCentered(false), timeCounterType(none), relAxis_(), relDomains_()
       {
         SuperClass::type = MULTI_FILE;
@@ -34,5 +34,5 @@
             , filename(filename)
             , isCollective(isCollective)
-            , file(file),hasTimeInstant(false),hasTimeCentered(false), timeCounterType(none), relElements_()
+            , file(file),hasTimeInstant(false),hasTimeCentered(false), timeCounterType(none), relAxis_(), relDomains_()
       {
         SuperClass::type = (multifile) ? MULTI_FILE : ONE_FILE;
@@ -79,12 +79,5 @@
               {
                 // if yes, associate the same ids to current element
-                domain->name = it->second.second->getDomainOutputName();
-                domain->lon_name = it->second.second->lon_name;
-                domain->lat_name = it->second.second->lat_name;
-                if (domain->type == CDomain::type_attr::unstructured)
-                {
-                  domain->dim_i_name = it->second.second->dim_i_name;
-                  domain->dim_j_name = it->second.second->dim_j_name;
-                }
+                domain->renameAttributesBeforeWriting( it->second.second );
                 elementIsInMap = true;
               }
@@ -93,12 +86,5 @@
             if (!elementIsInMap)  // ! in MAP
             {
-              domain->name =  domain->getId();
-              domain->lon_name = "lon_"+domain->getId();
-              domain->lat_name = "lat_"+domain->getId();
-              if (domain->type == CDomain::type_attr::unstructured)
-              {
-                domain->dim_i_name = "cell_"+domain->getId();
-                domain->dim_j_name = "nvertex_"+domain->getId();
-              }
+              domain->renameAttributesBeforeWriting();
               relDomains_.insert( make_pair( defaultNameKey, make_pair(globalHash, domain) ) ) ;         
             }
@@ -1056,13 +1042,13 @@
 
           StdString defaultNameKey = axis->getAxisOutputName();
-          if ( !relElements_.count ( defaultNameKey ) )
+          if ( !relAxis_.count ( defaultNameKey ) )
           {
             // if defaultNameKey not in the map, write the element such as it is defined
-            relElements_.insert( make_pair( defaultNameKey, make_pair(globalHash, defaultNameKey) ) );
+            relAxis_.insert( make_pair( defaultNameKey, make_pair(globalHash, axis) ) );
           }
           else // look if a hash associated this key is equal
           {
             bool elementIsInMap(false);
-            auto defaultNameKeyElements = relElements_.equal_range( defaultNameKey );
+            auto defaultNameKeyElements = relAxis_.equal_range( defaultNameKey );
             for (auto it = defaultNameKeyElements.first; it != defaultNameKeyElements.second; it++)
             {
@@ -1070,5 +1056,5 @@
               {
                 // if yes, associate the same ids to current element
-                axis->name = it->second.second;
+                axis->renameAttributesBeforeWriting( it->second.second );
                 elementIsInMap = true;
               }
@@ -1077,6 +1063,6 @@
             if (!elementIsInMap)  // ! in MAP
             {
-              axis->name =  axis->getId();
-              relElements_.insert( make_pair( defaultNameKey, make_pair(globalHash, axis->getAxisOutputName()) ) ) ;// = axis->getId()          
+              axis->renameAttributesBeforeWriting();
+              relAxis_.insert( make_pair( defaultNameKey, make_pair(globalHash, axis) ) ) ;// = axis->getId()          
             }
           }
Index: /XIOS3/trunk/src/io/nc4_data_output.hpp
===================================================================
--- /XIOS3/trunk/src/io/nc4_data_output.hpp	(revision 2388)
+++ /XIOS3/trunk/src/io/nc4_data_output.hpp	(revision 2389)
@@ -129,5 +129,5 @@
             bool hasTimeCentered ;
 	
-            std::multimap< StdString, pair<size_t,StdString> > relElements_;
+            std::multimap< StdString, pair<size_t,CAxis*> > relAxis_;
             std::multimap< StdString, pair<size_t,CDomain*> > relDomains_;
 
Index: /XIOS3/trunk/src/node/axis.cpp
===================================================================
--- /XIOS3/trunk/src/node/axis.cpp	(revision 2388)
+++ /XIOS3/trunk/src/node/axis.cpp	(revision 2389)
@@ -340,5 +340,19 @@
      return distributedHash + globalHash;
    }
-
+  
+   void CAxis::renameAttributesBeforeWriting(CAxis* writtenAxis)
+   {
+     if (writtenAxis!=NULL)
+     {
+       this->name = writtenAxis->getAxisOutputName();
+       // + label if necessary, other attributs concerned ?
+     }
+     else
+     {
+       this->name =  this->getId();
+       // + label if necessary, other attributs concerned ?
+     }
+   }
+  
    void CAxis::setGeometricAttributes(const CAxis& axisSrc)
    {
Index: /XIOS3/trunk/src/node/axis.hpp
===================================================================
--- /XIOS3/trunk/src/node/axis.hpp	(revision 2388)
+++ /XIOS3/trunk/src/node/axis.hpp	(revision 2389)
@@ -131,4 +131,5 @@
 
          size_t computeAttributesHash( MPI_Comm comm );
+         void renameAttributesBeforeWriting(CAxis* writtenAxis=NULL);
 
          size_t getGlobalWrittenSize(void) ;
Index: /XIOS3/trunk/src/node/domain.cpp
===================================================================
--- /XIOS3/trunk/src/node/domain.cpp	(revision 2388)
+++ /XIOS3/trunk/src/node/domain.cpp	(revision 2389)
@@ -1816,4 +1816,30 @@
      return distributedHash + globalHash;
    }
+  
+   void CDomain::renameAttributesBeforeWriting(CDomain* writtenDomain)
+   {
+     if (writtenDomain!=NULL)
+     {
+       this->name = writtenDomain->getDomainOutputName();
+       this->lon_name = writtenDomain->lon_name;
+       this->lat_name = writtenDomain->lat_name;
+       if (this->type == CDomain::type_attr::unstructured)
+       {
+         this->dim_i_name = writtenDomain->dim_i_name;
+         this->dim_j_name = writtenDomain->dim_j_name;
+       }
+     }
+     else
+     {
+       this->name =  this->getId();
+       this->lon_name = "lon_"+this->getId();
+       this->lat_name = "lat_"+this->getId();
+       if (this->type == CDomain::type_attr::unstructured)
+       {
+         this->dim_i_name = "cell_"+this->getId();
+         this->dim_j_name = "nvertex_"+this->getId();
+       }
+     }
+   }
 
    void CDomain::initializeLocalElement(void)
Index: /XIOS3/trunk/src/node/domain.hpp
===================================================================
--- /XIOS3/trunk/src/node/domain.hpp	(revision 2388)
+++ /XIOS3/trunk/src/node/domain.hpp	(revision 2389)
@@ -92,4 +92,5 @@
 
          size_t computeAttributesHash( MPI_Comm comm );
+         void renameAttributesBeforeWriting(CDomain* writtenDomain=NULL);
          
       //////////////////////////
