Index: /XIOS/dev/branch_yushan_merged/extern/remap/src/clipper.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/extern/remap/src/clipper.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/extern/remap/src/clipper.cpp	(revision 1205)
@@ -1047,5 +1047,5 @@
 
   //create a new edge array ...
-  TEdge *edges = new TEdge[highI+1];
+  TEdge *edges = new TEdge [highI +1];
 
   bool IsFlat = true;
Index: /XIOS/dev/branch_yushan_merged/extern/remap/src/gridRemap.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/extern/remap/src/gridRemap.hpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/extern/remap/src/gridRemap.hpp	(revision 1205)
@@ -14,5 +14,6 @@
 Coord readPole(std::istream&);
 
-
+extern CRemapGrid srcGrid;
+extern CRemapGrid tgtGrid;
 
 }
Index: /XIOS/dev/branch_yushan_merged/extern/remap/src/intersect.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/extern/remap/src/intersect.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/extern/remap/src/intersect.cpp	(revision 1205)
@@ -17,10 +17,4 @@
 using namespace std;
 
-extern CRemapGrid srcGrid;
-#pragma omp threadprivate(srcGrid)
-
-extern CRemapGrid tgtGrid;
-#pragma omp threadprivate(tgtGrid)
-
 /** returns index of edge of a that is shared with b,
     or NOT_FOUND if a and b do not share an edge */
@@ -62,21 +56,7 @@
     for (int j = 0; j < b.n; j++)
     {
-      // share a full edge ? be carefull at the orientation
-      
-      //if(squaredist(a.vertex[i], b.vertex[j]) > 1e-10*1e-10 ||
-      //   squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]) > 1e-10*1e-10 )
-      //{      
-        //printf("A : squaredist(a.vertex[%d], b.vertex[%d]) = %.10e  %d\n", 
-        //        i, j, squaredist(a.vertex[i], b.vertex[j]), 
-        //        squaredist(a.vertex[i], b.vertex[j]) > 1e-10*1e-10 ? true : false);
-        //printf("B : squaredist(a.vertex[%d], b.vertex[%d]) = %.10e  %d\n", 
-        //        (i+1)%a.n, (j+1)%b.n, squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]),
-        //        squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]) > 1e-10*1e-10 ? true : false);
-
-        assert(squaredist(a.vertex[ i       ], b.vertex[ j       ]) > 1e-10*1e-10 ||
-               squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]) > 1e-10*1e-10);
-        
-      //}
-
+// share a full edge ? be carefull at the orientation
+      assert(squaredist(a.vertex[ i       ], b.vertex[ j       ]) > 1e-10*1e-10 ||
+             squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+1)%b.n]) > 1e-10*1e-10);
       if (   squaredist(a.vertex[ i       ], b.vertex[ j           ]) < 1e-10*1e-10 &&
              squaredist(a.vertex[(i+1)%a.n], b.vertex[(j+b.n-1)%b.n]) < 1e-10*1e-10)
Index: /XIOS/dev/branch_yushan_merged/extern/remap/src/intersection_ym.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/extern/remap/src/intersection_ym.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/extern/remap/src/intersection_ym.cpp	(revision 1205)
@@ -16,10 +16,4 @@
 using namespace std;
 using namespace ClipperLib ;
-
-extern CRemapGrid srcGrid;
-#pragma omp threadprivate(srcGrid)
-
-extern CRemapGrid tgtGrid;
-#pragma omp threadprivate(tgtGrid)
 
 double intersect_ym(Elt *a, Elt *b)
Index: /XIOS/dev/branch_yushan_merged/extern/remap/src/libmapper.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/extern/remap/src/libmapper.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/extern/remap/src/libmapper.cpp	(revision 1205)
@@ -14,16 +14,7 @@
 #include "mapper.hpp"
 #include "cputime.hpp" // cputime
-#include "gridRemap.hpp"
-
 #include <stdio.h>
 
 using namespace sphereRemap ;
-
-//extern CRemapGrid srcGrid;
-//#pragma omp threadprivate(srcGrid)
-
-//extern CRemapGrid tgtGrid;
-//#pragma omp threadprivate(tgtGrid)
-
 
 /* mapper is a ponter to a global class instance whoes members are allocated in the first step (finding the sizes of the weight arrays)
@@ -42,5 +33,4 @@
                      int order, int* n_weights)
 {
-  printf("libmapper callded : remap_get_num_weights\n");
   assert(src_bounds_lon);
   assert(src_bounds_lat);
@@ -125,5 +115,4 @@
                      double* centre_lon, double* centre_lat, double* areas)
 {
-  printf("libmapper callded : remap_get_barycentres_and_areas\n");
 	for (int i = 0; i < n_cell; i++)
 	{
@@ -149,5 +138,4 @@
 extern "C" void remap_get_weights(double* weights, int* src_indices, int* dst_indices)
 {
-  printf("libmapper callded : remap_get_weights\n");
 	memcpy(weights, mapper->remapMatrix, mapper->nWeights*sizeof(double));
 	memcpy(src_indices, mapper->srcAddress, mapper->nWeights*sizeof(int));
Index: /XIOS/dev/branch_yushan_merged/extern/remap/src/mapper.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/extern/remap/src/mapper.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/extern/remap/src/mapper.cpp	(revision 1205)
@@ -15,10 +15,4 @@
 namespace sphereRemap {
 
-extern CRemapGrid srcGrid;
-#pragma omp threadprivate(srcGrid)
-
-extern CRemapGrid tgtGrid;
-#pragma omp threadprivate(tgtGrid)
-
 /* A subdivition of an array into N sub-arays
    can be represented by the length of the N arrays
@@ -275,8 +269,7 @@
 
     MPI_Status *status = new MPI_Status[4*mpiSize];
-    
+
+    MPI_Waitall(nbSendRequest, sendRequest, status);
     MPI_Waitall(nbRecvRequest, recvRequest, status);
-    MPI_Waitall(nbSendRequest, sendRequest, status);
-    
 
     /* for all indices that have been received from requesting ranks: pack values and gradients, then send */
@@ -629,5 +622,5 @@
     MPI_Waitall(nbRecvRequest, recvRequest, status);
     MPI_Waitall(nbSendRequest, sendRequest, status);
- 
+
     int nbNeighbourNodes = 0;
     for (int rank = 0; rank < mpiSize; rank++)
@@ -699,11 +692,4 @@
         }
 
-        /*
-           for (int i = 0; i < elt->n; i++)
-           {
-           if (elt->neighbour[i] == NOT_FOUND)
-           error_exit("neighbour not found");
-           }
-           */
     }
 }
@@ -810,9 +796,8 @@
         }
     }
- 
+
     MPI_Waitall(nbRecvRequest, recvRequest, status);
     MPI_Waitall(nbSendRequest, sendRequest, status);
-    
-    
+
     char **sendBuffer2 = new char*[mpiSize];
     char **recvBuffer2 = new char*[mpiSize];
@@ -838,8 +823,7 @@
                     Elt *elt2 = (Elt *) ((*it)->data);
                     /* recvElt is target, elt2 is source */
-                    //					intersect(&recvElt[j], elt2);
-                    intersect_ym(&recvElt[j], elt2);
+                    intersect(&recvElt[j], elt2);
+                    //intersect_ym(&recvElt[j], elt2);
                 }
-
                 if (recvElt[j].is.size() > 0) sentMessageSize[rank] += packIntersectionSize(recvElt[j]);
 
@@ -860,5 +844,4 @@
             }
             delete [] recvElt;
-
         }
     }
@@ -898,6 +881,4 @@
     MPI_Waitall(nbRecvRequest, recvRequest, status);
     MPI_Waitall(nbSendRequest, sendRequest, status);
-   
-   
 
     delete [] sendRequest;
Index: /XIOS/dev/branch_yushan_merged/extern/remap/src/node.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/extern/remap/src/node.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/extern/remap/src/node.cpp	(revision 1205)
@@ -472,10 +472,5 @@
 	q->child.resize(MAX_NODE_SZ/2 + 1);
 	assert(thIs->child.size() == MAX_NODE_SZ+1);
-        if(thIs->closest(thIs->child, FARTHEST) == 0) 
-          thIs->tree->ref = thIs->closest(thIs->child, FARTHEST); // farthest from centre
-          
-        thIs->tree->ref = thIs->closest(thIs->child, FARTHEST); // farthest from centre
-        
-          
+	thIs->tree->ref = thIs->closest(thIs->child, FARTHEST); // farthest from centre
 	std::sort(thIs->child.begin(), thIs->child.end(), compareDist);
 	for (int i = 0; i < MAX_NODE_SZ+1; i++)
Index: /XIOS/dev/branch_yushan_merged/extern/remap/src/parallel_tree.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/extern/remap/src/parallel_tree.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/extern/remap/src/parallel_tree.cpp	(revision 1205)
@@ -16,10 +16,4 @@
 
 static const int assignLevel = 2;
-
-extern CRemapGrid srcGrid;
-#pragma omp threadprivate(srcGrid)
-
-extern CRemapGrid tgtGrid;
-#pragma omp threadprivate(tgtGrid)
 
 // only the circle is packed, rest of node will be initialized on unpacking
Index: /XIOS/dev/branch_yushan_merged/extern/remap/src/polyg.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/extern/remap/src/polyg.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/extern/remap/src/polyg.cpp	(revision 1205)
@@ -3,5 +3,4 @@
 #include <cassert>
 #include <iostream>
-#include <stdio.h>
 #include "elt.hpp"
 #include "errhandle.hpp"
@@ -175,13 +174,5 @@
 		t[2] = x[ii];
                 double sc=scalarprod(crossprod(t[1] - t[0], t[2] - t[0]), t[0]) ;
-		//assert(sc >= -1e-10); // Error: tri a l'env (wrong orientation)
-                if(sc < -1e-10)
-                {
-                  printf("N=%d, sc = %f, t[0]=(%f,%f,%f), t[1]=(%f,%f,%f), t[2]=(%f,%f,%f)\n", N, sc,
-                                                                                         t[0].x, t[0].y, t[0].z, 
-                                                                                         t[1].x, t[1].y, t[1].z,
-                                                                                         t[2].x, t[2].y, t[2].z);
-                  assert(sc >= -1e-10);
-                }
+		assert(sc >= -1e-10); // Error: tri a l'env (wrong orientation)
 		double area_gc = triarea(t[0], t[1], t[2]);
 		double area_sc_gc_moon = 0;
Index: /XIOS/dev/branch_yushan_merged/extern/remap/src/triple.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/extern/remap/src/triple.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/extern/remap/src/triple.cpp	(revision 1205)
@@ -3,5 +3,5 @@
 namespace sphereRemap {
 
-const Coord ORIGIN(0.0, 0.0, 0.0);
+extern const Coord ORIGIN(0.0, 0.0, 0.0);
 
 std::ostream& operator<<(std::ostream& os, const Coord& c) {
Index: /XIOS/dev/branch_yushan_merged/src/attribute.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/attribute.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/attribute.cpp	(revision 1205)
@@ -54,5 +54,4 @@
       ///--------------------------------------------------------------
 
-
       CMessage& operator<<(CMessage& msg,CAttribute& type)
       {
Index: /XIOS/dev/branch_yushan_merged/src/buffer_client.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/buffer_client.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/buffer_client.cpp	(revision 1205)
@@ -12,8 +12,10 @@
   size_t CClientBuffer::maxRequestSize = 0;
 
-  CClientBuffer::CClientBuffer(MPI_Comm interComm, int serverRank, StdSize bufferSize, StdSize maxBufferedEvents)
+  CClientBuffer::CClientBuffer(MPI_Comm interComm, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize, StdSize maxBufferedEvents)
     : interComm(interComm)
     , serverRank(serverRank)
     , bufferSize(bufferSize)
+    , estimatedMaxEventSize(estimatedMaxEventSize)
+    , maxEventSize(0)
     , current(0)
     , count(0)
@@ -43,9 +45,19 @@
   bool CClientBuffer::isBufferFree(int size)
   {
-    if (size > maxRequestSize) maxRequestSize = size;
-
     if (size > bufferSize)
       ERROR("bool CClientBuffer::isBufferFree(int size)",
             << "The requested size (" << size << " bytes) is too big to fit the buffer (" << bufferSize << " bytes), please increase the client buffer size." << endl);
+
+    if (size > maxEventSize)
+    {
+      maxEventSize = size;
+
+      if (size > estimatedMaxEventSize)
+        error(0) << "WARNING: Unexpected event of size " << size << " for server " << serverRank
+                 << " (estimated max event size = " << estimatedMaxEventSize << ")" << std::endl;
+
+      if (size > maxRequestSize) maxRequestSize = size;
+    }
+
 
     return (size <= remain() && bufferedEvents < maxBufferedEvents);
Index: /XIOS/dev/branch_yushan_merged/src/buffer_client.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/buffer_client.hpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/buffer_client.hpp	(revision 1205)
@@ -18,5 +18,5 @@
       #pragma omp threadprivate(maxRequestSize)
 
-      CClientBuffer(MPI_Comm intercomm, int serverRank, StdSize bufferSize, StdSize maxBufferedEvents);
+      CClientBuffer(MPI_Comm intercomm, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize, StdSize maxBufferedEvents);
       ~CClientBuffer();
 
@@ -33,6 +33,8 @@
       int count;
       int bufferedEvents;
+      int maxEventSize;
       const int maxBufferedEvents;
       const int bufferSize;
+      const int estimatedMaxEventSize;
       const int serverRank;
       bool pending;
Index: /XIOS/dev/branch_yushan_merged/src/client.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/client.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/client.cpp	(revision 1205)
@@ -52,5 +52,5 @@
           }
           CTimer::get("XIOS").resume() ;
-          CTimer::get("XIOS init").resume() ;
+          CTimer::get("XIOS init/finalize").resume() ;
           boost::hash<string> hashString ;
 
@@ -151,5 +151,5 @@
 
         CTimer::get("XIOS").resume() ;
-        CTimer::get("XIOS init").resume() ;
+        CTimer::get("XIOS init/finalize").resume() ;
 
         if (CXios::usingServer)
@@ -269,5 +269,5 @@
       MPI_Comm_free(&intraComm);
 
-      CTimer::get("XIOS finalize").suspend() ;
+      CTimer::get("XIOS init/finalize").suspend() ;
       CTimer::get("XIOS").suspend() ;
 
@@ -281,15 +281,17 @@
       info(20) << "Client "<<rank<<" : Client side context is finalized "<< endl ;
 
-  /*    #pragma omp critical (_output)
-      {
-         report(0) <<"     Performance report : total time spent for XIOS : "<< CTimer::get("XIOS").getCumulatedTime()<<" s"<<endl ;
-         report(0)<< "     Performance report : time spent for waiting free buffer : "<< CTimer::get("Blocking time").getCumulatedTime()<<" s"<<endl ;
-         report(0)<< "     Performance report : Ratio : "<< CTimer::get("Blocking time").getCumulatedTime()/CTimer::get("XIOS").getCumulatedTime()*100.<<" %"<<endl ;
-         report(0)<< "     Performance report : This ratio must be close to zero. Otherwise it may be usefull to increase buffer size or numbers of server"<<endl ;
-         report(0)<< "     Memory report : Current buffer_size : "<<CXios::bufferSize<<endl ;
-         report(0)<< "     Memory report : Minimum buffer size required : " << CClientBuffer::maxRequestSize << " bytes" << endl ;
-         report(0)<< "     Memory report : increasing it by a factor will increase performance, depending of the volume of data wrote in file at each time step of the file"<<endl ;
-       }      
-*/
+   /*#pragma omp critical (_output)
+   {
+      report(0) <<" Performance report : Whole time from XIOS init and finalize: "<< CTimer::get("XIOS init/finalize").getCumulatedTime()<<" s"<<endl ;
+      report(0) <<" Performance report : total time spent for XIOS : "<< CTimer::get("XIOS").getCumulatedTime()<<" s"<<endl ;
+      report(0)<< " Performance report : time spent for waiting free buffer : "<< CTimer::get("Blocking time").getCumulatedTime()<<" s"<<endl ;
+      report(0)<< " Performance report : Ratio : "<< CTimer::get("Blocking time").getCumulatedTime()/CTimer::get("XIOS init/finalize").getCumulatedTime()*100.<<" %"<<endl ;
+      report(0)<< " Performance report : This ratio must be close to zero. Otherwise it may be usefull to increase buffer size or numbers of server"<<endl ;
+//      report(0)<< " Memory report : Current buffer_size : "<<CXios::bufferSize<<endl ;
+      report(0)<< " Memory report : Minimum buffer size required : " << CClientBuffer::maxRequestSize << " bytes" << endl ;
+      report(0)<< " Memory report : increasing it by a factor will increase performance, depending of the volume of data wrote in file at each time step of the file"<<endl ;
+      report(100)<<CTimer::getAllCumulatedTime()<<endl ;
+   }*/
+   
    }
 
Index: /XIOS/dev/branch_yushan_merged/src/config/axis_attribute_private.conf
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/config/axis_attribute_private.conf	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/config/axis_attribute_private.conf	(revision 1205)
@@ -1,2 +1,3 @@
 DECLARE_ATTRIBUTE_PRIVATE(int, global_zoom_begin)
 DECLARE_ATTRIBUTE_PRIVATE(int, global_zoom_n)
+DECLARE_ARRAY_PRIVATE(int,  1, global_zoom_index)
Index: /XIOS/dev/branch_yushan_merged/src/config/field_attribute.conf
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/config/field_attribute.conf	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/config/field_attribute.conf	(revision 1205)
@@ -16,4 +16,5 @@
 DECLARE_ATTRIBUTE(bool,      read_access)
 DECLARE_ATTRIBUTE(bool,      indexed_output)
+DECLARE_ATTRIBUTE(bool,      check_if_active)
 
 DECLARE_ATTRIBUTE(StdString, domain_ref)
Index: /XIOS/dev/branch_yushan_merged/src/config/file_attribute.conf
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/config/file_attribute.conf	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/config/file_attribute.conf	(revision 1205)
@@ -10,8 +10,12 @@
 DECLARE_ATTRIBUTE(CDuration, split_freq)
 DECLARE_ATTRIBUTE(StdString, split_freq_format)
+DECLARE_ATTRIBUTE(CDuration, split_start_offset)
+DECLARE_ATTRIBUTE(CDuration, split_end_offset)
+DECLARE_ATTRIBUTE(string,     split_last_date)
 DECLARE_ATTRIBUTE(bool,      enabled)
 DECLARE_ENUM2(type,          one_file, multiple_file)
 DECLARE_ENUM2(format,        netcdf4, netcdf4_classic)
 DECLARE_ENUM2(convention,    CF, UGRID)
+DECLARE_ATTRIBUTE(StdString, convention_str)
 DECLARE_ENUM2(par_access,    collective, independent)
 DECLARE_ATTRIBUTE(bool,      append)
Index: /XIOS/dev/branch_yushan_merged/src/config/zoom_axis_attribute.conf
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/config/zoom_axis_attribute.conf	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/config/zoom_axis_attribute.conf	(revision 1205)
@@ -2,2 +2,3 @@
 DECLARE_ATTRIBUTE(int,       begin)
 DECLARE_ATTRIBUTE(int,       n)
+DECLARE_ARRAY(int    ,1    , index)
Index: /XIOS/dev/branch_yushan_merged/src/context_client.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/context_client.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/context_client.cpp	(revision 1205)
@@ -234,6 +234,7 @@
         error(0) << "WARNING: Unexpected request for buffer to communicate with server " << rank << std::endl;
         mapBufferSize_[rank] = CXios::minBufferSize;
-      }
-      CClientBuffer* buffer = buffers[rank] = new CClientBuffer(interComm, rank, mapBufferSize_[rank], maxBufferedEvents);
+        maxEventSizes[rank] = CXios::minBufferSize;
+      }
+      CClientBuffer* buffer = buffers[rank] = new CClientBuffer(interComm, rank, mapBufferSize_[rank], maxEventSizes[rank], maxBufferedEvents);
       // Notify the server
       CBufferOut* bufOut = buffer->getBuffer(sizeof(StdSize));
@@ -283,4 +284,5 @@
    {
      mapBufferSize_ = mapSize;
+     maxEventSizes = maxEventSize;
 
      // Compute the maximum number of events that can be safely buffered.
@@ -298,6 +300,10 @@
      
      if (minBufferSizeEventSizeRatio < 1.0)
+     {
        ERROR("void CContextClient::setBufferSize(const std::map<int,StdSize>& mapSize, const std::map<int,StdSize>& maxEventSize)",
              << "The buffer sizes and the maximum events sizes are incoherent.");
+     }
+     else if (minBufferSizeEventSizeRatio == std::numeric_limits<double>::max())
+       minBufferSizeEventSizeRatio = 1.0; // In this case, maxBufferedEvents will never be used but we want to avoid any floating point exception
 
      maxBufferedEvents = size_t(2 * minBufferSizeEventSizeRatio) // there is room for two local buffers on the server
Index: /XIOS/dev/branch_yushan_merged/src/context_client.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/context_client.hpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/context_client.hpp	(revision 1205)
@@ -76,4 +76,6 @@
       //! Mapping of server and buffer size for each connection to server
       std::map<int,StdSize> mapBufferSize_;
+      //! Maximum event sizes estimated for each connection to server
+      std::map<int,StdSize> maxEventSizes;
       //! Maximum number of events that can be buffered
       StdSize maxBufferedEvents;
Index: /XIOS/dev/branch_yushan_merged/src/cxios.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/cxios.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/cxios.cpp	(revision 1205)
@@ -163,6 +163,4 @@
        delete globalRegistry ;
      }
-     CClient::closeInfoStream();
-  
 
 #ifdef XIOS_MEMTRACK
@@ -177,4 +175,6 @@
      MemTrack::TrackDumpBlocks();
 #endif
+
+     CClient::closeInfoStream();
 
 #endif
@@ -237,7 +237,18 @@
        delete globalRegistry ;
      }
-
     CServer::finalize();
-        
+
+#ifdef XIOS_MEMTRACK
+
+#ifdef XIOS_MEMTRACK_LIGHT
+       report(10) << " Memory report : current memory used by XIOS : "<<  MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ;
+       report(10) << " Memory report : maximum memory used by XIOS : "<<  MemTrack::getMaxMemorySize()*1.0/(1024*1024)<<" Mbyte" << endl ;
+#endif
+
+#ifdef XIOS_MEMTRACK_FULL
+     MemTrack::TrackListMemoryUsage() ;
+     MemTrack::TrackDumpBlocks();
+#endif
+#endif
     CServer::closeInfoStream();
   }
Index: /XIOS/dev/branch_yushan_merged/src/data_output.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/data_output.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/data_output.cpp	(revision 1205)
@@ -7,5 +7,5 @@
 namespace xios
 {
-      /// ////////////////////// Dfinitions ////////////////////// ///
+      /// ////////////////////// DÃ©finitions ////////////////////// ///
 
       CDataOutput::~CDataOutput(void)
Index: /XIOS/dev/branch_yushan_merged/src/distribution_server.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/distribution_server.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/distribution_server.cpp	(revision 1205)
@@ -34,4 +34,17 @@
 }
 
+CDistributionServer::CDistributionServer(int rank, 
+                                        const std::vector<CArray<int,1> >& globalIndexElements,
+                                        const CArray<int,1>& elementOrder,
+                                        const std::vector<int>& nZoomBeginServer,
+                                        const std::vector<int>& nZoomSizeServer,
+                                        const std::vector<int>& nZoomBeginGlobal,
+                                        const std::vector<int>& nGlobal)
+  : CDistribution(rank, nGlobal.size()), nGlobal_(nGlobal), nZoomBeginGlobal_(nZoomBeginGlobal),
+    nZoomSize_(nZoomSizeServer), nZoomBegin_(nZoomBeginServer), globalLocalIndexMap_()
+{
+  createGlobalIndex(globalIndexElements, elementOrder);
+}
+
 CDistributionServer::~CDistributionServer()
 {
@@ -89,4 +102,85 @@
 
 /*!
+  Create global index on server side
+  Like the similar function on client side, this function serves on creating global index
+for data written by the server. The global index is used to calculating local index of data
+written on each server
+  \param[in] globalIndexElement global index on server side of each element of grid (scalar, axis, domain)
+  \param[in] elementOrder the order of elements of grid (e.x: domain->axis or domain->scalar)
+*/
+void CDistributionServer::createGlobalIndex(const std::vector<CArray<int,1> >& globalIndexElements,
+                                            const CArray<int,1>& elementOrder)
+{
+  int numElement = elementOrder.numElements(), elementIdx = 0;  
+  std::vector<int> indexMap(numElement);
+  for (int i = 0; i < numElement; ++i)
+  {
+    indexMap[i] = elementIdx;
+    if (2 == elementOrder(i))
+    {      
+      elementIdx += 2;
+    }
+    else
+      ++elementIdx;
+  }
+
+  std::vector<size_t> elementGlobalSize(numElement);
+  size_t globalSize = 1;
+  for (int i = 0; i < numElement; ++i)
+  {
+    int elementType = elementOrder(i);
+    elementGlobalSize[i] = globalSize;
+    if (2 == elementType) // domain
+    {
+      globalSize *= nGlobal_[indexMap[i]+1] * nGlobal_[indexMap[i]];
+    }
+    else // axis or scalar
+    {
+      globalSize *= nGlobal_[indexMap[i]];
+    }
+  } 
+
+  size_t ssize = 1;
+  for (int i = 0; i < globalIndexElements.size(); ++i) ssize *= globalIndexElements[i].numElements();
+  this->globalIndex_.resize(ssize);
+  globalLocalIndexMap_.rehash(std::ceil(ssize/globalLocalIndexMap_.max_load_factor()));
+
+  std::vector<int> idxLoop(numElement,0);
+  std::vector<int> currentIndex(numElement);
+  int innerLoopSize = globalIndexElements[0].numElements();
+
+  size_t idx = 0;
+  while (idx<ssize)
+  {
+    for (int i = 0; i < numElement-1; ++i)
+    {
+      if (idxLoop[i] == globalIndexElements[i].numElements())
+      {
+        idxLoop[i] = 0;
+        ++idxLoop[i+1];
+      }
+    }
+
+    for (int i = 1; i < numElement; ++i)  currentIndex[i] = globalIndexElements[i](idxLoop[i]);
+
+    size_t mulDim, globalIndex;
+    for (int i = 0; i < innerLoopSize; ++i)
+    {      
+      globalIndex = 0;
+      currentIndex[0] = globalIndexElements[0](i);
+
+      for (int k = 0; k < numElement; ++k)
+      {     
+        globalIndex += (currentIndex[k])*elementGlobalSize[k];
+      }
+      globalLocalIndexMap_[globalIndex] = idx;
+      this->globalIndex_(idx) = globalIndex;
+      ++idx;
+    }
+    idxLoop[0] += innerLoopSize;
+  }
+}
+
+/*!
   Compute local index for writing data on server
   \param [in] globalIndex global index received from client
Index: /XIOS/dev/branch_yushan_merged/src/distribution_server.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/distribution_server.hpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/distribution_server.hpp	(revision 1205)
@@ -31,4 +31,12 @@
                         const std::vector<int>& nGlobal);
 
+    CDistributionServer(int rank, 
+                        const std::vector<CArray<int,1> >& globalIndexElements,
+                        const CArray<int,1>& elementOrder,
+                        const std::vector<int>& nZoomBeginServer,
+                        const std::vector<int>& nZoomSizeServer,
+                        const std::vector<int>& nZoomBeginGlobal,
+                        const std::vector<int>& nGlobal);
+
     /** Default destructor */
     virtual ~CDistributionServer();
@@ -44,4 +52,6 @@
   protected:
     virtual void createGlobalIndex();
+    void createGlobalIndex(const std::vector<CArray<int,1> >& globalIndexElements,
+                           const CArray<int,1>& elementOrder);
 
   protected:
Index: /XIOS/dev/branch_yushan_merged/src/filter/file_writer_filter.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/filter/file_writer_filter.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/filter/file_writer_filter.cpp	(revision 1205)
@@ -17,19 +17,21 @@
   void CFileWriterFilter::onInputReady(std::vector<CDataPacketPtr> data)
   {
-    bool ignoreMissingValue = (!field->detect_missing_value.isEmpty() && 
-                               !field->default_value.isEmpty() && 
-                               field->detect_missing_value == true);
-    if (ignoreMissingValue)
+    CDataPacketPtr packet = data[0];
+
+    const bool detectMissingValue = (!field->detect_missing_value.isEmpty()
+                                      && !field->default_value.isEmpty()
+                                      && field->detect_missing_value == true);
+    if (detectMissingValue)
     {
-      double missingValue = field->default_value;
-      size_t nbData = data[0]->data.numElements();
+      const double missingValue = field->default_value;
+      const size_t nbData = packet->data.numElements();
       for (size_t idx = 0; idx < nbData; ++idx)
       {
-        if (NumTraits<double>::isnan(data[0]->data(idx)))
-          data[0]->data(idx) = missingValue;
+        if (NumTraits<double>::isnan(packet->data(idx)))
+          packet->data(idx) = missingValue;
       }
-    }    
+    }
 
-    field->sendUpdateData(data[0]->data);
+    field->sendUpdateData(packet->data);
   }
 
Index: /XIOS/dev/branch_yushan_merged/src/filter/source_filter.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/filter/source_filter.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/filter/source_filter.cpp	(revision 1205)
@@ -37,6 +37,6 @@
     if (hasMissingValue)
     {
-      double nanValue = std::numeric_limits<double>::quiet_NaN();
-      size_t nbData = packet->data.numElements();
+      const double nanValue = std::numeric_limits<double>::quiet_NaN();
+      const size_t nbData = packet->data.numElements();
       for (size_t idx = 0; idx < nbData; ++idx)
       {
@@ -82,4 +82,16 @@
     }
 
+    // Convert missing values to NaN
+    if (hasMissingValue)
+    {
+      const double nanValue = std::numeric_limits<double>::quiet_NaN();
+      const size_t nbData = packet->data.numElements();
+      for (size_t idx = 0; idx < nbData; ++idx)
+      {
+        if (defaultValue == packet->data(idx))
+          packet->data(idx) = nanValue;
+      }
+    }
+
     onOutputReady(packet);
   }
Index: /XIOS/dev/branch_yushan_merged/src/filter/source_filter.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/filter/source_filter.hpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/filter/source_filter.hpp	(revision 1205)
@@ -62,6 +62,6 @@
       CGrid* grid; //!< The grid attached to the data the filter can accept
       const CDuration offset; //!< The offset applied to the timestamp of all packets
-      bool hasMissingValue;
-      double defaultValue;
+      const bool hasMissingValue;
+      const double defaultValue;
   }; // class CSourceFilter
 } // namespace xios
Index: /XIOS/dev/branch_yushan_merged/src/filter/store_filter.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/filter/store_filter.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/filter/store_filter.cpp	(revision 1205)
@@ -6,9 +6,12 @@
 namespace xios
 {
-  CStoreFilter::CStoreFilter(CGarbageCollector& gc, CContext* context, CGrid* grid)
+  CStoreFilter::CStoreFilter(CGarbageCollector& gc, CContext* context, CGrid* grid,
+                             bool detectMissingValues /*= false*/, double missingValue /*= 0.0*/)
     : CInputPin(gc, 1)
     , gc(gc)
     , context(context)
     , grid(grid)
+    , detectMissingValues(detectMissingValues)
+    , missingValue(missingValue)
   {
     if (!context)
@@ -75,8 +78,20 @@
   void CStoreFilter::onInputReady(std::vector<CDataPacketPtr> data)
   {
-    packets.insert(std::make_pair(data[0]->timestamp, data[0]));
+    CDataPacketPtr packet = data[0];
+
+    packets.insert(std::make_pair(packet->timestamp, packet));
     // The packet is always destroyed by the garbage collector
     // so we register but never unregister
-    gc.registerObject(this, data[0]->timestamp);
+    gc.registerObject(this, packet->timestamp);
+
+    if (detectMissingValues)
+    {
+      const size_t nbData = packet->data.numElements();
+      for (size_t idx = 0; idx < nbData; ++idx)
+      {
+        if (NumTraits<double>::isnan(packet->data(idx)))
+          packet->data(idx) = missingValue;
+      }
+    }
   }
 
Index: /XIOS/dev/branch_yushan_merged/src/filter/store_filter.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/filter/store_filter.hpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/filter/store_filter.hpp	(revision 1205)
@@ -22,6 +22,9 @@
        * \param context the context to which the data belongs
        * \param grid the grid to which the data is attached
+       * \param detectMissingValues whether missing values should be detected
+       * \param missingValue the value to use to replace missing values
        */
-      CStoreFilter(CGarbageCollector& gc, CContext* context, CGrid* grid);
+      CStoreFilter(CGarbageCollector& gc, CContext* context, CGrid* grid,
+                   bool detectMissingValues = false, double missingValue = 0.0);
 
       /*!
@@ -75,4 +78,6 @@
       CContext* context; //!< The context to which the data belongs
       CGrid* grid; //!< The grid attached to the data the filter can accept
+      const bool detectMissingValues; //!< Whether missing values should be detected
+      const double missingValue; //!< The value to use to replace missing values
       std::map<Time, CDataPacketPtr> packets; //<! The stored packets
   }; // class CStoreFilter
Index: /XIOS/dev/branch_yushan_merged/src/filter/temporal_filter.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/filter/temporal_filter.hpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/filter/temporal_filter.hpp	(revision 1205)
@@ -48,6 +48,9 @@
 
     private:
+      // Warning the declaration order matters here, double-check the constructor before changing it
+      CArray<double, 1> tmpData; //!< The array of data used for temporary storage
       const boost::scoped_ptr<func::CFunctor> functor; //!< The functor corresponding to the temporal operation
-      CArray<double, 1> tmpData; //!< The array of data used for temporary storage
+      const bool isOnceOperation; //!< True if the operation should be computed just once
+      const bool isInstantOperation; //!< True if the operation is instant
       const CDuration samplingFreq; //!< The sampling frequency, i.e. the frequency at which the input data will be used
       const CDuration samplingOffset; //!< The sampling offset, i.e. the offset after which the input data will be used
@@ -56,6 +59,4 @@
       CDate nextOperationDate; //!< The date of the next operation
       bool isFirstOperation; //!< True before the first operation was been computed
-      const bool isOnceOperation; //!< True if the operation should be computed just once
-      const bool isInstantOperation; //!< True if the operation is instant
   }; // class CTemporalFilter
 } // namespace xios
Index: /XIOS/dev/branch_yushan_merged/src/interface/c/icdata.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/c/icdata.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/c/icdata.cpp	(revision 1205)
@@ -119,7 +119,5 @@
      CTimer::get("XIOS close definition").resume();
      CContext* context = CContext::getCurrent();
-     
      context->closeDefinition();
-     
      CTimer::get("XIOS close definition").suspend();
      CTimer::get("XIOS").suspend();
@@ -130,7 +128,4 @@
      CTimer::get("XIOS").resume();
      CTimer::get("XIOS context finalize").resume();
-     
-     
-     
      CContext* context = CContext::getCurrent();
      context->finalize();
Index: /XIOS/dev/branch_yushan_merged/src/interface/c_attr/icfield_attr.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/c_attr/icfield_attr.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/c_attr/icfield_attr.cpp	(revision 1205)
@@ -119,4 +119,27 @@
 
 
+  void cxios_set_field_check_if_active(field_Ptr field_hdl, bool check_if_active)
+  {
+    CTimer::get("XIOS").resume();
+    field_hdl->check_if_active.setValue(check_if_active);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_field_check_if_active(field_Ptr field_hdl, bool* check_if_active)
+  {
+    CTimer::get("XIOS").resume();
+    *check_if_active = field_hdl->check_if_active.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_field_check_if_active(field_Ptr field_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = field_hdl->check_if_active.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
   void cxios_set_field_compression_level(field_Ptr field_hdl, int compression_level)
   {
Index: /XIOS/dev/branch_yushan_merged/src/interface/c_attr/icfieldgroup_attr.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/c_attr/icfieldgroup_attr.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/c_attr/icfieldgroup_attr.cpp	(revision 1205)
@@ -119,4 +119,27 @@
 
 
+  void cxios_set_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl, bool check_if_active)
+  {
+    CTimer::get("XIOS").resume();
+    fieldgroup_hdl->check_if_active.setValue(check_if_active);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl, bool* check_if_active)
+  {
+    CTimer::get("XIOS").resume();
+    *check_if_active = fieldgroup_hdl->check_if_active.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = fieldgroup_hdl->check_if_active.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
   void cxios_set_fieldgroup_compression_level(fieldgroup_Ptr fieldgroup_hdl, int compression_level)
   {
Index: /XIOS/dev/branch_yushan_merged/src/interface/c_attr/icfile_attr.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/c_attr/icfile_attr.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/c_attr/icfile_attr.cpp	(revision 1205)
@@ -90,4 +90,30 @@
 
 
+  void cxios_set_file_convention_str(file_Ptr file_hdl, const char * convention_str, int convention_str_size)
+  {
+    std::string convention_str_str;
+    if (!cstr2string(convention_str, convention_str_size, convention_str_str)) return;
+    CTimer::get("XIOS").resume();
+    file_hdl->convention_str.setValue(convention_str_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_file_convention_str(file_Ptr file_hdl, char * convention_str, int convention_str_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(file_hdl->convention_str.getInheritedValue(), convention_str, convention_str_size))
+      ERROR("void cxios_get_file_convention_str(file_Ptr file_hdl, char * convention_str, int convention_str_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_file_convention_str(file_Ptr file_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = file_hdl->convention_str.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
   void cxios_set_file_cyclic(file_Ptr file_hdl, bool cyclic)
   {
Index: /XIOS/dev/branch_yushan_merged/src/interface/c_attr/icfilegroup_attr.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/c_attr/icfilegroup_attr.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/c_attr/icfilegroup_attr.cpp	(revision 1205)
@@ -90,4 +90,30 @@
 
 
+  void cxios_set_filegroup_convention_str(filegroup_Ptr filegroup_hdl, const char * convention_str, int convention_str_size)
+  {
+    std::string convention_str_str;
+    if (!cstr2string(convention_str, convention_str_size, convention_str_str)) return;
+    CTimer::get("XIOS").resume();
+    filegroup_hdl->convention_str.setValue(convention_str_str);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_filegroup_convention_str(filegroup_Ptr filegroup_hdl, char * convention_str, int convention_str_size)
+  {
+    CTimer::get("XIOS").resume();
+    if (!string_copy(filegroup_hdl->convention_str.getInheritedValue(), convention_str, convention_str_size))
+      ERROR("void cxios_get_filegroup_convention_str(filegroup_Ptr filegroup_hdl, char * convention_str, int convention_str_size)", << "Input string is too short");
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_filegroup_convention_str(filegroup_Ptr filegroup_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = filegroup_hdl->convention_str.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
   void cxios_set_filegroup_cyclic(filegroup_Ptr filegroup_hdl, bool cyclic)
   {
Index: /XIOS/dev/branch_yushan_merged/src/interface/c_attr/icinterpolate_domain_attr.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/c_attr/icinterpolate_domain_attr.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/c_attr/icinterpolate_domain_attr.cpp	(revision 1205)
@@ -62,4 +62,27 @@
      CTimer::get("XIOS").resume();
      bool isDefined = interpolate_domain_hdl->order.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
+  void cxios_set_interpolate_domain_quantity(interpolate_domain_Ptr interpolate_domain_hdl, bool quantity)
+  {
+    CTimer::get("XIOS").resume();
+    interpolate_domain_hdl->quantity.setValue(quantity);
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_interpolate_domain_quantity(interpolate_domain_Ptr interpolate_domain_hdl, bool* quantity)
+  {
+    CTimer::get("XIOS").resume();
+    *quantity = interpolate_domain_hdl->quantity.getInheritedValue();
+    CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_interpolate_domain_quantity(interpolate_domain_Ptr interpolate_domain_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = interpolate_domain_hdl->quantity.hasInheritedValue();
      CTimer::get("XIOS").suspend();
      return isDefined;
Index: /XIOS/dev/branch_yushan_merged/src/interface/c_attr/iczoom_axis_attr.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/c_attr/iczoom_axis_attr.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/c_attr/iczoom_axis_attr.cpp	(revision 1205)
@@ -41,4 +41,29 @@
 
 
+  void cxios_set_zoom_axis_index(zoom_axis_Ptr zoom_axis_hdl, int* index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData);
+    zoom_axis_hdl->index.reference(tmp.copy());
+     CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_get_zoom_axis_index(zoom_axis_Ptr zoom_axis_hdl, int* index, int* extent)
+  {
+    CTimer::get("XIOS").resume();
+    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData);
+    tmp=zoom_axis_hdl->index.getInheritedValue();
+     CTimer::get("XIOS").suspend();
+  }
+
+  bool cxios_is_defined_zoom_axis_index(zoom_axis_Ptr zoom_axis_hdl)
+  {
+     CTimer::get("XIOS").resume();
+     bool isDefined = zoom_axis_hdl->index.hasInheritedValue();
+     CTimer::get("XIOS").suspend();
+     return isDefined;
+  }
+
+
   void cxios_set_zoom_axis_n(zoom_axis_Ptr zoom_axis_hdl, int n)
   {
Index: /XIOS/dev/branch_yushan_merged/src/interface/fortran/idata.F90
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/fortran/idata.F90	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/fortran/idata.F90	(revision 1205)
@@ -465,5 +465,4 @@
    INTEGER :: f_return_comm
 
-
       IF (PRESENT(local_comm)) THEN
         f_local_comm=local_comm
Index: /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/field_interface_attr.F90
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/field_interface_attr.F90	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/field_interface_attr.F90	(revision 1205)
@@ -92,4 +92,23 @@
 
 
+    SUBROUTINE cxios_set_field_check_if_active(field_hdl, check_if_active) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: check_if_active
+    END SUBROUTINE cxios_set_field_check_if_active
+
+    SUBROUTINE cxios_get_field_check_if_active(field_hdl, check_if_active) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+      LOGICAL (KIND=C_BOOL)             :: check_if_active
+    END SUBROUTINE cxios_get_field_check_if_active
+
+    FUNCTION cxios_is_defined_field_check_if_active(field_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_check_if_active
+      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
+    END FUNCTION cxios_is_defined_field_check_if_active
+
+
     SUBROUTINE cxios_set_field_compression_level(field_hdl, compression_level) BIND(C)
       USE ISO_C_BINDING
Index: /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/fieldgroup_interface_attr.F90
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/fieldgroup_interface_attr.F90	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/fieldgroup_interface_attr.F90	(revision 1205)
@@ -92,4 +92,23 @@
 
 
+    SUBROUTINE cxios_set_fieldgroup_check_if_active(fieldgroup_hdl, check_if_active) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: check_if_active
+    END SUBROUTINE cxios_set_fieldgroup_check_if_active
+
+    SUBROUTINE cxios_get_fieldgroup_check_if_active(fieldgroup_hdl, check_if_active) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+      LOGICAL (KIND=C_BOOL)             :: check_if_active
+    END SUBROUTINE cxios_get_fieldgroup_check_if_active
+
+    FUNCTION cxios_is_defined_fieldgroup_check_if_active(fieldgroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_check_if_active
+      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
+    END FUNCTION cxios_is_defined_fieldgroup_check_if_active
+
+
     SUBROUTINE cxios_set_fieldgroup_compression_level(fieldgroup_hdl, compression_level) BIND(C)
       USE ISO_C_BINDING
Index: /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/file_interface_attr.F90
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/file_interface_attr.F90	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/file_interface_attr.F90	(revision 1205)
@@ -69,4 +69,25 @@
 
 
+    SUBROUTINE cxios_set_file_convention_str(file_hdl, convention_str, convention_str_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: convention_str
+      INTEGER  (kind = C_INT)     , VALUE        :: convention_str_size
+    END SUBROUTINE cxios_set_file_convention_str
+
+    SUBROUTINE cxios_get_file_convention_str(file_hdl, convention_str, convention_str_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: convention_str
+      INTEGER  (kind = C_INT)     , VALUE        :: convention_str_size
+    END SUBROUTINE cxios_get_file_convention_str
+
+    FUNCTION cxios_is_defined_file_convention_str(file_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_file_convention_str
+      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
+    END FUNCTION cxios_is_defined_file_convention_str
+
+
     SUBROUTINE cxios_set_file_cyclic(file_hdl, cyclic) BIND(C)
       USE ISO_C_BINDING
Index: /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/filegroup_interface_attr.F90
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/filegroup_interface_attr.F90	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/filegroup_interface_attr.F90	(revision 1205)
@@ -69,4 +69,25 @@
 
 
+    SUBROUTINE cxios_set_filegroup_convention_str(filegroup_hdl, convention_str, convention_str_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: convention_str
+      INTEGER  (kind = C_INT)     , VALUE        :: convention_str_size
+    END SUBROUTINE cxios_set_filegroup_convention_str
+
+    SUBROUTINE cxios_get_filegroup_convention_str(filegroup_hdl, convention_str, convention_str_size) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: convention_str
+      INTEGER  (kind = C_INT)     , VALUE        :: convention_str_size
+    END SUBROUTINE cxios_get_filegroup_convention_str
+
+    FUNCTION cxios_is_defined_filegroup_convention_str(filegroup_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_filegroup_convention_str
+      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
+    END FUNCTION cxios_is_defined_filegroup_convention_str
+
+
     SUBROUTINE cxios_set_filegroup_cyclic(filegroup_hdl, cyclic) BIND(C)
       USE ISO_C_BINDING
Index: /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/ifield_attr.F90
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/ifield_attr.F90	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/ifield_attr.F90	(revision 1205)
@@ -12,8 +12,9 @@
 
   SUBROUTINE xios(set_field_attr)  &
-    ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-    , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-    , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  &
-    , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min )
+    ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+    , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
+     )
 
     IMPLICIT NONE
@@ -24,4 +25,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode
+      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active
+      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp
       INTEGER  , OPTIONAL, INTENT(IN) :: compression_level
       REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value
@@ -59,16 +62,18 @@
       (field_id,field_hdl)
       CALL xios(set_field_attr_hdl_)   &
-      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-      , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-      , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  &
-      , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min )
+      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+      , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
+       )
 
   END SUBROUTINE xios(set_field_attr)
 
   SUBROUTINE xios(set_field_attr_hdl)  &
-    ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-    , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-    , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  &
-    , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min )
+    ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+    , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
+     )
 
     IMPLICIT NONE
@@ -78,4 +83,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode
+      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active
+      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp
       INTEGER  , OPTIONAL, INTENT(IN) :: compression_level
       REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value
@@ -111,17 +118,18 @@
 
       CALL xios(set_field_attr_hdl_)  &
-      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-      , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-      , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  &
-      , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min )
+      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+      , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
+       )
 
   END SUBROUTINE xios(set_field_attr_hdl)
 
   SUBROUTINE xios(set_field_attr_hdl_)   &
-    ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, compression_level_, default_value_  &
-    , detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_, freq_op_, grid_path_  &
-    , grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_, read_access_, scalar_ref_  &
-    , scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_, valid_max_, valid_min_  &
-     )
+    ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_, compression_level_  &
+    , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_  &
+    , freq_op_, grid_path_, grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_  &
+    , read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_  &
+    , valid_max_, valid_min_ )
 
     IMPLICIT NONE
@@ -131,4 +139,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active_
+      LOGICAL (KIND=C_BOOL) :: check_if_active__tmp
       INTEGER  , OPTIONAL, INTENT(IN) :: compression_level_
       REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value_
@@ -183,4 +193,10 @@
       ENDIF
 
+      IF (PRESENT(check_if_active_)) THEN
+        check_if_active__tmp = check_if_active_
+        CALL cxios_set_field_check_if_active &
+      (field_hdl%daddr, check_if_active__tmp)
+      ENDIF
+
       IF (PRESENT(compression_level_)) THEN
         CALL cxios_set_field_compression_level &
@@ -321,8 +337,9 @@
 
   SUBROUTINE xios(get_field_attr)  &
-    ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-    , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-    , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  &
-    , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min )
+    ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+    , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
+     )
 
     IMPLICIT NONE
@@ -333,4 +350,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active
+      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp
       INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level
       REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value
@@ -368,16 +387,18 @@
       (field_id,field_hdl)
       CALL xios(get_field_attr_hdl_)   &
-      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-      , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-      , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  &
-      , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min )
+      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+      , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
+       )
 
   END SUBROUTINE xios(get_field_attr)
 
   SUBROUTINE xios(get_field_attr_hdl)  &
-    ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-    , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-    , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  &
-    , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min )
+    ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+    , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
+     )
 
     IMPLICIT NONE
@@ -387,4 +408,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active
+      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp
       INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level
       REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value
@@ -420,17 +443,18 @@
 
       CALL xios(get_field_attr_hdl_)  &
-      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-      , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-      , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  &
-      , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min )
+      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+      , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
+       )
 
   END SUBROUTINE xios(get_field_attr_hdl)
 
   SUBROUTINE xios(get_field_attr_hdl_)   &
-    ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, compression_level_, default_value_  &
-    , detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_, freq_op_, grid_path_  &
-    , grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_, read_access_, scalar_ref_  &
-    , scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_, valid_max_, valid_min_  &
-     )
+    ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_, compression_level_  &
+    , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_  &
+    , freq_op_, grid_path_, grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_  &
+    , read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_  &
+    , valid_max_, valid_min_ )
 
     IMPLICIT NONE
@@ -440,4 +464,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active_
+      LOGICAL (KIND=C_BOOL) :: check_if_active__tmp
       INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level_
       REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value_
@@ -492,4 +518,10 @@
       ENDIF
 
+      IF (PRESENT(check_if_active_)) THEN
+        CALL cxios_get_field_check_if_active &
+      (field_hdl%daddr, check_if_active__tmp)
+        check_if_active_ = check_if_active__tmp
+      ENDIF
+
       IF (PRESENT(compression_level_)) THEN
         CALL cxios_get_field_compression_level &
@@ -630,8 +662,9 @@
 
   SUBROUTINE xios(is_defined_field_attr)  &
-    ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-    , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-    , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  &
-    , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min )
+    ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+    , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
+     )
 
     IMPLICIT NONE
@@ -646,4 +679,6 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode
       LOGICAL(KIND=C_BOOL) :: cell_methods_mode_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active
+      LOGICAL(KIND=C_BOOL) :: check_if_active_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level
       LOGICAL(KIND=C_BOOL) :: compression_level_tmp
@@ -702,16 +737,18 @@
       (field_id,field_hdl)
       CALL xios(is_defined_field_attr_hdl_)   &
-      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-      , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-      , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  &
-      , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min )
+      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+      , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
+       )
 
   END SUBROUTINE xios(is_defined_field_attr)
 
   SUBROUTINE xios(is_defined_field_attr_hdl)  &
-    ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-    , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-    , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  &
-    , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min )
+    ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+    , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
+     )
 
     IMPLICIT NONE
@@ -725,4 +762,6 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode
       LOGICAL(KIND=C_BOOL) :: cell_methods_mode_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active
+      LOGICAL(KIND=C_BOOL) :: check_if_active_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level
       LOGICAL(KIND=C_BOOL) :: compression_level_tmp
@@ -779,17 +818,18 @@
 
       CALL xios(is_defined_field_attr_hdl_)  &
-      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-      , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-      , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  &
-      , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min )
+      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+      , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
+       )
 
   END SUBROUTINE xios(is_defined_field_attr_hdl)
 
   SUBROUTINE xios(is_defined_field_attr_hdl_)   &
-    ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, compression_level_, default_value_  &
-    , detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_, freq_op_, grid_path_  &
-    , grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_, read_access_, scalar_ref_  &
-    , scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_, valid_max_, valid_min_  &
-     )
+    ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_, compression_level_  &
+    , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_  &
+    , freq_op_, grid_path_, grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_  &
+    , read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_  &
+    , valid_max_, valid_min_ )
 
     IMPLICIT NONE
@@ -803,4 +843,6 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode_
       LOGICAL(KIND=C_BOOL) :: cell_methods_mode__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active_
+      LOGICAL(KIND=C_BOOL) :: check_if_active__tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level_
       LOGICAL(KIND=C_BOOL) :: compression_level__tmp
@@ -880,4 +922,10 @@
       ENDIF
 
+      IF (PRESENT(check_if_active_)) THEN
+        check_if_active__tmp = cxios_is_defined_field_check_if_active &
+      (field_hdl%daddr)
+        check_if_active_ = check_if_active__tmp
+      ENDIF
+
       IF (PRESENT(compression_level_)) THEN
         compression_level__tmp = cxios_is_defined_field_compression_level &
Index: /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/ifieldgroup_attr.F90
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/ifieldgroup_attr.F90	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/ifieldgroup_attr.F90	(revision 1205)
@@ -12,7 +12,7 @@
 
   SUBROUTINE xios(set_fieldgroup_attr)  &
-    ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-    , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-    , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+    ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+    , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
     , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
      )
@@ -25,4 +25,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode
+      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active
+      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp
       INTEGER  , OPTIONAL, INTENT(IN) :: compression_level
       REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value
@@ -61,7 +63,7 @@
       (fieldgroup_id,fieldgroup_hdl)
       CALL xios(set_fieldgroup_attr_hdl_)   &
-      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-      , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-      , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+      , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
       , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
        )
@@ -70,7 +72,7 @@
 
   SUBROUTINE xios(set_fieldgroup_attr_hdl)  &
-    ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-    , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-    , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+    ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+    , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
     , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
      )
@@ -82,4 +84,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode
+      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active
+      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp
       INTEGER  , OPTIONAL, INTENT(IN) :: compression_level
       REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value
@@ -116,7 +120,7 @@
 
       CALL xios(set_fieldgroup_attr_hdl_)  &
-      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-      , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-      , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+      , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
       , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
        )
@@ -125,9 +129,9 @@
 
   SUBROUTINE xios(set_fieldgroup_attr_hdl_)   &
-    ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, compression_level_  &
-    , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_  &
-    , freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_, name_, operation_  &
-    , prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_  &
-    , unit_, valid_max_, valid_min_ )
+    ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_  &
+    , compression_level_, default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_  &
+    , freq_offset_, freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_  &
+    , name_, operation_, prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_  &
+    , ts_split_freq_, unit_, valid_max_, valid_min_ )
 
     IMPLICIT NONE
@@ -137,4 +141,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active_
+      LOGICAL (KIND=C_BOOL) :: check_if_active__tmp
       INTEGER  , OPTIONAL, INTENT(IN) :: compression_level_
       REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value_
@@ -190,4 +196,10 @@
       ENDIF
 
+      IF (PRESENT(check_if_active_)) THEN
+        check_if_active__tmp = check_if_active_
+        CALL cxios_set_fieldgroup_check_if_active &
+      (fieldgroup_hdl%daddr, check_if_active__tmp)
+      ENDIF
+
       IF (PRESENT(compression_level_)) THEN
         CALL cxios_set_fieldgroup_compression_level &
@@ -333,7 +345,7 @@
 
   SUBROUTINE xios(get_fieldgroup_attr)  &
-    ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-    , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-    , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+    ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+    , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
     , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
      )
@@ -346,4 +358,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active
+      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp
       INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level
       REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value
@@ -382,7 +396,7 @@
       (fieldgroup_id,fieldgroup_hdl)
       CALL xios(get_fieldgroup_attr_hdl_)   &
-      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-      , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-      , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+      , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
       , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
        )
@@ -391,7 +405,7 @@
 
   SUBROUTINE xios(get_fieldgroup_attr_hdl)  &
-    ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-    , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-    , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+    ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+    , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
     , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
      )
@@ -403,4 +417,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active
+      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp
       INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level
       REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value
@@ -437,7 +453,7 @@
 
       CALL xios(get_fieldgroup_attr_hdl_)  &
-      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-      , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-      , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+      , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
       , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
        )
@@ -446,9 +462,9 @@
 
   SUBROUTINE xios(get_fieldgroup_attr_hdl_)   &
-    ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, compression_level_  &
-    , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_  &
-    , freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_, name_, operation_  &
-    , prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_  &
-    , unit_, valid_max_, valid_min_ )
+    ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_  &
+    , compression_level_, default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_  &
+    , freq_offset_, freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_  &
+    , name_, operation_, prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_  &
+    , ts_split_freq_, unit_, valid_max_, valid_min_ )
 
     IMPLICIT NONE
@@ -458,4 +474,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active_
+      LOGICAL (KIND=C_BOOL) :: check_if_active__tmp
       INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level_
       REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value_
@@ -511,4 +529,10 @@
       ENDIF
 
+      IF (PRESENT(check_if_active_)) THEN
+        CALL cxios_get_fieldgroup_check_if_active &
+      (fieldgroup_hdl%daddr, check_if_active__tmp)
+        check_if_active_ = check_if_active__tmp
+      ENDIF
+
       IF (PRESENT(compression_level_)) THEN
         CALL cxios_get_fieldgroup_compression_level &
@@ -654,7 +678,7 @@
 
   SUBROUTINE xios(is_defined_fieldgroup_attr)  &
-    ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-    , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-    , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+    ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+    , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
     , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
      )
@@ -671,4 +695,6 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode
       LOGICAL(KIND=C_BOOL) :: cell_methods_mode_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active
+      LOGICAL(KIND=C_BOOL) :: check_if_active_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level
       LOGICAL(KIND=C_BOOL) :: compression_level_tmp
@@ -729,7 +755,7 @@
       (fieldgroup_id,fieldgroup_hdl)
       CALL xios(is_defined_fieldgroup_attr_hdl_)   &
-      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-      , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-      , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+      , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
       , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
        )
@@ -738,7 +764,7 @@
 
   SUBROUTINE xios(is_defined_fieldgroup_attr_hdl)  &
-    ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-    , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-    , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+    ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+    , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
     , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
      )
@@ -754,4 +780,6 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode
       LOGICAL(KIND=C_BOOL) :: cell_methods_mode_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active
+      LOGICAL(KIND=C_BOOL) :: check_if_active_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level
       LOGICAL(KIND=C_BOOL) :: compression_level_tmp
@@ -810,7 +838,7 @@
 
       CALL xios(is_defined_fieldgroup_attr_hdl_)  &
-      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  &
-      , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  &
-      , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
+      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  &
+      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  &
+      , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  &
       , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  &
        )
@@ -819,9 +847,9 @@
 
   SUBROUTINE xios(is_defined_fieldgroup_attr_hdl_)   &
-    ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, compression_level_  &
-    , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_  &
-    , freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_, name_, operation_  &
-    , prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_  &
-    , unit_, valid_max_, valid_min_ )
+    ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_  &
+    , compression_level_, default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_  &
+    , freq_offset_, freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_  &
+    , name_, operation_, prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_  &
+    , ts_split_freq_, unit_, valid_max_, valid_min_ )
 
     IMPLICIT NONE
@@ -835,4 +863,6 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode_
       LOGICAL(KIND=C_BOOL) :: cell_methods_mode__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active_
+      LOGICAL(KIND=C_BOOL) :: check_if_active__tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level_
       LOGICAL(KIND=C_BOOL) :: compression_level__tmp
@@ -914,4 +944,10 @@
       ENDIF
 
+      IF (PRESENT(check_if_active_)) THEN
+        check_if_active__tmp = cxios_is_defined_fieldgroup_check_if_active &
+      (fieldgroup_hdl%daddr)
+        check_if_active_ = check_if_active__tmp
+      ENDIF
+
       IF (PRESENT(compression_level_)) THEN
         compression_level__tmp = cxios_is_defined_fieldgroup_compression_level &
Index: /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/ifile_attr.F90
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/ifile_attr.F90	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/ifile_attr.F90	(revision 1205)
@@ -12,8 +12,8 @@
 
   SUBROUTINE xios(set_file_attr)  &
-    ( file_id, append, compression_level, convention, cyclic, description, enabled, format, min_digits  &
-    , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq  &
-    , split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
-    , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+    ( file_id, append, compression_level, convention, convention_str, cyclic, description, enabled  &
+    , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
+    , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+    , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
 
     IMPLICIT NONE
@@ -24,4 +24,5 @@
       INTEGER  , OPTIONAL, INTENT(IN) :: compression_level
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str
       LOGICAL  , OPTIONAL, INTENT(IN) :: cyclic
       LOGICAL (KIND=C_BOOL) :: cyclic_tmp
@@ -55,16 +56,16 @@
       (file_id,file_hdl)
       CALL xios(set_file_attr_hdl_)   &
-      ( file_hdl, append, compression_level, convention, cyclic, description, enabled, format, min_digits  &
-      , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq  &
-      , split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
-      , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+      ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled  &
+      , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
+      , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
 
   END SUBROUTINE xios(set_file_attr)
 
   SUBROUTINE xios(set_file_attr_hdl)  &
-    ( file_hdl, append, compression_level, convention, cyclic, description, enabled, format, min_digits  &
-    , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq  &
-    , split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
-    , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+    ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled  &
+    , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
+    , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+    , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
 
     IMPLICIT NONE
@@ -74,4 +75,5 @@
       INTEGER  , OPTIONAL, INTENT(IN) :: compression_level
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str
       LOGICAL  , OPTIONAL, INTENT(IN) :: cyclic
       LOGICAL (KIND=C_BOOL) :: cyclic_tmp
@@ -103,16 +105,17 @@
 
       CALL xios(set_file_attr_hdl_)  &
-      ( file_hdl, append, compression_level, convention, cyclic, description, enabled, format, min_digits  &
-      , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq  &
-      , split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
-      , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+      ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled  &
+      , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
+      , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
 
   END SUBROUTINE xios(set_file_attr_hdl)
 
   SUBROUTINE xios(set_file_attr_hdl_)   &
-    ( file_hdl, append_, compression_level_, convention_, cyclic_, description_, enabled_, format_  &
-    , min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_, record_offset_  &
-    , split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_, time_stamp_format_  &
-    , time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_, uuid_name_ )
+    ( file_hdl, append_, compression_level_, convention_, convention_str_, cyclic_, description_  &
+    , enabled_, format_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_  &
+    , record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_  &
+    , time_stamp_format_, time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_  &
+    , uuid_name_ )
 
     IMPLICIT NONE
@@ -122,4 +125,5 @@
       INTEGER  , OPTIONAL, INTENT(IN) :: compression_level_
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str_
       LOGICAL  , OPTIONAL, INTENT(IN) :: cyclic_
       LOGICAL (KIND=C_BOOL) :: cyclic__tmp
@@ -166,4 +170,9 @@
       ENDIF
 
+      IF (PRESENT(convention_str_)) THEN
+        CALL cxios_set_file_convention_str &
+      (file_hdl%daddr, convention_str_, len(convention_str_))
+      ENDIF
+
       IF (PRESENT(cyclic_)) THEN
         cyclic__tmp = cyclic_
@@ -296,8 +305,8 @@
 
   SUBROUTINE xios(get_file_attr)  &
-    ( file_id, append, compression_level, convention, cyclic, description, enabled, format, min_digits  &
-    , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq  &
-    , split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
-    , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+    ( file_id, append, compression_level, convention, convention_str, cyclic, description, enabled  &
+    , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
+    , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+    , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
 
     IMPLICIT NONE
@@ -308,4 +317,5 @@
       INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str
       LOGICAL  , OPTIONAL, INTENT(OUT) :: cyclic
       LOGICAL (KIND=C_BOOL) :: cyclic_tmp
@@ -339,16 +349,16 @@
       (file_id,file_hdl)
       CALL xios(get_file_attr_hdl_)   &
-      ( file_hdl, append, compression_level, convention, cyclic, description, enabled, format, min_digits  &
-      , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq  &
-      , split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
-      , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+      ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled  &
+      , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
+      , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
 
   END SUBROUTINE xios(get_file_attr)
 
   SUBROUTINE xios(get_file_attr_hdl)  &
-    ( file_hdl, append, compression_level, convention, cyclic, description, enabled, format, min_digits  &
-    , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq  &
-    , split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
-    , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+    ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled  &
+    , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
+    , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+    , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
 
     IMPLICIT NONE
@@ -358,4 +368,5 @@
       INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str
       LOGICAL  , OPTIONAL, INTENT(OUT) :: cyclic
       LOGICAL (KIND=C_BOOL) :: cyclic_tmp
@@ -387,16 +398,17 @@
 
       CALL xios(get_file_attr_hdl_)  &
-      ( file_hdl, append, compression_level, convention, cyclic, description, enabled, format, min_digits  &
-      , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq  &
-      , split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
-      , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+      ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled  &
+      , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
+      , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
 
   END SUBROUTINE xios(get_file_attr_hdl)
 
   SUBROUTINE xios(get_file_attr_hdl_)   &
-    ( file_hdl, append_, compression_level_, convention_, cyclic_, description_, enabled_, format_  &
-    , min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_, record_offset_  &
-    , split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_, time_stamp_format_  &
-    , time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_, uuid_name_ )
+    ( file_hdl, append_, compression_level_, convention_, convention_str_, cyclic_, description_  &
+    , enabled_, format_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_  &
+    , record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_  &
+    , time_stamp_format_, time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_  &
+    , uuid_name_ )
 
     IMPLICIT NONE
@@ -406,4 +418,5 @@
       INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level_
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str_
       LOGICAL  , OPTIONAL, INTENT(OUT) :: cyclic_
       LOGICAL (KIND=C_BOOL) :: cyclic__tmp
@@ -450,4 +463,9 @@
       ENDIF
 
+      IF (PRESENT(convention_str_)) THEN
+        CALL cxios_get_file_convention_str &
+      (file_hdl%daddr, convention_str_, len(convention_str_))
+      ENDIF
+
       IF (PRESENT(cyclic_)) THEN
         CALL cxios_get_file_cyclic &
@@ -580,8 +598,8 @@
 
   SUBROUTINE xios(is_defined_file_attr)  &
-    ( file_id, append, compression_level, convention, cyclic, description, enabled, format, min_digits  &
-    , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq  &
-    , split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
-    , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+    ( file_id, append, compression_level, convention, convention_str, cyclic, description, enabled  &
+    , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
+    , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+    , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
 
     IMPLICIT NONE
@@ -594,4 +612,6 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: convention
       LOGICAL(KIND=C_BOOL) :: convention_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str
+      LOGICAL(KIND=C_BOOL) :: convention_str_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic
       LOGICAL(KIND=C_BOOL) :: cyclic_tmp
@@ -648,16 +668,16 @@
       (file_id,file_hdl)
       CALL xios(is_defined_file_attr_hdl_)   &
-      ( file_hdl, append, compression_level, convention, cyclic, description, enabled, format, min_digits  &
-      , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq  &
-      , split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
-      , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+      ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled  &
+      , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
+      , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
 
   END SUBROUTINE xios(is_defined_file_attr)
 
   SUBROUTINE xios(is_defined_file_attr_hdl)  &
-    ( file_hdl, append, compression_level, convention, cyclic, description, enabled, format, min_digits  &
-    , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq  &
-    , split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
-    , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+    ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled  &
+    , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
+    , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+    , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
 
     IMPLICIT NONE
@@ -669,4 +689,6 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: convention
       LOGICAL(KIND=C_BOOL) :: convention_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str
+      LOGICAL(KIND=C_BOOL) :: convention_str_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic
       LOGICAL(KIND=C_BOOL) :: cyclic_tmp
@@ -721,16 +743,17 @@
 
       CALL xios(is_defined_file_attr_hdl_)  &
-      ( file_hdl, append, compression_level, convention, cyclic, description, enabled, format, min_digits  &
-      , mode, name, name_suffix, output_freq, output_level, par_access, record_offset, split_freq  &
-      , split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format, time_stamp_name  &
-      , time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+      ( file_hdl, append, compression_level, convention, convention_str, cyclic, description, enabled  &
+      , format, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
+      , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
 
   END SUBROUTINE xios(is_defined_file_attr_hdl)
 
   SUBROUTINE xios(is_defined_file_attr_hdl_)   &
-    ( file_hdl, append_, compression_level_, convention_, cyclic_, description_, enabled_, format_  &
-    , min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_, record_offset_  &
-    , split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_, time_stamp_format_  &
-    , time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_, uuid_name_ )
+    ( file_hdl, append_, compression_level_, convention_, convention_str_, cyclic_, description_  &
+    , enabled_, format_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_  &
+    , record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_  &
+    , time_stamp_format_, time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_  &
+    , uuid_name_ )
 
     IMPLICIT NONE
@@ -742,4 +765,6 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: convention_
       LOGICAL(KIND=C_BOOL) :: convention__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str_
+      LOGICAL(KIND=C_BOOL) :: convention_str__tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic_
       LOGICAL(KIND=C_BOOL) :: cyclic__tmp
@@ -811,4 +836,10 @@
       ENDIF
 
+      IF (PRESENT(convention_str_)) THEN
+        convention_str__tmp = cxios_is_defined_file_convention_str &
+      (file_hdl%daddr)
+        convention_str_ = convention_str__tmp
+      ENDIF
+
       IF (PRESENT(cyclic_)) THEN
         cyclic__tmp = cxios_is_defined_file_cyclic &
Index: /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/ifilegroup_attr.F90
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/ifilegroup_attr.F90	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/ifilegroup_attr.F90	(revision 1205)
@@ -12,7 +12,7 @@
 
   SUBROUTINE xios(set_filegroup_attr)  &
-    ( filegroup_id, append, compression_level, convention, cyclic, description, enabled, format  &
-    , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
-    , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+    ( filegroup_id, append, compression_level, convention, convention_str, cyclic, description, enabled  &
+    , format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access  &
+    , record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
     , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
 
@@ -24,4 +24,5 @@
       INTEGER  , OPTIONAL, INTENT(IN) :: compression_level
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str
       LOGICAL  , OPTIONAL, INTENT(IN) :: cyclic
       LOGICAL (KIND=C_BOOL) :: cyclic_tmp
@@ -56,16 +57,18 @@
       (filegroup_id,filegroup_hdl)
       CALL xios(set_filegroup_attr_hdl_)   &
-      ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format  &
-      , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
-      , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
-      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+      ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+      , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name  &
+      , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name  &
+       )
 
   END SUBROUTINE xios(set_filegroup_attr)
 
   SUBROUTINE xios(set_filegroup_attr_hdl)  &
-    ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format  &
-    , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
-    , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
-    , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+    ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description  &
+    , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+    , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name  &
+    , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name  &
+     )
 
     IMPLICIT NONE
@@ -75,4 +78,5 @@
       INTEGER  , OPTIONAL, INTENT(IN) :: compression_level
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str
       LOGICAL  , OPTIONAL, INTENT(IN) :: cyclic
       LOGICAL (KIND=C_BOOL) :: cyclic_tmp
@@ -105,15 +109,16 @@
 
       CALL xios(set_filegroup_attr_hdl_)  &
-      ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format  &
-      , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
-      , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
-      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+      ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+      , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name  &
+      , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name  &
+       )
 
   END SUBROUTINE xios(set_filegroup_attr_hdl)
 
   SUBROUTINE xios(set_filegroup_attr_hdl_)   &
-    ( filegroup_hdl, append_, compression_level_, convention_, cyclic_, description_, enabled_, format_  &
-    , group_ref_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_  &
-    , record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_  &
+    ( filegroup_hdl, append_, compression_level_, convention_, convention_str_, cyclic_, description_  &
+    , enabled_, format_, group_ref_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_  &
+    , par_access_, record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_  &
     , time_stamp_format_, time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_  &
     , uuid_name_ )
@@ -125,4 +130,5 @@
       INTEGER  , OPTIONAL, INTENT(IN) :: compression_level_
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_
+      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: convention_str_
       LOGICAL  , OPTIONAL, INTENT(IN) :: cyclic_
       LOGICAL (KIND=C_BOOL) :: cyclic__tmp
@@ -170,4 +176,9 @@
       ENDIF
 
+      IF (PRESENT(convention_str_)) THEN
+        CALL cxios_set_filegroup_convention_str &
+      (filegroup_hdl%daddr, convention_str_, len(convention_str_))
+      ENDIF
+
       IF (PRESENT(cyclic_)) THEN
         cyclic__tmp = cyclic_
@@ -305,7 +316,7 @@
 
   SUBROUTINE xios(get_filegroup_attr)  &
-    ( filegroup_id, append, compression_level, convention, cyclic, description, enabled, format  &
-    , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
-    , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+    ( filegroup_id, append, compression_level, convention, convention_str, cyclic, description, enabled  &
+    , format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access  &
+    , record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
     , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
 
@@ -317,4 +328,5 @@
       INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str
       LOGICAL  , OPTIONAL, INTENT(OUT) :: cyclic
       LOGICAL (KIND=C_BOOL) :: cyclic_tmp
@@ -349,16 +361,18 @@
       (filegroup_id,filegroup_hdl)
       CALL xios(get_filegroup_attr_hdl_)   &
-      ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format  &
-      , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
-      , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
-      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+      ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+      , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name  &
+      , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name  &
+       )
 
   END SUBROUTINE xios(get_filegroup_attr)
 
   SUBROUTINE xios(get_filegroup_attr_hdl)  &
-    ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format  &
-    , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
-    , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
-    , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+    ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description  &
+    , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+    , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name  &
+    , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name  &
+     )
 
     IMPLICIT NONE
@@ -368,4 +382,5 @@
       INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str
       LOGICAL  , OPTIONAL, INTENT(OUT) :: cyclic
       LOGICAL (KIND=C_BOOL) :: cyclic_tmp
@@ -398,15 +413,16 @@
 
       CALL xios(get_filegroup_attr_hdl_)  &
-      ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format  &
-      , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
-      , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
-      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+      ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+      , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name  &
+      , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name  &
+       )
 
   END SUBROUTINE xios(get_filegroup_attr_hdl)
 
   SUBROUTINE xios(get_filegroup_attr_hdl_)   &
-    ( filegroup_hdl, append_, compression_level_, convention_, cyclic_, description_, enabled_, format_  &
-    , group_ref_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_  &
-    , record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_  &
+    ( filegroup_hdl, append_, compression_level_, convention_, convention_str_, cyclic_, description_  &
+    , enabled_, format_, group_ref_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_  &
+    , par_access_, record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_  &
     , time_stamp_format_, time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_  &
     , uuid_name_ )
@@ -418,4 +434,5 @@
       INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level_
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_
+      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: convention_str_
       LOGICAL  , OPTIONAL, INTENT(OUT) :: cyclic_
       LOGICAL (KIND=C_BOOL) :: cyclic__tmp
@@ -463,4 +480,9 @@
       ENDIF
 
+      IF (PRESENT(convention_str_)) THEN
+        CALL cxios_get_filegroup_convention_str &
+      (filegroup_hdl%daddr, convention_str_, len(convention_str_))
+      ENDIF
+
       IF (PRESENT(cyclic_)) THEN
         CALL cxios_get_filegroup_cyclic &
@@ -598,7 +620,7 @@
 
   SUBROUTINE xios(is_defined_filegroup_attr)  &
-    ( filegroup_id, append, compression_level, convention, cyclic, description, enabled, format  &
-    , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
-    , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
+    ( filegroup_id, append, compression_level, convention, convention_str, cyclic, description, enabled  &
+    , format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access  &
+    , record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
     , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
 
@@ -612,4 +634,6 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: convention
       LOGICAL(KIND=C_BOOL) :: convention_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str
+      LOGICAL(KIND=C_BOOL) :: convention_str_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic
       LOGICAL(KIND=C_BOOL) :: cyclic_tmp
@@ -668,16 +692,18 @@
       (filegroup_id,filegroup_hdl)
       CALL xios(is_defined_filegroup_attr_hdl_)   &
-      ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format  &
-      , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
-      , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
-      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+      ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+      , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name  &
+      , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name  &
+       )
 
   END SUBROUTINE xios(is_defined_filegroup_attr)
 
   SUBROUTINE xios(is_defined_filegroup_attr_hdl)  &
-    ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format  &
-    , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
-    , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
-    , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+    ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description  &
+    , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+    , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name  &
+    , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name  &
+     )
 
     IMPLICIT NONE
@@ -689,4 +715,6 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: convention
       LOGICAL(KIND=C_BOOL) :: convention_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str
+      LOGICAL(KIND=C_BOOL) :: convention_str_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic
       LOGICAL(KIND=C_BOOL) :: cyclic_tmp
@@ -743,15 +771,16 @@
 
       CALL xios(is_defined_filegroup_attr_hdl_)  &
-      ( filegroup_hdl, append, compression_level, convention, cyclic, description, enabled, format  &
-      , group_ref, min_digits, mode, name, name_suffix, output_freq, output_level, par_access, record_offset  &
-      , split_freq, split_freq_format, sync_freq, time_counter, time_counter_name, time_stamp_format  &
-      , time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name )
+      ( filegroup_hdl, append, compression_level, convention, convention_str, cyclic, description  &
+      , enabled, format, group_ref, min_digits, mode, name, name_suffix, output_freq, output_level  &
+      , par_access, record_offset, split_freq, split_freq_format, sync_freq, time_counter, time_counter_name  &
+      , time_stamp_format, time_stamp_name, time_units, timeseries, ts_prefix, type, uuid_format, uuid_name  &
+       )
 
   END SUBROUTINE xios(is_defined_filegroup_attr_hdl)
 
   SUBROUTINE xios(is_defined_filegroup_attr_hdl_)   &
-    ( filegroup_hdl, append_, compression_level_, convention_, cyclic_, description_, enabled_, format_  &
-    , group_ref_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_, par_access_  &
-    , record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_  &
+    ( filegroup_hdl, append_, compression_level_, convention_, convention_str_, cyclic_, description_  &
+    , enabled_, format_, group_ref_, min_digits_, mode_, name_, name_suffix_, output_freq_, output_level_  &
+    , par_access_, record_offset_, split_freq_, split_freq_format_, sync_freq_, time_counter_, time_counter_name_  &
     , time_stamp_format_, time_stamp_name_, time_units_, timeseries_, ts_prefix_, type_, uuid_format_  &
     , uuid_name_ )
@@ -765,4 +794,6 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: convention_
       LOGICAL(KIND=C_BOOL) :: convention__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: convention_str_
+      LOGICAL(KIND=C_BOOL) :: convention_str__tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: cyclic_
       LOGICAL(KIND=C_BOOL) :: cyclic__tmp
@@ -836,4 +867,10 @@
       ENDIF
 
+      IF (PRESENT(convention_str_)) THEN
+        convention_str__tmp = cxios_is_defined_filegroup_convention_str &
+      (filegroup_hdl%daddr)
+        convention_str_ = convention_str__tmp
+      ENDIF
+
       IF (PRESENT(cyclic_)) THEN
         cyclic__tmp = cxios_is_defined_filegroup_cyclic &
Index: /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/iinterpolate_domain_attr.F90
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/iinterpolate_domain_attr.F90	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/iinterpolate_domain_attr.F90	(revision 1205)
@@ -12,5 +12,5 @@
 
   SUBROUTINE xios(set_interpolate_domain_attr)  &
-    ( interpolate_domain_id, mode, order, renormalize, weight_filename, write_weight )
+    ( interpolate_domain_id, mode, order, quantity, renormalize, weight_filename, write_weight )
 
     IMPLICIT NONE
@@ -19,4 +19,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode
       INTEGER  , OPTIONAL, INTENT(IN) :: order
+      LOGICAL  , OPTIONAL, INTENT(IN) :: quantity
+      LOGICAL (KIND=C_BOOL) :: quantity_tmp
       LOGICAL  , OPTIONAL, INTENT(IN) :: renormalize
       LOGICAL (KIND=C_BOOL) :: renormalize_tmp
@@ -28,10 +30,12 @@
       (interpolate_domain_id,interpolate_domain_hdl)
       CALL xios(set_interpolate_domain_attr_hdl_)   &
-      ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight )
+      ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight  &
+       )
 
   END SUBROUTINE xios(set_interpolate_domain_attr)
 
   SUBROUTINE xios(set_interpolate_domain_attr_hdl)  &
-    ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight )
+    ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight  &
+     )
 
     IMPLICIT NONE
@@ -39,4 +43,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode
       INTEGER  , OPTIONAL, INTENT(IN) :: order
+      LOGICAL  , OPTIONAL, INTENT(IN) :: quantity
+      LOGICAL (KIND=C_BOOL) :: quantity_tmp
       LOGICAL  , OPTIONAL, INTENT(IN) :: renormalize
       LOGICAL (KIND=C_BOOL) :: renormalize_tmp
@@ -46,10 +52,12 @@
 
       CALL xios(set_interpolate_domain_attr_hdl_)  &
-      ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight )
+      ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight  &
+       )
 
   END SUBROUTINE xios(set_interpolate_domain_attr_hdl)
 
   SUBROUTINE xios(set_interpolate_domain_attr_hdl_)   &
-    ( interpolate_domain_hdl, mode_, order_, renormalize_, weight_filename_, write_weight_ )
+    ( interpolate_domain_hdl, mode_, order_, quantity_, renormalize_, weight_filename_, write_weight_  &
+     )
 
     IMPLICIT NONE
@@ -57,4 +65,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode_
       INTEGER  , OPTIONAL, INTENT(IN) :: order_
+      LOGICAL  , OPTIONAL, INTENT(IN) :: quantity_
+      LOGICAL (KIND=C_BOOL) :: quantity__tmp
       LOGICAL  , OPTIONAL, INTENT(IN) :: renormalize_
       LOGICAL (KIND=C_BOOL) :: renormalize__tmp
@@ -73,4 +83,10 @@
       ENDIF
 
+      IF (PRESENT(quantity_)) THEN
+        quantity__tmp = quantity_
+        CALL cxios_set_interpolate_domain_quantity &
+      (interpolate_domain_hdl%daddr, quantity__tmp)
+      ENDIF
+
       IF (PRESENT(renormalize_)) THEN
         renormalize__tmp = renormalize_
@@ -93,5 +109,5 @@
 
   SUBROUTINE xios(get_interpolate_domain_attr)  &
-    ( interpolate_domain_id, mode, order, renormalize, weight_filename, write_weight )
+    ( interpolate_domain_id, mode, order, quantity, renormalize, weight_filename, write_weight )
 
     IMPLICIT NONE
@@ -100,4 +116,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode
       INTEGER  , OPTIONAL, INTENT(OUT) :: order
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: quantity
+      LOGICAL (KIND=C_BOOL) :: quantity_tmp
       LOGICAL  , OPTIONAL, INTENT(OUT) :: renormalize
       LOGICAL (KIND=C_BOOL) :: renormalize_tmp
@@ -109,10 +127,12 @@
       (interpolate_domain_id,interpolate_domain_hdl)
       CALL xios(get_interpolate_domain_attr_hdl_)   &
-      ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight )
+      ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight  &
+       )
 
   END SUBROUTINE xios(get_interpolate_domain_attr)
 
   SUBROUTINE xios(get_interpolate_domain_attr_hdl)  &
-    ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight )
+    ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight  &
+     )
 
     IMPLICIT NONE
@@ -120,4 +140,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode
       INTEGER  , OPTIONAL, INTENT(OUT) :: order
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: quantity
+      LOGICAL (KIND=C_BOOL) :: quantity_tmp
       LOGICAL  , OPTIONAL, INTENT(OUT) :: renormalize
       LOGICAL (KIND=C_BOOL) :: renormalize_tmp
@@ -127,10 +149,12 @@
 
       CALL xios(get_interpolate_domain_attr_hdl_)  &
-      ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight )
+      ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight  &
+       )
 
   END SUBROUTINE xios(get_interpolate_domain_attr_hdl)
 
   SUBROUTINE xios(get_interpolate_domain_attr_hdl_)   &
-    ( interpolate_domain_hdl, mode_, order_, renormalize_, weight_filename_, write_weight_ )
+    ( interpolate_domain_hdl, mode_, order_, quantity_, renormalize_, weight_filename_, write_weight_  &
+     )
 
     IMPLICIT NONE
@@ -138,4 +162,6 @@
       CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode_
       INTEGER  , OPTIONAL, INTENT(OUT) :: order_
+      LOGICAL  , OPTIONAL, INTENT(OUT) :: quantity_
+      LOGICAL (KIND=C_BOOL) :: quantity__tmp
       LOGICAL  , OPTIONAL, INTENT(OUT) :: renormalize_
       LOGICAL (KIND=C_BOOL) :: renormalize__tmp
@@ -154,4 +180,10 @@
       ENDIF
 
+      IF (PRESENT(quantity_)) THEN
+        CALL cxios_get_interpolate_domain_quantity &
+      (interpolate_domain_hdl%daddr, quantity__tmp)
+        quantity_ = quantity__tmp
+      ENDIF
+
       IF (PRESENT(renormalize_)) THEN
         CALL cxios_get_interpolate_domain_renormalize &
@@ -174,5 +206,5 @@
 
   SUBROUTINE xios(is_defined_interpolate_domain_attr)  &
-    ( interpolate_domain_id, mode, order, renormalize, weight_filename, write_weight )
+    ( interpolate_domain_id, mode, order, quantity, renormalize, weight_filename, write_weight )
 
     IMPLICIT NONE
@@ -183,4 +215,6 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: order
       LOGICAL(KIND=C_BOOL) :: order_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: quantity
+      LOGICAL(KIND=C_BOOL) :: quantity_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: renormalize
       LOGICAL(KIND=C_BOOL) :: renormalize_tmp
@@ -193,10 +227,12 @@
       (interpolate_domain_id,interpolate_domain_hdl)
       CALL xios(is_defined_interpolate_domain_attr_hdl_)   &
-      ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight )
+      ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight  &
+       )
 
   END SUBROUTINE xios(is_defined_interpolate_domain_attr)
 
   SUBROUTINE xios(is_defined_interpolate_domain_attr_hdl)  &
-    ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight )
+    ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight  &
+     )
 
     IMPLICIT NONE
@@ -206,4 +242,6 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: order
       LOGICAL(KIND=C_BOOL) :: order_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: quantity
+      LOGICAL(KIND=C_BOOL) :: quantity_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: renormalize
       LOGICAL(KIND=C_BOOL) :: renormalize_tmp
@@ -214,10 +252,12 @@
 
       CALL xios(is_defined_interpolate_domain_attr_hdl_)  &
-      ( interpolate_domain_hdl, mode, order, renormalize, weight_filename, write_weight )
+      ( interpolate_domain_hdl, mode, order, quantity, renormalize, weight_filename, write_weight  &
+       )
 
   END SUBROUTINE xios(is_defined_interpolate_domain_attr_hdl)
 
   SUBROUTINE xios(is_defined_interpolate_domain_attr_hdl_)   &
-    ( interpolate_domain_hdl, mode_, order_, renormalize_, weight_filename_, write_weight_ )
+    ( interpolate_domain_hdl, mode_, order_, quantity_, renormalize_, weight_filename_, write_weight_  &
+     )
 
     IMPLICIT NONE
@@ -227,4 +267,6 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: order_
       LOGICAL(KIND=C_BOOL) :: order__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: quantity_
+      LOGICAL(KIND=C_BOOL) :: quantity__tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: renormalize_
       LOGICAL(KIND=C_BOOL) :: renormalize__tmp
@@ -246,4 +288,10 @@
       ENDIF
 
+      IF (PRESENT(quantity_)) THEN
+        quantity__tmp = cxios_is_defined_interpolate_domain_quantity &
+      (interpolate_domain_hdl%daddr)
+        quantity_ = quantity__tmp
+      ENDIF
+
       IF (PRESENT(renormalize_)) THEN
         renormalize__tmp = cxios_is_defined_interpolate_domain_renormalize &
Index: /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/interpolate_domain_interface_attr.F90
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/interpolate_domain_interface_attr.F90	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/interpolate_domain_interface_attr.F90	(revision 1205)
@@ -48,4 +48,23 @@
       INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
     END FUNCTION cxios_is_defined_interpolate_domain_order
+
+
+    SUBROUTINE cxios_set_interpolate_domain_quantity(interpolate_domain_hdl, quantity) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      LOGICAL (KIND=C_BOOL)      , VALUE :: quantity
+    END SUBROUTINE cxios_set_interpolate_domain_quantity
+
+    SUBROUTINE cxios_get_interpolate_domain_quantity(interpolate_domain_hdl, quantity) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+      LOGICAL (KIND=C_BOOL)             :: quantity
+    END SUBROUTINE cxios_get_interpolate_domain_quantity
+
+    FUNCTION cxios_is_defined_interpolate_domain_quantity(interpolate_domain_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_interpolate_domain_quantity
+      INTEGER (kind = C_INTPTR_T), VALUE :: interpolate_domain_hdl
+    END FUNCTION cxios_is_defined_interpolate_domain_quantity
 
 
Index: /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/izoom_axis_attr.F90
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/izoom_axis_attr.F90	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/izoom_axis_attr.F90	(revision 1205)
@@ -12,5 +12,5 @@
 
   SUBROUTINE xios(set_zoom_axis_attr)  &
-    ( zoom_axis_id, begin, n )
+    ( zoom_axis_id, begin, index, n )
 
     IMPLICIT NONE
@@ -18,4 +18,5 @@
       CHARACTER(LEN=*), INTENT(IN) ::zoom_axis_id
       INTEGER  , OPTIONAL, INTENT(IN) :: begin
+      INTEGER  , OPTIONAL, INTENT(IN) :: index(:)
       INTEGER  , OPTIONAL, INTENT(IN) :: n
 
@@ -23,27 +24,29 @@
       (zoom_axis_id,zoom_axis_hdl)
       CALL xios(set_zoom_axis_attr_hdl_)   &
-      ( zoom_axis_hdl, begin, n )
+      ( zoom_axis_hdl, begin, index, n )
 
   END SUBROUTINE xios(set_zoom_axis_attr)
 
   SUBROUTINE xios(set_zoom_axis_attr_hdl)  &
-    ( zoom_axis_hdl, begin, n )
+    ( zoom_axis_hdl, begin, index, n )
 
     IMPLICIT NONE
       TYPE(txios(zoom_axis)) , INTENT(IN) :: zoom_axis_hdl
       INTEGER  , OPTIONAL, INTENT(IN) :: begin
+      INTEGER  , OPTIONAL, INTENT(IN) :: index(:)
       INTEGER  , OPTIONAL, INTENT(IN) :: n
 
       CALL xios(set_zoom_axis_attr_hdl_)  &
-      ( zoom_axis_hdl, begin, n )
+      ( zoom_axis_hdl, begin, index, n )
 
   END SUBROUTINE xios(set_zoom_axis_attr_hdl)
 
   SUBROUTINE xios(set_zoom_axis_attr_hdl_)   &
-    ( zoom_axis_hdl, begin_, n_ )
+    ( zoom_axis_hdl, begin_, index_, n_ )
 
     IMPLICIT NONE
       TYPE(txios(zoom_axis)) , INTENT(IN) :: zoom_axis_hdl
       INTEGER  , OPTIONAL, INTENT(IN) :: begin_
+      INTEGER  , OPTIONAL, INTENT(IN) :: index_(:)
       INTEGER  , OPTIONAL, INTENT(IN) :: n_
 
@@ -51,4 +54,9 @@
         CALL cxios_set_zoom_axis_begin &
       (zoom_axis_hdl%daddr, begin_)
+      ENDIF
+
+      IF (PRESENT(index_)) THEN
+        CALL cxios_set_zoom_axis_index &
+      (zoom_axis_hdl%daddr, index_, SHAPE(index_))
       ENDIF
 
@@ -61,5 +69,5 @@
 
   SUBROUTINE xios(get_zoom_axis_attr)  &
-    ( zoom_axis_id, begin, n )
+    ( zoom_axis_id, begin, index, n )
 
     IMPLICIT NONE
@@ -67,4 +75,5 @@
       CHARACTER(LEN=*), INTENT(IN) ::zoom_axis_id
       INTEGER  , OPTIONAL, INTENT(OUT) :: begin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: index(:)
       INTEGER  , OPTIONAL, INTENT(OUT) :: n
 
@@ -72,27 +81,29 @@
       (zoom_axis_id,zoom_axis_hdl)
       CALL xios(get_zoom_axis_attr_hdl_)   &
-      ( zoom_axis_hdl, begin, n )
+      ( zoom_axis_hdl, begin, index, n )
 
   END SUBROUTINE xios(get_zoom_axis_attr)
 
   SUBROUTINE xios(get_zoom_axis_attr_hdl)  &
-    ( zoom_axis_hdl, begin, n )
+    ( zoom_axis_hdl, begin, index, n )
 
     IMPLICIT NONE
       TYPE(txios(zoom_axis)) , INTENT(IN) :: zoom_axis_hdl
       INTEGER  , OPTIONAL, INTENT(OUT) :: begin
+      INTEGER  , OPTIONAL, INTENT(OUT) :: index(:)
       INTEGER  , OPTIONAL, INTENT(OUT) :: n
 
       CALL xios(get_zoom_axis_attr_hdl_)  &
-      ( zoom_axis_hdl, begin, n )
+      ( zoom_axis_hdl, begin, index, n )
 
   END SUBROUTINE xios(get_zoom_axis_attr_hdl)
 
   SUBROUTINE xios(get_zoom_axis_attr_hdl_)   &
-    ( zoom_axis_hdl, begin_, n_ )
+    ( zoom_axis_hdl, begin_, index_, n_ )
 
     IMPLICIT NONE
       TYPE(txios(zoom_axis)) , INTENT(IN) :: zoom_axis_hdl
       INTEGER  , OPTIONAL, INTENT(OUT) :: begin_
+      INTEGER  , OPTIONAL, INTENT(OUT) :: index_(:)
       INTEGER  , OPTIONAL, INTENT(OUT) :: n_
 
@@ -100,4 +111,9 @@
         CALL cxios_get_zoom_axis_begin &
       (zoom_axis_hdl%daddr, begin_)
+      ENDIF
+
+      IF (PRESENT(index_)) THEN
+        CALL cxios_get_zoom_axis_index &
+      (zoom_axis_hdl%daddr, index_, SHAPE(index_))
       ENDIF
 
@@ -110,5 +126,5 @@
 
   SUBROUTINE xios(is_defined_zoom_axis_attr)  &
-    ( zoom_axis_id, begin, n )
+    ( zoom_axis_id, begin, index, n )
 
     IMPLICIT NONE
@@ -117,4 +133,6 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: begin
       LOGICAL(KIND=C_BOOL) :: begin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: index
+      LOGICAL(KIND=C_BOOL) :: index_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: n
       LOGICAL(KIND=C_BOOL) :: n_tmp
@@ -123,10 +141,10 @@
       (zoom_axis_id,zoom_axis_hdl)
       CALL xios(is_defined_zoom_axis_attr_hdl_)   &
-      ( zoom_axis_hdl, begin, n )
+      ( zoom_axis_hdl, begin, index, n )
 
   END SUBROUTINE xios(is_defined_zoom_axis_attr)
 
   SUBROUTINE xios(is_defined_zoom_axis_attr_hdl)  &
-    ( zoom_axis_hdl, begin, n )
+    ( zoom_axis_hdl, begin, index, n )
 
     IMPLICIT NONE
@@ -134,14 +152,16 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: begin
       LOGICAL(KIND=C_BOOL) :: begin_tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: index
+      LOGICAL(KIND=C_BOOL) :: index_tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: n
       LOGICAL(KIND=C_BOOL) :: n_tmp
 
       CALL xios(is_defined_zoom_axis_attr_hdl_)  &
-      ( zoom_axis_hdl, begin, n )
+      ( zoom_axis_hdl, begin, index, n )
 
   END SUBROUTINE xios(is_defined_zoom_axis_attr_hdl)
 
   SUBROUTINE xios(is_defined_zoom_axis_attr_hdl_)   &
-    ( zoom_axis_hdl, begin_, n_ )
+    ( zoom_axis_hdl, begin_, index_, n_ )
 
     IMPLICIT NONE
@@ -149,4 +169,6 @@
       LOGICAL, OPTIONAL, INTENT(OUT) :: begin_
       LOGICAL(KIND=C_BOOL) :: begin__tmp
+      LOGICAL, OPTIONAL, INTENT(OUT) :: index_
+      LOGICAL(KIND=C_BOOL) :: index__tmp
       LOGICAL, OPTIONAL, INTENT(OUT) :: n_
       LOGICAL(KIND=C_BOOL) :: n__tmp
@@ -156,4 +178,10 @@
       (zoom_axis_hdl%daddr)
         begin_ = begin__tmp
+      ENDIF
+
+      IF (PRESENT(index_)) THEN
+        index__tmp = cxios_is_defined_zoom_axis_index &
+      (zoom_axis_hdl%daddr)
+        index_ = index__tmp
       ENDIF
 
Index: /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/zoom_axis_interface_attr.F90
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/zoom_axis_interface_attr.F90	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/interface/fortran_attr/zoom_axis_interface_attr.F90	(revision 1205)
@@ -29,4 +29,25 @@
 
 
+    SUBROUTINE cxios_set_zoom_axis_index(zoom_axis_hdl, index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: zoom_axis_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_set_zoom_axis_index
+
+    SUBROUTINE cxios_get_zoom_axis_index(zoom_axis_hdl, index, extent) BIND(C)
+      USE ISO_C_BINDING
+      INTEGER (kind = C_INTPTR_T), VALUE       :: zoom_axis_hdl
+      INTEGER (KIND=C_INT)     , DIMENSION(*) :: index
+      INTEGER (kind = C_INT), DIMENSION(*)     :: extent
+    END SUBROUTINE cxios_get_zoom_axis_index
+
+    FUNCTION cxios_is_defined_zoom_axis_index(zoom_axis_hdl) BIND(C)
+      USE ISO_C_BINDING
+      LOGICAL(kind=C_BOOL) :: cxios_is_defined_zoom_axis_index
+      INTEGER (kind = C_INTPTR_T), VALUE :: zoom_axis_hdl
+    END FUNCTION cxios_is_defined_zoom_axis_index
+
+
     SUBROUTINE cxios_set_zoom_axis_n(zoom_axis_hdl, n) BIND(C)
       USE ISO_C_BINDING
Index: /XIOS/dev/branch_yushan_merged/src/io/nc4_data_output.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/io/nc4_data_output.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/io/nc4_data_output.cpp	(revision 1205)
@@ -11,4 +11,5 @@
 #include "netCdfException.hpp"
 #include "exception.hpp"
+#include "timer.hpp"
 #include "uuid.hpp"
 // mpi.hpp
@@ -79,5 +80,5 @@
 
 
-         StdString dimXid, dimYid ;
+        StdString dimXid, dimYid ;
 
         nc_type typePrec ;
@@ -1045,7 +1046,5 @@
         int zoom_begin_srv = axis->zoom_begin_srv;
         int zoom_size  = (MULTI_FILE == SuperClass::type) ? zoom_size_srv
-                                                              : axis->global_zoom_n;
-        int zoom_begin = (MULTI_FILE == SuperClass::type) ? zoom_begin_srv
-                                                              : axis->global_zoom_begin;
+                                                          : axis->global_zoom_size_srv;
 
         if ((0 == zoom_size_srv) && (MULTI_FILE == SuperClass::type)) return;
@@ -1102,5 +1101,5 @@
 
             SuperClassWriter::definition_end();
-            printf("SuperClass::type = %d, typePrec = %d\n", SuperClass::type, typePrec);
+
             switch (SuperClass::type)
             {
@@ -1126,5 +1125,5 @@
                 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;
+                start[0] = startBounds[0] = zoom_begin_srv-axis->global_zoom_begin_srv;
                 count[0] = countBounds[0] = zoom_size_srv;
                 startBounds[1] = 0;
@@ -1832,17 +1831,19 @@
 
          singleDomain = (file->nbDomains == 1);
+
+         StdString conv_str ;
+         if (file->convention_str.isEmpty())
+         {
+            if (SuperClassWriter::useCFConvention) conv_str="CF-1.6" ;
+            else conv_str="UGRID" ;
+         }
+         else conv_str=file->convention_str ;
+           
          try
          {
-       if (SuperClassWriter::useCFConvention)
-             this->writeFileAttributes(filename, description,
-                                       StdString("CF-1.6"),
-                                       StdString("An IPSL model"),
-                                       this->getTimeStamp());
-           else
-             this->writeFileAttributes(filename, description,
-                                       StdString("UGRID"),
-                                       StdString("An IPSL model"),
-                                       this->getTimeStamp());
-
+           this->writeFileAttributes(filename, description,
+                                      conv_str,
+                                      StdString("An IPSL model"),
+                                      this->getTimeStamp());
 
            if (!appendMode)
@@ -1989,9 +1990,16 @@
         CGrid* grid = field->grid;
 
-        if (field->getNStep()<1) return ;
+        if (field->getNStep()<1) 
+        {
+          return;
+        }
         
         if (!grid->doGridHaveDataToWrite())
-          if (SuperClass::type == MULTI_FILE || !isCollective) return;
-
+          if (SuperClass::type == MULTI_FILE || !isCollective)
+          {
+            return;
+          }
+
+          
         StdString fieldid = field->getFieldOutputName();
 
@@ -2118,17 +2126,25 @@
               case (MULTI_FILE) :
               {
+                 CTimer::get("Files : writing data").resume();
                  SuperClassWriter::writeData(fieldData, fieldid, isCollective, field->getNStep() - 1);
+                 CTimer::get("Files : writing data").suspend();
                  if (wtime)
                  {
+                   CTimer::get("Files : writing time axis").resume();
                    if ( wtimeData)
                    {
-                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1);
-                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1);
-                   }
+//                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1);
+//                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1);
+                       SuperClassWriter::writeTimeAxisData(time_data, timeAxisId, isCollective, field->getNStep() - 1, isRoot);
+                       SuperClassWriter::writeTimeAxisDataBounds(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1, isRoot);
+                  }
                    if (wtimeCounter)
                    {
-                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1);
-                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1);
+//                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1);
+//                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1);
+                     SuperClassWriter::writeTimeAxisData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1,isRoot);
+                     if (timeCounterType!=record) SuperClassWriter::writeTimeAxisDataBounds(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1, isRoot);
                    }
+                   CTimer::get("Files : writing time axis").suspend();
                  }
                  break;
@@ -2256,17 +2272,28 @@
                 }
 
+
+                CTimer::get("Files : writing data").resume();
                 SuperClassWriter::writeData(fieldData, fieldid, isCollective, field->getNStep() - 1, &start, &count);
+                CTimer::get("Files : writing data").suspend();
+
                  if (wtime)
                  {
+                   CTimer::get("Files : writing time axis").resume();
                    if ( wtimeData)
                    {
-                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1);
-                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1);
+//                     SuperClassWriter::writeData(time_data, timeAxisId, isCollective, field->getNStep() - 1);
+//                     SuperClassWriter::writeData(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1);
+                     SuperClassWriter::writeTimeAxisData(time_data, timeAxisId, isCollective, field->getNStep() - 1, isRoot);
+                     SuperClassWriter::writeTimeAxisDataBounds(time_data_bound, timeAxisBoundId, isCollective, field->getNStep() - 1, isRoot);
                    }
                    if (wtimeCounter)
                    {
-                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1);
-                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1);
+//                     SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1);
+//                     if (timeCounterType!=record) SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1);
+                     SuperClassWriter::writeTimeAxisData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1,isRoot);
+                     if (timeCounterType!=record) SuperClassWriter::writeTimeAxisDataBounds(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1, isRoot);
+
                    }
+                   CTimer::get("Files : writing time axis").suspend();  
                  }
 
Index: /XIOS/dev/branch_yushan_merged/src/io/onetcdf4.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/io/onetcdf4.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/io/onetcdf4.cpp	(revision 1205)
@@ -6,5 +6,5 @@
 #include "netCdfInterface.hpp"
 #include "netCdfException.hpp"
-// mpi_std.hpp
+#include "timer.hpp"
 
 namespace xios
@@ -54,9 +54,11 @@
          if (!append || !std::ifstream(filename.c_str()))
          {
+            CTimer::get("Files : create").resume();
             if (wmpi)
                CNetCdfInterface::createPar(filename, mode, *comm, MPI_INFO_NULL_STD, this->ncidp);
             else
                CNetCdfInterface::create(filename, mode, this->ncidp);
-
+            CTimer::get("Files : create").suspend();
+ 
             this->appendMode = false;
          }
@@ -64,10 +66,10 @@
          {
             mode |= NC_WRITE;
+            CTimer::get("Files : open").resume();
             if (wmpi)
-               //CNetCdfInterface::openPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), MPI_INFO_NULL_STD, this->ncidp);
                CNetCdfInterface::openPar(filename, mode, *comm, MPI_INFO_NULL_STD, this->ncidp);
             else
                CNetCdfInterface::open(filename, mode, this->ncidp);
-
+            CTimer::get("Files : open").suspend();
             this->appendMode = true;
          }
@@ -83,5 +85,7 @@
       void CONetCDF4::close()
       {
+        CTimer::get("Files : close").resume();
         CNetCdfInterface::close(this->ncidp);
+        CTimer::get("Files : close").suspend();
       }
 
@@ -558,5 +562,7 @@
 
          this->getWriteDataInfos(name, 0, array_size,  sstart, scount, NULL, NULL);
+
          this->writeData_(grpid, varid, sstart, scount, data.dataFirst());
+
       }
 
@@ -584,15 +590,34 @@
 
          this->getWriteDataInfos(name, record, array_size,  sstart, scount, NULL, NULL);
-         if (using_netcdf_internal)
-         {
-           if (!isRoot)
-           {
-             sstart[0] = sstart[0] + 1;
-             scount[0] = 0;
-           }
-         }
          this->writeData_(grpid, varid, sstart, scount, data.dataFirst());
        }
 
+      void CONetCDF4::writeTimeAxisDataBounds(const CArray<double, 1>& data, const StdString& name,
+                                        bool collective, StdSize record, bool isRoot)
+      {
+         int grpid = this->getCurrentGroup();
+         int varid = this->getVariable(name);
+
+         map<int,size_t>::iterator it=timeAxis.find(varid);
+         if (it == timeAxis.end()) timeAxis[varid] = record;
+         else
+         {
+           if (it->second >= record) return;
+           else it->second =record;
+         }
+
+         StdSize array_size = 1;
+         std::vector<StdSize> sstart, scount;
+
+         if (this->wmpi && collective)
+            CNetCdfInterface::varParAccess(grpid, varid, NC_COLLECTIVE);
+         if (this->wmpi && !collective)
+            CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT);
+
+         this->getWriteDataInfos(name, record, array_size,  sstart, scount, NULL, NULL);
+         this->writeData_(grpid, varid, sstart, scount, data.dataFirst());
+       }
+
+
       //---------------------------------------------------------------
 
Index: /XIOS/dev/branch_yushan_merged/src/io/onetcdf4.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/io/onetcdf4.hpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/io/onetcdf4.hpp	(revision 1205)
@@ -73,4 +73,6 @@
             void writeTimeAxisData(const CArray<double,1>& data, const StdString& name,
                                    bool collective, StdSize record, bool Isroot);
+            void writeTimeAxisDataBounds(const CArray<double,1>& data, const StdString& name,
+                                   bool collective, StdSize record, bool Isroot);
             /// Accesseur ///
             const CONetCDF4Path& getCurrentPath(void) const;
Index: /XIOS/dev/branch_yushan_merged/src/io/onetcdf4_impl.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/io/onetcdf4_impl.hpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/io/onetcdf4_impl.hpp	(revision 1205)
@@ -25,6 +25,9 @@
     CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT);
 
+    CTimer::get("Files : get data infos").resume();
     this->getWriteDataInfos
     (name, record, array_size,  sstart, scount, start, count);
+    CTimer::get("Files : get data infos").suspend();
+
     if (data.numElements() != array_size)
     {
@@ -54,6 +57,8 @@
     CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT);
 
-    this->getWriteDataInfos
-    (name, record, array_size,  sstart, scount, start, count);
+    CTimer::get("CONetCDF4::writeData getWriteDataInfos").resume();
+    this->getWriteDataInfos(name, record, array_size,  sstart, scount, start, count);
+    CTimer::get("CONetCDF4::writeData getWriteDataInfos").suspend();
+ 
     if (data.numElements()*stringArrayLen != array_size)
     {
@@ -72,5 +77,7 @@
       PtrArrayStr[it->size()]='\0' ;
     }
+    CTimer::get("CONetCDF4::writeData writeData_").resume();
     this->writeData_(grpid, varid, sstart, scount, ArrayStr);
+    CTimer::get("CONetCDF4::writeData writeData_").suspend();
     delete [] ArrayStr ;
   }
Index: /XIOS/dev/branch_yushan_merged/src/memtrack.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/memtrack.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/memtrack.cpp	(revision 1205)
@@ -52,4 +52,7 @@
 {
   void addr2line(const char *file_name, char** addr, int naddr) ;
+#ifdef XIOS_MEMTRACK_LIGHT
+  void addr2line(const char *file_name, char** addr, int naddr) {} 
+#endif
 }
 /* ------------------------------------------------------------ */
@@ -59,4 +62,9 @@
 namespace MemTrack
 {
+    size_t currentMemorySize=0 ;
+    size_t maxMemorySize=0 ; 
+
+    size_t getCurrentMemorySize(void) {return currentMemorySize; }
+    size_t getMaxMemorySize(void) {return maxMemorySize ; }
 
     /* ------------------------------------------------------------ */
@@ -376,4 +384,7 @@
         // Get the offset to the user chunk and return it.
         UserChunk *pUser = GetUserAddress(pProlog);
+
+        currentMemorySize += size ;
+        if (currentMemorySize>maxMemorySize) maxMemorySize=currentMemorySize ;
         
         return pUser;
@@ -401,4 +412,5 @@
         // Unlink the block header from the list and destroy it.
         BlockHeader *pBlockHeader = GetHeaderAddress(pProlog);
+        currentMemorySize-=pBlockHeader->GetRequestedSize();
         BlockHeader::RemoveNode(pBlockHeader);
         pBlockHeader->~BlockHeader();
Index: /XIOS/dev/branch_yushan_merged/src/memtrack.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/memtrack.hpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/memtrack.hpp	(revision 1205)
@@ -61,5 +61,6 @@
     void TrackDumpBlocks();
     void TrackListMemoryUsage();
-
+    size_t getCurrentMemorySize(void) ;
+    size_t getMaxMemorySize(void) ;
     /* ---------------------------------------- operator * (MemStamp, ptr) */
 
Index: /XIOS/dev/branch_yushan_merged/src/node/axis.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/node/axis.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/node/axis.cpp	(revision 1205)
@@ -367,4 +367,9 @@
     // We don't check if the mask is valid here, just if a mask has been defined at this point.
     isCompressible_ = !mask.isEmpty();
+  }
+
+  bool CAxis::zoomByIndex()
+  {
+    return (!global_zoom_index.isEmpty() && (0 != global_zoom_index.numElements()));
   }
 
@@ -463,20 +468,35 @@
     size_t nZoomCount = 0;
     size_t nbIndex = index.numElements();
-    for (size_t idx = 0; idx < nbIndex; ++idx)
+
+    int end = (0 == n) ? begin : begin + n - 1;
+    int zoom_size = zoomByIndex() ? global_zoom_index.numElements() : global_zoom_n;
+    int minInd = min(index);
+    int maxInd = max(index);
+    for (size_t idx = 0; idx < zoom_size; ++idx)
+    {
+      size_t globalZoomIndex = zoomByIndex() ? global_zoom_index(idx) : global_zoom_begin + idx;
+      if (globalZoomIndex >= minInd && globalZoomIndex <= maxInd) ++nZoomCount;
+    }
+
+/*    for (size_t idx = 0; idx < nbIndex; ++idx)
     {
       size_t globalIndex = index(idx);
       if (globalIndex >= global_zoom_begin && globalIndex <= zoom_end) ++nZoomCount;
-    }
-
+    }*/
+    
     CArray<size_t,1> globalIndexAxis(nbIndex);
+    for (size_t idx = 0; idx < nbIndex; ++idx)
+    {      
+      globalIndexAxis(idx) = (size_t)index(idx);
+    }
+
     std::vector<size_t> globalAxisZoom(nZoomCount);
     nZoomCount = 0;
-    for (size_t idx = 0; idx < nbIndex; ++idx)
-    {
-      size_t globalIndex = index(idx);
-      globalIndexAxis(idx) = globalIndex;
-      if (globalIndex >= global_zoom_begin && globalIndex <= zoom_end)
-      {
-        globalAxisZoom[nZoomCount] = globalIndex;
+    for (size_t idx = 0; idx < zoom_size; ++idx)
+    {
+      size_t globalZoomIndex = zoomByIndex() ? global_zoom_index(idx) : global_zoom_begin + idx;
+      if (globalZoomIndex >= minInd && globalZoomIndex <= maxInd)
+      {
+        globalAxisZoom[nZoomCount] = globalZoomIndex;
         ++nZoomCount;
       }
@@ -598,8 +618,16 @@
     int zoom_end = global_zoom_begin + global_zoom_n - 1;
     int nb = 0;
-    for (size_t idx = 0; idx < n; ++idx)
+/*    for (size_t idx = 0; idx < n; ++idx)
     {
       size_t globalIndex = begin + idx;
       if (globalIndex >= global_zoom_begin && globalIndex <= zoom_end) ++nb;
+    }*/
+
+    int end = (0 == n) ? begin : begin + n - 1;
+    int zoom_size = zoomByIndex() ? global_zoom_index.numElements() : global_zoom_n;
+    for (size_t idx = 0; idx < zoom_size; ++idx)
+    {
+      size_t globalZoomIndex = zoomByIndex() ? global_zoom_index(idx) : global_zoom_begin + idx;
+      if (globalZoomIndex >= begin && globalZoomIndex <= end) ++nb;
     }
 
@@ -622,5 +650,5 @@
     CArray<double,1> val(nb);
     nb = 0;
-    for (size_t idx = 0; idx < n; ++idx)
+/*    for (size_t idx = 0; idx < n; ++idx)
     {
       size_t globalIndex = begin + idx;
@@ -628,4 +656,14 @@
       {
         val(nb) = value(idx);
+        ++nb;
+      }
+    }*/
+
+    for (size_t idx = 0; idx < zoom_size; ++idx)
+    {
+      size_t globalZoomIndex = zoomByIndex() ? global_zoom_index(idx) : global_zoom_begin + idx;
+      if (globalZoomIndex >= begin && globalZoomIndex <= end)
+      {
+        val(nb) = value(globalZoomIndex-begin);
         ++nb;
       }
@@ -933,4 +971,5 @@
         const int ni    = serverDimensionSizes[*itRank][orderPositionInGrid];
         const int end   = begin + ni - 1;
+        const bool zoomIndex = zoomByIndex();
 
         msgs.push_back(CMessage());
@@ -940,4 +979,7 @@
         msg << global_zoom_begin.getValue() << global_zoom_n.getValue();
         msg << isCompressible_;
+        msg << zoomIndex;
+        if (zoomIndex)
+          msg << global_zoom_index.getValue();
 
         event.push(*itRank,1,msg);
@@ -959,15 +1001,43 @@
   {
     int ni_srv, begin_srv, end_srv, global_zoom_begin_tmp, global_zoom_n_tmp;
+    bool zoomIndex;    
+    CArray<int,1> zoom_index_recv;
+    std::vector<int> zoom_index_tmp;
+    std::vector<int>::iterator itZoomBeginSrv, itZoomEndSrv, itZoomSrv;
 
     buffer >> ni_srv >> begin_srv >> end_srv;
     buffer >> global_zoom_begin_tmp >> global_zoom_n_tmp;
     buffer >> isCompressible_;
+    buffer >> zoomIndex;
+    if (zoomIndex)
+    {
+      buffer >> zoom_index_recv;
+      global_zoom_index.reference(zoom_index_recv);
+      zoom_index_tmp.resize(global_zoom_index.numElements());
+      std::copy(global_zoom_index.begin(), global_zoom_index.end(), zoom_index_tmp.begin());
+      std::sort(zoom_index_tmp.begin(), zoom_index_tmp.end());
+      itZoomBeginSrv = std::lower_bound(zoom_index_tmp.begin(), zoom_index_tmp.end(), begin_srv);
+      itZoomEndSrv   = std::upper_bound(zoom_index_tmp.begin(), zoom_index_tmp.end(), end_srv);      
+      int sz = std::distance(itZoomBeginSrv, itZoomEndSrv);
+      zoom_index_srv.resize(sz);
+      itZoomSrv = itZoomBeginSrv;
+      for (int i = 0; i < sz; ++i, ++itZoomSrv)
+      {
+        zoom_index_srv(i) = *(itZoomSrv);
+      }
+    }
+
     global_zoom_begin = global_zoom_begin_tmp;
     global_zoom_n  = global_zoom_n_tmp;
     int global_zoom_end = global_zoom_begin + global_zoom_n - 1;
 
-    zoom_begin_srv = global_zoom_begin > begin_srv ? global_zoom_begin : begin_srv ;
-    zoom_end_srv   = global_zoom_end < end_srv ? global_zoom_end : end_srv ;
+    zoom_begin_srv = zoomIndex ? std::distance(itZoomBeginSrv, zoom_index_tmp.begin())
+                                 : global_zoom_begin > begin_srv ? global_zoom_begin : begin_srv ;
+    zoom_end_srv   = zoomIndex ? std::distance(zoom_index_tmp.begin(), itZoomEndSrv) - 1 
+                                 : global_zoom_end < end_srv ? global_zoom_end : end_srv ;
     zoom_size_srv  = zoom_end_srv - zoom_begin_srv + 1;
+     
+    global_zoom_begin_srv = zoomIndex ? 0 : global_zoom_begin ;
+    global_zoom_size_srv  = zoomIndex ? zoom_index_tmp.size() : global_zoom_n;
 
     if (zoom_size_srv<=0)
@@ -978,7 +1048,8 @@
     if (n_glo == n)
     {
-      zoom_begin_srv = global_zoom_begin;
-      zoom_end_srv   = global_zoom_end; //zoom_end;
-      zoom_size_srv  = zoom_end_srv - zoom_begin_srv + 1;
+      zoom_begin_srv = zoomIndex ? std::distance(itZoomBeginSrv, zoom_index_tmp.begin())
+                                   : global_zoom_begin;      
+      zoom_size_srv  = zoomIndex ? zoom_index_tmp.size()
+                                   : global_zoom_n;
     }
     if (hasValue)
@@ -1043,6 +1114,4 @@
   }
 
-
-
   void CAxis::duplicateTransformation(CAxis* src)
   {
Index: /XIOS/dev/branch_yushan_merged/src/node/axis.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/node/axis.hpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/node/axis.hpp	(revision 1205)
@@ -122,7 +122,9 @@
         int zoom_begin_srv, zoom_end_srv, zoom_size_srv;
         int ni_srv, begin_srv, end_srv;
+        int global_zoom_begin_srv, global_zoom_end_srv, global_zoom_size_srv;
         CArray<double,1> value_srv;
         CArray<double,2> bound_srv;
         CArray<StdString,1> label_srv;
+        CArray<int,1> zoom_index_srv;
         bool hasValue;
 
@@ -138,4 +140,5 @@
          void sendDistributedValue();
          void sendNonDistributedValue();
+         bool zoomByIndex();
 
          static void recvIndex(CEventServer& event);
Index: /XIOS/dev/branch_yushan_merged/src/node/context.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/node/context.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/node/context.cpp	(revision 1205)
@@ -14,4 +14,7 @@
 #include "type.hpp"
 #include "xios_spl.hpp"
+#include "timer.hpp"
+#include "memtrack.hpp"
+
 
 namespace xios {
@@ -278,5 +281,8 @@
    void CContext::setClientServerBuffer()
    {
-     size_t minBufferSize = CXios::minBufferSize;
+     // Estimated minimum event size for small events (10 is an arbitrary constant just for safety)
+     const size_t minEventSize = CEventClient::headerSize + getIdServer().size() + 10 * sizeof(int);
+     // Ensure there is at least some room for 20 of such events in the buffers
+     size_t minBufferSize = std::max(CXios::minBufferSize, 20 * minEventSize);
 #define DECLARE_NODE(Name_, name_)    \
      if (minBufferSize < sizeof(C##Name_##Definition)) minBufferSize = sizeof(C##Name_##Definition);
@@ -286,4 +292,5 @@
 #undef DECLARE_NODE_PAR
 
+     // Compute the buffer sizes needed to send the attributes and data corresponding to fields
      std::map<int, StdSize> maxEventSize;
      std::map<int, StdSize> bufferSize = getAttributesBufferSize(maxEventSize);
@@ -294,4 +301,5 @@
        if (it->second > bufferSize[it->first]) bufferSize[it->first] = it->second;
 
+     // Apply the buffer size factor and check that we are above the minimum buffer size
      ite = bufferSize.end();
      for (it = bufferSize.begin(); it != ite; ++it)
@@ -301,14 +309,16 @@
      }
 
-     // We consider that the minimum buffer size is also the minimum event size
-     ite = maxEventSize.end();
-     for (it = maxEventSize.begin(); it != ite; ++it)
-       if (it->second < minBufferSize) it->second = minBufferSize;
-
+     // Leaders will have to send some control events so ensure there is some room for those in the buffers
      if (client->isServerLeader())
      {
        const std::list<int>& ranks = client->getRanksServerLeader();
        for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
-         if (!bufferSize.count(*itRank)) bufferSize[*itRank] = maxEventSize[*itRank] = minBufferSize;
+       {
+         if (!bufferSize.count(*itRank))
+         {
+           bufferSize[*itRank] = minBufferSize;
+           maxEventSize[*itRank] = minEventSize;
+         }
+       }
      }
 
@@ -401,4 +411,5 @@
    void CContext::closeDefinition(void)
    {
+     CTimer::get("Context : close definition").resume() ;
      // There is nothing client need to send to server
      if (hasClient)
@@ -454,4 +465,5 @@
       startPrefetchingOfEnabledReadModeFiles();
     }
+    CTimer::get("Context : close definition").suspend() ;
    }
 
@@ -1206,7 +1218,13 @@
    void CContext::updateCalendar(int step)
    {
+      #pragma omp critical (_output)
+      {info(50) << "updateCalendar : before : " << calendar->getCurrentDate() << endl;}
       calendar->update(step);
-
-
+      #pragma omp critical (_output)
+      {info(50) << "updateCalendar : after : " << calendar->getCurrentDate() << endl;}
+#ifdef XIOS_MEMTRACK_LIGHT
+      #pragma omp critical (_output)
+      {info(50) << " Current memory used by XIOS : "<<  MemTrack::getCurrentMemorySize()*1.0/(1024*1024)<<" Mbyte, at timestep "<<step<<" of context "<<this->getId()<<endl ;}
+#endif
       if (hasClient)
       {
@@ -1255,5 +1273,4 @@
     CContext* context = CObjectFactory::CreateObject<CContext>(id).get();
     getRoot();
-    //if (!hasctxt) CGroupFactory::AddChild(root, context->getShared());
     if (!hasctxt) CGroupFactory::AddChild(*root_ptr, context->getShared());
 
Index: /XIOS/dev/branch_yushan_merged/src/node/field.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/node/field.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/node/field.cpp	(revision 1205)
@@ -26,5 +26,5 @@
 namespace xios{
 
-   /// ////////////////////// Dfinitions ////////////////////// ///
+   /// ////////////////////// DÃ©finitions ////////////////////// ///
 
    CField::CField(void)
@@ -125,5 +125,5 @@
   void CField::sendUpdateData(const CArray<double,1>& data)
   {
-    CTimer::get("XIOS Send Data").resume();
+    CTimer::get("Field : send data").resume();
 
     CContext* context = CContext::getCurrent();
@@ -177,5 +177,5 @@
     }
 
-    CTimer::get("XIOS Send Data").suspend();
+    CTimer::get("Field : send data").suspend();
   }
 
@@ -187,5 +187,5 @@
     list<CEventServer::SSubEvent>::iterator it;
     string fieldId;
-
+    CTimer::get("Field : recv data").resume();
     for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it)
     {
@@ -197,4 +197,5 @@
     }
     get(fieldId)->recvUpdateData(ranks,buffers);
+    CTimer::get("Field : recv data").suspend();
   }
 
@@ -794,4 +795,7 @@
      if (!areAllReferenceSolved) solveAllReferenceEnabledField(false);
 
+     const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true);
+     const double defaultValue  = detectMissingValues ? default_value : (!default_value.isEmpty() ? default_value : 0.0);
+
      // Start by building a filter which can provide the field's instant data
      if (!instantDataFilter)
@@ -810,7 +814,5 @@
            if (grid && grid != gridRef && grid->hasTransform())
            {
-             bool hasMissingValue = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true);
-             double defaultValue  = hasMissingValue ? default_value : (!default_value.isEmpty() ? default_value : 0.0);
-             std::pair<boost::shared_ptr<CFilter>, boost::shared_ptr<CFilter> > filters = CSpatialTransformFilter::buildFilterGraph(gc, gridRef, grid, hasMissingValue, defaultValue);
+             std::pair<boost::shared_ptr<CFilter>, boost::shared_ptr<CFilter> > filters = CSpatialTransformFilter::buildFilterGraph(gc, gridRef, grid, detectMissingValues, defaultValue);
 
              filter->connectOutput(filters.first, 0);
@@ -828,11 +830,12 @@
          instantDataFilter = serverSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid,
                                                                                                      freq_offset.isEmpty() ? NoneDu : freq_offset,
-                                                                                                     true));
+                                                                                                     true,
+                                                                                                     detectMissingValues, defaultValue));
        else // The data might be passed from the model
        {
-          bool ignoreMissingValue = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true);
-          double defaultValue  = ignoreMissingValue ? default_value : (!default_value.isEmpty() ? default_value : 0.0);
+          if (check_if_active.isEmpty()) check_if_active = false;
           instantDataFilter = clientSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, NoneDu, false,
-                                                                                                      ignoreMissingValue, defaultValue));       }
+                                                                                                      detectMissingValues, defaultValue));
+       }
      }
 
@@ -842,5 +845,6 @@
        if (!read_access.isEmpty() && read_access)
        {
-         storeFilter = boost::shared_ptr<CStoreFilter>(new CStoreFilter(gc, CContext::getCurrent(), grid));
+         storeFilter = boost::shared_ptr<CStoreFilter>(new CStoreFilter(gc, CContext::getCurrent(), grid,
+                                                                        detectMissingValues, defaultValue));
          instantDataFilter->connectOutput(storeFilter, 0);
        }
@@ -903,4 +907,7 @@
      if (!selfReferenceFilter)
      {
+       const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true);
+       const double defaultValue  = detectMissingValues ? default_value : (!default_value.isEmpty() ? default_value : 0.0);
+
        if (file && !file->mode.isEmpty() && file->mode == CFile::mode_attr::read)
        {
@@ -908,5 +915,6 @@
            serverSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid,
                                                                                    freq_offset.isEmpty() ? NoneDu : freq_offset,
-                                                                                   true));
+                                                                                   true,
+                                                                                   detectMissingValues, defaultValue));
 
          selfReferenceFilter = serverSourceFilter;
@@ -922,8 +930,7 @@
          if (!clientSourceFilter)
          {
-           bool ignoreMissingValue = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true);
-           double defaultValue  = ignoreMissingValue ? default_value : (!default_value.isEmpty() ? default_value : 0.0); 
+           if (check_if_active.isEmpty()) check_if_active = false;
            clientSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, NoneDu, false,
-                                                                                   ignoreMissingValue, defaultValue));
+                                                                                   detectMissingValues, defaultValue));
          }
 
@@ -959,10 +966,10 @@
          freq_offset.setValue(NoneDu);
 
-       const bool ignoreMissingValue = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true);
-
+       const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true);
+       
        boost::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation,
                                                                              CContext::getCurrent()->getCalendar()->getInitDate(),
                                                                              freq_op, freq_offset, outFreq,
-                                                                             ignoreMissingValue, ignoreMissingValue ? default_value : 0.0));
+                                                                             detectMissingValues, detectMissingValues ? default_value : 0.0));
        instantDataFilter->connectOutput(temporalFilter, 0);
 
@@ -999,10 +1006,10 @@
        if (freq_offset.isEmpty()) freq_offset.setValue(NoneDu);
 
-       const bool ignoreMissingValue = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true);
+       const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true);
 
        boost::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation,
                                                                              CContext::getCurrent()->getCalendar()->getInitDate(),
                                                                              freq_op, freq_offset, outFreq,
-                                                                             ignoreMissingValue, ignoreMissingValue ? default_value : 0.0));
+                                                                             detectMissingValues, detectMissingValues ? default_value : 0.0));
        selfReferenceFilter->connectOutput(temporalFilter, 0);
        return temporalFilter ;
Index: /XIOS/dev/branch_yushan_merged/src/node/field_impl.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/node/field_impl.hpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/node/field_impl.hpp	(revision 1205)
@@ -19,5 +19,8 @@
   {
     if (clientSourceFilter)
-      clientSourceFilter->streamData(CContext::getCurrent()->getCalendar()->getCurrentDate(), _data);
+    {
+      if (!check_if_active || isActive(true))
+        clientSourceFilter->streamData(CContext::getCurrent()->getCalendar()->getCurrentDate(), _data);
+    }
     else if (instantDataFilter)
       ERROR("void CField::setData(const CArray<double, N>& _data)",
Index: /XIOS/dev/branch_yushan_merged/src/node/file.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/node/file.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/node/file.cpp	(revision 1205)
@@ -16,4 +16,5 @@
 #include "context_client.hpp"
 #include "mpi.hpp"
+#include "timer.hpp"
 
 namespace xios {
@@ -274,10 +275,14 @@
       if (mode.isEmpty() || mode.getValue() == mode_attr::write)
       {
+        CTimer::get("Files : create headers").resume();
         if (!isOpen) createHeader();
+        CTimer::get("Files : create headers").suspend();
         checkSync();
       }
       else
       {
+        CTimer::get("Files : open headers").resume();
         if (!isOpen) openInReadMode();
+        CTimer::get("Files : open headers").suspend();
       }
       checkSplit();
@@ -395,5 +400,18 @@
          if (!split_freq.isEmpty())
          {
-           CDate splitEnd = lastSplit + split_freq - 1 * Second;
+           CDate split_start ;
+           CDate splitEnd ;
+           if (!split_start_offset.isEmpty()) split_start=lastSplit + split_start_offset ;
+           else split_start=lastSplit ;
+
+           splitEnd = lastSplit + split_freq ;
+           if (!split_last_date.isEmpty())
+           {
+             CDate splitLastDate=CDate::FromString(split_last_date,*CContext::getCurrent()->getCalendar()) ;
+             if( splitLastDate < splitEnd)  splitEnd=splitLastDate ;
+           }
+            
+           if (!split_end_offset.isEmpty()) splitEnd = splitEnd + split_end_offset;
+           else splitEnd = splitEnd - 1 * Second;
 
            string splitFormat;
@@ -410,5 +428,5 @@
 
            oss << firstPart ;
-           if (hasStartDate) oss << lastSplit.getStr(splitFormat) ;
+           if (hasStartDate) oss << split_start.getStr(splitFormat) ;
            oss << middlePart ;
            if (hasEndDate) oss << splitEnd.getStr(splitFormat);
Index: /XIOS/dev/branch_yushan_merged/src/node/grid.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/node/grid.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/node/grid.cpp	(revision 1205)
@@ -1253,4 +1253,5 @@
         std::vector<CAxis*> axisList = getAxis();
         std::vector<int> nZoomBegin(ssize), nZoomSize(ssize), nGlob(ssize), nZoomBeginGlobal(ssize);
+        std::vector<CArray<int,1> > globalZoomIndex(numElement);
         for (int i = 0; i < numElement; ++i)
         {
@@ -1266,4 +1267,15 @@
             nZoomBeginGlobal[indexMap[i] + 1] = domainList[domainId]->global_zoom_jbegin;
             nGlob[indexMap[i] + 1] = domainList[domainId]->nj_glo;
+
+            {
+              int count = 0;
+              globalZoomIndex[i].resize(nZoomSize[indexMap[i]]*nZoomSize[indexMap[i]+1]);
+              for (int jdx = 0; jdx < nZoomSize[indexMap[i]+1]; ++jdx)
+                for (int idx = 0; idx < nZoomSize[indexMap[i]]; ++idx)                
+                {
+                  globalZoomIndex[i](count) = (nZoomBegin[indexMap[i]] + idx) + (nZoomBegin[indexMap[i]+1] + jdx) * nGlob[indexMap[i]];
+                  ++count;
+                }
+            }
             ++domainId;
           }
@@ -1272,6 +1284,17 @@
             nZoomBegin[indexMap[i]] = axisList[axisId]->zoom_begin_srv;
             nZoomSize[indexMap[i]]  = axisList[axisId]->zoom_size_srv;
-            nZoomBeginGlobal[indexMap[i]] = axisList[axisId]->global_zoom_begin;
+            nZoomBeginGlobal[indexMap[i]] = axisList[axisId]->global_zoom_begin_srv;
             nGlob[indexMap[i]] = axisList[axisId]->n_glo;
+            if (!axisList[axisId]->global_zoom_index.isEmpty())
+            {
+              globalZoomIndex[i].reference(axisList[axisId]->zoom_index_srv);                
+            }
+            else
+            {
+              globalZoomIndex[i].resize(nZoomSize[indexMap[i]]);
+              for (int idx = 0; idx < nZoomSize[indexMap[i]]; ++idx)
+                globalZoomIndex[i](idx) = nZoomBegin[indexMap[i]] + idx;
+            }
+            
             ++axisId;
           }
@@ -1282,4 +1305,6 @@
             nZoomBeginGlobal[indexMap[i]] = 0;
             nGlob[indexMap[i]] = 1;
+            globalZoomIndex[i].resize(1);
+            globalZoomIndex[i](0) = 0;
             ++scalarId;
           }
@@ -1289,6 +1314,9 @@
           dataSize *= nZoomSize[i];
 
-        serverDistribution_ = new CDistributionServer(server->intraCommRank, nZoomBegin, nZoomSize,
-                                                      nZoomBeginGlobal, nGlob);
+/*        serverDistribution_ = new CDistributionServer(server->intraCommRank, nZoomBegin, nZoomSize,
+                                                      nZoomBeginGlobal, nGlob);*/
+        serverDistribution_ = new CDistributionServer(server->intraCommRank, 
+                                                      globalZoomIndex, axis_domain_order,
+                                                      nZoomBegin, nZoomSize, nZoomBeginGlobal, nGlob);
       }
 
Index: /XIOS/dev/branch_yushan_merged/src/node/zoom_axis.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/node/zoom_axis.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/node/zoom_axis.cpp	(revision 1205)
@@ -46,7 +46,18 @@
     axisGlobalSize   = axisDest->n_glo.getValue();
 
-    begin = (this->begin.isEmpty()) ?  0 : this->begin.getValue();
-    n     = (this->n.isEmpty()) ?  axisGlobalSize : this->n.getValue();
-    end   = begin+n-1;
+    bool zoomByIndex = !this->index.isEmpty() && (0 != this->index.numElements());
+
+    if (zoomByIndex)
+    {
+      begin = min(this->index);
+      end   = max(this->index);
+      n     = end - begin + 1;
+    }
+    else
+    {
+      begin = (this->begin.isEmpty()) ?  0 : this->begin.getValue();
+      n     = (this->n.isEmpty()) ?  axisGlobalSize : this->n.getValue();
+      end   = begin+n-1;
+    }
 
     if (begin < 0 || begin > axisGlobalSize - 1 || end < 0 || end > axisGlobalSize - 1
@@ -55,4 +66,9 @@
             << "One or more attributes among 'begin' (" << begin << "), 'end' (" << end << "), 'n' (" << n << ") "
             << "of axis transformation [ id = '" << axisDest->getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] are not well specified");
+    
+    if (zoomByIndex && (!this->begin.isEmpty() || !this->n.isEmpty()))
+      ERROR("CZoomAxis::checkValid(CAxis* axisDest)",
+            << "Only one type of zoom is accepted. Define zoom by index with global_zoom_index or define zoom with begin and n. "
+            << "Axis transformation [ id = '" << axisDest->getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] are not well specified");
 
     this->begin.setValue(begin);
Index: /XIOS/dev/branch_yushan_merged/src/server.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/server.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/server.cpp	(revision 1205)
@@ -164,4 +164,5 @@
       report(0)<<"Performance report : Time spent in processing events : "<<CTimer::get("Process events").getCumulatedTime()<<endl  ;
       report(0)<<"Performance report : Ratio : "<<CTimer::get("Process events").getCumulatedTime()/CTimer::get("XIOS server").getCumulatedTime()*100.<<"%"<<endl  ;
+      report(100)<<CTimer::getAllCumulatedTime()<<endl ;
     }
 
Index: /XIOS/dev/branch_yushan_merged/src/timer.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/timer.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/timer.cpp	(revision 1205)
@@ -3,7 +3,7 @@
 #include <string>
 #include <map>
-#include "tracer.hpp"
 #include <iostream>
 #include <sstream>
+#include "tracer.hpp"
 
 namespace xios
@@ -69,3 +69,10 @@
   }
 
+  string CTimer::getAllCumulatedTime(void)
+  {
+    std::ostringstream strOut ;
+    for(std::map<std::string,CTimer>::iterator it=allTimer.begin();it!=allTimer.end();++it)
+      strOut<<"Timer : "<<it->first<<"    -->   cumulated time : "<<it->second.getCumulatedTime()<<std::endl ;
+    return strOut.str() ;
+  }
 }
Index: /XIOS/dev/branch_yushan_merged/src/timer.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/timer.hpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/timer.hpp	(revision 1205)
@@ -27,4 +27,5 @@
       static double getTime(void);
       static CTimer& get(std::string name);
+      static std::string getAllCumulatedTime(void) ;
   };
 }
Index: /XIOS/dev/branch_yushan_merged/src/transformation/Functions/average_reduction.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/transformation/Functions/average_reduction.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/transformation/Functions/average_reduction.cpp	(revision 1205)
@@ -39,7 +39,5 @@
     int nbLocalIndex = localIndex.size();
     int currentlocalIndex = 0;
-    double currentWeight  = 0.0;
-
-    dataOut=std::numeric_limits<double>::quiet_NaN();
+    double currentWeight  = 0.0;    
 
     for (int idx = 0; idx < nbLocalIndex; ++idx)
@@ -59,4 +57,9 @@
           weights_(currentlocalIndex) += 1.0;
         }
+      }
+      else
+      {
+        if (flagInitial[currentlocalIndex]) 
+          dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN();
       }
     }
Index: /XIOS/dev/branch_yushan_merged/src/transformation/Functions/max_reduction.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/transformation/Functions/max_reduction.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/transformation/Functions/max_reduction.cpp	(revision 1205)
@@ -36,6 +36,5 @@
   {
     int nbLocalIndex = localIndex.size();
-    int currentlocalIndex = 0;
-    dataOut=std::numeric_limits<double>::quiet_NaN();    
+    int currentlocalIndex = 0;    
     for (int idx = 0; idx < nbLocalIndex; ++idx)
     {
@@ -52,4 +51,9 @@
           dataOut(currentlocalIndex) = std::max(*(dataInput + idx), dataOut(currentlocalIndex));
         }
+      }
+      else
+      {
+        if (flagInitial[currentlocalIndex]) 
+          dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN();
       }
     }
Index: /XIOS/dev/branch_yushan_merged/src/transformation/Functions/min_reduction.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/transformation/Functions/min_reduction.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/transformation/Functions/min_reduction.cpp	(revision 1205)
@@ -36,6 +36,5 @@
   {
     int nbLocalIndex = localIndex.size();
-    int currentlocalIndex = 0;
-    dataOut=std::numeric_limits<double>::quiet_NaN();
+    int currentlocalIndex = 0;    
     for (int idx = 0; idx < nbLocalIndex; ++idx)
     {
@@ -52,4 +51,9 @@
           dataOut(currentlocalIndex) = std::min(*(dataInput + idx), dataOut(currentlocalIndex));
         }
+      }
+      else
+      {
+        if (flagInitial[currentlocalIndex]) 
+          dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN();
       }
     }
Index: /XIOS/dev/branch_yushan_merged/src/transformation/Functions/sum_reduction.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/transformation/Functions/sum_reduction.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/transformation/Functions/sum_reduction.cpp	(revision 1205)
@@ -36,7 +36,5 @@
   {
     int nbLocalIndex = localIndex.size();
-    int currentlocalIndex = 0;
-
-    dataOut=std::numeric_limits<double>::quiet_NaN();
+    int currentlocalIndex = 0;    
   
     for (int idx = 0; idx < nbLocalIndex; ++idx)
@@ -54,4 +52,9 @@
           dataOut(currentlocalIndex) += *(dataInput + idx);
         }
+      }
+      else
+      {
+        if (flagInitial[currentlocalIndex]) 
+          dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN();
       }
     }    
Index: /XIOS/dev/branch_yushan_merged/src/transformation/axis_algorithm_interpolate.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/transformation/axis_algorithm_interpolate.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/transformation/axis_algorithm_interpolate.cpp	(revision 1205)
@@ -148,5 +148,5 @@
       while (it < iteRange)
       {
-        while (((*itsecond -*it) < precision) && itsecond < ite)
+        while (itsecond < ite && ((*itsecond -*it) < precision))
         { ++itsecond; ++it; }
         int index = std::distance(itb, it);
Index: /XIOS/dev/branch_yushan_merged/src/transformation/axis_algorithm_zoom.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/transformation/axis_algorithm_zoom.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/transformation/axis_algorithm_zoom.cpp	(revision 1205)
@@ -53,4 +53,14 @@
            << "Zoom size is " << zoomSize_ );
   }
+
+  if (!zoomAxis->index.isEmpty())
+  {
+    int sz = zoomAxis->index.numElements();
+    zoomIndex_.resize(sz);
+    for (int i = 0; i < sz; ++i)
+      zoomIndex_[i] = zoomAxis->index(i);
+
+    std::sort(zoomIndex_.begin(), zoomIndex_.end());
+  }
 }
 
@@ -60,4 +70,10 @@
 void CAxisAlgorithmZoom::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)
 {
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
   StdSize niSource = axisSrc_->n.getValue();
   StdSize ibeginSource = axisSrc_->begin.getValue();
@@ -69,14 +85,22 @@
   if (iend < ibegin) ni = 0;
 
-  this->transformationMapping_.resize(1);
-  this->transformationWeight_.resize(1);
-
-  TransformationIndexMap& transMap = this->transformationMapping_[0];
-  TransformationWeightMap& transWeight = this->transformationWeight_[0];
-
-  for (StdSize idx = 0; idx < ni; ++idx)
+  if (!zoomIndex_.empty())
   {
-    transMap[ibegin+idx].push_back(ibegin+idx);
-    transWeight[ibegin+idx].push_back(1.0);
+    std::vector<int>::iterator itZoomBegin, itZoomEnd;
+    itZoomBegin = std::lower_bound(zoomIndex_.begin(), zoomIndex_.end(), ibeginSource);
+    itZoomEnd   = std::upper_bound(zoomIndex_.begin(), zoomIndex_.end(), iendSource);            
+    for (; itZoomBegin != itZoomEnd; ++itZoomBegin)
+    {
+      transMap[*itZoomBegin].push_back(*itZoomBegin);
+      transWeight[*itZoomBegin].push_back(1.0);
+    }
+  }
+  else
+  {
+    for (StdSize idx = 0; idx < ni; ++idx)
+    {
+      transMap[ibegin+idx].push_back(ibegin+idx);
+      transWeight[ibegin+idx].push_back(1.0);
+    }
   }
 
@@ -92,4 +116,9 @@
   axisDest_->global_zoom_begin = zoomBegin_;
   axisDest_->global_zoom_n  = zoomSize_;
+  if (!zoomIndex_.empty())
+  {
+    axisDest_->global_zoom_index.resize(zoomIndex_.size());
+    std::copy(zoomIndex_.begin(), zoomIndex_.end(), axisDest_->global_zoom_index.begin());
+  }
 }
 
Index: /XIOS/dev/branch_yushan_merged/src/transformation/axis_algorithm_zoom.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/transformation/axis_algorithm_zoom.hpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/transformation/axis_algorithm_zoom.hpp	(revision 1205)
@@ -48,4 +48,6 @@
   StdSize zoomSize_;
 
+  std::vector<int> zoomIndex_;
+
 private:
 
Index: /XIOS/dev/branch_yushan_merged/src/transformation/domain_algorithm_interpolate.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/transformation/domain_algorithm_interpolate.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/transformation/domain_algorithm_interpolate.cpp	(revision 1205)
@@ -111,6 +111,5 @@
   const int constNVertex = 4; // Value by default number of vertex for rectangular domain
   int nVertexSrc, nVertexDest;
-  nVertexSrc = constNVertex;
-  nVertexDest = constNVertex;
+  nVertexSrc = nVertexDest = constNVertex;
 
   // First of all, try to retrieve the boundary values of domain source and domain destination
@@ -389,7 +388,7 @@
   }
 
-  if (writeToFile_ && !readFromFile_)
-     writeRemapInfo(interpMapValue);
-  exchangeRemapInfo(interpMapValue);
+  if (writeToFile_ && !readFromFile_) writeRemapInfo(interpMapValue);
+//  exchangeRemapInfo(interpMapValue);
+  convertRemapInfo(interpMapValue) ;
 
   delete [] globalSrc;
@@ -498,4 +497,29 @@
 }
 
+void CDomainAlgorithmInterpolate::convertRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue)
+{
+  CContext* context = CContext::getCurrent();
+  CContextClient* client=context->client;
+  int clientRank = client->clientRank;
+
+  this->transformationMapping_.resize(1);
+  this->transformationWeight_.resize(1);
+
+  TransformationIndexMap& transMap = this->transformationMapping_[0];
+  TransformationWeightMap& transWeight = this->transformationWeight_[0];
+
+  std::map<int,std::vector<std::pair<int,double> > >::const_iterator itb = interpMapValue.begin(), it,
+                                                                     ite = interpMapValue.end();
+  
+  for (it = itb; it != ite; ++it)
+  {    
+    const std::vector<std::pair<int,double> >& tmp = it->second;
+    for (int i = 0; i < tmp.size(); ++i)
+    {
+      transMap[it->first].push_back(tmp[i].first);
+      transWeight[it->first].push_back(tmp[i].second);
+    }      
+  }      
+}
 
 /*!
Index: /XIOS/dev/branch_yushan_merged/src/transformation/domain_algorithm_interpolate.hpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/transformation/domain_algorithm_interpolate.hpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/transformation/domain_algorithm_interpolate.hpp	(revision 1205)
@@ -47,4 +47,5 @@
   void writeRemapInfo(std::map<int,std::vector<std::pair<int,double> > >&);
   void exchangeRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue);
+  void convertRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue);
 
 private:
Index: /XIOS/dev/branch_yushan_merged/src/transformation/generic_algorithm_transformation.cpp
===================================================================
--- /XIOS/dev/branch_yushan_merged/src/transformation/generic_algorithm_transformation.cpp	(revision 1204)
+++ /XIOS/dev/branch_yushan_merged/src/transformation/generic_algorithm_transformation.cpp	(revision 1205)
@@ -45,12 +45,14 @@
       {
         dataOut(localIndex[idx].first) += *(dataInput + idx) * localIndex[idx].second;
-      }
-    }
-
-    // for (int idx = 0; idx < nbLocalIndex; ++idx)
-    // {
-    //   if (!flagInitial[localIndex[idx].first])
-    //     dataOut(localIndex[idx].first) = defaultValue;
-    // }
+        flagInitial[localIndex[idx].first] = true; // Reset flag to indicate not all data source are nan
+      }
+    }
+
+    // If all data source are nan then data destination must be nan
+    for (int idx = 0; idx < nbLocalIndex; ++idx)
+    {
+      if (!flagInitial[localIndex[idx].first])
+        dataOut(localIndex[idx].first) = defaultValue;
+    }
   }
   else
