Next: , Previous: Groups, Up: Groups


3.1 Find a Group ID: NF_INQ_NCID

Given an ncid and group name (NULL or "" gets root group), return ncid of the named group.

Usage

     INTEGER FUNCTION NF_INQ_NCID(INTEGER NCID, CHARACTER*(*) NAME, INTEGER GRPID)
NCID
The group id for this operation.
NAME
A character array that holds the name of the desired group. Must be less then NF_MAX_NAME.
GRPID
The ID of the group will go here.

Errors

NF_NOERR
No error.
NF_EBADID
Bad group id.
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_groups.F.

     C     Check getting the group by name
           retval = nf_inq_ncid(ncid, group_name, grpid_in)
           if (retval .ne. nf_noerr) call handle_err(retval)