Variable operations

ncvardef : Define a variable by name, giving its datatype, number of dimensions and the dimension id's that subscript the variable. Returns a variable id to be used in subsequent calls.

int ncvardef(int cdfid,char* name,nc_type datatype,int ndims,int dim[]);

ncvarid : Get a variable id from a name.

int ncvarid(int cdfid,char* name);

ncvarinq : Inquire about a variable. Any NULL pointers mean do not return the associated value. It is possible to get the variable name, type, number of dimensions, dimension id's and number of attributes.

int ncvarinq(int cdfid,int varid,char* name,nc_type* datatype,int* ndims,
               int dim[],int* natts);

ncvarput1 : Store a single value at the coordinate specified by coords. value must be of the correct data type.

int ncvarput1(int cdfid,int varid,long coords[],void* value);

ncvarget1 : Get a single value from the coordinate specified by coords.

int ncvarget1(int cdfid,int varid,long coords[],void* value);

ncvarput : Put a hyperslab (multi-dimensional rectangle) of values starting at start with edge lengths given by count. For the C interface, the last dimension varies fastest. Values must be of the correct type.

int ncvarput(int cdfid,int varid,long start[],long count[],void* value);

ncvarget : Get a hyperslab (multi-dimensional rectangle) of values starting at start with edge lengths given by count. For the C interface, the last dimension varies fastest. Values must be of the correct type.

int ncvarget(int cdfid,int varid,long start[],long count[],void* value);

ncvarrename : Rename a variable.

int ncvarrename(int cdfid,int varid,char* name);

nctypelen : Get the length (in bytes) of a data type.

int nctypelen(nc_type datatype);