Index: XIOS/dev/XIOS_DEV_CMIP6/src/filter/spatial_transform_filter.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/filter/spatial_transform_filter.cpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/filter/spatial_transform_filter.cpp	(revision 1260)
@@ -196,4 +196,5 @@
       std::vector<bool> localInitFlag(dataCurrentDest.numElements(), true);
       currentBuff = 0;
+      bool firstPass=true; 
       for (itRecv = itbRecv; itRecv != iteRecv; ++itRecv)
       {
@@ -204,7 +205,8 @@
                          dataCurrentDest,
                          localInitFlag,
-                         ignoreMissingValue);
+                         ignoreMissingValue,firstPass);
 
         currentBuff += countSize;
+        firstPass=false ;
       }
 
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/average_reduction.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/average_reduction.cpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/average_reduction.cpp	(revision 1260)
@@ -31,5 +31,5 @@
                                        CArray<double,1>& dataOut,
                                        std::vector<bool>& flagInitial,                     
-                                       bool ignoreMissingValue)
+                                       bool ignoreMissingValue, bool firstPass)
 {
   if (resetWeight_) { weights_.resize(flagInitial.size()); weights_ = 1.0; resetWeight_ = false; }  
@@ -41,5 +41,5 @@
     double currentWeight  = 0.0;
 
-    dataOut=std::numeric_limits<double>::quiet_NaN();
+    if (firstPass) dataOut=std::numeric_limits<double>::quiet_NaN();
 
     for (int idx = 0; idx < nbLocalIndex; ++idx)
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/average_reduction.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/average_reduction.hpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/average_reduction.hpp	(revision 1260)
@@ -27,5 +27,5 @@
                      CArray<double,1>& dataOut,
                      std::vector<bool>& flagInitial,                     
-                     bool ignoreMissingValue);
+                     bool ignoreMissingValue, bool firstPass);
 
   virtual void updateData(CArray<double,1>& dataOut);
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/extract.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/extract.cpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/extract.cpp	(revision 1260)
@@ -30,5 +30,5 @@
                                        CArray<double,1>& dataOut,
                                        std::vector<bool>& flagInitial,
-                                       bool ignoreMissingValue)
+                                       bool ignoreMissingValue, bool firstPass)
 {
   int nbLocalIndex = localIndex.size();
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/extract.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/extract.hpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/extract.hpp	(revision 1260)
@@ -27,5 +27,5 @@
                      CArray<double,1>& dataOut,
                      std::vector<bool>& flagInitial,
-                     bool ignoreMissingValue);
+                     bool ignoreMissingValue, bool firstPass);
 
   virtual ~CExtractReductionAlgorithm() {}
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/max_reduction.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/max_reduction.cpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/max_reduction.cpp	(revision 1260)
@@ -31,5 +31,5 @@
                                    CArray<double,1>& dataOut,
                                    std::vector<bool>& flagInitial,
-                                   bool ignoreMissingValue)
+                                   bool ignoreMissingValue, bool firstPass)
 { 
   if (ignoreMissingValue)
@@ -37,5 +37,5 @@
     int nbLocalIndex = localIndex.size();
     int currentlocalIndex = 0;
-    dataOut=std::numeric_limits<double>::quiet_NaN();    
+    if (firstPass) dataOut=std::numeric_limits<double>::quiet_NaN();    
     for (int idx = 0; idx < nbLocalIndex; ++idx)
     {
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/max_reduction.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/max_reduction.hpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/max_reduction.hpp	(revision 1260)
@@ -27,5 +27,5 @@
                      CArray<double,1>& dataOut,
                      std::vector<bool>& flagInitial,
-                     bool ignoreMissingValue);
+                     bool ignoreMissingValue, bool firstPass);
 
   virtual ~CMaxReductionAlgorithm() {}
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/min_reduction.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/min_reduction.cpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/min_reduction.cpp	(revision 1260)
@@ -31,5 +31,5 @@
                                    CArray<double,1>& dataOut,
                                    std::vector<bool>& flagInitial,
-                                   bool ignoreMissingValue)
+                                   bool ignoreMissingValue, bool firstPass)
 {
   if (ignoreMissingValue)
@@ -37,5 +37,5 @@
     int nbLocalIndex = localIndex.size();
     int currentlocalIndex = 0;
-    dataOut=std::numeric_limits<double>::quiet_NaN();
+    if (firstPass) dataOut=std::numeric_limits<double>::quiet_NaN();
     for (int idx = 0; idx < nbLocalIndex; ++idx)
     {
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/min_reduction.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/min_reduction.hpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/min_reduction.hpp	(revision 1260)
@@ -27,5 +27,5 @@
                      CArray<double,1>& dataOut,
                      std::vector<bool>& flagInitial,                     
-                     bool ignoreMissingValue);
+                     bool ignoreMissingValue, bool firstPass);
 
   virtual ~CMinReductionAlgorithm() {}
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/reduction.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/reduction.hpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/reduction.hpp	(revision 1260)
@@ -41,4 +41,5 @@
     \param [in/out] dataOut Array contains local data
     \param [in/out] flagInitial vector of boolean to mark the local index already initialized. True means there is a need for initialization
+    \param [in] firstPass indicate if it is the first time the apply funtion is called for a same transformation, in order to make a clean initialization 
   */
   virtual void apply(const std::vector<std::pair<int,double> >& localIndex,
@@ -46,5 +47,5 @@
                      CArray<double,1>& dataOut,
                      std::vector<bool>& flagInitial,                     
-                     bool ignoreMissingValue) = 0;
+                     bool ignoreMissingValue, bool firstPass) = 0;
   /*!
     Update local data 
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/sum_reduction.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/sum_reduction.cpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/sum_reduction.cpp	(revision 1260)
@@ -31,5 +31,5 @@
                                    CArray<double,1>& dataOut,
                                    std::vector<bool>& flagInitial,
-                                   bool ignoreMissingValue)
+                                   bool ignoreMissingValue, bool firstPass)
 {
   if (ignoreMissingValue)
@@ -38,5 +38,5 @@
     int currentlocalIndex = 0;
 
-    dataOut=std::numeric_limits<double>::quiet_NaN();
+    if (firstPass) dataOut=std::numeric_limits<double>::quiet_NaN();
   
     for (int idx = 0; idx < nbLocalIndex; ++idx)
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/sum_reduction.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/sum_reduction.hpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/sum_reduction.hpp	(revision 1260)
@@ -27,5 +27,5 @@
                      CArray<double,1>& dataOut,
                      std::vector<bool>& flagInitial,
-                     bool ignoreMissingValue);
+                     bool ignoreMissingValue, bool firstPass);
 
   virtual ~CSumReductionAlgorithm() {}
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_extract_domain.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_extract_domain.cpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_extract_domain.cpp	(revision 1260)
@@ -69,7 +69,7 @@
                                         CArray<double,1>& dataOut,
                                         std::vector<bool>& flagInitial,                     
-                                        bool ignoreMissingValue)
+                                        bool ignoreMissingValue, bool firstPass)
 {
-  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue);
+  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass);
 }
 
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_extract_domain.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_extract_domain.hpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_extract_domain.hpp	(revision 1260)
@@ -34,5 +34,5 @@
                      CArray<double,1>& dataOut,
                      std::vector<bool>& flagInitial,                     
-                     bool ignoreMissingValue);
+                     bool ignoreMissingValue, bool firstPass);
 
   virtual ~CAxisAlgorithmExtractDomain();
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_reduce_domain.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_reduce_domain.cpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_reduce_domain.cpp	(revision 1260)
@@ -77,7 +77,7 @@
                                        CArray<double,1>& dataOut,
                                        std::vector<bool>& flagInitial,                     
-                                       bool ignoreMissingValue)
+                                       bool ignoreMissingValue, bool firstPass)
 {
-  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue);
+  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass);
 }
 
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_reduce_domain.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_reduce_domain.hpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_reduce_domain.hpp	(revision 1260)
@@ -33,5 +33,5 @@
                      CArray<double,1>& dataOut,
                      std::vector<bool>& flagInitial,                     
-                     bool ignoreMissingValue);
+                     bool ignoreMissingValue, bool firstPass);
 
   virtual void updateData(CArray<double,1>& dataOut);
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/domain_algorithm_expand.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/domain_algorithm_expand.cpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/domain_algorithm_expand.cpp	(revision 1260)
@@ -161,4 +161,5 @@
   else domainDestination->domain_ref.setValue(domainDstRef);
 
+  
   // Here are attributes of source need tranfering
   int niGloSrc = domainSource->ni_glo;
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/generic_algorithm_transformation.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/generic_algorithm_transformation.cpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/generic_algorithm_transformation.cpp	(revision 1260)
@@ -32,5 +32,5 @@
                                             CArray<double,1>& dataOut,
                                             std::vector<bool>& flagInitial,
-                                            bool ignoreMissingValue)
+                                            bool ignoreMissingValue, bool firstPass  )
 {
   int nbLocalIndex = localIndex.size();   
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/generic_algorithm_transformation.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/generic_algorithm_transformation.hpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/generic_algorithm_transformation.hpp	(revision 1260)
@@ -64,4 +64,5 @@
     \param [in/out] flagInitial vector of boolean to mark the local index already initialized. True means there is a need for initalization
     \param [in] ignoreMissingValue don't count missing value in operation if this flag is true
+    \param [in] firstPass indicate if it is the first time the apply funtion is called for a same transformation, in order to make a clean initialization 
   */
   virtual void apply(const std::vector<std::pair<int,double> >& localIndex,
@@ -69,5 +70,5 @@
                      CArray<double,1>& dataOut,
                      std::vector<bool>& flagInitial,                     
-                     bool ignoreMissingValue);
+                     bool ignoreMissingValue, bool firstPass);
 
   /*!
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_extract_axis.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_extract_axis.cpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_extract_axis.cpp	(revision 1260)
@@ -56,7 +56,7 @@
                                          CArray<double,1>& dataOut,
                                          std::vector<bool>& flagInitial,                     
-                                         bool ignoreMissingValue)
+                                         bool ignoreMissingValue, bool firstPass)
 {
-  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue);
+  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass);
 }
 
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_extract_axis.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_extract_axis.hpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_extract_axis.hpp	(revision 1260)
@@ -33,5 +33,5 @@
                      CArray<double,1>& dataOut,
                      std::vector<bool>& flagInitial,                     
-                     bool ignoreMissingValue);
+                     bool ignoreMissingValue, bool firstPass);
 
   virtual ~CScalarAlgorithmExtractAxis();
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_reduce_axis.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_reduce_axis.cpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_reduce_axis.cpp	(revision 1260)
@@ -84,11 +84,8 @@
 }
 
-void CScalarAlgorithmReduceAxis::apply(const std::vector<std::pair<int,double> >& localIndex,
-                                         const double* dataInput,
-                                         CArray<double,1>& dataOut,
-                                         std::vector<bool>& flagInitial,
-				       bool ignoreMissingValue)
+void CScalarAlgorithmReduceAxis::apply(const std::vector<std::pair<int,double> >& localIndex, const double* dataInput, CArray<double,1>& dataOut,
+                                         std::vector<bool>& flagInitial, bool ignoreMissingValue, bool firstPass)
 {
-  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue);
+  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass);
 }
 
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_reduce_axis.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_reduce_axis.hpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_reduce_axis.hpp	(revision 1260)
@@ -33,5 +33,5 @@
                      CArray<double,1>& dataOut,
                      std::vector<bool>& flagInitial,
-                     bool ignoreMissingValue);
+                     bool ignoreMissingValue, bool firstPass);
 
   virtual void updateData(CArray<double,1>& dataOut);
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_reduce_domain.cpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_reduce_domain.cpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_reduce_domain.cpp	(revision 1260)
@@ -82,7 +82,7 @@
                                          CArray<double,1>& dataOut,
                                          std::vector<bool>& flagInitial,                     
-                                         bool ignoreMissingValue)
+                                         bool ignoreMissingValue, bool firstPass)
 {
-  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue);
+  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass);
 }
 
Index: XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_reduce_domain.hpp
===================================================================
--- XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_reduce_domain.hpp	(revision 1259)
+++ XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_reduce_domain.hpp	(revision 1260)
@@ -33,5 +33,5 @@
                      CArray<double,1>& dataOut,
                      std::vector<bool>& flagInitial,                     
-                     bool ignoreMissingValue);
+                     bool ignoreMissingValue, bool firstPass);
 
   virtual void updateData(CArray<double,1>& dataOut);
