NetCDF 4.9.3
Loading...
Searching...
No Matches
dispatch functions.

Functions

static int check_create_mode (int mode)
 Check the create mode parameter for sanity.
 
int nc__pseudofd (void)
 
int NC_create (const char *path0, int cmode, size_t initialsz, int basepe, size_t *chunksizehintp, int useparallel, void *parameters, int *ncidp)
 
int NC_open (const char *path0, int omode, int basepe, size_t *chunksizehintp, int useparallel, void *parameters, int *ncidp)
 

Variables

static int pseudofd = 0
 

Detailed Description

Function Documentation

◆ check_create_mode()

static int check_create_mode ( int mode)
static

Check the create mode parameter for sanity.

Some create flags cannot be used if corresponding library features are enabled during the build. This function does a pre-check of the mode flag before calling the dispatch layer nc_create functions.

Parameters
modeThe creation mode flag.
Returns
NC_NOERR No error.
NC_ENOTBUILT Requested feature not built into library
NC_EINVAL Invalid combination of modes.
Author
Ed Hartnett

Definition at line 1775 of file dfile.c.

◆ nc__pseudofd()

int nc__pseudofd ( void )

Create a pseudo file descriptor that does not overlap real file descriptors

Returns
pseudo file number
Author
Dennis Heimbigner

Definition at line 2207 of file dfile.c.

◆ NC_create()

int NC_create ( const char * path0,
int cmode,
size_t initialsz,
int basepe,
size_t * chunksizehintp,
int useparallel,
void * parameters,
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
  • cmode
Parameters
path0The 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 files.
basepeDeprecated parameter from the Cray days.
chunksizehintpA pointer to the chunk size hint. This only applies to classic files.
useparallelNon-zero if parallel I/O is to be used on this file.
parametersPointer to MPI comm and info.
ncidpPointer to location where returned netCDF ID is to be stored.
Returns
NC_NOERR No error.
Author
Dennis Heimbigner, Ed Hartnett, Ward Fisher

Definition at line 1840 of file dfile.c.

◆ NC_open()

int NC_open ( const char * path0,
int omode,
int basepe,
size_t * chunksizehintp,
int useparallel,
void * parameters,
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
  • omode
  • the contents of the file (if it exists), basically checking its magic number.
Parameters
path0Path to the file to open.
omodeOpen mode.
basepeBase processing element (ignored).
chunksizehintpSize hint for classic files.
useparallelIf true use parallel I/O.
parametersExtra parameters for the open.
ncidpPointer that gets ncid.
Returns
NC_NOERR No error.
Author
Dennis Heimbigner

Definition at line 1973 of file dfile.c.

Variable Documentation

◆ pseudofd

int pseudofd = 0
static

Static counter for pseudo file descriptors (incremented)

Definition at line 2197 of file dfile.c.