Changeset 772


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

Axis/Domain?: Use the new infrastructure to get the output name.

Location:
XIOS/trunk/src
Files:
3 edited

Legend:

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

    r770 r772  
    7171 
    7272         std::vector<StdString> dim0, dim1; 
    73          StdString domid     = (!domain->name.isEmpty()) 
    74                              ? domain->name.getValue() : domain->getId(); 
     73         StdString domid = domain->getDomainOutputName(); 
    7574         StdString appendDomid  = (singleDomain) ? "" : "_"+domid ; 
    7675         if (isWrittenDomain(domid)) return ; 
     
    449448 
    450449         std::vector<StdString> dim0, dim1; 
    451          StdString domid     = (!domain->name.isEmpty()) 
    452                              ? domain->name.getValue() : domain->getId(); 
     450         StdString domid = domain->getDomainOutputName(); 
    453451         if (isWrittenDomain(domid)) return ; 
    454452         else writtenDomains.insert(domid) ; 
     
    637635 
    638636        std::vector<StdString> dims; 
    639         StdString axisid = !axis->name.isEmpty() ? axis->name.getValue() : axis->getId(); 
     637        StdString axisid = axis->getAxisOutputName(); 
    640638        if (isWrittenAxis(axisid)) return ; 
    641639        else writtenAxis.insert(axisid) ; 
     
    759757             { 
    760758               CDomain* domain = CDomain::get(domainList[domainList.size() - idxDomain - 1]); 
    761                StdString domId = !domain->name.isEmpty() ? domain->name.getValue() : domain->getId(); 
     759               StdString domId = domain->getDomainOutputName(); 
    762760               StdString appendDomId  = singleDomain ? "" : "_" + domId; 
    763761 
     
    779777             { 
    780778               CAxis* axis = CAxis::get(axisList[axisList.size() - idxAxis - 1]); 
    781                compress << (!axis->name.isEmpty() ? axis->name.getValue() : axis->getId()); 
     779               compress << axis->getAxisOutputName(); 
    782780               ++idxAxis; 
    783781             } 
     
    837835                 continue; 
    838836 
    839                StdString domId = !domain->name.isEmpty() ? domain->name.getValue() : domain->getId(); 
     837               StdString domId = domain->getDomainOutputName(); 
    840838               StdString appendDomId  = singleDomain ? "" : "_" + domId; 
    841839 
     
    871869                 continue; 
    872870 
    873                StdString axisId = !axis->name.isEmpty() ? axis->name.getValue() : axis->getId(); 
     871               StdString axisId = axis->getAxisOutputName(); 
    874872               varId = axisId + "_points"; 
    875873               compress = axisId; 
     
    987985           { 
    988986             CDomain* domain = CDomain::get(domainList[idxDomain]); 
    989              StdString domId = !domain->name.isEmpty() ? domain->name.getValue() : domain->getId(); 
     987             StdString domId = domain->getDomainOutputName(); 
    990988             StdString appendDomId  = singleDomain ? "" : "_" + domId ; 
    991989 
     
    10351033           { 
    10361034             CAxis* axis = CAxis::get(axisList[idxAxis]); 
    1037              StdString axisId = !axis->name.isEmpty() ? axis->name.getValue() : axis->getId(); 
     1035             StdString axisId = axis->getAxisOutputName(); 
    10381036 
    10391037             if (compressedOutput && axis->isCompressible()) 
  • XIOS/trunk/src/node/axis.cpp

    r771 r772  
    891891      for (size_t i = 0; i < refAxis.size(); ++i) 
    892892        refAxis[i]->setTransformations(axis->getAllTransformations()); 
    893  
    894     // Try to inherit the id of the referenced object as the axis name 
    895     // when no name was been defined and a defaut id is used. 
    896     if (name.isEmpty()) 
    897     { 
    898       static const std::string defId("__axis_undef_id_"); 
    899       const std::string& id = getId(); 
    900       if (id.size() > defId.size() && id.compare(0, defId.size(), defId) == 0) 
    901         name = axis->getId(); 
    902     } 
    903893  } 
    904894 
  • XIOS/trunk/src/node/domain.cpp

    r764 r772  
    18291829      for (size_t i = 0; i < refDomains.size(); ++i) 
    18301830        refDomains[i]->setTransformations(domain->getAllTransformations()); 
    1831  
    1832     // Try to inherit the id of the referenced object as the domain name 
    1833     // when no name was been defined and a defaut id is used. 
    1834     if (name.isEmpty()) 
    1835     { 
    1836       static const std::string defId("__domain_undef_id_"); 
    1837       const std::string& id = getId(); 
    1838       if (id.size() > defId.size() && id.compare(0, defId.size(), defId) == 0) 
    1839         name = domain->getId(); 
    1840     } 
    18411831  } 
    18421832 
Note: See TracChangeset for help on using the changeset viewer.