Index: XIOS/trunk/src/io/nc4_data_output.cpp
===================================================================
--- XIOS/trunk/src/io/nc4_data_output.cpp	(revision 815)
+++ XIOS/trunk/src/io/nc4_data_output.cpp	(revision 816)
@@ -639,75 +639,79 @@
         {
           SuperClassWriter::addDimension(axisid, zoom_size);
-          dims.push_back(axisid);
-          SuperClassWriter::addVariable(axisid, NC_FLOAT, dims);
-
-          if (!axis->name.isEmpty())
-            SuperClassWriter::addAttribute("name", axis->name.getValue(), &axisid);
-
-          if (!axis->standard_name.isEmpty())
-            SuperClassWriter::addAttribute("standard_name", axis->standard_name.getValue(), &axisid);
-
-          if (!axis->long_name.isEmpty())
-            SuperClassWriter::addAttribute("long_name", axis->long_name.getValue(), &axisid);
-
-          if (!axis->unit.isEmpty())
-            SuperClassWriter::addAttribute("units", axis->unit.getValue(), &axisid);
-
-          if (!axis->positive.isEmpty())
+          if (axis->hasValue)
           {
-            SuperClassWriter::addAttribute("axis", string("Z"), &axisid);
-            SuperClassWriter::addAttribute("positive",
-                                           (axis->positive == CAxis::positive_attr::up) ? string("up") : string("down"),
-                                           &axisid);
-          }
-
-          StdString axisBoundsId = axisid + "_bounds";
-          if (!axis->bounds.isEmpty())
-          {
-            dims.push_back("axis_nbounds");
-            SuperClassWriter::addVariable(axisBoundsId, NC_FLOAT, dims);
-            SuperClassWriter::addAttribute("bounds", axisBoundsId, &axisid);
-          }
-
-          SuperClassWriter::definition_end();
-          switch (SuperClass::type)
-          {
-            case MULTI_FILE:
+            dims.push_back(axisid);
+            SuperClassWriter::addVariable(axisid, NC_FLOAT, dims);
+
+            if (!axis->name.isEmpty())
+              SuperClassWriter::addAttribute("name", axis->name.getValue(), &axisid);
+
+            if (!axis->standard_name.isEmpty())
+              SuperClassWriter::addAttribute("standard_name", axis->standard_name.getValue(), &axisid);
+
+            if (!axis->long_name.isEmpty())
+              SuperClassWriter::addAttribute("long_name", axis->long_name.getValue(), &axisid);
+
+            if (!axis->unit.isEmpty())
+              SuperClassWriter::addAttribute("units", axis->unit.getValue(), &axisid);
+
+            if (!axis->positive.isEmpty())
             {
-              CArray<double,1> axis_value(zoom_size_srv);
-              for (int i = 0; i < zoom_size_srv; i++) axis_value(i) = axis->value_srv(i);
-              SuperClassWriter::writeData(axis_value, axisid, isCollective, 0);
-
-              if (!axis->bounds.isEmpty())
-                SuperClassWriter::writeData(axis->bound_srv, axisBoundsId, isCollective, 0);
-
-              SuperClassWriter::definition_start();
-
-              break;
+              SuperClassWriter::addAttribute("axis", string("Z"), &axisid);
+              SuperClassWriter::addAttribute("positive",
+                                             (axis->positive == CAxis::positive_attr::up) ? string("up") : string("down"),
+                                             &axisid);
             }
-            case ONE_FILE:
+
+            StdString axisBoundsId = axisid + "_bounds";
+            if (!axis->bounds.isEmpty())
             {
-              CArray<double,1> axis_value(zoom_size_srv);
-              axis_value = axis->value_srv;
-
-              std::vector<StdSize> start(1), startBounds(2) ;
-              std::vector<StdSize> count(1), countBounds(2) ;
-              start[0] = startBounds[0] = zoom_begin_srv-axis->global_zoom_begin;
-              count[0] = countBounds[0] = zoom_size_srv;
-              startBounds[1] = 0;
-              countBounds[1] = 2;
-              SuperClassWriter::writeData(axis_value, axisid, isCollective, 0, &start, &count);
-
-              if (!axis->bounds.isEmpty())
-                SuperClassWriter::writeData(axis->bound_srv, axisBoundsId, isCollective, 0, &startBounds, &countBounds);
-
-              SuperClassWriter::definition_start();
-
-              break;
+              dims.push_back("axis_nbounds");
+              SuperClassWriter::addVariable(axisBoundsId, NC_FLOAT, dims);
+              SuperClassWriter::addAttribute("bounds", axisBoundsId, &axisid);
             }
-            default :
-              ERROR("CNc4DataOutput::writeDomain(domain)",
-                    << "[ type = " << SuperClass::type << "]"
-                    << " not implemented yet !");
+
+            SuperClassWriter::definition_end();
+
+            switch (SuperClass::type)
+            {
+              case MULTI_FILE:
+              {
+                CArray<double,1> axis_value(zoom_size_srv);
+                for (int i = 0; i < zoom_size_srv; i++) axis_value(i) = axis->value_srv(i);
+                SuperClassWriter::writeData(axis_value, axisid, isCollective, 0);
+
+                if (!axis->bounds.isEmpty())
+                  SuperClassWriter::writeData(axis->bound_srv, axisBoundsId, isCollective, 0);
+
+                SuperClassWriter::definition_start();
+
+                break;
+              }
+              case ONE_FILE:
+              {
+                CArray<double,1> axis_value(zoom_size_srv);
+                axis_value = axis->value_srv;
+
+                std::vector<StdSize> start(1), startBounds(2) ;
+                std::vector<StdSize> count(1), countBounds(2) ;
+                start[0] = startBounds[0] = zoom_begin_srv-axis->global_zoom_begin;
+                count[0] = countBounds[0] = zoom_size_srv;
+                startBounds[1] = 0;
+                countBounds[1] = 2;
+                SuperClassWriter::writeData(axis_value, axisid, isCollective, 0, &start, &count);
+
+                if (!axis->bounds.isEmpty())
+                  SuperClassWriter::writeData(axis->bound_srv, axisBoundsId, isCollective, 0, &startBounds, &countBounds);
+
+                SuperClassWriter::definition_start();
+
+                break;
+              }
+              default :
+                ERROR("CNc4DataOutput::writeAxis_(CAxis* axis)",
+                      << "[ type = " << SuperClass::type << "]"
+                      << " not implemented yet !");
+            }
           }
         }
Index: XIOS/trunk/src/node/axis.cpp
===================================================================
--- XIOS/trunk/src/node/axis.cpp	(revision 815)
+++ XIOS/trunk/src/node/axis.cpp	(revision 816)
@@ -26,5 +26,5 @@
       , isDistributed_(false), hasBounds_(false), isCompressible_(false)
       , numberWrittenIndexes_(0), totalNumberWrittenIndexes_(0), offsetWrittenIndexes_(0)
-      , transformationMap_(), global_zoom_begin(0), global_zoom_size(0)
+      , transformationMap_(), global_zoom_begin(0), global_zoom_size(0), hasValue(false)
    {
    }
@@ -35,5 +35,5 @@
       , isDistributed_(false), hasBounds_(false), isCompressible_(false)
       , numberWrittenIndexes_(0), totalNumberWrittenIndexes_(0), offsetWrittenIndexes_(0)
-      , transformationMap_(), global_zoom_begin(0), global_zoom_size(0)
+      , transformationMap_(), global_zoom_begin(0), global_zoom_size(0), hasValue(false)
    {
    }
@@ -220,9 +220,19 @@
       else this->n.setValue(size);
 
-      StdSize true_size = value.numElements();
-      if (this->n.getValue() != true_size)
-        ERROR("CAxis::checkAttributes(void)",
-              << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] "
-              << "The axis is wrongly defined, attribute 'value' has a different size (" << true_size << ") than the one defined by the \'size\' attribute (" << n.getValue() << ").");
+      if (!this->value.isEmpty())
+      {
+        StdSize true_size = value.numElements();
+        if (this->n.getValue() != true_size)
+          ERROR("CAxis::checkAttributes(void)",
+                << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] "
+                << "The axis is wrongly defined, attribute 'value' has a different size (" << true_size << ") than the one defined by the \'size\' attribute (" << n.getValue() << ").");
+        this->hasValue = true;
+      }
+
+//      StdSize true_size = value.numElements();
+//      if (this->n.getValue() != true_size)
+//        ERROR("CAxis::checkAttributes(void)",
+//              << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] "
+//              << "The axis is wrongly defined, attribute 'value' has a different size (" << true_size << ") than the one defined by the \'size\' attribute (" << n.getValue() << ").");
 
       this->checkData();
@@ -351,5 +361,5 @@
      {
        sendServerAttribut(globalDim, orderPositionInGrid, distType);
-       sendValue(globalDim, orderPositionInGrid, distType);
+       if (hasValue) sendValue(globalDim, orderPositionInGrid, distType);
      }
 
@@ -864,6 +874,9 @@
       zoom_size_srv  = zoom_end_srv - zoom_begin_srv + 1;
     }
-    value_srv.resize(zoom_size_srv);
-    bound_srv.resize(2,zoom_size_srv);
+    if (hasValue)
+    {
+      value_srv.resize(zoom_size_srv);
+      if (hasBounds_)  bound_srv.resize(2,zoom_size_srv);
+    }
   }
 
Index: XIOS/trunk/src/node/axis.hpp
===================================================================
--- XIOS/trunk/src/node/axis.hpp	(revision 815)
+++ XIOS/trunk/src/node/axis.hpp	(revision 816)
@@ -119,4 +119,5 @@
         CArray<double,1> value_srv;
         CArray<double,2> bound_srv;
+        bool hasValue;
 
       private:
