netCDF
4.2.1.1
|
The dispatch layer is a way to add read/write modules to the netCDF library. More...
Functions | |
int | NC_create (const char *path, int cmode, size_t initialsz, int basepe, size_t *chunksizehintp, int useparallel, void *mpi_info, int *ncidp) |
int | NC_open (const char *path, int cmode, int basepe, size_t *chunksizehintp, int useparallel, void *mpi_info, int *ncidp) |
The dispatch layer is a way to add read/write modules to the netCDF library.
Dispatch modules, plugged into the netCDF library, will allow netCDF programs to read and write other, perhaps quite local, formats.
This should be of particular interest to anyone contemplating the conversion of large data collections to netCDF in order to gain access to those data in netCDF-oriented tools and software systems. Instead of converting the data, a read module could be written which would read the data as if it were in netCDF. This would give netCDF tools read-only access to data in this format, transparently to the tool.
This mechanism is already used within the netCDF library to handle the netCDF-4/HDF5 files, and the remote data access features.
Conceptually, the dispatch layer provides the same capabilities as the IOSP in the netCDF-Java library. However, unlike Java, C does not provide the advanced features to make this seemless.
int NC_create | ( | const char * | path, |
int | cmode, | ||
size_t | initialsz, | ||
int | basepe, | ||
size_t * | chunksizehintp, | ||
int | useparallel, | ||
void * | mpi_info, | ||
int * | ncidp | ||
) |
Create a file, calling the appropriate dispatch create call.
For create, we have the following pieces of information to use to determine the dispatch table:
path | The file name of the new netCDF dataset. |
cmode | The creation mode flag, the same as in nc_create(). |
initialsz | This parameter sets the initial size of the file at creation time. This only applies to classic and 64-bit offset files. |
basepe | Deprecated parameter from the Cray days. |
chunksizehintp | A pointer to the chunk size hint. This only applies to classic and 64-bit offset files. |
useparallel | Non-zero if parallel I/O is to be used on this file. |
mpi_info | Pointer to MPI comm and info. |
ncidp | Pointer to location where returned netCDF ID is to be stored. |
int NC_open | ( | const char * | path, |
int | cmode, | ||
int | basepe, | ||
size_t * | chunksizehintp, | ||
int | useparallel, | ||
void * | mpi_info, | ||
int * | ncidp | ||
) |
Open a netCDF file (or remote dataset) calling the appropriate dispatch function.
For open, we have the following pieces of information to use to determine the dispatch table.