PIO  2.5.4
Functions
Learn About File

Learn the number of variables, dimensions, and global atts, and the unlimited dimension in C. More...

Functions

int PIOc_inq (int ncid, int *ndimsp, int *nvarsp, int *ngattsp, int *unlimdimidp)
 The PIO-C interface for the NetCDF function nc_inq. More...
 
int PIOc_inq_ndims (int ncid, int *ndimsp)
 Find out how many dimensions are defined in the file. More...
 
int PIOc_inq_nvars (int ncid, int *nvarsp)
 Find out how many variables are defined in a file. More...
 
int PIOc_inq_natts (int ncid, int *ngattsp)
 Find out how many global attributes are defined in a file. More...
 
int PIOc_inq_unlimdim (int ncid, int *unlimdimidp)
 Find out the dimension ids of the unlimited dimension. More...
 

Detailed Description

Learn the number of variables, dimensions, and global atts, and the unlimited dimension in C.

Function Documentation

◆ PIOc_inq()

int PIOc_inq ( int  ncid,
int *  ndimsp,
int *  nvarsp,
int *  ngattsp,
int *  unlimdimidp 
)

The PIO-C interface for the NetCDF function nc_inq.

This routine is called collectively by all tasks in the communicator ios.union_comm. For more information on the underlying NetCDF commmand please read about this function in the NetCDF documentation at: http://www.unidata.ucar.edu/software/netcdf/docs/group__datasets.html

Parameters
ncidthe ncid of the open file, obtained from PIOc_openfile() or PIOc_createfile().
ndimspa pointer that will get the number of dimensions. Ignored if NULL.
nvarspa pointer that will get the number of variables. Ignored if NULL.
ngattspa pointer that will get the number of attributes. Ignored if NULL.
unlimdimidpa pointer that will the ID of the unlimited dimension, or -1 if there is no unlimited dimension. Ignored if NULL.
Returns
PIO_NOERR for success, error code otherwise. See PIOc_Set_File_Error_Handling().
Author
Jim Edwards, Ed Hartnett

◆ PIOc_inq_natts()

int PIOc_inq_natts ( int  ncid,
int *  ngattsp 
)

Find out how many global attributes are defined in a file.

Parameters
ncidthe ncid of the open file.
ngattspa pointer that will get the number of attributes.
Returns
0 for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_inq_ndims()

int PIOc_inq_ndims ( int  ncid,
int *  ndimsp 
)

Find out how many dimensions are defined in the file.

Parameters
ncidthe ncid of the open file.
ndimspa pointer that will get the number of dimensions. Ignored if NULL.
Returns
0 for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_inq_nvars()

int PIOc_inq_nvars ( int  ncid,
int *  nvarsp 
)

Find out how many variables are defined in a file.

Parameters
ncidthe ncid of the open file.
nvarspa pointer that will get the number of variables.
Returns
0 for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_inq_unlimdim()

int PIOc_inq_unlimdim ( int  ncid,
int *  unlimdimidp 
)

Find out the dimension ids of the unlimited dimension.

Parameters
ncidthe ncid of the open file.
unlimdimidpa pointer that will the ID of the unlimited dimension, or -1 if there is no unlimited dimension.
Returns
0 for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett