Changeset 1310
- Timestamp:
- 10/24/17 10:51:51 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/io/nc4_data_input.cpp
r1256 r1310 492 492 493 493 { // Read axis value 494 std::vector<StdSize> nBegin(1, 0), nSize(1, itMapN->second); 495 CArray<double,1> readAxisValue(itMapN->second); 496 readFieldVariableValue(readAxisValue, itMapN->first, nBegin, nSize, true); 497 int begin = 0, n = itMapN->second; 498 if (!axis->begin.isEmpty()) begin = axis->begin.getValue(); 499 if (!axis->n.isEmpty()) n = axis->n.getValue(); 500 axis->value.resize(n); 501 for (int i = 0; i < n; ++i) axis->value(i) = readAxisValue(begin + i); 494 bool hasValue = SuperClassWriter::hasVariable(itMapN->first); 495 if (hasValue) 496 { 497 std::vector<StdSize> nBegin(1, 0), nSize(1, itMapN->second); 498 CArray<double,1> readAxisValue(itMapN->second); 499 readFieldVariableValue(readAxisValue, itMapN->first, nBegin, nSize, true); 500 int begin = 0, n = itMapN->second; 501 if (!axis->begin.isEmpty()) begin = axis->begin.getValue(); 502 if (!axis->n.isEmpty()) n = axis->n.getValue(); 503 axis->value.resize(n); 504 for (int i = 0; i < n; ++i) axis->value(i) = readAxisValue(begin + i); 505 } 502 506 } 503 507 }
Note: See TracChangeset
for help on using the changeset viewer.