Index: XIOS/trunk/src/output/nc4_data_output.cpp
===================================================================
--- XIOS/trunk/src/output/nc4_data_output.cpp	(revision 334)
+++ XIOS/trunk/src/output/nc4_data_output.cpp	(revision 335)
@@ -11,5 +11,5 @@
 #include "context_server.hpp"
 
-namespace xmlioserver
+namespace xios
 {
    namespace io
@@ -29,9 +29,10 @@
 
       CNc4DataOutput::CNc4DataOutput
-         (const StdString & filename, bool exist, MPI_Comm comm_server,bool multifile)
+         (const StdString & filename, bool exist, MPI_Comm comm_server,bool multifile, bool isCollective)
             : SuperClass()
             , SuperClassWriter(filename, exist, &comm_server,multifile)
             , comm_server(comm_server)
             , filename(filename)
+            , isCollective(isCollective)
       {
          StdString timeid = StdString("time_counter");
@@ -158,6 +159,6 @@
 
                SuperClassWriter::definition_end();
-               SuperClassWriter::writeData(domain->latvalue_srv, latid, true, 0);
-               SuperClassWriter::writeData(domain->lonvalue_srv, lonid, true, 0);
+               SuperClassWriter::writeData(domain->latvalue_srv, latid, isCollective, 0);
+               SuperClassWriter::writeData(domain->lonvalue_srv, lonid, isCollective, 0);
 // supress mask               if (server->intraCommSize > 1) SuperClassWriter::writeData(mask, maskid);
                SuperClassWriter::definition_start();
@@ -206,6 +207,6 @@
                }
                
-               SuperClassWriter::writeData(domain->latvalue_srv, latid, true, 0,&start,&count);
-               SuperClassWriter::writeData(domain->lonvalue_srv, lonid, true, 0,&start,&count);
+               SuperClassWriter::writeData(domain->latvalue_srv, latid, isCollective, 0,&start,&count);
+               SuperClassWriter::writeData(domain->lonvalue_srv, lonid, isCollective, 0,&start,&count);
                SuperClassWriter::definition_start();
 
@@ -255,5 +256,5 @@
 
                SuperClassWriter::definition_end();
-               SuperClassWriter::writeData(axis->value.getValue(), axisid, true, 0);
+               SuperClassWriter::writeData(axis->value.getValue(), axisid, isCollective, 0);
                SuperClassWriter::definition_start();
 
@@ -425,5 +426,5 @@
          StdString description = (!file->description.isEmpty())
                                ? file->description.getValue()
-                               : StdString("Created by xmlioserver");
+                               : StdString("Created by xios");
          this->writeFileAttributes(filename, description,
                                    StdString ("CF-1.1"),
@@ -470,5 +471,5 @@
          boost::shared_ptr<CDomain> domain = grid->domain ;
          
-         if(SuperClass::type==MULTI_FILE) if (domain->isEmpty()) return;
+         if(SuperClass::type==MULTI_FILE || !isCollective) if (domain->isEmpty()) return;
 
 
@@ -497,6 +498,6 @@
               case (MULTI_FILE) :
               {
-                 SuperClassWriter::writeData(field_data3D, fieldid, true, field->getNStep()-1);
-                 SuperClassWriter::writeData(time_data, oss.str(), true, field->getNStep()-1);
+                 SuperClassWriter::writeData(field_data3D, fieldid, isCollective, field->getNStep()-1);
+                 SuperClassWriter::writeData(time_data, oss.str(), isCollective, field->getNStep()-1);
                  break ;
               }
@@ -516,6 +517,6 @@
                    count[2]=domain->zoom_ni_srv ; count[1]=domain->zoom_nj_srv ; count[0] = axis->size.getValue();
                  }
-                 SuperClassWriter::writeData(field_data3D, fieldid, true, field->getNStep()-1,&start,&count );
-                 SuperClassWriter::writeData(time_data, oss.str(), true, field->getNStep()-1 );
+                 SuperClassWriter::writeData(field_data3D, fieldid, isCollective, field->getNStep()-1,&start,&count );
+                 SuperClassWriter::writeData(time_data, oss.str(), isCollective, field->getNStep()-1 );
                  break;
               }
@@ -531,6 +532,6 @@
               case (MULTI_FILE) :
               {
-                SuperClassWriter::writeData(field_data2D, fieldid, true, field->getNStep()-1);
-                SuperClassWriter::writeData(time_data, oss.str(), true, field->getNStep()-1);
+                SuperClassWriter::writeData(field_data2D, fieldid, isCollective, field->getNStep()-1);
+                SuperClassWriter::writeData(time_data, oss.str(), isCollective, field->getNStep()-1);
                 break;
               }
@@ -550,6 +551,6 @@
                  }
 
-                 SuperClassWriter::writeData(field_data2D, fieldid, true, field->getNStep()-1,&start,&count);
-                 SuperClassWriter::writeData(time_data, oss.str(), true, field->getNStep()-1);
+                 SuperClassWriter::writeData(field_data2D, fieldid, isCollective, field->getNStep()-1,&start,&count);
+                 SuperClassWriter::writeData(time_data, oss.str(), isCollective, field->getNStep()-1);
                  break;
               
@@ -670,3 +671,3 @@
 
    } // namespace io
-} // namespace xmlioserver
+} // namespace xios
