Index: XIOS/trunk/src/interface/c/icdata.cpp
===================================================================
--- XIOS/trunk/src/interface/c/icdata.cpp	(revision 2025)
+++ XIOS/trunk/src/interface/c/icdata.cpp	(revision 2131)
@@ -438,5 +438,5 @@
 
   
-   void cxios_write_data_k81_hdl(CField* field, double* data_k8, int data_Xsize)
+   void cxios_write_data_k81_hdl(CField* field, double* data_k8, int data_Xsize, int tileid)
    TRY
    {
@@ -449,5 +449,5 @@
 
       CArray<double, 1> data(data_k8, shape(data_Xsize), neverDeleteData);
-      field->setData(data);
+      field->setData(data, tileid);
 
       CTimer::get("XIOS send field").suspend();
@@ -456,10 +456,10 @@
    CATCH_DUMP_STACK
    
-   void cxios_write_data_k81(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize)
-   TRY
-   {
-      std::string fieldid_str;
-      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
-      cxios_write_data_k81_hdl(CField::get(fieldid_str), data_k8, data_Xsize) ;
+   void cxios_write_data_k81(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int tileid)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+      cxios_write_data_k81_hdl(CField::get(fieldid_str), data_k8, data_Xsize, tileid) ;
     
    }
@@ -468,5 +468,5 @@
 
 
-   void cxios_write_data_k82_hdl(CField* field, double* data_k8, int data_Xsize, int data_Ysize)
+   void cxios_write_data_k82_hdl(CField* field, double* data_k8, int data_Xsize, int data_Ysize, int tileid)
    TRY
    {
@@ -479,26 +479,26 @@
 
       CArray<double, 2>data(data_k8, shape(data_Xsize, data_Ysize), neverDeleteData);
-      field->setData(data);
-
-      CTimer::get("XIOS send field").suspend();
-      CTimer::get("XIOS").suspend();
-   }
-   CATCH_DUMP_STACK
-
-   void cxios_write_data_k82(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int data_Ysize)
-   TRY
-   {
-      std::string fieldid_str;
-      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
-      cxios_write_data_k82_hdl(CField::get(fieldid_str), data_k8, data_Xsize, data_Ysize) ;
-   }
-   CATCH_DUMP_STACK
-
-
-
-
-
-
-   void cxios_write_data_k83_hdl(CField* field, double* data_k8, int data_Xsize, int data_Ysize, int data_Zsize)
+      field->setData(data, tileid);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k82(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int data_Ysize, int tileid)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+      cxios_write_data_k82_hdl(CField::get(fieldid_str), data_k8, data_Xsize, data_Ysize, tileid) ;
+   }
+   CATCH_DUMP_STACK
+
+
+
+
+
+
+   void cxios_write_data_k83_hdl(CField* field, double* data_k8, int data_Xsize, int data_Ysize, int data_Zsize, int tileid)
    TRY
    {
@@ -511,5 +511,5 @@
 
       CArray<double, 3>data(data_k8, shape(data_Xsize, data_Ysize, data_Zsize), neverDeleteData);
-      field->setData(data);
+      field->setData(data, tileid);
 
       CTimer::get("XIOS send field").suspend();
@@ -518,21 +518,21 @@
    CATCH_DUMP_STACK
    
-   void cxios_write_data_k83(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int data_Ysize, int data_Zsize)
-   TRY
-   {
-      std::string fieldid_str;
-      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
-      cxios_write_data_k83_hdl(CField::get(fieldid_str), data_k8, data_Xsize, data_Ysize, data_Zsize) ;
-
-
-   }
-   CATCH_DUMP_STACK
-
-
-
-
-
-
-   void cxios_write_data_k84_hdl(CField* field, double* data_k8, int data_0size, int data_1size, int data_2size, int data_3size)
+   void cxios_write_data_k83(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize, int data_Ysize, int data_Zsize, int tileid)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+      cxios_write_data_k83_hdl(CField::get(fieldid_str), data_k8, data_Xsize, data_Ysize, data_Zsize, tileid) ;
+
+
+   }
+   CATCH_DUMP_STACK
+
+
+
+
+
+
+   void cxios_write_data_k84_hdl(CField* field, double* data_k8, int data_0size, int data_1size, int data_2size, int data_3size, int tileid)
    TRY
    {
@@ -545,20 +545,22 @@
 
       CArray<double, 4>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size), neverDeleteData);
-      field->setData(data);
-
-      CTimer::get("XIOS send field").suspend();
-      CTimer::get("XIOS").suspend();
-   }
-   CATCH_DUMP_STACK
-
-   void cxios_write_data_k84(const char* fieldid, int fieldid_size, double* data_k8, int data_0size, int data_1size, int data_2size, int data_3size)
-   TRY
-   {
-      std::string fieldid_str;
-      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
-
-      CTimer::get("XIOS").resume();
-      CTimer::get("XIOS send field").resume();
-      cxios_write_data_k84_hdl(CField::get(fieldid_str), data_k8, data_0size, data_1size, data_2size, data_3size) ;
+      field->setData(data, tileid);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k84(const char* fieldid, int fieldid_size, double* data_k8,
+                             int data_0size, int data_1size, int data_2size,
+                             int data_3size, int tileid)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+
+      CTimer::get("XIOS").resume();
+      CTimer::get("XIOS send field").resume();
+      cxios_write_data_k84_hdl(CField::get(fieldid_str), data_k8, data_0size, data_1size, data_2size, data_3size, tileid) ;
    }
    CATCH_DUMP_STACK
@@ -570,5 +572,5 @@
    void cxios_write_data_k85_hdl(CField* field, double* data_k8,
                              int data_0size, int data_1size, int data_2size,
-                             int data_3size, int data_4size)
+                             int data_3size, int data_4size, int tileid)
    TRY
    {
@@ -581,5 +583,5 @@
 
       CArray<double, 5>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size, data_4size), neverDeleteData);
-      field->setData(data);
+      field->setData(data, tileid);
 
       CTimer::get("XIOS send field").suspend();
@@ -590,10 +592,10 @@
    void cxios_write_data_k85(const char* fieldid, int fieldid_size, double* data_k8,
                              int data_0size, int data_1size, int data_2size,
-                             int data_3size, int data_4size)
-   TRY
-   {
-      std::string fieldid_str;
-      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
-      cxios_write_data_k85_hdl(CField::get(fieldid_str), data_k8, data_0size, data_1size, data_2size, data_3size, data_4size) ;
+                             int data_3size, int data_4size, int tileid)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+      cxios_write_data_k85_hdl(CField::get(fieldid_str), data_k8, data_0size, data_1size, data_2size, data_3size, data_4size, tileid) ;
 
    }
@@ -604,5 +606,5 @@
    void cxios_write_data_k86_hdl(CField* field, double* data_k8,
                              int data_0size, int data_1size, int data_2size,
-                             int data_3size, int data_4size, int data_5size)
+                             int data_3size, int data_4size, int data_5size, int tileid)
    TRY
    {
@@ -616,5 +618,5 @@
 
       CArray<double, 6>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size), neverDeleteData);
-      field->setData(data);
+      field->setData(data, tileid);
 
       CTimer::get("XIOS send field").suspend();
@@ -625,10 +627,10 @@
    void cxios_write_data_k86(const char* fieldid, int fieldid_size, double* data_k8,
                              int data_0size, int data_1size, int data_2size,
-                             int data_3size, int data_4size, int data_5size)
-   TRY
-   {
-      std::string fieldid_str;
-      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
-      cxios_write_data_k86_hdl(CField::get(fieldid_str), data_k8, data_0size, data_1size, data_2size, data_3size, data_4size, data_5size) ;
+                             int data_3size, int data_4size, int data_5size, int tileid)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+      cxios_write_data_k86_hdl(CField::get(fieldid_str), data_k8, data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, tileid) ;
 
   }
@@ -641,5 +643,5 @@
                              int data_0size, int data_1size, int data_2size,
                              int data_3size, int data_4size, int data_5size,
-                             int data_6size)
+                             int data_6size, int tileid)
    TRY
    {
@@ -652,5 +654,5 @@
 
       CArray<double, 7>data(data_k8, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size), neverDeleteData);
-      field->setData(data);
+      field->setData(data, tileid);
 
       CTimer::get("XIOS send field").suspend();
@@ -662,10 +664,11 @@
                              int data_0size, int data_1size, int data_2size,
                              int data_3size, int data_4size, int data_5size,
-                             int data_6size)
-   TRY
-   {
-      std::string fieldid_str;
-      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
-      cxios_write_data_k87_hdl(CField::get(fieldid_str), data_k8, data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size) ;
+                             int data_6size, int tileid)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+      cxios_write_data_k87_hdl(CField::get(fieldid_str), data_k8, data_0size, data_1size, data_2size, data_3size, data_4size,
+                               data_5size, data_6size, tileid) ;
    }
    CATCH_DUMP_STACK
@@ -704,5 +707,5 @@
    
    
-   void cxios_write_data_k41_hdl(CField* field, float* data_k4, int data_Xsize)
+   void cxios_write_data_k41_hdl(CField* field, float* data_k4, int data_Xsize, int tileid)
    TRY
    {
@@ -717,22 +720,22 @@
       CArray<double, 1> data(data_Xsize);
       data = data_tmp;
-      field->setData(data);
-
-      CTimer::get("XIOS send field").suspend();
-      CTimer::get("XIOS").suspend();
-   }
-   CATCH_DUMP_STACK
-
-   void cxios_write_data_k41(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize)
-   TRY
-   {
-      std::string fieldid_str;
-      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
-      cxios_write_data_k41_hdl(CField::get(fieldid_str), data_k4, data_Xsize);
-   }
-   CATCH_DUMP_STACK
-
-
-   void cxios_write_data_k42_hdl(CField* field, float* data_k4, int data_Xsize, int data_Ysize)
+      field->setData(data, tileid);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k41(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int tileid)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+      cxios_write_data_k41_hdl(CField::get(fieldid_str), data_k4, data_Xsize, tileid);
+   }
+   CATCH_DUMP_STACK
+
+
+   void cxios_write_data_k42_hdl(CField* field, float* data_k4, int data_Xsize, int data_Ysize, int tileid)
    TRY
    {
@@ -747,24 +750,24 @@
       CArray<double, 2> data(data_Xsize, data_Ysize);
       data = data_tmp;
-      field->setData(data);
-
-      CTimer::get("XIOS send field").suspend();
-      CTimer::get("XIOS").suspend();
-   }
-   CATCH_DUMP_STACK
-
-   void cxios_write_data_k42(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int data_Ysize)
-   TRY
-   {
-      std::string fieldid_str;
-      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
-      cxios_write_data_k42_hdl(CField::get(fieldid_str), data_k4, data_Xsize,data_Ysize);
-   }
-   CATCH_DUMP_STACK
-
-
-
-
-   void cxios_write_data_k43_hdl(CField* field, float* data_k4, int data_Xsize, int data_Ysize, int data_Zsize)
+      field->setData(data, tileid);
+
+      CTimer::get("XIOS send field").suspend();
+      CTimer::get("XIOS").suspend();
+   }
+   CATCH_DUMP_STACK
+
+   void cxios_write_data_k42(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int data_Ysize, int tileid)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+      cxios_write_data_k42_hdl(CField::get(fieldid_str), data_k4, data_Xsize,data_Ysize, tileid);
+   }
+   CATCH_DUMP_STACK
+
+
+
+
+   void cxios_write_data_k43_hdl(CField* field, float* data_k4, int data_Xsize, int data_Ysize, int data_Zsize, int tileid)
    TRY
    {
@@ -779,5 +782,5 @@
       CArray<double, 3> data(data_Xsize, data_Ysize, data_Zsize);
       data = data_tmp;
-      field->setData(data);
+      field->setData(data, tileid);
 
       CTimer::get("XIOS send field").suspend();
@@ -786,10 +789,10 @@
    CATCH_DUMP_STACK
    
-   void cxios_write_data_k43(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int data_Ysize, int data_Zsize)
-   TRY
-   {
-      std::string fieldid_str;
-      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
-      cxios_write_data_k43_hdl(CField::get(fieldid_str), data_k4, data_Xsize,data_Ysize, data_Zsize);
+   void cxios_write_data_k43(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int data_Ysize, int data_Zsize, int tileid)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+      cxios_write_data_k43_hdl(CField::get(fieldid_str), data_k4, data_Xsize,data_Ysize, data_Zsize, tileid);
     }
    CATCH_DUMP_STACK
@@ -799,5 +802,5 @@
    void cxios_write_data_k44_hdl(CField* field, float* data_k4,
                              int data_0size, int data_1size, int data_2size,
-                             int data_3size)
+                             int data_3size, int tileid)
    TRY
    {
@@ -812,5 +815,5 @@
       CArray<double, 4> data(data_0size, data_1size, data_2size, data_3size);
       data = data_tmp;
-      field->setData(data);
+      field->setData(data, tileid);
 
       CTimer::get("XIOS send field").suspend();
@@ -821,10 +824,10 @@
    void cxios_write_data_k44(const char* fieldid, int fieldid_size, float* data_k4,
                              int data_0size, int data_1size, int data_2size,
-                             int data_3size)
-   TRY
-   {
-      std::string fieldid_str;
-      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
-      cxios_write_data_k44_hdl(CField::get(fieldid_str), data_k4, data_0size, data_1size, data_2size, data_3size) ;
+                             int data_3size, int tileid)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+      cxios_write_data_k44_hdl(CField::get(fieldid_str), data_k4, data_0size, data_1size, data_2size, data_3size, tileid) ;
     }
    CATCH_DUMP_STACK
@@ -835,5 +838,5 @@
    void cxios_write_data_k45_hdl(CField* field, float* data_k4,
                              int data_0size, int data_1size, int data_2size,
-                             int data_3size, int data_4size)
+                             int data_3size, int data_4size, int tileid)
    TRY
    {
@@ -848,5 +851,5 @@
       CArray<double, 5> data(data_0size, data_1size, data_2size, data_3size, data_4size);
       data = data_tmp;
-      field->setData(data);
+      field->setData(data, tileid);
 
       CTimer::get("XIOS send field").suspend();
@@ -857,10 +860,10 @@
    void cxios_write_data_k45(const char* fieldid, int fieldid_size, float* data_k4,
                              int data_0size, int data_1size, int data_2size,
-                             int data_3size, int data_4size)
-   TRY
-   {
-      std::string fieldid_str;
-      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
-      cxios_write_data_k45_hdl(CField::get(fieldid_str), data_k4, data_0size, data_1size, data_2size, data_3size, data_4size) ;
+                             int data_3size, int data_4size, int tileid)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+      cxios_write_data_k45_hdl(CField::get(fieldid_str), data_k4, data_0size, data_1size, data_2size, data_3size, data_4size, tileid) ;
     }
    CATCH_DUMP_STACK
@@ -870,5 +873,5 @@
    void cxios_write_data_k46_hdl(CField* field, float* data_k4,
                              int data_0size, int data_1size, int data_2size,
-                             int data_3size, int data_4size, int data_5size)
+                             int data_3size, int data_4size, int data_5size, int tileid)
    TRY
    {
@@ -883,5 +886,5 @@
       CArray<double, 6> data(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size);
       data = data_tmp;
-      field->setData(data);
+      field->setData(data, tileid);
 
       CTimer::get("XIOS send field").suspend();
@@ -892,10 +895,10 @@
    void cxios_write_data_k46(const char* fieldid, int fieldid_size, float* data_k4,
                              int data_0size, int data_1size, int data_2size,
-                             int data_3size, int data_4size, int data_5size)
-   TRY
-   {
-      std::string fieldid_str;
-      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
-      cxios_write_data_k46_hdl(CField::get(fieldid_str), data_k4, data_0size, data_1size, data_2size, data_3size, data_4size, data_5size) ;
+                             int data_3size, int data_4size, int data_5size, int tileid)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+      cxios_write_data_k46_hdl(CField::get(fieldid_str), data_k4, data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, tileid) ;
     }
    CATCH_DUMP_STACK
@@ -905,5 +908,5 @@
                              int data_0size, int data_1size, int data_2size,
                              int data_3size, int data_4size, int data_5size,
-                             int data_6size)
+                             int data_6size, int tileid)
    TRY
    {
@@ -918,5 +921,5 @@
       CArray<double, 7> data(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size);
       data = data_tmp;
-      field->setData(data);
+      field->setData(data, tileid);
 
       CTimer::get("XIOS send field").suspend();
@@ -928,10 +931,11 @@
                              int data_0size, int data_1size, int data_2size,
                              int data_3size, int data_4size, int data_5size,
-                             int data_6size)
-   TRY
-   {
-      std::string fieldid_str;
-      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
-      cxios_write_data_k47_hdl(CField::get(fieldid_str), data_k4, data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size) ;
+                             int data_6size, int tileid)
+   TRY
+   {
+      std::string fieldid_str;
+      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;
+      cxios_write_data_k47_hdl(CField::get(fieldid_str), data_k4, data_0size, data_1size, data_2size, data_3size, data_4size,
+                                data_5size, data_6size, tileid) ;
     }
    CATCH_DUMP_STACK
