Changeset 540 for XIOS/trunk/src/data_output.cpp
- Timestamp:
- 12/16/14 12:55:53 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/data_output.cpp
r501 r540 16 16 void CDataOutput::writeGrid(CGrid* grid) 17 17 { 18 if (grid->domain_ref.isEmpty()) 19 ERROR("CDataOutput::writeGrid(grid)", 20 << " domain is not defined !"); 21 22 if (grid->axis_ref.isEmpty()) 23 { 24 this->writeGrid(CDomain::get(grid->domain_ref.getValue())); 25 } 26 else 27 { 28 this->writeGrid(CDomain::get(grid->domain_ref.getValue()), 29 CAxis::get(grid->axis_ref.getValue())); 30 } 18 // if (grid->domain_ref.isEmpty()) 19 // ERROR("CDataOutput::writeGrid(grid)", 20 // << " domain is not defined !"); 21 // 22 // if (grid->axis_ref.isEmpty()) 23 // { 24 // this->writeGrid(CDomain::get(grid->domain_ref.getValue())); 25 // } 26 // else 27 // { 28 // this->writeGrid(CDomain::get(grid->domain_ref.getValue()), 29 // CAxis::get(grid->axis_ref.getValue())); 30 // } 31 // this->writeGrid(grid->domain, grid->axis); 32 this->writeGrid(grid->getDomains(), grid->getAxis()); 31 33 } 32 34 … … 61 63 } 62 64 65 void CDataOutput::writeGrid(std::vector<CDomain*> domains, std::vector<CAxis*> axis) 66 { 67 int domSize = domains.size(); 68 int aSize = axis.size(); 69 for (int i = 0; i < domSize; ++i) this->writeDomain_(domains[i]); 70 for (int i = 0; i < aSize; ++i) this->writeAxis_(axis[i]); 71 } 72 63 73 //---------------------------------------------------------------- 64 74 … … 79 89 CContext* context = CContext::getCurrent() ; 80 90 boost::shared_ptr<CCalendar> calendar = context->getCalendar(); 81 91 82 92 this->writeField_(field); 83 93 this->writeTimeAxis_(field, calendar); … … 90 100 this->writeGrid(field->getRelGrid()); 91 101 } 92 102 93 103 //---------------------------------------------------------------- 94 104 95 105 void CDataOutput::writeFieldData(CField* field) 96 106 { 97 CGrid* grid = CGrid::get(field->grid_ref.getValue());98 CDomain* domain = CDomain::get(grid->domain_ref.getValue());107 // CGrid* grid = CGrid::get(field->grid_ref.getValue()); 108 // CDomain* domain = CDomain::get(grid->domain_ref.getValue()); 99 109 this->writeFieldData_(field); 100 110 } 101 111 102 112 ///---------------------------------------------------------------- 103 113
Note: See TracChangeset
for help on using the changeset viewer.