Ignore:
Timestamp:
11/18/16 15:04:43 (7 years ago)
Author:
mhnguyen
Message:

Some modifications to make sure there is no strange _undefined_id_ name appearing in netcdf file

+) Improve the algo to search for correct name
+) Some minor changes in code

Test
+) On Curie
+) Names are correct as they should be.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/declare_ref_func.hpp

    r962 r996  
    5151    SuperClassAttribute::setAttributes(refer_ptr, apply);              \ 
    5252  }                                                                    \ 
     53  if (this->hasAttribute("name") && this->name.isEmpty()) \ 
     54    this->name.setValue(this->get##type##OutputName());                \ 
    5355}                                                                      \ 
    5456                                                                       \ 
     
    102104      tmp_ptr = refer_ptr;                                             \ 
    103105      refer_ptr = tmp_ptr->getDirect##type##Reference();               \ 
    104       if (refer_ptr->hasDirect##type##Reference())                     \ 
     106      if (refer_ptr->hasAutoGeneratedId() &&                           \ 
     107          refer_ptr->hasDirect##type##Reference())                     \ 
    105108        nameRef = refer_ptr->name_##_ref;                              \ 
     109      else {                                                           \ 
     110        nameRef = refer_ptr->getId(); break;                           \ 
     111      }                                                                \ 
    106112      if (tmpRefObjects.end() != tmpRefObjects.find(refer_ptr))        \ 
    107113      {                                                                \ 
Note: See TracChangeset for help on using the changeset viewer.