Insert a named field into a compound type.
INTEGER FUNTION NF_INSERT_COMPOUND(INTEGER TYPEID, CHARACTER*(*) NAME, INTEGER OFFSET,
INTEGER FIELD_TYPEID)
TYPEIDNAMEOFFSETFIELD_TYPEIDNF_NOERRNF_EBADIDNF_ENAMEINUSENF_EMAXNAMENF_EBADNAMENF_ENOTNC4NF_ESTRICTNC3NF_EHDFERRNF_ENOTINDEFINEThis example is from nf_test/ftst_types.F.
C Define a compound type.
retval = nf_def_compound(ncid, WIND_T_SIZE, type_name,
& wind_typeid)
if (retval .ne. nf_noerr) call handle_err(retval)
retval = nf_insert_compound(ncid, wind_typeid, u_name, 0, NF_INT)
if (retval .ne. nf_noerr) call handle_err(retval)
retval = nf_insert_compound(ncid, wind_typeid, v_name, 4, NF_INT)
if (retval .ne. nf_noerr) call handle_err(retval)