Next: , Previous: NF90_DEF_COMPOUND, Up: Compound Types


5.6.2 Inserting a Field into a Compound Type: NF90_INSERT_COMPOUND

Insert a named field into a compound type.

Usage

       function nf90_insert_compound(ncid, xtype, name, offset, field_typeid)
         integer, intent(in) :: ncid
         integer, intent(in) :: xtype
         character (len = *), intent(in) :: name
         integer, intent(in) :: offset
         integer, intent(in) :: field_typeid
         integer :: nf90_insert_compound
TYPEID
The typeid for this compound type, as returned by NF90_DEF_COMPOUND, or NF90_INQ_VAR.
NAME
The name of the new field.
OFFSET
Offset in byte from the beginning of the compound type for this field.
FIELD_TYPEID
The type of the field to be inserted.

Errors

NF90_NOERR
No error.
NF90_EBADID
Bad group id.
NF90_ENAMEINUSE
That name is in use. Field names must be unique within a compound type.
NF90_EMAXNAME
Name exceed max length NF90_MAX_NAME.
NF90_EBADNAME
Name contains illegal characters.
NF90_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 NF90_NETCDF4. (see NF90_OPEN).
NF90_ESTRICTNC3
This file was created with the strict netcdf-3 flag, therefore netcdf-4 operations are not allowed. (see NF90_OPEN).
NF90_EHDFERR
An error was reported by the HDF5 layer.
NF90_ENOTINDEFINE
Not in define mode.

Example