Ignore:
Timestamp:
10/30/15 16:33:48 (8 years ago)
Author:
rlacroix
Message:

Field: Handle more correctly the output name for the fields with a field_ref.

If the field has an explicitly defined name (which might be inherited) then it is used as the output name.
If no name was defined but an id was set, the id is used as the output name.
If no name was defined and the id was automatically generated, the id of the field directly referenced is used as the output name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/io/nc4_data_output.cpp

    r757 r770  
    10581058                             : latid; 
    10591059*/ 
    1060          StdString fieldid   = (!field->name.isEmpty()) 
    1061                              ? field->name.getValue() : field->getBaseFieldReference()->getId(); 
     1060         StdString fieldid = field->getFieldOutputName(); 
    10621061 
    10631062//         unsigned int ssize = domain->zoom_ni_loc.getValue() * domain->zoom_nj_loc.getValue(); 
     
    13841383          if (SuperClass::type == MULTI_FILE || !isCollective) return; 
    13851384 
    1386         StdString fieldid = !field->name.isEmpty() 
    1387                           ? field->name.getValue() 
    1388                           : field->getBaseFieldReference()->getId(); 
     1385        StdString fieldid = field->getFieldOutputName(); 
    13891386 
    13901387        StdOStringStream oss; 
Note: See TracChangeset for help on using the changeset viewer.