|
NEP 4.3.0
NetCDF Expansion Pack
|
Empty-file open and validation for the nxCDF backend. More...
Functions | |
| int | NXCDF_open (const char *path, int mode, int basepe, size_t *chunksizehintp, void *parameters, const NC_Dispatch *dispatch, int ncid) |
| Open an existing nxCDF file. | |
Empty-file open and validation for the nxCDF backend.
| int NXCDF_open | ( | const char * | path, |
| int | mode, | ||
| int | basepe, | ||
| size_t * | chunksizehintp, | ||
| void * | parameters, | ||
| const NC_Dispatch * | dispatch, | ||
| int | ncid ) |
Open an existing nxCDF file.
Dispatch-table entry behind nc_open() with NC_NXCDF: opens the HDF5 file, validates the marker attributes and loads all metadata.
This is the dispatch-table entry netcdf-c calls when a user calls nc_open() with NC_NXCDF in the mode flags. The file must already exist and be a real HDF5 file: nxCDF files are ordinary HDF5 files carrying a small set of hidden bookkeeping attributes, so H5Fis_hdf5() is used as the file-type check.
The function registers the file's in-memory state (NXCDF_FILE_INFO_T), opens the HDF5 file and its root group, verifies the _NxcdfBackend marker attribute, and finally calls NXCDF_load_metadata() to rebuild the netCDF metadata tree (dimensions, variables, attributes, types) by walking the HDF5 contents. See nxCDF Architecture for the big picture.
| path | File-system path to open. |
| mode | NetCDF open-mode flags (NC_WRITE selects read/write). |
| basepe | Base processing element; currently ignored. |
| chunksizehintp | Chunk-size hint; currently ignored. |
| parameters | Non-NULL when the user called nc_open_par(): points at an NXCDF_MPI_INFO carrying the MPI communicator and info handle. nc_open_par() imposes no extra mode flag beyond NC_NXCDF. |
| dispatch | Dispatch table selected by netcdf-c. |
| ncid | NetCDF file identifier allocated by netcdf-c. |
path is missing or not HDF5, NC_EINVAL for a bad path, NC_ENOPAR for a parallel request when nxCDF was built without parallel support, NC_EPARINIT when the MPI-IO driver cannot be set, or another NetCDF error code.