Changeset 1235 for XIOS/dev/XIOS_DEV_CMIP6/src/io
- Timestamp:
- 08/03/17 15:50:40 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/io/nc4_data_output.cpp
r1222 r1235 1136 1136 int zoom_size = (MULTI_FILE == SuperClass::type) ? axis->zoom_n 1137 1137 : axis->global_zoom_n; 1138 int zoom_begin = (MULTI_FILE == SuperClass::type) ? axis->zoom_begin 1139 : axis->global_zoom_begin; 1138 1139 int zoom_count = axis->zoom_n; 1140 int zoom_begin = axis->zoom_begin; 1141 // int zoom_begin = (MULTI_FILE == SuperClass::type) ? axis->global_zoom_begin 1142 // : axis->zoom_begin; 1140 1143 1141 1144 if ((0 == axis->zoom_n) && (MULTI_FILE == SuperClass::type)) return; … … 1148 1151 nc_type typePrec ; 1149 1152 if (axis->prec.isEmpty()) typePrec = NC_FLOAT ; 1150 else if (axis->prec==4) typePrec = NC_FLOAT ;1153 else if (axis->prec==4) typePrec = NC_FLOAT ; 1151 1154 else if (axis->prec==8) typePrec = NC_DOUBLE ; 1152 1155 … … 1198 1201 for (int i = 0; i < nbWritten; i++) axis_value(i) = axis->value(indexToWrite(i)); 1199 1202 CArray<double,2> axis_bounds; 1203 CArray<string,1> axis_label; 1204 if (!axis->label.isEmpty()) 1205 { 1206 axis_label.resize(indexToWrite.numElements()); 1207 for (int i = 0; i < nbWritten; i++) axis_label(i) = axis->label(indexToWrite(i)); 1208 } 1200 1209 1201 1210 switch (SuperClass::type) … … 1203 1212 case MULTI_FILE: 1204 1213 { 1205 SuperClassWriter::writeData(axis_value, axisid, isCollective, 0); 1214 if (axis->label.isEmpty()) 1215 SuperClassWriter::writeData(axis_value, axisid, isCollective, 0); 1206 1216 1207 1217 if (!axis->bounds.isEmpty() && axis->label.isEmpty()) … … 1209 1219 1210 1220 // Need to check after 1211 if (! axis->label.isEmpty()) SuperClassWriter::writeData(axis->label_srv, axisid, isCollective, 0); 1221 if (!axis->label.isEmpty()) 1222 SuperClassWriter::writeData(axis_label, axisid, isCollective, 0); 1212 1223 1213 1224 SuperClassWriter::definition_start(); … … 1219 1230 std::vector<StdSize> count(1), countBounds(2) ; 1220 1231 start[0] = startBounds[0] = zoom_begin - axis->global_zoom_begin; 1221 count[0] = countBounds[0] = zoom_ size;1232 count[0] = countBounds[0] = zoom_count; // zoom_size 1222 1233 startBounds[1] = 0; 1223 1234 countBounds[1] = 2; 1224 SuperClassWriter::writeData(axis_value, axisid, isCollective, 0, &start, &count); 1225 1226 if (!axis->bounds.isEmpty()&& axis->label.isEmpty()) 1235 1236 if (axis->label.isEmpty()) 1237 SuperClassWriter::writeData(axis_value, axisid, isCollective, 0, &start, &count); 1238 1239 if (!axis->bounds.isEmpty() && axis->label.isEmpty()) 1227 1240 { 1228 1241 axis_bounds.resize(2, indexToWrite.numElements()); … … 1236 1249 1237 1250 // Need to check after 1238 if (! axis->label.isEmpty()) SuperClassWriter::writeData(axis->label_srv, axisid, isCollective, 0); 1251 if (!axis->label.isEmpty()) 1252 { 1253 std::vector<StdSize> startLabel(2), countLabel(2); 1254 startLabel[0] = start[0]; startLabel[1] = 0; 1255 countLabel[0] = count[0]; countLabel[1] = stringArrayLen; 1256 SuperClassWriter::writeData(axis_label, axisid, isCollective, 0, &startLabel, &countLabel); 1257 } 1239 1258 1240 1259 SuperClassWriter::definition_start();
Note: See TracChangeset
for help on using the changeset viewer.