Previous: NF90_INQ_ENUM_MEMBER, Up: Enum Type


5.9.5 Learn the Name of a Enum Type: NF90_INQ_ENUM_IDENT

Get the name which is associated with an enum member value.

This is similar to NF90_INQ_ENUM_MEMBER, but instead of using the index of the member, you use the value of the member.

Usage

       function nf90_inq_enum_ident(ncid, xtype, value, idx)
         integer, intent(in) :: ncid
         integer, intent(in) :: xtype
         integer, intent(in) :: value
         integer, intent(out) :: idx
         integer :: nf90_inq_enum_ident
NCID
The groupid where this enum type exists.
XTYPE
The typeid for this enum type.
VALUE
The value for which an identifier is sought.
IDENTIFIER
A character array that will get the identifier. It will have a maximum length of NF90_MAX_NAME.

Return Code

NF90_NOERR
No error.
NF90_EBADTYPEID
Bad type id, or not an enum type.
NF90_EHDFERR
An error was reported by the HDF5 layer.
NF90_EINVAL
The value was not found in the enum.

Example