3.3 Find all the Variables in a Group: NF_INQ_VARIDS
Find all varids for a location.
Usage
INTEGER FUNCTION NF_INQ_VARIDS(INTEGER NCID, INTEGERS VARIDS)
NCID
- The group id for this operation.
VARIDS
- An already allocated array to store the list of varids. Use
nf_inq_nvars to find out how many variables there are. (see NF_INQ Family).
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 varids in subgroup.
retval = nf_inq_varids(subgrp_in, nvars, varids_in)
if (retval .ne. nf_noerr) call handle_err(retval)