Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/file_reader_source_filter.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/file_reader_source_filter.cpp	(revision 1961)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/file_reader_source_filter.cpp	(revision 1962)
@@ -57,5 +57,5 @@
       file_->checkReadFile();
       nStepMax_ = file_->getDataInput()->getFieldNbRecords(field_);
-      nStep_ = 0 ;
+      nStep_ = file_->record_offset.isEmpty() ? 0 : file_->record_offset; ;
     }
     MPI_Allreduce(MPI_IN_PLACE, &nStepMax_, 1, MPI_INT, MPI_MAX, context->getIntraComm());
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/file_writer_store_filter.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/file_writer_store_filter.cpp	(revision 1961)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/file_writer_store_filter.cpp	(revision 1962)
@@ -23,5 +23,5 @@
     else needToWrite_=false;
     lastFileSplit_ = file_->getLastSplit() ;
-    nstep_ = 0 ;
+    nstep_ = file_->record_offset.isEmpty() ? 0 : file_->record_offset; // record_offset < 0 ==> no output (debugging)
     if (!field->scale_factor.isEmpty()) { scaleFactor_ = field->scale_factor ; hasScaleFactor_ = true ; }
     if (!field->add_offset.isEmpty()) { addOffset_ = field->add_offset ; hasAddOffset_ = true ; }
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 1961)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/io/nc4_data_output.cpp	(revision 1962)
@@ -2101,5 +2101,5 @@
             factorUnit=context->getCalendar()->getDayLengthInSeconds() ;
             else factorUnit=1 ;
-            nstep = getRecordFromTime(field->last_Write_srv,factorUnit) + 1;
+            nstep = getRecordFromTime(currentWrite,factorUnit) + 1;
           }
 
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.cpp	(revision 1961)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.cpp	(revision 1962)
@@ -33,5 +33,4 @@
     : CObjectTemplate<CField>(), CFieldAttributes()
     , written(false)
-    , nstep(0), nstepMax(0)
     , hasOutputFile(false)
     , domAxisScalarIds_(vector<StdString>(3,""))
@@ -41,8 +40,5 @@
     , hasTimeInstant(false)
     , hasTimeCentered(false)
-    , wasDataRequestedFromServer(false)
-    , wasDataAlreadyReceivedFromServer(false)
     , mustAutoTrigger(false)
-    , isEOF(false), nstepMaxRead(false)
   { setVirtualVariableGroup(CVariableGroup::create(getId() + "_virtual_variable_group")); }
 
@@ -50,5 +46,4 @@
     : CObjectTemplate<CField>(id), CFieldAttributes()
     , written(false)
-    , nstep(0), nstepMax(0)
     , hasOutputFile(false)
     , domAxisScalarIds_(vector<StdString>(3,""))
@@ -58,9 +53,6 @@
     , hasTimeInstant(false)
     , hasTimeCentered(false)
-    , wasDataRequestedFromServer(false)
-    , wasDataAlreadyReceivedFromServer(false)
     , mustAutoTrigger(false)
-    , isEOF(false), nstepMaxRead(false)
-  { setVirtualVariableGroup(CVariableGroup::create(getId() + "_virtual_variable_group")); }
+    { setVirtualVariableGroup(CVariableGroup::create(getId() + "_virtual_variable_group")); }
 
   CField::~CField(void)
@@ -163,33 +155,4 @@
   CATCH
 
-/*  
-  void CField::writeUpdateData(const CArray<double,1>& data)
-  TRY
-  {
-    const CDate writeDate = last_Write_srv + freq_write_srv;
-    last_Write_srv = writeDate;
-    writeField(data);
-    lastlast_Write_srv = last_Write_srv;
-  }
-  CATCH_DUMP_ATTR
-*/
-
-/*
-  void CField::writeField(const CArray<double,1>& data)
-  TRY
-  {
-    if (!getRelFile()->isEmptyZone())
-    {
-      if (grid_->doGridHaveDataToWrite() || getRelFile()->type == CFile::type_attr::one_file)
-      {
-        getRelFile()->checkWriteFile();
-        this->incrementNStep();
-        getRelFile()->getDataOutput()->writeFieldData(CField::get(this), data);
-      }
-    }
-  }
-  CATCH_DUMP_ATTR
-*/
-  
   /*
     Send a request for reading data.
@@ -265,89 +228,4 @@
   CATCH_DUMP_ATTR
 
-  /* old interface to be removed ..*/
-/*
-  void CField::recvUpdateDataFromCoupler(std::map<int,CBufferIn*>& rankBuffers)
-  TRY
-  {
-    CContext* context = CContext::getCurrent();
-    Time timeStamp ;
-    if (wasDataAlreadyReceivedFromServer)
-    {  
-      lastDataReceivedFromServer = lastDataReceivedFromServer + freq_op;
-    }
-    else
-    {
-      // unlikely to input from file server where data are received at ts=0
-      // for coupling, it would be after the first freq_op, because for now we don't have
-      // restart mecanism to send the value at ts=0. It mus be changed in future
-      lastDataReceivedFromServer = context->getCalendar()->getInitDate();
-      wasDataAlreadyReceivedFromServer = true;
-    }
-
-    CArray<int,1>& storeClient = grid_->getStoreIndex_client();
-    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);
-    }
-    
-    clientSourceFilter->streamData(lastDataReceivedFromServer, recv_data_tmp);
-    
-  }
-  CATCH_DUMP_ATTR
-*/ 
-
-  /*!
-    Receive read data from server
-    \param [in] ranks Ranks of sending processes
-    \param [in] buffers buffers containing read data
-  */
-  // old interface to remove 
-/*
-  void CField::recvReadDataReady(vector<int> ranks, vector<CBufferIn*> buffers)
-  TRY
-  {
-    CContext* context = CContext::getCurrent();
-    std::map<int, CArray<double,1> > data;
-    const bool wasEOF = isEOF;
-
-    for (int i = 0; i < ranks.size(); i++)
-    {
-      int rank = ranks[i];
-      int record;
-      *buffers[i] >> record;
-      isEOF = (record == int(-1));
-
-      if (!isEOF)
-        *buffers[i] >> data[rank];
-      else
-        break;
-    }
-
-    if (wasDataAlreadyReceivedFromServer)
-      lastDataReceivedFromServer = lastDataReceivedFromServer + fileIn_->output_freq;
-    else
-    {
-      lastDataReceivedFromServer = context->getCalendar()->getInitDate();
-      wasDataAlreadyReceivedFromServer = true;
-    }
-
-    if (isEOF)
-    {
-      if (!wasEOF)
-        dateEOF = lastDataReceivedFromServer;
-
-      serverSourceFilter->signalEndOfStream(lastDataReceivedFromServer);
-    }
-    else
-      serverSourceFilter->streamDataFromServer(lastDataReceivedFromServer, data);
-  }
-  CATCH_DUMP_ATTR
-*/
 
   void CField::checkForLateDataFromCoupler(void)
@@ -423,14 +301,5 @@
   CATCH_DUMP_ATTR
 
-  //----------------------------------------------------------------
-/*
-  void CField::setRelFile(CFile* _file)
-  TRY
-  {
-    this->file = _file;
-    hasOutputFile = true;
-  }
-  CATCH_DUMP_ATTR
-*/
+
   //----------------------------------------------------------------
 
@@ -459,11 +328,4 @@
   CATCH
 
-  int CField::getNStep(void) const
-  TRY
-  {
-    return this->nstep;
-  }
-  CATCH
-
   func::CFunctor::ETimeType CField::getOperationTimeType() const
   TRY
@@ -473,27 +335,4 @@
   CATCH
 
-   //----------------------------------------------------------------
-
-  void CField::incrementNStep(void)
-  TRY
-  {
-    this->nstep++;
-  }
-  CATCH_DUMP_ATTR
-
-  void CField::resetNStep(int nstep /*= 0*/)
-  TRY
-  {
-    this->nstep = nstep;
-  }
-  CATCH_DUMP_ATTR
-
-  void CField::resetNStepMax(void)
-  TRY
-  {
-    this->nstepMax = 0;
-    nstepMaxRead = false;
-  }
-  CATCH_DUMP_ATTR
 
   //----------------------------------------------------------------
@@ -868,14 +707,4 @@
     if (freq_offset.isEmpty()) freq_offset.setValue(NoneDu);
 
-    freq_operation_srv = fileOut_->output_freq.getValue();
-    freq_write_srv     = fileOut_->output_freq.getValue();
-
-    lastlast_Write_srv = context->getCalendar()->getInitDate();
-    last_Write_srv     = context->getCalendar()->getInitDate();
-    last_operation_srv = context->getCalendar()->getInitDate();
-
-    const CDuration toffset = freq_operation_srv - freq_offset.getValue() - context->getCalendar()->getTimeStep();
-    last_operation_srv     = last_operation_srv - toffset;
-
     if (operation.isEmpty())
       ERROR("void CField::solveServerOperation(void)",
@@ -1086,18 +915,4 @@
     if (freq_op.isEmpty()) freq_op.setValue(TimeStep);
     if (freq_offset.isEmpty()) freq_offset.setValue(freq_op.getValue() - TimeStep);
-    
-    /* old 
-
-    freq_operation_srv = freq_op ;
-    last_operation_srv = context->getCalendar()->getInitDate();
-    const CDuration toffset = freq_operation_srv - freq_offset.getValue() - context->getCalendar()->getTimeStep();
-    last_operation_srv     = last_operation_srv - toffset;
-
-    clientSourceFilter = std::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid_, false, false, freq_offset, true)) ;
-    clientSourceFilter -> connectOutput(inputFilter,0) ;
-
-    */
-    // new
-
     clientFromClientSourceFilter_ = std::shared_ptr<CClientFromClientSourceFilter>(new CClientFromClientSourceFilter(gc, this)) ;
     clientFromClientSourceFilter_ -> connectOutput(inputFilter,0) ;
@@ -1700,54 +1515,4 @@
   CATCH_DUMP_ATTR
 
-  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
-  { 
-    CArray<size_t,1>& outIndexClient = grid_->localIndexToWriteOnClient_;
-    CArray<size_t,1>& outIndexServer = grid_->localIndexToWriteOnServer_;
-    for (size_t idx = 0; idx < outIndexServer.numElements(); ++idx)
-    {
-      dataOut(outIndexServer(idx)) = dataIn(outIndexClient(idx));
-    }
-  }
-  CATCH_DUMP_ATTR
-
-  void CField::inputField(const CArray<double,1>& dataIn, CArray<double,1>& dataOut)
-  TRY
-  {
-    CArray<size_t,1>& outIndexClient = grid_->localIndexToWriteOnClient_;
-    CArray<size_t,1>& outIndexServer = grid_->localIndexToWriteOnServer_;
-    for (size_t idx = 0; idx < outIndexServer.numElements(); ++idx)
-    {
-      dataOut(outIndexClient(idx)) = dataIn(outIndexServer(idx));
-    }
-  }
-  CATCH_DUMP_ATTR
-
- void CField::outputCompressedField(const CArray<double,1>& dataIn, CArray<double,1>& dataOut)
- TRY
- {
-    CArray<size_t,1>& outIndexClient = grid_->localIndexToWriteOnClient_;
-    CArray<size_t,1>& outIndexServer = grid_->localIndexToWriteOnServer_;
-    for (size_t idx = 0; idx < outIndexServer.numElements(); ++idx)
-    {
-      dataOut((idx)) = dataIn(outIndexClient(idx));
-    }
-  }
-  CATCH_DUMP_ATTR
-
   ///-------------------------------------------------------------------
 
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.hpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.hpp	(revision 1961)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.hpp	(revision 1962)
@@ -105,15 +105,7 @@
 
       public:
-         int getNStep(void) const;
-
          template <int N> void getData(CArray<double, N>& _data) const;
 
          std::shared_ptr<COutputPin> getInstantDataFilter();
-
-         /// Mutateur ///
-         void setRelFile(CFile* _file);
-         void incrementNStep(void);
-         void resetNStep(int nstep = 0);
-         void resetNStepMax();
 
          std::map<int, StdSize> getGridAttributesBufferSize(CContextClient* client, bool bufferForWriting = false);
@@ -193,20 +185,12 @@
         static bool dispatchEvent(CEventServer& event);
         void sendAllAttributesToServer(CContextClient* client) ; 
-        void sendUpdateData(Time timestamp, const CArray<double,1>& data, CContextClient* client);
-        void sendUpdateDataServerToClient(bool isEOF, const CArray<double,1>& data, CContextClient* client) ;
-
+        
         static void recvUpdateData(CEventServer& event);
         void receiveUpdateData(CEventServer& event);  
-        
-        void recvUpdateData(std::map<int,CBufferIn*>& rankBuffers); // old interface to be removed
-        void recvUpdateDataFromClient(std::map<int,CBufferIn*>& rankBuffers); // old interface to be removed
-        void recvUpdateDataFromCoupler(std::map<int,CBufferIn*>& rankBuffers); // old interface to be removed
-        
-//        void writeField(const CArray<double,1>& data);
+
         bool sendReadDataRequest(const CDate& tsDataRequested);
         bool sendReadDataRequestIfNeeded(void);
         static void recvReadDataRequest(CEventServer& event);
         void recvReadDataRequest(void);
-        EReadField readField(CArray<double,1>& data);
         static void recvReadDataReady(CEventServer& event);
         void receiveReadDataReady(CEventServer& event);
@@ -220,14 +204,4 @@
         void triggerLateField(void) ;
 
-//        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);
 
@@ -246,5 +220,4 @@
         void recvAddVariableGroup(CBufferIn& buffer);        
         void sendAddAllVariables(CContextClient* client);
-        //void writeUpdateData(const CArray<double,1>& data);
 
         const std::vector<StdString>& getRefDomainAxisIds();
@@ -333,20 +306,8 @@
          void unsetModelOut(void) { modelOut_ = false ;}
 
-         CDuration freq_operation_srv, freq_write_srv;
-
+         
          bool written; //<! Was the field written at least once
-         int nstep, nstepMax;
-         bool isEOF;
-         CDate lastlast_Write_srv, last_Write_srv, last_operation_srv;
-         CDate lastDataRequestedFromServer, lastDataReceivedFromServer, dateEOF;
-         bool wasDataRequestedFromServer, wasDataAlreadyReceivedFromServer;
          bool mustAutoTrigger;
 
-         map<int,std::shared_ptr<func::CFunctor> > foperation_srv;
-
-         // map<int, CArray<double,1> > data_srv;
-//         CArray<double,1> recvDataSrv; // not usefull anymore
-         
-         std::shared_ptr<func::CFunctor> recvFoperationSrv;
          string content;
 
@@ -373,5 +334,4 @@
          bool isReferenceSolvedAndTransformed;
          bool isGridChecked;
-         bool nstepMaxRead;
 
        private: 
Index: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/file.cpp
===================================================================
--- XIOS/dev/dev_ym/XIOS_COUPLING/src/node/file.cpp	(revision 1961)
+++ XIOS/dev/dev_ym/XIOS_COUPLING/src/node/file.cpp	(revision 1962)
@@ -240,9 +240,4 @@
       isOpen = false;      
 
-//      if (!record_offset.isEmpty() && record_offset < 0)
-//        ERROR("void CFile::initFile(void)",
-//              "Invalid 'record_offset', this attribute cannot be negative.");
-      const int recordOffset = record_offset.isEmpty() ? 0 : record_offset;
-
       set<StdString> setAxis;
       set<StdString> setDomains;
@@ -258,6 +253,4 @@
          for (size_t i = 0; i < vecDomains.size(); ++i)
            setDomains.insert(vecDomains[i]->getDomainOutputName());
-
-         field->resetNStep(recordOffset);
       }
       nbAxis = setAxis.size();
@@ -267,5 +260,4 @@
       createSubComFile();
 
-      // if (time_counter.isEmpty()) time_counter.setValue(time_counter_attr::centered);
       if (time_counter_name.isEmpty()) time_counter_name = "time_counter";
     }
