Changeset 1589 for XIOS/dev/dev_olga/src/io
- Timestamp:
- 11/05/18 13:57:52 (6 years ago)
- Location:
- XIOS/dev/dev_olga/src/io
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_olga/src/io/nc4_data_input.cpp
r1577 r1589 494 494 domain->ni_glo.setValue(itMapNi->second); 495 495 } 496 497 // determine if coordinates values are present in file 498 if ((CDomain::type_attr::rectilinear == domain->type)) 499 { 500 // Ok, try to read some attributes such as longitude and latitude 501 domain->hasLatInReadFile_ = SuperClassWriter::hasVariable(itMapNj->first); 502 domain->hasLonInReadFile_ = SuperClassWriter::hasVariable(itMapNi->first); 503 } 504 else if ((CDomain::type_attr::curvilinear == domain->type) || (CDomain::type_attr::unstructured == domain->type) ) 505 { 506 StdString latName = this->getLatCoordName(fieldId); 507 domain->hasLatInReadFile_ = SuperClassWriter::hasVariable(latName) ; 508 StdString lonName = this->getLonCoordName(fieldId); 509 domain->hasLonInReadFile_ = SuperClassWriter::hasVariable(lonName) ; 510 StdString boundsLatName = this->getBoundsId(latName); 511 domain->hasBoundsLatInReadFile_ = SuperClassWriter::hasVariable(boundsLatName) ; 512 StdString boundsLonName = this->getBoundsId(lonName); 513 domain->hasBoundsLonInReadFile_ = SuperClassWriter::hasVariable(boundsLonName) ; 514 } 496 515 } 497 516 -
XIOS/dev/dev_olga/src/io/nc4_data_output.cpp
r1571 r1589 166 166 for (int idx = 0; idx < nbWritten; ++idx) 167 167 { 168 if (indexToWrite(idx) < 0) 169 { 170 writtenLat(idx) = -1.; // hole 171 writtenLon(idx) = -1.; 172 } 173 else 174 { 175 writtenLat(idx) = domain->latvalue(indexToWrite(idx)); 176 writtenLon(idx) = domain->lonvalue(indexToWrite(idx)); 177 } 178 } 179 168 if (indexToWrite(idx) < 0) 169 { 170 writtenLat(idx) = -1.; // hole 171 writtenLon(idx) = -1.; 172 } 173 else 174 { 175 writtenLat(idx) = domain->latvalue(indexToWrite(idx)); 176 writtenLon(idx) = domain->lonvalue(indexToWrite(idx)); 177 } 178 } 180 179 181 180 if (domain->hasBounds) … … 999 998 for (int idx = 0; idx < nbWritten; ++idx) 1000 999 { 1001 1002 writtenArea(idx) = -1.;1003 1004 1000 if (indexToWrite(idx) < 0) 1001 writtenArea(idx) = -1.; 1002 else 1003 writtenArea(idx) = domain->areavalue(indexToWrite(idx)); 1005 1004 } 1006 1005 } … … 1329 1328 axis_bounds(0, i) = axis->bounds(0, int(indexToWrite(i))); 1330 1329 axis_bounds(1, i) = axis->bounds(1, int(indexToWrite(i))); 1331 1332 1330 } 1333 1331 }
Note: See TracChangeset
for help on using the changeset viewer.