Next: , Previous: NF90_INQ_TYPE, Up: User Defined Data Types


5.5 Learn About a User Defined Type: NF90_INQ_USER_TYPE

Given an ncid and a typeid, get the information about a user defined type. This function will work on any user defined type, whether compound, opaque, enumeration, or variable length array.

Usage

       function nf90_inq_user_type(ncid, xtype, name, size, base_typeid, nfields, class)
         integer, intent(in) :: ncid
         integer, intent(in) :: xtype
         character (len = *), intent(out) :: name
         integer, intent(out) :: size
         integer, intent(out) :: base_typeid
         integer, intent(out) :: nfields
         integer, intent(out) :: class
         integer :: nf90_inq_user_type
NCID
The ncid for the group containing the user defined type.
XTYPE
The typeid for this type, as returned by NF90_DEF_COMPOUND, NF90_DEF_OPAQUE, NF90_DEF_ENUM, NF90_DEF_VLEN, or NF90_INQ_VAR.
NAME
The name of the user defined type will be copied here. It will be NF90_MAX_NAME bytes or less.
SIZE
The (in-memory) size of the user defined type will be copied here.
BASE_NF90_TYPE
The base typeid will be copied here for vlen and enum types.
NFIELDS
The number of fields will be copied here for enum and compound types.
CLASS
The class of the user defined type, NF90_VLEN, NF90_OPAQUE, NF90_ENUM, or NF90_COMPOUND, will be copied here.

Errors

NF90_NOERR
No error.
NF90_EBADTYPEID
Bad typeid.
NF90_EBADFIELDID
Bad fieldid.
NF90_EHDFERR
An error was reported by the HDF5 layer.

Example