[netcdfgroup] Obtaining the group name from a dimension ID

How would I go about obtaining the group name in which a dimension ID was defined in, given the dimension id?


For example, after a nc_inq_dimids call with include_parents set to non-zero:

int nc_inq_dimids(int ncid, int *ndims, int *dimids, int include_parents);


could I obtain a gid or the group name in which a particular dimid was defined in?

Ashish