NetCDF  4.3.2
The Dispatch Layer

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)

Detailed Description

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.


Function Documentation

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:

  • table specified by override
  • path
  • cmode
Parameters:
pathThe file name of the new netCDF dataset.
cmodeThe creation mode flag, the same as in nc_create().
initialszThis parameter sets the initial size of the file at creation time. This only applies to classic and 64-bit offset files.
basepeDeprecated parameter from the Cray days.
chunksizehintpA pointer to the chunk size hint. This only applies to classic and 64-bit offset files.
useparallelNon-zero if parallel I/O is to be used on this file.
mpi_infoPointer to MPI comm and info.
ncidpPointer to location where returned netCDF ID is to be stored.
Returns:
NC_NOERR No error.

Definition at line 1501 of file dfile.c.

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.

  • table specified by override
  • path
  • cmode
  • the contents of the file (if it exists), basically checking its magic number.
Returns:
NC_NOERR No error.

Definition at line 1646 of file dfile.c.

 All Data Structures Files Functions Variables Typedefs Defines