Changeset 1553 for XIOS/trunk/src/io/nc4_data_input.cpp
- Timestamp:
- 06/28/18 17:53:42 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/io/nc4_data_input.cpp
r1486 r1553 63 63 case ONE_FILE: 64 64 { 65 /*66 std::vector<int> nZoomBeginGlobal = grid->getDistributionServer()->getZoomBeginGlobal();67 std::vector<int> nZoomBeginServer = grid->getDistributionServer()->getZoomBeginServer();68 std::vector<int> nZoomSizeServer = grid->getDistributionServer()->getZoomSizeServer();69 70 int ssize = nZoomBeginGlobal.size();71 72 std::vector<StdSize> start(ssize);73 std::vector<StdSize> count(ssize);74 75 for (int i = 0; i < ssize; ++i)76 {77 start[i] = nZoomBeginServer[ssize - i - 1] - nZoomBeginGlobal[ssize - i - 1];78 count[i] = nZoomSizeServer[ssize - i - 1];79 }80 */81 82 std::vector<int> nZoomBeginGlobal = grid->getDistributionServer()->getZoomBeginGlobal();83 std::vector<int> nZoomBeginServer = grid->getDistributionServer()->getZoomBeginServer();84 std::vector<int> nZoomSizeServer = grid->getDistributionServer()->getZoomSizeServer();85 86 65 std::vector<StdSize> start, count; 87 66 … … 91 70 int numElement = axisDomainOrder.numElements(); 92 71 int idxDomain = domainList.size() - 1, idxAxis = axisList.size() - 1; 93 int idx = nZoomBeginGlobal.size() - 1;94 95 start.reserve( nZoomBeginGlobal.size());96 count.reserve( nZoomBeginGlobal.size());72 int idx = domainList.size() * 2 + axisList.size() - 1; 73 74 start.reserve(idx+1); 75 count.reserve(idx+1); 97 76 98 77 for (int i = numElement - 1; i >= 0; --i) … … 103 82 if ((domain->type) != CDomain::type_attr::unstructured) 104 83 { 105 start.push_back( nZoomBeginServer[idx] - nZoomBeginGlobal[idx]);106 count.push_back( nZoomSizeServer[idx]);84 start.push_back(domain->jbegin); 85 count.push_back(domain->nj); 107 86 } 108 87 --idx ; 109 start.push_back(nZoomBeginServer[idx] - nZoomBeginGlobal[idx]); 110 count.push_back(nZoomSizeServer[idx]); 88 start.push_back(domain->ibegin); 89 count.push_back(domain->ni); 90 111 91 --idx ; 112 92 --idxDomain; … … 114 94 else if (1 == axisDomainOrder(i)) 115 95 { 116 start.push_back(nZoomBeginServer[idx] - nZoomBeginGlobal[idx]); 117 count.push_back(nZoomSizeServer[idx]); 96 CAxis* axis = CAxis::get(axisList[idxAxis]); 97 start.push_back(axis->begin); 98 count.push_back(axis->n); 118 99 --idx; 119 100 }
Note: See TracChangeset
for help on using the changeset viewer.