Next: , Previous: NF90_DEF_ENUM, Up: Enum Type


5.9.2 Inserting a Field into a Enum Type: NF90_INSERT_ENUM

Insert a named member into a enum type.

Usage

       function nf90_insert_enum(ncid, xtype, name, value)
         integer, intent(in) :: ncid
         integer, intent(in) :: xtype
         character (len = *), intent(in) :: name
         integer, intent(in) :: value
         integer :: nf90_insert_enum
NCID
The ncid of the group which contains the type.
TYPEID
The typeid for this enum type, as returned by nf90_def_enum, or nf90_inq_var.
IDENTIFIER
The identifier of the new member.
VALUE
The value that is to be associated with this member.

Errors

NF90_NOERR
No error.
NF90_EBADID
Bad group id.
NF90_ENAMEINUSE
That name is in use. Field names must be unique within a enum 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