3.4 Find all Dimensions Visible in a Group: NF_INQ_DIMIDS
Find all dimids for a location. This finds all dimensions in a group,
or any of its parents.
Usage
INTEGER FUNCTION NF_INQ_DIMIDS(INTEGER NCID, INTEGER DIMIDS, INTEGER INCLUDE_PARENTS)
NCID
- The group id for this operation.
DIMIDS
- An array of ints when the dimids of the visible dimensions will be
stashed. Use nf_inq_ndims to find out how many dims are visible from
this group. (see NF_INQ Family).
INCLUDE_PARENTS
- If zero, only the group specified by NCID will be searched for
dimensions. Otherwise parent groups will be searched too.
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 dimids in subgroup.
retval = nf_inq_dimids(subgrp_in, ndims, dimids_in, 0)
if (retval .ne. nf_noerr) call handle_err(retval)
if (ndims .ne. 2 .or. dimids_in(1) .ne. dimids(1) .or.
& dimids_in(2) .ne. dimids(2)) stop 2