Next: , Previous: nc_inq_compound_fieldtype, Up: User Defined Data Types


5.19 Find the Number of Dimensions in an Array Field: nc_inq_compound_fieldndims

Given the typeid and the fieldid, get the number of dimensions of that field.

Usage

     int nc_inq_compound_fieldndims(int ncid, nc_type xtype, int fieldid,
                                    int *ndimsp);
ncid
The file or group ID.
xtype
The typeid for this compound type, as returned by nc_def_compound, or nc_inq_var.
fieldid
The id of the field in the compound type. Fields are numbered starting with 0 for the first inserted field.
ndimsp
Pointer to an int which will get the number of dimensions of the field. Non-array fields have 0 dimensions.

Errors

NC_NOERR
No error.
NC_EBADTYPEID
Bad typeid.
NC_EBADFIELDID
Bad fieldid.
NC_EHDFERR
An error was reported by the HDF5 layer.

Example

See the example section for nc_inq_compound.