Ignore:
Timestamp:
02/03/14 14:16:20 (10 years ago)
Author:
ymipsl
Message:

Enhancement : user defined global and field attribute can be output in the netcdfcf file.
A variable child element inclosed into a file element will be output as a global file attribute.
A variable child element inclosed into a field element will be output as a field attribute.

+ variable fortran interface added

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/variable.cpp

    r389 r472  
    6161      oss << "</" << CVariable::GetName() << " >"; 
    6262      return (oss.str()); 
     63   }  
     64    
     65   CVariable::EVarType CVariable::getVarType(void) const 
     66   { 
     67     EVarType ret ; 
     68      
     69     if (type.isEmpty()) ret=t_undefined ; 
     70     else 
     71     { 
     72       string varType=boost::to_lower_copy(boost::trim_copy(type.getValue())) ; 
     73       if (varType=="int") ret=t_int ; 
     74       else if (varType=="short int" || varType=="short") ret=t_short_int ; 
     75       else if (varType=="long int" || varType=="long") ret=t_long_int ; 
     76       else if (varType=="float") ret=t_float ; 
     77       else if (varType=="double") ret=t_double ; 
     78       else if (varType=="long double") ret=t_long_double ; 
     79       else if (varType=="bool") ret=t_bool ; 
     80       else if (varType=="long double") ret=t_long_double ; 
     81       else if (varType=="string") ret=t_string ; 
     82     } 
     83     return ret ; 
    6384   } 
     85        
    6486/* 
    6587   void CVariable::toBinary(StdOStream & os) const 
Note: See TracChangeset for help on using the changeset viewer.