3.9 Find a Group by Name: NF_INQ_GRP_NCID
Given a group name an an ncid, find the ncid of the group id.
Usage
INTEGER FUNCTION NF_INQ_GRP_NCID(INTEGER NCID, CHARACTER GRP_NAME, INTEGER GRP_NCID)
NCID
- The group id to look in.
GRP_NAME
- The name of the group that should be found.
GRP_NCID
- This will get the group id, if it is found.
Return Codes
The following return codes may be returned by this function.
NF_NOERR
- No error.
NF_EBADID
- Bad group id.
NF_EINVAL
- No name provided or name longer than NF_MAX_NAME.
NF_ENOGRP
- Named group not found.
NF_ENOTNC4
- Attempting a netCDF-4 operation on a netCDF-3 file. NetCDF-4
operations can only be performed on files defined with a create mode
which includes flag HDF5. (see NF_OPEN).
NF_ESTRICTNC3
- This file was created with the strict netcdf-3 flag, therefore
netcdf-4 operations are not allowed. (see NF_OPEN).
NF_EHDFERR
- An error was reported by the HDF5 layer.
Example
This example is from nf_test/ftst_types3.F.
C Go to a child group and find the id of our type.
retval = nf_inq_grp_ncid(ncid, group_name, sub_grpid)
if (retval .ne. nf_noerr) call handle_err(retval)