Index: XIOS/trunk/src/config/axis_attribute.conf
===================================================================
--- XIOS/trunk/src/config/axis_attribute.conf	(revision 2253)
+++ XIOS/trunk/src/config/axis_attribute.conf	(revision 2280)
@@ -6,4 +6,5 @@
 
 DECLARE_ATTRIBUTE(StdString, unit)
+DECLARE_ATTRIBUTE(double, convert_from_factor)
 DECLARE_ATTRIBUTE(StdString, formula)
 DECLARE_ATTRIBUTE(StdString, formula_term)
Index: XIOS/trunk/src/io/inetcdf4.cpp
===================================================================
--- XIOS/trunk/src/io/inetcdf4.cpp	(revision 2253)
+++ XIOS/trunk/src/io/inetcdf4.cpp	(revision 2280)
@@ -28,4 +28,5 @@
 
     this->timeCounterName = timeCounterName;
+
     if (!CNetCdfInterface::isDimExisted(this->ncidp, this->timeCounterName)) this->timeCounterName=this->getUnlimitedDimensionName() ;
 
@@ -87,4 +88,14 @@
     CNetCdfInterface::inqAtt(grpid, varid, attname, retvalue.first, retvalue.second);
     return retvalue;
+  }
+
+  
+  bool CINetCDF4::hasUnlimitedDimension(const CVarPath* const path)
+  {
+    int dimid = 0;
+    int grpid = this->getGroup(path);
+    CNetCdfInterface::inqUnLimDim(grpid, dimid);
+    if (dimid==-1) return false ;
+    else return true ;
   }
 
@@ -174,9 +185,4 @@
   }
 
-  StdSize CINetCDF4::getNbOfTimestep(const CVarPath* const path)
-  {
-    return this->getDimensions(NULL, path)[this->getUnlimitedDimensionName(path)];
-  }
-
   std::set<StdString> CINetCDF4::getBoundVariables(const CVarPath* const path)
   {
@@ -337,4 +343,30 @@
     return false;
   }
+
+  template <class T>
+  bool CINetCDF4::hasAttribute(const StdString& name, const StdString* const var, const CVarPath* const path)
+  {
+    std::list<StdString> atts = this->getAttributes(var, path);
+    std::list<StdString>::const_iterator it = atts.begin(), end = atts.end();
+    for (; it != end; it++)
+    {
+      const StdString& attname = *it;
+      if (attname.compare(0, name.size(), name) == 0)
+      { 
+        std::pair<nc_type , StdSize> attinfos = this->getAttribute(name, var, path);
+        std::vector<T> retvalue(attinfos.second);
+        nc_type type = CNetCdfInterface::getNcType<T>();
+        if (attinfos.first == type) return true;
+        else return false ;
+      }
+    }
+    return false;
+  }
+  
+  template bool  CINetCDF4::hasAttribute<double>(const StdString& name, const StdString* const var, const CVarPath* const path);
+  template bool  CINetCDF4::hasAttribute<float>(const StdString& name, const StdString* const var, const CVarPath* const path);
+  template bool  CINetCDF4::hasAttribute<int>(const StdString& name, const StdString* const var, const CVarPath* const path);
+  template bool  CINetCDF4::hasAttribute<char>(const StdString& name, const StdString* const var, const CVarPath* const path);
+  
 
   bool CINetCDF4::hasVariable(const StdString& name,
Index: XIOS/trunk/src/io/inetcdf4.hpp
===================================================================
--- XIOS/trunk/src/io/inetcdf4.hpp	(revision 2253)
+++ XIOS/trunk/src/io/inetcdf4.hpp	(revision 2280)
@@ -40,5 +40,4 @@
 
       /// Getters ///
-      StdSize getNbOfTimestep(const CVarPath* const path = NULL);
 
       StdString getUnlimitedDimensionName(const CVarPath* const path = NULL);
@@ -112,5 +111,7 @@
       /// Tests ///
       bool hasMissingValue(const StdString& name, const CVarPath* const path = NULL);
-
+      bool hasAttribute(const StdString& name, const StdString* const var  = NULL, const CVarPath* const path = NULL);
+      
+      template <class T>
       bool hasAttribute(const StdString& name, const StdString* const var  = NULL, const CVarPath* const path = NULL);
 
@@ -144,4 +145,6 @@
       int getDimension(const StdString& dimname, const CVarPath* const path = NULL);
       int getUnlimitedDimension(const CVarPath* const path = NULL);
+      bool hasUnlimitedDimension(const CVarPath* const path = NULL);
+
       int getAttributeId(const StdString& name,
                          const StdString* const var = NULL,
Index: XIOS/trunk/src/io/nc4_data_input.cpp
===================================================================
--- XIOS/trunk/src/io/nc4_data_input.cpp	(revision 2253)
+++ XIOS/trunk/src/io/nc4_data_input.cpp	(revision 2280)
@@ -35,5 +35,4 @@
     if (SuperClassWriter::isTemporal(fieldId))
     {
-//      return SuperClassWriter::getDimensions(&fieldId)[SuperClassWriter::getUnlimitedDimensionName()];
       return SuperClassWriter::getDimensions(&fieldId)[SuperClassWriter::getTimeCounterName()];
     }
@@ -159,5 +158,5 @@
     if (SuperClassWriter::isTemporal(fieldId))
     {
-      dimSizeMap.erase(SuperClassWriter::getUnlimitedDimensionName());
+      dimSizeMap.erase(SuperClassWriter::getTimeCounterName());
       dimList.pop_front() ;  // assume time dimension is first
     }
@@ -195,4 +194,21 @@
         listDimSize.push_front(*dimSizeMap.find(*it));
     }
+    
+    // read specific field attribute
+    if (field->add_offset.isEmpty())
+    {
+      if (SuperClassWriter::hasAttribute<float>("add_offset",&fieldId)) 
+        field->add_offset =  SuperClassWriter::getAttributeValue<float>("add_offset",&fieldId)[0] ;
+      else if (SuperClassWriter::hasAttribute<double>("add_offset",&fieldId))
+        field->add_offset =  SuperClassWriter::getAttributeValue<double>("add_offset",&fieldId)[0] ;
+    }
+
+    if (field->scale_factor.isEmpty())
+    {
+      if (SuperClassWriter::hasAttribute<float>("scale_factor",&fieldId)) 
+        field->scale_factor =  SuperClassWriter::getAttributeValue<float>("scale_factor",&fieldId)[0] ;
+      else if (SuperClassWriter::hasAttribute<double>("scale_factor",&fieldId))
+        field->scale_factor =  SuperClassWriter::getAttributeValue<double>("scale_factor",&fieldId)[0] ;
+    }
 
     // Now process domain and axis
@@ -579,5 +595,7 @@
         if (!axis->n.isEmpty()) n = axis->n.getValue();
         axis->value.resize(n);
-        for (int i = 0; i < n; ++i) axis->value(i) = readAxisValue(begin + i);
+        double convertFromFactor=1.0 ;
+        if (!axis->convert_from_factor.isEmpty()) convertFromFactor = axis->convert_from_factor ;
+        for (int i = 0; i < n; ++i) axis->value(i) = readAxisValue(begin + i)*convertFromFactor;
       }
     }
