Create a group. Its location id is returned in new_ncid.
INTEGER FUNCTION NF_DEF_GRP(INTEGER PARENT_NCID, CHARACTER*(*) NAME, INTEGER NEW_NCID)
PARENT_NCID
NAME
NEW_NCID
NF_NOERR
NF_EBADID
NF_ENAMEINUSE
NF_EMAXNAME
NF_EBADNAME
NF_ENOTNC4
NF_ESTRICTNC3
NF_EHDFERR
NF_EPERM
NF_ENOTINDEFINE
In this exampe rom nf_test/ftst_groups.F, a groups is reated, and then a sub-group is created in that group.
C Create the netCDF file. retval = nf_create(file_name, NF_NETCDF4, ncid) if (retval .ne. nf_noerr) call handle_err(retval) C Create a group and a subgroup. retval = nf_def_grp(ncid, group_name, grpid) if (retval .ne. nf_noerr) call handle_err(retval) retval = nf_def_grp(grpid, sub_group_name, sub_grpid) if (retval .ne. nf_noerr) call handle_err(retval)