Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/data_input.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/data_input.cpp	(revision 1881)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/data_input.cpp	(revision 1882)
@@ -19,7 +19,7 @@
   //----------------------------------------------------------------
 
-  void CDataInput::readFieldData(CField* field)
+  void CDataInput::readFieldData(CField* field, CArray<double,1>& data)
   {
-    this->readFieldData_(field);
+    this->readFieldData_(field,data);
   }
 
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/data_input.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/data_input.hpp	(revision 1881)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/data_input.hpp	(revision 1882)
@@ -18,5 +18,5 @@
       /// Read methods ///
       StdSize getFieldNbRecords(CField* field);
-      void readFieldData(CField* field);
+      void readFieldData(CField* field, CArray<double,1>& data);
       void readFieldAttributesMetaData(CField* field);
       void readFieldAttributesValues(CField* field);
@@ -27,5 +27,5 @@
     protected:
       virtual StdSize getFieldNbRecords_(CField* field) = 0;
-      virtual void readFieldData_(CField* field) = 0;
+      virtual void readFieldData_(CField* field, CArray<double,1>& data) = 0;
       virtual void readFieldAttributes_(CField* field, bool readAttributeValues) = 0;
       virtual void closeFile_(void) = 0;
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/data_output.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/data_output.cpp	(revision 1881)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/data_output.cpp	(revision 1882)
@@ -122,10 +122,10 @@
       //----------------------------------------------------------------
 
-      void CDataOutput::writeFieldData(CField* field)
+      void CDataOutput::writeFieldData(CField* field, const CArray<double,1>& data)
       TRY
       {
 //         CGrid* grid = CGrid::get(field->grid_ref.getValue());
 //         CDomain* domain = CDomain::get(grid->domain_ref.getValue());
-         this->writeFieldData_(field);
+         this->writeFieldData_(field, data);
       }
       CATCH
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/data_output.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/data_output.hpp	(revision 1881)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/data_output.hpp	(revision 1882)
@@ -28,5 +28,5 @@
             void writeFieldGrid(CField* field);
             void writeTimeDimension(void);
-            void writeFieldData(CField* field);
+            void writeFieldData(CField* field, const CArray<double,1>& data);
 
             virtual void definition_start(void) = 0;
@@ -52,5 +52,5 @@
             virtual void syncFile_      (void)               = 0;
             virtual void writeField_    (CField*     field)  = 0;
-            virtual void writeFieldData_(CField*     field)  = 0;
+            virtual void writeFieldData_(CField*     field, const CArray<double,1>& data)  = 0;
             virtual void writeDomain_   (CDomain*    domain) = 0;
             virtual void writeAxis_     (CAxis*      axis)   = 0;
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/io/nc4_data_input.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/io/nc4_data_input.cpp	(revision 1881)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/io/nc4_data_input.cpp	(revision 1882)
@@ -43,5 +43,5 @@
   CATCH
 
-  void CNc4DataInput::readFieldData_(CField* field)
+  void CNc4DataInput::readFieldData_(CField* field, CArray<double,1>& dataOut)
   TRY
   {
@@ -113,5 +113,5 @@
     }
 
-    field->inputField(fieldData);
+    field->inputField(fieldData, dataOut);
 
     if (!field->scale_factor.isEmpty() || !field->add_offset.isEmpty())
@@ -120,5 +120,5 @@
       if (!field->scale_factor.isEmpty()) scaleFactor = field->scale_factor;
       if (!field->add_offset.isEmpty()) addOffset = field->add_offset;
-      field->invertScaleFactorAddOffset(scaleFactor, addOffset);
+      field->invertScaleFactorAddOffset(dataOut,scaleFactor, addOffset);
     }
   }
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/io/nc4_data_input.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/io/nc4_data_input.hpp	(revision 1881)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/io/nc4_data_input.hpp	(revision 1882)
@@ -37,5 +37,5 @@
     // Read methods
     virtual StdSize getFieldNbRecords_(CField* field);
-    virtual void readFieldData_(CField* field);
+    virtual void readFieldData_(CField* field, CArray<double,1>& data);
     virtual void readFieldAttributes_(CField* field, bool readAttributeValues);
     virtual void closeFile_(void);
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/io/nc4_data_output.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/io/nc4_data_output.cpp	(revision 1881)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/io/nc4_data_output.cpp	(revision 1882)
@@ -2343,8 +2343,9 @@
       //---------------------------------------------------------------
 
-      void CNc4DataOutput::writeFieldData_ (CField*  field)
+      void CNc4DataOutput::writeFieldData_ (CField*  field, const CArray<double,1>& data)
       {
         CContext* context = CContext::getCurrent();
         CGrid* grid = field->getGrid();
+        CArray<double,1> dataIn(data.copy()) ;
 
         if (field->getNStep()<1) 
@@ -2457,5 +2458,5 @@
            if (!field->scale_factor.isEmpty()) scaleFactor = field->scale_factor;
            if (!field->add_offset.isEmpty()) addOffset = field->add_offset;
-           field->scaleFactorAddOffset(scaleFactor, addOffset);
+           field->scaleFactorAddOffset(dataIn, scaleFactor, addOffset);
          }
 
@@ -2472,7 +2473,7 @@
 
            if (field->getUseCompressedOutput())
-             field->outputCompressedField(fieldData);
+             field->outputCompressedField(dataIn, fieldData);
            else
-             field->outputField(fieldData);
+             field->outputField(dataIn, fieldData);
 
            if (!field->prec.isEmpty() && field->prec == 2) fieldData = round(fieldData);
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/io/nc4_data_output.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/io/nc4_data_output.hpp	(revision 1881)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/io/nc4_data_output.hpp	(revision 1882)
@@ -56,5 +56,5 @@
             virtual void writeAttribute_(CVariable* var);
             virtual void writeAttribute_(CVariable* var, const string& fieldId);
-            virtual void writeFieldData_(CField* field);
+            virtual void writeFieldData_(CField* field, const CArray<double,1>& data);
             virtual void writeFile_     (CFile* file);
             virtual void closeFile_     (void);
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.cpp	(revision 1881)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.cpp	(revision 1882)
@@ -235,4 +235,6 @@
   TRY
   {
+    // ym to remove latter
+    /*
     CContext* context = CContext::getCurrent();
     Time timeStamp ;
@@ -257,4 +259,5 @@
     if (opeDate <= currDate)
     {
+      
       auto& outLocalIndexStoreOnClient = grid_-> getOutLocalIndexStoreOnClient() ;
       for (auto it = outLocalIndexStoreOnClient.begin(); it != outLocalIndexStoreOnClient.end(); ++it)
@@ -266,12 +269,27 @@
       }
     }
+*/
+    Time timeStamp ;
+    CArray<int,1>& storeClient = grid_->getStoreIndex_client(); // replace it with local size
+    CArray<double,1> recv_data_tmp(storeClient.numElements());
+    auto& outLocalIndexStoreOnClient = grid_-> getOutLocalIndexStoreOnClient() ;
+    for (auto it = outLocalIndexStoreOnClient.begin(); it != outLocalIndexStoreOnClient.end(); ++it)
+    {
+      CArray<double,1> tmp;
+      CArray<size_t,1>& indexTmp = it->second;
+      *(rankBuffers[it->first]) >> timeStamp >> tmp;
+      for (int idx = 0; idx < indexTmp.numElements(); ++idx) recv_data_tmp(indexTmp(idx)) = tmp(idx);
+    }
 
     this->setData(recv_data_tmp);
+/*
     // delete incomming flux for server only
     recvFoperationSrv.reset() ;
     recvDataSrv.reset() ;
-  }
-  CATCH_DUMP_ATTR
-
+*/
+  }
+  CATCH_DUMP_ATTR
+
+  /* ym : old interface : to be removed...
   void CField::writeUpdateData(const CArray<double,1>& data)
   TRY
@@ -303,6 +321,23 @@
   }
   CATCH_DUMP_ATTR
-
-  void CField::writeField(void)
+  */
+
+  void CField::writeUpdateData(const CArray<double,1>& data)
+  TRY
+  {
+    const CDate writeDate = last_Write_srv + freq_write_srv;
+    last_Write_srv = writeDate;
+    grid_->computeWrittenIndex();
+    /*
+    recvDataSrv.resize(data.numElements()) ;
+    recvDataSrv = data ;
+    */
+    writeField(data);
+    lastlast_Write_srv = last_Write_srv;
+  }
+  CATCH_DUMP_ATTR
+
+
+  void CField::writeField(const CArray<double,1>& data)
   TRY
   {
@@ -313,5 +348,5 @@
         getRelFile()->checkWriteFile();
         this->incrementNStep();
-        getRelFile()->getDataOutput()->writeFieldData(CField::get(this));
+        getRelFile()->getDataOutput()->writeFieldData(CField::get(this), data);
       }
     }
@@ -403,6 +438,7 @@
     CEventClient event(getType(), EVENT_ID_READ_DATA_READY);
     std::list<CMessage> msgs;
-
-    EReadField hasData = readField();
+    
+    CArray<double,1> data ;
+    EReadField hasData = readField(data);
 
     map<int, CArray<double,1> >::iterator it;
@@ -411,5 +447,5 @@
        if (client->isServerLeader())
        {
-          if (0 != recvDataSrv.numElements())
+          if (0 != data.numElements())
           {            
             const std::list<int>& ranks = client->getRanksServerLeader();
@@ -422,8 +458,8 @@
               {
                 case RF_DATA:
-                  msg << getNStep() - 1 << recvDataSrv;
+                  msg << getNStep() - 1 << data;
                   break;
                 case RF_NODATA:
-                  msg << int(-2) << recvDataSrv;
+                  msg << int(-2) << data;
                   break;
                 case RF_EOF:                  
@@ -452,5 +488,5 @@
         for (int idx = 0; idx < indexTmp.numElements(); ++idx)
         {
-          tmp(idx) = recvDataSrv(indexTmp(idx));
+          tmp(idx) = data(indexTmp(idx));
         } 
 
@@ -484,5 +520,5 @@
     \return State of field can be read from a file
   */
-  CField::EReadField CField::readField(void)
+  CField::EReadField CField::readField(CArray<double,1>& data)
   TRY
   {
@@ -496,9 +532,6 @@
       if (grid_->doGridHaveDataToWrite() || getRelFile()->type == CFile::type_attr::one_file)      
       {
-        if (0 == recvDataSrv.numElements())
-        {            
           CArray<int,1>& storeClient = grid_->getStoreIndex_client();          
-          recvDataSrv.resize(storeClient.numElements());          
-        }
+          data.resize(storeClient.numElements());          
         
         getRelFile()->checkReadFile();
@@ -515,5 +548,5 @@
 
         if (RF_EOF != readState)
-          getRelFile()->getDataInput()->readFieldData(CField::get(this));
+          getRelFile()->getDataInput()->readFieldData(CField::get(this),data);
       }
     }
@@ -2018,19 +2051,19 @@
   CATCH_DUMP_ATTR
 
-  void CField::scaleFactorAddOffset(double scaleFactor, double addOffset)
-  TRY
-  {
-    recvDataSrv = (recvDataSrv - addOffset) / scaleFactor;
-  }
-  CATCH_DUMP_ATTR
-
-  void CField::invertScaleFactorAddOffset(double scaleFactor, double addOffset)
-  TRY
-  {
-    recvDataSrv = recvDataSrv * scaleFactor + addOffset;
-  }
-  CATCH_DUMP_ATTR
-
-  void CField::outputField(CArray<double,1>& fieldOut)
+  void CField::scaleFactorAddOffset(CArray<double,1>& data, double scaleFactor, double addOffset)
+  TRY
+  {
+    data = (data - addOffset) / scaleFactor;
+  }
+  CATCH_DUMP_ATTR
+
+  void CField::invertScaleFactorAddOffset(CArray<double,1>& data, double scaleFactor, double addOffset)
+  TRY
+  {
+    data = data * scaleFactor + addOffset;
+  }
+  CATCH_DUMP_ATTR
+
+  void CField::outputField(const CArray<double,1>& dataIn, CArray<double,1>& dataOut)
   TRY
   { 
@@ -2039,10 +2072,10 @@
     for (size_t idx = 0; idx < outIndexServer.numElements(); ++idx)
     {
-      fieldOut(outIndexServer(idx)) = recvDataSrv(outIndexClient(idx));
-    }
-  }
-  CATCH_DUMP_ATTR
-
-  void CField::inputField(CArray<double,1>& fieldIn)
+      dataOut(outIndexServer(idx)) = dataIn(outIndexClient(idx));
+    }
+  }
+  CATCH_DUMP_ATTR
+
+  void CField::inputField(const CArray<double,1>& dataIn, CArray<double,1>& dataOut)
   TRY
   {
@@ -2051,10 +2084,10 @@
     for (size_t idx = 0; idx < outIndexServer.numElements(); ++idx)
     {
-      recvDataSrv(outIndexClient(idx)) = fieldIn(outIndexServer(idx));
-    }
-  }
-  CATCH_DUMP_ATTR
-
- void CField::outputCompressedField(CArray<double,1>& fieldOut)
+      dataOut(outIndexClient(idx)) = dataIn(outIndexServer(idx));
+    }
+  }
+  CATCH_DUMP_ATTR
+
+ void CField::outputCompressedField(const CArray<double,1>& dataIn, CArray<double,1>& dataOut)
  TRY
  {
@@ -2063,5 +2096,5 @@
     for (size_t idx = 0; idx < outIndexServer.numElements(); ++idx)
     {
-      fieldOut((idx)) = recvDataSrv(outIndexClient(idx));
+      dataOut((idx)) = dataIn(outIndexClient(idx));
     }
   }
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.hpp	(revision 1881)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.hpp	(revision 1882)
@@ -190,10 +190,10 @@
         void recvUpdateDataFromCoupler(std::map<int,CBufferIn*>& rankBuffers);
         
-        void writeField(void);
+        void writeField(const CArray<double,1>& data);
         bool sendReadDataRequest(const CDate& tsDataRequested, CContextClient* client);
         bool sendReadDataRequestIfNeeded(void);
         static void recvReadDataRequest(CEventServer& event);
         void recvReadDataRequest(CContextServer* server);
-        EReadField readField(void);
+        EReadField readField(CArray<double,1>& data);
         static void recvReadDataReady(CEventServer& event);
         void recvReadDataReady(vector<int> ranks, vector<CBufferIn*> buffers);
@@ -206,13 +206,14 @@
         void triggerLateField(void) ;
 
-        void outputField(CArray<double,3>& fieldOut);
-        void outputField(CArray<double,2>& fieldOut);
-        void outputField(CArray<double,1>& fieldOut);
-        void inputField(CArray<double,3>& fieldOut);
-        void inputField(CArray<double,2>& fieldOut);
-        void inputField(CArray<double,1>& fieldOut);
-        void outputCompressedField(CArray<double, 1>& fieldOut);
-        void scaleFactorAddOffset(double scaleFactor, double addOffset);
-        void invertScaleFactorAddOffset(double scaleFactor, double addOffset);
+//        void outputField(CArray<double,3>& fieldOut);
+//        void outputField(CArray<double,2>& fieldOut);
+        void outputField(const CArray<double,1>& dataIn, CArray<double,1>& dataOut);
+
+//        void inputField(CArray<double,3>& fieldOut);
+//        void inputField(CArray<double,2>& fieldOut);
+        void inputField(const CArray<double,1>& dataIn, CArray<double,1>& dataOut);
+        void outputCompressedField(const CArray<double,1>& dataIn, CArray<double, 1>& dataOut);
+        void scaleFactorAddOffset(CArray<double,1>& data, double scaleFactor, double addOffset);
+        void invertScaleFactorAddOffset(CArray<double,1>& data, double scaleFactor, double addOffset);
         void parse(xml::CXMLNode& node);
 
@@ -329,5 +330,5 @@
 
          // map<int, CArray<double,1> > data_srv;
-         CArray<double,1> recvDataSrv;
+//         CArray<double,1> recvDataSrv; // not usefull anymore
          
          std::shared_ptr<func::CFunctor> recvFoperationSrv;
