libncds3  1.8
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups
Dataset Function Wrappers

Functions

int ncds_close (int ncid)
 Close a NetCDF file.
int ncds_create (const char *file, int cmode, int *ncid)
 Create a NetCDF file.
int ncds_enddef (int ncid)
 End define mode for an open NetCDF file.
int ncds_format (int ncid, int *format)
 Get the format of a NetCDF file.
int ncds_open (const char *file, int omode, int *ncid)
 Open a NetCDF file.
int ncds_redef (int ncid)
 Put an open NetCDF file in define mode.
int ncds_sync (int ncid)
 Flush NetCDF data to disk, or make newly stored data available.

Detailed Description


Function Documentation

int ncds_close ( int  ncid)

Close a NetCDF file.

Error messages from this function are sent to the message handler (see msngr_init_log() and msngr_init_mail()).

Parameters:
ncid- NetCDF id of the root group
Returns:
  • 1 if successful
  • 0 if an error occured

Definition at line 54 of file ncwrap_dataset.c.

int ncds_create ( const char *  file,
int  cmode,
int *  ncid 
)

Create a NetCDF file.

By default (cmode = 0) the NetCDF file will be in classic format and it will overwrite any existing file with the same name. Possible cmode flags include:

  • NC_NOCLOBBER = Do not overwrite an existing file
  • NC_SHARE = This flag should be used when one process may be writing the dataset and one or more other processes reading the dataset concurrently.
  • NC_64BIT_OFFSET = Create a 64-bit offset format file.
  • NC_NETCDF4 = Create a HDF5/NetCDF-4 file.
  • NC_CLASSIC_MODEL = Enforce the classic data model in this file.

See the NetCDF "C Interface Guide" for more detailed descriptions of the creation mode flags.

Error messages from this function are sent to the message handler (see msngr_init_log() and msngr_init_mail()).

Parameters:
file- full path to the NetCDF file
cmode- creation mode of the file
ncid- output: NetCDF id of the root group
Returns:
  • 1 if successful
  • 0 if an error occured

Definition at line 104 of file ncwrap_dataset.c.

int ncds_enddef ( int  ncid)

End define mode for an open NetCDF file.

Error messages from this function are sent to the message handler (see msngr_init_log() and msngr_init_mail()).

Parameters:
ncid- NetCDF id of the root group
Returns:
  • 1 if successful
  • 0 if an error occured

Definition at line 133 of file ncwrap_dataset.c.

int ncds_format ( int  ncid,
int *  format 
)

Get the format of a NetCDF file.

Parameters:
ncid- NetCDF id of the root group
format- output: format of the NetCDF file:
                  - NC_FORMAT_CLASSIC
                  - NC_FORMAT_64BIT
                  - NC_FORMAT_NETCDF4
                  - NC_FORMAT_NETCDF4_CLASSIC
Returns:
  • 1 if successful
  • 0 if an error occured

Definition at line 166 of file ncwrap_dataset.c.

int ncds_open ( const char *  file,
int  omode,
int *  ncid 
)

Open a NetCDF file.

By default (omode = 0) the NetCDF file will be opened with read-only access. Possible omode flags include:

  • NC_WRITE = Open the dataset with read-write access.
  • NC_SHARE = This flag should be used when one process may be writing the dataset and one or more other processes reading the dataset concurrently.

See the NetCDF "C Interface Guide" for more detailed descriptions of the open mode flags.

Error messages from this function are sent to the message handler (see msngr_init_log() and msngr_init_mail()).

Parameters:
file- full path to the NetCDF file
omode- open mode of the file
ncid- output: NetCDF id of the root group
Returns:
  • 1 if successful
  • 0 if an error occured

Definition at line 211 of file ncwrap_dataset.c.

int ncds_redef ( int  ncid)

Put an open NetCDF file in define mode.

Error messages from this function are sent to the message handler (see msngr_init_log() and msngr_init_mail()).

Parameters:
ncid- NetCDF id of the root group
Returns:
  • 1 if successful
  • 0 if an error occured

Definition at line 240 of file ncwrap_dataset.c.

int ncds_sync ( int  ncid)

Flush NetCDF data to disk, or make newly stored data available.

Error messages from this function are sent to the message handler (see msngr_init_log() and msngr_init_mail()).

Parameters:
ncid- NetCDF id of the root group
Returns:
  • 1 if successful
  • 0 if an error occured

Definition at line 270 of file ncwrap_dataset.c.