Next: , Previous: NF_INQ_NCID, Up: Groups


3.2 Get a List of Groups in a Group: NF_INQ_GRPS

Given a location id, return the number of groups it contains, and an array of their ncids.

Usage

     INTEGER FUNCTION NF_INQ_GRPS(INTEGER NCID, INTEGER NUMGRPS, INTEGER NCIDS)
NCID
The group id for this operation.
NUMGRPS
An integer which will get number of groups in this group.
NCIDS
An array of ints which will receive the IDs of all the groups in this group.

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     What groups are there from the root group?
           retval = nf_inq_grps(ncid, ngroups_in, grpids)
           if (retval .ne. nf_noerr) call handle_err(retval)