| 1256 | //------------------------------------------------------------------------------ |
| 1257 | |
| 1258 | int vtkMPASReader::GetNcDims() |
| 1259 | { |
| 1260 | int dimid; |
| 1261 | |
| 1262 | CHECK_DIM("nCells", dimid); |
| 1263 | if (this->Internals->nc_err(nc_inq_dimlen(this->Internals->ncFile, dimid, &this->NumberOfPoints))) |
| 1264 | { |
| 1265 | return 0; |
| 1266 | } |
| 1267 | this->PointOffset = 1; |
| 1268 | |
| 1269 | CHECK_DIM("nVertices", dimid); |
| 1270 | if (this->Internals->nc_err(nc_inq_dimlen(this->Internals->ncFile, dimid, &this->NumberOfCells))) |
| 1271 | { |
| 1272 | return 0; |
| 1273 | } |
| 1274 | this->CellOffset = 0; |
| 1275 | |
| 1276 | CHECK_DIM("vertexDegree", dimid); |
| 1277 | if (this->Internals->nc_err(nc_inq_dimlen(this->Internals->ncFile, dimid, &this->PointsPerCell))) |
| 1278 | { |
| 1279 | return 0; |
| 1280 | } |
| 1281 | |
| 1282 | CHECK_DIM("Time", dimid); |
| 1283 | if (this->Internals->nc_err( |
| 1284 | nc_inq_dimlen(this->Internals->ncFile, dimid, &this->NumberOfTimeSteps))) |
| 1285 | { |
| 1286 | return 0; |
| 1287 | } |
| 1288 | |
| 1289 | if ((dimid = this->Internals->nc_dim_id(this->VerticalDimension.c_str())) != -1) |
| 1290 | { |
| 1291 | if (this->Internals->nc_err( |
| 1292 | nc_inq_dimlen(this->Internals->ncFile, dimid, &this->MaximumNVertLevels))) |
| 1293 | { |
| 1294 | return 0; |
| 1295 | } |
| 1296 | } |
| 1297 | else |
| 1298 | { |
| 1299 | this->MaximumNVertLevels = 0; |
| 1300 | } |
| 1301 | |
| 1302 | return 1; |
| 1303 | } |
| 1304 | |
| 1305 | //------------------------------------------------------------------------------ |
| 1306 | int vtkMPASReader::GetNcAtts() |
no test coverage detected