netCDF 4.2.1.1
|
Many of the argurments of netCDF functions are pointers.
For example, the nc_inq() functions takes four pointers:
int nc_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp);
A NULL may be passed for any of these pointers, and it will be ignored. For example, interested in the number of dimensions only, the following code will work:
int ndims; ... if (nc_inq(ncid, &ndims, NULL, NULL, NULL)) return SOME_ERROR;
User must allocate space for the result of an inq function before the function is called.