Name: H5Tget_native_type
Signature:
  hid_t `H5Tget_native_type`(hid_t `type_id`, H5T_direction_t `direction` )
Purpose:
  Returns the native datatype of a specified datatype.
Description:
  `H5Tget_native_type` returns the equivalent native datatype for the datatype specified in `type_id`.

  `H5Tget_native_type` is a high-level function designed primarily to facilitate use of the `H5Dread` function, for which users otherwise must undertake a multi-step process to determine the native datatype of a dataset prior to reading it into memory. It can be used not only to determine the native datatype for atomic datatypes, but also to determine the native datatypes of the individual components of a compound datatype, an enumerated datatype, an array datatype, or a variable-length datatype. For example, if `dtype_id` is a compound datatype, the returned datatype identifier will be for a similar compound datatype with each element converted to the corresponding native datatype.

  `H5Tget_native_type` selects the matching native datatype from the following list:

              H5T_NATIVE_CHAR
              H5T_NATIVE_SHORT
              H5T_NATIVE_INT
              H5T_NATIVE_LONG
              H5T_NATIVE_LLONG

              H5T_NATIVE_UCHAR
              H5T_NATIVE_USHORT
              H5T_NATIVE_UINT
              H5T_NATIVE_ULONG
              H5T_NATIVE_ULLONG

              H5T_NATIVE_FLOAT
              H5T_NATIVE_DOUBLE
              H5T_NATIVE_LDOUBLE

  The `direction` parameter indicates the order in which the library searches for a native datatype match. Valid values for `direction` are as follows:

  | `H5T_DIR_ASCEND` | Searches the above list in ascending size of the datatype, i.e., from top to bottom. (Default)
  | `H5T_DIR_DESCEND` | Searches the above list in descending size of the datatype, i.e., from bottom to top.

  `H5Tget_native_type` is designed primarily for use with integer and floating point datatypes. String, time, bitfield, opaque, and reference datatypes are returned as a copy of `type_id`.

  The identifier returned by `H5Tget_native_type` should eventually be closed by calling `H5Tclose` to release resources.

Parameters:

hid_t `type_id` | Datatype identifier for the dataset datatype.
H5T_direction_t `direction` | Direction of search.

Returns:
  Returns the native datatype identifier for the specified dataset datatype if successful; otherwise returns a negative value.
Fortran90 Interface:
  None.
History:

Release | C
1.6.0 | Function introduced in this release.