--------------------------------------------------------------------------------------------------
| 263 | |
| 264 | //-------------------------------------------------------------------------------------------------- |
| 265 | bool vtkNetCDFUGRIDReader::Open() |
| 266 | { |
| 267 | if (!this->FileName) |
| 268 | { |
| 269 | vtkErrorMacro("No filename specified."); |
| 270 | return false; |
| 271 | } |
| 272 | |
| 273 | this->Close(); |
| 274 | |
| 275 | int id{}; |
| 276 | int error{ nc_open(this->FileName, 0, &id) }; |
| 277 | if (error != NC_NOERR) |
| 278 | { |
| 279 | vtkErrorMacro("Failed to open file \"" << this->FileName << "\": " << nc_strerror(error)); |
| 280 | return false; |
| 281 | } |
| 282 | |
| 283 | this->NcId = id; |
| 284 | |
| 285 | return true; |
| 286 | } |
| 287 | |
| 288 | //-------------------------------------------------------------------------------------------------- |
| 289 | bool vtkNetCDFUGRIDReader::ParseHeader() |
no test coverage detected