Ignore:
Timestamp:
12/16/14 12:55:53 (9 years ago)
Author:
mhnguyen
Message:

Reorganizing structure of grid

+) Grid doesn't have domain_ref and axis_ref anymore.
All domain and axis of a grid must be inside grid (These domain and axis can be defined or refer to others)
+) Grid contains list of domain and axis
+) Reorder some functions to make sure new functionlities work

Test
+) On Curie
+) Mode attached and detached
+) Only test_new_features
+) Passed

File:
1 edited

Legend:

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

    r538 r540  
    489489         std::vector<StdString> dims; 
    490490         StdString axisid = (!axis->name.isEmpty()) 
    491                            ? axis->name.getValue() : axis->getId(); 
     491                             ? axis->name.getValue() : axis->getId(); 
    492492         try 
    493493         { 
     
    504504 
    505505                 SuperClassWriter::addAttribute("axis", StdString("Z"), &axisid); 
     506 
     507                 if (!axis->name.isEmpty()) 
     508                    SuperClassWriter::addAttribute 
     509                       ("name", axis->name.getValue(), &axisid); 
    506510 
    507511                 if (!axis->standard_name.isEmpty()) 
     
    644648         } 
    645649 
    646          if (!grid->axis_ref.isEmpty()) 
    647          { 
    648             CAxis* axis = grid->axis ; 
    649             StdString axisid = (!axis->name.isEmpty()) ? axis->name.getValue() : axis->getId(); 
    650             dims.push_back(axisid); 
    651             coodinates.push_back(axisid); 
     650         std::vector<StdString> axisList = grid->getAxisList(); 
     651         if (!axisList.empty()) 
     652         { 
     653           std::vector<StdString>::const_iterator itAxis = axisList.begin(), iteAxis = axisList.end(); 
     654           for (; itAxis != iteAxis; ++itAxis) 
     655           { 
     656             CAxis* axis = CAxis::get(*itAxis); 
     657             StdString axisid = (!axis->name.isEmpty()) 
     658                                ? axis->name.getValue() : axis->getId(); 
     659 
     660             dims.push_back(axisid); 
     661             coodinates.push_back(axisid); 
     662           } 
    652663         } 
    653664 
Note: See TracChangeset for help on using the changeset viewer.