Index: python/lib/gio.cxx
===================================================================
--- python/lib/gio.cxx	(revision bd84570ee06b44e0409f1ad472cd8c1d40af4086)
+++ python/lib/gio.cxx	(revision 9796d0ae22439e4f941af2d8257dd2e1470d88a1)
@@ -43,15 +43,15 @@
 #include <iostream>
 
-  void read_gio_float(char* file_name, char* var_name, float* data){
-    read_gio<float>(file_name,var_name,data);
+  void read_gio_float(char* file_name, char* var_name, float* data, int field_count){
+    read_gio<float>(file_name,var_name,data,field_count);
   }
-  void read_gio_double(char* file_name, char* var_name, double* data){
-    read_gio<double>(file_name,var_name,data);
+  void read_gio_double(char* file_name, char* var_name, double* data, int field_count){
+    read_gio<double>(file_name,var_name,data,field_count);
   }
-  void read_gio_int32(char* file_name, char* var_name, int* data){
-    read_gio<int>(file_name,var_name,data);
+  void read_gio_int32(char* file_name, char* var_name, int* data, int field_count){
+    read_gio<int>(file_name,var_name,data,field_count);
   }
-  void read_gio_int64(char* file_name, char* var_name, int64_t* data){
-    read_gio<int64_t>(file_name,var_name,data);
+  void read_gio_int64(char* file_name, char* var_name, int64_t* data, int field_count){
+    read_gio<int64_t>(file_name,var_name,data,field_count);
   }
   
@@ -77,11 +77,11 @@
       gio::GenericIO::VariableInfo vinfo = VI[i];
       if(vinfo.Name == var_name){
-	if(vinfo.IsFloat && vinfo.Size == 4)
+	if(vinfo.IsFloat && vinfo.ElementSize == 4)
 	  return float_type;
-	else if(vinfo.IsFloat && vinfo.Size == 8)
+	else if(vinfo.IsFloat && vinfo.ElementSize == 8)
 	  return double_type;
-	else if(!vinfo.IsFloat && vinfo.Size == 4)
+	else if(!vinfo.IsFloat && vinfo.ElementSize == 4)
 	  return int32_type;
-	else if(!vinfo.IsFloat && vinfo.Size == 8)
+	else if(!vinfo.IsFloat && vinfo.ElementSize == 8)
 	  return int64_type;
 	else
@@ -91,4 +91,20 @@
     return var_not_found;
       
+  }
+
+  int get_variable_field_count(char* file_name,char* var_name){
+   gio::GenericIO reader(file_name);
+   std::vector<gio::GenericIO::VariableInfo> VI;
+   reader.openAndReadHeader(gio::GenericIO::MismatchAllowed);
+   reader.getVariableInfo(VI);
+
+   int num =VI.size();
+    for(int i =0;i<num;++i){
+      gio::GenericIO::VariableInfo vinfo = VI[i];
+      if(vinfo.Name == var_name) {
+        return vinfo.Size/vinfo.ElementSize;
+      }
+    }
+    return 0;
   }
 
@@ -110,5 +126,9 @@
     else
       std::cout<<"[i";
-    std::cout<<" "<<vinfo.Size*8<<"] ";
+    int NumElements = vinfo.Size/vinfo.ElementSize;
+    std::cout<<" "<<vinfo.ElementSize*8;
+    if (NumElements > 1)
+      std::cout<<"x"<<NumElements;
+    std::cout<<"] ";
     std::cout<<vinfo.Name<<std::endl;
   }
Index: python/lib/gio.h
===================================================================
--- python/lib/gio.h	(revision bd84570ee06b44e0409f1ad472cd8c1d40af4086)
+++ python/lib/gio.h	(revision 9796d0ae22439e4f941af2d8257dd2e1470d88a1)
@@ -46,5 +46,5 @@
 
 template <class T>
-void read_gio(char* file_name, std::string var_name, T*& data){
+void read_gio(char* file_name, std::string var_name, T*& data, int field_count){
   gio::GenericIO reader(file_name);
   reader.openAndReadHeader(gio::GenericIO::MismatchAllowed);
@@ -57,11 +57,12 @@
       max_size = rank_size[i];
   }
-  T* rank_data = new T[max_size+reader.requestedExtraSpace()/sizeof(T)];
+  T* rank_data = new T[max_size*field_count+reader.requestedExtraSpace()/sizeof(T)];
   int64_t offset =0;
-  reader.addVariable(var_name,rank_data,true);
+  reader.addScalarizedVariable(var_name,rank_data,field_count,
+                               gio::GenericIO::VarHasExtraSpace);
   for(int i=0;i<num_ranks;++i){
     reader.readData(i,false);
-    std::copy(rank_data,rank_data+rank_size[i],data+offset);
-    offset +=rank_size[i];
+    std::copy(rank_data,rank_data+rank_size[i]*field_count,data+offset);
+    offset +=rank_size[i]*field_count;
   }
   delete [] rank_data;
@@ -70,8 +71,8 @@
 extern "C" int64_t get_elem_num(char* file_name);
 
-extern "C" void read_gio_float (char* file_name, char* var_name, float* data);
-extern "C" void read_gio_double(char* file_name, char* var_name, double* data);
-extern "C" void read_gio_int32 (char* file_name, char* var_name, int* data); 
-extern "C" void read_gio_int64 (char* file_name, char* var_name, int64_t* data);
+extern "C" void read_gio_float (char* file_name, char* var_name, float* data, int field_count);
+extern "C" void read_gio_double(char* file_name, char* var_name, double* data, int field_count);
+extern "C" void read_gio_int32 (char* file_name, char* var_name, int* data, int field_count); 
+extern "C" void read_gio_int64 (char* file_name, char* var_name, int64_t* data, int field_count);
 enum var_type{
   float_type=0,
@@ -83,3 +84,4 @@
 };
 extern "C" var_type get_variable_type(char* file_name,char* var_name);
+extern "C" int get_variable_field_count(char* file_name,char* var_name);
 extern "C" void inspect_gio(char* file_name);
