Please, help us to better serve our user community by answering the following short survey: https://www.hdfgroup.org/website-survey/
HDF5 1.14.6.08405a5
API Reference
Loading...
Searching...
No Matches
Fortran High Level Lite (H5LT) Interface

Detailed Description

See also
HDF5 Lite APIs (H5LT,H5LD), C-HL API
HDF5 High Level Lite, User Guide

Functions/Subroutines

subroutine h5ltmake_dataset_f (loc_id, dset_name, rank, dims, type_id, buf, errcode)
 Creates and writes a dataset of a type type_id.
 
subroutine h5ltmake_dataset_f (loc_id, dset_name, rank, dims, type_id, buf, errcode)
 Creates and writes a dataset of a type type_id.
 
subroutine h5ltread_dataset_f (loc_id, dset_name, type_id, buf, errcode)
 Reads a dataset of a type type_id.
 
subroutine h5ltread_dataset_f (loc_id, dset_name, type_id, buf, dims, errcode)
 Reads a dataset of a type type_id.
 
subroutine h5ltset_attribute_f (loc_id, dset_name, attr_name, buf, buf_type, sizeof_buf_type, size, errcode)
 Creates and writes an attribute and is a generic replacement for data type specific Fortran h5ltset_attribute_*_f APIs. There is no C equivalent API.
 
subroutine h5ltset_attribute_int_f (loc_id, obj_name, attr_name, buf, size, errcode)
 Creates and writes an attribute.
 
subroutine h5ltset_attribute_float_f (loc_id, obj_name, attr_name, buf, size, errcode)
 Creates and writes an attribute.
 
subroutine h5ltset_attribute_double_f (loc_id, obj_name, attr_name, buf, size, errcode)
 Creates and writes an attribute.
 
subroutine h5ltset_attribute_string_f (loc_id, obj_name, attr_name, buf, errcode)
 Creates and writes an attribute.
 
subroutine h5ltget_attribute_f (loc_id, obj_name, attr_name, buf, buf_type, sizeof_buf_type, errcode)
 Reads an attribute from disk.
 
subroutine h5ltget_attribute_int_f (loc_id, obj_name, attr_name, buf, errcode)
 Reads an attribute from disk.
 
subroutine h5ltget_attribute_float_f (loc_id, obj_name, attr_name, buf, errcode)
 Reads an attribute from disk.
 
subroutine h5ltget_attribute_double_f (loc_id, obj_name, attr_name, buf, errcode)
 Reads an attribute from disk.
 
subroutine h5ltget_attribute_string_f (loc_id, obj_name, attr_name, buf, errcode)
 Reads an attribute from disk.
 
subroutine h5ltget_dataset_ndims_f (loc_id, dset_name, rank, errcode)
 Gets the dimensionality of a dataset.
 
integer function h5ltfind_dataset_f (loc_id, dset_name)
 Determines whether a dataset exists.
 
subroutine h5ltget_dataset_info_f (loc_id, dset_name, dims, type_class, type_size, errcode)
 Retrieves information about a dataset.
 
subroutine h5ltget_attribute_ndims_f (loc_id, obj_name, attr_name, rank, errcode)
 Gets the dimensionality of an attribute.
 
subroutine h5ltget_attribute_info_f (loc_id, obj_name, attr_name, dims, type_class, type_size, errcode)
 Gets information about an attribute.
 
subroutine h5ltpath_valid_f (loc_id, path, check_object_valid, path_valid, errcode)
 Determines whether an HDF5 path is valid and, optionally, whether the path resolves to an HDF5 object.
 

Function/Subroutine Documentation

◆ h5ltfind_dataset_f()

integer function h5ltfind_dataset_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  dset_name 
)

Determines whether a dataset exists.

Parameters
loc_idIdentifier of the group containing the dataset.
dset_nameThe dataset name.
Returns
Returns zero (false), a positive (true) or a negative (failure) value.

See C API: H5LTfind_dataset()

◆ h5ltget_attribute_double_f()

subroutine h5ltget_attribute_double_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  obj_name,
character(len=*), intent(in)  attr_name,
real(kind=c_double), dimension(*), intent(inout), target  buf,
integer  errcode 
)

Reads an attribute from disk.

Attention
Obsolete API, use the Fortran 2003 version instead.
Parameters
loc_idIdentifier of the object (dataset or group) to create the attribute within
obj_nameThe name of the object that the attribute is attached to.
attr_nameThe attribute name.
bufBuffer with data to be written to the attribute.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTget_attribute_double()

◆ h5ltget_attribute_f()

subroutine h5ltget_attribute_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  obj_name,
character(len=*), intent(in)  attr_name,
type(c_ptr)  buf,
character(len=*), intent(in)  buf_type,
integer(size_t), intent(in)  sizeof_buf_type,
integer, intent(out)  errcode 
)

Reads an attribute from disk.

Attention
The preferred API, Fortran 2003 version.
Parameters
loc_idLocation identifier. The identifier may be that of a file or group.
obj_nameThe name of the object that the attribute is attached to.
attr_nameThe name of the attribute to create.
bufThe data buffer.
buf_typeValid data types are CHARACTER, INTEGER or REAL. NOTE: only the first character matters and is case insensitive.
SizeOf_buf_typeSize of buf's data type, in bytes.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTget_attribute()

◆ h5ltget_attribute_float_f()

subroutine h5ltget_attribute_float_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  obj_name,
character(len=*), intent(in)  attr_name,
real(kind=c_float), dimension(*), intent(inout), target  buf,
integer  errcode 
)

Reads an attribute from disk.

Attention
Obsolete API, use the Fortran 2003 version instead.
Parameters
loc_idIdentifier of the object (dataset or group) to create the attribute within
obj_nameThe name of the object that the attribute is attached to.
attr_nameThe attribute name.
bufBuffer with data to be written to the attribute.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTget_attribute_float()

◆ h5ltget_attribute_info_f()

subroutine h5ltget_attribute_info_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  obj_name,
character(len=*), intent(in)  attr_name,
integer(hsize_t), dimension(*), intent(inout)  dims,
integer, intent(inout)  type_class,
integer(size_t), intent(inout)  type_size,
integer  errcode 
)

Gets information about an attribute.

Parameters
loc_idIdentifier of the object (dataset or group) to read the attribute from.
obj_nameThe name of the object that the attribute is attached to.
attr_nameThe attribute name.
dimsThe dimensions of the attribute.
type_classThe class identifier. For a list of valid class types see: H5Tget_class_f().
type_sizeThe size of the datatype in bytes.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTget_attribute_info()

◆ h5ltget_attribute_int_f()

subroutine h5ltget_attribute_int_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  obj_name,
character(len=*), intent(in)  attr_name,
integer, dimension(*), intent(inout), target  buf,
integer  errcode 
)

Reads an attribute from disk.

Attention
Obsolete API, use the Fortran 2003 version instead.
Parameters
loc_idIdentifier of the object (dataset or group) to create the attribute within
obj_nameThe name of the object that the attribute is attached to.
attr_nameThe attribute name.
bufBuffer with data to be written to the attribute.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTget_attribute_int()

◆ h5ltget_attribute_ndims_f()

subroutine h5ltget_attribute_ndims_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  obj_name,
character(len=*), intent(in)  attr_name,
integer, intent(inout)  rank,
integer  errcode 
)

Gets the dimensionality of an attribute.

Parameters
loc_idIdentifier of the object (dataset or group) to read the attribute from.
obj_nameThe name of the object that the attribute is attached to.
attr_nameThe attribute name.
rankThe dimensionality of the attribute.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTget_attribute_ndims()

◆ h5ltget_attribute_string_f()

subroutine h5ltget_attribute_string_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  obj_name,
character(len=*), intent(in)  attr_name,
character(len=*), intent(inout)  buf,
integer  errcode 
)

Reads an attribute from disk.

Attention
Obsolete API, use the Fortran 2003 version instead.
Parameters
loc_idIdentifier of the object (dataset or group) to create the attribute within
obj_nameThe name of the object that the attribute is attached to.
attr_nameThe attribute name.
bufBuffer with data to be written to the attribute.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTget_attribute_string()

◆ h5ltget_dataset_info_f()

subroutine h5ltget_dataset_info_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  dset_name,
integer(hsize_t), dimension(*), intent(inout)  dims,
integer, intent(inout)  type_class,
integer(size_t), intent(inout)  type_size,
integer  errcode 
)

Retrieves information about a dataset.

Parameters
loc_idIdentifier of the object to locate the dataset within.
dset_nameThe dataset name.
dimsThe dimensions of the dataset.
type_classThe class identifier. See H5Tget_class_f() for a list of class types.
type_sizeThe size of the datatype in bytes.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTget_dataset_info()

◆ h5ltget_dataset_ndims_f()

subroutine h5ltget_dataset_ndims_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  dset_name,
integer, intent(inout)  rank,
integer  errcode 
)

Gets the dimensionality of a dataset.

Parameters
loc_idIdentifier of the object to locate the dataset within.
dset_nameThe dataset name.
rankThe dimensionality of the dataset.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTget_dataset_ndims()

◆ h5ltmake_dataset_f() [1/2]

subroutine h5ltmake_dataset_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  dset_name,
integer, intent(in)  rank,
integer(hsize_t), dimension(*), intent(in)  dims,
integer(hid_t), intent(in)  type_id,
type(c_ptr)  buf,
integer  errcode 
)

Creates and writes a dataset of a type type_id.

Attention
The preferred API, Fortran 2003 version.
Parameters
loc_idLocation identifier. The identifier may be that of a file or group.
dset_nameThe name of the dataset to create.
rankNumber of dimensions of dataspace.
dimsAn array of the size of each dimension.
type_idIdentifier of the datatype to use when creating the dataset.
bufBuffer with data to be written to the dataset.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTmake_dataset()

◆ h5ltmake_dataset_f() [2/2]

subroutine h5ltmake_dataset_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  dset_name,
integer, intent(in)  rank,
integer(hsize_t), dimension(*), intent(in)  dims,
integer(hid_t), intent(in)  type_id,
type(type), dimension(*,*,...), intent(in)  buf,
integer  errcode 
)

Creates and writes a dataset of a type type_id.

Attention
Obsolete API, use the Fortran 2003 version instead.
Parameters
loc_idLocation identifier. The identifier may be that of a file or group.
dset_nameThe name of the dataset to create.
rankNumber of dimensions of dataspace.
dimsAn array of the size of each dimension. Limited to seven dimensions.
type_idIdentifier of the datatype to use when creating the dataset.
bufBuffer with data to be written to the dataset.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTmake_dataset()

◆ h5ltpath_valid_f()

subroutine h5ltpath_valid_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  path,
logical, intent(in)  check_object_valid,
logical, intent(out)  path_valid,
integer, intent(out)  errcode 
)

Determines whether an HDF5 path is valid and, optionally, whether the path resolves to an HDF5 object.

Parameters
loc_idIdentifier of an object in the file.
pathThe path to the object to check; links in path may be of any type.
check_object_validIndicates whether to check if the final component of the path resolves to a valid object.
path_validObject status.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTpath_valid()

◆ h5ltread_dataset_f() [1/2]

subroutine h5ltread_dataset_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  dset_name,
integer(hid_t), intent(in)  type_id,
type(type), dimension(*,*,...), intent(inout)  buf,
integer(hsize_t), dimension(*), intent(in)  dims,
integer  errcode 
)

Reads a dataset of a type type_id.

Attention
Obsolete API, use the Fortran 2003 version instead.
Parameters
loc_idLocation identifier. The identifier may be that of a file or group.
dset_nameThe name of the dataset to create.
type_idIdentifier of the datatype to use when creating the dataset.
bufBuffer with data to be written to the dataset.
dimsAn array of the size of each dimension. Limited to seven dimensions.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTread_dataset()

◆ h5ltread_dataset_f() [2/2]

subroutine h5ltread_dataset_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  dset_name,
integer(hid_t), intent(in)  type_id,
type(c_ptr)  buf,
integer  errcode 
)

Reads a dataset of a type type_id.

Attention
The preferred API, Fortran 2003 version.
Parameters
loc_idLocation identifier. The identifier may be that of a file or group.
dset_nameThe name of the dataset to create.
type_idIdentifier of the datatype to use when creating the dataset.
bufBuffer with data to be written to the dataset.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTread_dataset()

◆ h5ltset_attribute_double_f()

subroutine h5ltset_attribute_double_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  obj_name,
character(len=*), intent(in)  attr_name,
real(kind=c_double), dimension(*), intent(in), target  buf,
integer(size_t), intent(in)  size,
integer  errcode 
)

Creates and writes an attribute.

Attention
Obsolete API, use the Fortran 2003 version instead.
Parameters
loc_idIdentifier of the object (dataset or group) to create the attribute within
obj_nameThe name of the object to attach the attribute.
attr_nameThe attribute name.
bufBuffer with data to be written to the attribute.
sizeThe size of the 1D array (one in the case of a scalar attribute). This value is used by H5Screate_simple() to create the dataspace.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTset_attribute_double()

◆ h5ltset_attribute_f()

subroutine h5ltset_attribute_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  dset_name,
character(len=*), intent(in)  attr_name,
type(c_ptr)  buf,
character(len=*), intent(in)  buf_type,
integer(size_t), intent(in)  sizeof_buf_type,
integer(size_t), intent(in)  size,
integer, intent(out)  errcode 
)

Creates and writes an attribute and is a generic replacement for data type specific Fortran h5ltset_attribute_*_f APIs. There is no C equivalent API.

Attention
The preferred API, Fortran 2003 version.
Parameters
loc_idLocation identifier. The identifier may be that of a file or group.
dset_nameThe name of the dataset to create.
attr_nameThe name of the attribute to create.
bufThe data buffer.
buf_typeValid data types are CHARACTER, INTEGER or REAL. NOTE: only the first character matters and is case insensitive.
SizeOf_buf_typeSize of buf's data type, in bytes.
sizeSize of attribute array.
errcodeReturns 0 if successful and -1 if it fails.

◆ h5ltset_attribute_float_f()

subroutine h5ltset_attribute_float_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  obj_name,
character(len=*), intent(in)  attr_name,
real(kind=c_float), dimension(*), intent(in), target  buf,
integer(size_t), intent(in)  size,
integer  errcode 
)

Creates and writes an attribute.

Attention
Obsolete API, use the Fortran 2003 version instead.
Parameters
loc_idIdentifier of the object (dataset or group) to create the attribute within
obj_nameThe name of the object to attach the attribute.
attr_nameThe attribute name.
bufBuffer with data to be written to the attribute.
sizeThe size of the 1D array (one in the case of a scalar attribute). This value is used by H5Screate_simple() to create the dataspace.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTset_attribute_float()

◆ h5ltset_attribute_int_f()

subroutine h5ltset_attribute_int_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  obj_name,
character(len=*), intent(in)  attr_name,
integer, dimension(*), target  buf,
integer(size_t), intent(in)  size,
integer  errcode 
)

Creates and writes an attribute.

Attention
Obsolete API, use the Fortran 2003 version instead.
Parameters
loc_idIdentifier of the object (dataset or group) to create the attribute within
obj_nameThe name of the object to attach the attribute.
attr_nameThe attribute name.
bufBuffer with data to be written to the attribute.
sizeThe size of the 1D array (one in the case of a scalar attribute). This value is used by H5Screate_simple() to create the dataspace.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTset_attribute_int()

◆ h5ltset_attribute_string_f()

subroutine h5ltset_attribute_string_f ( integer(hid_t), intent(in)  loc_id,
character(len=*), intent(in)  obj_name,
character(len=*), intent(in)  attr_name,
character(len=*), dimension(*), intent(in), target  buf,
integer  errcode 
)

Creates and writes an attribute.

Attention
Obsolete API, use the Fortran 2003 version instead.
Parameters
loc_idIdentifier of the object (dataset or group) to create the attribute within
obj_nameThe name of the object to attach the attribute.
attr_nameThe attribute name.
bufBuffer with data to be written to the attribute.
errcodeReturns 0 if successful and -1 if it fails.

See C API: H5LTset_attribute_string()