You can write generic software that
In the C or Fortran APIs, information about netCDF objects is obtained by calling inquire functions:
nc_open /* open existing netCDF dataset */
...
nc_inq /* find out what is in it */
...
nc_inq_dim /* get dimension names, lengths */
...
nc_inq_var /* get variable names, types, shapes */
...
nc_inq_attname /* get attribute names */
...
nc_inq_att /* get attribute types and lengths */
...
nc_get_att /* get attribute values */
...
nc_get_var /* get values of variables */
...
nc_close /* close netCDF dataset */
In netCDF, inquire functions are very fast, since the information they provide is stored in memory when a netCDF dataset is first opened.