From 99f17c727166ab88a36280ee93a197de5555412c Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 7 Sep 2022 17:11:20 -0500 Subject: Doxygen Fortran (#2062) --- doxygen/aliases | 8 + fortran/src/H5Aff.F90 | 1596 ++++------ fortran/src/H5Dff.F90 | 1362 ++++---- fortran/src/H5Eff.F90 | 227 +- fortran/src/H5Fff.F90 | 894 ++---- fortran/src/H5Gff.F90 | 1139 +++---- fortran/src/H5Iff.F90 | 314 +- fortran/src/H5Lff.F90 | 1175 +++---- fortran/src/H5Off.F90 | 846 ++--- fortran/src/H5Pff.F90 | 7580 ++++++++++++++------------------------------- fortran/src/H5Rff.F90 | 734 ++--- fortran/src/H5Sff.F90 | 1489 +++------ fortran/src/H5Tff.F90 | 2600 +++++----------- fortran/src/H5VLff.F90 | 254 +- fortran/src/H5Zff.F90 | 153 +- fortran/src/H5_ff.F90 | 331 +- hl/fortran/src/H5DSff.F90 | 396 ++- hl/fortran/src/H5IMff.F90 | 694 ++--- hl/fortran/src/H5LTff.F90 | 1535 +++++---- hl/fortran/src/H5TBff.F90 | 913 +++--- 20 files changed, 8618 insertions(+), 15622 deletions(-) diff --git a/doxygen/aliases b/doxygen/aliases index 4b6ae66..6730be5 100644 --- a/doxygen/aliases +++ b/doxygen/aliases @@ -372,3 +372,11 @@ ALIASES += storage_type="
#H5G_STORAGE_TYPE_COMPACTCompac ALIASES += str_pad_type="
#H5T_STR_NULLTERM0Null terminate (as C does)
#H5T_STR_NULLPAD1Pad with zeros
#H5T_STR_SPACEPAD2Pad with spaces (as FORTRAN does)
" ALIASES += see_virtual=" \see Supporting Functions: H5Pget_layout(), H5Pset_layout(), H5Sget_regular_hyperslab(), H5Sis_regular_hyperslab(), H5Sselect_hyperslab() \see VDS Functions: H5Pget_virtual_count(), H5Pget_virtual_dsetname(), H5Pget_virtual_filename(), H5Pget_virtual_prefix(), H5Pget_virtual_printf_gap(), H5Pget_virtual_srcspace(), H5Pget_virtual_view(), H5Pget_virtual_vspace(), H5Pset_virtual(), H5Pset_virtual_prefix(), H5Pset_virtual_printf_gap(), H5Pset_virtual_view()" ALIASES += obj_info_fields="
FlagPurpose
#H5O_INFO_BASICFill in the fileno, addr, type, and rc fields
#H5O_INFO_TIMEFill in the atime, mtime, ctime, and btime fields
#H5O_INFO_NUM_ATTRS Fill in the num_attrs field
#H5O_INFO_HDRFill in the num_attrs field
#H5O_INFO_META_SIZEFill in the meta_size field
#H5O_INFO_ALL#H5O_INFO_BASIC | #H5O_INFO_TIME | #H5O_INFO_NUM_ATTRS | #H5O_INFO_HDR | #H5O_INFO_META_SIZE
" + +################################################################################ +# FORTRAN +################################################################################ + +ALIASES += fortran_error="Returns 0 if successful and -1 if it fails." +ALIASES += fortran_approved="The preferred API, Fortran 2003 version." +ALIASES += fortran_obsolete="Obsolete API, use the Fortran 2003 version instead." \ No newline at end of file diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index 53f0a39..7612bbd 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -1,13 +1,13 @@ -!****h* ROBODoc/H5A -! -! NAME -! MODULE H5A -! -! PURPOSE -! This file contains Fortran interfaces for H5A functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! +!> @defgroup FH5A Fortran Attribute (H5A) Interface +!! +!! @see H5A, C-API +!! +!! @see @ref H5A_UG, User Guide +!! + +!> @ingroup FH5A +!! +!! @brief This module contains Fortran interfaces for H5A functions. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -66,7 +66,6 @@ ! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. ! This is needed for Windows based operating systems. ! -!***** #include @@ -79,6 +78,7 @@ MODULE H5A PRIVATE h5awrite_char_scalar, h5awrite_ptr PRIVATE h5aread_char_scalar, h5aread_ptr +#ifndef H5_DOXYGEN_FORTRAN INTERFACE h5awrite_f MODULE PROCEDURE h5awrite_char_scalar ! This is the preferred way to call h5awrite @@ -118,56 +118,36 @@ MODULE H5A TYPE(C_PTR), VALUE :: buf END FUNCTION h5aread_f_c END INTERFACE +#endif CONTAINS -! -!****s* H5A/h5acreate_f -! -! NAME -! h5acreate_f -! -! PURPOSE -! Creates a dataset as an attribute of a group, dataset, or named datatype -! -! INPUTS -! loc_id - identifier of an object (group, dataset, -! or named datatype) attribute is attached to -! name - attribute name -! type_id - attribute datatype identifier -! space_id - attribute dataspace identifier -! -! OUTPUTS -! attr_id - attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! acpl_id - Attribute creation property list identifier -! appl_id - Attribute access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Creates a dataset as an attribute of a group, dataset, or named datatype +!! +!! \param loc_id Identifier of an object (group, dataset, or named datatype) attribute is attached to +!! \param name Attribute name +!! \param type_id Attribute datatype identifier +!! \param space_id Attribute dataspace identifier +!! \param attr_id Attribute identifier +!! \param hdferr \fortran_error +!! \param acpl_id Attribute creation property list identifier +!! \param aapl_id Attribute access property list identifier +!! SUBROUTINE h5acreate_f(loc_id, name, type_id, space_id, attr_id, & hdferr, acpl_id, aapl_id ) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name - INTEGER(HID_T), INTENT(IN) :: type_id ! Attribute datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Attribute dataspace identifier - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: acpl_id ! Attribute creation property list identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list identifier + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(OUT) :: attr_id + INTEGER, INTENT(OUT) :: hdferr + + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: acpl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id INTEGER(HID_T) :: acpl_id_default INTEGER(HID_T) :: aapl_id_default @@ -200,40 +180,24 @@ CONTAINS END SUBROUTINE h5acreate_f -! -!****s* H5A/h5aopen_name_f -! -! NAME -! h5aopen_name_f -! -! PURPOSE -! Opens an attribute specified by name. -! -! INPUTS -! obj_id - identifier of a group, dataset, or named -! datatype attribute to be attached to -! name - attribute name -! OUTPUTS -! attr_id - attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Opens an attribute specified by name. +!! +!! \param obj_id Identifier of a group, dataset, or named +!! datatype attribute to be attached to +!! \param name Attribute name +!! \param attr_id Attribute identifier +!! \param hdferr \fortran_error +!! SUBROUTINE H5Aopen_name_f(obj_id, name, attr_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(OUT) :: attr_id + INTEGER, INTENT(OUT) :: hdferr + CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name ! H5Aopen_name is deprecated @@ -254,41 +218,22 @@ CONTAINS IF(attr_id.LT.0) hdferr = -1 END SUBROUTINE H5Aopen_name_f -! -!****s* H5A/H5Aopen_idx_f -! -! NAME -! H5Aopen_idx_f -! -! PURPOSE -! Opens the attribute specified by its index. -! -! INPUTS -! obj_id - identifier of a group, dataset, or named -! datatype an attribute to be attached to -! index - index of the attribute to open (zero-based) -! OUTPUTS -! attr_id - attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Opens the attribute specified by its index. +!! +!! \param obj_id Identifier of a group, dataset, or named datatype an attribute to be attached to +!! \param index Index of the attribute to open (zero-based) +!! \param attr_id Attribute identifier +!! \param hdferr \fortran_error +!! SUBROUTINE H5Aopen_idx_f(obj_id, index, attr_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(IN) :: index ! Attribute index - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** -! H5Aopen_idx is deprecated in favor of the function H5Aopen_by_idx. + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(IN) :: index + INTEGER(HID_T), INTENT(OUT) :: attr_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER(HID_T) FUNCTION H5Aopen_by_idx(obj_id, index) BIND(C,NAME='H5Aopen_by_idx') IMPORT :: HID_T @@ -304,39 +249,20 @@ CONTAINS IF(attr_id.LT.0) hdferr = -1 END SUBROUTINE H5Aopen_idx_f -! -!****s* H5A/H5Aget_space_f -! -! NAME -! H5Aget_space_f -! -! PURPOSE -! Gets a copy of the dataspace for an attribute. -! -! INPUTS -! attr_id - attribute identifier -! -! OUTPUTS -! space_id - attribite dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Gets a copy of the dataspace for an attribute. +!! +!! \param attr_id Attribute identifier +!! \param space_id Attribite dataspace identifier +!! \param hdferr \fortran_error +!! SUBROUTINE H5Aget_space_f(attr_id, space_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(OUT) :: space_id ! Attribute dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(OUT) :: space_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER(HID_T) FUNCTION H5Aget_space(attr_id) BIND(C,NAME='H5Aget_space') IMPORT :: HID_T @@ -351,37 +277,20 @@ CONTAINS IF(space_id.LT.0) hdferr = -1 END SUBROUTINE H5Aget_space_f -! -!****s* H5A/H5Aget_type_f -! -! NAME -! H5Aget_type_f -! -! PURPOSE -! Gets an attribute datatype. -! -! INPUTS -! attr_id - attribute identifier -! OUTPUTS -! type_id - attribute datatype identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Gets an attribute datatype. +!! +!! \param attr_id Attribute identifier +!! \param type_id Attribute datatype identifier +!! \param hdferr \fortran_error +!! SUBROUTINE H5Aget_type_f(attr_id, type_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(OUT) :: type_id ! Attribute datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(OUT) :: type_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER(HID_T) FUNCTION H5Aget_type(attr_id) BIND(C,NAME='H5Aget_type') IMPORT :: HID_T @@ -396,41 +305,22 @@ CONTAINS IF(type_id.LT.0) hdferr = -1 END SUBROUTINE H5Aget_type_f -! -!****s* H5A/H5Aget_name_f -! -! NAME -! H5Aget_name_f -! -! PURPOSE -! Gets an attribute name. -! -! INPUTS -! attr_id - attribute identifier -! size - size of a buffer to read name in -! OUTPUTS -! buf - buffer to read name in -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Gets an attribute name. +!! +!! \param attr_id Attribute identifier +!! \param size Size of a buffer to read name in +!! \param buf Buffer to read name in +!! \param hdferr \fortran_error +!! SUBROUTINE h5aget_name_f(attr_id, size, buf, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size - CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Buffer to hold attribute name - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! name length is successful, -1 if fail -!***** + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(LEN=*), INTENT(INOUT) :: buf + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5aget_name_c(attr_id, size, buf) & BIND(C,NAME='h5aget_name_c') @@ -444,73 +334,48 @@ CONTAINS hdferr = h5aget_name_c(attr_id, size, buf) END SUBROUTINE h5aget_name_f -! -!****s* H5A/H5Aget_name_by_idx_f -! -! NAME -! H5Aget_name_by_idx_f -! -! PURPOSE -! Gets an attribute name, by attribute index position. -! -! INPUTS -! loc_id - Location of object to which attribute is attached -! obj_name - Name of object to which attribute is attached, relative to location -! idx_type - Type of index; Possible values are: -! H5_INDEX_UNKNOWN_F = -1 - Unknown index type -! H5_INDEX_NAME_F - Index on names -! H5_INDEX_CRT_ORDER_F - Index on creation order -! H5_INDEX_N_F - Number of indices defined -! -! order - Order in which to iterate over index; Possible values are: -! H5_ITER_UNKNOWN_F - Unknown order -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - No particular order, whatever is fastest -! H5_ITER_N_F - Number of iteration orders -! order - Index traversal order -! n - Attribute’s position in index -! -! OUTPUTS -! name - Attribute name -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! size - Size, in bytes, of attribute name -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Gets an attribute name, by attribute index position. +!! +!! \param loc_id Location of object to which attribute is attached +!! \param obj_name Name of object to which attribute is attached, relative to location +!! \param idx_type Type of index; Possible values are: +!! \li H5_INDEX_UNKNOWN_F = -1 - Unknown index type +!! \li H5_INDEX_NAME_F - Index on names +!! \li H5_INDEX_CRT_ORDER_F - Index on creation order +!! \li H5_INDEX_N_F - Number of indices defined +!! +!! \param order Index traversal order in which to iterate over index; Possible values are: +!! \li H5_ITER_UNKNOWN_F - Unknown order +!! \li H5_ITER_INC_F - Increasing order +!! \li H5_ITER_DEC_F - Decreasing order +!! \li H5_ITER_NATIVE_F - No particular order, whatever is fastest +!! \li H5_ITER_N_F - Number of iteration orders +!! \param n Attribute’s position in index +!! \param name Attribute name +!! \param hdferr \fortran_error +!! +!! \param size Size, in bytes, of attribute name +!! \param lapl_id Link access property list +!! SUBROUTINE h5aget_name_by_idx_f(loc_id, obj_name, idx_type, order, & n, name, hdferr, size, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, - ! from which attribute is to be removed *TEST* check NULL - INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER, INTENT(IN) :: idx_type + ! H5_INDEX_N_F - Number of indices defined + + INTEGER, INTENT(IN) :: order ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - ! H5_ITER_N_F - Number of iteration orders - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - CHARACTER(LEN=*), INTENT(OUT) :: name ! Attribute name - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! Returns attribute name size, - ! -1 if fail - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, - ! of the attribute -!***** + ! H5_ITER_N_F - Number of iteration orders + INTEGER(HSIZE_T), INTENT(IN) :: n + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: obj_namelen INTEGER(SIZE_T) :: size_default @@ -546,38 +411,20 @@ CONTAINS END SUBROUTINE h5aget_name_by_idx_f -! -!****s* H5A/H5Aget_num_attrs_f -! -! NAME -! H5Aget_num_attrs_f -! -! PURPOSE -! Determines the number of attributes attached to an object. -! -! INPUTS -! obj_id - object (group, dataset, or named datatype) -! identifier -! OUTPUTS -! attr_num - number of attributes attached to the object -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Determines the number of attributes attached to an object. +!! +!! \param obj_id Object (group, dataset, or named datatype) identifier +!! \param attr_num Number of attributes attached to the object +!! \param hdferr \fortran_error +!! SUBROUTINE h5aget_num_attrs_f(obj_id, attr_num, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: attr_num ! Number of attributes of the object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: attr_num + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5aget_num_attrs_c(obj_id, attr_num) BIND(C,name='h5aget_num_attrs_c') @@ -590,38 +437,21 @@ CONTAINS hdferr = h5aget_num_attrs_c(obj_id, attr_num) END SUBROUTINE h5aget_num_attrs_f -! -!****s* H5A/H5Adelete_f -! -! NAME -! H5Adelete_f -! -! PURPOSE -! Deletes an attribute of an object (group, dataset or -! named datatype) -! -! INPUTS -! obj_id - object identifier -! name - attribute name -! OUTPUTS -! -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Deletes an attribute of an object (group, dataset or named datatype) +!! +!! \param obj_id Object identifier +!! \param name Attribute name +!! +!! \param hdferr \fortran_error +!! SUBROUTINE H5Adelete_f(obj_id, name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(OUT) :: hdferr INTEGER(SIZE_T) :: namelen INTERFACE @@ -638,36 +468,18 @@ CONTAINS hdferr = H5Adelete_c(obj_id, name, namelen) END SUBROUTINE H5Adelete_f -! -!****s* H5A/H5Aclose_f -! -! NAME -! H5Aclose_f -! -! PURPOSE -! Closes the specified attribute. -! -! INPUTS -! attr_id - attribute identifier -! OUTPUTS -! -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! SOURCE - +!> +!! \ingroup FH5A +!! +!! \brief Closes the specified attribute. +!! +!! \param attr_id Attribute identifier +!! \param hdferr \fortran_error +!! SUBROUTINE H5Aclose_f(attr_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION H5Aclose(attr_id) BIND(C, NAME='H5Aclose') @@ -679,31 +491,20 @@ CONTAINS hdferr = INT(H5Aclose(attr_id)) END SUBROUTINE H5Aclose_f -! -!****s* H5A/H5Aget_storage_size_f -! -! NAME -! H5Aget_storage_size_f -! -! PURPOSE -! Returns the amount of storage required for an attribute. -! -! INPUTS -! attr_id - attribute identifier -! OUTPUTS -! size - attribute storage size -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Returns the amount of storage required for an attribute. +!! +!! \param attr_id Attribute identifier +!! \param size Attribute storage size +!! \param hdferr \fortran_error +!! SUBROUTINE H5Aget_storage_size_f(attr_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Attribute storage requirement - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER(HSIZE_T) FUNCTION H5Aget_storage_size(attr_id) BIND(C,NAME='H5Aget_storage_size') @@ -719,33 +520,20 @@ CONTAINS END SUBROUTINE H5Aget_storage_size_f -! -!****s* H5A/H5Aget_create_plist_f -! -! NAME -! H5Aget_create_plist_f -! -! PURPOSE -! Gets an attribute creation property list identifier -! -! INPUTS -! attr_id - Identifier of the attribute -! OUTPUTS -! creation_prop_id - Identifier for the attribute’s creation property -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Gets an attribute creation property list identifier +!! +!! \param attr_id Identifier of the attribute +!! \param creation_prop_id Identifier for the attribute’s creation property +!! \param hdferr \fortran_error +!! SUBROUTINE H5Aget_create_plist_f(attr_id, creation_prop_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Identifier of the attribute - INTEGER(HID_T), INTENT(OUT) :: creation_prop_id ! Identifier for the attribute’s creation property - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(OUT) :: creation_prop_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER(HID_T) FUNCTION H5Aget_create_plist(attr_id) BIND(C,NAME='H5Aget_create_plist') IMPORT :: HID_T @@ -760,44 +548,28 @@ CONTAINS END SUBROUTINE H5Aget_create_plist_f -! -!****s* H5A/H5Arename_by_name_f -! -! NAME -! H5Arename_by_name_f -! -! PURPOSE -! Renames an attribute -! -! INPUTS -! loc_id - Location or object identifier; may be dataset or group -! obj_name - Name of object, relative to location, -! whose attribute is to be renamed -! old_attr_name - Prior attribute name -! new_attr_name - New attribute name -! lapl_id - Link access property list identifier -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Renames an attribute +!! +!! \param loc_id Location or object identifier; may be dataset or group +!! \param obj_name Name of object, relative to location, whose attribute is to be renamed +!! \param old_attr_name Prior attribute name +!! \param new_attr_name New attribute name +!! \param lapl_id Link access property list identifier +!! \param hdferr \fortran_error +!! SUBROUTINE H5Arename_by_name_f(loc_id, obj_name, old_attr_name, new_attr_name, & hdferr, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, - ! whose attribute is to be renamed - CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name - CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name - - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(LEN=*), INTENT(IN) :: old_attr_name + CHARACTER(LEN=*), INTENT(IN) :: new_attr_name + + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: obj_namelen INTEGER(SIZE_T) :: old_attr_namelen @@ -835,41 +607,25 @@ CONTAINS END SUBROUTINE H5Arename_by_name_f -! -!****s* H5A/H5Aopen_f -! -! NAME -! H5Aopen_f -! -! PURPOSE -! Opens an attribute for an object specified by object -! identifier and attribute name -! -! INPUTS -! obj_id - Identifier for object to which attribute is attached -! attr_name - Name of attribute to open -! OUTPUTS -! attr_id - attribute identifier - -! OPTIONAL PARAMETERS -! aapl_id - Attribute access property list -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Opens an attribute for an object specified by object +!! identifier and attribute name +!! +!! \param obj_id Identifier for object to which attribute is attached +!! \param attr_name Name of attribute to open +!! \param attr_id Attribute identifier +!! \param hdferr \fortran_error +!! \param aapl_id Attribute access property list +!! SUBROUTINE H5Aopen_f(obj_id, attr_name, attr_id, hdferr, aapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! Success: 0 - ! Failure: -1 - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list -!***** + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(HID_T), INTENT(OUT) :: attr_id + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id INTEGER(HID_T) :: aapl_id_default INTEGER(SIZE_T) :: attr_namelen @@ -896,64 +652,39 @@ CONTAINS END SUBROUTINE H5Aopen_f -! -!****s* H5A/H5Adelete_by_idx_f -! -! NAME -! H5Adelete_by_idx_f -! -! PURPOSE -! Deletes an attribute from an object according to index order -! -! INPUTS -! loc_id - Location or object identifier; may be dataset or group -! obj_name - Name of object, relative to location, from which attribute is to be removed -! idx_type - Type of index; Possible values are: -! H5_INDEX_UNKNOWN_F = -1 - Unknown index type -! H5_INDEX_NAME_F - Index on names -! H5_INDEX_CRT_ORDER_F - Index on creation order -! H5_INDEX_N_F - Number of indices defined -! -! order - Order in which to iterate over index; Possible values are: -! H5_ITER_UNKNOWN_F - Unknown order -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - No particular order, whatever is fastest -! H5_ITER_N_F - Number of iteration orders -! -! n - Offset within index -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Deletes an attribute from an object according to index order +!! +!! \param loc_id Location or object identifier; may be dataset or group +!! \param obj_name Name of object, relative to location, from which attribute is to be removed +!! \param idx_type Type of index; Possible values are: +!! \li H5_INDEX_UNKNOWN_F = -1 - Unknown index type +!! \li H5_INDEX_NAME_F - Index on names +!! \li H5_INDEX_CRT_ORDER_F - Index on creation order +!! \li H5_INDEX_N_F - Number of indices defined +!! +!! \param order Order in which to iterate over index; Possible values are: +!! \li H5_ITER_UNKNOWN_F - Unknown order +!! \li H5_ITER_INC_F - Increasing order +!! \li H5_ITER_DEC_F - Decreasing order +!! \li H5_ITER_NATIVE_F - No particular order, whatever is fastest +!! \li H5_ITER_N_F - Number of iteration orders +!! +!! \param n Offset within index +!! \param hdferr \fortran_error +!! \param lapl_id Link access property list +!! SUBROUTINE H5Adelete_by_idx_f(loc_id, obj_name, idx_type, order, n, hdferr, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, - ! from which attribute is to be removed - INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - ! H5_ITER_N_F - Number of iteration orders - INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER, INTENT(IN) :: idx_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id INTEGER(SIZE_T) :: obj_namelen INTEGER(HID_T) :: lapl_id_default @@ -981,38 +712,24 @@ CONTAINS END SUBROUTINE H5Adelete_by_idx_f -! -!****s* H5A/H5Adelete_by_name_f -! -! NAME -! H5Adelete_by_name_f -! -! PURPOSE -! Removes an attribute from a specified location -! -! INPUTS -! loc_id - Identifier for object to which attribute is attached -! obj_name - Name of attribute to open -! attr_name - Attribute access property list -! lapl_id - Link access property list -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Removes an attribute from a specified location +!! +!! \param loc_id Identifier for object to which attribute is attached +!! \param obj_name Name of attribute to open +!! \param attr_name Attribute access property list +!! \param lapl_id Link access property list +!! \param hdferr \fortran_error +!! SUBROUTINE H5Adelete_by_name_f(loc_id, obj_name, attr_name, hdferr, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object, relative to location, - ! from which attribute is to be removed - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Name of attribute to delete - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id INTEGER(SIZE_T) :: attr_namelen INTEGER(SIZE_T) :: obj_namelen @@ -1042,55 +759,44 @@ CONTAINS END SUBROUTINE H5Adelete_by_name_f -! -!****s* H5A/H5Aopen_by_idx_f -! -! NAME -! H5Aopen_by_idx_f -! -! PURPOSE -! Opens an existing attribute that is attached to an object specified by location and name -! -! INPUTS -! loc_id - Location of object to which attribute is attached -! obj_name - Name of object to which attribute is attached, relative to location -! idx_type - Type of index -! order - Index traversal order -! n - Attribute’s position in index -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! aapl_id - Attribute access property list -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Opens an existing attribute that is attached to an object specified by location and name. +!! +!! \param loc_id Location of object to which attribute is attached. +!! \param obj_name Name of object to which attribute is attached, relative to location. +!! \param idx_type Type of index; Possible values are: +!! \li H5_INDEX_UNKNOWN_F = -1 - Unknown index type +!! \li H5_INDEX_NAME_F - Index on names +!! \li H5_INDEX_CRT_ORDER_F - Index on creation order +!! \li H5_INDEX_N_F - Number of indices defined +!! +!! \param order Order in which to iterate over index; Possible values are: +!! \li H5_ITER_UNKNOWN_F - Unknown order +!! \li H5_ITER_INC_F - Increasing order +!! \li H5_ITER_DEC_F - Decreasing order +!! \li H5_ITER_NATIVE_F - No particular order, whatever is fastest +!! \li H5_ITER_N_F - Number of iteration orders +!! \param n Attribute’s position in index. +!! \param attr_id Attribute identifier. +!! \param hdferr \fortran_error +!! \param aapl_id Attribute access property list. +!! \param lapl_id Link access property list. +!! SUBROUTINE H5Aopen_by_idx_f(loc_id, obj_name, idx_type, order, n, attr_id, hdferr, aapl_id, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached - INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER, INTENT(IN) :: idx_type + INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** + INTEGER(HID_T), INTENT(OUT) :: attr_id + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id INTEGER(SIZE_T) :: obj_namelen INTEGER(HID_T) :: aapl_id_default INTEGER(HID_T) :: lapl_id_default @@ -1108,7 +814,7 @@ CONTAINS INTEGER(HID_T) :: aapl_id_default INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: obj_namelen - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(OUT) :: attr_id END FUNCTION H5Aopen_by_idx_c END INTERFACE @@ -1124,41 +830,27 @@ CONTAINS END SUBROUTINE H5Aopen_by_idx_f -! -!****s* H5A/H5Aget_info_f -! -! NAME -! H5Aget_info_f -! -! PURPOSE -! Retrieves attribute information, by attribute identifier -! -! INPUTS -! attr_id - attribute identifier -! -! OUTPUTS -! NOTE: In C it is defined as a structure: H5A_info_t -! -! corder_valid - indicates whether the creation order data is valid for this attribute -! corder - is a positive integer containing the creation order of the attribute -! cset - indicates the character set used for the attribute’s name -! data_size - indicates the size, in the number of characters, of the attribute -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Retrieves attribute information, by attribute identifier. +!! +!! \param attr_id Attribute identifier. +!! NOTE: In C it is defined as a structure: H5A_info_t. +!! \param f_corder_valid Indicates whether the creation order data is valid for this attribute. +!! \param corder Is a positive integer containing the creation order of the attribute. +!! \param cset Indicates the character set used for the attribute’s name. +!! \param data_size Indicates the size, in the number of characters, of the attribute. +!! \param hdferr \fortran_error +!! SUBROUTINE H5Aget_info_f(attr_id, f_corder_valid, corder, cset, data_size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute - INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name - INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: attr_id + LOGICAL, INTENT(OUT) :: f_corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HSIZE_T), INTENT(OUT) :: data_size + INTEGER, INTENT(OUT) :: hdferr INTEGER :: corder_valid INTERFACE @@ -1182,63 +874,42 @@ CONTAINS END SUBROUTINE H5Aget_info_f -! -!****s* H5A/H5Aget_info_by_idx_f -! -! NAME -! H5Aget_info_by_idx_f -! -! PURPOSE -! Retrieves attribute information, by attribute index position -! -! INPUTS -! loc_id - Location of object to which attribute is attached -! obj_name - Name of object to which attribute is attached, relative to location -! idx_type - Type of index -! order - Index traversal order -! n - Attribute’s position in index -! -! OUTPUTS NOTE: In C it is defined as a structure: H5A_info_t -! corder_valid - indicates whether the creation order data is valid for this attribute -! corder - is a positive integer containing the creation order of the attribute -! cset - indicates the character set used for the attribute’s name -! data_size - indicates the size, in the number of characters, of the attribute -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Retrieves attribute information, by attribute index position +!! +!! \param loc_id Location of object to which attribute is attached +!! \param obj_name Name of object to which attribute is attached, relative to location +!! \param idx_type Type of index +!! \param order Index traversal order +!! \param n Attribute’s position in index +!! \param f_corder_valid Indicates whether the creation order data is valid for this attribute +!! \param corder Is a positive integer containing the creation order of the attribute +!! \param cset Indicates the character set used for the attribute’s name +!! \param data_size Indicates the size, in the number of characters, of the attribute +!! \param hdferr \fortran_error +!! \param lapl_id Link access property list +!! SUBROUTINE H5Aget_info_by_idx_f(loc_id, obj_name, idx_type, order, n, & f_corder_valid, corder, cset, data_size, hdferr, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached - INTEGER, INTENT(IN) :: idx_type ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER, INTENT(IN) :: idx_type + ! H5_INDEX_N_F - Number of indices defined + INTEGER, INTENT(IN) :: order ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + INTEGER(HSIZE_T), INTENT(IN) :: n - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute - INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name - INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** + LOGICAL, INTENT(OUT) :: f_corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HSIZE_T), INTENT(OUT) :: data_size + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id INTEGER :: corder_valid INTEGER(SIZE_T) :: obj_namelen INTEGER(HID_T) :: lapl_id_default @@ -1276,50 +947,35 @@ CONTAINS END SUBROUTINE H5Aget_info_by_idx_f -! -!****s* H5A/H5Aget_info_by_name_f -! -! NAME -! H5Aget_info_by_name_f -! -! PURPOSE -! Retrieves attribute information, by attribute name -! -! INPUTS -! loc_id - Location of object to which attribute is attached -! obj_name - Name of object to which attribute is attached, relative to location -! attr_name - Attribute name -! -! OUTPUTS NOTE: In C it is defined as a structure: H5A_info_t -! corder_valid - indicates whether the creation order data is valid for this attribute -! corder - is a positive integer containing the creation order of the attribute -! cset - indicates the character set used for the attribute’s name -! data_size - indicates the size, in the number of characters, of the attribute -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Retrieves attribute information, by attribute name +!! +!! \param loc_id Location of object to which attribute is attached +!! \param obj_name Name of object to which attribute is attached, relative to location +!! \param attr_name Attribute name +!! \param f_corder_valid Indicates whether the creation order data is valid for this attribute +!! \param corder Is a positive integer containing the creation order of the attribute +!! \param cset Indicates the character set used for the attribute’s name +!! \param data_size Indicates the size, in the number of characters, of the attribute +!! \param hdferr \fortran_error +!! \param lapl_id Link access property list +!! SUBROUTINE H5Aget_info_by_name_f(loc_id, obj_name, attr_name, & f_corder_valid, corder, cset, data_size, hdferr, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - - - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute - INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name - INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(LEN=*), INTENT(IN) :: attr_name + + + LOGICAL, INTENT(OUT) :: f_corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HSIZE_T), INTENT(OUT) :: data_size + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id INTEGER :: corder_valid INTEGER(SIZE_T) :: obj_namelen INTEGER(SIZE_T) :: attr_namelen @@ -1359,34 +1015,22 @@ CONTAINS END SUBROUTINE H5Aget_info_by_name_f -! -!****s* H5A/H5Acreate_by_name_f -! -! NAME -! H5Acreate_by_name_f -! -! PURPOSE -! Creates an attribute attached to a specified object -! -! INPUTS -! loc_id - Location or object identifier; may be dataset or group -! obj_name - Name, relative to loc_id, of object that attribute is to be attached to -! attr_name - Attribute name -! type_id - Attribute datatype identifier -! space_id - Attribute dataspace identifier -! -! OUTPUTS -! attr - an attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! acpl_id - Attribute creation property list identifier (Currently not used.) -! aapl_id - Attribute access property list identifier (Currently not used.) -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Creates an attribute attached to a specified object +!! +!! \param loc_id Location or object identifier; may be dataset or group +!! \param obj_name Name, relative to loc_id, of object that attribute is to be attached to +!! \param attr_name Attribute name +!! \param type_id Attribute datatype identifier +!! \param space_id Attribute dataspace identifier +!! \param attr An attribute identifier +!! \param hdferr \fortran_error +!! \param acpl_id Attribute creation property list identifier (Currently not used.) +!! \param aapl_id Attribute access property list identifier (Currently not used.) +!! \param lapl_id Link access property list +!! SUBROUTINE H5Acreate_by_name_f(loc_id, obj_name, attr_name, type_id, space_id, attr, hdferr, & acpl_id, aapl_id, lapl_id) IMPLICIT NONE @@ -1401,7 +1045,6 @@ CONTAINS INTEGER(HID_T), INTENT(IN), OPTIONAL :: acpl_id INTEGER(HID_T), INTENT(IN), OPTIONAL :: aapl_id INTEGER(HID_T), INTENT(IN), OPTIONAL :: lapl_id -!***** INTEGER(SIZE_T) :: obj_namelen INTEGER(SIZE_T) :: attr_namelen @@ -1446,36 +1089,22 @@ CONTAINS type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) END SUBROUTINE H5Acreate_by_name_f -! -!****s* H5A/H5Aexists_f -! -! NAME -! H5Aexists_f -! -! PURPOSE -! Determines whether an attribute with a given name exists on an object -! -! INPUTS -! obj_id - Object identifier -! attr_name - Attribute name -! -! OUTPUTS -! attr_exists - attribute exists status -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Determines whether an attribute with a given name exists on an object +!! +!! \param obj_id Object identifier +!! \param attr_name Attribute name +!! \param attr_exists Attribute exists status +!! \param hdferr \fortran_error +!! SUBROUTINE H5Aexists_f(obj_id, attr_name, attr_exists, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: attr_name + LOGICAL, INTENT(OUT) :: attr_exists + INTEGER, INTENT(OUT) :: hdferr INTEGER(HID_T) :: attr_exists_c INTEGER(SIZE_T) :: attr_namelen @@ -1500,42 +1129,26 @@ CONTAINS END SUBROUTINE H5Aexists_f -! -!****s* H5A/H5Aexists_by_name_f -! -! NAME -! H5Aexists_by_name_f -! -! PURPOSE -! Determines whether an attribute with a given name exists on an object -! -! INPUTS -! loc_id - Location identifier -! obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) -! attr_name - Attribute name -! -! OUTPUTS -! attr_exists - attribute exists status -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Determines whether an attribute with a given name exists on an object +!! +!! \param loc_id Location identifier +!! \param obj_name Object name either relative to loc_id, absolute from the file’s root group, or '. '(a dot) +!! \param attr_name Attribute name +!! \param attr_exists Attribute exists status +!! \param hdferr \fortran_error +!! \param lapl_id Link access property list identifier +!! SUBROUTINE H5Aexists_by_name_f(loc_id, obj_name, attr_name, attr_exists, hdferr, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, - ! absolute from the file’s root group, or '.' - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - LOGICAL, INTENT(OUT) :: attr_exists ! .TRUE. if exists, .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(LEN=*), INTENT(IN) :: attr_name + LOGICAL, INTENT(OUT) :: attr_exists + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id INTEGER :: attr_exists_c INTEGER(SIZE_T) :: obj_namelen INTEGER(SIZE_T) :: attr_namelen @@ -1570,44 +1183,28 @@ CONTAINS IF(attr_exists_c.GT.0) attr_exists = .TRUE. END SUBROUTINE H5Aexists_by_name_f -! -!****s* H5A/H5Aopen_by_name_f -! -! NAME -! H5Aopen_by_name_f -! -! PURPOSE -! Opens an attribute for an object by object name and attribute name. -! -! INPUTS -! loc_id - Location from which to find object to which attribute is attached -! obj_name - Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) -! attr_name - Attribute name -! -! OUTPUTS -! attr_id - attribute identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! aapl_id - Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.) -! lapl_id - Link access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Opens an attribute for an object by object name and attribute name. +!! +!! \param loc_id Location from which to find object to which attribute is attached +!! \param obj_name Object name either relative to loc_id, absolute from the file’s root group, or '.' (a dot) +!! \param attr_name Attribute name +!! \param attr_id Attribute identifier +!! \param hdferr \fortran_error +!! \param aapl_id Attribute access property list (Currently unused; should be passed in as H5P_DEFAULT.) +!! \param lapl_id Link access property list identifier +!! SUBROUTINE H5Aopen_by_name_f(loc_id, obj_name, attr_name, attr_id, hdferr, aapl_id, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Object name either relative to loc_id, - ! absolute from the file’s root group, or '.' - CHARACTER(LEN=*), INTENT(IN) :: attr_name ! Attribute name - INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id ! Attribute access property list - ! (Currently unused; should be passed in as H5P_DEFAULT_F) - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(HID_T), INTENT(OUT) :: attr_id + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: aapl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id INTEGER(HID_T) :: aapl_id_default INTEGER(HID_T) :: lapl_id_default @@ -1644,41 +1241,22 @@ CONTAINS END SUBROUTINE H5Aopen_by_name_f -! -!****s* H5A/H5Arename_f -! -! NAME -! H5Arename_f -! -! PURPOSE -! Renames an attribute -! -! INPUTS -! loc_id - Location or object identifier; may be dataset or group -! old_attr_name - Prior attribute name -! new_attr_name - New attribute name -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! HISTORY -! N/A -! -! - -! SOURCE +!> +!! \ingroup FH5A +!! +!! \brief Renames an attribute +!! +!! \param loc_id Location or object identifier; may be dataset or group +!! \param old_attr_name Prior attribute name +!! \param new_attr_name New attribute name +!! \param hdferr \fortran_error +!! SUBROUTINE H5Arename_f(loc_id, old_attr_name, new_attr_name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Object identifier - CHARACTER(LEN=*), INTENT(IN) :: old_attr_name ! Prior attribute name - CHARACTER(LEN=*), INTENT(IN) :: new_attr_name ! New attribute name - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: old_attr_name + CHARACTER(LEN=*), INTENT(IN) :: new_attr_name + INTEGER, INTENT(OUT) :: hdferr INTEGER(SIZE_T) :: old_attr_namelen INTEGER(SIZE_T) :: new_attr_namelen @@ -1704,14 +1282,99 @@ CONTAINS END SUBROUTINE H5Arename_f +#ifdef H5_DOXYGEN_FORTRAN + + +!> +!! \ingroup FH5A +!! +!! \brief Writes data to an attribute. +!! +!! \note \fortran_approved +!! +!! \param attr_id Identifier of an attribute to write. +!! \param memtype_id Identifier of the attribute datatype (in memory). +!! \param buf Data to be written. +!! \param hdferr \fortran_error +!! + SUBROUTINE h5awrite_f(attr_id, memtype_id, buf, hdferr) + INTEGER(HID_T) , INTENT(IN) :: attr_id + INTEGER(HID_T) , INTENT(IN) :: memtype_id + TYPE(C_PTR) , INTENT(IN) :: buf + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE h5awrite_f + +!> +!! \ingroup FH5A +!! +!! \brief Writes data to an attribute. +!! +!! \note \fortran_obsolete +!! +!! \param attr_id Identifier of an attribute to write. +!! \param memtype_id Identifier of the attribute datatype (in memory). +!! \param buf Data buffer; may be a scalar or an array. +!! \param dims Array to hold corresponding dimension sizes of data buffer buf; +!! dim(k) has value of the k-th dimension of buffer buf; values are ignored if buf is a scalar. +!! \param hdferr \fortran_error +!! + SUBROUTINE h5awrite_f(attr_id, memtype_id, buf, dims, hdferr) + INTEGER(HID_T) , INTENT(IN) :: attr_id + INTEGER(HID_T) , INTENT(IN) :: memtype_id + TYPE(TYPE) , INTENT(IN) :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE h5awrite_f +!> +!! \ingroup FH5A +!! +!! \brief Reads an attribute. +!! +!! \note \fortran_approved +!! +!! \param attr_id Identifier of an attribute to read. +!! \param memtype_id Identifier of the attribute datatype (in memory). +!! \param buf Buffer for data to be read. +!! \param hdferr \fortran_error +!! + SUBROUTINE h5aread_f(attr_id, memtype_id, buf, hdferr) + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + TYPE(C_PTR) , INTENT(INOUT) :: buf + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE h5aread_f + +!> +!! \ingroup FH5A +!! +!! \brief Reads an attribute. +!! +!! \note \fortran_obsolete +!! +!! \param attr_id Identifier of an attribute to read. +!! \param memtype_id Identifier of the attribute datatype (in memory). +!! \param buf Buffer for data to be read. +!! \param dims Array to hold corresponding dimension sizes of data buffer buf; +!! dim(k) has value of the k-th dimension of buffer buf; values are ignored if buf is a scalar. +!! \param hdferr \fortran_error +!! + SUBROUTINE h5aread_f(attr_id, memtype_id, buf, dims, hdferr) + INTEGER(HID_T) , INTENT(IN) :: attr_id + INTEGER(HID_T) , INTENT(IN) :: memtype_id + TYPE(TYPE) , INTENT(INOUT) :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE h5aread_f + +#else + SUBROUTINE H5Awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(IN) :: buf + INTEGER, INTENT(OUT) :: hdferr CALL H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), dims, hdferr) @@ -1719,13 +1382,12 @@ CONTAINS SUBROUTINE H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, buf_len, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code + CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1:1)) @@ -1734,51 +1396,12 @@ CONTAINS END SUBROUTINE H5Awrite_char_scalar_fix - -!****s* H5A (F03)/H5Awrite_f_F03 -! -! NAME -! H5Awrite_f_F03 -! -! PURPOSE -! Writes an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! buf - Data buffer; may be a scalar or an array -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers -! up to 7 dimensions. -! -! Fortran2003 Interface: -!! SUBROUTINE H5Awrite_f(attr_id, memtype_id, buf, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE(C_PTR) , INTENT(IN) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE H5Awrite_ptr(attr_id, mem_type_id, buf, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id TYPE(C_PTR), INTENT(IN), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr hdferr = H5Awrite_f_c(attr_id, mem_type_id, buf) @@ -1786,12 +1409,11 @@ CONTAINS SUBROUTINE H5Aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT) :: buf + INTEGER, INTENT(OUT) :: hdferr CALL H5Aread_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), hdferr) @@ -1799,12 +1421,11 @@ CONTAINS SUBROUTINE H5Aread_char_scalar_fix(attr_id, memtype_id, buf, buf_len, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code + CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1:1)) @@ -1813,62 +1434,19 @@ CONTAINS END SUBROUTINE H5Aread_char_scalar_fix -!****s* H5A (F03)/H5Aread_f_F03 -! -! NAME -! H5Aread_f_F03 -! -! PURPOSE -! Reads an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! -! Outputs: -! buf - Data buffer; may be a scalar or an array -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces are added for -! called C functions (it is needed for Windows -! port). February 27, 2001 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistent -! with how the C functions handles it. The pg -! compiler will return 0 if a buf value is not set. -! February, 2008 -! -! NOTES -! This function is overloaded to write INTEGER, -! REAL, REAL(KIND=C_DOUBLE) and CHARACTER buffers -! up to 7 dimensions. -! Fortran2003 Interface: -!! SUBROUTINE H5Aread_f(attr_id, memtype_id, buf, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: attr_id -!! INTEGER(HID_T) , INTENT(IN) :: memtype_id -!! TYPE(C_PTR) , INTENT(INOUT) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE H5Aread_ptr(attr_id, mem_type_id, buf, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id TYPE(C_PTR), INTENT(INOUT), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr hdferr = H5Aread_f_c(attr_id, mem_type_id, buf) END SUBROUTINE H5Aread_ptr +#endif + END MODULE H5A diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 index 216b005..7707083 100644 --- a/fortran/src/H5Dff.F90 +++ b/fortran/src/H5Dff.F90 @@ -1,13 +1,13 @@ -!****h* ROBODoc/H5D -! -! NAME -! MODULE H5D -! -! FILE -! fortran/src/H5Dff.F90 -! -! PURPOSE -! This file contains Fortran interfaces for H5D functions. +!> @defgroup FH5D Fortran Datasets (H5D) Interface +!! +!! @see H5D, C-API +!! +!! @see @ref H5D_UG, User Guide +!! + +!> @ingroup FH5D +!! +!! @brief This module contains Fortran interfaces for H5D functions. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -36,7 +36,7 @@ ! (i.e. real , dimension(*) :: ... ) etc... ! ! (3) Could not place the USE, INTRINSIC :: ISO_C_BINDING in the module header because it may -! conflict with the USE, INTRINSIC :: ISO_C_BINDING included in the user's program. Moved +! conflict with the USE, INTRINSIC :: ISO_C_BINDING included in the user's program. Moved ! the statement instead to each subroutine. ! ! @@ -56,7 +56,7 @@ ! (b) an allocated allocatable variable that has the TARGET attribute, or ! (c) an associated pointer. ! -! - When X is a character, for interoperability the standard is: +! - When X is a character, for interoperability the standard is: ! ! 15.2.1 Interoperability of intrinsic types ! @@ -81,7 +81,6 @@ ! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. ! This is needed for Windows based operating systems. ! -!***** #include @@ -103,17 +102,7 @@ MODULE H5D MODULE PROCEDURE h5dset_extent_f END INTERFACE - INTERFACE h5dread_vl_f - MODULE PROCEDURE h5dread_vl_integer - MODULE PROCEDURE h5dread_vl_real - MODULE PROCEDURE h5dread_vl_string - END INTERFACE - - INTERFACE h5dwrite_vl_f - MODULE PROCEDURE h5dwrite_vl_integer - MODULE PROCEDURE h5dwrite_vl_real - MODULE PROCEDURE h5dwrite_vl_string - END INTERFACE +#ifndef H5_DOXYGEN_FORTRAN INTERFACE h5dwrite_f MODULE PROCEDURE h5dwrite_reference_obj @@ -131,7 +120,18 @@ MODULE H5D ! This is the preferred way to call h5dread ! by passing an address MODULE PROCEDURE h5dread_ptr + END INTERFACE + + INTERFACE h5dread_vl_f + MODULE PROCEDURE h5dread_vl_integer + MODULE PROCEDURE h5dread_vl_real + MODULE PROCEDURE h5dread_vl_string + END INTERFACE + INTERFACE h5dwrite_vl_f + MODULE PROCEDURE h5dwrite_vl_integer + MODULE PROCEDURE h5dwrite_vl_real + MODULE PROCEDURE h5dwrite_vl_string END INTERFACE @@ -195,64 +195,43 @@ MODULE H5D IMPORT :: HID_T IMPLICIT NONE TYPE(C_PTR), VALUE :: f_ptr_fill_value - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + INTEGER(HID_T) :: fill_type_id + INTEGER(HID_T), INTENT(IN) :: space_id TYPE(C_PTR), VALUE :: f_ptr_buf INTEGER(HID_T) :: mem_type_id END FUNCTION h5dfill_c END INTERFACE +#endif CONTAINS -! -!****s* H5D/h5dcreate_f -! -! NAME -! h5dcreate_f -! -! PURPOSE -! Creates a dataset at the specified location -! -! INPUTS -! loc_id - file or group identifier -! name - dataset name -! type_id - dataset datatype identifier -! space_id - dataset dataspace identifier -! OUTPUTS -! dset_id - dataset identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! creation_prp - Dataset creation property list -! lcpl_id - Link creation property list -! dapl_id - Dataset access property list -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! - Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! - Added version's 1.8 new optional parameters -! February, 2008 -! -! SOURCE +!> +!! \ingroup FH5D +!! +!! \brief Creates a dataset at the specified location. +!! +!! \param loc_id File or group identifier. +!! \param name Dataset name. +!! \param type_id Dataset datatype identifier. +!! \param space_id Dataset dataspace identifier. +!! \param dset_id Dataset identifier. +!! \param hdferr \fortran_error +!! \param dcpl_id Dataset creation property list. +!! \param lcpl_id Link creation property list. +!! \param dapl_id Dataset access property list. +!! SUBROUTINE h5dcreate_f(loc_id, name, type_id, space_id, dset_id, & hdferr, dcpl_id, lcpl_id, dapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id ! Dataset creation property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(OUT) :: dset_id + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id INTEGER(HID_T) :: lcpl_id_default INTEGER(HID_T) :: dcpl_id_default @@ -295,45 +274,24 @@ CONTAINS END SUBROUTINE h5dcreate_f -! -!****s* H5D/h5dopen_f -! -! NAME -! h5dopen_f -! -! PURPOSE -! Opens an existing dataset. -! -! INPUTS -! loc_id - file or group identifier -! name - dataset name -! OUTPUTS -! dset_id - dataset identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! dapl_id - Dataset access property list -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! -Added 1.8 (optional) parameter dapl_id -! February, 2008, M. Scot Breitenfeld -! -! SOURCE +!> +!! \ingroup FH5D +!! +!! \brief Opens an existing dataset. +!! +!! \param loc_id File or group identifier. +!! \param name Dataset name. +!! \param dset_id Dataset identifier. +!! \param hdferr \fortran_error +!! \param dapl_id Dataset access property list. +!! SUBROUTINE h5dopen_f(loc_id, name, dset_id, hdferr, dapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset - INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(OUT) :: dset_id + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id INTEGER :: namelen ! Name length INTEGER(HID_T) :: dapl_id_default @@ -360,35 +318,18 @@ CONTAINS END SUBROUTINE h5dopen_f -! -!****s* H5D/h5dclose_f -! -! NAME -! h5dclose_f -! -! PURPOSE -! Closes a dataset. -! -! INPUTS -! dset_id - dataset identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE +!> +!! \ingroup FH5D +!! +!! \brief Closes a dataset. +!! +!! \param dset_id Dataset identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5dclose_f(dset_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5dclose_c(dset_id) & BIND(C,NAME='h5dclose_c') @@ -402,40 +343,21 @@ CONTAINS END SUBROUTINE h5dclose_f -! -!****s* H5D/h5dget_type_f -! -! NAME -! h5dget_type_f -! -! PURPOSE -! Returns an identifier for a copy of the datatype for a -! dataset. -! -! INPUTS -! dataset_id - dataset identifier -! OUTPUTS -! datatype_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! -! SOURCE +!> +!! \ingroup FH5D +!! +!! \brief Returns an identifier for a copy of the datatype for a +!! dataset. +!! +!! \param dataset_id Dataset identifier. +!! \param datatype_id Dataspace identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5dget_type_f(dataset_id, datatype_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HID_T), INTENT(OUT) :: datatype_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(OUT) :: datatype_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5dget_type_c(dataset_id, datatype_id) & BIND(C,NAME='h5dget_type_c') @@ -449,44 +371,20 @@ CONTAINS hdferr = h5dget_type_c (dataset_id, datatype_id) END SUBROUTINE h5dget_type_f -! -!****s* H5D/h5dset_extent -! -! NAME -! h5dset_extent (instead of obsolete name: h5dextend_f) -! -! PURPOSE -! Extends a dataset with unlimited dimension. -! -! INPUTS -! dataset_id - dataset identifier -! size - array containing the new magnitude of -! each dimension -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! Changed name from the now obsolete h5dextend_f -! to h5dset_extent_f. Provided interface to old name -! for backward compatibility. -MSB- March 14, 2008 -! -! SOURCE +!> +!! \ingroup FH5D +!! +!! \brief Extends a dataset with unlimited dimension. +!! +!! \param dataset_id Dataset identifier. +!! \param size Array containing the new magnitude of each dimension. +!! \param hdferr \fortran_error +!! SUBROUTINE h5dset_extent_f(dataset_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: dataset_id INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size - ! Array containing - ! dimensions' sizes - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5dset_extent_c(dataset_id, size) & BIND(C,NAME='h5dset_extent_c') @@ -500,37 +398,20 @@ CONTAINS hdferr = H5Dset_extent_c(dataset_id, size) END SUBROUTINE h5dset_extent_f -!****s* H5D/h5dget_create_plist_f -! -! NAME -! h5dget_create_plist_f -! -! PURPOSE -! Returns an identifier for a copy of the dataset creation -! property list for a dataset. -! -! INPUTS -! dataset_id - dataset identifier -! OUTPUTS -! plist_id - creation property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! SOURCE +!> +!! \ingroup FH5D +!! +!! \brief Returns an identifier for a copy of the dataset creation property list for a dataset. +!! +!! \param dataset_id Dataset identifier. +!! \param plist_id Creation property list identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5dget_create_plist_f(dataset_id, plist_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HID_T), INTENT(OUT) :: plist_id ! Dataset creation - ! property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(OUT) :: plist_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5dget_create_plist_c(dataset_id, plist_id) & BIND(C,NAME='h5dget_create_plist_c') @@ -543,32 +424,20 @@ CONTAINS hdferr = h5dget_create_plist_c(dataset_id, plist_id) END SUBROUTINE h5dget_create_plist_f -! -!****s* H5D/h5dget_storage_size_f -! -! NAME -! h5dget_storage_size_f -! -! PURPOSE -! Returns the amount of storage requires by a dataset -! -! INPUTS -! dataset_id - dataset identifier -! OUTPUTS -! size - datastorage size -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 15, 2002 -! SOURCE +!> +!! \ingroup FH5D +!! +!! \brief Returns the amount of storage requires by a dataset +!! +!! \param dataset_id Dataset identifier. +!! \param size Datastorage size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5dget_storage_size_f(dataset_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Amount of storage - ! allocated for dataset - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5dget_storage_size_c(dataset_id, size) & BIND(C,NAME='h5dget_storage_size_c') @@ -581,38 +450,24 @@ CONTAINS hdferr = h5dget_storage_size_c(dataset_id, size) END SUBROUTINE h5dget_storage_size_f -! -!****s* H5D/h5dvlen_get_max_len_f -! -! NAME -! h5dvlen_get_max_len_f -! -! PURPOSE -! Returns maximum length of the VL array elements -! -! INPUTS -! dataset_id - dataset identifier -! type_id - datatype identifier -! space_id - dataspace identifier -! OUTPUTS -! size - buffer size -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! October 15, 2002 -! -! SOURCE +!> +!! \ingroup FH5D +!! +!! \brief Returns maximum length of the VL array elements +!! +!! \param dataset_id Dataset identifier. +!! \param type_id Datatype identifier. +!! \param space_id Dataspace identifier. +!! \param len Buffer size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5dvlen_get_max_len_f(dataset_id, type_id, space_id, len, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(SIZE_T), INTENT(OUT) :: len ! Maximum length of the element - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(SIZE_T), INTENT(OUT) :: len + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) & BIND(C,NAME='h5dvlen_get_max_len_c') @@ -627,36 +482,24 @@ CONTAINS hdferr = h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) END SUBROUTINE h5dvlen_get_max_len_f -! -!****s* H5D/h5dget_space_status_f -! -! NAME -! h5dget_space_status_f -! -! PURPOSE -! Returns the status of data space allocation. -! -! INPUTS -! dset_id - dataset identifier -! OUTPUTS -! flag - status; may have one of the following values: -! H5D_SPACE_STS_ERROR_F -! H5D_SPACE_STS_NOT_ALLOCATED_F -! H5D_SPACE_STS_PART_ALLOCATED_F -! H5D_SPACE_STS_ALLOCATED_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE +!> +!! \ingroup FH5D +!! +!! \brief Returns the status of data space allocation. +!! +!! \param dset_id Dataset identifier. +!! \param flag Status; may have one of the following values: +!! \li H5D_SPACE_STS_ERROR_F +!! \li H5D_SPACE_STS_NOT_ALLOCATED_F +!! \li H5D_SPACE_STS_PART_ALLOCATED_F +!! \li H5D_SPACE_STS_ALLOCATED_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5dget_space_status_f(dset_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: flag ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - !***** + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER, INTENT(OUT) :: flag + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5dget_space_status_c(dset_id, flag) & BIND(C,NAME='h5dget_space_status_c') @@ -669,41 +512,28 @@ CONTAINS hdferr = h5dget_space_status_c(dset_id, flag) END SUBROUTINE h5dget_space_status_f -! -!****s* H5D/h5dcreate_anon_f -! -! NAME -! h5dcreate_anon_f -! -! PURPOSE -! Creates a dataset in a file without linking it into the file structure -! -! INPUTS -! loc_id - Identifier of the file or group within which to create the dataset. -! type_id - Identifier of the datatype to use when creating the dataset. -! space_id - Identifier of the dataspace to use when creating the dataset. -! OUTPUTS -! dset_id - dataset identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! dcpl_id - Dataset creation property list identifier. -! dapl_id - Dataset access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 11, 2008 -! -! SOURCE +!> +!! \ingroup FH5D +!! +!! \brief Creates a dataset in a file without linking it into the file structure +!! +!! \param loc_id Identifier of the file or group within which to create the dataset. +!! \param type_id Identifier of the datatype to use when creating the dataset. +!! \param space_id Identifier of the dataspace to use when creating the dataset. +!! \param dset_id Dataset identifier. +!! \param hdferr \fortran_error +!! \param dcpl_id Dataset creation property list identifier. +!! \param dapl_id Dataset access property list identifier. +!! SUBROUTINE h5dcreate_anon_f(loc_id, type_id, space_id, dset_id, hdferr, dcpl_id, dapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier. - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier. - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier. - INTEGER(HID_T), INTENT(OUT) :: dset_id ! Dataset identifier. - INTEGER, INTENT(OUT) :: hdferr ! Error code. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id ! Dataset creation property list identifier. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id ! Dataset access property list identifier. -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(OUT) :: dset_id + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dcpl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: dapl_id INTEGER(HID_T) :: dcpl_id_default INTEGER(HID_T) :: dapl_id_default @@ -734,21 +564,83 @@ CONTAINS END SUBROUTINE h5dcreate_anon_f +#if H5_DOXYGEN_FORTRAN + !> + !! \ingroup FH5D + !! + !! \brief Reads variable-length data. F2003 API h5dread_f should be used instead. + !! + !! \param dset_id Dataset identifier. + !! \param mem_type_id Memory datatype identifier. + !! \param buf Data buffer; may be a scalar or an array, TYPE(TYPE) must be one of the following: + !! \li INTEGER + !! \li REAL + !! \li CHARACTER + !! \param dims Array to hold corresponding dimension sizes of data buffer buf, dim(k) has value of the k-th + !! dimension of buffer buf. Values are ignored if buf is a scalar. + !! \param len Array to store length of each element. + !! \param hdferr \fortran_error + !! \param mem_space_id Memory dataspace identifier, default value is H5S_ALL_F. + !! \param file_space_id File dataspace identifier, default value is H5S_ALL_F. + !! \param xfer_prp Transfer property list identifier, default value is H5P_DEFAULT_F. + !! + SUBROUTINE h5dread_vl_f(dset_id, mem_type_id, buf, dims, len, hdferr, mem_space_id, file_space_id, xfer_prp) + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + TYPE(TYPE), INTENT(INOUT), DIMENSION(dims(1),dims(2)) :: buf + + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + END SUBROUTINE h5dread_vl_f + !> + !! \ingroup FH5D + !! + !! \brief Writes variable-length data. F2003 API h5dwritef should be used instead. + !! + !! \param dset_id Dataset identifier. + !! \param mem_type_id Memory datatype identifier. + !! \param buf Data buffer; may be a scalar or an array, TYPE(TYPE) must be one of the following: + !! \li INTEGER + !! \li REAL + !! \li CHARACTER + !! \param dims Array to hold corresponding dimension sizes of data buffer buf, dim(k) has value of the k-th + !! dimension of buffer buf. Values are ignored if buf is a scalar. + !! \param len Array to store length of each element. + !! \param hdferr \fortran_error + !! \param mem_space_id Memory dataspace identifier, default value is H5S_ALL_F. + !! \param file_space_id File dataspace identifier, default value is H5S_ALL_F. + !! \param xfer_prp Transfer property list identifier, default value is H5P_DEFAULT_F. + !! + SUBROUTINE h5dwrite_vl_f(dset_id, mem_type_id, buf, dims, len, hdferr, mem_space_id, file_space_id, xfer_prp) + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + TYPE(TYPE), INTENT(IN),DIMENSION(dims(1),dims(2)) :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + END SUBROUTINE h5dwrite_vl_f + +#else SUBROUTINE h5dwrite_vl_integer(dset_id, mem_type_id, buf, dims, len, & hdferr, & mem_space_id, file_space_id, xfer_prp) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store - ! the length of each - ! element - INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2)), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len + INTEGER, INTENT(IN), DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default @@ -790,19 +682,15 @@ CONTAINS hdferr, & mem_space_id, file_space_id, xfer_prp) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store - ! the length of each - ! element - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! -1 if failed, 0 otherwise - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len + INTEGER, INTENT(INOUT), DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default @@ -847,18 +735,16 @@ CONTAINS hdferr, & mem_space_id, file_space_id, xfer_prp) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len ! Array to store - ! the length of each - ! element + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len REAL, INTENT(IN), & DIMENSION(dims(1),dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default @@ -903,17 +789,16 @@ CONTAINS hdferr, & mem_space_id, file_space_id, xfer_prp) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! MAX len x num_elem - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len ! Array to store the length of each element + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len REAL, INTENT(INOUT), & DIMENSION(dims(1),dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! -1 if failed, 0 otherwise - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default @@ -961,15 +846,15 @@ CONTAINS mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_CHAR IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! Number of strings - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len ! Array to store the length of each element - CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len + CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(2)) :: buf + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default @@ -1014,18 +899,16 @@ CONTAINS SUBROUTINE h5dread_vl_string(dset_id, mem_type_id, buf, dims, str_len, & hdferr, mem_space_id, file_space_id, xfer_prp) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims ! number of strings - INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len ! Array to store - ! the length of each - ! element + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims + INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len CHARACTER(LEN=*), INTENT(OUT), & DIMENSION(dims(2)) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default @@ -1064,33 +947,22 @@ CONTAINS buf, dims, str_len) RETURN END SUBROUTINE h5dread_vl_string +#endif -! -!****s* H5D/h5dget_offset_f -! -! NAME -! h5dget_offset_f -! -! PURPOSE -! Returns dataset address in file. -! -! INPUTS -! dataset_id - Dataset identifier. -! OUTPUTS -! offset - The offset in bytes. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! April 16, 2015 -! -! SOURCE +!> +!! \ingroup FH5D +!! +!! \brief Returns dataset address in file. +!! +!! \param dset_id Dataset identifier. +!! \param offset The offset in bytes. +!! \param hdferr \fortran_error +!! SUBROUTINE h5dget_offset_f(dset_id, offset, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HADDR_T), INTENT(OUT) :: offset INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER(HADDR_T) FUNCTION h5dget_offset(dset_id) BIND(C,NAME='H5Dget_offset') IMPORT :: HID_T, HADDR_T @@ -1105,38 +977,21 @@ CONTAINS END SUBROUTINE h5dget_offset_f -! -!****s* H5D/h5dget_space_f -! -! NAME -! h5dget_space_f -! -! PURPOSE -! Returns an identifier for a copy of the dataspace for a -! dataset. -! -! INPUTS -! dataset_id - dataset identifier -! OUTPUTS -! dataspace_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE +!> +!! \ingroup FH5D +!! +!! \brief Returns an identifier for a copy of the dataspace for a +!! dataset. +!! +!! \param dataset_id Dataset identifier. +!! \param dataspace_id Dataspace identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5dget_space_f(dataset_id, dataspace_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HID_T), INTENT(OUT) :: dataspace_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(OUT) :: dataspace_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5dget_space_c(dataset_id, dataspace_id) BIND(C,NAME='h5dget_space_c') IMPORT :: HID_T @@ -1149,32 +1004,20 @@ CONTAINS hdferr = h5dget_space_c(dataset_id, dataspace_id) END SUBROUTINE h5dget_space_f -!****s* H5D/h5dget_access_plist_f -! -! NAME -! h5dget_access_plist_f -! -! PURPOSE -! Returns a copy of the dataset creation property list. -! -! INPUTS -! dset_id - Dataset identifier -! -! OUTPUTS -! plist_id - Dataset access property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! April 13, 2009 -! -! SOURCE +!> +!! \ingroup FH5D +!! +!! \brief Returns a copy of the dataset creation property list. +!! +!! \param dset_id Dataset identifier. +!! \param plist_id Dataset access property list identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5dget_access_plist_f(dset_id, plist_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dset_id INTEGER(HID_T), INTENT(OUT) :: plist_id INTEGER , INTENT(OUT) :: hdferr - !***** INTERFACE INTEGER FUNCTION h5dget_access_plist_c(dset_id, plist_id) BIND(C,NAME='h5dget_access_plist_c') IMPORT :: HID_T @@ -1188,19 +1031,191 @@ CONTAINS END SUBROUTINE h5dget_access_plist_f +!> +!! \ingroup FH5D +!! +!! \brief Reclaims VL datatype memory buffers. +!! +!! \param type_id Identifier of the datatype. +!! \param space_id Identifier of the dataspace. +!! \param plist_id Identifier of the property list used to create the buffer. +!! \param buf Pointer to the buffer to be reclaimed. +!! \param hdferr \fortran_error +!! + SUBROUTINE h5dvlen_reclaim_f(type_id, space_id, plist_id, buf, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(IN) :: plist_id + TYPE(C_PTR) , INTENT(INOUT) :: buf + INTEGER , INTENT(OUT) :: hdferr + + INTERFACE + INTEGER FUNCTION h5dvlen_reclaim_c(type_id, space_id, plist_id, buf) BIND(C, NAME='h5dvlen_reclaim_c') + IMPORT :: C_PTR + IMPORT :: HID_T + IMPLICIT NONE + INTEGER(HID_T) :: type_id + INTEGER(HID_T) :: space_id + INTEGER(HID_T) :: plist_id + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5dvlen_reclaim_c + END INTERFACE + + hdferr = H5Dvlen_reclaim_c(type_id, space_id, plist_id, buf) + + END SUBROUTINE H5Dvlen_reclaim_f + +#ifdef H5_DOXYGEN_FORTRAN +!> +!! \ingroup FH5D +!! +!! \brief Writes raw data from a dataset into a buffer. +!! +!! \note \fortran_approved +!! +!! \param dset_id Identifier of the dataset to write to. +!! \param mem_type_id Identifier of the memory datatype. +!! \param buf Buffer with data to be written to the file. +!! \param hdferr \fortran_error +!! \param mem_space_id Identifier of the memory dataspace. +!! \param file_space_id Identifier of the dataset's dataspace in the file. +!! \param xfer_prp Identifier of a transfer property list for this I/O operation. +!! + SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, hdferr, mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + TYPE(C_PTR), INTENT(IN) :: buf + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + END SUBROUTINE h5dwrite +!> +!! \ingroup FH5D +!! +!! \brief Reads raw data from a dataset into a buffer (Passes Pointer). +!! +!! \note \fortran_approved +!! +!! \param dset_id Identifier of the dataset read from. +!! \param mem_type_id Identifier of the memory datatype. +!! \param buf Buffer to receive data read from file. +!! \param hdferr \fortran_error +!! \param mem_space_id Identifier of the memory dataspace. +!! \param file_space_id Identifier of dataset's dataspace in the file. (Default: H5S_ALL_F) +!! \param xfer_prp Identifier of a transfer property list for this I/O operation. +!! + SUBROUTINE h5dread_f(dset_id, mem_type_id, buf, hdferr, mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + TYPE(C_PTR), INTENT(INOUT) :: buf + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + END SUBROUTINE h5dread_f + +!> +!! \ingroup FH5D +!! +!! \brief There is no direct Fortran90 counterpart for the C function H5Dwrite. Instead, that +!! functionality is provided by two Fortran90 subroutines: +!! \li h5dwrite_f Purpose: Writes data other than variable-length data. +!! \li h5dwrite_vl_f Purpose: Writes variable-length data. +!! +!! \note \fortran_obsolete +!! +!! \param dset_id Identifier of the dataset to write to. +!! \param mem_type_id Identifier of the memory datatype. +!! \param buf Data buffer; may be a scalar or an array. +!! \param dims Array to hold corresponding dimension sizes of data buffer buf; dim(k) has value. +!! of the k-th dimension of buffer buf; values are ignored if buf is a scalar. +!! \param hdferr \fortran_error +!! \param mem_space_id Identifier of the memory dataspace. Default value is H5S_ALL_F. +!! \param file_space_id Identifier of the dataset's dataspace in the file. Default value is H5S_ALL_F. +!! \param xfer_prp Identifier of a transfer property list for this I/O operation. Default value is H5P_DEFAULT_F. +!! + SUBROUTINE h5dwrite_f___F90_VERSION(dset_id, mem_type_id, buf, dims, hdferr, mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + TYPE(TYPE), INTENT(IN) :: buf + DIMENSION(*), INTEGER(HSIZE_T), INTENT(IN) :: dims + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + END SUBROUTINE h5dwrite_f___F90_VERSION + +!> +!! \ingroup FH5D +!! +!! \brief There is no direct Fortran90 counterpart for the C function H5Dread. Instead, that functionality +!! is provided by two Fortran90 subroutines: +!! \li h5dread_f Purpose: Reads data other than variable-length data, uses DIMENSION argument and buf is not a pointer. +!! \li h5dread_vl_f Purpose: Reads variable-length data. +!! +!! \note \fortran_obsolete +!! +!! \param dset_id Identifier of the dataset read from. +!! \param mem_type_id Identifier of the memory datatype. +!! \param buf Buffer to receive data read from file, may be a scalar or an array. +!! \param dims Array to hold corresponding dimension sizes of data buffer buf. dim(k) has value of the k-th. +!! dimension of buffer buf. Values are ignored if buf is a scalar. +!! \param hdferr \fortran_error +!! \param mem_space_id Identifier of the memory dataspace. (Default: H5S_ALL_F) +!! \param file_space_id Identifier of dataset's dataspace in the file. (Default: H5S_ALL_F) +!! \param xfer_prp Identifier of a transfer property list for this I/O operation. (Default: H5P_DEFAULT_F) +!! + SUBROUTINE h5dread_f___F90_VERSION(dset_id, mem_type_id, buf, dims, hdferr, mem_space_id, file_space_id, xfer_prp) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + TYPE(TYPE), INTENT(INOUT) :: buf + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + END SUBROUTINE h5dread_f___F90_VERSION + +!> +!! \ingroup FH5D +!! +!! \brief Fills dataspace elements with a fill value in a memory buffer. +!! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes of the fillvalues and buffers are supported. +!! Buffer and fillvalue are assumed to have the same datatype. Only one-dimesional buffers are supported. +!! +!! \param fill_value Fill value. +!! \param space_id Identifier of the memory datatype. +!! \param buf Buffer to receive data read from file. +!! \param hdferr \fortran_error +!! + SUBROUTINE h5dfill_f(fill_value, space_id, buf, hdferr) + TYPE(TYPE), INTENT(IN) :: fill_value + INTEGER(HID_T), INTENT(IN) :: space_id + TYPE(TYPE), INTENT(OUT), DIMENSION(*) :: buf + INTEGER, INTENT(OUT) :: hdferr + END SUBROUTINE h5dfill_f + +#else SUBROUTINE h5dwrite_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the buffer buf - TYPE(hobj_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims + TYPE(hobj_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default @@ -1225,14 +1240,14 @@ CONTAINS mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims ! size of the buffer buf - TYPE(hdset_reg_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims + TYPE(hdset_reg_ref_t_f), DIMENSION(dims(1)), INTENT(IN), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default @@ -1287,14 +1302,14 @@ CONTAINS mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(*), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + CHARACTER(*), INTENT(IN), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp CALL h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), dims, hdferr, & mem_space_id, file_space_id, xfer_prp) @@ -1305,15 +1320,15 @@ CONTAINS mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default @@ -1338,15 +1353,15 @@ CONTAINS mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims TYPE(hobj_ref_t_f), INTENT(INOUT) , & DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default @@ -1370,15 +1385,15 @@ CONTAINS SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & mem_space_id, file_space_id, xfer_prp) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims TYPE(hdset_reg_ref_t_f), INTENT(INOUT), & DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default INTEGER(HID_T) :: file_space_id_default @@ -1433,14 +1448,15 @@ CONTAINS mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + CHARACTER(LEN=*), INTENT(INOUT) :: buf + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default @@ -1463,14 +1479,14 @@ CONTAINS mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp TYPE(C_PTR) :: f_ptr @@ -1481,53 +1497,17 @@ CONTAINS END SUBROUTINE h5dread_char_scalar_fix -!****s* H5D (F03)/h5dwrite_f_F03 -! -! NAME -! h5dwrite_f_F03 -! -! PURPOSE -! Writes raw data from a dataset into a buffer. -! -! Inputs: -! dset_id - Identifier of the dataset to write to. -! mem_type_id - Identifier of the memory datatype. -! buf - Buffer with data to be written to the file. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! mem_space_id - Identifier of the memory dataspace. -! file_space_id - Identifier of the dataset's dataspace in the file. -! xfer_prp - Identifier of a transfer property list for this I/O operation. -! -! AUTHOR -! M. Scot Breitenfeld -! September 17, 2011 -! -! Fortran2003 Interface: -!! SUBROUTINE h5dwrite_f(dset_id, mem_type_id, buf, hdferr, & -!! mem_space_id, file_space_id, xfer_prp) -!! INTEGER(HID_T), INTENT(IN) :: dset_id -!! INTEGER(HID_T), INTENT(IN) :: mem_type_id -!! TYPE(C_PTR) , INTENT(IN) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp -!***** SUBROUTINE h5dwrite_ptr(dset_id, mem_type_id, buf, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id TYPE(C_PTR), INTENT(IN) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default @@ -1546,53 +1526,17 @@ CONTAINS END SUBROUTINE h5dwrite_ptr -!****s* H5D (F03)/h5dread_f_F03 -! -! NAME -! h5dread_f_F03 -! -! PURPOSE -! Reads raw data from a dataset into a buffer. -! -! Inputs: -! dset_id - Identifier of the dataset read from. -! mem_type_id - Identifier of the memory datatype. -! -! Outputs: -! buf - Buffer to receive data read from file. -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! mem_space_id - Identifier of the memory dataspace. -! file_space_id - Identifier of the dataset's dataspace in the file. -! xfer_prp - Identifier of a transfer property list for this I/O operation. -! -! AUTHOR -! M. Scot Breitenfeld -! September 17, 2011 -! -! Fortran2003 Interface: -!! SUBROUTINE h5dread_f(dset_id, mem_type_id, buf, hdferr, & -!! mem_space_id, file_space_id, xfer_prp) -!! INTEGER(HID_T), INTENT(IN) :: dset_id -!! INTEGER(HID_T), INTENT(IN) :: mem_type_id -!! TYPE(C_PTR) , INTENT(INOUT) :: buf -!! INTEGER , INTENT(OUT) :: hdferr -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: mem_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: file_space_id -!! INTEGER(HID_T), INTENT(IN) , OPTIONAL :: xfer_prp -!***** SUBROUTINE h5dread_ptr(dset_id, mem_type_id, buf, hdferr, & mem_space_id, file_space_id, xfer_prp) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id TYPE(C_PTR), INTENT(INOUT) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp INTEGER(HID_T) :: xfer_prp_default INTEGER(HID_T) :: mem_space_id_default @@ -1611,31 +1555,6 @@ CONTAINS END SUBROUTINE h5dread_ptr -! -! NAME -! h5dfill_integer -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! Inputs: -! fill_value - fill value -! space_id - memory space selection identifier -! buf - memory buffer containing the selection to be filled -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! - SUBROUTINE h5dfill_integer(fill_value, space_id, buf, hdferr) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE @@ -1661,37 +1580,13 @@ CONTAINS END SUBROUTINE h5dfill_integer -! -! NAME -! h5dfill_c_float -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! Inputs: -! fill_value - fill value -! space_id - memory space selection identifier -! buf - memory buffer containing the selection to be filled -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! SUBROUTINE h5dfill_c_float(fill_valuer, space_id, buf, hdferr) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE - REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: fill_valuer ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - REAL(KIND=C_FLOAT), INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code + REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: fill_valuer + INTEGER(HID_T), INTENT(IN) :: space_id + REAL(KIND=C_FLOAT), INTENT(OUT), DIMENSION(*), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier @@ -1710,35 +1605,12 @@ CONTAINS END SUBROUTINE h5dfill_c_float - !---------------------------------------------------------------------- - ! Name: h5dfill_c_double - ! - ! Purpose: Fills dataspace elements with a fill value in a memory buffer. - ! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes - ! of the fillvalues and buffers are supported. Buffer and fillvalue - ! are assumed to have the same datatype. - ! Only one-dimesional buffers are supported. - ! - ! Inputs: - ! fill_value - fill value - ! space_id - memory space selection identifier - ! buf - memory buffer containing the selection to be filled - ! Outputs: - ! hdferr: - error code - ! Success: 0 - ! Failure: -1 - ! - ! Programmer: Elena Pourmal - ! March 12, 2003 - ! - !---------------------------------------------------------------------- - SUBROUTINE h5dfill_c_double(fill_value, space_id, buf, hdferr) IMPLICIT NONE - REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - REAL(KIND=C_DOUBLE), INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code + REAL(KIND=C_DOUBLE), INTENT(IN), TARGET :: fill_value + INTEGER(HID_T), INTENT(IN) :: space_id + REAL(KIND=C_DOUBLE), INTENT(OUT), DIMENSION(*), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier @@ -1760,10 +1632,10 @@ CONTAINS #if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 SUBROUTINE h5dfill_c_long_double(fill_value, space_id, buf, hdferr) IMPLICIT NONE - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - REAL(KIND=C_LONG_DOUBLE), INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code + REAL(KIND=C_LONG_DOUBLE), INTENT(IN), TARGET :: fill_value + INTEGER(HID_T), INTENT(IN) :: space_id + REAL(KIND=C_LONG_DOUBLE), INTENT(OUT), DIMENSION(*), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier @@ -1782,36 +1654,14 @@ CONTAINS END SUBROUTINE h5dfill_c_long_double #endif -! -! NAME -! h5dfill_char -! -! PURPOSE -! Fills dataspace elements with a fill value in a memory buffer. -! Only INTEGER, CHARACTER, REAL and DOUBLE PRECISION datatypes -! of the fillvalues and buffers are supported. Buffer and fillvalue -! are assumed to have the same datatype. -! Only one-dimesional buffers are supported. -! -! Inputs: -! fill_value - fill value -! space_id - memory space selection identifier -! buf - memory buffer containing the selection to be filled -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! + SUBROUTINE h5dfill_char(fill_value, space_id, buf, hdferr) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE - CHARACTER, INTENT(IN), TARGET :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - CHARACTER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code + CHARACTER, INTENT(IN), TARGET :: fill_value + INTEGER(HID_T), INTENT(IN) :: space_id + CHARACTER, INTENT(OUT), DIMENSION(*), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier @@ -1826,54 +1676,8 @@ CONTAINS f_ptr_buf, mem_type_id) END SUBROUTINE h5dfill_char -! -!****s* H5D (F03)/h5dvlen_reclaim_f -! NAME -! h5dvlen_reclaim_f -! -! PURPOSE -! Reclaims VL datatype memory buffers. -! -! Inputs: -! -! type_id - Identifier of the datatype. -! space_id - Identifier of the dataspace. -! plist_id - Identifier of the property list used to create the buffer. -! buf - Pointer to the buffer to be reclaimed. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! January 11, 2011 -! -! Fortran2003 Interface: - SUBROUTINE h5dvlen_reclaim_f(type_id, space_id, plist_id, buf, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T), INTENT(IN) :: plist_id - TYPE(C_PTR) , INTENT(INOUT) :: buf - INTEGER , INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5dvlen_reclaim_c(type_id, space_id, plist_id, buf) BIND(C, NAME='h5dvlen_reclaim_c') - IMPORT :: C_PTR - IMPORT :: HID_T - IMPLICIT NONE - INTEGER(HID_T) :: type_id - INTEGER(HID_T) :: space_id - INTEGER(HID_T) :: plist_id - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5dvlen_reclaim_c - END INTERFACE - - hdferr = H5Dvlen_reclaim_c(type_id, space_id, plist_id, buf) - - END SUBROUTINE H5Dvlen_reclaim_f +#endif END MODULE H5D diff --git a/fortran/src/H5Eff.F90 b/fortran/src/H5Eff.F90 index d0e7c41..0d7a873 100644 --- a/fortran/src/H5Eff.F90 +++ b/fortran/src/H5Eff.F90 @@ -1,13 +1,13 @@ -!****h* ROBODoc/H5E -! -! NAME -! MODULE H5E -! -! FILE -! fortran/src/H5Eff.F90 -! -! PURPOSE -! This Module contains Fortran interfaces for H5E functions. +!> @defgroup FH5E Fortran Error (H5E) Interface +!! +!! @see H5E, C-API +!! +!! @see @ref H5E_UG, User Guide +!! + +!> @ingroup FH5E +!! +!! @brief This module contains Fortran interfaces for H5E functions. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -35,52 +35,29 @@ ! to the Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. ! This is needed for Windows based operating systems. ! -!***** MODULE H5E USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR USE H5GLOBAL - !Turn on automatic printing of errors - INTEGER, PARAMETER :: PRINTON = 1 - - !Turn off automatic printing of errors - INTEGER, PARAMETER :: PRINTOFF = 0 + INTEGER, PARAMETER :: PRINTON = 1 !< Turn on automatic printing of errors + INTEGER, PARAMETER :: PRINTOFF = 0 !< Turn off automatic printing of errors CONTAINS -!****s* H5E/h5eclear_f -! -! NAME -! h5eclear_f -! -! PURPOSE -! Clears the error stack for the current thread. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! estack_id - Error Stack id -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! Added optional error stack identifier in order to bring -! the function in line with the h5eclear2 routine. -! MSB, July 9, 2009 -! -! SOURCE +!> +!! \ingroup FH5E +!! +!! \brief Clears the error stack for the current thread. +!! +!! \param hdferr \fortran_error +!! \param estack_id Error Stack id +!! SUBROUTINE h5eclear_f(hdferr, estack_id) IMPLICIT NONE - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER, INTENT(OUT) :: hdferr INTEGER(HID_T), OPTIONAL, INTENT(IN) :: estack_id -!***** INTEGER(HID_T) :: estack_id_default INTERFACE @@ -97,33 +74,17 @@ CONTAINS hdferr = h5eclear_c(estack_id_default) END SUBROUTINE h5eclear_f -!****s* H5E/h5eprint_f -! -! NAME -! h5eprint_f -! -! PURPOSE -! Prints the error stack in a default manner. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! name - name of the file that contains print output -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5E +!! +!! \brief Prints the error stack in a default manner. +!! +!! \param hdferr \fortran_error +!! \param name Name of the file that contains print output +!! SUBROUTINE h5eprint_f(hdferr, name) CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER :: namelen INTERFACE @@ -147,41 +108,21 @@ CONTAINS hdferr = h5eprint_c2() ENDIF END SUBROUTINE h5eprint_f -!****s* H5E/h5eget_major_f -! -! NAME -! h5eget_major_f -! -! PURPOSE -! Returns a character string describing an error specified -! by a major error number. -! -! INPUTS -! error_no - major error number -! -! OUTPUTS -! name - character string describing the error -! namelen - number of characters in the name buffer -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5E +!! +!! \brief Returns a character string describing an error specified by a major error number. +!! +!! \param error_no Major error number. +!! \param name Character string describing the error. +!! \param namelen Number of characters in the name buffer. +!! \param hdferr \fortran_error +!! SUBROUTINE h5eget_major_f(error_no, name, namelen, hdferr) - INTEGER, INTENT(IN) :: error_no ! Major error number - CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing - ! the error. - INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters - ! in name. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER, INTENT(IN) :: error_no + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER(SIZE_T), INTENT(IN) :: namelen + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5eget_major_c(error_no, name, namelen) BIND(C,NAME='h5eget_major_c') IMPORT :: C_CHAR @@ -195,38 +136,19 @@ CONTAINS hdferr = h5eget_major_c(error_no, name, namelen) END SUBROUTINE h5eget_major_f -!****s* H5E/h5eget_minor_f -! -! NAME -! h5eget_minor_f -! -! PURPOSE -! Returns a character string describing an error specified -! by a minor error number. -! -! INPUTS -! error_no - minor error number -! -! OUTPUTS -! name - character string describing the error -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). April 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5E +!! +!! \brief Returns a character string describing an error specified by a minor error number. +!! +!! \param error_no Minor error number. +!! \param name Character string describing the error. +!! \param hdferr \fortran_error +!! SUBROUTINE h5eget_minor_f(error_no, name, hdferr) - INTEGER, INTENT(IN) :: error_no ! Major error number - CHARACTER(LEN=*), INTENT(OUT) :: name ! Character string describing - ! the error - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER, INTENT(IN) :: error_no + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5eget_minor_c(error_no, name) BIND(C,NAME='h5eget_minor_c') IMPORT :: C_CHAR @@ -238,31 +160,19 @@ CONTAINS hdferr = h5eget_minor_c(error_no, name) END SUBROUTINE h5eget_minor_f -!****s* H5E/h5eset_auto_f -! -! NAME -! h5eset_auto_f -! -! PURPOSE -! Returns settings for automatic error stack traversal function and its data. -! -! Inputs: -! printflag - Flag to turn automatic error printing on or off; -! possible values are: -! printon (1) -! printoff(0) -! estack_id - Error stack identifier. -! func - Function to be called upon an error condition. -! client_data - Data passed to the error function -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! July 10, 2009 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5E +!! +!! \brief Returns settings for automatic error stack traversal function and its data. +!! +!! \param printflag Flag to turn automatic error printing on or off; possible values are: +!! \li printon (1) +!! \li printoff(0) +!! \param estack_id Error stack identifier. +!! \param func Function to be called upon an error condition. +!! \param client_data Data passed to the error function. +!! \param hdferr \fortran_error +!! SUBROUTINE h5eset_auto_f(printflag, hdferr, estack_id, func, client_data) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR INTEGER , INTENT(IN) :: printflag @@ -270,7 +180,6 @@ CONTAINS INTEGER(HID_T), INTENT(IN) , OPTIONAL :: estack_id TYPE(C_FUNPTR), INTENT(IN) , OPTIONAL :: func TYPE(C_PTR) , INTENT(IN) , OPTIONAL :: client_data -!***** INTEGER(HID_T) :: estack_id_default TYPE(C_FUNPTR) :: func_default TYPE(C_PTR) :: client_data_default diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90 index ecb40b7..c58cb9e 100644 --- a/fortran/src/H5Fff.F90 +++ b/fortran/src/H5Fff.F90 @@ -1,13 +1,9 @@ -!****h* ROBODoc/H5F -! -! NAME -! MODULE H5F -! -! FILE -! H5Fff.F90 -! -! PURPOSE -! This file contains Fortran interfaces for H5F functions. +!> @defgroup FH5F Fortran File (H5F) Interface +!! +!! @see H5F, C-API +!! +!! @see @ref H5F_UG, User Guide +!! ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -35,7 +31,6 @@ ! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. ! This is needed for Windows based operating systems. ! -!***** MODULE H5F USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_NULL_PTR @@ -45,6 +40,7 @@ MODULE H5F ! Number of objects opened in H5open_f INTEGER(SIZE_T) :: H5OPEN_NUM_OBJ +#ifndef H5_DOXYGEN_FORTRAN INTERFACE INTEGER(C_INT) FUNCTION h5fis_accessible(name, & access_prp_default) BIND(C,NAME='H5Fis_accessible') @@ -56,53 +52,32 @@ MODULE H5F INTEGER(HID_T), INTENT(IN), VALUE :: access_prp_default END FUNCTION h5fis_accessible END INTERFACE +#endif CONTAINS -!****s* H5F/h5fcreate_f -! -! NAME -! h5fcreate_f -! -! PURPOSE -! Creates HDF5 files. -! -! INPUTS -! name - name of the file to create -! access_flags - File access flags. Allowable values are: -! H5F_ACC_TRUNC_F -! H5F_ACC_EXCL_F -! OUTPUTS -! file_id - file identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! creation_prp - file creation property list identifier -! access_prp - file access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE +!> +!! \ingroup FH5F +!! +!! \brief Creates HDF5 files. +!! +!! \param name Name of the file to create. +!! \param access_flags File access flags. Allowable values are: +!! \li H5F_ACC_TRUNC_F +!! \li H5F_ACC_EXCL_F +!! \param file_id File identifier. +!! \param hdferr \fortran_error +!! \param creation_prp File creation property list identifier. +!! \param access_prp File access property list identifier. +!! SUBROUTINE h5fcreate_f(name, access_flags, file_id, hdferr, & creation_prp, access_prp) IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file - INTEGER, INTENT(IN) :: access_flags ! File access flags - INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: access_flags + INTEGER(HID_T), INTENT(OUT) :: file_id + INTEGER, INTENT(OUT) :: hdferr INTEGER(HID_T), OPTIONAL, INTENT(IN) :: creation_prp - ! File creation property - ! list identifier INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp - ! File access property list - ! identifier -!***** INTEGER(HID_T) :: creation_prp_default INTEGER(HID_T) :: access_prp_default INTEGER :: namelen ! Length of the name character string @@ -131,57 +106,23 @@ CONTAINS creation_prp_default, access_prp_default, file_id) END SUBROUTINE h5fcreate_f -!****s* H5F/h5fflush_f -! -! NAME -! h5fflush_f -! -! PURPOSE -! Flushes all buffers associated WITH a file to disk -! -! INPUTS -! object_id - identifier of object used to identify the file. -! scope - specifies the scope of the flushing action. -! Possible values are: -! H5F_SCOPE_GLOBAL_F -! H5F_SCOPE_LOCAL_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! creation_prp - file creation property list identifier -! access_prp - file access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE +!> +!! \ingroup FH5F +!! +!! \brief Flushes all buffers associated with a file to disk +!! +!! \param object_id Identifier of object used to identify the file. +!! \param scope Specifies the scope of the flushing action. Possible values are: +!! \li H5F_SCOPE_GLOBAL_F +!! \li H5F_SCOPE_LOCAL_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5fflush_f(object_id, scope, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id !identifier for any object - !associate with a file, - !including the file itself, - !a dataset, a group, an - !attribute, or a named - !data type - - INTEGER, INTENT(IN) :: scope !scope of the flushing - !action, possible values - !are: H5F_SCOPE_GLOBAL_F - ! which flushes the entire - !virtual file, - !and H5F_SCOPE_LOCAL_F - !which flushes only the - !specified file. - - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER, INTENT(IN) :: scope + INTEGER, INTENT(OUT) :: hdferr + INTERFACE INTEGER FUNCTION h5fflush_c(object_id, scope) BIND(C,NAME='h5fflush_c') IMPORT :: HID_T @@ -194,47 +135,24 @@ CONTAINS hdferr = h5fflush_c(object_id, scope) END SUBROUTINE h5fflush_f -!****s* H5F/h5fmount_f -! -! NAME -! h5fmount_f -! -! PURPOSE -! Mounts a file. -! -! INPUTS -! loc_id - the identifier for of file or group in -! which name is defined -! name - the name of the group onto which the file -! specified by child_id is to be mounted. -! child_id - the identifier of the file to be mounted. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! access_prp - the identifier of the property list to be used -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE +!> +!! \ingroup FH5F +!! +!! \brief Mounts a file. +!! +!! \param loc_id The identifier for of file or group in which name is defined. +!! \param name The name of the group onto which the file specified by child_id is to be mounted. +!! \param child_id The identifier of the file to be mounted. +!! \param hdferr \fortran_error +!! \param access_prp The identifier of the property list to be used. +!! SUBROUTINE h5fmount_f(loc_id, name, child_id, hdferr, access_prp) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group - ! in which dsetname is defined - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER(HID_T), INTENT(IN) :: child_id ! File identifier for the - ! file to be mounted - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(IN) :: child_id + INTEGER, INTENT(OUT) :: hdferr INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp - ! File access property list - ! identifier -!***** INTEGER(HID_T) :: access_prp_default INTEGER :: namelen ! Length of the name character string @@ -259,38 +177,20 @@ CONTAINS END SUBROUTINE h5fmount_f -!****s* H5F/h5funmount_f -! -! NAME -! h5funmount_f -! -! PURPOSE -! Unmounts a file. -! -! INPUTS -! loc_id - the identifier for of file or group in -! which name is defined -! name - the name of the mount point -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE +!> +!! \ingroup FH5F +!! +!! \brief Unmounts a file. +!! +!! \param loc_id The identifier for of file or group in which name is defined. +!! \param name The name of the mount point. +!! \param hdferr \fortran_error +!! SUBROUTINE h5funmount_f(loc_id, name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for file or group - ! at which the specified file - ! is to be unmounted - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the mount point - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(OUT) :: hdferr INTEGER :: namelen ! Length of the name character string INTERFACE @@ -308,45 +208,26 @@ CONTAINS hdferr = h5funmount_c(loc_id, name, namelen) END SUBROUTINE h5funmount_f -!****s* H5F/h5fopen_f -! -! NAME -! h5fopen_f -! -! PURPOSE -! Opens HDF5 file. -! -! INPUTS -! name - name of the file to acecss -! access_flags - File access flags. Allowable values are: -! H5F_ACC_RDWR_F -! H5F_ACC_RDONLY_F -! OUTPUTS -! file_id - file identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! access_prp - file access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE +!> +!! \ingroup FH5F +!! +!! \brief Opens HDF5 file. +!! +!! \param name Name of the file to acecss. +!! \param access_flags File access flags. Allowable values are: +!! \li H5F_ACC_RDWR_F +!! \li H5F_ACC_RDONLY_F +!! \param file_id File identifier. +!! \param hdferr \fortran_error +!! \param access_prp File access property list identifier. +!! SUBROUTINE h5fopen_f(name, access_flags, file_id, hdferr, access_prp) IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file - INTEGER, INTENT(IN) :: access_flags ! File access flags - INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: access_flags + INTEGER(HID_T), INTENT(OUT) :: file_id + INTEGER, INTENT(OUT) :: hdferr INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp - ! File access property list - ! identifier -!***** INTEGER(HID_T) :: access_prp_default INTEGER :: namelen ! Length of the name character string @@ -370,36 +251,20 @@ CONTAINS hdferr = h5fopen_c(name, namelen, access_flags, & access_prp_default, file_id) END SUBROUTINE h5fopen_f -!****s* H5F/h5freopen_f -! -! NAME -! h5freopen_f -! -! PURPOSE -! Reopens HDF5 file. -! -! INPUTS -! file_id - identifier of a file for which an -! additional identifier is required -! OUTPUTS -! ret_file_id - new file identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE +!> +!! \ingroup FH5F +!! +!! \brief Reopens HDF5 file. +!! +!! \param file_id Identifier of a file for which an additional identifier is required. +!! \param ret_file_id New file identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5freopen_f(file_id, ret_file_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HID_T), INTENT(OUT) :: ret_file_id ! New File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HID_T), INTENT(OUT) :: ret_file_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5freopen_c(file_id, ret_file_id) BIND(C,NAME='h5freopen_c') IMPORT :: HID_T @@ -412,37 +277,20 @@ CONTAINS hdferr = h5freopen_c(file_id, ret_file_id) END SUBROUTINE h5freopen_f -!****s* H5F/h5fget_create_plist_f -! -! NAME -! h5fget_create_plist_f -! -! PURPOSE -! Returns a file creation property list identifier. -! -! INPUTS -! file_id - identifier of a file to creation property list of -! OUTPUTS -! prop_id - creation property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE +!> +!! \ingroup FH5F +!! +!! \brief Returns a file creation property list identifier. +!! +!! \param file_id Identifier of a file to creation property list of. +!! \param prop_id Creation property list identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5fget_create_plist_f(file_id, prop_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HID_T), INTENT(OUT) :: prop_id ! File creation property - ! list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HID_T), INTENT(OUT) :: prop_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5fget_create_plist_c(file_id, prop_id) BIND(C,NAME='h5fget_create_plist_c') IMPORT :: HID_T @@ -455,36 +303,20 @@ CONTAINS hdferr = h5fget_create_plist_c(file_id, prop_id) END SUBROUTINE h5fget_create_plist_f -!****s* H5F/h5fget_access_plist_f -! -! NAME -! h5fget_access_plist_f -! -! PURPOSE -! Returns a file access property list identifier. -! -! INPUTS -! file_id - identifier of a file to creation property list of -! OUTPUTS -! access_id - access property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE +!> +!! \ingroup FH5F +!! +!! \brief Returns a file access property list identifier. +!! +!! \param file_id Identifier of a file to creation property list of. +!! \param access_id Access property list identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5fget_access_plist_f(file_id, access_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HID_T), INTENT(OUT) :: access_id ! File access property - ! list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HID_T), INTENT(OUT) :: access_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5fget_access_plist_c(file_id, access_id) BIND(C,NAME='h5fget_access_plist_c') IMPORT :: HID_T @@ -498,41 +330,23 @@ CONTAINS END SUBROUTINE h5fget_access_plist_f -!****s* H5F/h5fis_accessible_f -! -! NAME -! h5fis_accessible_f -! -! PURPOSE -! Determines whether a file can be accessed as HDF5. -! -! INPUTS -! name - name of the file to check -! OUTPUTS -! status - indicates if file is and HDF5 file -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! access_prp - file access property list identifier -! AUTHOR -! Dana Robinson -! September 2018 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE +!> +!! \ingroup FH5F +!! +!! \brief Determines whether a file can be accessed as HDF5. +!! +!! \param name Name of the file to check. +!! \param status Indicates if file is and HDF5 file. +!! \param hdferr \fortran_error +!! \param access_prp File access property list identifier. +!! SUBROUTINE h5fis_accessible_f(name, status, hdferr, access_prp) IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file - LOGICAL, INTENT(OUT) :: status ! Indicates if file - ! is an HDF5 file - INTEGER, INTENT(OUT) :: hdferr ! Error code + CHARACTER(LEN=*), INTENT(IN) :: name + LOGICAL, INTENT(OUT) :: status + INTEGER, INTENT(OUT) :: hdferr INTEGER(HID_T), OPTIONAL, INTENT(IN) :: access_prp - ! File access property list - ! identifier -!***** + INTEGER(HID_T) :: access_prp_default CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name INTEGER(C_INT) :: flag ! "TRUE/FALSE/ERROR" flag from C routine @@ -555,42 +369,20 @@ CONTAINS ! XXX (VOL_MERGE): This function should probably be marked as ! deprecated since H5Fis_hdf5() is deprecated. -!****s* H5F/h5fis_hdf5_f -! -! NAME -! h5fis_hdf5_f -! -! PURPOSE -! Determines whether a file is in the HDF5 format. -! -! INPUTS -! name - name of the file to check -! OUTPUTS -! status - indicates if file is and HDF5 file -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! NOTES -! The underlying HDF5 C API call (H5Fis_hdf5) has been deprecated -! in favor of the VOL-capable H5Fis_accessible(). New code should -! use h5fis_accessible_f() instead of this function in case this -! function is deprecated in the future. -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE +!> +!! \ingroup FH5F +!! +!! \brief Determines whether a file is in the HDF5 format. +!! +!! \param name Name of the file to check. +!! \param status Indicates if file is and HDF5 file. +!! \param hdferr \fortran_error +!! SUBROUTINE h5fis_hdf5_f(name, status, hdferr) IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the file - LOGICAL, INTENT(OUT) :: status ! Indicates if file - ! is an HDF5 file - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + CHARACTER(LEN=*), INTENT(IN) :: name + LOGICAL, INTENT(OUT) :: status + INTEGER, INTENT(OUT) :: hdferr CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name INTEGER(C_INT) :: flag ! "TRUE/FALSE/ERROR" flag from C routine ! to define status value. @@ -607,33 +399,18 @@ CONTAINS END SUBROUTINE h5fis_hdf5_f -!****s* H5F/h5fclose_f -! -! NAME -! h5fclose_f -! -! PURPOSE -! Closes HDF5 file. -! -! INPUTS -! file_id - file identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE +!> +!! \ingroup FH5F +!! +!! \brief Closes HDF5 file. +!! +!! \param file_id File identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5fclose_f(file_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5fclose_c(file_id) BIND(C,NAME='h5fclose_c') IMPORT :: HID_T @@ -646,41 +423,27 @@ CONTAINS END SUBROUTINE h5fclose_f -!****s* H5F/h5fget_obj_count_f -! -! NAME -! h5fget_obj_count_f -! -! PURPOSE -! Gets number of the objects open within a file -! -! INPUTS -! file_id - file identifier -! obj_type - type of the object; possible values are: -! H5F_OBJ_FILE_F -! H5F_OBJ_DATASET_F -! H5F_OBJ_GROUP_F -! H5F_OBJ_DATATYPE_F -! H5F_OBJ_ALL_F -! OUTPUTS -! obj_count - number of open objects -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! September 30, 2002 -! -! HISTORY -! Changed the type of obj_count to INTEGER(SIZE_T) -! September 25, 2008 EIP -! -! SOURCE +!> +!! \ingroup FH5F +!! +!! \brief Gets number of the objects open within a file +!! +!! \param file_id File identifier. +!! \param obj_type Type of the object; possible values are: +!! \li H5F_OBJ_FILE_F +!! \li H5F_OBJ_DATASET_F +!! \li H5F_OBJ_GROUP_F +!! \li H5F_OBJ_DATATYPE_F +!! \li H5F_OBJ_ALL_F +!! \param obj_count Number of open objects. +!! \param hdferr \fortran_error +!! SUBROUTINE h5fget_obj_count_f(file_id, obj_type, obj_count, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: file_id INTEGER, INTENT(IN) :: obj_type INTEGER(SIZE_T), INTENT(OUT) :: obj_count INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5fget_obj_count_c(file_id, obj_type, obj_count) BIND(C,NAME='h5fget_obj_count_c') IMPORT :: HID_T, SIZE_T @@ -700,50 +463,32 @@ CONTAINS END SUBROUTINE h5fget_obj_count_f -!****s* H5F/h5fget_obj_ids_f -! -! NAME -! h5fget_obj_ids_f -! -! PURPOSE -! Get list of open objects identifiers within a file -! -! INPUTS -! file_id - file identifier -! obj_type - type of the object; possible values are: -! H5F_OBJ_FILE_F -! H5F_OBJ_DATASET_F -! H5F_OBJ_GROUP_F -! H5F_OBJ_DATATYPE_F -! H5F_OBJ_ALL_F -! OUTPUTS -! obj_ids - array of open object identifiers -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! num_objs - number of open objects -! -! AUTHOR -! Elena Pourmal -! September 30, 2002 -! -! HISTORY -! Added optional parameter num_objs for number of open objects -! of the specified type and changed type of max_obj to -! INTEGER(SIZE_T) -! September 25, 2008 EIP -! -! SOURCE +!> +!! \ingroup FH5F +!! +!! \brief Get list of open objects identifiers within a file +!! +!! \param file_id File identifier. +!! \param obj_type Type of the object; possible values are: +!! \li H5F_OBJ_FILE_F +!! \li H5F_OBJ_DATASET_F +!! \li H5F_OBJ_GROUP_F +!! \li H5F_OBJ_DATATYPE_F +!! \li H5F_OBJ_ALL_F +!! \param max_objs Maximum # of objects to retrieve. +!! \param obj_ids Array of open object identifiers. +!! \param hdferr \fortran_error +!! \param num_objs Number of open objects. +!! SUBROUTINE h5fget_obj_ids_f(file_id, obj_type, max_objs, obj_ids, hdferr, num_objs) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER, INTENT(IN) :: obj_type ! Object type - INTEGER(SIZE_T), INTENT(IN) :: max_objs ! Maximum # of objects to retrieve + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER, INTENT(IN) :: obj_type + INTEGER(SIZE_T), INTENT(IN) :: max_objs INTEGER(HID_T), DIMENSION(*), INTENT(INOUT) :: obj_ids - ! Array of open objects iidentifiers - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: num_objs ! number of open objects -!***** + INTEGER, INTENT(OUT) :: hdferr + INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: num_objs + INTEGER(SIZE_T) :: c_num_objs ! Number of open objects of the specified type INTERFACE @@ -763,32 +508,20 @@ CONTAINS IF (PRESENT(num_objs)) num_objs= c_num_objs END SUBROUTINE h5fget_obj_ids_f -!****s* H5F/h5fget_freespace_f -! -! NAME -! h5fget_freespace_f -! -! PURPOSE -! Get amount of free space within a file -! -! INPUTS -! file_id - file identifier -! OUTPUTS -! free_space - amount of free space in file -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Quincey Koziol -! October 7, 2003 -! -! SOURCE +!> +!! \ingroup FH5F +!! +!! \brief Get amount of free space within a file. +!! +!! \param file_id File identifier. +!! \param free_space Amount of free space in file. +!! \param hdferr \fortran_error +!! SUBROUTINE h5fget_freespace_f(file_id, free_space, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER(HID_T), INTENT(IN) :: file_id INTEGER(HSSIZE_T), INTENT(OUT) :: free_space - ! amount of free space in file - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5fget_freespace_c(file_id, free_space) & BIND(C,NAME='h5fget_freespace_c') @@ -802,34 +535,22 @@ CONTAINS hdferr = h5fget_freespace_c(file_id, free_space) END SUBROUTINE h5fget_freespace_f -!****s* H5F/h5fget_name_f -! -! NAME -! h5fget_name_f -! -! PURPOSE -! Gets the name of the file from the object identifier -! -! INPUTS -! obj_id - object identifier -! OUTPUTS -! buf - buffer to store the read name -! size - actual size of the name -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! July 6, 2004 -! -! SOURCE +!> +!! \ingroup FH5F +!! +!! \brief Gets the name of the file from the object identifier. +!! +!! \param obj_id Object identifier. +!! \param buf Buffer to store the read name. +!! \param size Actual size of the name. +!! \param hdferr \fortran_error +!! SUBROUTINE h5fget_name_f(obj_id, buf, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + INTEGER(HID_T), INTENT(IN) :: obj_id CHARACTER(LEN=*), INTENT(OUT) :: buf - ! Buffer to hold file name - INTEGER(SIZE_T), INTENT(OUT) :: size ! Size of the file name - INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success, - ! -1 if fail -!***** + INTEGER(SIZE_T), INTENT(OUT) :: size + INTEGER, INTENT(OUT) :: hdferr INTEGER(SIZE_T) :: buflen INTERFACE @@ -847,32 +568,20 @@ CONTAINS buflen = LEN(buf) hdferr = h5fget_name_c(obj_id, size, buf, buflen) END SUBROUTINE h5fget_name_f -!****s* H5F/h5fget_filesize_f -! -! NAME -! h5fget_filesize_f -! -! PURPOSE -! Retrieves the file size of the HDF5 file. -! -! INPUTS -! file_id - file identifier -! OUTPUTS -! size - file size -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! July 7, 2004 -! -! SOURCE +!> +!! \ingroup FH5F +!! +!! \brief Retrieves the file size of the HDF5 file. +!! +!! \param file_id File identifier. +!! \param size File size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5fget_filesize_f(file_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! file identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Size of the file - INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success, - ! -1 if fail -!***** + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5fget_filesize_c(file_id, size) & BIND(C,NAME='h5fget_filesize_c') @@ -885,36 +594,24 @@ CONTAINS hdferr = h5fget_filesize_c(file_id, size) END SUBROUTINE h5fget_filesize_f -!****s* H5F/h5fget_fileno_f -! -! NAME -! h5fget_fileno_f -! -! PURPOSE -! Retrieves the file number of the HDF5 file. -! -! INPUTS -! file_id - file identifier -! OUTPUTS -! fileno - file number -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Quincey Koziol -! April 13, 2019 -! -! SOURCE +!> +!! \ingroup FH5F +!! +!! \brief Retrieves the file number of the HDF5 file. +!! +!! \param file_id File identifier. +!! \param fileno File number. +!! \param hdferr \fortran_error +!! SUBROUTINE h5fget_fileno_f(file_id, fileno, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! file identifier - INTEGER, INTENT(OUT) :: fileno ! File number - INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success, - ! -1 if fail -!***** + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER, INTENT(OUT) :: fileno + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5fget_fileno_c(file_id, fileno) & BIND(C,NAME='h5fget_fileno_c') - IMPORT :: HID_T, HSIZE_T + IMPORT :: HID_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: file_id INTEGER, INTENT(OUT) :: fileno @@ -923,31 +620,17 @@ CONTAINS hdferr = h5fget_fileno_c(file_id, fileno) END SUBROUTINE h5fget_fileno_f -!****s* H5F (F03)/h5fget_file_image_f_F03 -! -! NAME -! h5fget_file_image_f -! -! PURPOSE -! Retrieves a copy of the image of an existing, open file. -! -! INPUTS -! file_id - Target file identifier. -! buf_ptr - Pointer to the buffer into which the image of the HDF5 file is to be copied. -! buf_len - Size of the supplied buffer. -! -! OUTPUTS -! hdferr - error code: -! 0 on success and -1 on failure -! OPTIONAL PARAMETERS -! buf_size - Returns the size in bytes of the buffer required to store the file image, -! no data will be copied. -! -! AUTHOR -! M. Scot Breitenfeld -! November 26, 2012 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5F +!! +!! \brief Retrieves a copy of the image of an existing, open file. +!! +!! \param file_id Target file identifier. +!! \param buf_ptr Pointer to the buffer into which the image of the HDF5 file is to be copied. +!! \param buf_len Size of the supplied buffer. +!! \param hdferr Error code: 0 on success and -1 on failure. +!! \param buf_size Returns the size in bytes of the buffer required to store the file image, no data will be copied. +!! SUBROUTINE h5fget_file_image_f(file_id, buf_ptr, buf_len, hdferr, buf_size) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: file_id @@ -955,7 +638,6 @@ CONTAINS INTEGER(SIZE_T), INTENT(IN) :: buf_len INTEGER , INTENT(OUT) :: hdferr INTEGER(SIZE_T), INTENT(OUT) , OPTIONAL :: buf_size -!***** INTEGER(SIZE_T) :: buf_size_default @@ -983,34 +665,21 @@ CONTAINS END SUBROUTINE h5fget_file_image_f -!****s* H5F (F03)/h5fget_dset_no_attrs_hint_f_F03 -! -! NAME -! h5fget_dset_no_attrs_hint_f -! -! PURPOSE -! Gets the value of the "minimize dataset headers" value which creates -! smaller dataset object headers when its set and no attributes are present. -! -! INPUTS -! file_id - Target file identifier. -! -! OUTPUTS -! minimize - Value of the setting. -! hdferr - error code: -! 0 on success and -1 on failure -! -! AUTHOR -! Dana Robinson -! January 2019 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5F +!! +!! \brief Gets the value of the "minimize dataset headers" value which creates +!! smaller dataset object headers when its set and no attributes are present. +!! +!! \param file_id Target file identifier. +!! \param minimize Value of the setting. +!! \param hdferr Error code: 0 on success and -1 on failure. +!! SUBROUTINE h5fget_dset_no_attrs_hint_f(file_id, minimize, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: file_id LOGICAL , INTENT(OUT) :: minimize INTEGER , INTENT(OUT) :: hdferr -!***** LOGICAL(C_BOOL) :: c_minimize INTERFACE @@ -1029,34 +698,21 @@ CONTAINS END SUBROUTINE h5fget_dset_no_attrs_hint_f -!****s* H5F (F03)/h5fset_dset_no_attrs_hint_f_F03 -! -! NAME -! h5fset_dset_no_attrs_hint_f -! -! PURPOSE -! Sets the value of the "minimize dataset headers" value which creates -! smaller dataset object headers when its set and no attributes are present. -! -! INPUTS -! file_id - Target file identifier. -! minimize - Value of the setting. -! -! OUTPUTS -! hdferr - error code: -! 0 on success and -1 on failure -! -! AUTHOR -! Dana Robinson -! January 2019 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5F +!! +!! \brief Sets the value of the "minimize dataset headers" value which creates +!! smaller dataset object headers when its set and no attributes are present. +!! +!! \param file_id Target file identifier. +!! \param minimize Value of the setting. +!! \param hdferr Error code: 0 on success and -1 on failure. +!! SUBROUTINE h5fset_dset_no_attrs_hint_f(file_id, minimize, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: file_id LOGICAL , INTENT(IN) :: minimize INTEGER , INTENT(OUT) :: hdferr -!***** LOGICAL(C_BOOL) :: c_minimize INTERFACE diff --git a/fortran/src/H5Gff.F90 b/fortran/src/H5Gff.F90 index bfca595..10055bc 100644 --- a/fortran/src/H5Gff.F90 +++ b/fortran/src/H5Gff.F90 @@ -1,13 +1,13 @@ -!****h* ROBODoc/H5G -! -! NAME -! MODULE H5G -! -! FILE -! fortran/src/H5Gff.F90 -! -! PURPOSE -! This file contains Fortran interfaces for H5G functions. +!> @defgroup FH5G Fortran Group (H5G) Interface +!! +!! @see H5G, C-API +!! +!! @see @ref H5G_UG, User Guide +!! + +!> @ingroup FH5G +!! +!! @brief This module contains Fortran interfaces for H5G functions. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -35,7 +35,6 @@ ! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. ! This is needed for Windows based operating systems. ! -!***** MODULE H5G USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_CHAR @@ -43,63 +42,36 @@ MODULE H5G CONTAINS -!****s* H5G/h5gcreate_f -! -! NAME -! h5gcreate_f -! -! PURPOSE -! Creates a new group. -! -! INPUTS -! loc_id - location identifier -! name - group name at the specified location -! OUTPUTS -! grp_id - group identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! size_hint - a parameter indicating the number of bytes to -! reserve for the names that will appear in the group -! lcpl_id - Property list for link creation -! gcpl_id - Property list for group creation -! gapl_id - Property list for group access -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! Added additional optional parameters in 1.8 -! MSB - February 27, 2008 -! -! SOURCE +!> +!! \ingroup FH5G +!! +!! \brief Creates a new group. +!! +!! \param loc_id Location identifier. +!! \param name Group name at the specified location. +!! \param grp_id Group identifier. +!! \param hdferr \fortran_error +!! \param size_hint A parameter indicating the number of bytes to reserve for the names that will appear in the group. +!! Set to OBJECT_NAMELEN_DEFAULT_F if using any of the optional parameters lcpl_id, gcpl_id, +!! and/or gapl_id when not using keywords in specifying the optional parameters. +!! \param lcpl_id Property list for link creation. +!! \param gcpl_id Property list for group creation. +!! \param gapl_id Property list for group access. +!! SUBROUTINE h5gcreate_f(loc_id, name, grp_id, hdferr, size_hint, lcpl_id, gcpl_id, gapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(OUT) :: grp_id + INTEGER, INTENT(OUT) :: hdferr INTEGER(SIZE_T), OPTIONAL, INTENT(IN) :: size_hint - ! Parameter indicating - ! the number of bytes - ! to reserve for the - ! names that will appear - ! in the group. Set to OBJECT_NAMELEN_DEFAULT_F - ! if using any of the optional - ! parameters lcpl_id, gcpl_id, and/or gapl_id when not - ! using keywords in specifying the optional parameters - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Property list for link creation - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access -!***** + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id + INTEGER(HID_T) :: lcpl_id_default INTEGER(HID_T) :: gcpl_id_default INTEGER(HID_T) :: gapl_id_default - INTEGER :: namelen ! Length of the name character string INTEGER(SIZE_T) :: size_hint_default @@ -136,139 +108,24 @@ CONTAINS END SUBROUTINE h5gcreate_f -!!$! -!!$!****s* H5G/ -!!$! -!!$! NAME -!!$! h5gcreate2_f -!!$! -!!$! PURPOSE -!!$! Creates a new group. -!!$! -!!$! INPUTS -!!$! loc_id - location identifier -!!$! name - group name at the specified location -!!$! OUTPUTS -!!$! grp_id - group identifier -!!$! hdferr: - error code -!!$! Success: 0 -!!$! Failure: -1 -!!$! OPTIONAL PARAMETERS -!!$! -!!$! lcpl_id - Property list for link creation -!!$! gcpl_id - Property list for group creation -!!$! gapl_id - Property list for group access -!!$! -!!$! AUTHOR M. Scot Breitenfeld -!!$! February 27, 2008 -!!$! -!!$! HISTORY -!!$! -!!$! NOTES Needed to switch the first 2 arguments to avoid conflect -!!$! with h5gcreate1_f -!!$! -!!$ -!!$ SUBROUTINE h5gcreate2_f(name, loc_id, grp_id, hdferr, & -!!$ lcpl_id, gcpl_id, gapl_id) -!!$ IMPLICIT NONE -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of the group -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code -!!$ INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier -!!$ -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Property list for link creation -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access -!!$ -!!$ INTEGER(HID_T) :: lcpl_id_default -!!$ INTEGER(HID_T) :: gcpl_id_default -!!$ INTEGER(HID_T) :: gapl_id_default -!!$ -!!$ INTEGER(SIZE_T) :: OBJECT_NAME -! LEN_DEFAULT ! Dummy argument to pass to c call -!!$ INTEGER :: namelen ! Length of the name character string -!!$ -!!$! MS FORTRAN needs explicit interface for C functions called here. -!!$! -!!$ INTERFACE -!!$ INTEGER FUNCTION h5gcreate_c(loc_id, name, namelen, & -!!$ OBJECT_NAME -! LEN_DEFAULT, grp_id, lcpl_id_default, gcpl_id_default, gapl_id_default) -!!$ USE H5GLOBAL -!!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) -!!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_C'::h5gcreate_c -!!$ !DEC$ENDIF -!!$ !DEC$ATTRIBUTES reference :: name -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name -!!$ INTEGER :: namelen -!!$ INTEGER(SIZE_T) :: OBJECT_NAME -! LEN_DEFAULT -!!$ INTEGER(HID_T) :: lcpl_id_default -!!$ INTEGER(HID_T) :: gcpl_id_default -!!$ INTEGER(HID_T) :: gapl_id_default -!!$ INTEGER(HID_T), INTENT(OUT) :: grp_id -!!$ END FUNCTION h5gcreate_c -!!$ END INTERFACE -!!$ -!!$ namelen = LEN(name) -!!$ OBJECT_NAME -! LEN_DEFAULT = OBJECT_NAME -! LEN_DEFAULT_F -!!$ -!!$ lcpl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id -!!$ gcpl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id -!!$ gapl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(gapl_id)) gapl_id_default = gapl_id -!!$ -!!$ -!!$ hdferr = h5gcreate_c(loc_id, name, namelen, OBJECT_NAME -! LEN_DEFAULT, grp_id, & -!!$ lcpl_id_default, gcpl_id_default, gapl_id_default) -!!$ -!!$ END SUBROUTINE h5gcreate2_f - -! -!****s* H5G/h5gopen_f -! -! NAME -! h5gopen_f -! -! PURPOSE -! Opens an existing group. -! -! INPUTS -! loc_id - location identifier -! name - name of the group to open -! OUTPUTS -! grp_id - group identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! gapl_id - Group access property list identifier -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! Added 1.8 (optional) parameter gapl_id -! February, 2008 M. Scot Breitenfeld -! -! SOURCE +!> +!! \ingroup FH5G +!! +!! \brief Opens an existing group. +!! +!! \param loc_id Location identifier. +!! \param name Name of the group to open. +!! \param grp_id Group identifier. +!! \param hdferr \fortran_error +!! \param gapl_id Group access property list identifier. +!! SUBROUTINE h5gopen_f(loc_id, name, grp_id, hdferr, gapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER(HID_T), INTENT(OUT) :: grp_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Group access property list identifier -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(OUT) :: grp_id + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id INTEGER(HID_T) :: gapl_id_default INTEGER :: namelen ! Length of the name character string @@ -292,34 +149,18 @@ CONTAINS hdferr = h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) END SUBROUTINE h5gopen_f -! -!****s* H5G/h5gclose_f -! -! NAME -! h5gclose_f -! -! PURPOSE -! Closes the specified group. -! -! INPUTS -! grp_id - group identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE +!> +!! \ingroup FH5G +!! +!! \brief Closes the specified group. +!! +!! \param grp_id Group identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5gclose_f(grp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: grp_id ! Group identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: grp_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5gclose_c(grp_id) BIND(C,NAME='h5gclose_c') IMPORT :: HID_T @@ -330,44 +171,28 @@ CONTAINS hdferr = h5gclose_c(grp_id) END SUBROUTINE h5gclose_f -! -!****s* H5G/h5gget_obj_info_idx_f -! -! NAME -! h5gget_obj_info_idx_f -! -! PURPOSE -! Returns name and type of the group member identified by -! its index. -! -! INPUTS -! loc_id - location identifier -! name - name of the group at the specified location -! idx - object index (zero-based) -! OUTPUTS -! obj_name - object name -! obj_type - object type -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE +!> +!! \ingroup FH5G +!! +!! \brief Returns name and type of the group member identified by its index. +!! +!! \param loc_id Location identifier. +!! \param name Name of the group at the specified location. +!! \param idx Object index (zero-based). +!! \param obj_name Object name. +!! \param obj_type Object type. +!! \param hdferr \fortran_error +!! SUBROUTINE h5gget_obj_info_idx_f(loc_id, name, idx, & obj_name, obj_type, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER, INTENT(IN) :: idx ! Index of member object - CHARACTER(LEN=*), INTENT(OUT) :: obj_name ! Name of the object - INTEGER, INTENT(OUT) :: obj_type ! Object type - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: idx + CHARACTER(LEN=*), INTENT(OUT) :: obj_name + INTEGER, INTENT(OUT) :: obj_type + INTEGER, INTENT(OUT) :: hdferr + INTEGER :: namelen ! Length of the name character string INTEGER :: obj_namelen ! Length of the obj_name character string @@ -393,103 +218,63 @@ CONTAINS obj_name, obj_namelen, obj_type) END SUBROUTINE h5gget_obj_info_idx_f -! -!****s* H5G/h5gn_members_f -! -! NAME -! h5gn_members_f -! -! PURPOSE -! Returns the number of group members. -! -! INPUTS -! loc_id - location identifier -! name - name of the group at the specified location -! OUTPUTS -! nmembers - number of group members -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE +!> +!! \ingroup FH5G +!! +!! \brief Returns the number of group members. +!! +!! \param loc_id Location identifier. +!! \param name Name of the group at the specified location. +!! \param nmembers Number of group members. +!! \param hdferr \fortran_error +!! SUBROUTINE h5gn_members_f(loc_id, name, nmembers, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the group - INTEGER, INTENT(OUT) :: nmembers ! Number of members in the - ! group - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5gn_members_c(loc_id, name, namelen, nmembers) & - BIND(C,NAME='h5gn_members_c') - IMPORT :: C_CHAR - IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(OUT) :: nmembers - END FUNCTION h5gn_members_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5gn_members_c(loc_id, name, namelen, nmembers) - - END SUBROUTINE h5gn_members_f -! -!****s* H5G/h5glink_f -! -! NAME -! h5glink_f -! -! PURPOSE -! Creates a link of the specified type from new_name -! to current_name. -! -! INPUTS -! loc_id - location identifier -! link_type - link type; possible values are: -! H5G_LINK_HARD_F (0) -! H5G_LINK_SOFT_F (1) -! current_name - name of the existing object if link is a -! hard link. Can be anything for the soft link -! new_name - new name for the object -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(OUT) :: nmembers + INTEGER, INTENT(OUT) :: hdferr + + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5gn_members_c(loc_id, name, namelen, nmembers) & + BIND(C,NAME='h5gn_members_c') + IMPORT :: C_CHAR + IMPORT :: HID_T + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(OUT) :: nmembers + END FUNCTION h5gn_members_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5gn_members_c(loc_id, name, namelen, nmembers) + + END SUBROUTINE h5gn_members_f +!> +!! \ingroup FH5G +!! +!! \brief Creates a link of the specified type from new_name to current_name. +!! +!! \param loc_id Location identifier. +!! \param link_type Link type; possible values are: +!! \li H5G_LINK_HARD_F +!! \li H5G_LINK_SOFT_F +!! \param current_name Name of the existing object if link is a hard link. Can be anything for the soft link. +!! \param new_name New name for the object. +!! \param hdferr \fortran_error +!! SUBROUTINE h5glink_f(loc_id, link_type, current_name, & new_name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - INTEGER, INTENT(IN) :: link_type ! link type - ! Possible values are: - ! H5G_LINK_HARD_F (0) or - ! H5G_LINK_SOFT_F (1) + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: link_type CHARACTER(LEN=*), INTENT(IN) :: current_name - ! Current name of an object - CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + CHARACTER(LEN=*), INTENT(IN) :: new_name + INTEGER, INTENT(OUT) :: hdferr INTEGER :: current_namelen ! Length of the current_name string INTEGER :: new_namelen ! Length of the new_name string @@ -515,49 +300,32 @@ CONTAINS current_namelen, new_name, new_namelen) END SUBROUTINE h5glink_f -! -!****s* H5G/h5glink2_f -! -! NAME -! h5glink2_f -! -! PURPOSE -! Creates a link of the specified type from new_name -! to current_name. current_name and new_name are interpreted -! relative to current and new location identifiers. -! -! INPUTS -! cur_loc_id - location identifier -! cur_name - name of the existing object if link is a -! hard link. Can be anything for the soft link. -! link_type - link type; possible values are: -! H5G_LINK_HARD_F (0) -! H5G_LINK_SOFT_F (1) -! new_loc_id - new location identifier -! new_name - new name for the object -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 25, 2002 -! -! SOURCE +!> +!! \ingroup FH5G +!! +!! \brief Creates a link of the specified type from new_name +!! to current_name. current_name and new_name are interpreted +!! relative to current and new location identifiers. +!! +!! \param cur_loc_id Location identifier. +!! \param cur_name Name of the existing object if link is a hard link. Can be anything for the soft link. +!! \param link_type Link type; possible values are: +!! \li H5G_LINK_HARD_F +!! \li H5G_LINK_SOFT_F +!! \param new_loc_id New location identifier. +!! \param new_name New name for the object. +!! \param hdferr \fortran_error +!! SUBROUTINE h5glink2_f(cur_loc_id, cur_name, link_type, new_loc_id, & new_name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: cur_loc_id ! File or group identifier + INTEGER(HID_T), INTENT(IN) :: cur_loc_id CHARACTER(LEN=*), INTENT(IN) :: cur_name - ! Current name of an object - INTEGER, INTENT(IN) :: link_type ! link type - ! Possible values are: - ! H5G_LINK_HARD_F (0) or - ! H5G_LINK_SOFT_F (1) + INTEGER, INTENT(IN) :: link_type - INTEGER(HID_T), INTENT(IN) :: new_loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: new_loc_id + CHARACTER(LEN=*), INTENT(IN) :: new_name + INTEGER, INTENT(OUT) :: hdferr INTEGER :: cur_namelen ! Length of the current_name string INTEGER :: new_namelen ! Length of the new_name string @@ -584,39 +352,21 @@ CONTAINS new_loc_id, new_name, new_namelen) END SUBROUTINE h5glink2_f -! -!****s* H5G/h5gunlink_f -! -! NAME -! h5gunlink_f -! -! PURPOSE -! Removes the specified name from the group graph and -! decrements the link count for the object to which name -! points -! -! INPUTS -! loc_id - location identifier -! name - name of the object to unlink -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE +!> +!! \ingroup FH5G +!! +!! \brief Removes the specified name from the group graph and +!! decrements the link count for the object to which name points +!! +!! \param loc_id Location identifier. +!! \param name Name of the object to unlink. +!! \param hdferr \fortran_error +!! SUBROUTINE h5gunlink_f(loc_id, name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(OUT) :: hdferr INTEGER :: namelen ! Length of the name character string INTERFACE @@ -633,39 +383,22 @@ CONTAINS hdferr = h5gunlink_c(loc_id, name, namelen) END SUBROUTINE h5gunlink_f -! -!****s* H5G/h5gmove_f -! -! NAME -! h5gmove_f -! -! PURPOSE -! Renames an object within an HDF5 file. -! -! INPUTS -! loc_id - location identifier -! name - object's name at specified location -! new_name - object's new name -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE +!> +!! \ingroup FH5G +!! +!! \brief Renames an object within an HDF5 file. +!! +!! \param loc_id Location identifier. +!! \param name Object's name at specified location. +!! \param new_name Object's new name. +!! \param hdferr \fortran_error +!! SUBROUTINE h5gmove_f(loc_id, name, new_name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object - CHARACTER(LEN=*), INTENT(IN) :: new_name ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(LEN=*), INTENT(IN) :: new_name + INTEGER, INTENT(OUT) :: hdferr INTEGER :: namelen ! Length of the current_name string INTEGER :: new_namelen ! Length of the new_name string @@ -685,35 +418,24 @@ CONTAINS new_namelen = LEN(new_name) hdferr = h5gmove_c(loc_id, name, namelen, new_name, new_namelen) END SUBROUTINE h5gmove_f -! -!****s* H5G/h5gmove2_f -! -! NAME -! h5gmove2_f -! -! PURPOSE -! Renames an object within an HDF5 file. -! -! INPUTS -! src_loc_id - original location identifier -! src_name - object's name at specified original location -! dst_loc_id - original location identifier -! dst_name - object's new name -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! September 25, 2002 -! -! SOURCE +!> +!! \ingroup FH5G +!! +!! \brief Renames an object within an HDF5 file. +!! +!! \param src_loc_id Original location identifier. +!! \param src_name Object's name at specified original location. +!! \param dst_loc_id Original location identifier. +!! \param dst_name Object's new name. +!! \param hdferr \fortran_error +!! SUBROUTINE h5gmove2_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: src_name ! Original name of an object - INTEGER(HID_T), INTENT(IN) :: dst_loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: dst_name ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: src_loc_id + CHARACTER(LEN=*), INTENT(IN) :: src_name + INTEGER(HID_T), INTENT(IN) :: dst_loc_id + CHARACTER(LEN=*), INTENT(IN) :: dst_name + INTEGER, INTENT(OUT) :: hdferr INTEGER :: src_namelen ! Length of the current_name string INTEGER :: dst_namelen ! Length of the new_name string @@ -735,47 +457,24 @@ CONTAINS dst_namelen = LEN(dst_name) hdferr = h5gmove2_c(src_loc_id, src_name, src_namelen, dst_loc_id, dst_name, dst_namelen) END SUBROUTINE h5gmove2_f -! -!****s* H5G/h5gget_linkval_f -! -! NAME -! h5gget_linkval_f -! -! PURPOSE -! Returns the name of the object that the symbolic link -! points to. -! -! INPUTS -! loc_id - location identifier -! name - symbolic link to the object whose name -! is to be returned. -! size - maximum number of characters to be returned -! OUTPUTS -! buffer - a buffer to hold the name of the object -! being sought -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE +!> +!! \ingroup FH5G +!! +!! \brief Returns the name of the object that the symbolic link points to. +!! +!! \param loc_id Location identifier. +!! \param name Symbolic link to the object whose name is to be returned. +!! \param size Maximum number of characters to be returned. +!! \param buffer A buffer to hold the name of the object being sought. +!! \param hdferr \fortran_error +!! SUBROUTINE h5gget_linkval_f(loc_id, name, size, buffer, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object - INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of buffer + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: size CHARACTER(LEN=size), INTENT(OUT) :: buffer - ! Buffer to hold a name of - ! the object symbolic link - ! points to - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER, INTENT(OUT) :: hdferr INTEGER :: namelen ! Length of the current_name string INTERFACE @@ -794,39 +493,22 @@ CONTAINS hdferr = h5gget_linkval_c(loc_id, name, namelen, size, buffer) END SUBROUTINE h5gget_linkval_f -! -!****s* H5G/h5gset_comment_f -! -! NAME -! h5gset_comment_f -! -! PURPOSE -! Sets comment for specified object. -! -! INPUTS -! loc_id - location identifier -! name - name of the object -! comment - comment to set for the object -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE +!> +!! \ingroup FH5G +!! +!! \brief Sets comment for specified object. +!! +!! \param loc_id Location identifier. +!! \param name Name of the object. +!! \param comment Comment to set for the object. +!! \param hdferr \fortran_error +!! SUBROUTINE h5gset_comment_f(loc_id, name, comment, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object - CHARACTER(LEN=*), INTENT(IN) :: comment ! New name of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(LEN=*), INTENT(IN) :: comment + INTEGER, INTENT(OUT) :: hdferr INTEGER :: namelen ! Length of the current_name string INTEGER :: commentlen ! Length of the comment string @@ -847,42 +529,24 @@ CONTAINS commentlen = LEN(comment) hdferr = h5gset_comment_c(loc_id, name, namelen, comment, commentlen) END SUBROUTINE h5gset_comment_f -! -!****s* H5G/h5gget_comment_f -! -! NAME -! h5gget_comment_f -! -! PURPOSE -! Retrieves comment for specified object. -! -! INPUTS -! loc_id - location identifier -! name - name of the object at specified location -! size - size of the buffer required to hold comment -! OUTPUTS -! buffer - buffer to hold object's comment -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE +!> +!! \ingroup FH5G +!! +!! \brief Retrieves comment for specified object. +!! +!! \param loc_id Location identifier. +!! \param name Name of the object at specified location. +!! \param size Size of the buffer required to hold comment. +!! \param buffer Buffer to hold object's comment. +!! \param hdferr \fortran_error +!! SUBROUTINE h5gget_comment_f(loc_id, name, size, buffer, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Current name of an object - INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of buffer + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: size CHARACTER(LEN=size), INTENT(OUT) :: buffer - ! Buffer to hold a comment - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER, INTENT(OUT) :: hdferr INTEGER :: namelen ! Length of the current_name string INTERFACE @@ -901,37 +565,24 @@ CONTAINS hdferr = h5gget_comment_c(loc_id, name, namelen, size, buffer) END SUBROUTINE h5gget_comment_f -! -!****s* H5G/H5Gcreate_anon_f -! -! NAME -! H5Gcreate_anon_f -! -! PURPOSE -! Creates a new empty group without linking it into the file structure. -! -! INPUTS -! loc_id - Location identifier -! OUTPUTS -! grp_id - group identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! gcpl_id - Group creation property list identifier -! gapl_id - Group access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! February 15, 2008 -! -! SOURCE +!> +!! \ingroup FH5G +!! +!! \brief Creates a new empty group without linking it into the file structure. +!! +!! \param loc_id Location identifier. +!! \param grp_id Group identifier. +!! \param hdferr \fortran_error +!! \param gcpl_id Group creation property list identifier. +!! \param gapl_id Group access property list identifier. +!! SUBROUTINE h5Gcreate_anon_f(loc_id, grp_id, hdferr, gcpl_id, gapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id ! Property list for group creation - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id ! Property list for group access -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(OUT) :: grp_id + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gcpl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: gapl_id INTEGER(HID_T) :: gcpl_id_default INTEGER(HID_T) :: gapl_id_default @@ -939,10 +590,10 @@ CONTAINS INTEGER FUNCTION h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) & BIND(C,NAME='h5gcreate_anon_c') IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - INTEGER(HID_T), INTENT(IN) :: gcpl_id_default ! Property list for group creation - INTEGER(HID_T), INTENT(IN) :: gapl_id_default ! Property list for group access - INTEGER(HID_T), INTENT(OUT) :: grp_id ! Group identifier + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: gcpl_id_default + INTEGER(HID_T), INTENT(IN) :: gapl_id_default + INTEGER(HID_T), INTENT(OUT) :: grp_id END FUNCTION h5gcreate_anon_c END INTERFACE @@ -955,31 +606,20 @@ CONTAINS hdferr = h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) END SUBROUTINE h5Gcreate_anon_f -! -!****s* H5G/H5Gget_create_plist_f -! -! NAME -! H5Gget_create_plist_f -! -! PURPOSE -! Gets a group creation property list identifier. -! -! INPUTS -! grp_id - group identifier -! OUTPUTS -! gcpl_id - Group creation property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! February 15, 2008 -! -! SOURCE +!> +!! \ingroup FH5G +!! +!! \brief Gets a group creation property list identifier. +!! +!! \param grp_id Group identifier. +!! \param gcpl_id Group creation property list identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5gget_create_plist_f(grp_id, gcpl_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: grp_id ! Group identifier - INTEGER(HID_T), INTENT(OUT) :: gcpl_id ! Property list for group creation - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: grp_id + INTEGER(HID_T), INTENT(OUT) :: gcpl_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5gget_create_plist_c(grp_id, gcpl_id ) BIND(C,NAME='h5gget_create_plist_c') IMPORT :: HID_T @@ -992,57 +632,30 @@ CONTAINS END SUBROUTINE h5gget_create_plist_f -! -!****s* H5G/h5gget_info_f -! -! NAME -! h5gget_info_f -! -! PURPOSE -! Retrieves information about a group -! -! INPUTS -! group_id - Group identifier -! -! OUTPUTS -! storage_type - Type of storage for links in group -! H5G_STORAGE_TYPE_COMPACT: Compact storage -! H5G_STORAGE_TYPE_DENSE: Indexed storage -! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure -! nlinks - Number of links in group -! max_corder - Current maximum creation order value for group -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! mounted - Whether group has a file mounted on it -! -! AUTHOR -! M. Scot Breitenfeld -! February 15, 2008 -! -! NOTES -! In C the output is defined as a structure: H5G_info_t -! -! HISTORY -! -! - Added 'mounted' parameter -! M. Scot Breitenfeld -! July 16, 2008 -! -! SOURCE +!> +!! \ingroup FH5G +!! +!! \brief Retrieves information about a group +!! +!! \param group_id Group identifier. +!! \param storage_type Type of storage for links in group: +!! \li H5G_STORAGE_TYPE_COMPACT_F: Compact storage +!! \li H5G_STORAGE_TYPE_DENS_FE: Indexed storage +!! \li H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure +!! \param nlinks Number of links in group. +!! \param max_corder Current maximum creation order value for group. +!! \param hdferr \fortran_error +!! \param mounted Whether group has a file mounted on it. +!! SUBROUTINE h5gget_info_f(group_id, storage_type, nlinks, max_corder, hdferr, mounted) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: group_id ! Group identifier - - INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: - ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage - ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage - ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure - INTEGER, INTENT(OUT) :: nlinks ! Number of links in group - INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it -!***** + INTEGER(HID_T), INTENT(IN) :: group_id + + INTEGER, INTENT(OUT) :: storage_type + INTEGER, INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: max_corder + INTEGER, INTENT(OUT) :: hdferr + LOGICAL, INTENT(OUT), OPTIONAL :: mounted INTEGER :: mounted_c INTERFACE @@ -1068,67 +681,41 @@ CONTAINS ENDIF END SUBROUTINE h5gget_info_f -! -!****s* H5G/h5gget_info_by_idx_f -! -! NAME -! h5gget_info_by_idx_f -! -! PURPOSE -! Retrieves information about a group, according to the group’s position within an index. -! -! INPUTS -! loc_id - File or group identifier -! group_name - Name of group containing group for which information is to be retrieved -! index_type - Index type -! order - Order of the count in the index -! n - Position in the index of the group for which information is retrieved -! -! OUTPUTS -! storage_type - Type of storage for links in group -! H5G_STORAGE_TYPE_COMPACT: Compact storage -! H5G_STORAGE_TYPE_DENSE: Indexed storage -! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure -! nlinks - Number of links in group -! max_corder - Current maximum creation order value for group -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! mounted - Whether group has a file mounted on it -! -! NOTES -! In C the output is defined as a structure: H5G_info_t -! -! AUTHOR -! M. Scot Breitenfeld -! February 18, 2008 -! -! HISTORY -! Added 'mounted' parameter -! M. Scot Breitenfeld -! July 16, 2008 -! -! SOURCE +!> +!! \ingroup FH5G +!! +!! \brief Retrieves information about a group, according to the group’s position within an index. +!! +!! \param loc_id File or group identifier. +!! \param group_name Name of group containing group for which information is to be retrieved. +!! \param index_type Index type. +!! \param order Order of the count in the index. +!! \param n Position in the index of the group for which information is retrieved. +!! \param storage_type Type of storage for links in group: +!! \li H5G_STORAGE_TYPE_COMPACT_F: Compact storage +!! \li H5G_STORAGE_TYPE_DENSE_F: Indexed storage +!! \li H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure +!! \param nlinks Number of links in group. +!! \param max_corder Current maximum creation order value for group. +!! \param hdferr \fortran_error +!! \param lapl_id Link access property list. +!! \param mounted Whether group has a file mounted on it. +!! SUBROUTINE h5gget_info_by_idx_f(loc_id, group_name, index_type, order, n, & storage_type, nlinks, max_corder, hdferr, lapl_id, mounted) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved - INTEGER, INTENT(IN) :: index_type ! Index type - INTEGER, INTENT(IN) :: order ! Order of the count in the index - INTEGER(HSIZE_T), INTENT(IN) :: n ! Position in the index of the group for which information is retrieved - - INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: - ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage - ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage - ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure - INTEGER, INTENT(OUT) :: nlinks ! Number of links in group - INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list - LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + + INTEGER, INTENT(OUT) :: storage_type + INTEGER, INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: max_corder + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id + LOGICAL, INTENT(OUT), OPTIONAL :: mounted INTEGER :: mounted_c INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: group_name_len ! length of group name @@ -1172,61 +759,35 @@ CONTAINS ENDIF END SUBROUTINE h5gget_info_by_idx_f -! -!****s* H5G/h5gget_info_by_name_f -! -! NAME -! h5gget_info_by_name_f -! -! PURPOSE -! Retrieves information about a group. -! -! INPUTS -! loc_id - File or group identifier -! group_name - Name of group containing group for which information is to be retrieved -! -! OUTPUTS -! -! storage_type - Type of storage for links in group -! H5G_STORAGE_TYPE_COMPACT: Compact storage -! H5G_STORAGE_TYPE_DENSE: Indexed storage -! H5G_STORAGE_TYPE_SYMBOL_TABLE: Symbol tables, the original HDF5 structure -! nlinks - Number of links in group -! max_corder - Current maximum creation order value for group -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! mounted - Whether group has a file mounted on it -! -! NOTES -! In C the output is defined as a structure: H5G_info_t -! -! AUTHOR -! M. Scot Breitenfeld -! February 18, 2008 -! -! HISTORY -! Added 'mounted' parameter -! M. Scot Breitenfeld -! July 16, 2008 -! SOURCE +!> +!! \ingroup FH5G +!! +!! \brief Retrieves information about a group. +!! +!! \param loc_id File or group identifier. +!! \param group_name Name of group containing group for which information is to be retrieved. +!! \param storage_type Type of storage for links in group: +!! \li H5G_STORAGE_TYPE_COMPACT_F: Compact storage +!! \li H5G_STORAGE_TYPE_DENSE_F: Indexed storage +!! \li H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure +!! \param nlinks Number of links in group. +!! \param max_corder Current maximum creation order value for group. +!! \param hdferr \fortran_error +!! \param lapl_id Link access property list. +!! \param mounted Whether group has a file mounted on it. +!! SUBROUTINE h5gget_info_by_name_f(loc_id, group_name, & storage_type, nlinks, max_corder, hdferr, lapl_id, mounted) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of group containing group for which information is to be retrieved - - INTEGER, INTENT(OUT) :: storage_type ! Type of storage for links in group: - ! H5G_STORAGE_TYPE_COMPACT_F: Compact storage - ! H5G_STORAGE_TYPE_DENSE_F: Indexed storage - ! H5G_STORAGE_TYPE_SYMBOL_TABLE_F: Symbol tables, the original HDF5 structure - INTEGER, INTENT(OUT) :: nlinks ! Number of links in group - INTEGER, INTENT(OUT) :: max_corder ! Current maximum creation order value for group - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list - LOGICAL, INTENT(OUT), OPTIONAL :: mounted ! Whether group has a file mounted on it -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + + INTEGER, INTENT(OUT) :: storage_type + INTEGER, INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: max_corder + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id + LOGICAL, INTENT(OUT), OPTIONAL :: mounted INTEGER :: mounted_c INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: group_name_len ! length of group name diff --git a/fortran/src/H5Iff.F90 b/fortran/src/H5Iff.F90 index cda26ed..b67d807 100644 --- a/fortran/src/H5Iff.F90 +++ b/fortran/src/H5Iff.F90 @@ -1,13 +1,13 @@ -!****h* ROBODoc/H5I -! -! NAME -! MODULE H5I -! -! FILE -! fortran/src/H5Iff.F90 -! -! PURPOSE -! This file contains Fortran interfaces for H5I functions. +!> @defgroup FH5I Fortran Identifier (H5I) Interface +!! +!! @see H5I, C-API +!! +!! @see @ref H5I_UG, User Guide +!! + +!> @ingroup FH5I +!! +!! @brief This module contains Fortran interfaces for H5I functions. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -35,7 +35,6 @@ ! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. ! This is needed for Windows based operating systems. ! -!***** MODULE H5I @@ -44,53 +43,27 @@ MODULE H5I CONTAINS -!****s* H5I/h5iget_type_f -! -! NAME -! h5iget_type_f -! -! PURPOSE -! Retrieves the type of an object. -! -! INPUTS -! obj_id - object identifier -! OUTPUTS -! type - type of the object, possible values: -! H5I_FILE_F -! H5I_GROUP_F -! H5I_DATATYPE_F -! H5I_DATASPACE_F -! H5I_DATASET_F -! H5I_ATTR_F -! H5I_BADID_F -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 5, 2001 -! -! SOURCE +!> +!! \ingroup FH5I +!! +!! \brief Retrieves the type of an object. +!! +!! \param obj_id Object identifier. +!! \param type Type of the object, possible values: +!! \li H5I_FILE_F +!! \li H5I_GROUP_F +!! \li H5I_DATATYPE_F +!! \li H5I_DATASPACE_F +!! \li H5I_DATASET_F +!! \li H5I_ATTR_F +!! \li H5I_BADID_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5iget_type_f(obj_id, TYPE, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: TYPE ! type of an object. - ! possible values are: - ! H5I_FILE_F - ! H5I_GROUP_F - ! H5I_DATATYPE_F - ! H5I_DATASPACE_F - ! H5I_DATASET_F - ! H5I_ATTR_F - ! H5I_BADID_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: TYPE + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5iget_type_c(obj_id, TYPE) BIND(C, NAME='h5iget_type_c') IMPORT :: HID_T @@ -102,39 +75,24 @@ CONTAINS hdferr = h5iget_type_c(obj_id, TYPE) END SUBROUTINE h5iget_type_f -!****s* H5I/h5iget_name_f -! -! NAME -! h5iget_name_f -! -! PURPOSE -! Gets a name of an object specified by its identifier. -! -! INPUTS -! obj_id - attribute identifier -! buf_size - size of a buffer to read name in -! OUTPUTS -! buf - buffer to read name in, name will be truncated if -! buffer is not big enough -! name_size - name size -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! SOURCE +!> +!! \ingroup FH5I +!! +!! \brief Gets a name of an object specified by its identifier. +!! +!! \param obj_id Attribute identifier. +!! \param buf_size Size of a buffer to read name in. +!! \param buf Buffer to read name in, name will be truncated if buffer is not big enough. +!! \param name_size Name size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5iget_name_f(obj_id, buf, buf_size, name_size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER(SIZE_T), INTENT(IN) :: buf_size ! Buffer size - CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer to hold object name - INTEGER(SIZE_T), INTENT(OUT) :: name_size ! Actual name size - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 if successful, - ! -1 if fail -!***** + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(SIZE_T), INTENT(IN) :: buf_size + CHARACTER(LEN=*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(OUT) :: name_size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5iget_name_c(obj_id, buf, buf_size, name_size) BIND(C, NAME='h5iget_name_c') IMPORT :: C_CHAR @@ -150,32 +108,20 @@ CONTAINS hdferr = h5iget_name_c(obj_id, buf, buf_size, name_size) END SUBROUTINE h5iget_name_f -!****s* H5I/h5iinc_ref_f -! -! NAME -! h5iinc_ref_f -! -! PURPOSE -! Increments the reference count of an ID -! -! INPUTS -! obj_id - object identifier -! OUTPUTS -! ref_count - Current reference count of the ID -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Quincey Koziol -! December 9, 2003 -! -! SOURCE +!> +!! \ingroup FH5I +!! +!! \brief Increments the reference count of an ID. +!! +!! \param obj_id Object identifier. +!! \param ref_count Current reference count of the ID. +!! \param hdferr \fortran_error +!! SUBROUTINE h5iinc_ref_f(obj_id, ref_count, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: ref_count + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5iinc_ref_c(obj_id, ref_count) BIND(C, NAME='h5iinc_ref_c') IMPORT :: HID_T @@ -187,32 +133,20 @@ CONTAINS hdferr = h5iinc_ref_c(obj_id, ref_count) END SUBROUTINE h5iinc_ref_f -!****s* H5I/h5idec_ref_f -! -! NAME -! h5idec_ref_f -! -! PURPOSE -! Decrements the reference count of an ID -! -! INPUTS -! obj_id - Object identifier -! OUTPUTS -! ref_count - Current reference count of the ID -! hdferr: - Error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Quincey Koziol -! December 9, 2003 -! -! SOURCE +!> +!! \ingroup FH5I +!! +!! \brief Decrements the reference count of an ID. +!! +!! \param obj_id Object identifier. +!! \param ref_count Current reference count of the ID. +!! \param hdferr \fortran_error +!! SUBROUTINE h5idec_ref_f(obj_id, ref_count, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: ref_count + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5idec_ref_c(obj_id, ref_count) BIND(C, NAME='h5idec_ref_c') IMPORT :: HID_T @@ -224,32 +158,20 @@ CONTAINS hdferr = h5idec_ref_c(obj_id, ref_count) END SUBROUTINE h5idec_ref_f -!****s* H5I/h5iget_ref_f -! NAME -! h5iget_ref_f -! -! PURPOSE -! Retrieves the reference count of an ID -! -! INPUTS -! obj_id - object identifier -! -! OUTPUTS -! ref_count - Current reference count of the ID -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Quincey Koziol -! December 9, 2003 -! -! SOURCE +!> +!! \ingroup FH5I +!! +!! \brief Retrieves the reference count of an ID. +!! +!! \param obj_id Object identifier. +!! \param ref_count Current reference count of the ID. +!! \param hdferr \fortran_error +!! SUBROUTINE h5iget_ref_f(obj_id, ref_count, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER, INTENT(OUT) :: ref_count ! Current reference count of ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: ref_count + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5iget_ref_c(obj_id, ref_count) BIND(C, NAME='h5iget_ref_c') IMPORT :: HID_T @@ -260,32 +182,20 @@ CONTAINS END INTERFACE hdferr = h5iget_ref_c(obj_id, ref_count) END SUBROUTINE h5iget_ref_f -! -!****s* H5I/h5iget_file_id_f -! NAME -! h5iget_file_id_f -! -! PURPOSE -! Obtains file identifier from the object identifier -! -! INPUTS -! obj_id - object identifier -! OUTPUTS -! file_id - file identifier -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 23, 2004 -! SOURCE +!> +!! \ingroup FH5I +!! +!! \brief Obtains file identifier from the object identifier. +!! +!! \param obj_id Object identifier. +!! \param file_id File identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5iget_file_id_f(obj_id, file_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - INTEGER(HID_T), INTENT(OUT) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(HID_T), INTENT(OUT) :: file_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5iget_file_id_c(obj_id, file_id) BIND(C, NAME='h5iget_file_id_c') IMPORT :: HID_T @@ -296,39 +206,27 @@ CONTAINS END INTERFACE hdferr = h5iget_file_id_c(obj_id, file_id) END SUBROUTINE h5iget_file_id_f -! -!****s* H5I/h5iis_valid_f -! NAME -! h5iget_file_id_f -! -! PURPOSE -! Check if an ID is valid without producing an error message -! -! INPUTS -! id - identifier -! OUTPUTS -! valid - status of id as a valid identifier -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! April 13, 2009 -! SOURCE +!> +!! \ingroup FH5I +!! +!! \brief Check if an ID is valid without producing an error message. +!! +!! \param id Identifier. +!! \param valid Status of id as a valid identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5iis_valid_f(id, valid, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: id ! Identifier - LOGICAL, INTENT(OUT) :: valid ! Status of id as a valid identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: id + LOGICAL, INTENT(OUT) :: valid + INTEGER, INTENT(OUT) :: hdferr INTEGER :: c_valid ! 0 = .false, 1 = .true. INTERFACE INTEGER FUNCTION h5iis_valid_c(id, c_valid) BIND(C, NAME='h5iis_valid_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: id ! Identifier + INTEGER(HID_T), INTENT(IN) :: id INTEGER :: c_valid END FUNCTION h5iis_valid_c END INTERFACE diff --git a/fortran/src/H5Lff.F90 b/fortran/src/H5Lff.F90 index 50d08a8..0b8af8b 100644 --- a/fortran/src/H5Lff.F90 +++ b/fortran/src/H5Lff.F90 @@ -1,10 +1,13 @@ -!****h* ROBODoc/H5L -! -! NAME -! MODULE H5L -! -! PURPOSE -! This file contains Fortran interfaces for H5L functions. +!> @defgroup FH5L Fortran Link (H5L) Interface +!! +!! @see H5L, C-API +!! +!! @see @ref H5L_UG, User Guide +!! + +!> @ingroup FH5L +!! +!! @brief This module contains Fortran interfaces for H5L functions. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -32,7 +35,6 @@ ! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. ! This is needed for Windows based operating systems. ! -!***** MODULE H5L @@ -41,77 +43,54 @@ MODULE H5L IMPLICIT NONE -!****t* H5L (F03)/h5l_info_t -! -! Fortran2003 Derived Type: -! TYPE, bind(c) :: union_t - TYPE(H5O_TOKEN_T_F) :: token - INTEGER(size_t) :: val_size + TYPE(H5O_TOKEN_T_F) :: token !< Type for object tokens + INTEGER(size_t) :: val_size !< Size of a soft link or user-defined link value END TYPE union_t +! +! @brief Fortran2003 Derived Type for h5l_info_t +! TYPE, bind(c) :: h5l_info_t - INTEGER(c_int) :: type ! H5L_type_t type -! LOGICAL(c_bool) :: corder_valid ! hbool_t corder_valid - INTEGER(c_int64_t) :: corder ! int64_t corder; - INTEGER(c_int) :: cset ! H5T_cset_t cset; + INTEGER(c_int) :: type !< Specifies the link class. Valid values include the following: + !< \li H5L_TYPE_HARD_F Hard link + !< \li H5L_TYPE_SOFT_F Soft link + !< \li H5L_TYPE_EXTERNAL_F External link + !< \li H5L_TYPE_ERROR_F Invalid link type id + ! LOGICAL(c_bool) :: corder_valid ! hbool_t corder_valid + INTEGER(c_int64_t) :: corder !< Creation order + INTEGER(c_int) :: cset !< Character set of link name is encoded. Valid values include the following: + !< \li H5T_CSET_ASCII US ASCII + !< \li H5T_CSET_UTF8 UTF-8 Unicode encoding TYPE(union_t) :: u END TYPE h5l_info_t -!***** - -!type specifies the link class. Valid values include the following: -! H5L_TYPE_HARD Hard link -! H5L_TYPE_SOFT Soft link -! H5L_TYPE_EXTERNAL External link -! H5L_TYPE_ERROR Error -!cset specifies the character set in which the link name is encoded. Valid values include the following: -! H5T_CSET_ASCII US ASCII -! H5T_CSET_UTF8 UTF-8 Unicode encoding - CONTAINS -! -!****s* H5L/h5lcopy_f -! -! NAME -! h5lcopy_f -! -! PURPOSE -! Copies a link from one location to another. -! -! INPUTS -! src_loc_id - Location identifier of the source link -! src_name - Name of the link to be copied -! dest_loc_id - Location identifier specifying the destination of the copy -! dest_name - Name to be assigned to the NEW copy -! loc_id - Identifier of the file or group containing the object -! name - Name of the link to delete -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier -! lapl_id - Link access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! February 27, 2008 -! -! SOURCE +!> +!! \ingroup FH5L +!! +!! \brief Copies a link from one location to another. +!! +!! \param src_loc_id Location identifier. The identifier may be that of a file, group, dataset, or named datatype. +!! \param src_name Name of the link to be copied. +!! \param dest_loc_id Location identifier. The identifier may be that of a file, group, dataset, or named datatype. +!! \param dest_name Name to be assigned to the new copy. +!! \param hdferr \fortran_error +!! \param lcpl_id Link creation property list identifier. +!! \param lapl_id Link access property list identifier. +!! SUBROUTINE h5lcopy_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, & lcpl_id, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_loc_id ! Location identifier of the source link - CHARACTER(LEN=*), INTENT(IN) :: src_name ! Name of the link to be copied - INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Location identifier specifying the destination of the copy - CHARACTER(LEN=*), INTENT(IN) :: dest_name ! Name to be assigned to the NEW copy - - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** + INTEGER(HID_T), INTENT(IN) :: src_loc_id + CHARACTER(LEN=*), INTENT(IN) :: src_name + INTEGER(HID_T), INTENT(IN) :: dest_loc_id + CHARACTER(LEN=*), INTENT(IN) :: dest_name + + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id INTEGER(HID_T) :: lcpl_id_default INTEGER(HID_T) :: lapl_id_default @@ -150,37 +129,22 @@ CONTAINS END SUBROUTINE h5lcopy_f -! -!****s* H5L/h5ldelete_f -! -! NAME -! h5ldelete_f -! -! PURPOSE -! Removes a link from a group. -! -! INPUTS -! loc_id - Identifier of the file or group containing the object -! name - Name of the link to delete -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list identifier -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! SOURCE +!> +!! \ingroup FH5L +!! +!! \brief Removes a link from a group. +!! +!! \param loc_id Identifier of the file or group containing the object. +!! \param name Name of the link to delete. +!! \param hdferr \fortran_error +!! \param lapl_id Link access property list identifier. +!! SUBROUTINE h5ldelete_f(loc_id, name, hdferr, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier of the file or group containing the object - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the link to delete - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: namelen @@ -205,41 +169,26 @@ CONTAINS END SUBROUTINE h5ldelete_f -! -!****s* H5L/H5Lcreate_soft_f -! -! NAME -! H5Lcreate_soft_f -! -! PURPOSE -! Creates a soft link to an object. -! -! INPUTS -! target_path - Path to the target object, which is not required to exist. -! link_loc_id - The file or group identifier for the new link. -! link_name - The name of the new link. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier. -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 20, 2008 -! -! SOURCE +!> +!! \ingroup FH5L +!! +!! \brief Creates a soft link to an object. +!! +!! \param target_path Path to the target object, which is not required to exist. +!! \param link_loc_id The file or group identifier for the new link. +!! \param link_name The name of the new link. +!! \param hdferr \fortran_error +!! \param lcpl_id Link creation property list identifier. +!! \param lapl_id Link access property list identifier. +!! SUBROUTINE h5lcreate_soft_f(target_path, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: target_path ! Path to the target object, which is not required to exist. - INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. - CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. -!***** + CHARACTER(LEN=*), INTENT(IN) :: target_path + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(LEN=*), INTENT(IN) :: link_name + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id INTEGER(HID_T) :: lcpl_id_default INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: target_path_len @@ -278,46 +227,30 @@ CONTAINS END SUBROUTINE h5lcreate_soft_f -! -!****s* H5L/H5Lcreate_hard_f -! -! NAME -! H5Lcreate_hard_f -! -! PURPOSE -! Creates a hard link to an object. -! -! INPUTS -! -! obj_loc_id - The file or group identifier for the target object. -! obj_name - Name of the target object, which must already exist. -! link_loc_id - The file or group identifier for the new link. -! link_name - The name of the new link. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier. -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 27, 2008 -! -! SOURCE +!> +!! \ingroup FH5L +!! +!! \brief Creates a hard link to an object. +!! +!! \param obj_loc_id The file or group identifier for the target object. +!! \param obj_name Name of the target object, which must already exist. +!! \param link_loc_id The file or group identifier for the new link. +!! \param link_name The name of the new link. +!! \param hdferr \fortran_error +!! \param lcpl_id Link creation property list identifier. +!! \param lapl_id Link access property list identifier. +!! SUBROUTINE h5lcreate_hard_f(obj_loc_id, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_loc_id ! The file or group identifier for the target object. - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of the target object, which must already exist. - INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. - CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. + INTEGER(HID_T), INTENT(IN) :: obj_loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(LEN=*), INTENT(IN) :: link_name - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure + INTEGER, INTENT(OUT) :: hdferr - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. -!***** + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id INTEGER(HID_T) :: lcpl_id_default INTEGER(HID_T) :: lapl_id_default @@ -353,48 +286,32 @@ CONTAINS END SUBROUTINE h5lcreate_hard_f -! -!****s* H5L/H5Lcreate_external_f -! -! NAME -! H5Lcreate_external_f -! -! PURPOSE -! Creates a soft link to an object in a different file. -! -! INPUTS -! -! file_name - Name of the file containing the target object. Neither the file nor the target object is -! required to exist. May be the file the link is being created in. -! obj_name - Path within the target file to the target object. -! link_loc_id - The file or group identifier for the new link. -! link_name - The name of the new link. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier. -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 27, 2008 -! SOURCE +!> +!! \ingroup FH5L +!! +!! \brief Creates a soft link to an object in a different file. +!! +!! \param file_name Name of the file containing the target object. Neither the file nor the target object is +!! required to exist. May be the file the link is being created in. +!! \param obj_name Path within the target file to the target object. +!! \param link_loc_id The file or group identifier for the new link. +!! \param link_name The name of the new link. +!! \param hdferr \fortran_error +!! \param lcpl_id Link creation property list identifier. +!! \param lapl_id Link access property list identifier. +!! SUBROUTINE h5lcreate_external_f(file_name, obj_name, link_loc_id, link_name, hdferr, lcpl_id, lapl_id) IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: file_name ! Name of the file containing the target object. Neither - ! the file nor the target object is required to exist. - ! May be the file the link is being created in. - CHARACTER(LEN=*), INTENT(IN) :: obj_name ! Name of the target object, which must already exist. - INTEGER(HID_T), INTENT(IN) :: link_loc_id ! The file or group identifier for the new link. - CHARACTER(LEN=*), INTENT(IN) :: link_name ! The name of the new link. - - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier. -!***** + CHARACTER(LEN=*), INTENT(IN) :: file_name + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(LEN=*), INTENT(IN) :: link_name + + INTEGER, INTENT(OUT) :: hdferr + + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id + INTEGER(HID_T) :: lcpl_id_default INTEGER(HID_T) :: lapl_id_default @@ -433,61 +350,37 @@ CONTAINS END SUBROUTINE h5lcreate_external_f -! -!****s* H5L/h5ldelete_by_idx_f -! -! NAME -! h5ldelete_by_idx_f -! -! PURPOSE -! Removes the nth link in a group. -! INPUTS -! loc_id - File or group identifier specifying location of subject group -! group_name - Name of subject group -! index_field - Type of index; Possible values are: -! H5_INDEX_UNKNOWN_F = -1 - Unknown index type -! H5_INDEX_NAME_F - Index on names -! H5_INDEX_CRT_ORDER_F - Index on creation order -! H5_INDEX_N_F - Number of indices defined -! -! order - Order within field or index; Possible values are: -! H5_ITER_UNKNOWN_F - Unknown order -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - No particular order, whatever is fastest -! H5_ITER_N_F - Number of iteration orders -! -! n - Link for which to retrieve information -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! SOURCE +!> +!! \ingroup FH5L +!! +!! \brief Removes the nth link in a group. +!! +!! \param loc_id File or group identifier specifying location of subject group. +!! \param group_name Name of subject group. +!! \param index_field Type of index; Possible values are: +!! \li H5_INDEX_UNKNOWN_F = -1 - Unknown index type +!! \li H5_INDEX_NAME_F - Index on names +!! \li H5_INDEX_CRT_ORDER_F - Index on creation order +!! \li H5_INDEX_N_F - Number of indices defined +!! \param order Order within field or index; Possible values are: +!! \li H5_ITER_UNKNOWN_F - Unknown order +!! \li H5_ITER_INC_F - Increasing order +!! \li H5_ITER_DEC_F - Decreasing order +!! \li H5_ITER_NATIVE_F - No particular order, whatever is fastest +!! \li H5_ITER_N_F - Number of iteration orders +!! \param n Link for which to retrieve information. +!! \param hdferr \fortran_error +!! \param lapl_id Link access property list. +!! SUBROUTINE h5ldelete_by_idx_f(loc_id, group_name, index_field, order, n, hdferr, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier for object to which attribute is attached - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of object, relative to location, - ! from which attribute is to be removed - INTEGER, INTENT(IN) :: index_field ! Type of index; Possible values are: - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - ! H5_ITER_N_F - Number of iteration orders - INTEGER(HSIZE_T), INTENT(IN) :: n ! Offset within index - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER, INTENT(IN) :: index_field + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: group_namelen @@ -515,40 +408,24 @@ CONTAINS END SUBROUTINE h5ldelete_by_idx_f -! -!****s* H5L/H5Lexists_f -! -! NAME -! H5Lexists_f -! -! PURPOSE -! Check if a link with a particular name exists in a group. -! -! INPUTS -! loc_id - Identifier of the file or group to query. -! name - Link name to check -! -! OUTPUTS -! link_exists - link exists status (.TRUE.,.FALSE.) -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! -! SOURCE +!> +!! \ingroup FH5L +!! +!! \brief Check if a link with a particular name exists in a group. +!! +!! \param loc_id Identifier of the file or group to query. +!! \param name Link name to check. +!! \param link_exists Link exists status (.TRUE.,.FALSE.). +!! \param hdferr \fortran_error +!! \param lapl_id Link access property list identifier. +!! SUBROUTINE h5lexists_f(loc_id, name, link_exists, hdferr, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifier of the file or group to query. - CHARACTER(LEN=*), INTENT(IN) :: name ! Link name to check. - LOGICAL, INTENT(OUT) :: link_exists ! .TRUE. if exists, .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + LOGICAL, INTENT(OUT) :: link_exists + INTEGER, INTENT(OUT) :: hdferr INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id - ! Link access property list identifier. -!***** INTEGER :: link_exists_c INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: namelen @@ -580,74 +457,44 @@ CONTAINS END SUBROUTINE h5lexists_f -! -!****s* H5L/h5lget_info_f -! -! NAME -! h5lget_info_f -! -! PURPOSE -! Returns information about a link. -! -! INPUTS -! link_loc_id - File or group identifier. -! link_name - Name of the link for which information is being sought -! -! OUTPUTS -! NOTE: In C these are contained in the structure H5L_info_t -! -! cset - indicates the character set used for link’s name. -! corder - specifies the link’s creation order position. -! corder_valid - indicates whether the value in corder is valid. -! link_type - specifies the link class: -! H5L_TYPE_HARD_F - Hard link -! H5L_TYPE_SOFT_F - Soft link -! H5L_TYPE_EXTERNAL_F - External link -! H5L_TYPE_ERROR_ F - Error -! token - If the link is a hard link, token specifies the object token that the link points to -! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., -! the length of the name of the pointed-to object with a null terminator. -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! -! HISTORY -! Changed the link_type names to match those in C (bug 1720) from, -! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F -! to -! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F -! MSB January 8, 2010. -! -! SOURCE +!> +!! \ingroup FH5L +!! +!! \brief Returns information about a link. +!! +!! \param link_loc_id File or group identifier. +!! \param link_name Name of the link for which information is being sought. +!! NOTE: In C these are contained in the structure H5L_info_t +!! \param cset Indicates the character set used for link’s name. +!! \param corder Specifies the link’s creation order position. +!! \param f_corder_valid Indicates whether the value in corder is valid. +!! \param link_type Specifies the link class: +!! \li H5L_TYPE_HARD_F - Hard link +!! \li H5L_TYPE_SOFT_F - Soft link +!! \li H5L_TYPE_EXTERNAL_F - External link +!! \li H5L_TYPE_ERROR_ F - Error +!! \param token If the link is a hard link, token specifies the object token that the link points to. +!! \param val_size If the link is a symbolic link, val_size will be the length of the link value, e.g., +!! the length of the name of the pointed-to object with a null terminator. +!! \param hdferr \fortran_error +!! \param lapl_id Link access property list. +!! SUBROUTINE h5lget_info_f(link_loc_id, link_name, & cset, corder, f_corder_valid, link_type, token, val_size, & hdferr, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. - CHARACTER(LEN=*), INTENT(IN) :: link_name ! Name of the link for which information is being sought - -! OUTPUTS NOTE: In C these are contained in the structure H5L_info_t - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the link’s name. - INTEGER, INTENT(OUT) :: corder ! Specifies the link’s creation order position. - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the value in corder is valid. - INTEGER, INTENT(OUT) :: link_type ! Specifies the link class: - ! H5L_TYPE_HARD_F - Hard link - ! H5L_TYPE_SOFT_F - Soft link - ! H5L_TYPE_EXTERNAL_F - External link - ! H5L_TYPE_ERROR _F - Error - TYPE(H5O_TOKEN_T_F), INTENT(OUT), TARGET :: token ! If the link is a hard link, token specifies the object token that the link points to - INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., - ! the length of the name of the pointed-to object with a null terminator. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(LEN=*), INTENT(IN) :: link_name + + INTEGER, INTENT(OUT) :: cset + INTEGER, INTENT(OUT) :: corder + LOGICAL, INTENT(OUT) :: f_corder_valid + INTEGER, INTENT(OUT) :: link_type + TYPE(H5O_TOKEN_T_F), INTENT(OUT), TARGET :: token + INTEGER(SIZE_T), INTENT(OUT) :: val_size + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id INTEGER(SIZE_T) :: link_namelen INTEGER(HID_T) :: lapl_id_default INTEGER :: corder_valid @@ -685,78 +532,57 @@ CONTAINS END SUBROUTINE h5lget_info_f -! -!****s* H5L/h5lget_info_by_idx_f -! -! NAME -! h5lget_info_by_idx_f -! -! PURPOSE -! Retrieves metadata for a link in a group, according to the order within a field or index. -! -! INPUTS -! loc_id - File or group identifier specifying location of subject group -! group_name - Name of subject group -! index_field - Index or field which determines the order -! order - Order within field or index -! n - Link for which to retrieve information -! -! OUTPUTS -! NOTE: In C these are defined as a structure: H5L_info_t -! corder_valid - Indicates whether the creation order data is valid for this attribute -! corder - Is a positive integer containing the creation order of the attribute -! cset - Indicates the character set used for the attribute’s name -! token - If the link is a hard link, token specifies the object token that the link points to -! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g., -! the length of the name of the pointed-to object with a null terminator. -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! -! HISTORY -! Changed the link_type names to match those in C (bug 1720) from, -! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F -! to -! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F -! MSB January 8, 2010. -! -! SOURCE +!> +!! \ingroup FH5L +!! +!! \brief Retrieves metadata for a link in a group, according to the order within a field or index. +!! +!! \param loc_id File or group identifier specifying location of subject group. +!! \param group_name Name of subject group. +!! \param index_field Index or field which determines the order: +!! \li H5_INDEX_UNKNOWN_F = -1 - Unknown index type +!! \li H5_INDEX_NAME_F - Index on names +!! \li H5_INDEX_CRT_ORDER_F - Index on creation order +!! \li H5_INDEX_N_F - Number of indices defined +!! \param order Order within field or index: +!! \li H5_ITER_UNKNOWN_F - Unknown order +!! \li H5_ITER_INC_F - Increasing order +!! \li H5_ITER_DEC_F - Decreasing order +!! \li H5_ITER_NATIVE_F - No particular order, whatever is fastest +!! \li H5_ITER_N_F - Number of iteration orders +!! \param n Link for which to retrieve information. +!! NOTE: In C these are defined as a structure: H5L_info_t +!! \param link_type Specifies the link class: +!! \li H5L_TYPE_HARD_F - Hard link +!! \li H5L_TYPE_SOFT_F - Soft link +!! \li H5L_TYPE_EXTERNAL_F - External link +!! \li H5L_TYPE_ERROR _F - Error +!! \param f_corder_valid Indicates whether the creation order data is valid for this attribute. +!! \param corder Is a positive integer containing the creation order of the attribute. +!! \param cset Indicates the character set used for the attribute’s name. +!! \param token If the link is a hard link, token specifies the object token that the link points to. +!! \param val_size If the link is a symbolic link, val_size will be the length of the link value, e.g., +!! the length of the name of the pointed-to object with a null terminator. +!! \param hdferr \fortran_error +!! +!! \param lapl_id Link access property list. +!! SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, & link_type, f_corder_valid, corder, cset, token, val_size, hdferr, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group - INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - INTEGER, INTENT(OUT) :: link_type ! Specifies the link class: - ! H5L_TYPE_HARD_F - Hard link - ! H5L_TYPE_SOFT_F - Soft link - ! H5L_TYPE_EXTERNAL_F - External link - ! H5L_TYPE_ERROR _F - Error - LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute - INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute - INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name - TYPE(H5O_TOKEN_T_F), INTENT(OUT), TARGET :: token ! If the link is a hard link, token specifies the object token that the link points to - INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g., - ! the length of the name of the pointed-to object with a null terminator. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER, INTENT(IN) :: index_field + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER, INTENT(OUT) :: link_type + LOGICAL, INTENT(OUT) :: f_corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + TYPE(H5O_TOKEN_T_F), INTENT(OUT), TARGET :: token + INTEGER(SIZE_T), INTENT(OUT) :: val_size + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id INTEGER :: corder_valid INTEGER(SIZE_T) :: group_namelen INTEGER(HID_T) :: lapl_id_default @@ -799,42 +625,24 @@ CONTAINS END SUBROUTINE h5lget_info_by_idx_f -! -!****s* H5L/h5lis_registered_f -! -! NAME -! h5lis_registered_f -! -! PURPOSE -! Determines whether a class of user-defined links is registered. -! -! INPUTS -! link_cls_id - User-defined link class identifier -! -! OUTPUTS -! registered - .TRUE. - if the link class has been registered -! .FALSE. - if it is unregistered -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 29, 2008 -! -! SOURCE +!> +!! \ingroup FH5L +!! +!! \brief Determines whether a class of user-defined links is registered. +!! +!! \param link_cls_id User-defined link class identifier. +!! \param registered .TRUE. if the link class has been registered. +!! \param hdferr \fortran_error +!! SUBROUTINE h5lis_registered_f(link_cls_id, registered, hdferr) IMPLICIT NONE - INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier - LOGICAL, INTENT(OUT) :: registered ! .TRUE. - if the link class has been registered and - ! .FALSE. - if it is unregistered - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** + INTEGER, INTENT(IN) :: link_cls_id + LOGICAL, INTENT(OUT) :: registered + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5lis_registered_c(link_cls_id) BIND(C,NAME='h5lis_registered_c') IMPLICIT NONE - INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier + INTEGER, INTENT(IN) :: link_cls_id END FUNCTION h5lis_registered_c END INTERFACE @@ -848,47 +656,28 @@ CONTAINS END SUBROUTINE h5lis_registered_f -! -!****s* H5L/h5lmove_f -! -! NAME -! h5lmove_f -! -! PURPOSE -! Renames a link within an HDF5 file. -! -! INPUTS -! src_loc_id - Original file or group identifier. -! src_name - Original link name. -! dest_loc_id - Destination file or group identifier. -! dest_name - NEW link name. -! -! OUTPUTS -! hdferr - Error code: -! 0 on success and -1 on failure -! -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list identifier to be associated WITH the NEW link. -! lapl_id - Link access property list identifier to be associated WITH the NEW link. -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! SOURCE +!> +!! \ingroup FH5L +!! +!! \brief Renames a link within an HDF5 file. +!! +!! \param src_loc_id Original file or group identifier. +!! \param src_name Original link name. +!! \param dest_loc_id Destination file or group identifier. +!! \param dest_name NEW link name. +!! \param hdferr \fortran_error +!! \param lcpl_id Link creation property list identifier to be associated WITH the NEW link. +!! \param lapl_id Link access property list identifier to be associated WITH the NEW link. +!! SUBROUTINE h5lmove_f(src_loc_id, src_name, dest_loc_id, dest_name, hdferr, lcpl_id, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_loc_id ! Original file or group identifier. - CHARACTER(LEN=*), INTENT(IN) :: src_name ! Original link name. - INTEGER(HID_T), INTENT(IN) :: dest_loc_id ! Destination file or group identifier. - CHARACTER(LEN=*), INTENT(IN) :: dest_name ! NEW link name. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list identifier - ! to be associated WITH the NEW link. - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list identifier - ! to be associated WITH the NEW link. -!***** + INTEGER(HID_T), INTENT(IN) :: src_loc_id + CHARACTER(LEN=*), INTENT(IN) :: src_name + INTEGER(HID_T), INTENT(IN) :: dest_loc_id + CHARACTER(LEN=*), INTENT(IN) :: dest_name + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id INTEGER(SIZE_T) :: src_namelen INTEGER(SIZE_T) :: dest_namelen @@ -928,59 +717,44 @@ CONTAINS END SUBROUTINE h5lmove_f -! -!****s* H5L/h5lget_name_by_idx_f -! -! NAME -! h5lget_name_by_idx_f -! -! PURPOSE -! Retrieves name of the nth link in a group, according to the order within a specified field or index. -! -! INPUTS -! loc_id - File or group identifier specifying location of subject group -! group_name - Name of subject group -! index_field - Index or field which determines the order -! order - Order within field or index -! n - Link for which to retrieve information -! -! OUTPUTS -! name - Buffer in which link value is returned -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! lapl_id - List access property list identifier. -! size - Maximum number of characters of link value to be returned. -! -! AUTHOR -! M. Scot Breitenfeld -! March 10, 2008 -! -! SOURCE +!> +!! \ingroup FH5L +!! +!! \brief Retrieves name of the nth link in a group, according to the order within a specified field or index. +!! +!! \param loc_id File or group identifier specifying location of subject group. +!! \param group_name Name of subject group. +!! \param index_field Index or field which determines the order: +!! \li H5_INDEX_UNKNOWN_F = -1 - Unknown index type +!! \li H5_INDEX_NAME_F - Index on names +!! \li H5_INDEX_CRT_ORDER_F - Index on creation order +!! \li H5_INDEX_N_F - Number of indices defined +!! \param order Order within field or index: +!! \li H5_ITER_UNKNOWN_F - Unknown order +!! \li H5_ITER_INC_F - Increasing order +!! \li H5_ITER_DEC_F - Decreasing order +!! \li H5_ITER_NATIVE_F - No particular order, whatever is fastest +!! \li H5_ITER_N_F - Number of iteration orders +!! \param n Link for which to retrieve information. +!! \param name Buffer in which link value is returned. +!! \param hdferr \fortran_error +!! \param lapl_id List access property list identifier. +!! \param size Maximum number of characters of link value to be returned. +!! SUBROUTINE h5lget_name_by_idx_f(loc_id, group_name, index_field, order, n, & name, hdferr, size, lapl_id) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group - CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group - INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order - ! H5_INDEX_UNKNOWN_F - Unknown index type - ! H5_INDEX_NAME_F - Index on names - ! H5_INDEX_CRT_ORDER_F - Index on creation order - ! H5_INDEX_N_F - Number of indices defined - INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: - ! H5_ITER_UNKNOWN_F - Unknown order - ! H5_ITER_INC_F - Increasing order - ! H5_ITER_DEC_F - Decreasing order - ! H5_ITER_NATIVE_F - No particular order, whatever is fastest - INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer in which link value is returned - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER, INTENT(IN) :: index_field + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER, INTENT(OUT) :: hdferr INTEGER(SIZE_T) :: group_namelen - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size ! Indicates the size, in the number of characters, of the link + INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size INTEGER(SIZE_T) :: size_default INTERFACE @@ -1020,90 +794,23 @@ CONTAINS ! HAS PROBLEM WITH void pointer in C !!$! -!!$!****s* H5L/ -!!$! -!!$! NAME -!!$! h5lget_val_by_idx_f -!!$! -!!$! PURPOSE -!!$! Returns the link value of a link, according to the order of -!!$! an index. For symbolic links, this is the path to which the -!!$! link points, including the null terminator. For user-defined -!!$! links, it is the link buffer. -!!$! INPUTS -!!$! loc_id - File or group identifier specifying location of subject group -!!$! group_name - Name of subject group -!!$! index_field - Index or field which determines the order -!!$! order - Order within field or index -!!$! n - Link for which to retrieve information -!!$! size - Maximum number of characters of link value to be returned. -!!$! -!!$! OUTPUTS NOTE: In C these are defined as a structure: H5L_info_t -!!$! corder_valid - indicates whether the creation order data is valid for this attribute -!!$! corder - is a positive integer containing the creation order of the attribute -!!$! cset - indicates the character set used for the attribute’s name -!!$! data_size - indicates the size, in the number of characters, of the attribute -!!$! hdferr - error code -!!$! Success: 0 -!!$! Failure: -1 -!!$! OPTIONAL PARAMETERS -!!$! lapl_id - List access property list identifier. -!!$! -!!$! AUTHOR -!!$! M. Scot Breitenfeld -!!$! March 3, 2008 -!!$! -!!$! HISTORY N/A -!!$! -!!$! -!!$! SOURCE +!> !!$ SUBROUTINE h5lget_val_by_idx_f(loc_id, group_name, index_field, order, n, & !!$ f_corder_valid, corder, cset, data_size, hdferr, lapl_id) !!$ IMPLICIT NONE -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier specifying location of subject group -!!$ CHARACTER(LEN=*), INTENT(IN) :: group_name ! Name of subject group -!!$ INTEGER, INTENT(IN) :: index_field ! Index or field which determines the order -!!$ ! H5_INDEX_UNKNOWN_F - Unknown index type -!!$ ! H5_INDEX_NAME_F - Index on names -!!$ ! H5_INDEX_CRT_ORDER_F - Index on creation order -!!$ ! H5_INDEX_N_F - Number of indices defined -!!$ INTEGER, INTENT(IN) :: order ! Order in which to iterate over index; Possible values are: -!!$ ! H5_ITER_UNKNOWN_F - Unknown order -!!$ ! H5_ITER_INC_F - Increasing order -!!$ ! H5_ITER_DEC_F - Decreasing order + +!!$ ! H5_INDEX_N_F - Number of indices defined + !!$ ! H5_ITER_NATIVE_F - No particular order, whatever is fastest -!!$ INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index -!!$ LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute -!!$ INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute -!!$ INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name -!!$ INTEGER(HSIZE_T), INTENT(OUT) :: data_size ! Indicates the size, in the number of characters, of the attribute -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! 0 on success and -1 on failure -!!$ INTEGER :: corder_valid -!!$ INTEGER(SIZE_T) :: group_namelen -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ -!!$ INTERFACE + + !!$ INTEGER FUNCTION h5lget_val_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & !!$ corder_valid, corder, cset, data_size, lapl_id_default) !!$ USE H5GLOBAL !!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) !!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_VAL_BY_IDX_C'::h5lget_val_by_idx_c !!$ !DEC$ENDIF -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name -!!$ INTEGER(SIZE_T) :: group_namelen -!!$ INTEGER, INTENT(IN) :: index_field -!!$ INTEGER, INTENT(IN) :: order -!!$ INTEGER(HSIZE_T), INTENT(IN) :: n -!!$ INTEGER :: corder_valid -!!$ INTEGER, INTENT(OUT) :: corder -!!$ INTEGER, INTENT(OUT) :: cset -!!$ INTEGER(HSIZE_T), INTENT(OUT) :: data_size -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ END FUNCTION h5lget_val_by_idx_c -!!$ END INTERFACE + !!$ !!$ group_namelen = LEN(group_name) !!$ @@ -1119,45 +826,11 @@ CONTAINS !!$ END SUBROUTINE h5lget_val_by_idx_f !!$! -!!$!****s* H5L/h5lget_val_f -!!$! -!!$! NAME -!!$! h5lget_val_f -!!$! -!!$! PURPOSE -!!$! Returns the value of a symbolic link. -!!$! -!!$! INPUTS -!!$! link_loc_id - File or group identifier. -!!$! link_name - Link whose value is to be returned. -!!$! size - Maximum number of characters of link value to be returned. -!!$! -!!$! OUTPUTS -!!$! linkval_buff - The buffer to hold the returned link value. -!!$! hdferr - error code -!!$! Success: 0 -!!$! Failure: -1 -!!$! OPTIONAL PARAMETERS -!!$! lapl_id - List access property list identifier. -!!$! -!!$! AUTHOR -!!$! M. Scot Breitenfeld -!!$! March 3, 2008 -!!$! SOURCE +!> !!$ SUBROUTINE h5lget_val_f(link_loc_id, link_name, size, linkval_buff, & !!$ hdferr, lapl_id) !!$ IMPLICIT NONE -!!$ INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. -!!$ CHARACTER(LEN=*), INTENT(IN) :: link_name ! Link whose value is to be returned. -!!$ INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of characters of link value to be returned. -!!$ -!!$ CHARACTER(LEN=size), INTENT(OUT) :: linkval_buff ! The buffer to hold the returned link value. -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! 0 on success and -1 on failure -!!$ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!!$ -!!$ INTEGER :: link_namelen -!!$ INTEGER(HID_T) :: lapl_id_default + !!$ INTEGER :: corder_valid !!$ !!$ INTEGER :: link_namelen @@ -1172,15 +845,7 @@ CONTAINS !!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) !!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_VAL_C'::h5lget_val_c !!$ !DEC$ENDIF -!!$ INTEGER(HID_T), INTENT(IN) :: link_loc_id ! File or group identifier. -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name ! Link whose value is to be returned. -!!$ INTEGER :: link_namelen -!!$ INTEGER(SIZE_T), INTENT(IN) :: size ! Maximum number of characters of link value to be returned. -!!$ -!!$ CHARACTER(LEN=size), INTENT(OUT) :: linkval_buff ! The buffer to hold the returned link value. -!!$ -!!$ INTEGER :: link_namelen -!!$ INTEGER(HID_T) :: lapl_id_default + !!$ !!$ END FUNCTION h5lget_val_c !!$ END INTERFACE @@ -1196,56 +861,11 @@ CONTAINS !!$ END SUBROUTINE h5lget_val_f !!$! -!!$!****s* H5L/H5Lregistered_f -!!$! -!!$! NAME -!!$! H5Lregistered_f -!!$! -!!$! PURPOSE -!!$! Registers user-defined link class or changes behavior of existing class. -!!$! -!!$! INPUTS NOTE: In C the following represents struct H5L_class_t: -!!$! version - Version number of this struct -!!$! class_id - Link class identifier -!!$! comment - Comment for debugging -!!$! create_func - Callback during link creation -!!$! move_func - Callback after moving link -!!$! copy_func - Callback after copying link -!!$! trav_func - The main traversal function -!!$! del_func - Callback for link deletion -!!$! query_func - Callback for queries -!!$! -!!$! OUTPUTS -!!$! hdferr - Error code -!!$! Success: 0 -!!$! Failure: -1 -!!$! OPTIONAL PARAMETERS -!!$! None -!!$! -!!$! AUTHOR -!!$! M. Scot Breitenfeld -!!$! February 29, 2008 -!!$! -!!$! HISTORY N/A -!!$! -!!$! -!!$! SOURCE +!> !!$ SUBROUTINE H5Lregistered_f(version, class_id, comment, create_func, & !!$ move_func, copy_func, trav_func, del_func, query_func, hdferr) !!$ IMPLICIT NONE -!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct -!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier -!!$ CHARACTER(LEN=*), INTENT(IN) :: comment ! Comment for debugging -!!$ CHARACTER(LEN=*), INTENT(IN) :: create_func ! Callback during link creation -!!$ CHARACTER(LEN=*), INTENT(IN) :: move_func ! Callback after moving link -!!$ CHARACTER(LEN=*), INTENT(IN) :: copy_func ! Callback after copying link -!!$ CHARACTER(LEN=*), INTENT(IN) :: trav_func ! The main traversal function -!!$ CHARACTER(LEN=*), INTENT(IN) :: del_func ! Callback for link deletion -!!$ CHARACTER(LEN=*), INTENT(IN) :: query_func ! Callback for queries -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! 0 on success and -1 on failure -!!$ INTEGER :: comment_len -!!$ INTEGER :: create_func_len + !!$ INTEGER :: move_func_len !!$ INTEGER :: copy_func_len !!$ INTEGER :: trav_func_len @@ -1264,19 +884,7 @@ CONTAINS !!$ !DEC$IF DEFINED(HDF5F90_WINDOWS) !!$ !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LREGISTERED_C'::H5Lregistered_c !!$ !DEC$ENDIF -!!$ INTEGER, INTENT(IN) :: version ! Version number of this struct -!!$ INTEGER, INTENT(IN) :: class_id ! Link class identifier -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: comment ! Comment for debugging -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: create_func ! Callback during link creation -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: move_func ! Callback after moving link -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: copy_func ! Callback after copying link -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: trav_func ! The main traversal function -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: del_func ! Callback for link deletion -!!$ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: query_func ! Callback for queries -!!$ INTEGER, INTENT(OUT) :: hdferr ! Error code: -!!$ ! 0 on success and -1 on failure -!!$ INTEGER :: comment_len -!!$ INTEGER :: create_func_len + !!$ INTEGER :: move_func_len !!$ INTEGER :: copy_func_len !!$ INTEGER :: trav_func_len @@ -1304,44 +912,30 @@ CONTAINS !!$ !!$ END SUBROUTINE H5Lregistered_f -!****s* H5L (F03)/h5literate_f -! -! NAME -! h5literate_f -! -! PURPOSE -! Iterates through links in a group. -! -! Inputs: -! group_id - Identifier specifying subject group -! index_type - Type of index which determines the order: -! H5_INDEX_NAME_F - Alphanumeric index on name -! H5_INDEX_CRT_ORDER_F - Index on creation order -! order - Order within index: -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - Fastest available order -! idx - IN: Iteration position at which to start -! op - Callback function passing data regarding the link to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the link -! -! Outputs: -! idx - OUT: Position at which an interrupted iteration may be restarted -! return_value - Success: The return value of the first operator that -! returns non-zero, or zero if all members were -! processed with no operator returning non-zero. -! -! Failure: Negative if something goes wrong within the -! library, or the negative value returned by one -! of the operators. -! -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! July 8, 2008 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5L +!! +!! \brief Iterates through links in a group. +!! +!! \param group_id Identifier specifying subject group. +!! \param index_type Type of index which determines the order: +!! \li H5_INDEX_NAME_F - Alphanumeric index on name +!! \li H5_INDEX_CRT_ORDER_F - Index on creation order +!! \param order Order within index: +!! \li H5_ITER_INC_F - Increasing order +!! \li H5_ITER_DEC_F - Decreasing order +!! \li H5_ITER_NATIVE_F - Fastest available order +!! \param idx Iteration position at which to start. +!! \param op Callback function passing data regarding the link to the calling application. +!! \param op_data User-defined pointer to data required by the application for its processing of the link. +!! \param idx Position at which an interrupted iteration may be restarted. +!! \param return_value Return context: +!! \li Success: The return value of the first operator that +!! returns non-zero, or zero if all members were processed with no operator returning non-zero. +!! \li Failure: Negative if something goes wrong within the +!! library, or the negative value returned by one of the operators. +!! \param hdferr \fortran_error +!! SUBROUTINE h5literate_f(group_id, index_type, order, idx, op, op_data, return_value, hdferr) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR IMPLICIT NONE @@ -1353,7 +947,6 @@ CONTAINS TYPE(C_PTR) , INTENT(IN) :: op_data INTEGER , INTENT(OUT) :: return_value INTEGER , INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5literate_c(group_id, index_type, order, idx, op, op_data) & BIND(C, NAME='h5literate_c') @@ -1379,48 +972,31 @@ CONTAINS END SUBROUTINE h5literate_f -!****s* H5L (F03)/h5literate_by_name_f -! -! NAME -! h5literate_by_name_f -! -! PURPOSE -! Iterates through links in a group. -! -! Inputs: -! loc_id - File or group identifier specifying location of subject group -! group_name - Name of subject group -! index_type - Type of index which determines the order: -! H5_INDEX_NAME_F - Alphanumeric index on name -! H5_INDEX_CRT_ORDER_F - Index on creation order -! order - Order within index: -! H5_ITER_INC_F - Increasing order -! H5_ITER_DEC_F - Decreasing order -! H5_ITER_NATIVE_F - Fastest available order -! idx - IN: Iteration position at which to start -! op - Callback function passing data regarding the link to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the link -! -! Outputs: -! idx - OUT: Position at which an interrupted iteration may be restarted -! return_value - Success: The return value of the first operator that -! returns non-zero, or zero if all members were -! processed with no operator returning non-zero. -! -! Failure: Negative if something goes wrong within the -! library, or the negative value returned by one -! of the operators. -! -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! lapl_id - Link access property list -! -! AUTHOR -! M. Scot Breitenfeld -! August 18, 2008 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5L +!! +!! \brief Iterates through links in a group. +!! +!! \param loc_id File or group identifier specifying location of subject group. +!! \param group_name Name of subject group. +!! \param index_type Type of index which determines the order: +!! \li H5_INDEX_NAME_F - Alphanumeric index on name +!! \li H5_INDEX_CRT_ORDER_F - Index on creation order +!! \param order Order within index: +!! \li H5_ITER_INC_F - Increasing order +!! \li H5_ITER_DEC_F - Decreasing order +!! \li H5_ITER_NATIVE_F - Fastest available order +!! \param idx Position at which an interrupted iteration may be restarted. +!! \param op Callback function passing data regarding the link to the calling application. +!! \param op_data User-defined pointer to data required by the application for its processing of the link. +!! \param return_value Return context: +!! \li Success: The return value of the first operator that returns non-zero, or zero if +!! all members were processed with no operator returning non-zero. +!! \li Failure: Negative if something goes wrong within the +!! library, or the negative value returned by one of the operators. +!! \param hdferr \fortran_error +!! \param lapl_id Link access property list. +!! SUBROUTINE h5literate_by_name_f(loc_id, group_name, index_type, order, & idx, op, op_data, return_value, hdferr, lapl_id) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR @@ -1435,7 +1011,6 @@ CONTAINS INTEGER , INTENT(OUT) :: return_value INTEGER , INTENT(OUT) :: hdferr INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: namelen diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90 index b5261d9..2139271 100644 --- a/fortran/src/H5Off.F90 +++ b/fortran/src/H5Off.F90 @@ -1,14 +1,13 @@ -!****h* ROBODoc/H5O -! -! NAME -! MODULE H5O -! -! FILE -! fortran/src/H5Off.F90 -! -! PURPOSE -! This file contains Fortran interfaces for H5O functions. -! +!> @defgroup FH5O Fortran Object (H5O) Interface +!! +!! @see H5O, C-API +!! +!! @see @ref H5O_UG, User Guide +!! + +!> @ingroup FH5O +!! +!! @brief This module contains Fortran interfaces for H5O functions. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -36,7 +35,6 @@ ! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. ! This is needed for Windows based operating systems. ! -!***** MODULE H5O @@ -44,127 +42,115 @@ MODULE H5O USE H5GLOBAL IMPLICIT NONE -!****t* H5O (F03)/h5o_info_t -! -! Fortran2003 Derived Type: -! +!> @brief h5o_info_t derived type. The time values are an integer array as specified in the Fortran intrinsic DATE_AND_TIME(VALUES). TYPE, BIND(C) :: h5o_info_t - INTEGER(C_LONG) :: fileno ! File number that object is located in - TYPE(H5O_TOKEN_T_F) :: token ! Token for object in file - INTEGER(C_INT) :: type ! Basic object type (group, dataset, etc.) - INTEGER :: rc ! Reference count of object - - INTEGER, DIMENSION(8) :: atime ! Access time ! -- NOTE -- - INTEGER, DIMENSION(8) :: mtime ! Modification time ! Returns an integer array - INTEGER, DIMENSION(8) :: ctime ! Change time ! as specified in the Fortran - INTEGER, DIMENSION(8) :: btime ! Birth time ! intrinsic DATE_AND_TIME(VALUES) - - INTEGER(hsize_t) :: num_attrs ! # of attributes attached to object + INTEGER(C_LONG) :: fileno !< File number that object is located in + TYPE(H5O_TOKEN_T_F) :: token !< Token for object in file + INTEGER(C_INT) :: type !< Basic object type (group, dataset, etc.) + INTEGER :: rc !< Reference count of object + ! -- NOTE -- + ! Returns an integer array + ! as specified in the Fortran + ! intrinsic DATE_AND_TIME(VALUES) + INTEGER, DIMENSION(8) :: atime !< Access time + INTEGER, DIMENSION(8) :: mtime !< Modification time + INTEGER, DIMENSION(8) :: ctime !< Change time + INTEGER, DIMENSION(8) :: btime !< Birth time + + INTEGER(hsize_t) :: num_attrs !< Number of attributes attached to object END TYPE h5o_info_t -! C interoperable structure for h5o_info_t. The Fortran derived type returns the time -! values as an integer array as specified in the Fortran intrinsic DATE_AND_TIME(VALUES). -! Whereas, this derived type does not. +!> @brief C interoperable structure for h5o_info_t. The Fortran derived type returns the time +!! values as an integer array as specified in the Fortran intrinsic DATE_AND_TIME(VALUES). +!! Whereas, this derived type does not. TYPE, BIND(C) :: c_h5o_info_t - INTEGER(C_LONG) :: fileno ! File number that object is located in - TYPE(H5O_TOKEN_T_F) :: token ! Token for object in file - INTEGER(C_INT) :: type ! Basic object type (group, dataset, etc.) - INTEGER(C_INT) :: rc ! Reference count of object + INTEGER(C_LONG) :: fileno !< File number that object is located in + TYPE(H5O_TOKEN_T_F) :: token !< Token for object in file + INTEGER(C_INT) :: type !< Basic object type (group, dataset, etc.) + INTEGER(C_INT) :: rc !< Reference count of object - INTEGER(KIND=TIME_T) :: atime ! Access time - INTEGER(KIND=TIME_T) :: mtime ! Modify time - INTEGER(KIND=TIME_T) :: ctime ! Create time - INTEGER(KIND=TIME_T) :: btime ! Birth time + INTEGER(KIND=TIME_T) :: atime !< Access time + INTEGER(KIND=TIME_T) :: mtime !< Modify time + INTEGER(KIND=TIME_T) :: ctime !< Create time + INTEGER(KIND=TIME_T) :: btime !< Birth time - INTEGER(hsize_t) :: num_attrs ! # of attributes attached to object + INTEGER(hsize_t) :: num_attrs !< Number of attributes attached to object END TYPE c_h5o_info_t -!****t* H5O (F03)/h5o_native_info_t -! -! Fortran2003 Derived Type: -! +!> @brief space_t derived type TYPE, BIND(C) :: space_t - INTEGER(hsize_t) :: total ! Total space for storing object header in file - INTEGER(hsize_t) :: meta ! Space within header for object header metadata information - INTEGER(hsize_t) :: mesg ! Space within header for actual message information - INTEGER(hsize_t) :: free ! Free space within object header + INTEGER(hsize_t) :: total !< Total space for storing object header in file + INTEGER(hsize_t) :: meta !< Space within header for object header metadata information + INTEGER(hsize_t) :: mesg !< Space within header for actual message information + INTEGER(hsize_t) :: free !< Free space within object header END TYPE space_t +!> @brief mesg_t derived type TYPE, BIND(C) :: mesg_t - INTEGER(c_int64_t) :: present ! Flags to indicate presence of message type in header - INTEGER(c_int64_t) :: shared ! Flags to indicate message type is shared in header + INTEGER(c_int64_t) :: present !< Flags to indicate presence of message type in header + INTEGER(c_int64_t) :: shared !< Flags to indicate message type is shared in header END TYPE mesg_t +!> @brief hdr_t derived type TYPE, BIND(C) :: hdr_t - INTEGER :: version ! Version number of header format in file - INTEGER :: nmesgs ! Number of object header messages - INTEGER :: nchunks ! Number of object header chunks - INTEGER :: flags ! Object header status flags + INTEGER :: version !< Version number of header format in file + INTEGER :: nmesgs !< Number of object header messages + INTEGER :: nchunks !< Number of object header chunks + INTEGER :: flags !< Object header status flags TYPE(space_t) :: space TYPE(mesg_t) :: mesg END TYPE hdr_t +!> @brief c_hdr_t derived type TYPE, BIND(C) :: c_hdr_t - INTEGER(C_INT) :: version ! Version number of header format in file - INTEGER(C_INT) :: nmesgs ! Number of object header messages - INTEGER(C_INT) :: nchunks ! Number of object header chunks - INTEGER(C_INT) :: flags ! Object header status flags + INTEGER(C_INT) :: version !< Version number of header format in file + INTEGER(C_INT) :: nmesgs !< Number of object header messages + INTEGER(C_INT) :: nchunks !< Number of object header chunks + INTEGER(C_INT) :: flags !< Object header status flags TYPE(space_t) :: space TYPE(mesg_t) :: mesg END TYPE c_hdr_t - ! Extra metadata storage for obj & attributes +!> @brief Extra metadata storage for obj & attributes TYPE, BIND(C) :: H5_ih_info_t - INTEGER(hsize_t) :: index_size ! btree and/or list - INTEGER(hsize_t) :: heap_size + INTEGER(hsize_t) :: index_size !< btree and/or list + INTEGER(hsize_t) :: heap_size !< heap END TYPE H5_ih_info_t +!> @brief meta_size_t derived type TYPE, BIND(C) :: meta_size_t - TYPE(H5_ih_info_t) :: obj ! v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets - TYPE(H5_ih_info_t) :: attr ! v2 B-tree & heap for attributes + TYPE(H5_ih_info_t) :: obj !< v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets + TYPE(H5_ih_info_t) :: attr !< v2 B-tree & heap for attributes ENDTYPE meta_size_t +!> @brief h5o_native_info_t derived type TYPE, BIND(C) :: h5o_native_info_t TYPE(hdr_t) :: hdr TYPE(meta_size_t) :: meta_size END TYPE h5o_native_info_t -! C interoperable structure for h5o_native_info_t. +! @brief C interoperable structure for h5o_native_info_t. TYPE, BIND(C) :: c_h5o_native_info_t TYPE(c_hdr_t) :: hdr TYPE(meta_size_t) :: meta_size END TYPE c_h5o_native_info_t -!***** CONTAINS -!****s* H5O/h5olink_f -! -! NAME -! h5olink_f -! -! PURPOSE -! Creates a hard link to an object in an HDF5 file. -! -! Inputs: -! object_id - Object to be linked. -! new_loc_id - File or group identifier specifying location at which object is to be linked. -! new_link_name - Name of link to be created, relative to new_loc_id. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lcpl_id - Link creation property list identifier. -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! April 21, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Creates a hard link to an object in an HDF5 file. +!! +!! \param object_id Object to be linked. +!! \param new_loc_id File or group identifier specifying location at which object is to be linked. +!! \param new_link_name Name of link to be created, relative to new_loc_id. +!! \param hdferr \fortran_error +!! \param lcpl_id Link creation property list identifier. +!! \param lapl_id Link access property list identifier. +!! SUBROUTINE h5olink_f(object_id, new_loc_id, new_link_name, hdferr, lcpl_id, lapl_id) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: object_id @@ -173,7 +159,6 @@ CONTAINS INTEGER , INTENT(OUT) :: hdferr INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lcpl_id INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** INTEGER(HID_T) :: lapl_id_default INTEGER(HID_T) :: lcpl_id_default @@ -206,30 +191,17 @@ CONTAINS END SUBROUTINE h5olink_f -!****s* H5O/h5oopen_f -! -! NAME -! h5oopen_f -! -! PURPOSE -! Opens an object in an HDF5 file by location identifier and path name. -! -! Inputs: -! loc_id - File or group identifier. -! name - Path to the object, relative to loc_id. -! -! Outputs: -! obj_id - Object identifier for the opened object. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Access property list identifier for the link pointing to the object. -! -! AUTHOR -! M. Scot Breitenfeld -! April 18, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Opens an object in an HDF5 file by location identifier and path name. +!! +!! \param loc_id File or group identifier. +!! \param name Path to the object, relative to loc_id. +!! \param obj_id Object identifier for the opened object. +!! \param hdferr \fortran_error +!! \param lapl_id Access property list identifier for the link pointing to the object. +!! SUBROUTINE h5oopen_f(loc_id, name, obj_id, hdferr, lapl_id) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id @@ -237,7 +209,6 @@ CONTAINS INTEGER(HID_T) , INTENT(OUT) :: obj_id INTEGER , INTENT(OUT) :: hdferr INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** INTEGER(HID_T) :: lapl_id_default INTEGER(SIZE_T) :: namelen @@ -262,31 +233,18 @@ CONTAINS hdferr = h5oopen_c(loc_id, name, namelen, lapl_id_default, obj_id) END SUBROUTINE h5oopen_f -! -!****s* H5O/h5oclose_f -! -! NAME -! h5oclose_f -! -! PURPOSE -! Closes an object in an HDF5 file. -! -! Inputs: -! object_id - Object identifier. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! December 17, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Closes an object in an HDF5 file. +!! +!! \param object_id Object identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5oclose_f(object_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: object_id INTEGER , INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5oclose_c(object_id) BIND(C,NAME='h5oclose_c') IMPORT :: HID_T @@ -298,34 +256,22 @@ CONTAINS hdferr = h5oclose_c(object_id) END SUBROUTINE h5oclose_f -! -!****s* H5O/h5oopen_by_token_f -! NAME -! h5oopen_by_token_f -! -! PURPOSE -! Opens an object using its token within an HDF5 file. -! -! Inputs: -! loc_id - File or group identifier. -! token - Object’s token in the file. -! -! Outputs: -! obj_id - Object identifier for the opened object. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! September 14, 2009 -! -! Fortran90 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Opens an object using its token within an HDF5 file. +!! +!! \param loc_id File or group identifier. +!! \param token Object’s token in the file. +!! \param obj_id Object identifier for the opened object. +!! \param hdferr \fortran_error +!! SUBROUTINE h5oopen_by_token_f(loc_id, token, obj_id, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token INTEGER(HID_T) , INTENT(OUT) :: obj_id INTEGER , INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5oopen_by_token_c(loc_id, token, obj_id) BIND(C,NAME='h5oopen_by_token_c') IMPORT :: HID_T, H5O_TOKEN_T_F @@ -339,32 +285,19 @@ CONTAINS hdferr = h5oopen_by_token_c(loc_id, token, obj_id) END SUBROUTINE h5oopen_by_token_f -! -!****s* H5O/h5ocopy_f -! NAME -! h5ocopy_f -! -! PURPOSE -! Copies an object in an HDF5 file. -! -! Inputs: -! src_loc_id - Object identifier indicating the location of the source object to be copied. -! src_name - Name of the source object to be copied. -! dst_loc_id - Location identifier specifying the destination. -! dst_name - Name to be assigned to the new copy. -! -! Optional parameters: -! ocpypl_id - Object copy property list. -! lcpl_id - Link creation property list for the new hard link. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! March 14, 2012 -! -! Fortran90 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Copies an object in an HDF5 file. +!! +!! \param src_loc_id Object identifier indicating the location of the source object to be copied. +!! \param src_name Name of the source object to be copied. +!! \param dst_loc_id Location identifier specifying the destination. +!! \param dst_name Name to be assigned to the new copy. +!! \param ocpypl_id Object copy property list. +!! \param lcpl_id Link creation property list for the new hard link. +!! \param hdferr \fortran_error +!! SUBROUTINE h5ocopy_f(src_loc_id, src_name, dst_loc_id, dst_name, hdferr, ocpypl_id, lcpl_id) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: src_loc_id @@ -374,7 +307,6 @@ CONTAINS INTEGER , INTENT(OUT) :: hdferr INTEGER(HID_T) , INTENT(IN), OPTIONAL :: ocpypl_id INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lcpl_id -!***** INTEGER(SIZE_T) :: src_name_len, dst_name_len INTEGER(HID_T) :: ocpypl_id_default, lcpl_id_default @@ -410,29 +342,18 @@ CONTAINS END SUBROUTINE h5ocopy_f -!****s* H5O/h5odecr_refcount_f -! NAME -! h5odecr_refcount_f -! -! PURPOSE -! Decrements an object reference count. -! -! Inputs: -! object_id - Object identifier. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran90 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Decrements an object reference count. +!! +!! \param object_id Object identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5odecr_refcount_f(object_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: object_id INTEGER , INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5odecr_refcount_c(object_id) BIND(C,NAME='h5odecr_refcount_c') @@ -446,30 +367,19 @@ CONTAINS END SUBROUTINE h5odecr_refcount_f -!****s* H5O/h5oexists_by_name_f -! NAME -! h5oexists_by_name_f -! -! PURPOSE -! Determines whether a link resolves to an actual object. -! -! Inputs: -! loc_id - Identifier of the file or group to query. -! name - The name of the link to check. -! -! -! Optional parameters: -! lapl_id - Link access property list identifier. -! -! Outputs: -! link_exists - Existing link resolves to an object. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran90 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Determines whether a link resolves to an actual object. +!! +!! \param loc_id IdeIdentifier of the file or group to query. +!! \param name TheThe name of the link to check. +!! +!! +!! \param lapl_id Link access property list identifier. +!! \param link_exists Existing link resolves to an object. +!! \param hdferr \fortran_error +!! SUBROUTINE h5oexists_by_name_f(loc_id, name, link_exists, hdferr, lapl_id) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id @@ -477,7 +387,6 @@ CONTAINS LOGICAL , INTENT(OUT) :: link_exists INTEGER , INTENT(OUT) :: hdferr INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** INTEGER(size_t) :: namelen INTEGER :: status @@ -516,35 +425,22 @@ CONTAINS END SUBROUTINE h5oexists_by_name_f -!****s* H5O/h5oget_comment_f -! NAME -! h5oget_comment_f -! -! PURPOSE -! Retrieves comment for specified object. -! -! Inputs: -! obj_id - Identifier for the target object. -! -! Optional parameters: -! bufsize - Size of the comment buffer. -! -! Outputs: -! comment - The comment. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran90 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Retrieves comment for specified object. +!! +!! \param obj_id Identifier for the target object. +!! \param bufsize Size of the comment buffer. +!! \param comment The comment. +!! \param hdferr \fortran_error +!! SUBROUTINE h5oget_comment_f(obj_id, comment, hdferr, bufsize) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: obj_id CHARACTER(LEN=*) , INTENT(OUT) :: comment INTEGER , INTENT(OUT) :: hdferr INTEGER(HSSIZE_T), INTENT(OUT), OPTIONAL :: bufsize -!***** INTEGER(SIZE_T) :: commentsize_default INTEGER(HSSIZE_T) :: bufsize_default @@ -570,30 +466,18 @@ CONTAINS END SUBROUTINE h5oget_comment_f -!****s* H5O/h5oget_comment_by_name_f -! NAME -! h5oget_comment_by_name_f -! -! PURPOSE -! Retrieves comment for specified object. -! -! Inputs: -! loc_id - Identifier of a file, group, dataset, or named datatype. -! name - Name of the object whose comment is to be retrieved, -! specified as a path relative to loc_id. -! -! Optional parameters: -! bufsize - Size of the comment buffer. -! -! Outputs: -! comment - The comment. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! July 6, 2012 -! -! Fortran90 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Retrieves comment for specified object. +!! +!! \param loc_id Identifier of a file, group, dataset, or named datatype. +!! \param name Name of the object whose comment is to be retrieved, specified as a path relative to loc_id. +!! \param comment The comment. +!! \param hdferr \fortran_error +!! \param bufsize Size of the comment buffer. +!! \param lapl_id File access property list identifier. +!! SUBROUTINE h5oget_comment_by_name_f(loc_id, name, comment, hdferr, bufsize, lapl_id) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id @@ -602,7 +486,6 @@ CONTAINS INTEGER , INTENT(OUT) :: hdferr INTEGER(SIZE_T) , INTENT(OUT), OPTIONAL :: bufsize INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** INTEGER(SIZE_T) :: commentsize_default INTEGER(SIZE_T) :: name_size @@ -637,29 +520,18 @@ CONTAINS END SUBROUTINE h5oget_comment_by_name_f -!****s* H5O/h5oincr_refcount_f -! NAME -! h5oincr_refcount_f -! -! PURPOSE -! Increments an object reference count. -! -! Inputs: -! obj_id - Object identifier. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 15, 2012 -! -! Fortran90 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Increments an object reference count. +!! +!! \param obj_id Object identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5oincr_refcount_f(obj_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id INTEGER , INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5oincr_refcount_c(obj_id) BIND(C,NAME='h5oincr_refcount_c') @@ -673,33 +545,21 @@ CONTAINS END SUBROUTINE h5oincr_refcount_f -!****s* H5O/h5oopen_by_idx_f -! -! NAME -! h5oopen_by_idx_f -! -! PURPOSE -! Open the nth object in a group. -! -! Inputs: -! loc_id - A file or group identifier. -! group_name - Name of group, relative to loc_id, in which object is located. -! index_type - Type of index by which objects are ordered. -! order - Order of iteration within index, NOTE: zero-based. -! n - Object to open. -! -! Outputs: -! obj_id - An object identifier for the opened object. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list. -! -! AUTHOR -! M. Scot Breitenfeld -! May 17, 2012 -! -! Fortran90 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Open the nth object in a group. +!! +!! \param loc_id A file or group identifier. +!! \param group_name Name of group, relative to loc_id, in which object is located. +!! \param index_type Type of index by which objects are ordered. +!! \param order Order of iteration within index, NOTE: zero-based. +!! \param n Object to open. +!! \param obj_id An object identifier for the opened object. +!! \param hdferr \fortran_error +!! +!! \param lapl_id Link access property list. +!! SUBROUTINE h5oopen_by_idx_f(loc_id, group_name, index_type, order, n, obj_id, & hdferr, lapl_id) IMPLICIT NONE @@ -711,7 +571,6 @@ CONTAINS INTEGER(HID_T) , INTENT(OUT) :: obj_id INTEGER , INTENT(OUT) :: hdferr INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** INTEGER(SIZE_T) :: group_namelen INTEGER(HID_T) :: lapl_id_default @@ -742,31 +601,20 @@ CONTAINS END SUBROUTINE H5Oopen_by_idx_f -!****s* H5O/h5oset_comment_f -! NAME -! h5oset_comment_f -! -! PURPOSE -! Sets comment for specified object. -! -! Inputs: -! obj_id - Identifier of the target object. -! comment - The new comment. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! May 15, 2012 -! -! Fortran90 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Sets comment for specified object. +!! +!! \param obj_id Identifier of the target object. +!! \param comment The new comment. +!! \param hdferr \fortran_error +!! SUBROUTINE h5oset_comment_f(obj_id, comment, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: obj_id CHARACTER(LEN=*), INTENT(IN) :: comment INTEGER , INTENT(OUT) :: hdferr -!***** INTEGER(SIZE_T) :: commentlen INTERFACE @@ -787,30 +635,17 @@ CONTAINS END SUBROUTINE h5oset_comment_f -!****s* H5O/h5oset_comment_by_name_f -! NAME -! h5oset_comment_by_name_f -! -! PURPOSE -! Sets comment for specified object. -! -! Inputs: -! loc_id - Identifier of a file, group, dataset, or named datatype. -! name - Name of the object whose comment is to be set or reset, -! specified as a path relative to loc_id. -! comment - The new comment. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! May 15, 2012 -! -! Fortran90 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Sets comment for specified object. +!! +!! \param loc_id Identifier of a file, group, dataset, or named datatype. +!! \param name Name of the object whose comment is to be set or reset, specified as a path relative to loc_id. +!! \param comment The new comment. +!! \param hdferr \fortran_error +!! \param lapl_id Link access property list identifier. +!! SUBROUTINE h5oset_comment_by_name_f(loc_id, name, comment, hdferr, lapl_id) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id @@ -818,7 +653,6 @@ CONTAINS CHARACTER(LEN=*), INTENT(IN) :: comment INTEGER , INTENT(OUT) :: hdferr INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** INTEGER(SIZE_T) :: commentlen INTEGER(SIZE_T) :: namelen INTEGER(HID_T) :: lapl_id_default @@ -848,39 +682,26 @@ CONTAINS END SUBROUTINE h5oset_comment_by_name_f -!****s* H5O (F03)/h5ovisit_f_F03 -! -! NAME -! h5ovisit_f -! -! PURPOSE -! Recursively visits all objects starting from a specified object. -! -! Inputs: -! object_id - Identifier of the object at which the recursive iteration begins. -! index_type - Type of index; valid values include: -! H5_INDEX_NAME_F -! H5_INDEX_CRT_ORDER_F -! order - Order in which index is traversed; valid values include: -! H5_ITER_DEC_F -! H5_ITER_INC_F -! H5_ITER_NATIVE_F -! op - Callback function passing data regarding the group to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the group -! -! Outputs: -! return_value - returns the return value of the first operator that returns a positive value, or -! zero if all members were processed with no operator returning non-zero. -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! fields - Flags specifying the fields to include in object_info. -! -! AUTHOR -! M. Scot Breitenfeld -! November 19, 2008 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Recursively visits all objects starting from a specified object. +!! +!! \param object_id Identifier of the object at which the recursive iteration begins. +!! \param index_type Type of index; valid values include: +!! \li H5_INDEX_NAME_F +!! \li H5_INDEX_CRT_ORDER_F +!! \param order Order in which index is traversed; valid values include: +!! \li H5_ITER_DEC_F +!! \li H5_ITER_INC_F +!! \li H5_ITER_NATIVE_F +!! \param op Callback function passing data regarding the group to the calling application. +!! \param op_data User-defined pointer to data required by the application for its processing of the group. +!! \param return_value Returns the return value of the first operator that returns a positive value, or +!! zero if all members were processed with no operator returning non-zero. +!! \param hdferr \fortran_error +!! \param fields Flags specifying the fields to include in object_info. +!! SUBROUTINE h5ovisit_f(object_id, index_type, order, op, op_data, return_value, hdferr, fields) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: object_id @@ -892,7 +713,6 @@ CONTAINS INTEGER, INTENT(OUT) :: return_value INTEGER, INTENT(OUT) :: hdferr INTEGER, INTENT(IN), OPTIONAL :: fields -!***** INTEGER :: fields_c INTERFACE @@ -923,32 +743,18 @@ CONTAINS END SUBROUTINE h5ovisit_f -!****s* H5O (F03)/h5oget_info_by_name_f_F03 -! -! NAME -! h5oget_info_by_name_f -! -! PURPOSE -! Retrieves the metadata for an object, identifying the object by location and relative name. -! -! Inputs: -! loc_id - File or group identifier specifying location of group -! in which object is located. -! name - Name of group, relative to loc_id. -! -! Outputs: -! object_info - Buffer in which to return object information. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list. -! fields - Flags specifying the fields to include in object_info. -! -! AUTHOR -! M. Scot Breitenfeld -! December 1, 2008 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Retrieves the metadata for an object, identifying the object by location and relative name. +!! +!! \param loc_id File or group identifier specifying location of group in which object is located. +!! \param name Name of group, relative to loc_id. +!! \param object_info Buffer in which to return object information. +!! \param hdferr \fortran_error +!! \param lapl_id Link access property list. +!! \param fields Flags specifying the fields to include in object_info. +!! SUBROUTINE h5oget_info_by_name_f(loc_id, name, object_info, hdferr, lapl_id, fields) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id @@ -957,7 +763,7 @@ CONTAINS INTEGER , INTENT(OUT) :: hdferr INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id INTEGER , INTENT(IN) , OPTIONAL :: fields -!***** + INTEGER(SIZE_T) :: namelen INTEGER(HID_T) :: lapl_id_default TYPE(C_PTR) :: ptr @@ -992,29 +798,16 @@ CONTAINS END SUBROUTINE H5Oget_info_by_name_f -!****s* H5O (F03)/h5oget_info_f_F03 -! -! NAME -! h5oget_info_f -! -! PURPOSE -! Retrieves the metadata for an object specified by an identifier. -! -! Inputs: -! object_id - Identifier for target object. -! -! Outputs: -! object_info - Buffer in which to return object information. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! fields - Flags specifying the fields to include in object_info. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Retrieves the metadata for an object specified by an identifier. +!! +!! \param object_id Identifier for target object. +!! \param object_info Buffer in which to return object information. +!! \param hdferr \fortran_error +!! \param fields Flags specifying the fields to include in object_info. +!! SUBROUTINE h5oget_info_f(object_id, object_info, hdferr, fields) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR @@ -1023,7 +816,6 @@ CONTAINS TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info INTEGER , INTENT(OUT) :: hdferr INTEGER , INTENT(IN), OPTIONAL :: fields -!***** TYPE(C_PTR) :: ptr INTEGER :: fields_c @@ -1047,35 +839,23 @@ CONTAINS END SUBROUTINE H5Oget_info_f -!****s* H5O (F03)/h5oget_info_by_idx_f_F03 -! -! NAME -! h5oget_info_by_idx_f -! -! PURPOSE -! Retrieves the metadata for an object, identifying the object by an index position. -! -! Inputs: -! loc_id - File or group identifier specifying location of group -! in which object is located. -! group_name - Name of group in which object is located. -! index_field - Index or field that determines the order. -! order - Order within field or index. -! n - Object for which information is to be returned -! -! Outputs: -! object_info - Buffer in which to return object information. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! lapl_id - Link access property list. (Not currently used.) -! fields - Flags specifying the fields to include in object_info. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Retrieves the metadata for an object, identifying the object by an index position. +!! +!! \param loc_id File or group identifier specifying location of group in which object is located. +!! \param group_name Name of group in which object is located. +!! \param index_field Index or field that determines the order. +!! \param order Order within field or index. +!! \param n Object for which information is to be returned. +!! \param object_info Buffer in which to return object information. +!! \param hdferr \fortran_error +!! +!! \param lapl_id Link access property list. (Not currently used.). +!! \param fields Flags specifying the fields to include in object_info. +!! +!! Fortran2003 Interface: SUBROUTINE h5oget_info_by_idx_f(loc_id, group_name, index_field, order, n, & object_info, hdferr, lapl_id, fields) @@ -1090,7 +870,6 @@ CONTAINS INTEGER , INTENT(OUT) :: hdferr INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id INTEGER , INTENT(IN) , OPTIONAL :: fields -!***** INTEGER(SIZE_T) :: namelen INTEGER(HID_T) :: lapl_id_default TYPE(C_PTR) :: ptr @@ -1127,41 +906,28 @@ CONTAINS END SUBROUTINE H5Oget_info_by_idx_f -!****s* H5O (F03)/h5ovisit_by_name_f_F03 -! -! NAME -! h5ovisit_by_name_f -! -! PURPOSE -! Recursively visits all objects starting from a specified object. -! -! Inputs: -! loc_id - Identifier of a file or group. -! object_name - Name of the object, generally relative to loc_id, that will serve as root of the iteration -! index_type - Type of index; valid values include: -! H5_INDEX_NAME_F -! H5_INDEX_CRT_ORDER_F -! order - Order in which index is traversed; valid values include: -! H5_ITER_DEC_F -! H5_ITER_INC_F -! H5_ITER_NATIVE_F -! op - Callback function passing data regarding the group to the calling application -! op_data - User-defined pointer to data required by the application for its processing of the group -! -! Outputs: -! return_value - Returns the return value of the first operator that returns a positive value, or -! zero if all members were processed with no operator returning non-zero. -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! lapl_id - Link access property list identifier. -! fields - Flags specifying the fields to include in object_info. -! -! AUTHOR -! M. Scot Breitenfeld -! November 19, 2008 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Recursively visits all objects starting from a specified object. +!! +!! \param loc_id Identifier of a file or group. +!! \param object_name Name of the object, generally relative to loc_id, that will serve as root of the iteration. +!! \param index_type Type of index; valid values include: +!! \li H5_INDEX_NAME_F +!! \li H5_INDEX_CRT_ORDER_F +!! \param order Order in which index is traversed; valid values include: +!! \li H5_ITER_DEC_F +!! \li H5_ITER_INC_F +!! \li H5_ITER_NATIVE_F +!! \param op Callback function passing data regarding the group to the calling application. +!! \param op_data User-defined pointer to data required by the application for its processing of the group. +!! \param return_value Returns the return value of the first operator that returns a positive value, or +!! zero if all members were processed with no operator returning non-zero. +!! \param hdferr \fortran_error +!! \param lapl_id Link access property list identifier. +!! \param fields Flags specifying the fields to include in object_info. +!! SUBROUTINE h5ovisit_by_name_f(loc_id, object_name, index_type, order, op, op_data, & return_value, hdferr, lapl_id, fields) IMPLICIT NONE @@ -1176,7 +942,6 @@ CONTAINS INTEGER , INTENT(OUT) :: hdferr INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id INTEGER , INTENT(IN) , OPTIONAL :: fields -!***** INTEGER(SIZE_T) :: namelen INTEGER(HID_T) :: lapl_id_default @@ -1219,42 +984,31 @@ CONTAINS END SUBROUTINE h5ovisit_by_name_f -!****s* H5O/h5otoken_cmp_f -! NAME -! h5otoken_cmp_f -! -! PURPOSE -! Compare two tokens, which must be from the same file / containers. -! -! Inputs: -! loc_id - Identifier of an object in the file / container. -! token1 - The first token to compare. -! token2 - The second token to compare. -! -! Outputs: -! cmp_value - Returns 0 if tokens are equal, non-zero for unequal tokens. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! Quincey Koziol -! January 10, 2019 -! -! Fortran90 Interface: +!> +!! \ingroup FH5O +!! +!! \brief Compare two tokens, which must be from the same file / containers. +!! +!! \param loc_id Identifier of an object in the file / container. +!! \param token1 The first token to compare. +!! \param token2 The second token to compare. +!! \param cmp_value Returns 0 if tokens are equal, non-zero for unequal tokens. +!! \param hdferr \fortran_error +!! SUBROUTINE h5otoken_cmp_f(loc_id, token1, token2, cmp_value, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: loc_id - TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token1 ! First token - TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token2 ! First token + TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token1 + TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token2 INTEGER , INTENT(OUT) :: cmp_value INTEGER , INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5otoken_cmp_c(loc_id, token1, token2, cmp_value) BIND(C,NAME='h5otoken_cmp_c') IMPORT :: HID_T, C_PTR, H5O_TOKEN_T_F IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id - TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token1 ! First token - TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token2 ! First token + TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token1 + TYPE(H5O_TOKEN_T_F), INTENT(IN) :: token2 INTEGER, INTENT(OUT) :: cmp_value END FUNCTION h5otoken_cmp_c diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index 96080ce..dbae328 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -1,10 +1,13 @@ -!****h* ROBODoc/H5Pff -! -! NAME -! H5P -! -! PURPOSE -! This file contains Fortran interfaces for H5P functions. +!> @defgroup FH5P Fortran Property List (H5P) Interface +!! +!! @see H5P, C-API +!! +!! @see @ref H5P_UG, User Guide +!! + +!> @ingroup FH5P +!! +!! @brief This module contains Fortran interfaces for H5P functions. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -32,7 +35,6 @@ ! If you add a new H5P function you must add the function name to the ! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. ! This is needed for Windows based operating systems. -!***** #include @@ -50,6 +52,8 @@ MODULE H5P PRIVATE h5pregister_integer, h5pregister_ptr PRIVATE h5pinsert_integer, h5pinsert_char, h5pinsert_ptr +#ifndef H5_DOXYGEN_FORTRAN + INTERFACE h5pset_fapl_multi_f MODULE PROCEDURE h5pset_fapl_multi_l MODULE PROCEDURE h5pset_fapl_multi_s @@ -176,58 +180,40 @@ MODULE H5P END FUNCTION h5pinsert_c END INTERFACE +#endif + CONTAINS -!****s* H5P/h5pcreate_f -! NAME -! h5pcreate_f -! -! PURPOSE -! Creates a new property as an instance of a property -! list class. -! -! INPUTS -! class - type of the property class to be created. -! Possible values are: -! H5P_OBJECT_CREATE_F -! H5P_FILE_CREATE_F -! H5P_FILE_ACCESS_F -! H5P_DATASET_CREATE_F -! H5P_DATASET_ACCESS_F -! H5P_DATASET_XFER_F -! H5P_FILE_MOUNT_F -! H5P_GROUP_CREATE_F -! H5P_GROUP_ACCESS_F -! H5P_DATATYPE_CREATE_F -! H5P_DATATYPE_ACCESS_F -! H5P_STRING_CREATE_F -! H5P_ATTRIBUTE_CREATE _F -! H5P_OBJECT_COPY_F -! H5P_LINK_CREATE_F -! H5P_LINK_ACCESS_F -! -! OUTPUTS -! prp_id - property list identifier -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Creates a new property as an instance of a property list class. +!! +!! \param class Type of the property class to be created. Possible values are: +!! \li H5P_OBJECT_CREATE_F +!! \li H5P_FILE_CREATE_F +!! \li H5P_FILE_ACCESS_F +!! \li H5P_DATASET_CREATE_F +!! \li H5P_DATASET_ACCESS_F +!! \li H5P_DATASET_XFER_F +!! \li H5P_FILE_MOUNT_F +!! \li H5P_GROUP_CREATE_F +!! \li H5P_GROUP_ACCESS_F +!! \li H5P_DATATYPE_CREATE_F +!! \li H5P_DATATYPE_ACCESS_F +!! \li H5P_STRING_CREATE_F +!! \li H5P_ATTRIBUTE_CREATE _F +!! \li H5P_OBJECT_COPY_F +!! \li H5P_LINK_CREATE_F +!! \li H5P_LINK_ACCESS_F +!! \param prp_id Property list identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pcreate_f(class, prp_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: class INTEGER(HID_T), INTENT(OUT) :: prp_id INTEGER , INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5pcreate_c(class, prp_id) & BIND(C,NAME='h5pcreate_c') @@ -241,47 +227,21 @@ CONTAINS hdferr = h5pcreate_c(class, prp_id) END SUBROUTINE h5pcreate_f -!****s* H5P/h5pset_preserve_f -! NAME -! h5pset_preserve_f -! -! PURPOSE -! Sets the dataset transfer property list status to -! TRUE or FALSE for initializing compound datatype -! members during write/read operations. -! -! INPUTS -! prp_id - property list identifier -! flag - status flag -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Datatype of the flag parameter is changed from -! INTEGER to LOGICAL June 4, 2003 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the dataset transfer property list status to TRUE or FALSE for initializing +!! compound datatype members during write/read operations. +!! +!! \param prp_id Property list identifier. +!! \param flag Status flag. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_preserve_f(prp_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - LOGICAL, INTENT(IN) :: flag ! TRUE/FALSE flag to set the dataset - ! transfer property for partila writing/reading - ! compound datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + LOGICAL, INTENT(IN) :: flag + INTEGER, INTENT(OUT) :: hdferr INTEGER :: flag_c INTERFACE @@ -298,44 +258,20 @@ CONTAINS hdferr = h5pset_preserve_c(prp_id, flag_c) END SUBROUTINE h5pset_preserve_f -!****s* H5P/h5pget_preserve_f -! NAME -! h5pget_preserve_f -! -! PURPOSE -! Checks status of the dataset transfer property list. -! -! INPUTS -! prp_id - property list identifier -! -! OUTPUTS -! flag - status flag -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Datatype of the flag parameter is changed from -! INTEGER to LOGICAL -! June 4, 2003 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Checks status of the dataset transfer property list. +!! +!! \param prp_id Property list identifier. +!! \param flag Status flag. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_preserve_f(prp_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag. Shows status of the dataset's - ! transfer property for partial writing/reading - ! compound datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + LOGICAL, INTENT(OUT) :: flag + INTEGER, INTENT(OUT) :: hdferr INTEGER :: flag_c INTERFACE @@ -353,40 +289,20 @@ CONTAINS IF(flag_c .EQ. 1) flag = .TRUE. END SUBROUTINE h5pget_preserve_f -!****s* H5P/h5pget_class_f -! NAME -! h5pget_class_f -! -! PURPOSE -! Returns the property list class for a property list. -! -! INPUTS -! prp_id - property list identifier -! -! OUTPUTS -! classtype - property list class -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Returns the property list class for a property list. +!! +!! \param prp_id Property list identifier. +!! \param classtype Property list class. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_class_f(prp_id, classtype, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: classtype ! The type of the property list - ! to be created. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: classtype + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_class_c(prp_id, classtype) & @@ -401,39 +317,20 @@ CONTAINS hdferr = h5pget_class_c(prp_id, classtype) END SUBROUTINE h5pget_class_f -!****s* H5P/h5pcopy_f -! NAME -! h5pcopy_f -! -! PURPOSE -! Copies an existing property list to create a new -! property list -! -! INPUTS -! prp_id - property list identifier -! OUTPUTS -! new_prp_id - new property list identifier -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Copies an existing property list to create a new property list +!! +!! \param prp_id Property list identifier. +!! \param new_prp_id New property list identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pcopy_f(prp_id, new_prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: new_prp_id ! Identifier of property list - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: new_prp_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pcopy_c(prp_id, new_prp_id) & @@ -448,37 +345,18 @@ CONTAINS hdferr = h5pcopy_c(prp_id, new_prp_id) END SUBROUTINE h5pcopy_f -!****s* H5P/h5pclose_f -! NAME -! h5pclose_f -! -! PURPOSE -! Terminates access to a property list. -! -! INPUTS -! prp_id - identifier of the property list to -! terminate access to. -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Terminates access to a property list. +!! +!! \param prp_id Identifier of the property list to terminate access to. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pclose_f(prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pclose_c(prp_id) & BIND(C,NAME='h5pclose_c') @@ -491,43 +369,23 @@ CONTAINS hdferr = h5pclose_c(prp_id) END SUBROUTINE h5pclose_f -!****s* H5P/h5pset_chunk_f -! NAME -! h5pset_chunk_f -! -! PURPOSE -! Sets the size of the chunks used to store -! a chunked layout dataset. -! -! INPUTS -! prp_id - dataset creation property list identifier -! ndims - number of dimensions for each chunk -! dims - array with dimension sizes for each chunk -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the size of the chunks used to store +!! a chunked layout dataset. +!! +!! \param prp_id Dataset creation property list identifier. +!! \param ndims Number of dimensions for each chunk. +!! \param dims Array with dimension sizes for each chunk. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_chunk_f(prp_id, ndims, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: ndims INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims - ! Array containing sizes of - ! chunk dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_chunk_c(prp_id, ndims, dims) & BIND(C,NAME='h5pset_chunk_c') @@ -542,45 +400,22 @@ CONTAINS hdferr = h5pset_chunk_c(prp_id, ndims, dims) END SUBROUTINE h5pset_chunk_f -!****s* H5P/h5pget_chunk_f -! NAME -! h5pget_chunk_f -! -! PURPOSE -! Retrieves the size of chunks for the raw data of a -! chunked layout dataset -! -! INPUTS -! prp_id - property list identifier -! ndims - size of dims array -! OUTPUTS -! dims - array with dimension sizes for each chunk -! hdferr - error code -! Success: number of chunk dimensions -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Retrieves the size of chunks for the raw data of a chunked layout dataset +!! +!! \param prp_id Property list identifier. +!! \param ndims Size of dims array. +!! \param dims Array with dimension sizes for each chunk. +!! \param hdferr Returns number of chunk dimensions if successful and -1 if fails. +!! SUBROUTINE h5pget_chunk_f(prp_id, ndims, dims, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ndims ! Number of chunk dimensions to - ! to return + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: ndims INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(OUT) :: dims - ! Array containing sizes of - ! chunk dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! number of chunk dimensions on success, - ! -1 on failure -!***** + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_chunk_c(prp_id, ndims, dims) & @@ -596,39 +431,20 @@ CONTAINS hdferr = h5pget_chunk_c(prp_id, ndims, dims) END SUBROUTINE h5pget_chunk_f -!****s* H5P/h5pset_deflate_f -! NAME -! h5pset_deflate_f -! -! PURPOSE -! Sets compression method and compression level. -! -! INPUTS -! prp_id - property list identifier -! level - compression level -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets compression method and compression level. +!! +!! \param prp_id Property list identifier. +!! \param level Compression level. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_deflate_f(prp_id, level, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: level ! Compression level - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: level + INTEGER, INTENT(OUT) :: hdferr ! INTEGER, EXTERNAL :: h5pset_deflate_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -646,51 +462,28 @@ CONTAINS END SUBROUTINE h5pset_deflate_f -!****s* H5P/h5pget_version_f -! NAME -! h5pget_version_f -! -! PURPOSE -! Retrieves the version information of various objects -! for a file creation property list -! -! INPUTS -! prp_id - file createion property list identifier -! OUTPUTS -! boot - super block version number -! freelist - global freelist version number -! stab - symbol table version number -! shhdr - shared object header version number -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Retrieves the version information of various objects for a file creation property list. +!! +!! \param prp_id File createion property list identifier. +!! \param boot Super block version number. +!! \param freelist Global freelist version number. +!! \param stab Symbol table version number. +!! \param shhdr Shared object header version number. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_version_f(prp_id, boot, freelist, & stab, shhdr, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, DIMENSION(:), INTENT(OUT) :: boot ! Array to put boot - ! block version number - INTEGER, DIMENSION(:), INTENT(OUT) :: freelist ! Array to put global - ! Freelist version number + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, DIMENSION(:), INTENT(OUT) :: boot + INTEGER, DIMENSION(:), INTENT(OUT) :: freelist - INTEGER, DIMENSION(:), INTENT(OUT) :: stab ! Array to put symbol - ! table version number - INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr ! Array to put shared - ! object header version number - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER, DIMENSION(:), INTENT(OUT) :: stab + INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_version_c(prp_id, boot, freelist, stab, shhdr) & @@ -708,39 +501,20 @@ CONTAINS hdferr = h5pget_version_c(prp_id, boot, freelist, stab, shhdr) END SUBROUTINE h5pget_version_f -!****s* H5P/h5pset_userblock_f -! NAME -! h5pset_userblock_f -! -! PURPOSE -! Sets user block size -! -! INPUTS -! prp_id - file creation property list to modify -! size - size of the user-block in bytes -! -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets user block size. +!! +!! \param prp_id File creation property list to modify. +!! \param size Size of the user-block in bytes. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_userblock_f (prp_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Size of the user-block in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_userblock_c(prp_id, size) & BIND(C,NAME='h5pset_userblock_c') @@ -754,41 +528,20 @@ CONTAINS hdferr = h5pset_userblock_c(prp_id, size) END SUBROUTINE h5pset_userblock_f -!****s* H5P/h5pget_userblock_f -! NAME -! h5pget_userblock_f -! -! PURPOSE -! Gets user block size. -! -! INPUTS -! -! prp_id - file creation property list identifier -! OUTPUTS -! -! block_size - size of the user block in bytes -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Gets user block size. +!! +!! \param prp_id File creation property list identifier. +!! \param block_size Size of the user block in bytes. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_userblock_f(prp_id, block_size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: block_size ! Size of the - ! user-block in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(OUT) :: block_size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_userblock_c(prp_id, block_size) & BIND(C,NAME='h5pget_userblock_c') @@ -801,44 +554,22 @@ CONTAINS hdferr = h5pget_userblock_c(prp_id, block_size) END SUBROUTINE h5pget_userblock_f -!****s* H5P/h5pset_sizes_f -! NAME -! h5pset_sizes_f -! -! PURPOSE -! Sets the byte size of the offsets and lengths used -! to address objects in an HDF5 file. -! -! INPUTS -! prp_id - file creation property list identifier -! sizeof_addr - size of an object offset in bytes -! sizeof_size - size of an object length in bytes -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the byte size of the offsets and lengths used to address objects in an HDF5 file. +!! +!! \param prp_id File creation property list identifier. +!! \param sizeof_addr Size of an object offset in bytes. +!! \param sizeof_size Size of an object length in bytes. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_sizes_f (prp_id, sizeof_addr, sizeof_size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr ! Size of an object - ! offset in bytes - INTEGER(SIZE_T), INTENT(IN) :: sizeof_size ! Size of an object - ! length in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr + INTEGER(SIZE_T), INTENT(IN) :: sizeof_size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) & BIND(C,NAME='h5pset_sizes_c') @@ -853,44 +584,22 @@ CONTAINS hdferr = h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) END SUBROUTINE h5pset_sizes_f -!****s* H5P/h5pget_sizes_f -! NAME -! h5pget_sizes_f -! -! PURPOSE -! Retrieves the size of the offsets and lengths used -! in an HDF5 file -! -! INPUTS -! prp_id - file creation property list identifier -! OUTPUTS -! -! sizeof_addr - size of an object offset in bytes -! sizeof_size - size of an object length in bytes -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Retrieves the size of the offsets and lengths used in an HDF5 file +!! +!! \param prp_id File Creation property list identifier. +!! \param sizeof_addr Size of an object offset in bytes. +!! \param sizeof_size Size of an object length in bytes. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_sizes_f(prp_id, sizeof_addr, sizeof_size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr ! Size of an object - ! offset in bytes - INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size ! Size of an object - ! length in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr + INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) & BIND(C,NAME='h5pget_sizes_c') @@ -905,43 +614,22 @@ CONTAINS hdferr = h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) END SUBROUTINE h5pget_sizes_f -!****s* H5P/h5pset_sym_k_f -! NAME -! h5pset_sym_k_f -! -! PURPOSE -! Sets the size of parameters used to control the -!symbol table nodes -! -! INPUTS -! -! prp_id - file creation property list identifier -! ik - symbol table tree rank -! lk - symbol table node size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the size of parameters used to control the symbol table nodes. +!! +!! \param prp_id File creation property list identifier. +!! \param ik Symbol table tree rank. +!! \param lk Symbol table node size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_sym_k_f (prp_id, ik, lk, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ik ! Symbol table tree rank - INTEGER, INTENT(IN) :: lk ! Symbol table node size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: ik + INTEGER, INTENT(IN) :: lk + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_sym_k_c(prp_id, ik, lk) & BIND(C,NAME='h5pset_sym_k_c') @@ -955,43 +643,22 @@ CONTAINS hdferr = h5pset_sym_k_c(prp_id, ik, lk) END SUBROUTINE h5pset_sym_k_f -!****s* H5P/h5pget_sym_k_f -! NAME -! h5pget_sym_k_f -! -! PURPOSE -! Retrieves the size of the symbol table B-tree 1/2 rank -! and the symbol table leaf node 1/2 size. -! -! INPUTS -! -! prp_id - file creation property list identifier -! OUTPUTS -! -! ik - symbol table tree 1/2 rank -! lk - symbol table node 1/2 size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Retrieves the size of the symbol table B-tree 1/2 rank and the symbol table leaf node 1/2 size. +!! +!! \param prp_id File creation property list identifier. +!! \param ik Symbol table tree 1/2 rank. +!! \param lk Symbol table node 1/2 size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_sym_k_f(prp_id, ik, lk, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: ik ! Symbol table tree rank - INTEGER, INTENT(OUT) :: lk ! Symbol table node size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: ik + INTEGER, INTENT(OUT) :: lk + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_sym_k_c(prp_id, ik, lk) & BIND(C,NAME='h5pget_sym_k_c') @@ -1005,41 +672,20 @@ CONTAINS hdferr = h5pget_sym_k_c(prp_id, ik, lk) END SUBROUTINE h5pget_sym_k_f -!****s* H5P/h5pset_istore_k_f -! NAME -! h5pset_istore_k_f -! -! PURPOSE -! Sets the size of the parameter used to control the -! B-trees for indexing chunked datasets -! -! INPUTS -! -! prp_id - file creation property list identifier -! ik - 1/2 rank of chunked storage B-tree -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the size of the parameter used to control the B-trees for indexing chunked datasets +!! +!! \param prp_id File creation property list identifier. +!! \param ik 1/2 rank of chunked storage B-tree. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_istore_k_f (prp_id, ik, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: ik ! 1/2 rank of chunked storage B-tree - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: ik + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_istore_k_c(prp_id, ik) & BIND(C,NAME='h5pset_istore_k_c') @@ -1053,40 +699,20 @@ CONTAINS hdferr = h5pset_istore_k_c(prp_id, ik) END SUBROUTINE h5pset_istore_k_f -!****s* H5P/h5pget_istore_k_f -! NAME -! h5pget_istore_k_f -! -! PURPOSE -! Queries the 1/2 rank of an indexed storage B-tree. -! -! INPUTS -! -! prp_id - file creation property list identifier -! OUTPUTS -! -! ik - 1/2 rank of chunked storage B-tree -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Queries the 1/2 rank of an indexed storage B-tree. +!! +!! \param prp_id File creation property list identifier. +!! \param ik Rank of chunked storage B-tree. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_istore_k_f(prp_id, ik, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: ik ! 1/2 rank of chunked storage B-tree - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: ik + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_istore_k_c(prp_id, ik) & BIND(C,NAME='h5pget_istore_k_c') @@ -1100,41 +726,20 @@ CONTAINS hdferr = h5pget_istore_k_c(prp_id, ik) END SUBROUTINE h5pget_istore_k_f -!****s* H5P/h5pget_driver_f -! NAME -! h5pget_driver_f -! -! PURPOSE -! Returns low-lever driver identifier. -! -! INPUTS -! -! prp_id - file access or data transfer property -! list identifier. -! OUTPUTS -! -! driver - low-level driver identifier -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Returns low-lever driver identifier. +!! +!! \param prp_id File access or data transfer property list identifier. +!! \param driver Low-level driver identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_driver_f(prp_id, driver, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: driver ! Low-level file driver identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: driver + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_driver_c(prp_id, driver) & BIND(C,NAME='h5pget_driver_c') @@ -1148,38 +753,18 @@ CONTAINS hdferr = h5pget_driver_c(prp_id, driver) END SUBROUTINE h5pget_driver_f -!****s* H5P/h5pset_fapl_stdio_f -! NAME -! h5pset_fapl_stdio_f -! -! PURPOSE -! Sets the standard I/O driver. -! -! INPUTS -! -! prp_id - file access property list identifier -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the standard I/O driver. +!! +!! \param prp_id File access property list identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_fapl_stdio_f (prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_fapl_stdio_c(prp_id) & BIND(C,NAME='h5pset_fapl_stdio_c') @@ -1192,162 +777,46 @@ CONTAINS hdferr = h5pset_fapl_stdio_c(prp_id) END SUBROUTINE h5pset_fapl_stdio_f -!****s* H5P/h5pget_stdio_f -! NAME -! h5pget_stdio_f -! -! PURPOSE -! NOT AVAILABLE -! -! INPUTS -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! SOURCE -! SUBROUTINE h5pget_stdio_f (prp_id, io, hdferr) -! -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier -! INTEGER, INTENT(OUT) :: io ! value indicates that the file - !access property list is set to - !the stdio driver -! INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_stdio_c -! hdferr = h5pget_stdio_c(prp_id, io) -! END SUBROUTINE h5pget_stdio_f - -!****s* H5P/h5pset_fapl_sec2_f -! NAME -! h5pset_fapl_sec2_f -! -! PURPOSE -! Sets the sec2 driver. -! -! INPUTS -! -! prp_id - file access property list identifier -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the sec2 driver. +!! +!! \param prp_id File access property list identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_fapl_sec2_f (prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_fapl_sec2_c(prp_id) & BIND(C,NAME='h5pset_fapl_sec2_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id END FUNCTION h5pset_fapl_sec2_c END INTERFACE hdferr = h5pset_fapl_sec2_c(prp_id) END SUBROUTINE h5pset_fapl_sec2_f -!****s* H5P/h5pget_sec2_f -! NAME -! h5pget_sec2_f -! -! PURPOSE -! NOT AVAILABLE -! -! INPUTS -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! SOURCE! SUBROUTINE h5pget_sec2_f (prp_id, sec2, hdferr) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier -! INTEGER, INTENT(OUT) :: sec2 ! value indicates whether the file - !driver uses the functions declared - !in the unistd.h file -! INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! INTEGER, EXTERNAL :: h5pget_sec2_c -! hdferr = h5pget_sec2_c(prp_id, sec2) -! END SUBROUTINE h5pget_sec2_f - -!****s* H5P/h5pset_alignment_f -! NAME -! h5pset_alignment_f -! -! PURPOSE -! Sets alignment properties of a file access property list. -! -! INPUTS -! -! prp_id - file access property list identifier -! threshold - threshold value -! alignment - alignment value -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets alignment properties of a file access property list. +!! +!! \param prp_id File access property list identifier. +!! \param threshold Threshold value. +!! \param alignment Alignment value. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_alignment_f(prp_id, threshold, alignment, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: threshold ! Threshold value - INTEGER(HSIZE_T), INTENT(IN) :: alignment ! alignment value - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: threshold + INTEGER(HSIZE_T), INTENT(IN) :: alignment + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_alignment_c(prp_id, threshold, alignment) & BIND(C,NAME='h5pset_alignment_c') @@ -1362,42 +831,22 @@ CONTAINS hdferr = h5pset_alignment_c(prp_id, threshold, alignment) END SUBROUTINE h5pset_alignment_f -!****s* H5P/h5pget_alignment_f -! NAME -! h5pget_alignment_f -! -! PURPOSE -! Retrieves the current settings for alignment -! properties from a file access property list. -! -! INPUTS -! prp_id - file access property list identifier -! -! OUTPUTS -! threshold - threshold value -! alignment - alignment value -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Retrieves the current settings for alignment properties from a file access property list. +!! +!! \param prp_id File access property list identifier. +!! \param threshold Threshold value. +!! \param alignment Alignment value. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_alignment_f(prp_id, threshold, alignment, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: threshold ! Threshold value - INTEGER(HSIZE_T), INTENT(OUT) :: alignment ! alignment value - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(OUT) :: threshold + INTEGER(HSIZE_T), INTENT(OUT) :: alignment + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_alignment_c(prp_id, threshold, alignment) & BIND(C,NAME='h5pget_alignment_c') @@ -1412,44 +861,22 @@ CONTAINS hdferr = h5pget_alignment_c(prp_id, threshold, alignment) END SUBROUTINE h5pget_alignment_f -!****s* H5P/h5pset_fapl_core_f -! NAME -! h5pset_fapl_core_f -! -! PURPOSE -! Modifies the file access property list to use the -! H5FD_CORE driver. -! -! INPUTS -! prp_id - file access property list identifier -! increment - size, in bytes, of memory increments -! backing_store - boolean flag indicating whether to write -! the file contents to disk when the file is closed. -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Modifies the file access property list to use the H5FD_CORE driver. +!! +!! \param prp_id File access property list identifier. +!! \param increment Size, in bytes, of memory increments. +!! \param backing_store Boolean flag indicating whether to write the file contents to disk when the file is closed. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_fapl_core_f(prp_id, increment, backing_store, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(IN) :: increment ! File block size in bytes. - LOGICAL, INTENT(IN) :: backing_store ! Flag to indicate that - ! entire file contents are flushed to a file - ! with the same name as this core file. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(IN) :: increment + LOGICAL, INTENT(IN) :: backing_store + INTEGER, INTENT(OUT) :: hdferr INTEGER :: backing_store_flag INTERFACE INTEGER FUNCTION h5pset_fapl_core_c(prp_id, increment, backing_store_flag) & @@ -1466,44 +893,22 @@ CONTAINS hdferr = h5pset_fapl_core_c(prp_id, increment, backing_store_flag) END SUBROUTINE h5pset_fapl_core_f -!****s* H5P/h5pget_fapl_core_f -! NAME -! h5pget_fapl_core_f -! -! PURPOSE -! Queries core file driver properties. -! -! INPUTS -! prp_id - file access property list identifier -! OUTPUTS -! -! increment - size, in bytes, of memory increments -! backing_store - boolean flag indicating whether to write -! the file contents to disk when the file is closed. -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Queries core file driver properties. +!! +!! \param prp_id File access property list identifier. +!! \param increment Size, in bytes, of memory increments. +!! \param backing_store Boolean flag indicating whether to write the file contents to disk when the file is closed. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_fapl_core_f(prp_id, increment, backing_store, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: increment ! File block size in bytes. - LOGICAL, INTENT(OUT) :: backing_store ! Flag to indicate that - ! entire file contents are flushed to a file - ! with the same name as this core file. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(OUT) :: increment + LOGICAL, INTENT(OUT) :: backing_store + INTEGER, INTENT(OUT) :: hdferr INTEGER :: backing_store_flag INTERFACE @@ -1522,44 +927,22 @@ CONTAINS IF (backing_store_flag .EQ. 1) backing_store =.TRUE. END SUBROUTINE h5pget_fapl_core_f -!****s* H5P/ h5pset_fapl_family_f -! NAME -! h5pset_fapl_family_f -! -! PURPOSE -! Sets the file access property list to use the family driver. -! -! INPUTS -! prp_id - file access property list identifier -! memb_size - size in bytes of each file member -! memb_plist - identifier of the file access property -! list to be used for each family member -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the file access property list to use the family driver. +!! +!! \param prp_id File access property list identifier. +!! \param memb_size Size in bytes of each file member. +!! \param memb_plist Identifier of the file access property list to be used for each family member. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: memb_size ! Logical size, in bytes, - ! of each family member - INTEGER(HID_T), INTENT(IN) :: memb_plist ! Identifier of the file - ! access property list for - ! each member of the family - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: memb_size + INTEGER(HID_T), INTENT(IN) :: memb_plist + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_fapl_family_c(prp_id, memb_size, memb_plist) & BIND(C,NAME='h5pset_fapl_family_c') @@ -1574,43 +957,22 @@ CONTAINS hdferr = h5pset_fapl_family_c(prp_id, memb_size, memb_plist) END SUBROUTINE h5pset_fapl_family_f -!****s* H5P/h5pget_fapl_family_f -! NAME -! h5pget_fapl_family_f -! -! PURPOSE -! Returns file access property list information. -! -! INPUTS -! prp_id - file access property list identifier -! OUTPUTS -! memb_size - size in bytes of each file member -! memb_plist - identifier of the file access property -! list to be used for each family member -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Returns file access property list information. +!! +!! \param prp_id File access property list identifier. +!! \param memb_size Size in bytes of each file member. +!! \param memb_plist Identifier of the file access property list to be used for each family member. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_fapl_family_f(prp_id, memb_size, memb_plist , hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: memb_size ! Logical size, in bytes, - ! of each family member - INTEGER(HID_T), INTENT(OUT) :: memb_plist ! Identifier of the file - ! access property list for - ! each member of the family - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(OUT) :: memb_size + INTEGER(HID_T), INTENT(OUT) :: memb_plist + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_fapl_family_c(prp_id, memb_size, memb_plist) & BIND(C,NAME='h5pget_fapl_family_c') @@ -1625,52 +987,26 @@ CONTAINS hdferr = h5pget_fapl_family_c(prp_id, memb_size, memb_plist) END SUBROUTINE h5pget_fapl_family_f -!****s* H5P/h5pset_cache_f -! NAME -! h5pset_cache_f -! -! PURPOSE -! Sets the meta data cache and raw data chunk -! cache parameters -! -! INPUTS -! -! prp_id - file access property list identifier -! mdc_nelmts - number of elements (objects) in the meta -! data cache -! rdcc_nelmts - number of elements (objects) in the raw -! data chunk cache -! rdcc_nbytes - total size of the raw data chunk cache, in bytes -! rdcc_w0 - preemption policy (0 or 1) -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the meta data cache and raw data chunk cache parameters +!! +!! \param prp_id File access property list identifier. +!! \param mdc_nelmts Number of elements (objects) in the metadata cache. +!! \param rdcc_nelmts Number of elements (objects) in the raw data chunk cache. +!! \param rdcc_nbytes Total size of the raw data chunk cache, in bytes. +!! \param rdcc_w0 Preemption policy (0 or 1). +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_cache_f(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: mdc_nelmts ! Number of elements (objects) - ! in the meta data cache - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts ! Number of elements (objects) - ! in the meta data cache - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! Total size of the raw data - ! chunk cache, in bytes - REAL, INTENT(IN) :: rdcc_w0 ! Preemption policy - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: mdc_nelmts + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nelmts + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes + REAL, INTENT(IN) :: rdcc_w0 + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) & BIND(C,NAME='h5pset_cache_c') @@ -1687,54 +1023,26 @@ CONTAINS hdferr = h5pset_cache_c(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0 ) END SUBROUTINE h5pset_cache_f -!****s* H5P/h5pget_cache_f -! NAME -! h5pget_cache_f -! -! PURPOSE -! Queries the meta data cache and raw data chunk cache -! parameters. -! -! INPUTS -! prp_id - file access property list identifier -! -! OUTPUTS -! mdc_nelmts - number of elements (objects) in the meta -! data cache -! rdcc_nelmts - number of elements (objects) in the raw -! data chunk cache -! rdcc_nbytes - total size of the raw data chunk cache, in bytes -! rdcc_w0 - preemption policy (0 or 1) -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Bug fix: type of the rdcc_nelmts parameter should be INTEGER -! instead of INTEGER(SIZE_T) October 10, 2003 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Queries the meta data cache and raw data chunk cache parameters. +!! +!! \param prp_id File access property list identifier. +!! \param mdc_nelmts Number of elements (objects) in the metadata cache. +!! \param rdcc_nelmts Number of elements (objects) in the raw data chunk cache. +!! \param rdcc_nbytes Total size of the raw data chunk cache, in bytes. +!! \param rdcc_w0 Preemption policy (0 or 1). +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_cache_f(prp_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: mdc_nelmts ! Number of elements (objects) - ! in the meta data cache - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts ! Number of elements (objects) - ! in the meta data cache - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data - ! chunk cache, in bytes - REAL, INTENT(OUT) :: rdcc_w0 ! Preemption policy - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: mdc_nelmts + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nelmts + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes + REAL, INTENT(OUT) :: rdcc_w0 + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) & BIND(C,NAME='h5pget_cache_c') @@ -1751,52 +1059,26 @@ CONTAINS hdferr = h5pget_cache_c(prp_id, mdc_nelmts,rdcc_nelmts, rdcc_nbytes, rdcc_w0 ) END SUBROUTINE h5pget_cache_f -!****s* H5P/h5pset_fapl_split_f -! NAME -! h5pset_fapl_split_f -! -! PURPOSE -! Emulates the old split file driver. -! -! INPUTS -! -! prp_id - file access property list identifier -! meta_ext - name of the extension for the metafile -! filename -! meta_plist - identifier of the meta file access property -! list -! raw_ext - name extension for the raw file filename -! raw_plist - identifier of the raw file access property list -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Emulates the old split file driver. +!! +!! \param prp_id File access property list identifier. +!! \param meta_ext Name of the extension for the metafile filename. +!! \param meta_plist Identifier of the meta file access property list. +!! \param raw_ext Name extension for the raw file filename. +!! \param raw_plist Identifier of the raw file access property list. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_fapl_split_f(prp_id, meta_ext, meta_plist, raw_ext, raw_plist, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: meta_ext ! Name of the extension for - ! the metafile filename - INTEGER(HID_T), INTENT(IN) :: meta_plist ! Identifier of the meta file - ! access property list - CHARACTER(LEN=*), INTENT(IN) :: raw_ext ! Name extension for the raw file filename - INTEGER(HID_T), INTENT(IN) :: raw_plist ! Identifier of the raw file - ! access property list - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: meta_ext + INTEGER(HID_T), INTENT(IN) :: meta_plist + CHARACTER(LEN=*), INTENT(IN) :: raw_ext + INTEGER(HID_T), INTENT(IN) :: raw_plist + INTEGER, INTENT(OUT) :: hdferr INTEGER :: meta_len, raw_len INTERFACE INTEGER FUNCTION h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) & @@ -1818,94 +1100,20 @@ CONTAINS hdferr = h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) END SUBROUTINE h5pset_fapl_split_f -!****s* H5P/h5pget_split_f -! NAME -! h5pget_split_f -! -! PURPOSE -! NOT AVAILABLE -! -! INPUTS -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! SOURCE -! SUBROUTINE h5pget_split_f(prp_id, meta_ext_size, meta_ext, meta_plist,raw_ext_size,& -! raw_ext, raw_plist, hdferr) -! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier -! INTEGER(SIZE_T), INTENT(IN) :: meta_ext_size ! Number of characters of the meta - ! file extension to be copied to the - ! meta_ext buffer - -! CHARACTER(LEN=*), INTENT(OUT) :: meta_ext !Name of the extension for - !the metafile filename -! INTEGER(HID_T), INTENT(OUT) :: meta_plist ! Identifier of the meta file - ! access property list -! INTEGER(SIZE_T), INTENT(IN) :: raw_ext_size ! Number of characters of the raw - ! file extension to be copied to the - ! raw_ext buffer -! CHARACTER(LEN=*), INTENT(OUT) :: raw_ext !Name extension for the raw file filename -! INTEGER(HID_T), INTENT(OUT) :: raw_plist !Identifier of the raw file - !access property list -! INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_split_c -! hdferr = h5pget_split_c(prp_id, meta_ext_size, meta_ext, meta_plist, & -! raw_ext_size, raw_ext, raw_plist ) -! END SUBROUTINE h5pget_split_f - -!****s* H5P/h5pset_gc_references_f -! NAME -! h5pset_gc_references_f -! -! PURPOSE -! Sets garbage collecting references flag. -! -! INPUTS -! -! prp_id - file access property list identifier -! gc_reference - flag for setting garbage collection on -! and off (1 or 0) -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets garbage collecting references flag. +!! +!! \param prp_id File access property list identifier. +!! \param gc_reference Flag for setting garbage collection on and off (1 or 0). +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_gc_references_f (prp_id, gc_reference, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: gc_reference ! The flag for garbage collecting - ! references for the file - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: gc_reference + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_gc_references_c(prp_id, gc_reference) & BIND(C,NAME='h5pset_gc_references_c') @@ -1919,42 +1127,20 @@ CONTAINS hdferr = h5pset_gc_references_c(prp_id, gc_reference) END SUBROUTINE h5pset_gc_references_f -!****s* H5P/h5pget_gc_references_f -! NAME -! h5pget_gc_references_f -! -! PURPOSE -! Returns garbage collecting references setting. -! -! INPUTS -! -! prp_id - file access property list identifier -! OUTPUTS -! -! gc_reference - flag for setting garbage collection on -! and off (1 or 0) -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Returns garbage collecting references setting. +!! +!! \param prp_id File access property list identifier. +!! \param gc_reference Flag for setting garbage collection on and off (1 or 0) +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_gc_references_f(prp_id, gc_reference, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: gc_reference ! The flag for garbage collecting - ! references for the file - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: gc_reference + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_gc_references_c(prp_id, gc_reference) & BIND(C,NAME='h5pget_gc_references_c') @@ -1968,49 +1154,25 @@ CONTAINS hdferr = h5pget_gc_references_c(prp_id, gc_reference) END SUBROUTINE h5pget_gc_references_f -!****s* H5P/h5pset_layout_f -! NAME -! h5pset_layout_f -! -! PURPOSE -! Sets the type of storage used store the raw data -! for a dataset. -! -! INPUTS -! -! prp_id - data creation property list identifier -! layout - type of storage layout for raw data -! possible values are: -! H5D_COMPACT_F -! H5D_CONTIGUOUS_F -! H5D_CHUNKED_F -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the type of storage used store the raw data +!! for a dataset. +!! +!! \param prp_id Data creation property list identifier. +!! \param layout Type of storage layout for raw data. Possible values are: +!! \li H5D_COMPACT_F +!! \li H5D_CONTIGUOUS_F +!! \li H5D_CHUNKED_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_layout_f (prp_id, layout, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: layout ! Type of storage layout for raw data - ! possible values are: - ! H5D_COMPACT_F - ! H5D_CONTIGUOUS_F + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: layout ! H5D_CHUNKED_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_layout_c(prp_id, layout) & BIND(C,NAME='h5pset_layout_c') @@ -2024,48 +1186,24 @@ CONTAINS hdferr = h5pset_layout_c(prp_id, layout) END SUBROUTINE h5pset_layout_f -!****s* H5P/h5pget_layout_f -! NAME -! h5pget_layout_f -! -! PURPOSE -! Returns the layout of the raw data for a dataset. -! -! INPUTS -! -! prp_id - data creation property list identifier -! OUTPUTS -! -! layout - type of storage layout for raw data -! possible values are: -! H5D_COMPACT_F -! H5D_CONTIGUOUS_F -! H5D_CHUNKED_F -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Returns the layout of the raw data for a dataset. +!! +!! \param prp_id Data creation property list identifier. +!! \param layout Type of storage layout for raw data. Possible values are: +!! \li H5D_COMPACT_F +!! \li H5D_CONTIGUOUS_F +!! \li H5D_CHUNKED_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_layout_f (prp_id, layout, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: layout ! Type of storage layout for raw data - ! possible values are: - ! H5D_COMPACT_F(0) - ! H5D_CONTIGUOUS_F(1) + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: layout ! H5D_CHUNKED_F(2) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_layout_c(prp_id, layout) & BIND(C,NAME='h5pget_layout_c') @@ -2079,44 +1217,26 @@ CONTAINS hdferr = h5pget_layout_c(prp_id, layout) END SUBROUTINE h5pget_layout_f -!****s* H5P/h5pset_filter_f -! NAME -! h5pset_filter_f -! -! PURPOSE -! Adds a filter to the filter pipeline. -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! filter - filter to be added to the pipeline -! flags - bit vector specifying certain general -! properties of the filter -! cd_nelmts - number of elements in cd_values -! cd_values - auxiliary data for the filter -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! February, 2003 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Adds a filter to the filter pipeline. +!! +!! \param prp_id Data creation or transfer property list identifier. +!! \param filter Filter to be added to the pipeline. +!! \param flags Bit vector specifying certain general properties of the filter. +!! \param cd_nelmts Number of elements in cd_values. +!! \param cd_values Auxiliary data for the filter. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: filter ! Filter to be added to the pipeline. - INTEGER, INTENT(IN) :: flags ! Bit vector specifying certain general - ! properties of the filter. - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts ! Number of elements in cd_values. - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(IN) :: flags + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) & BIND(C,NAME='h5pset_filter_c') @@ -2133,41 +1253,20 @@ CONTAINS hdferr = h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values ) END SUBROUTINE h5pset_filter_f -!****s* H5P/h5pget_nfilters_f -! NAME -! h5pget_nfilters_f -! -! PURPOSE -! Returns the number of filters in the pipeline. -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! OUTPUTS -! -! nfilters - number of filters in the pipeline -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Returns the number of filters in the pipeline. +!! +!! \param prp_id Data creation or transfer property list identifier. +!! \param nfilters Number of filters in the pipeline. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_nfilters_f (prp_id, nfilters, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: nfilters ! The number of filters in the pipeline - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: nfilters + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_nfilters_c(prp_id, nfilters) & BIND(C,NAME='h5pget_nfilters_c') @@ -2181,60 +1280,32 @@ CONTAINS hdferr = h5pget_nfilters_c(prp_id, nfilters) END SUBROUTINE h5pget_nfilters_f -!****s* H5P/h5pget_filter_f -! NAME -! h5pget_filter_f -! -! PURPOSE -! Returns information about a filter in a pipeline -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! filter_number - sequence number within the filter -! pipeline of the filter for which -! information is sought -! OUTPUTS -! -! filter_id - filter identification number -! flags - bit vector specifying certain general -! properties of the filter -! cd_nelmts - number of elements in cd_values -! cd_values - auxiliary data for the filter -! namelen - number of characters in the name buffer -! name - buffer to retrieve filter name -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Returns information about a filter in a pipeline +!! +!! \param prp_id Data creation or transfer property list identifier. +!! \param filter_number Sequence number within the filter pipeline of the filter for which information is sought. +!! \param filter_id Filter identification number. +!! \param flags Bitbit vector specifying certain general properties of the filter. +!! \param cd_nelmts Number of elements in cd_values. +!! \param cd_values Auxiliary data for the filter. +!! \param namelen Number of characters in the name buffer. +!! \param name Buffer to retrieve filter name. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_filter_f(prp_id, filter_number, flags, cd_nelmts, cd_values, namelen, name, filter_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: filter_number ! Sequence number within the filter - ! pipeline of the filter for which - ! information is sought - INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter. - INTEGER, INTENT(OUT) :: flags ! Bit vector specifying certain general - ! properties of the filter. - INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts ! Number of elements in cd_values. - INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name. - CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of the filter - INTEGER, INTENT(OUT) :: filter_id ! Filter identification number - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter_number + INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values + INTEGER, INTENT(OUT) :: flags + INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts + INTEGER(SIZE_T), INTENT(IN) :: namelen + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER, INTENT(OUT) :: filter_id + INTEGER, INTENT(OUT) :: hdferr ! INTEGER, EXTERNAL :: h5pget_filter_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -2261,50 +1332,24 @@ CONTAINS cd_values, namelen, name, filter_id ) END SUBROUTINE h5pget_filter_f -!****s* H5P/h5pset_external_f -! NAME -! h5pset_external_f -! -! PURPOSE -! Adds an external file to the list of external files. -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! name - name of external file -! offset - offset in bytes from the beginning of the -! file to the location in the file -! where the data starts -! bytes - size of the external file data. -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Changed type of 'offset' from integer to off_t -- MSB January 9, 2012 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Adds an external file to the list of external files. +!! +!! \param prp_id Dataset creation property list identifier. +!! \param name Name of external file. +!! \param offset Offset in bytes from the beginning of the file to the location in the file where the data starts. +!! \param bytes Size of the external file data. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_external_f(prp_id, name, offset, bytes, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of an external file - INTEGER(OFF_T), INTENT(IN) :: offset ! Offset, in bytes, from the beginning - ! of the file to the location in the file - ! where the data starts. - INTEGER(HSIZE_T), INTENT(IN) :: bytes ! Number of bytes reserved in the - ! file for the data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(OFF_T), INTENT(IN) :: offset + INTEGER(HSIZE_T), INTENT(IN) :: bytes + INTEGER, INTENT(OUT) :: hdferr INTEGER :: namelen INTERFACE @@ -2325,42 +1370,20 @@ CONTAINS hdferr = h5pset_external_c(prp_id, name, namelen, offset, bytes) END SUBROUTINE h5pset_external_f -!****s* H5P/h5pget_external_count_f -! NAME -! h5pget_external_count_f -! -! PURPOSE -! Returns the number of external files for a dataset. -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! OUTPUTS -! -! count - number of external files for the -! specified dataset -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Returns the number of external files for a dataset. +!! +!! \param prp_id Dataset creation property list identifier. +!! \param count Number of external files for the specified dataset. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_external_count_f (prp_id, count, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: count ! Number of external files for the - ! Specified dataset - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: count + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_external_count_c(prp_id, count) & BIND(C,NAME='h5pget_external_count_c') @@ -2374,56 +1397,28 @@ CONTAINS hdferr = h5pget_external_count_c(prp_id, count) END SUBROUTINE h5pget_external_count_f -!****s* H5P/h5pget_external_f -! NAME -! h5pget_external_f -! -! PURPOSE -! Returns information about an external file. -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! OUTPUTS -! -! idx - external file index -! name_size - maximum size of name array -! name - name of the external file -! name - name of external file -! offset - offset in bytes from the beginning of the -! file to the location in the file -! where the data starts -! bytes - size of the external file data -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Changed type of 'offset' from integer to off_t -- MSB January 9, 2012 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Returns information about an external file. +!! +!! \param prp_id Dataset creation property list identifier. +!! \param idx External file index. +!! \param name_size Maximum size of name array. +!! \param name Name of the external file. +!! \param offset Offset in bytes from the beginning of the file to the location in the file where the data starts. +!! \param bytes Size of the external file data. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_external_f(prp_id, idx, name_size, name, offset,bytes, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: idx ! External file index. - INTEGER(SIZE_T), INTENT(IN) :: name_size ! Maximum length of name array - CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of an external file - INTEGER(OFF_T), INTENT(OUT) :: offset ! Offset, in bytes, from the beginning - ! of the file to the location in the file - ! where the data starts. - INTEGER(HSIZE_T), INTENT(OUT) :: bytes ! Number of bytes reserved in the - ! file for the data - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: idx + INTEGER(SIZE_T), INTENT(IN) :: name_size + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER(OFF_T), INTENT(OUT) :: offset + INTEGER(HSIZE_T), INTENT(OUT) :: bytes + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) & BIND(C,NAME='h5pget_external_c') @@ -2442,46 +1437,24 @@ CONTAINS hdferr = h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) END SUBROUTINE h5pget_external_f -!****s* H5P/h5pset_btree_ratios_f -! NAME -! h5pset_btree_ratios_f -! -! PURPOSE -! Sets B-tree split ratios for a dataset transfer -! property list. -! -! INPUTS -! -! prp_id - the dataset transfer property list -! identifier -! left - the B-tree split ratio for left-most nodes -! middle - the B-tree split ratio for all other nodes -! right - the B-tree split ratio for right-most nodes -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets B-tree split ratios for a dataset transfer property list. +!! +!! \param prp_id The dataset transfer property list identifier. +!! \param left The B-tree split ratio for left-most nodes. +!! \param middle The B-tree split ratio for all other nodes. +!! \param right The B-tree split ratio for right-most nodes. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_btree_ratios_f(prp_id, left, middle, right, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - REAL, INTENT(IN) :: left ! The B-tree split ratio for left-most nodes. - REAL, INTENT(IN) :: middle ! The B-tree split ratio for all other nodes - REAL, INTENT(IN) :: right ! The B-tree split ratio for right-most - ! nodes and lone nodes. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + REAL, INTENT(IN) :: left + REAL, INTENT(IN) :: middle + REAL, INTENT(IN) :: right + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_btree_ratios_c(prp_id, left, middle, right) & BIND(C,NAME='h5pset_btree_ratios_c') @@ -2497,46 +1470,24 @@ CONTAINS hdferr = h5pset_btree_ratios_c(prp_id, left, middle, right) END SUBROUTINE h5pset_btree_ratios_f -!****s* H5P/h5pget_btree_ratios_f -! NAME -! h5pget_btree_ratios_f -! -! PURPOSE -! Gets B-tree split ratios for a dataset transfer property list -! -! INPUTS -! -! prp_id - the dataset transfer property list -! identifier -! OUTPUTS -! -! left - the B-tree split ratio for left-most nodes -! middle - the B-tree split ratio for all other nodes -! right - the B-tree split ratio for right-most nodes -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Gets B-tree split ratios for a dataset transfer property list +!! +!! \param prp_id The dataset transfer property list identifier. +!! \param left The B-tree split ratio for left-most nodes. +!! \param middle The B-tree split ratio for all other nodes. +!! \param right The B-tree split ratio for right-most nodes. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_btree_ratios_f(prp_id, left, middle, right, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - REAL, INTENT(OUT) :: left ! The B-tree split ratio for left-most nodes. - REAL, INTENT(OUT) :: middle ! The B-tree split ratio for all other nodes - REAL, INTENT(OUT) :: right ! The B-tree split ratio for right-most - ! nodes and lone nodes. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + REAL, INTENT(OUT) :: left + REAL, INTENT(OUT) :: middle + REAL, INTENT(OUT) :: right + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_btree_ratios_c(prp_id, left, middle, right) & BIND(C,NAME='h5pget_btree_ratios_c') @@ -2552,46 +1503,25 @@ CONTAINS hdferr = h5pget_btree_ratios_c(prp_id, left, middle, right) END SUBROUTINE h5pget_btree_ratios_f -!****s* H5P/h5pget_fclose_degree_f -! NAME -! h5pget_fclose_degree_f -! -! PURPOSE -! Returns the degree for the file close behavior. -! -! INPUTS -! -! fapl_id - File access property list identifier -! OUTPUTS -! -! degree - Possible values are: -! H5F_CLOSE_DEFAULT_F -! H5F_CLOSE_WEAK_F -! H5F_CLOSE_SEMI_F -! H5F_CLOSE_STRONG_F -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! September 26, 2002 -! -! HISTORY -! -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Returns the degree for the file close behavior. +!! +!! \param fapl_id File access property list identifier. +!! \param degree Possible values are: +!! \li H5F_CLOSE_DEFAULT_F +!! \li H5F_CLOSE_WEAK_F +!! \li H5F_CLOSE_SEMI_F +!! \li H5F_CLOSE_STRONG_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_fclose_degree_f(fapl_id, degree, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier - INTEGER, INTENT(OUT) :: degree ! Possible values are: - ! H5F_CLOSE_DEFAULT_F - ! H5F_CLOSE_WEAK_F - ! H5F_CLOSE_SEMI_F - ! H5F_CLOSE_STRONG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER, INTENT(OUT) :: degree + ! H5F_CLOSE_STRONG_F + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_fclose_degree_c(fapl_id, degree) & BIND(C,NAME='h5pget_fclose_degree_c') @@ -2605,42 +1535,25 @@ CONTAINS hdferr = h5pget_fclose_degree_c(fapl_id, degree) END SUBROUTINE h5pget_fclose_degree_f -!****s* H5P/h5pset_fclose_degree_f -! NAME -! h5pset_fclose_degree_f -! -! PURPOSE -! Sets the degree for the file close behavior. -! -! INPUTS -! -! fapl_id - file access property list identifier -! degree - Possible values are: -! H5F_CLOSE_DEFAULT_F -! H5F_CLOSE_WEAK_F -! H5F_CLOSE_SEMI_F -! H5F_CLOSE_STRONG_F -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! September 26, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the degree for the file close behavior. +!! +!! \param fapl_id File access property list identifier. +!! \param degree Possible values are: +!! \li H5F_CLOSE_DEFAULT_F +!! \li H5F_CLOSE_WEAK_F +!! \li H5F_CLOSE_SEMI_F +!! \li H5F_CLOSE_STRONG_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_fclose_degree_f(fapl_id, degree, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File Access Property list identifier - INTEGER, INTENT(IN) :: degree ! Possible values are: - ! H5F_CLOSE_DEFAULT_F - ! H5F_CLOSE_WEAK_F - ! H5F_CLOSE_SEMI_F - ! H5F_CLOSE_STRONG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER, INTENT(IN) :: degree + ! H5F_CLOSE_STRONG_F + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_fclose_degree_c(fapl_id, degree) & BIND(C,NAME='h5pset_fclose_degree_c') @@ -2654,38 +1567,22 @@ CONTAINS hdferr = h5pset_fclose_degree_c(fapl_id, degree) END SUBROUTINE h5pset_fclose_degree_f -!****s* H5P/h5pequal_f -! NAME -! h5pequal_f -! -! PURPOSE -! Checks if two property lists are equal -! -! INPUTS -! -! plist1_id - property list identifier -! plist2_id - property list identifier -! OUTPUTS -! -! flag - flag, possible values -! .TRUE. or .FALSE. -! hdferr: - error code -! Success: 0 -! Failure: -1, flag is set to .FALSE. -! -! AUTHOR -! Elena Pourmal -! September 30, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Checks if two property lists are equal +!! +!! \param plist1_id Property list identifier. +!! \param plist2_id Property list identifier. +!! \param flag Flag, Possible values: .TRUE. or .FALSE. +!! \param hdferr: \fortran_error and flag is set to .FALSE. +!! SUBROUTINE h5pequal_f(plist1_id, plist2_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist1_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: plist2_id ! Property list identifier - LOGICAL, INTENT(OUT) :: flag ! Flag - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist1_id + INTEGER(HID_T), INTENT(IN) :: plist2_id + LOGICAL, INTENT(OUT) :: flag + INTEGER, INTENT(OUT) :: hdferr INTEGER :: c_flag INTERFACE @@ -2704,36 +1601,20 @@ CONTAINS IF (c_flag .GT. 0) flag = .TRUE. END SUBROUTINE h5pequal_f -!****s* H5P/h5pset_buffer_f -! NAME -! h5pset_buffer_f -! -! PURPOSE -! Sets sixe for conversion buffer -! -! INPUTS -! plist_id - data transfer property list identifier -! size - buffer size -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 2, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets sixe for conversion buffer +!! +!! \param plist_id Data transfer property list identifier. +!! \param size Buffer size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_buffer_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Buffer size in bytes; - ! buffer is allocated and freed by - ! the library. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(IN) :: size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_buffer_c(plist_id, size) & @@ -2748,37 +1629,20 @@ CONTAINS hdferr = h5pset_buffer_c(plist_id, size) END SUBROUTINE h5pset_buffer_f -!****s* H5P/h5pget_buffer_f -! NAME -! h5pget_buffer_f -! -! PURPOSE -! Gets size for conversion buffer -! -! INPUTS -! -! plist_id - data transfer property list identifier -! OUTPUTS -! -! size - buffer size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 2, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Gets size for conversion buffer +!! +!! \param plist_id Data transfer property list identifier. +!! \param size Buffer size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_buffer_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Data transfer property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Buffer size in bytes; - ! buffer is allocated and freed by - ! the library. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_buffer_c(plist_id, size) & @@ -2793,44 +1657,25 @@ CONTAINS hdferr = h5pget_buffer_c(plist_id, size) END SUBROUTINE h5pget_buffer_f -!****s* H5P/h5pfill_value_defined_f -! NAME -! h5pfill_value_defined_f -! -! PURPOSE -! Check if fill value is defined. -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! OUTPUTS -! -! flag - fill value status flag -! Possible values are: -! H5D_FILL_VALUE_ERROR_F -! H5D_FILL_VALUE_UNDEFINED_F -! H5D_FILL_VALUE_DEFAULT_F -! H5D_FILL_VALUE_USER_DEFINED_F -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Check if fill value is defined. +!! +!! \param plist_id Dataset creation property list identifier. +!! \param flag Fill value status flag. Possible values are: +!! \li H5D_FILL_VALUE_ERROR_F +!! \li H5D_FILL_VALUE_UNDEFINED_F +!! \li H5D_FILL_VALUE_DEFAULT_F +!! \li H5D_FILL_VALUE_USER_DEFINED_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5pfill_value_defined_f(plist_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(OUT) :: flag ! Fill value status flag - ! H5D_FILL_VALUE_ERROR_F - ! H5D_FILL_VALUE_UNDEFINED_F - ! H5D_FILL_VALUE_DEFAULT_F + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: flag ! H5D_FILL_VALUE_USER_DEFINED_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pfill_value_defined_c(plist_id, flag) & BIND(C,NAME='h5pfill_value_defined_c') @@ -2844,45 +1689,25 @@ CONTAINS hdferr = h5pfill_value_defined_c(plist_id, flag) END SUBROUTINE h5pfill_value_defined_f -!****s* H5P/h5pset_alloc_time_f -! NAME -! h5pset_alloc_time_f -! -! PURPOSE -! Set space allocation time for dataset during creation. -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! flag - allocation time flag: -! H5D_ALLOC_TIME_ERROR_F -! H5D_ALLOC_TIME_DEFAULT_F -! H5D_ALLOC_TIME_EARLY_F -! H5D_ALLOC_TIME_LATE_F -! H5D_ALLOC_TIME_INCR_F -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Set space allocation time for dataset during creation. +!! +!! \param plist_id Dataset creation property list identifier. +!! \param flag Allocation time flag: Possible values are: +!! \li H5D_ALLOC_TIME_ERROR_F +!! \li H5D_ALLOC_TIME_DEFAULT_F +!! \li H5D_ALLOC_TIME_EARLY_F +!! \li H5D_ALLOC_TIME_LATE_F +!! \li H5D_ALLOC_TIME_INCR_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_alloc_time_f(plist_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(IN) :: flag ! Allocation time flag: - ! H5D_ALLOC_TIME_ERROR_F - ! H5D_ALLOC_TIME_DEFAULT_F - ! H5D_ALLOC_TIME_EARLY_F - ! H5D_ALLOC_TIME_LATE_F - ! H5D_ALLOC_TIME_INCR_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: flag + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_alloc_time_c(plist_id, flag) & @@ -2897,45 +1722,25 @@ CONTAINS hdferr = h5pset_alloc_time_c(plist_id, flag) END SUBROUTINE h5pset_alloc_time_f -!****s* H5P/h5pget_alloc_time_f -! NAME -! h5pget_alloc_time_f -! -! PURPOSE -! Get space allocation time for dataset during creation. -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! OUTPUTS -! -! flag - allocation time flag: -! H5D_ALLOC_TIME_ERROR_F -! H5D_ALLOC_TIME_DEFAULT_F -! H5D_ALLOC_TIME_EARLY_F -! H5D_ALLOC_TIME_LATE_F -! H5D_ALLOC_TIME_INCR_F -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Get space allocation time for dataset during creation. +!! +!! \param plist_id Dataset creation property list identifier. +!! \param flag Allocation time flag. Possible values are: +!! \li H5D_ALLOC_TIME_ERROR_F +!! \li H5D_ALLOC_TIME_DEFAULT_F +!! \li H5D_ALLOC_TIME_EARLY_F +!! \li H5D_ALLOC_TIME_LATE_F +!! \li H5D_ALLOC_TIME_INCR_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_alloc_time_f(plist_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(OUT) :: flag ! Allocation time flag: - ! H5D_ALLOC_TIME_ERROR_F - ! H5D_ALLOC_TIME_DEFAULT_F - ! H5D_ALLOC_TIME_EARLY_F - ! H5D_ALLOC_TIME_LATE_F - ! H5D_ALLOC_TIME_INCR_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: flag + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_alloc_time_c(plist_id, flag) & @@ -2950,41 +1755,23 @@ CONTAINS hdferr = h5pget_alloc_time_c(plist_id, flag) END SUBROUTINE h5pget_alloc_time_f -!****s* H5P/h5pset_fill_time_f -! NAME -! h5pset_fill_time_f -! -! PURPOSE -! Set fill value writing time for dataset -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! flag - fill time flag: -! H5D_FILL_TIME_ERROR_F -! H5D_FILL_TIME_ALLOC_F -! H5D_FILL_TIME_NEVER_F -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Set fill value writing time for dataset +!! +!! \param plist_id Dataset creation property list identifier. +!! \param flag Fill time flag: Possible values are: +!! \li H5D_FILL_TIME_ERROR_F +!! \li H5D_FILL_TIME_ALLOC_F +!! \li H5D_FILL_TIME_NEVER_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_fill_time_f(plist_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(IN) :: flag ! Fill time flag: - ! H5D_FILL_TIME_ERROR_F - ! H5D_FILL_TIME_ALLOC_F - ! H5D_FILL_TIME_NEVER_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: flag + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_fill_time_c(plist_id, flag) & @@ -2999,42 +1786,24 @@ CONTAINS hdferr = h5pset_fill_time_c(plist_id, flag) END SUBROUTINE h5pset_fill_time_f -!****s* H5P/h5pget_fill_time_f -! NAME -! h5pget_fill_time_f -! -! PURPOSE -! Get fill value writing time for dataset -! -! INPUTS -! -! plist_id - dataset creation property list identifier -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! OPTIONAL PARAMETERS -! -! flag - fill time flag: -! H5D_FILL_TIME_ERROR_F -! H5D_FILL_TIME_ALLOC_F -! H5D_FILL_TIME_NEVER_F -! AUTHOR -! Elena Pourmal -! October 4, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Get fill value writing time for dataset +!! +!! \param plist_id Dataset creation property list identifier. +!! +!! \param flag Fill time flag. Possible values are: +!! \li H5D_FILL_TIME_ERROR_F +!! \li H5D_FILL_TIME_ALLOC_F +!! \li H5D_FILL_TIME_NEVER_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_fill_time_f(plist_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property list identifier - INTEGER, INTENT(OUT) :: flag ! Fill time flag: - ! H5D_FILL_TIME_ERROR_F - ! H5D_FILL_TIME_ALLOC_F - ! H5D_FILL_TIME_NEVER_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: flag + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_fill_time_c(plist_id, flag) & @@ -3049,35 +1818,20 @@ CONTAINS hdferr = h5pget_fill_time_c(plist_id, flag) END SUBROUTINE h5pget_fill_time_f -!****s* H5P/ h5pset_meta_block_size_f -! NAME -! h5pset_meta_block_size_f -! -! PURPOSE -! Sets the minimum size of metadata block allocations -! -! INPUTS -! -! plist_id - file access property list identifier -! size - metadata block size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the minimum size of metadata block allocations +!! +!! \param plist_id File access property list identifier. +!! \param size Metadata block size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_meta_block_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Block size in bytes; - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(IN) :: size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_meta_block_size_c(plist_id, size) & BIND(C,NAME='h5pset_meta_block_size_c') @@ -3091,35 +1845,20 @@ CONTAINS hdferr = h5pset_meta_block_size_c(plist_id, size) END SUBROUTINE h5pset_meta_block_size_f -!****s* H5P/h5pget_meta_block_size_f -! NAME -! h5pget_meta_block_size_f -! -! PURPOSE -! Gets the minimum size of metadata block allocations -! -! INPUTS -! -! plist_id - file access property list identifier -! OUTPUTS -! -! size - metadata block size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Gets the minimum size of metadata block allocations +!! +!! \param plist_id File access property list identifier. +!! \param size Metadata block size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_meta_block_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Block size in bytes; - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_meta_block_size_c(plist_id, size) & BIND(C,NAME='h5pget_meta_block_size_c') @@ -3133,35 +1872,20 @@ CONTAINS hdferr = h5pget_meta_block_size_c(plist_id, size) END SUBROUTINE h5pget_meta_block_size_f -!****s* H5P/h5pset_sieve_buf_size_f -! NAME -! h5pset_sieve_buf_size_f -! -! PURPOSE -! Sets the maximum size of the data sieve buffer -! -! INPUTS -! -! plist_id - file access property list identifier -! size - sieve buffer size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the maximum size of the data sieve buffer +!! +!! \param plist_id File access property list identifier. +!! \param size Sieve buffer size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_sieve_buf_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Buffer size in bytes; - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_sieve_buf_size_c(plist_id, size) & BIND(C,NAME='h5pset_sieve_buf_size_c') @@ -3175,35 +1899,20 @@ CONTAINS hdferr = h5pset_sieve_buf_size_c(plist_id, size) END SUBROUTINE h5pset_sieve_buf_size_f -!****s* H5P/h5pget_sieve_buf_size_f -! NAME -! h5pget_sieve_buf_size_f -! -! PURPOSE -! Gets the maximum size of the data sieve buffer -! -! INPUTS -! -! plist_id - file access property list identifier -! OUTPUTS -! -! size - sieve buffer size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Gets the maximum size of the data sieve buffer +!! +!! \param plist_id File access property list identifier. +!! \param size Sieve buffer size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_sieve_buf_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: size ! Buffer size in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(OUT) :: size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_sieve_buf_size_c(plist_id, size) & BIND(C,NAME='h5pget_sieve_buf_size_c') @@ -3217,35 +1926,20 @@ CONTAINS hdferr = h5pget_sieve_buf_size_c(plist_id, size) END SUBROUTINE h5pget_sieve_buf_size_f -!****s* H5P/h5pset_small_data_block_size_f -! NAME -! h5pset_small_data_block_size_f -! -! PURPOSE -! Sets the minimum size of "small" raw data block -! -! INPUTS -! -! plist_id - file access property list identifier -! size - small raw data block size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the minimum size of "small" raw data block +!! +!! \param plist_id File access property list identifier. +!! \param size Small raw data block size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_small_data_block_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: size ! Small raw data block size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(IN) :: size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_small_data_block_size_c(plist_id, size) & BIND(C,NAME='h5pset_small_data_block_size_c') @@ -3259,35 +1953,20 @@ CONTAINS hdferr = h5pset_small_data_block_size_c(plist_id, size) END SUBROUTINE h5pset_small_data_block_size_f -!****s* H5P/h5pget_small_data_block_size_f -! NAME -! h5pget_small_data_block_size_f -! -! PURPOSE -! Gets the minimum size of "small" raw data block -! -! INPUTS -! -! plist_id - file access property list identifier -! OUTPUTS -! -! size - small raw data block size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Gets the minimum size of "small" raw data block +!! +!! \param plist_id File access property list identifier. +!! \param size Small raw data block size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_small_data_block_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File access property list identifier - INTEGER(HSIZE_T), INTENT(OUT) :: size ! Small raw data block size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_small_data_block_size_c(plist_id, size) & BIND(C,NAME='h5pget_small_data_block_size_c') @@ -3301,35 +1980,20 @@ CONTAINS hdferr = h5pget_small_data_block_size_c(plist_id, size) END SUBROUTINE h5pget_small_data_block_size_f -!****s* H5P/h5pset_hyper_vector_size_f -! NAME -! h5pset_hyper_vector_size_f -! -! PURPOSE -! Set the number of "I/O" vectors (vector size) -! -! INPUTS -! -! plist_id - dataset transfer property list identifier -! size - vector size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Set the number of "I/O" vectors (vector size) +!! +!! \param plist_id Dataset transfer property list identifier. +!! \param size Vector size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_hyper_vector_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Vector size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_hyper_vector_size_c(plist_id, size) & BIND(C,NAME='h5pset_hyper_vector_size_c') @@ -3343,35 +2007,20 @@ CONTAINS hdferr = h5pset_hyper_vector_size_c(plist_id, size) END SUBROUTINE h5pset_hyper_vector_size_f -!****s* H5P/ h5pget_hyper_vector_size_f -! NAME -! h5pget_hyper_vector_size_f -! -! PURPOSE -! Get the number of "I/O" vectors (vector size) -! -! INPUTS -! -! plist_id - dataset transfer property list identifier -! OUTPUTS -! -! size - vector size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Get the number of "I/O" vectors (vector size) +!! +!! \param plist_id Dataset transfer property list identifier. +!! \param size Vector size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_hyper_vector_size_f(plist_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset transfer property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: size ! Vector size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(OUT) :: size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_hyper_vector_size_c(plist_id, size) & BIND(C,NAME='h5pget_hyper_vector_size_c') @@ -3385,37 +2034,22 @@ CONTAINS hdferr = h5pget_hyper_vector_size_c(plist_id, size) END SUBROUTINE h5pget_hyper_vector_size_f -!****s* H5P/h5pexist_f -! NAME -! h5pexist_f -! -! PURPOSE -! Queries whether a property name exists in a property list or class. -! -! INPUTS -! -! prp_id - property list identifier to query -! name - name of property to check for -! OUTPUTS -! -! flag - logical flag -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Queries whether a property name exists in a property list or class. +!! +!! \param prp_id Property list identifier to query. +!! \param name Name of property to check for. +!! \param flag Logical flag. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pexist_f(prp_id, name, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - LOGICAL, INTENT(OUT) :: flag ! .TRUE. if exists, .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + LOGICAL, INTENT(OUT) :: flag + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len INTERFACE @@ -3438,41 +2072,22 @@ CONTAINS ENDIF END SUBROUTINE h5pexist_f -!****s* H5P/h5pget_size_f -! -! NAME -! h5pget_size_f -! -! PURPOSE -! Queries the size of a property value in bytes. -! -! INPUTS -! -! prp_id - property list identifier to query -! name - name of property to query -! OUTPUTS -! -! size - size of property in bytes -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! HISTORY -! -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Queries the size of a property value in bytes. +!! +!! \param prp_id Property list identifier to query. +!! \param name Name of property to query. +!! \param size Size of property in bytes. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_size_f(prp_id, name, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to query - INTEGER(SIZE_T), INTENT(OUT) :: size ! Size in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(OUT) :: size + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len INTERFACE @@ -3491,35 +2106,20 @@ CONTAINS hdferr = h5pget_size_c(prp_id, name , name_len, size) END SUBROUTINE h5pget_size_f -!****s* H5P/h5pget_npros_f -! NAME -! h5pget_npros_f -! -! PURPOSE -! Queries number of properties in property list or class -! -! INPUTS -! -! prp_id - iproperty list identifier to query -! OUTPUTS -! -! nprops - number of properties in property object -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Queries number of properties in property list or class +!! +!! \param prp_id Iproperty list identifier to query. +!! \param nprops Number of properties in property object. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_nprops_f(prp_id, nprops, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: nprops ! Number of properties - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(OUT) :: nprops + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_nprops_c(prp_id, nprops) & BIND(C,NAME='h5pget_nprops_c') @@ -3532,43 +2132,24 @@ CONTAINS hdferr = h5pget_nprops_c(prp_id, nprops) END SUBROUTINE h5pget_nprops_f -!****s* H5P/h5pget_class_name_f -! NAME -! h5pget_class_name_f -! -! PURPOSE -! Queries the name of a class. -! -! INPUTS -! -! prp_id - property list identifier to query -! OUTPUTS -! -! name - name of a class -! size - Actual length of the class name -! NOTE: If provided buffer "name" is smaller, -! than name will be truncated to fit into -! provided user buffer. -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! HISTORY -! Returned the size of name as an argument -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Queries the name of a class. +!! +!! \param prp_id Property list identifier to query. +!! \param name Name of a class. +!! \param size Actual length of the class name. +!! NOTE: If provided buffer "name" is smaller, than name will be +!! truncated to fit into provided user buffer. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_class_name_f(prp_id, name, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(OUT) :: name ! Buffer to retrieve class name - INTEGER, INTENT(OUT) :: size ! Actual length of the class name - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER, INTENT(OUT) :: size + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len INTERFACE @@ -3591,36 +2172,20 @@ CONTAINS END SUBROUTINE h5pget_class_name_f -!****s* H5P/h5pget_class_parent_f -! NAME -! h5pget_class_parent_f -! -! PURPOSE -! Retrieves the parent class of a generic property class. -! -! INPUTS -! -! prp_id - property list identifier to query -! OUTPUTS -! -! parent_id - identifier of the parent class -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Retrieves the parent class of a generic property class. +!! +!! \param prp_id Property list identifier to query. +!! \param parent_id Identifier of the parent class. +!! \param hdferr: \fortran_error +!! SUBROUTINE h5pget_class_parent_f(prp_id, parent_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(OUT) :: parent_id ! Parent class property list - ! identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: parent_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_class_parent_c(prp_id, parent_id) & BIND(C,NAME='h5pget_class_parent_c') @@ -3633,37 +2198,22 @@ CONTAINS hdferr = h5pget_class_parent_c(prp_id, parent_id) END SUBROUTINE h5pget_class_parent_f -!****s* H5P/h5pisa_class_f -! NAME -! h5pisa_class_f -! -! PURPOSE -! Determines whether a property list is a member of a class. -! -! INPUTS -! -! plist - property list identifier -! pclass - identifier of the property class -! OUTPUTS -! -! flag - .TRUE. if a member, .FALSE. otherwise -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Determines whether a property list is a member of a class. +!! +!! \param plist Property list identifier. +!! \param pclass Identifier of the property class. +!! \param flag TRUE. if a member, .FALSE. otherwise. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pisa_class_f(plist, pclass, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: pclass ! Class identifier - LOGICAL, INTENT(OUT) :: flag ! logical flag - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist + INTEGER(HID_T), INTENT(IN) :: pclass + LOGICAL, INTENT(OUT) :: flag + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pisa_class_c(plist, pclass) & BIND(C,NAME='h5pisa_class_c') @@ -3681,38 +2231,22 @@ CONTAINS ENDIF END SUBROUTINE h5pisa_class_f -!****s* H5P/h5pcopy_prop_f -! NAME -! h5pcopy_prop_f -! -! PURPOSE -! Copies a property from one list or class to another. -! -! INPUTS -! -! dst_id - Identifier of the destination property list -! src_id - Identifier of the source property list -! name - name of the property to copy -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Copies a property from one list or class to another. +!! +!! \param dst_id Identifier of the destination property list. +!! \param src_id Identifier of the source property list. +!! \param name Name of the property to copy. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pcopy_prop_f(dst_id, src_id, name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dst_id ! Destination property list - ! identifier - INTEGER(HID_T), INTENT(IN) :: src_id ! Source property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Property name - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: dst_id + INTEGER(HID_T), INTENT(IN) :: src_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len INTERFACE @@ -3731,36 +2265,20 @@ CONTAINS hdferr = h5pcopy_prop_c(dst_id, src_id, name , name_len) END SUBROUTINE h5pcopy_prop_f -!****s* H5P/h5premove_f -! NAME -! h5premove_f -! -! PURPOSE -! Removes a property from a property list. - -! -! INPUTS -! -! plid - Property list identofoer -! name - name of the property to remove -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Removes a property from a property list. +!! +!! \param plid Property list identofoer. +!! \param name Name of the property to remove. +!! \param hdferr \fortran_error +!! SUBROUTINE h5premove_f(plid, name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plid ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to remove - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plid + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len INTERFACE @@ -3778,35 +2296,20 @@ CONTAINS hdferr = h5premove_c(plid, name , name_len) END SUBROUTINE h5premove_f -!****s* H5P/h5punregister_f -! NAME -! h5punregister_f -! -! PURPOSE -! Removes a property from a property list class. -! -! INPUTS -! -! class - Property list class identifier -! name - name of the property to remove -! OUTPUTS -! -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Removes a property from a property list class. +!! +!! \param class Property list class identifier. +!! \param name Name of the property to remove. +!! \param hdferr \fortran_error +!! SUBROUTINE h5punregister_f(class, name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! name of property to remove - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len INTERFACE @@ -3824,33 +2327,18 @@ CONTAINS hdferr = h5punregister_c(class, name , name_len) END SUBROUTINE h5punregister_f -!****s* H5P/h5pclose_class_f -! NAME -! h5pclose_class_f -! -! PURPOSE -! Closes an existing property list class. -! -! INPUTS -! -! class - Property list class identifier -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Closes an existing property list class. +!! +!! \param class Property list class identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pclose_class_f(class, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: class + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pclose_class_c(class) & BIND(C,NAME='h5pclose_class_c') @@ -3862,31 +2350,18 @@ CONTAINS hdferr = h5pclose_class_c(class) END SUBROUTINE h5pclose_class_f -!****s* H5P/h5pset_shuffle_f -! NAME -! h5pset_shuffle_f -! -! PURPOSE -! Sets shuffling filter -! -! INPUTS -! prp_id - dataset creation property list identifier -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets shuffling filter +!! +!! \param prp_id Dataset creation property list identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_shuffle_f(prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_shuffle_c(prp_id) & BIND(C,NAME='h5pset_shuffle_c') @@ -3899,36 +2374,22 @@ CONTAINS END SUBROUTINE h5pset_shuffle_f -!****s* H5P/h5pset_edc_check_f -! NAME -! h5pset_edc_check_f -! -! PURPOSE -! Enables/disables error detecting -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! flag - EDC flag; possible values: -! H5Z_DISABLE_EDC_F -! H5Z_ENABLE_EDC_F -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 13, 2003 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Enables/disables error detecting +!! +!! \param prp_id Dataset creation property list identifier. +!! \param flag EDC flag. Possible values: +!! \li H5Z_DISABLE_EDC_F +!! \li H5Z_ENABLE_EDC_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_edc_check_f(prp_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: flag ! Checksum filter flag - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: flag + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_edc_check_c(prp_id, flag) & BIND(C,NAME='h5pset_edc_check_c') @@ -3942,38 +2403,22 @@ CONTAINS END SUBROUTINE h5pset_edc_check_f -!****s* H5P/h5pget_edc_check_f -! NAME -! h5pget_edc_check_f -! -! PURPOSE -! Queries error detecting -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 13, 2003 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Determines whether error-detection is enabled for dataset reads. +!! +!! \param prp_id Dataset creation property list identifier. +!! \param flag EDC flag; possible values: +!! \li H5Z_DISABLE_EDC_F +!! \li H5Z_ENABLE_EDC_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_edc_check_f(prp_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset transfer property list identifier - INTEGER, INTENT(OUT) :: flag ! Checksum filter flag - ! May have one of the following values: - ! H5Z_ERROR_EDC_F - ! H5Z_DISABLE_EDC_F - ! H5Z_ENABLE_EDC_F - ! H5Z_NO_EDC_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: flag + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_edc_check_c(prp_id, flag) & BIND(C,NAME='h5pget_edc_check_c') @@ -3987,33 +2432,18 @@ CONTAINS END SUBROUTINE h5pget_edc_check_f -!****s* H5P/h5pset_fletcher32_f -! NAME -! h5pset_fletcher32_f -! -! PURPOSE -! Sets Fletcher32 checksum of EDC for a dataset creation -! property list. -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 13, 2003 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets Fletcher32 checksum of EDC for a dataset creation property list. +!! +!! \param prp_id Dataset creation property list identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_fletcher32_f(prp_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_fletcher32_c(prp_id) & BIND(C,NAME='h5pset_fletcher32_c') @@ -4026,34 +2456,20 @@ CONTAINS END SUBROUTINE h5pset_fletcher32_f -!****s* H5P/ h5pset_family_offset_f -! NAME -! h5pset_family_offset_f -! -! PURPOSE -! Sets offset for family file driver. -! -! INPUTS -! -! prp_id - file creation property list identifier -! offset - file offset -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! 19 March 2003 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets offset for family file driver. +!! +!! \param prp_id File creation property list identifier. +!! \param offset File offset. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_family_offset_f(prp_id, offset, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HSIZE_T), INTENT(IN) :: offset ! Offset in bytes - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: offset + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_family_offset_c(prp_id, offset) & BIND(C,NAME='h5pset_family_offset_c') @@ -4067,30 +2483,47 @@ CONTAINS END SUBROUTINE h5pset_family_offset_f -!****s* H5P/h5pset_fapl_multi_l -! NAME -! h5pset_fapl_multi_l -! -! PURPOSE -! Sets up use of the multi-file driver. -! -! INPUTS -! -! prp_id - file creation property list identifier -! mem_map - mapping array -! memb_fapl - property list for each memory usage type -! memb_name - names of member file -! relax - flag -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! 20 March 2003 -! -! Fortran90 Interface: +#ifdef H5_DOXYGEN_FORTRAN + +!> +!! \ingroup FH5P +!! +!! \brief Sets up use of the multi-file driver. +!! +!! \param prp_id File creation property list identifier. +!! \param memb_map Mapping array. +!! \param memb_fapl Property list for each memory usage type. +!! \param memb_name Names of member file. +!! \param memb_addr Offsets within the virtual address space, from 0 (zero) to HADDR_MAX_F, at which each type of data storage begins. +!! \param relax Flag. +!! \param hdferr \fortran_error +!! + SUBROUTINE h5pset_fapl_multi_l(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, DIMENSION(*), INTENT(IN) :: memb_map + INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl + CHARACTER(LEN=*), DIMENSION(*), INTENT(IN) :: memb_name + REAL, DIMENSION(*), INTENT(IN) :: memb_addr + LOGICAL, INTENT(IN) :: relax + INTEGER, INTENT(OUT) :: hdferr + END SUBROUTINE h5pset_fapl_multi_l + +#else + +!> +!! \ingroup FH5P +!! +!! \brief Sets up use of the multi-file driver. +!! +!! \param prp_id File creation property list identifier. +!! \param memb_map Mapping array. +!! \param memb_fapl Property list for each memory usage type. +!! \param memb_name Names of member file. +!! \param memb_addr Offsets within the virtual address space, from 0 (zero) to HADDR_MAX_F, at which each type of data storage begins. +!! \param relax Flag. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_fapl_multi_l(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: prp_id @@ -4100,7 +2533,6 @@ CONTAINS REAL, DIMENSION(*), INTENT(IN) :: memb_addr LOGICAL, INTENT(IN) :: relax INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm INTEGER :: maxlen INTEGER :: flag = 0 @@ -4113,7 +2545,7 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, DIMENSION(*), INTENT(IN) :: memb_map INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: memb_name @@ -4132,34 +2564,20 @@ CONTAINS hdferr = h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag) END SUBROUTINE h5pset_fapl_multi_l -!****s* H5P/h5pset_fapl_multi_s -! NAME -! h5pset_fapl_multi_s -! -! PURPOSE -! Sets up use of the multi-file driver. -! -! INPUTS -! -! prp_id - file creation property list identifier -! relax - flag -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! 31 March 2003 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets up use of the multi-file driver. +!! +!! \param prp_id File creation property list identifier. +!! \param relax Flag. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_fapl_multi_s(prp_id, relax, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id LOGICAL, INTENT(IN) :: relax - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER, INTENT(OUT) :: hdferr INTEGER :: flag INTERFACE @@ -4167,7 +2585,7 @@ CONTAINS BIND(C,NAME='h5pset_fapl_multi_sc') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: flag END FUNCTION h5pset_fapl_multi_sc END INTERFACE @@ -4176,52 +2594,37 @@ CONTAINS hdferr = h5pset_fapl_multi_sc(prp_id, flag) END SUBROUTINE h5pset_fapl_multi_s -!****s* H5P/h5pget_fapl_multi_f -! NAME -! h5pget_fapl_multi_f -! -! PURPOSE -! Sets up use of the multi-file driver. -! -! INPUTS -! -! prp_id - file creation property list identifier -! OUTPUTS -! -! mem_map - mapping array -! memb_fapl - property list for each memory usage type -! memb_name - names of member file -! relax - flag -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! OPTIONAL PARAMETERS -! maxlen_out - maximum length for memb_name array element -! -! AUTHOR -! Elena Pourmal -! 24 March 2003 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets up use of the multi-file driver. +!! +!! \param prp_id File creation property list identifier. +!! \param memb_map Mapping array. +!! \param memb_fapl Property list for each memory usage type. +!! \param memb_name Names of member file. +!! \param memb_addr Offsets within the virtual address space, from 0 (zero) to HADDR_MAX_F, at which each type of data storage begins. +!! \param relax Flag. +!! \param hdferr \fortran_error +!! \param maxlen_out Maximum length for memb_name array element. +!! SUBROUTINE h5pget_fapl_multi_f(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr, maxlen_out) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl CHARACTER(LEN=*), DIMENSION(*), INTENT(OUT) :: memb_name REAL, DIMENSION(*), INTENT(OUT) :: memb_addr INTEGER, OPTIONAL, INTENT(OUT) :: maxlen_out LOGICAL, INTENT(OUT) :: relax - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER, INTENT(OUT) :: hdferr + INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm INTEGER :: maxlen INTEGER :: c_maxlen_out INTEGER :: flag INTEGER :: i -! + INTERFACE INTEGER FUNCTION h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & maxlen, memb_addr, flag, c_maxlen_out) & @@ -4229,7 +2632,7 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: memb_name @@ -4251,51 +2654,32 @@ CONTAINS IF(flag .EQ. 0) relax = .FALSE. IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out END SUBROUTINE h5pget_fapl_multi_f -!****s* H5P/h5pset_szip_f -! NAME -! h5pset_szip_f -! -! PURPOSE -! Sets up use of szip compression -! -! INPUTS -! -! prp_id - dataset creation property list identifier -! options_mask - A bit-mask conveying the desired SZIP options. -! Current valid values in Fortran are: -! H5_SZIP_EC_OM_F -! H5_SZIP_NN_OM_F -! pixels_per_block - szip parameters -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! April 10 2003 -! -! Fortran90 Interface: +#endif +!> +!! \ingroup FH5P +!! +!! \brief Sets up use of szip compression +!! +!! \param prp_id Dataset creation property list identifier. +!! \param options_mask A bit-mask conveying the desired SZIP options. Current valid values in Fortran are: +!! \li H5_SZIP_EC_OM_F +!! \li H5_SZIP_NN_OM_F +!! \param pixels_per_block Szip parameters. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_szip_f(prp_id, options_mask, pixels_per_block, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property - ! list identifier - INTEGER, INTENT(IN) :: options_mask ! A bit-mask conveying the desired - ! SZIP options - ! Current valid values in Fortran are: - ! H5_SZIP_EC_OM_F + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: options_mask ! H5_SZIP_NN_OM_F - INTEGER, INTENT(IN) :: pixels_per_block ! The number of pixels or data elements - ! in each data block - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER, INTENT(IN) :: pixels_per_block + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_szip_c(prp_id, options_mask, pixels_per_block) & BIND(C,NAME='h5pset_szip_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: prp_id INTEGER, INTENT(IN) :: options_mask INTEGER, INTENT(IN) :: pixels_per_block END FUNCTION h5pset_szip_c @@ -4304,39 +2688,20 @@ CONTAINS END SUBROUTINE h5pset_szip_f -!****s* H5P/h5pall_filters_avail_f -! NAME -! h5pall_filters_avail_f -! -! PURPOSE -! Checks if all filters set in the dataset creation -! property list are available -! -! INPUTS -! -! prp_id - data creation property list identifier -! OUTPUTS -! -! flag - .TRUE. if all filters are available -! .FALSE. otherwise -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! April 10 2003 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Checks if all filters set in the dataset creation property list are available. +!! +!! \param prp_id Data creation property list identifier. +!! \param flag .TRUE. if all filters are available, .FALSE. otherwise. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pall_filters_avail_f(prp_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property - ! list identifier - LOGICAL, INTENT(OUT) :: flag ! .TRUE. if all filters are available - ! .FALSE. otherwise - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + LOGICAL, INTENT(OUT) :: flag + INTEGER, INTENT(OUT) :: hdferr INTEGER :: status INTERFACE @@ -4354,48 +2719,30 @@ CONTAINS END SUBROUTINE h5pall_filters_avail_f -!****s* H5P/h5pget_filter_by_id_f -! NAME -! h5pget_filter_by_id_f -! -! PURPOSE -! Returns information about a filter in a pipeline -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! OUTPUTS -! -! filter_id - filter identifier -! flags - bit vector specifying certain general -! properties of the filter -! cd_nelmts - number of elements in cd_values -! cd_values - auxiliary data for the filter -! namelen - number of characters in the name buffer -! name - buffer to retrieve filter name -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! April 10 2003 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Returns information about a filter in a pipeline +!! +!! \param prp_id Data creation or transfer property list identifier. +!! \param filter_id Filter identifier. +!! \param flags Bit vector specifying certain general properties of the filter. +!! \param cd_nelmts Number of elements in cd_values. +!! \param cd_values Auxiliary data for the filter. +!! \param namelen Number of characters in the name buffer. +!! \param name Buffer to retrieve filter name. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_filter_by_id_f(prp_id, filter_id, flags, cd_nelmts, cd_values, namelen, name, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: filter_id ! Filter identifier - INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts ! Number of elements in cd_values. - INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values ! Auxiliary data for the filter. - INTEGER, INTENT(OUT) :: flags ! Bit vector specifying certain general - ! properties of the filter. - INTEGER(SIZE_T), INTENT(IN) :: namelen ! Anticipated number of characters in name. - CHARACTER(LEN=*), INTENT(OUT) :: name ! Name of the filter - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter_id + INTEGER(SIZE_T), INTENT(INOUT) :: cd_nelmts + INTEGER, DIMENSION(*), INTENT(OUT) :: cd_values + INTEGER, INTENT(OUT) :: flags + INTEGER(SIZE_T), INTENT(IN) :: namelen + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & cd_values, namelen, name) & @@ -4417,43 +2764,26 @@ CONTAINS cd_values, namelen, name) END SUBROUTINE h5pget_filter_by_id_f -!****s* H5P/h5pmodify_filter_f -! NAME -! h5pmodify_filter_f -! -! PURPOSE -! Adds a filter to the filter pipeline. -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! filter - filter to be modified -! flags - bit vector specifying certain general -! properties of the filter -! cd_nelmts - number of elements in cd_values -! cd_values - auxiliary data for the filter -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! April 10 2003 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Adds a filter to the filter pipeline. +!! +!! \param prp_id Data creation or transfer property list identifier. +!! \param filter Filter to be modified. +!! \param flags Bit vector specifying certain general properties of the filter. +!! \param cd_nelmts Number of elements in cd_values. +!! \param cd_values Auxiliary data for the filter. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pmodify_filter_f(prp_id, filter, flags, cd_nelmts, cd_values, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: filter ! Filter to be modified - INTEGER, INTENT(IN) :: flags ! Bit vector specifying certain general - ! properties of the filter - INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts ! Number of elements in cd_values - INTEGER, DIMENSION(*), INTENT(IN) :: cd_values ! Auxiliary data for the filter - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(IN) :: flags + INTEGER(SIZE_T), INTENT(IN) :: cd_nelmts + INTEGER, DIMENSION(*), INTENT(IN) :: cd_values + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) & BIND(C,NAME='h5pmodify_filter_c') @@ -4470,36 +2800,20 @@ CONTAINS hdferr = h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values ) END SUBROUTINE h5pmodify_filter_f -!****s* H5P/h5premove_filter_f -! NAME -! h5premove_filter_f -! -! PURPOSE -! Delete one or more filters from the filter pipeline. -! -! INPUTS -! -! prp_id - data creation or transfer property list -! identifier -! filter - filter to be removed -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Quincey Koziol -! January 27 2004 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Delete one or more filters from the filter pipeline. +!! +!! \param prp_id Data creation or transfer property list identifier. +!! \param filter Filter to be removed. +!! \param hdferr \fortran_error +!! SUBROUTINE h5premove_filter_f(prp_id, filter, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Dataset creation property list - ! identifier - INTEGER, INTENT(IN) :: filter ! Filter to be removed - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5premove_filter_c(prp_id, filter) & BIND(C,NAME='h5premove_filter_c') @@ -4513,41 +2827,22 @@ CONTAINS hdferr = h5premove_filter_c(prp_id, filter) END SUBROUTINE h5premove_filter_f -!****s* H5P/H5Pget_attr_phase_change_f -! NAME -! H5Pget_attr_phase_change_f -! -! PURPOSE -! Retrieves attribute storage phase change thresholds -! -! INPUTS -! -! ocpl_id - Object (dataset or group) creation property list identifier -! OUTPUTS -! -! max_compact - Maximum number of attributes to be stored in compact storage -! (Default: 8) -! min_dense - Minimum number of attributes to be stored in dense storage -! (Default: 6) -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Retrieves attribute storage phase change thresholds +!! +!! \param ocpl_id Object (dataset or group) creation property list identifier. +!! \param max_compact Maximum number of attributes to be stored in compact storage (Default: 8). +!! \param min_dense Minimum number of attributes to be stored in dense storage (Default: 6). +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier - INTEGER, INTENT(OUT) :: max_compact ! Maximum number of attributes to be stored in compact storage - ! (Default: 8) - INTEGER, INTENT(OUT) :: min_dense ! Minimum number of attributes to be stored in dense storage - ! (Default: 6) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(OUT) :: max_compact + INTEGER, INTENT(OUT) :: min_dense + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) & BIND(C,NAME='h5pget_attr_phase_change_c') @@ -4563,35 +2858,20 @@ CONTAINS hdferr = h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) END SUBROUTINE h5pget_attr_phase_change_f -!****s* H5P/H5Pset_attr_creation_order_f -! NAME -! H5Pset_attr_creation_order_f -! -! PURPOSE -! Sets tracking and indexing of attribute creation order -! -! INPUTS -! -! ocpl_id - Object creation property list identifier -! crt_order_flags - Flags specifying whether to track and index attribute creation order -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets tracking and indexing of attribute creation order +!! +!! \param ocpl_id Object creation property list identifier. +!! \param crt_order_flags Flags specifying whether to track and index attribute creation order. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_attr_creation_order_f(ocpl_id, crt_order_flags , hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier - INTEGER, INTENT(IN) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(IN) :: crt_order_flags + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) & BIND(C,NAME='h5pset_attr_creation_order_c') @@ -4606,37 +2886,20 @@ CONTAINS hdferr = H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) END SUBROUTINE h5pset_attr_creation_order_f -!****s* H5P/H5Pset_shared_mesg_nindexes_f -! NAME -! H5Pset_shared_mesg_nindexes_f -! -! PURPOSE -! Sets number of shared object header message indexes -! -! INPUTS -! -! plist_id - file creation property list -! nindexes - Number of shared object header message indexes to be available in files created with this property list -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets number of shared object header message indexes +!! +!! \param plist_id File creation property list. +!! \param nindexes Number of shared object header message indexes to be available in files created with this property list. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_shared_mesg_nindexes_f( plist_id, nindexes, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list - INTEGER, INTENT(IN) :: nindexes ! Number of shared object header message indexes - ! available in files created WITH this property list - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: nindexes + INTEGER, INTENT(OUT) :: hdferr ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE @@ -4654,41 +2917,24 @@ CONTAINS END SUBROUTINE h5pset_shared_mesg_nindexes_f -!****s* H5P/H5Pset_shared_mesg_index_f -! NAME -! H5Pset_shared_mesg_index_f -! -! PURPOSE -! Configures the specified shared object header message index -! -! INPUTS -! -! fcpl_id - File creation property list identifier. -! index_num - Index being configured. -! mesg_type_flags - Types of messages that should be stored in this index. -! min_mesg_size - Minimum message size. -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Configures the specified shared object header message index +!! +!! \param fcpl_id File creation property list identifier. +!! \param index_num Index being configured. +!! \param mesg_type_flags Types of messages that should be stored in this index. +!! \param min_mesg_size Minimum message size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_shared_mesg_index_f(fcpl_id, index_num, mesg_type_flags, min_mesg_size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fcpl_id ! file creation property list - INTEGER, INTENT(IN) :: index_num ! Index being configured. - INTEGER, INTENT(IN) :: mesg_type_flags ! Types of messages that should be stored in this index. - INTEGER, INTENT(IN) :: min_mesg_size ! Minimum message size. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! + INTEGER(HID_T), INTENT(IN) :: fcpl_id + INTEGER, INTENT(IN) :: index_num + INTEGER, INTENT(IN) :: mesg_type_flags + INTEGER, INTENT(IN) :: min_mesg_size + INTEGER, INTENT(OUT) :: hdferr ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE @@ -4707,37 +2953,20 @@ CONTAINS END SUBROUTINE h5pset_shared_mesg_index_f -!****s* H5P/H5Pget_attr_creation_order_f -! NAME -! H5Pget_attr_creation_order_f -! -! PURPOSE -! Retrieves tracking and indexing settings for attribute creation order -! -! INPUTS -! -! ocpl_id - Object (group or dataset) creation property list identifier -! -! OUTPUTS -! -! crt_order_flags - Flags specifying whether to track and index attribute creation order -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Retrieves tracking and indexing settings for attribute creation order +!! +!! \param ocpl_id Object (group or dataset) creation property list identifier. +!! \param crt_order_flags Flags specifying whether to track and index attribute creation order. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_attr_creation_order_f(ocpl_id, crt_order_flags, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (group or dataset) creation property list identifier - INTEGER, INTENT(OUT) :: crt_order_flags ! Flags specifying whether to track and index attribute creation order - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(OUT) :: crt_order_flags + INTEGER, INTENT(OUT) :: hdferr ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE @@ -4754,39 +2983,24 @@ CONTAINS END SUBROUTINE h5pget_attr_creation_order_f -!****s* H5P/H5Pget_libver_bounds_f -! NAME -! H5Pget_libver_bounds_f -! -! PURPOSE -! Retrieves the lower and upper bounds on the HDF5 library release versions that indirectly -! determine the object format versions used when creating objects in the file. -! -! INPUTS -! -! fapl_id - File access property list identifier -! low - The earliest version of the library that will be used for writing objects. -! high - The latest version of the library that will be used for writing objects. -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 10, 2020 -! -! Fortran Interface: +!> +!! \ingroup FH5P +!! +!! \brief Retrieves the lower and upper bounds on the HDF5 library release versions that indirectly +!! determine the object format versions used when creating objects in the file. +!! +!! \param fapl_id File access property list identifier. +!! \param low The earliest version of the library that will be used for writing objects. +!! \param high The latest version of the library that will be used for writing objects. +!! \param hdferr \fortran_error +!! +!! Fortran Interface: SUBROUTINE h5pget_libver_bounds_f(fapl_id, low, high, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier - INTEGER, INTENT(OUT) :: low ! The earliest version of the library that will be used for writing objects. - INTEGER, INTENT(OUT) :: high ! The latest version of the library that will be used for writing objects. - INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success and -1 on failure -!***** -! Local variables + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER, INTENT(OUT) :: low + INTEGER, INTENT(OUT) :: high + INTEGER, INTENT(OUT) :: hdferr INTEGER(ENUM_T) :: low_c, high_c INTEGER(C_INT) :: hdferr_c ! @@ -4813,38 +3027,22 @@ CONTAINS END SUBROUTINE h5pget_libver_bounds_f -!****s* H5P/H5Pset_libver_bounds_f -! NAME -! H5Pset_libver_bounds_f -! -! PURPOSE -! Sets bounds on library versions, and indirectly format versions, to be used when creating objects. -! -! INPUTS -! -! fapl_id - File access property list identifier -! low - The earliest version of the library that will be used for writing objects. -! high - The latest version of the library that will be used for writing objects. -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 18, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets bounds on library versions, and indirectly format versions, to be used when creating objects. +!! +!! \param fapl_id File access property list identifier. +!! \param low The earliest version of the library that will be used for writing objects. +!! \param high The latest version of the library that will be used for writing objects. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_libver_bounds_f(fapl_id, low, high, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier - INTEGER, INTENT(IN) :: low ! The earliest version of the library that will be used for writing objects. - INTEGER, INTENT(IN) :: high ! The latest version of the library that will be used for writing objects. - INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success and -1 on failure -!***** -! Local variables + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER, INTENT(IN) :: low + INTEGER, INTENT(IN) :: high + INTEGER, INTENT(OUT) :: hdferr INTEGER(C_INT) :: hdferr_c ! ! MS FORTRAN needs explicit interface for C functions called here. @@ -4867,36 +3065,20 @@ CONTAINS END SUBROUTINE h5pset_libver_bounds_f -!****s* H5P/H5Pset_link_creation_order_f -! NAME -! H5Pset_link_creation_order_f -! -! PURPOSE -! Sets creation order tracking and indexing for links in a group. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! crt_order_flags - Creation order flag(s) -! -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 18, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets creation order tracking and indexing for links in a group. +!! +!! \param gcpl_id Group creation property list identifier. +!! \param crt_order_flags Creation order flag(s). +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! File access property list identifier - INTEGER, INTENT(IN) :: crt_order_flags ! Creation order flag(s) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(IN) :: crt_order_flags + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_link_creation_order_c(gcpl_id, crt_order_flags) & BIND(C,NAME='h5pset_link_creation_order_c') @@ -4912,37 +3094,22 @@ CONTAINS END SUBROUTINE h5pset_link_creation_order_f -!****s* H5P/H5Pget_link_phase_change_f -! NAME -! H5Pget_link_phase_change_f -! -! PURPOSE -! Queries the settings for conversion between compact and dense groups. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! OUTPUTS -! -! max_compact - Maximum number of attributes to be stored in compact storage -! min_dense - Minimum number of attributes to be stored in dense storage -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 20, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Queries the settings for conversion between compact and dense groups. +!! +!! \param gcpl_id Group creation property list identifier. +!! \param max_compact Maximum number of attributes to be stored in compact storage. +!! \param min_dense Minimum number of attributes to be stored in dense storage. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(OUT) :: max_compact ! Maximum number of attributes to be stored in compact storage - INTEGER, INTENT(OUT) :: min_dense ! Minimum number of attributes to be stored in dense storage - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(OUT) :: max_compact + INTEGER, INTENT(OUT) :: min_dense + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) & BIND(C,NAME='h5pget_link_phase_change_c') @@ -4958,37 +3125,20 @@ CONTAINS hdferr = h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) END SUBROUTINE h5pget_link_phase_change_f -!****s* H5P/H5Pget_obj_track_times_f -! NAME -! H5Pget_obj_track_times_f -! -! PURPOSE -! Returns whether times are tracked for an object. -! -! INPUTS -! -! plist_id - property list id -! flag - object timestamp setting -! .TRUE.,.FALSE. -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 22, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Returns whether times are tracked for an object. +!! +!! \param plist_id Property list id. +!! \param flag Object timestamp setting, .TRUE. or .FALSE. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_obj_track_times_f(plist_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property - ! list identifier - LOGICAL, INTENT(OUT) :: flag ! Object timestamp setting - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + LOGICAL, INTENT(OUT) :: flag + INTEGER, INTENT(OUT) :: hdferr INTEGER :: status ! ! MS FORTRAN needs explicit interface for C functions called here. @@ -4997,7 +3147,7 @@ CONTAINS INTEGER FUNCTION h5pget_obj_track_times_c(plist_id, status) & BIND(C,NAME='h5pget_obj_track_times_c') IMPORT :: HID_T - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(OUT) :: status END FUNCTION h5pget_obj_track_times_c END INTERFACE @@ -5007,52 +3157,20 @@ CONTAINS END SUBROUTINE h5pget_obj_track_times_f -!****s* H5P/H5Pset_obj_track_times_f -! NAME -! H5Pset_obj_track_times_f -! -! PURPOSE -! Set whether the birth, access, modification & change times for -! an object are stored. -! -! Birth time is the time the object was created. Access time is -! the last time that metadata or raw data was read from this -! object. Modification time is the last time the data for -! this object was changed (either writing raw data to a dataset -! or inserting/modifying/deleting a link in a group). Change -! time is the last time the metadata for this object was written -! (adding/modifying/deleting an attribute on an object, extending -! the size of a dataset, etc). -! -! If these times are not tracked, they will be reported as -! 12:00 AM UDT, Jan. 1, 1970 (i.e. 0 seconds past the UNIX -! epoch) when queried. -! -! INPUTS -! -! plist_id - property list id -! flag - object timestamp setting -! .TRUE.,.FALSE. -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 22, 2008 -! -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Set whether the birth, access, modification & change times for an object are stored. +!! +!! \param plist_id Property list id. +!! \param flag Object timestamp setting, .TRUE. or .FALSE. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_obj_track_times_f(plist_id, flag, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Dataset creation property - ! list identifier - LOGICAL, INTENT(IN) :: flag ! Object timestamp setting - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + LOGICAL, INTENT(IN) :: flag + INTEGER, INTENT(OUT) :: hdferr INTEGER :: status ! ! MS FORTRAN needs explicit interface for C functions called here. @@ -5062,7 +3180,7 @@ CONTAINS BIND(C,NAME='h5pset_obj_track_times_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER, INTENT(IN) :: status END FUNCTION h5pset_obj_track_times_c END INTERFACE @@ -5074,41 +3192,20 @@ CONTAINS END SUBROUTINE h5pset_obj_track_times_f -!****s* H5P/H5Pset_create_inter_group_f -! NAME -! H5Pset_create_inter_group_f -! -! PURPOSE -! Specifies in property list whether to create missing intermediate groups. -! -! INPUTS -! -! lcpl_id - Link creation property list identifier -! crt_intermed_group - crt_intermed_group specifying whether -! to create intermediate groups upon the creation -! of an object -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! February 22, 2008 -! -! HISTORY -! The long subroutine name (>31) on older f90 compilers causes problems -! so had to shorten the name -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Specifies in property list whether to create missing intermediate groups. +!! +!! \param lcpl_id Link creation property list identifier. +!! \param crt_intermed_group Specifies whether to create intermediate groups upon the creation of an object. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lcpl_id ! Link creation property list identifier - INTEGER, INTENT(IN) :: crt_intermed_group ! specifying whether to create intermediate groups - ! upon the creation of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: lcpl_id + INTEGER, INTENT(IN) :: crt_intermed_group + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) & BIND(C,NAME='h5pset_create_inter_group_c') @@ -5123,36 +3220,20 @@ CONTAINS END SUBROUTINE h5pset_create_inter_group_f -!****s* H5P/H5Pget_link_creation_order_f -! NAME -! H5Pget_link_creation_order_f -! -! PURPOSE -! Queries whether link creation order is tracked and/or indexed in a group. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! -! OUTPUTS -! -! crt_order_flags - Creation order flag(s) -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Queries whether link creation order is tracked and/or indexed in a group. +!! +!! \param gcpl_id Group creation property list identifier. +!! \param crt_order_flags Creation order flag(s). +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_link_creation_order_f(gcpl_id, crt_order_flags, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(OUT) :: crt_order_flags ! Creation order flag(s) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(OUT) :: crt_order_flags + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_link_creation_order_c(gcpl_id, crt_order_flags) & BIND(C,NAME='h5pget_link_creation_order_c') @@ -5168,39 +3249,22 @@ CONTAINS END SUBROUTINE h5pget_link_creation_order_f -!****s* H5P/H5Pset_char_encoding_f -! NAME -! H5Pset_char_encoding_f -! -! PURPOSE -! Sets the character encoding used to encode a string. -! -! INPUTS -! -! plist_id - Property list identifier -! encoding - Valid values for encoding are: -! H5T_CSET_ASCII_F -> US ASCII -! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding -! -! OUTPUTS -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the character encoding used to encode a string. +!! +!! \param plist_id Property list identifier. +!! \param encoding Valid values for encoding are: +!! \li H5T_CSET_ASCII_F -> US ASCII +!! \li H5T_CSET_UTF8_F -> UTF-8 Unicode encoding +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_char_encoding_f(plist_id, encoding, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier - INTEGER, INTENT(IN) :: encoding ! String encoding character set: - ! H5T_CSET_ASCII_F -> US ASCII - ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: encoding + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_char_encoding_c(plist_id, encoding) & BIND(C,NAME='h5pset_char_encoding_c') @@ -5216,41 +3280,23 @@ CONTAINS END SUBROUTINE h5pset_char_encoding_f -!****s* H5P/H5Pget_char_encoding_f -! NAME -! H5Pget_char_encoding_f -! -! PURPOSE -! Retrieves the character encoding used to create a string -! -! INPUTS -! -! plist_id - Property list identifier -! -! OUTPUTS -! -! encoding - Valid values for encoding are: -! H5T_CSET_ASCII_F -> US ASCII -! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Retrieves the character encoding used to create a string +!! +!! \param plist_id Property list identifier. +!! \param encoding Valid values for encoding are: +!! \li H5T_CSET_ASCII_F -> US ASCII +!! \li H5T_CSET_UTF8_F -> UTF-8 Unicode encoding +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_char_encoding_f(plist_id, encoding, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier + INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(OUT) :: encoding ! Valid values for encoding are: - ! H5T_CSET_ASCII_F -> US ASCII - ! H5T_CSET_UTF8_F -> UTF-8 Unicode encoding - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER, INTENT(OUT) :: encoding + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_char_encoding_c(plist_id, encoding) & BIND(C,NAME='h5pget_char_encoding_c') @@ -5266,43 +3312,22 @@ CONTAINS END SUBROUTINE h5pget_char_encoding_f -!****s* H5P/h5pset_copy_object_f -! NAME -! h5pset_copy_object_f -! -! PURPOSE -! Sets properties to be used when an object is copied. -! -! INPUTS -! -! ocp_plist_id - Object copy property list identifier -! copy_options - Copy option(s) to be set -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! HISTORY -! -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets properties to be used when an object is copied. +!! +!! \param ocp_plist_id Object copy property list identifier. +!! \param copy_options Copy option(s) to be set. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_copy_object_f(ocp_plist_id, copy_options, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier - INTEGER, INTENT(IN) :: copy_options ! Copy option(s) to be set, valid options are: - ! H5O_COPY_SHALLOW_HIERARCHY_F - ! H5O_COPY_EXPAND_SOFT_LINK_F - ! H5O_COPY_EXPAND_EXT_LINK_F + INTEGER(HID_T), INTENT(IN) :: ocp_plist_id + INTEGER, INTENT(IN) :: copy_options ! H5O_COPY_EXPAND_REFERENCE_F ! H5O_COPY_WITHOUT_ATTR_FLAG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_copy_object_c(ocp_plist_id, copy_options) & BIND(C,NAME='h5pset_copy_object_c') @@ -5315,43 +3340,22 @@ CONTAINS hdferr = h5pset_copy_object_c(ocp_plist_id, copy_options) END SUBROUTINE h5pset_copy_object_f -!****s* H5P/h5pget_copy_object_f -! NAME -! h5pget_copy_object_f -! -! PURPOSE -! Retrieves the properties to be used when an object is copied. -! -! INPUTS -! -! ocp_plist_id - Object copy property list identifier -! OUTPUTS -! -! copy_options - Copy option(s) to be get -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 3, 2008 -! -! HISTORY -! -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Retrieves the properties to be used when an object is copied. +!! +!! \param ocp_plist_id Object copy property list identifier. +!! \param copy_options Copy option(s) to be get. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_copy_object_f(ocp_plist_id, copy_options, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocp_plist_id ! Object copy property list identifier - INTEGER, INTENT(OUT) :: copy_options ! Valid copy options returned are: - ! H5O_COPY_SHALLOW_HIERARCHY_F - ! H5O_COPY_EXPAND_SOFT_LINK_F - ! H5O_COPY_EXPAND_EXT_LINK_F + INTEGER(HID_T), INTENT(IN) :: ocp_plist_id + INTEGER, INTENT(OUT) :: copy_options ! H5O_COPY_EXPAND_REFERENCE_F ! H5O_COPY_WITHOUT_ATTR_FLAG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_copy_object_c(ocp_plist_id, copy_options) & BIND(C,NAME='h5pget_copy_object_c') @@ -5364,43 +3368,25 @@ CONTAINS hdferr = h5pget_copy_object_c(ocp_plist_id, copy_options) END SUBROUTINE h5pget_copy_object_f -!****s* H5P/h5pget_data_transform_f -! NAME -! h5pget_data_transform_f -! -! PURPOSE -! Retrieves a data transform expression. -! -! INPUTS -! -! plist_id - Identifier of the property list or class -! OUTPUTS -! -! expression - buffer to hold transform expression -! hdferr - Error code -! Success: Actual length of the expression -! If provided buffer "expression" is -! smaller, than expression will be -! truncated to fit into -! provided user buffer -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 19, 2008 -! -! HISTORY -! -! Should hdferr return just 0 or 1 and add another argument for the size? -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Retrieves a data transform expression. +!! +!! \param plist_id Identifier of the property list or class. +!! \param expression Buffer to hold transform expression. +!! \param hdferr Error code: +!! Success: Actual length of the expression. If provided buffer "expression" is +!! smaller, than expression will be truncated to fit into provided user buffer. +!! Failure: -1 +!! \param size Registered size of the transform expression. +!! SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Identifier of the property list or class - CHARACTER(LEN=*), INTENT(OUT) :: expression ! Buffer to hold transform expression - INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: size ! Registered size of the transform expression - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + CHARACTER(LEN=*), INTENT(OUT) :: expression + INTEGER(SIZE_T), INTENT(OUT), OPTIONAL :: size + INTEGER, INTENT(OUT) :: hdferr INTEGER :: expression_len INTEGER(SIZE_T) :: size_default @@ -5426,35 +3412,20 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) END SUBROUTINE h5pget_data_transform_f -!****s* H5P/h5pset_data_transform_f -! NAME -! h5pset_data_transform_f -! -! PURPOSE -! Sets a data transform expression. -! -! INPUTS -! -! plist_id - Identifier of the property list or class -! expression - Buffer to hold transform expression -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 19, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets a data transform expression. +!! +!! \param plist_id Identifier of the property list or class. +!! \param expression Buffer to hold transform expression. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_data_transform_f(plist_id, expression, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Identifier of the property list or class - CHARACTER(LEN=*), INTENT(IN) :: expression ! Buffer to hold transform expression - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: plist_id + CHARACTER(LEN=*), INTENT(IN) :: expression + INTEGER, INTENT(OUT) :: hdferr INTEGER :: expression_len INTERFACE @@ -5474,35 +3445,20 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) END SUBROUTINE h5pset_data_transform_f -!****s* H5P/H5Pget_local_heap_size_hint_f -! NAME -! H5Pget_local_heap_size_hint_f -! -! PURPOSE -! Queries the local heap size hint for original-style groups. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! OUTPUTS -! -! size_hint - Hint for size of local heap -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Queries the local heap size hint for original-style groups. +!! +!! \param gcpl_id Group creation property list identifier. +!! \param size_hint Hint for size of local heap. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_local_heap_size_hint_f(gcpl_id, size_hint, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: size_hint ! Hint for size of local heap - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER(SIZE_T), INTENT(OUT) :: size_hint + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_local_heap_size_hint_c(gcpl_id, size_hint) & BIND(C,NAME='h5pget_local_heap_size_hint_c') @@ -5517,40 +3473,22 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) END SUBROUTINE h5pget_local_heap_size_hint_f -!****s* H5P/H5Pget_est_link_info_f -! NAME -! H5Pget_est_link_info_f -! -! PURPOSE -! Queries data required to estimate required local heap or object header size. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! OUTPUTS -! -! est_num_entries - Estimated number of links to be inserted into group -! est_name_len - Estimated average length of link names -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! HISTORY -! -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Queries data required to estimate required local heap or object header size. +!! +!! \param gcpl_id Group creation property list identifier. +!! \param est_num_entries Estimated number of links to be inserted into group. +!! \param est_name_len Estimated average length of link names. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(OUT) :: est_num_entries ! Estimated number of links to be inserted into group - INTEGER, INTENT(OUT) :: est_name_len ! Estimated average length of link names - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(OUT) :: est_num_entries + INTEGER, INTENT(OUT) :: est_name_len + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) & BIND(C,NAME='h5pget_est_link_info_c') @@ -5566,35 +3504,20 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) END SUBROUTINE h5pget_est_link_info_f -!****s* H5P/H5Pset_local_heap_size_hint_f -! NAME -! H5Pset_local_heap_size_hint_f -! -! PURPOSE -! Sets the local heap size hint for original-style groups. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! size_hint - Hint for size of local heap -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the local heap size hint for original-style groups. +!! +!! \param gcpl_id Group creation property list identifier. +!! \param size_hint Hint for size of local heap. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_local_heap_size_hint_f(gcpl_id, size_hint, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER(SIZE_T), INTENT(IN) :: size_hint ! Hint for size of local heap - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER(SIZE_T), INTENT(IN) :: size_hint + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_local_heap_size_hint_c(gcpl_id, size_hint) & BIND(C,NAME='h5pset_local_heap_size_hint_c') @@ -5609,37 +3532,22 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) END SUBROUTINE h5pset_local_heap_size_hint_f -!****s* H5P/h5pset_est_link_info_f -! NAME -! h5pset_est_link_info_f -! -! PURPOSE -! Sets estimated number of links and length of link names in a group. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! est_num_entries - Estimated number of links to be inserted into group -! est_name_len - Estimated average length of link names -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets estimated number of links and length of link names in a group. +!! +!! \param gcpl_id Group creation property list identifier. +!! \param est_num_entries Estimated number of links to be inserted into group. +!! \param est_name_len Estimated average length of link names. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_est_link_info_f(gcpl_id, est_num_entries, est_name_len, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(IN) :: est_num_entries ! Estimated number of links to be inserted into group - INTEGER, INTENT(IN) :: est_name_len ! Estimated average length of link names - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(IN) :: est_num_entries + INTEGER, INTENT(IN) :: est_name_len + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) & BIND(C,NAME='h5pset_est_link_info_c') @@ -5655,37 +3563,22 @@ SUBROUTINE h5pget_data_transform_f(plist_id, expression, hdferr, size) END SUBROUTINE h5pset_est_link_info_f -!****s* H5P/h5pset_link_phase_change_f -! NAME -! h5pset_link_phase_change_f -! -! PURPOSE -! Sets the parameters for conversion between compact and dense groups. -! -! INPUTS -! -! gcpl_id - Group creation property list identifier -! max_compact - Maximum number of attributes to be stored in compact storage -! min_dense - Minimum number of attributes to be stored in dense storage -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the parameters for conversion between compact and dense groups. +!! +!! \param gcpl_id Group creation property list identifier. +!! \param max_compact Maximum number of attributes to be stored in compact storage. +!! \param min_dense Minimum number of attributes to be stored in dense storage. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: gcpl_id ! Group creation property list identifier - INTEGER, INTENT(IN) :: max_compact ! Maximum number of attributes to be stored in compact storage - INTEGER, INTENT(IN) :: min_dense ! Minimum number of attributes to be stored in dense storage - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(IN) :: max_compact + INTEGER, INTENT(IN) :: min_dense + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) & BIND(C,NAME='h5pset_link_phase_change_c') @@ -5700,39 +3593,24 @@ SUBROUTINE h5pset_link_phase_change_f(gcpl_id, max_compact, min_dense, hdferr) hdferr = h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) END SUBROUTINE h5pset_link_phase_change_f -!****s* H5P/h5pset_fapl_direct_f -! NAME -! h5pset_fapl_direct_f -! -! PURPOSE -! Sets up use of the direct I/O driver. -! -! INPUTS -! -! fapl_id - File access property list identifier -! alignment - Required memory alignment boundary -! block_size - File system block size -! cbuf_size - Copy buffer size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets up use of the direct I/O driver. +!! +!! \param fapl_id File access property list identifier. +!! \param alignment Required memory alignment boundary. +!! \param block_size File system block size. +!! \param cbuf_size Copy buffer size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(IN) :: alignment ! Required memory alignment boundary! - INTEGER(SIZE_T), INTENT(IN) :: block_size ! File system block size - INTEGER(SIZE_T), INTENT(IN) :: cbuf_size ! Copy buffer size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER(SIZE_T), INTENT(IN) :: alignment + INTEGER(SIZE_T), INTENT(IN) :: block_size + INTEGER(SIZE_T), INTENT(IN) :: cbuf_size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) & BIND(C,NAME='h5pset_fapl_direct_c') @@ -5748,39 +3626,24 @@ SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdfer hdferr = H5Pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) END SUBROUTINE h5pset_fapl_direct_f -!****s* H5P/h5pget_fapl_direct_f -! NAME -! h5pget_fapl_direct_f -! -! PURPOSE -! Gets up use of the direct I/O driver. -! -! INPUTS -! -! fapl_id - File access property list identifier -! OUTPUTS -! -! alignment - Required memory alignment boundary -! block_size - File system block size -! cbuf_size - Copy buffer size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Gets up use of the direct I/O driver. +!! +!! \param fapl_id File access property list identifier. +!! \param alignment Required memory alignment boundary. +!! \param block_size File system block size. +!! \param cbuf_size Copy buffer size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: alignment ! Required memory alignment boundary! - INTEGER(SIZE_T), INTENT(OUT) :: block_size ! File system block size - INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size ! Copy buffer size - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER(SIZE_T), INTENT(OUT) :: alignment + INTEGER(SIZE_T), INTENT(OUT) :: block_size + INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) & BIND(C,NAME='h5pget_fapl_direct_c') @@ -5794,43 +3657,25 @@ SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdfer END INTERFACE hdferr = H5Pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) + END SUBROUTINE h5pget_fapl_direct_f -!****s* H5P/H5Pset_attr_phase_change_f -! NAME -! H5Pset_attr_phase_change_f -! -! PURPOSE -! Sets attribute storage phase change thresholds. -! -! INPUTS -! -! ocpl_id - Object (dataset or group) creation property list identifier -! OUTPUTS -! -! max_compact - Maximum number of attributes to be stored in compact storage -! (Default: 8) -! min_dense - Minimum number of attributes to be stored in dense storage -! (Default: 6) -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets attribute storage phase change thresholds. +!! +!! \param ocpl_id Object (dataset or group) creation property list identifier. +!! \param max_compact Maximum number of attributes to be stored in compact storage, (Default: 8). +!! \param min_dense Minimum number of attributes to be stored in dense storage, (Default: 6). +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: ocpl_id ! Object (dataset or group) creation property list identifier - INTEGER, INTENT(IN) :: max_compact ! Maximum number of attributes to be stored in compact storage - !(Default: 8) - INTEGER, INTENT(IN) :: min_dense ! Minimum number of attributes to be stored in dense storage - ! (Default: 6) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(IN) :: max_compact + INTEGER, INTENT(IN) :: min_dense + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) & BIND(C,NAME='h5pset_attr_phase_change_c') @@ -5845,32 +3690,20 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) - END SUBROUTINE h5pset_attr_phase_change_f -!****s* H5P/H5Pset_nbit_f -! NAME -! H5Pset_nbit_f -! -! PURPOSE -! Sets up the use of the N-Bit filter. -! -! Inputs: -! plist_id - Dataset creation property list identifier. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets up the use of the N-Bit filter. +!! +!! \param plist_id Dataset creation property list identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_nbit_f(plist_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER , INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION H5Pset_nbit_c(plist_id) & BIND(C,NAME='h5pset_nbit_c') @@ -5884,37 +3717,25 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pset_nbit_f -!****s* H5P/h5pset_scaleoffset_f -! NAME -! h5pset_scaleoffset_f -! -! PURPOSE -! Sets up the use of the scale-offset filter. -! -! Inputs: -! plist_id - Dataset creation property list identifier. -! scale_type - Flag indicating compression method. Valid values: -! H5Z_SO_FLOAT_DSCALE_F -! H5Z_SO_FLOAT_ESCALE_F -! H5Z_SO_INT_F -! -! scale_factor - Parameter related to scale. -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! March 21, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets up the use of the scale-offset filter. +!! +!! \param plist_id Dataset creation property list identifier. +!! \param scale_type Flag indicating compression method. Valid values: +!! \li H5Z_SO_FLOAT_DSCALE_F +!! \li H5Z_SO_FLOAT_ESCALE_F +!! \li H5Z_SO_INT_F +!! \param scale_factor Parameter related to scale. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_scaleoffset_f(plist_id, scale_type, scale_factor, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plist_id INTEGER , INTENT(IN) :: scale_type INTEGER , INTENT(IN) :: scale_factor INTEGER , INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5pset_scaleoffset_c(plist_id, scale_type, scale_factor) & @@ -5931,39 +3752,20 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pset_scaleoffset_f -!****s* H5P/h5pset_nlinks_f -! NAME -! h5pset_nlinks_f -! -! PURPOSE -! Sets maximum number of soft or user-defined link traversals. -! -! INPUTS -! -! lapl_id - File access property list identifier -! nlinks - Maximum number of links to traverse -! -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 24, 2008 -! -! HISTORY -! -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets maximum number of soft or user-defined link traversals. +!! +!! \param lapl_id File access property list identifier. +!! \param nlinks Maximum number of links to traverse. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_nlinks_f(lapl_id, nlinks, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(IN) :: nlinks ! Maximum number of links to traverse - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: lapl_id + INTEGER(SIZE_T), INTENT(IN) :: nlinks + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_nlinks_c(lapl_id, nlinks) & BIND(C,NAME='h5pset_nlinks_c') @@ -5978,36 +3780,20 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pset_nlinks_f -!****s* H5P/h5pget_nlinks_f -! NAME -! h5pget_nlinks_f -! -! PURPOSE -! Gets maximum number of soft or user-defined link traversals. -! -! INPUTS -! -! lapl_id - File access property list identifier -! nlinks - Maximum number of links to traverse -! -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! March 24, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Gets maximum number of soft or user-defined link traversals. +!! +!! \param lapl_id File access property list identifier. +!! \param nlinks Maximum number of links to traverse. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_nlinks_f(lapl_id, nlinks, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lapl_id ! File access property list identifier - INTEGER(SIZE_T), INTENT(OUT) :: nlinks ! Maximum number of links to traverse - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: lapl_id + INTEGER(SIZE_T), INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_nlinks_c(lapl_id, nlinks) & BIND(C,NAME='h5pget_nlinks_c') @@ -6022,41 +3808,20 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_nlinks_f -!****s* H5P/H5Pget_create_inter_group_f -! NAME -! H5Pget_create_inter_group_f -! -! PURPOSE -! Determines whether property is set to enable creating missing intermediate groups. -! -! INPUTS -! -! lcpl_id - Link creation property list identifier -! crt_intermed_group - Specifying whether to create intermediate groups upon -! the creation of an object -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! April 4, 2008 -! -! HISTORY -! -! The long subroutine name (>31) on older f90 compilers causes problems -! so the name was shortened -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Determines whether property is set to enable creating missing intermediate groups. +!! +!! \param lcpl_id Link creation property list identifier. +!! \param crt_intermed_group Specifying whether to create intermediate groups upon the creation of an object. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_create_inter_group_f(lcpl_id, crt_intermed_group, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: lcpl_id ! Link creation property list identifier - INTEGER, INTENT(IN) :: crt_intermed_group ! Flag specifying whether to create intermediate groups - ! upon creation of an object - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: lcpl_id + INTEGER, INTENT(IN) :: crt_intermed_group + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) & BIND(C,NAME='h5pget_create_inter_group_c') @@ -6071,59 +3836,39 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_create_inter_group_f -!****s* H5P/H5Pset_chunk_cache_f -! NAME -! H5Pset_chunk_cache_f -! -! PURPOSE -! Set the number of objects in the meta data cache and the -! maximum number of chunks and bytes in the raw data chunk cache. -! Once set, these values will override the values in the file access -! property list. Each of these values can be individually unset -! (or not set at all) by passing the macros: -! H5D_CHUNK_CACHE_NSLOTS_DFLT_F, -! H5D_CHUNK_CACHE_NBYTES_DFLT_F, and/or -! H5D_CHUNK_CACHE_W0_DFLT_F -! as appropriate. -! -! The RDCC_W0 value should be between 0 and 1 inclusive and -! indicates how much chunks that have been fully read or fully -! written are favored for preemption. A value of zero means -! fully read or written chunks are treated no differently than -! other chunks (the preemption is strictly LRU) while a value -! of one means fully read chunks are always preempted before -! other chunks. -! -! INPUTS -! -! dapl_id - Dataset access property list identifier. -! rdcc_nslots - The number of chunk slots in the raw data chunk cache for this dataset. -! rdcc_nbytes - The total size of the raw data chunk cache for this dataset. -! rdcc_w0 - The chunk preemption policy for this dataset. -! OUTPUTS -! -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! April 13, 2009 -! -! HISTORY -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Set the number of objects in the meta data cache and the maximum number of chunks and bytes in the raw data chunk cache. +!! Once set, these values will override the values in the file access +!! property list. Each of these values can be individually unset +!! (or not set at all) by passing the macros: +!! H5D_CHUNK_CACHE_NSLOTS_DFLT_F, +!! H5D_CHUNK_CACHE_NBYTES_DFLT_F, and/or +!! H5D_CHUNK_CACHE_W0_DFLT_F +!! as appropriate. +!! +!! The RDCC_W0 value should be between 0 and 1 inclusive and +!! indicates how much chunks that have been fully read or fully +!! written are favored for preemption. A value of zero means +!! fully read or written chunks are treated no differently than +!! other chunks (the preemption is strictly LRU) while a value +!! of one means fully read chunks are always preempted before +!! other chunks. +!! +!! \param dapl_id Dataset access property list identifier. +!! \param rdcc_nslots The number of chunk slots in the raw data chunk cache for this dataset. +!! \param rdcc_nbytes The total size of the raw data chunk cache for this dataset. +!! \param rdcc_w0 The chunk preemption policy for this dataset. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots ! The number of chunk slots in the raw data - ! chunk cache for this dataset. - INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes ! The total size of the raw data chunk cache - ! for this dataset. - REAL, INTENT(IN) :: rdcc_w0 ! The chunk preemption policy for this dataset. - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: dapl_id + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nslots + INTEGER(SIZE_T), INTENT(IN) :: rdcc_nbytes + REAL, INTENT(IN) :: rdcc_w0 + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) & @@ -6141,47 +3886,24 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pset_chunk_cache_f -!****s* H5P/H5Pget_chunk_cache_f -! NAME -! H5Pget_chunk_cache_f -! -! PURPOSE -! Retrieves the maximum possible number of elements in the meta -! data cache and the maximum possible number of elements and -! bytes and the RDCC_W0 value in the raw data chunk cache. Any -! (or all) arguments may be null pointers in which case the -! corresponding datum is not returned. If these properties have -! not been set on this property list, the default values for a -! file access property list are returned. -! -! INPUTS -! -! dapl_id - Dataset access property list identifier. -! OUTPUTS -! -! rdcc_nslots - Number of chunk slots in the raw data chunk cache hash table. -! rdcc_nbytes - Total size of the raw data chunk cache, in bytes. -! rdcc_w0 - Preemption policy. -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! M. Scot Breitenfeld -! April 13, 2009 -! -! HISTORY -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Retrieves the raw data chunk cache parameters. +!! +!! \param dapl_id Dataset access property list identifier. +!! \param rdcc_nslots Number of chunk slots in the raw data chunk cache hash table. +!! \param rdcc_nbytes Total size of the raw data chunk cache, in bytes. +!! \param rdcc_w0 Preemption policy. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_chunk_cache_f(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dapl_id ! Dataset access property list identifier. - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots ! Number of chunk slots in the raw data chunk cache hash table. - INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes ! Total size of the raw data chunk cache, in bytes. - REAL, INTENT(OUT) :: rdcc_w0 ! Preemption policy. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** + INTEGER(HID_T), INTENT(IN) :: dapl_id + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nslots + INTEGER(SIZE_T), INTENT(OUT) :: rdcc_nbytes + REAL, INTENT(OUT) :: rdcc_w0 + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) & BIND(C,NAME='h5pget_chunk_cache_c') @@ -6198,59 +3920,288 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_chunk_cache_f -! -!****s* H5P (F03)/h5pset_fill_value_f_F90 -! -! NAME -! h5pset_fill_value_f -! -! PURPOSE -! Sets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! fillvalue - Fillvalue -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pset(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran90 Interface: -!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! IMPLICIT NONE -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(VOID) , INTENT(IN) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** +#ifdef H5_DOXYGEN_FORTRAN +!> +!! \ingroup FH5P +!! +!! \brief Sets fill value for a dataset creation property list +!! +!! \note \fortran_approved +!! +!! \param prp_id Property list identifier. +!! \param type_id Datatype identifier of fill value datatype (in memory). +!! \param fillvalue Fillvalue. +!! \param hdferr \fortran_error +!! + SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + TYPE(C_PTR) , INTENT(IN) :: fillvalue + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE h5pset_fill_value_f + +!> +!! \ingroup FH5P +!! +!! \brief Gets fill value for a dataset creation property list +!! +!! \note \fortran_approved +!! +!! \param prp_id Property list identifier. +!! \param type_id Datatype identifier of fill value datatype (in memory). +!! \param fillvalue Fillvalue. +!! \param hdferr \fortran_error +!! + SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + TYPE(C_PTR) , INTENT(IN) :: fillvalue + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE h5pget_fill_value_f + +!> +!! \ingroup FH5P +!! +!! \brief Sets fill value for a dataset creation property list +!! +!! \note \fortran_obsolete +!! +!! \param prp_id Property list identifier. +!! \param type_id Datatype identifier of fill value datatype (in memory). +!! \param fillvalue Fillvalue. +!! \param hdferr \fortran_error +!! + SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + TYPE(TYPE) , INTENT(IN) :: fillvalue + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE h5pset_fill_value_f + +!> +!! \ingroup FH5P +!! +!! \brief Gets fill value for a dataset creation property list. +!! +!! \note \fortran_obsolete +!! +!! \param prp_id Property list identifier. +!! \param type_id Datatype identifier of fill value datatype (in memory). +!! \param fillvalue Fillvalue. +!! \param hdferr \fortran_error +!! + SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + TYPE(TYPE) , INTENT(OUT) :: fillvalue + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE h5pget_fill_value_f + +!> +!! \ingroup FH5P +!! +!! \brief Sets a property list value. +!! +!! \note \fortran_approved +!! +!! \param prp_id Property list identifier to modify. +!! \param name Name of property to modify. +!! \param value Pointer to value to set the property to. +!! \param hdferr \fortran_error +!! + SUBROUTINE h5pset_f(prp_id, name, value, hdferr) + INTEGER(HID_T) , INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(C_PTR) , INTENT(IN) :: value + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE h5pset_f + +!> +!! \ingroup FH5P +!! +!! \brief Sets a property list value. +!! +!! \note \fortran_obsolete +!! +!! \param prp_id Property list identifier to modify. +!! \param name Name of property to modify. +!! \param value Property value, supported types are: +!! \li INTEGER +!! \li REAL +!! \li DOUBLE PRECISION +!! \li CHARACTER(LEN=*) +!! \param hdferr \fortran_error +!! + SUBROUTINE h5pset_f(prp_id, name, value, hdferr) + INTEGER(HID_T) , INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER , INTENT(IN) :: value + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE h5pset + +!> +!! \ingroup FH5P +!! +!! \brief Sets a property list value. +!! +!! \note \fortran_obsolete +!! +!! \param prp_id Property list identifier to modify. +!! \param name Name of property to modify. +!! \param value Property value, supported types are: +!! \li INTEGER +!! \li REAL +!! \li DOUBLE PRECISION +!! \li CHARACTER(LEN=*) +!! \param hdferr \fortran_error +!! + SUBROUTINE h5pset_f(prp_id, name, value, hdferr) + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr + END SUBROUTINE h5pset_f +!> +!! \ingroup FH5P +!! +!! \brief Queries the value of a property. +!! +!! \note \fortran_approved +!! +!! \param prp_id Property list identifier to modify. +!! \param name Name of property to get. +!! \param value Pointer to a location to which to copy the value of of the property. +!! \param hdferr \fortran_error +!! + SUBROUTINE h5pget_f(prp_id, name, value, hdferr) + INTEGER(HID_T) , INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(C_PTR) , INTENT(OUT) :: value + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE h5pget_f + +!> +!! \ingroup FH5P +!! +!! \brief Queries the value of a property. +!! +!! \note \fortran_obsolete +!! +!! \param prp_id Property list identifier to modify. +!! \param name Name of property to get. +!! \param value Property value, supported types are: +!! \li INTEGER +!! \li REAL +!! \li DOUBLE PRECISION +!! \li CHARACTER(LEN=*) +!! \param hdferr \fortran_error +!! + SUBROUTINE h5pget_f(prp_id, name, value, hdferr) + INTEGER(HID_T) , INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER , INTENT(OUT) :: value + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE h5pget_f +!> +!! \ingroup FH5P +!! +!! \brief Registers a permanent property with a property list class. +!! +!! \note \fortran_approved +!! +!! \param class Property list class identifier. +!! \param name Name of property to register. +!! \param size Size of the property value. +!! \param value Pointer to value to set the property to. +!! \param hdferr \fortran_error +!! + SUBROUTINE h5pregister_f(class, name, size, value, hdferr) + INTEGER(HID_T) , INTENT(IN) :: class + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: size + TYPE(C_PTR) , INTENT(IN) :: value + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE h5pregister_f +!> +!! \ingroup FH5P +!! +!! \brief Registers a permanent property with a property list class. +!! +!! \note \fortran_obsolete +!! +!! \param class Property list class identifier. +!! \param name Name of property to register. +!! \param size Size of the property value. +!! \param value Property value, supported types are: +!! \li INTEGER +!! \li REAL +!! \li DOUBLE PRECISION +!! \li CHARACTER(LEN=*) +!! \param hdferr \fortran_error +!! + SUBROUTINE h5pregister_f(class, name, size, value, hdferr) + INTEGER(HID_T) , INTENT(IN) :: class + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: size + TYPE(TYPE) , INTENT(IN) :: value + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE h5pregister_f + +!> +!! \ingroup FH5P +!! +!! \brief Registers a temporary property with a property list class. +!! +!! \note \fortran_approved +!! +!! \param plist Property list class identifier. +!! \param name Name of property to insert. +!! \param size Size of the property value. +!! \param value Pointer to new value pointer for the property being modified. +!! \param hdferr \fortran_error +!! + SUBROUTINE h5pinsert_f(plist, name, size, value, hdferr) + INTEGER(HID_T) , INTENT(IN) :: plist + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: size + TYPE(C_PTR) , INTENT(IN) :: value + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE h5pinsert_f + +!> +!! \ingroup FH5P +!! +!! \brief Registers a temporary property with a property list class. +!! +!! \note \fortran_obsolete +!! +!! \param plist Property list class identifier. +!! \param name Name of property to insert. +!! \param size Size of the property value. +!! \param value Property value, supported types are: +!! \li INTEGER +!! \li REAL +!! \li DOUBLE PRECISION +!! \li CHARACTER(LEN=*) +!! \param hdferr \fortran_error +!! + SUBROUTINE h5pinsert_f(plist, name, size, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: plist + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: size + TYPE(TYPE) , INTENT(IN) :: value + INTEGER , INTENT(OUT) :: hdferr + END SUBROUTINE h5pinsert_f +#else SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - INTEGER, INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN), TARGET :: fillvalue + INTEGER, INTENT(OUT) :: hdferr TYPE(C_PTR) :: f_ptr ! C address f_ptr = C_LOC(fillvalue) @@ -6258,57 +4209,13 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) END SUBROUTINE h5pset_fill_value_integer -! -!****s* H5P (F03)/h5pget_fill_value_f_F90 -! -! NAME -! h5pget_fill_value_f -! -! PURPOSE -! Gets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! -! Outputs: -! fillvalue - Fillvalue -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pget(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran90 Interface: -!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(VOID) , INTENT(OUT) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** SUBROUTINE h5pget_fill_value_integer(prp_id, type_id, fillvalue, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - INTEGER, INTENT(OUT), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT), TARGET :: fillvalue + INTEGER, INTENT(OUT) :: hdferr TYPE(C_PTR) :: f_ptr ! C address f_ptr = C_LOC(fillvalue) @@ -6319,12 +4226,10 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - CHARACTER(LEN=1), INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=1), INTENT(IN), TARGET :: fillvalue + INTEGER, INTENT(OUT) :: hdferr TYPE(C_PTR) :: f_ptr ! C address f_ptr = C_LOC(fillvalue(1:1)) @@ -6334,12 +4239,10 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) SUBROUTINE h5pget_fill_value_char(prp_id, type_id, fillvalue, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - CHARACTER(LEN=*), INTENT(OUT) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(OUT) :: fillvalue + INTEGER, INTENT(OUT) :: hdferr INTEGER :: i CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr @@ -6364,156 +4267,36 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ENDDO DEALLOCATE(chr) - END SUBROUTINE h5pget_fill_value_char -! -!****s* H5P (F03)/h5pset_fill_value_f_F03 -! -! NAME -! h5pset_fill_value_f -! -! PURPOSE -! Sets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! fillvalue - Fillvalue -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pset(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran2003 Interface: -!! SUBROUTINE h5pset_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(C_PTR) , INTENT(IN) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pset_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) - TYPE(C_PTR), INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = h5pset_fill_value_c(prp_id, type_id, fillvalue) - - END SUBROUTINE h5pset_fill_value_ptr - -! -!****s* H5P (F03)/h5pget_fill_value_f_F03 -! -! NAME -! h5pget_fill_value_f -! -! PURPOSE -! Gets fill value for a dataset creation property list -! -! Inputs: -! prp_id - Property list identifier -! type_id - Datatype identifier of fill value datatype (in memory) -! -! Outputs: -! fillvalue - Fillvalue -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 14, 2001 -! -! Added the recommended way of passing fillvalue -! and that is by passing the C address, all other -! ways are obsolete and should be avoided. June, 2008 MSB -! -! NOTES -! h5pget(get)fill_value_f function is overloaded to support -! INTEGER, REAL, DOUBLE PRECISION and CHARACTER dtatypes. -! -! Fortran2003 Interface: -!! SUBROUTINE h5pget_fill_value_f(prp_id, type_id, fillvalue, hdferr) -!! INTEGER(HID_T), INTENT(IN) :: prp_id -!! INTEGER(HID_T), INTENT(IN) :: type_id -!! TYPE(C_PTR) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** + END SUBROUTINE h5pget_fill_value_char + + SUBROUTINE h5pset_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + TYPE(C_PTR), INTENT(IN) :: fillvalue + INTEGER, INTENT(OUT) :: hdferr + + hdferr = h5pset_fill_value_c(prp_id, type_id, fillvalue) + + END SUBROUTINE h5pset_fill_value_ptr SUBROUTINE h5pget_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier of - ! of fillvalue datatype - ! (in memory) + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id TYPE(C_PTR) :: fillvalue ! Fillvalue - INTEGER , INTENT(OUT) :: hdferr ! Error code + INTEGER , INTENT(OUT) :: hdferr hdferr = h5pget_fill_value_c(prp_id, type_id, fillvalue) END SUBROUTINE h5pget_fill_value_ptr -! -!****s* H5P (F03)/h5pset_f_F90 -! -! NAME -! h5pset_f -! -! PURPOSE -! Sets a property list value -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to modify -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pset_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** SUBROUTINE h5pset_integer(prp_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - INTEGER, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN), TARGET :: value + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len TYPE(C_PTR) :: f_ptr @@ -6527,10 +4310,10 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) SUBROUTINE h5pset_char(prp_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(LEN=*), INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len INTEGER :: i @@ -6560,44 +4343,26 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) DEALLOCATE(chr) END SUBROUTINE h5pset_char -! -!****s* H5P (F03)/h5pget_f_F90 -! -! NAME -! h5pget_f -! -! PURPOSE -! Queries the value of a property. -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to get -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pget_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE , INTENT(OUT) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** - +!> +!! \ingroup FH5P +!! +!! \brief Queries the value of a property. +!! +!! \param prp_id Property list identifier to modify. +!! \param name Name of property to get. +!! \param value Property value, supported types are: +!! \li INTEGER +!! \li REAL +!! \li DOUBLE PRECISION +!! \li CHARACTER(LEN=*) +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_integer(prp_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - INTEGER, INTENT(OUT), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(OUT), TARGET :: value + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len TYPE(C_PTR) :: f_ptr @@ -6610,10 +4375,10 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) SUBROUTINE h5pget_char(prp_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - CHARACTER(LEN=*), INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(LEN=*), INTENT(OUT) :: value + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len INTEGER :: i @@ -6640,125 +4405,58 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_char -! -!****s* H5P (F03)/h5pset_f_F03 -! -! NAME -! h5pset_f -! -! PURPOSE -! Sets a property list value -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to modify -! value - Pointer to value to set the property to -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran2003 Interface: -!! SUBROUTINE h5pset_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE(C_PTR) , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** +!> +!! \ingroup FH5P +!! +!! \brief Sets a property list value +!! +!! \param prp_id Property list identifier to modify. +!! \param name Name of property to modify. +!! \param value Pointer to value to set the property to. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_ptr(prp_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - TYPE(C_PTR), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(C_PTR), INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len name_len = LEN(name) hdferr = h5pset_c(prp_id, name, name_len, value) END SUBROUTINE h5pset_ptr -! -!****s* H5P (F03)/h5pget_f_F03 -! -! NAME -! h5pget_f (F03) -! -! PURPOSE -! Queries the value of a property. -! -! Inputs: -! prp_id - Property list identifier to modify -! name - Name of property to get -! value - Pointer to a location to which to copy the value of of the property -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! Fortran2003 Interface: -!! SUBROUTINE h5pget_f(plid, name, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: plid -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! TYPE(C_PTR) , INTENT(OUT) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** +!> +!! \ingroup FH5P +!! +!! \brief Queries the value of a property. +!! +!! \param prp_id Property list identifier to modify. +!! \param name Name of property to get. +!! \param value Pointer to a location to which to copy the value of of the property. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_ptr(prp_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - TYPE(C_PTR), INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(C_PTR), INTENT(OUT) :: value + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len name_len = LEN(name) hdferr = h5pget_c(prp_id, name, name_len, value) END SUBROUTINE h5pget_ptr -! -!****s* H5P (F03)/h5pregister_f_F90 -! -! NAME -! h5pregister -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! Inputs: -! class - Property list class identifier -! name - Name of property to register -! size - Size of the property value -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: class -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** + SUBROUTINE h5pregister_integer(class, name, size, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - INTEGER, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER, INTENT(IN), TARGET :: value + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len TYPE(C_PTR) :: f_ptr @@ -6769,14 +4467,13 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pregister_integer - SUBROUTINE h5pregister_char(class, name, size, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! size of the property value - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(LEN=*), INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len INTEGER :: i @@ -6804,89 +4501,27 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pregister_c(class, name, name_len, size, f_ptr) DEALLOCATE(chr) END SUBROUTINE h5pregister_char -! -!****s* H5P (F03)/h5pregister_f_F03 -! -! NAME -! h5pregister (F03) -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! Inputs: -! class - Property list class identifier -! name - Name of property to register -! size - Size of the property value -! value - Pointer to value to set the property to -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! June 24, 2008 -! -! Fortran2003 Interface: -!! SUBROUTINE h5pregister_f(class, name, size, value, hdferr) -!! INTEGER(HID_T) , INTENT(IN) :: class -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE(C_PTR) , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** SUBROUTINE h5pregister_ptr(class, name, size, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: class ! Property list class identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to register - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - TYPE(C_PTR), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: size + TYPE(C_PTR), INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len name_len = LEN(name) hdferr = h5pregister_c(class, name, name_len, size, value) END SUBROUTINE h5pregister_ptr -! -!****s* H5P (F03)/h5pinsert_f_F90 -! -! NAME -! h5pinsert (f90) -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! Inputs: -! plist - Property list class identifier -! name - Name of property to insert -! size - Size of the property value -! value - Property value, supported types are: -! INTEGER -! REAL -! DOUBLE PRECISION -! CHARACTER(LEN=*) -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! Fortran90 Interface: -!! SUBROUTINE h5pinsert_f -!! INTEGER(HID_T) , INTENT(IN) :: plist -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** SUBROUTINE h5pinsert_integer(plist, name, size, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the property value - INTEGER, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: plist + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER, INTENT(IN), TARGET :: value + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len TYPE(c_ptr) :: f_ptr @@ -6898,11 +4533,11 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value - CHARACTER(LEN=*), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: plist + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(LEN=*), INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len INTEGER :: i @@ -6933,91 +4568,45 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pinsert_char -! -!****s* H5P (F03)/h5pinsert_f_F03 -! -! NAME -! h5pinsert (f03) -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! Inputs: -! plist - Property list class identifier -! name - Name of property to insert -! size - Size of the property value -! value - Pointer to new value pointer for the property being modified -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! June 24, 2008 -! -! Fortran90 Interface: -!! SUBROUTINE h5pinsert_f -!! INTEGER(HID_T) , INTENT(IN) :: plist -!! CHARACTER(LEN=*), INTENT(IN) :: name -!! INTEGER(SIZE_T) , INTENT(IN) :: size -!! TYPE(C_PTR) , INTENT(IN) :: value -!! INTEGER , INTENT(OUT) :: hdferr -!***** SUBROUTINE h5pinsert_ptr(plist, name, size, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to insert - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of property value - TYPE(c_ptr), INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), INTENT(IN) :: plist + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: size + TYPE(c_ptr), INTENT(IN) :: value + INTEGER, INTENT(OUT) :: hdferr INTEGER :: name_len name_len = LEN(name) hdferr = h5pinsert_c(plist, name , name_len, size, value) END SUBROUTINE h5pinsert_ptr -! -!****s* H5P (F03)/h5pcreate_class_f_F03 -! -! NAME -! h5pcreate_class_f -! -! PURPOSE -! Create a new property list class -! -! Inputs: -! parent - Parent property list class identifier -! Possible values include: -! H5P_ROOT_F -! H5P_FILE_CREATE_F -! H5P_FILE_ACCESS_F -! H5P_DATASET_CREATE_F -! H5P_DATASET_XFER_F -! H5P_FILE_MOUNT_F -! name - Name of property to create -! -! Outputs: -! class - Property list class identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! Optional parameters: -! H5P_cls_create_func_t (create) - Callback routine called when a property list is created -! create_data - User pointer to any class creation information needed -! H5P_cls_copy_func_t (copy) - Callback routine called when a property list is copied -! copy_data - User pointer to any class copy information needed -! H5P_cls_close_func_t (close) - Callback routine called when a property list is being closed -! close_data - User pointer to any class close information needed -! -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! HISTORY -! Added callback arguments -! M. Scot Breitenfeld, July 3, 2008 -! -! Fortran2003 Interface: + +#endif + +!> +!! \ingroup FH5P +!! +!! \brief Create a new property list class +!! +!! \param parent Parent property list class identifier. Possible values include: +!! \li H5P_ROOT_F +!! \li H5P_FILE_CREATE_F +!! \li H5P_FILE_ACCESS_F +!! \li H5P_DATASET_CREATE_F +!! \li H5P_DATASET_XFER_F +!! \li H5P_FILE_MOUNT_F +!! \param name Name of property to create. +!! \param class Property list class identifier. +!! \param hdferr \fortran_error +!! \param create (H5P_cls_create_func_t) - Callback routine called when a property list is created. +!! \param create_data User pointer to any class creation information needed. +!! \param copy (H5P_cls_copy_func_t) - Callback routine called when a property list is copied. +!! \param copy_data User pointer to any class copy information needed. +!! \param close (H5P_cls_close_func_t) - Callback routine called when a property list is being closed. +!! \param close_data User pointer to any class close information needed. +!! SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr, create, create_data, & - copy, copy_data, CLOSE, close_data) + copy, copy_data, close, close_data) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: parent CHARACTER(LEN=*), INTENT(IN) :: name @@ -7025,7 +4614,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTEGER , INTENT(OUT) :: hdferr TYPE(C_PTR) , OPTIONAL :: create_data, copy_data, close_data TYPE(C_FUNPTR) , OPTIONAL :: create, copy, close -!***** INTEGER :: name_len TYPE(C_PTR) :: create_data_default, copy_data_default, close_data_default TYPE(C_FUNPTR) :: create_default, copy_default, close_default @@ -7066,36 +4654,22 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pcreate_class_f -! -!****s* H5P (F03)/h5pset_file_image_f_F03 -! -! NAME -! h5pset_file_image_f -! -! PURPOSE -! Sets an initial file image in a memory buffer. -! -! Inputs: -! fapl_id - File access property list identifier -! buf_ptr - Pointer to the initial file image, -! or C_NULL_PTR if no initial file image is desired -! buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired -! -! Outputs: -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February 19, 2012 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets an initial file image in a memory buffer. +!! +!! \param fapl_id File access property list identifier. +!! \param buf_ptr Pointer to the initial file image, or C_NULL_PTR if no initial file image is desired. +!! \param buf_len Size of the supplied buffer, or 0 (zero) if no initial image is desired. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_file_image_f(fapl_id, buf_ptr, buf_len, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: fapl_id TYPE(C_PTR) , INTENT(IN) :: buf_ptr INTEGER(SIZE_T), INTENT(IN) :: buf_len INTEGER , INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5pset_file_image_c(fapl_id, buf_ptr, buf_len) & BIND(C, NAME='h5pset_file_image_c') @@ -7110,39 +4684,20 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pset_file_image_c(fapl_id, buf_ptr, buf_len) END SUBROUTINE h5pset_file_image_f -! -!****s* H5P (F03)/h5pget_file_image_f_F03 -! -! NAME -! h5pget_file_image_f -! -! PURPOSE -! Retrieves a copy of the file image designated as the initial content and structure of a file. -! -! Inputs: -! fapl_id - File access property list identifier. -! -! Outputs: -! buf_ptr - Will hold either a C_NULL_PTR or a scalar of type -! c_loc. If buf_ptr is not C_NULL_PTR, on successful -! return, buf_ptr shall contain a C pointer to a copy -! of the initial image provided in the last call to -! H5Pset_file_image_f for the supplied fapl_id, or -! buf_ptr shall contain a C_NULL_PTR if there is no -! initial image set. -! -! buf_len_ptr - Contains the value of the buffer parameter for -! the initial image in the supplied fapl_id. The value -! will be 0 if no initial image is set. -! -! -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February 19, 2012 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Retrieves a copy of the file image designated as the initial content and structure of a file. +!! +!! \param fapl_id File access property list identifier. +!! \param buf_ptr Will hold either a C_NULL_PTR or a scalar of type c_loc. If buf_ptr is not C_NULL_PTR, on successful +!! return, buf_ptr shall contain a C pointer to a copy of the initial image provided in the last call to +!! H5Pset_file_image_f for the supplied fapl_id, or buf_ptr shall contain a C_NULL_PTR if there is no +!! initial image set. +!! \param buf_len_ptr Contains the value of the buffer parameter for the initial image in the supplied fapl_id. The value +!! will be 0 if no initial image is set. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_file_image_f(fapl_id, buf_ptr, buf_len_ptr, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: fapl_id @@ -7150,7 +4705,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr INTEGER , INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) & BIND(C, NAME='h5pget_file_image_c') @@ -7171,35 +4725,22 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! ********************************************************************* #ifdef H5_HAVE_PARALLEL -!****s* H5P/h5pset_fapl_mpio_f -! -! NAME -! h5pset_fapl_mpio_f -! -! PURPOSE -! Stores MPI IO communicator information to the file -! access property list. -! -! INPUTS -! prp_id - file access property list identifier -! comm - MPI-2 communicator -! info - MPI-2 info object -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Stores MPI IO communicator information to the file access property list. +!! +!! \param prp_id File access property list identifier. +!! \param comm MPI-2 communicator. +!! \param info MPI-2 info object. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_fapl_mpio_f(prp_id, comm, info, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: comm ! MPI communicator to be used for file open - ! as defined in MPI_FILE_OPEN of MPI-2 - INTEGER, INTENT(IN) :: info ! MPI info object to be used for file open - ! as defined in MPI_FILE_OPEN of MPI-2 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: comm + INTEGER, INTENT(IN) :: info + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_fapl_mpio_c(prp_id, comm, info) & BIND(C,NAME='h5pset_fapl_mpio_c') @@ -7215,34 +4756,22 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pset_fapl_mpio_f -!****s* H5P/h5pget_fapl_mpio_f -! -! NAME -! h5pget_fapl_mpio_f -! -! PURPOSE -! Returns MPI communicator information. -! -! INPUTS -! prp_id - file access property list identifier -! OUTPUTS -! comm - MPI-2 communicator -! info - MPI-2 info object -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Returns MPI communicator information. +!! +!! \param prp_id File access property list identifier. +!! \param comm MPI-2 communicator. +!! \param info MPI-2 info object. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_fapl_mpio_f(prp_id, comm, info, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: comm ! buffer to return communicator - INTEGER, INTENT(OUT) :: info ! buffer to return info object - ! as defined in MPI_FILE_OPEN of MPI-2 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: comm + INTEGER, INTENT(OUT) :: info + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_fapl_mpio_c(prp_id, comm, info) & BIND(C,NAME='h5pget_fapl_mpio_c') @@ -7258,34 +4787,22 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_fapl_mpio_f -!****s* H5P/h5pset_dxpl_mpio_f -! -! NAME -! h5pset_dxpl_mpio_f -! -! PURPOSE -! Sets data transfer mode. -! -! INPUTS -! prp_id - data transfer property list identifier -! data_xfer_mode - transfer mode; possible values are: -! H5FD_MPIO_INDEPENDENT_F -! H5FD_MPIO_COLLECTIVE_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Sets data transfer mode. +!! +!! \param prp_id Data transfer property list identifier. +!! \param data_xfer_mode Transfer mode; possible values are: +!! \li H5FD_MPIO_INDEPENDENT_F +!! \li H5FD_MPIO_COLLECTIVE_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(IN) :: data_xfer_mode ! Data transfer mode. Possible values are: - ! H5FD_MPIO_INDEPENDENT_F - ! H5FD_MPIO_COLLECTIVE_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: data_xfer_mode + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pset_dxpl_mpio_c(prp_id, data_xfer_mode) & BIND(C,NAME='h5pset_dxpl_mpio_c') @@ -7299,35 +4816,22 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pset_dxpl_mpio_c(prp_id, data_xfer_mode) END SUBROUTINE h5pset_dxpl_mpio_f -!****s* H5P/h5pget_dxpl_mpio_f -! -! NAME -! h5pget_dxpl_mpio_f -! -! PURPOSE -! Returns the data transfer mode. -! -! INPUTS -! prp_id - data transfer property list identifier -! OUTPUTS -! data_xfer_mode- transfer mode; possible values are: -! H5FD_MPIO_INDEPENDENT_F -! H5FD_MPIO_COLLECTIVE_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! November, 2000 -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Returns the data transfer mode. +!! +!! \param prp_id Data transfer property list identifier. +!! \param data_xfer_mode Transfer mode; possible values are: +!! \li H5FD_MPIO_INDEPENDENT_F +!! \li H5FD_MPIO_COLLECTIVE_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_dxpl_mpio_f(prp_id, data_xfer_mode, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - INTEGER, INTENT(OUT) :: data_xfer_mode ! Data transfer mode. Possible values are: - ! H5FD_MPIO_INDEPENDENT_F - ! H5FD_MPIO_COLLECTIVE_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: data_xfer_mode + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5pget_dxpl_mpio_c(prp_id, data_xfer_mode) & BIND(C,NAME='h5pget_dxpl_mpio_c') @@ -7341,33 +4845,21 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) hdferr = h5pget_dxpl_mpio_c(prp_id, data_xfer_mode) END SUBROUTINE h5pget_dxpl_mpio_f -!****s* H5P/h5pget_mpio_actual_io_mode_f -! NAME -! h5pget_mpio_actual_io_mode_f -! -! PURPOSE -! Retrieves the type of I/O that HDF5 actually performed on the last -! parallel I/O call. This is not necessarily the type of I/O requested. -! -! INPUTS -! dxpl_id - Dataset transfer property list identifier. -! OUTPUTS -! actual_io_mode - The type of I/O performed by this process. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! July 27, 2012 -! -! HISTORY -! -! Fortran90 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Retrieves the type of I/O that HDF5 actually performed on the last +!! parallel I/O call. This is not necessarily the type of I/O requested. +!! +!! \param dxpl_id Dataset transfer property list identifier. +!! \param actual_io_mode The type of I/O performed by this process. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_mpio_actual_io_mode_f(dxpl_id, actual_io_mode, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dxpl_id INTEGER , INTENT(OUT) :: actual_io_mode INTEGER , INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) & BIND(C,NAME='h5pget_mpio_actual_io_mode_c') @@ -7384,35 +4876,23 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_mpio_actual_io_mode_f -!****s* H5P/h5pset_all_coll_metadata_ops_f -! NAME -! h5pset_all_coll_metadata_ops_f -! -! PURPOSE -! Sets requirement whether HDF5 metadata read operations using the access property -! list are required to be collective or independent. If collective requirement is -! selected, the HDF5 library will optimize the metadata reads improving performance. -! The default setting is independent (false). -! -! INPUTS -! plist_id - File access property list identifier. -! is_collective - Indicates if metadata writes are collective or not. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! Feb, 10 2016 -! -! HISTORY -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Sets requirement whether HDF5 metadata read operations using the access property +!! list are required to be collective or independent. If collective requirement is +!! selected, the HDF5 library will optimize the metadata reads improving performance. +!! The default setting is independent (false). +!! +!! \param plist_id File access property list identifier. +!! \param is_collective Indicates if metadata writes are collective or not. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_all_coll_metadata_ops_f(plist_id, is_collective, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: plist_id LOGICAL, INTENT(IN) :: is_collective INTEGER, INTENT(OUT) :: hdferr -!***** LOGICAL(C_BOOL) :: c_is_collective INTERFACE @@ -7431,33 +4911,21 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pset_all_coll_metadata_ops_f -!****s* H5P/h5pget_all_coll_metadata_ops_f -! NAME -! h5pget_all_coll_metadata_ops_f -! -! PURPOSE -! Retrieves metadata read mode from the access property list. -! -! INPUTS -! plist_id - File access property list identifier. -! OUTPUTS -! is_collective - Collective access setting. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! Feb, 10 2016 -! -! HISTORY -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Retrieves metadata read mode from the access property list. +!! +!! \param plist_id File access property list identifier. +!! \param is_collective Collective access setting. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_all_coll_metadata_ops_f(plist_id, is_collective, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: plist_id LOGICAL, INTENT(OUT) :: is_collective INTEGER, INTENT(OUT) :: hdferr -!***** LOGICAL(C_BOOL) :: c_is_collective INTERFACE @@ -7476,32 +4944,20 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_all_coll_metadata_ops_f -!****s* H5P/h5pset_coll_metadata_write_f -! NAME -! h5pset_coll_metadata_write_f -! -! PURPOSE -! Sets metadata writes to collective or independent. Default setting is independent (false). -! -! INPUTS -! fapl_id - File access property list identifier. -! is_collective - Indicates if metadata writes are collective or not. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! Feb, 10 2016 -! -! HISTORY -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Sets metadata writes to collective or independent. Default setting is independent (false). +!! +!! \param plist_id File access property list identifier. +!! \param is_collective Indicates if metadata writes are collective or not. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_coll_metadata_write_f(plist_id, is_collective, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: plist_id LOGICAL, INTENT(IN) :: is_collective INTEGER, INTENT(OUT) :: hdferr -!***** LOGICAL(C_BOOL) :: c_is_collective INTERFACE @@ -7520,33 +4976,21 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pset_coll_metadata_write_f -!****s* H5P/h5pget_coll_metadata_write_f -! NAME -! h5pget_coll_metadata_write_f -! -! PURPOSE -! Retrieves metadata write mode from the file access property list. -! -! INPUTS -! plist_id - File access property list identifier. -! OUTPUTS -! is_collective - Collective access setting. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! Feb, 10 2016 -! -! HISTORY -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Retrieves metadata write mode from the file access property list. +!! +!! \param plist_id File access property list identifier. +!! \param is_collective Collective access setting. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_coll_metadata_write_f(plist_id, is_collective, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: plist_id LOGICAL, INTENT(OUT) :: is_collective INTEGER, INTENT(OUT) :: hdferr -!***** LOGICAL(C_BOOL) :: c_is_collective INTERFACE @@ -7571,30 +5015,17 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) ! V I R T U A L D A T S E T S ! -!****s* H5P/h5pset_virtual_view_f -! NAME -! h5pset_virtual_view_f -! -! PURPOSE -! Sets the view of the virtual dataset (VDS) to include or exclude missing mapped elements. -! -! INPUTS -! dapl_id - Identifier of the virtual dataset access property list. -! view - Flag specifying the extent of the data to be included in the view. -! Valid values are: -! H5D_VDS_FIRST_MISSING_F -! H5D_VDS_LAST_AVAILABLE_F -! -! OUTPUTS -! -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! Nov 2, 2015 -! -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Sets the view of the virtual dataset (VDS) to include or exclude missing mapped elements. +!! +!! \param dapl_id Identifier Of the virtual dataset access property list. +!! \param view Flag specifying the extent of the data to be included in the view. Valid values are: +!! \li H5D_VDS_FIRST_MISSING_F +!! \li H5D_VDS_LAST_AVAILABLE_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_virtual_view_f(dapl_id, view, hdferr) IMPLICIT NONE @@ -7602,7 +5033,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTEGER , INTENT(IN) :: view INTEGER , INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5pset_virtual_view(dapl_id, view) BIND(C,NAME='H5Pset_virtual_view') IMPORT :: HID_T, ENUM_T @@ -7616,35 +5046,23 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pset_virtual_view_f -!****s* H5P/h5pget_virtual_view_f -! NAME -! h5pget_virtual_view_f -! -! PURPOSE -! Retrieves the view of a virtual dataset accessed with dapl_id. -! -! INPUTS -! dapl_id - Dataset access property list identifier for the virtual dataset -! -! OUTPUTS -! view - The flag specifying the view of the virtual dataset. -! Valid values are: -! H5D_VDS_FIRST_MISSING_F -! H5D_VDS_LAST_AVAILABLE_F -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! Nov 2, 2015 -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Retrieves the view of a virtual dataset accessed with dapl_id. +!! +!! \param dapl_id Dataset access property list identifier for the virtual dataset. +!! \param view The flag specifying the view of the virtual dataset. Valid values are: +!! \li H5D_VDS_FIRST_MISSING_F +!! \li H5D_VDS_LAST_AVAILABLE_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_virtual_view_f(dapl_id, view, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dapl_id INTEGER , INTENT(INOUT) :: view INTEGER , INTENT(OUT) :: hdferr -!***** INTEGER(ENUM_T) :: view_enum INTERFACE INTEGER FUNCTION h5pget_virtual_view(dapl_id, view) BIND(C,NAME='H5Pget_virtual_view') @@ -7660,35 +5078,22 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_virtual_view_f -!****s* H5P/h5pset_virtual_printf_gap_f -! NAME -! h5pset_virtual_printf_gap_f -! -! PURPOSE -! Sets the maximum number of missing source files and/or datasets with the printf-style names -! when getting the extent of an unlimited virtual dataset. -! -! INPUTS -! dapl_id - Dataset access property list identifier for the virtual dataset. -! gap_size - Maximum number of files and/or datasets allowed to be missing for determining -! the extent of an unlimited virtual dataset with printf-style mappings. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! Nov 2, 2015 -! -! HISTORY -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Sets the maximum number of missing source files and/or datasets with the printf-style names +!! when getting the extent of an unlimited virtual dataset. +!! +!! \param dapl_id Dataset access property list identifier for the virtual dataset. +!! \param gap_size Maximum number of files and/or datasets allowed to be missing for determining +!! the extent of an unlimited virtual dataset with printf-style mappings. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_virtual_printf_gap_f(dapl_id, gap_size, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: dapl_id INTEGER(HSIZE_T), INTENT(IN) :: gap_size INTEGER , INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5pset_virtual_printf_gap(dapl_id, gap_size) BIND(C,NAME='H5Pset_virtual_printf_gap') IMPORT :: HID_T, HSIZE_T @@ -7702,36 +5107,23 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pset_virtual_printf_gap_f -!****s* H5P/h5pget_virtual_printf_gap_f -! NAME -! h5pget_virtual_printf_gap_f -! -! PURPOSE -! Returns the maximum number of missing source files and/or datasets with the -! printf-style names when getting the extent for an unlimited virtual dataset. -! -! INPUTS -! dapl_id - Dataset access property list identifier for the virtual dataset -! -! OUTPUTS -! gap_size - Maximum number of the files and/or datasets allowed to be missing for -! determining the extent of an unlimited virtual dataset with printf-style mappings. -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! Nov 2, 2015 -! -! HISTORY -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Returns the maximum number of missing source files and/or datasets with the +!! printf-style names when getting the extent for an unlimited virtual dataset. +!! +!! \param dapl_id Dataset access property list identifier for the virtual dataset. +!! \param gap_size Maximum Number of the files and/or datasets allowed to be missing for +!! determining the extent of an unlimited virtual dataset with printf-style mappings. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_virtual_printf_gap_f(dapl_id, gap_size, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: dapl_id INTEGER(HSIZE_T), INTENT(OUT) :: gap_size INTEGER , INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5pget_virtual_printf_gap(dapl_id, gap_size) BIND(C,NAME='H5Pget_virtual_printf_gap') IMPORT :: HID_T, HSIZE_T @@ -7745,32 +5137,18 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_virtual_printf_gap_f -!****s* H5P/h5pset_virtual_f -! NAME -! h5pset_virtual_f -! -! PURPOSE -! Sets the mapping between virtual and source datasets. -! -! INPUTS -! dcpl_id - The identifier of the dataset creation property list that will be -! used when creating the virtual dataset. -! vspace_id - The dataspace identifier with the selection within the virtual -! dataset applied, possibly an unlimited selection. -! src_file_name - The name of the HDF5 file where the source dataset is located. -! src_dset_name - The path to the HDF5 dataset in the file specified by src_file_name. -! src_space_id - The source dataset’s dataspace identifier with a selection applied, possibly an unlimited selection -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails - -! AUTHOR -! M. Scot Breitenfeld -! Nov 2, 2015 -! -! HISTORY -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Sets the mapping between virtual and source datasets. +!! +!! \param dcpl_id The identifier of the dataset creation property list that will be used when creating the virtual dataset. +!! \param vspace_id The dataspace identifier with the selection within the virtual dataset applied, possibly an unlimited selection. +!! \param src_file_name The name of the HDF5 file where the source dataset is located. +!! \param src_dset_name The path to the HDF5 dataset in the file specified by src_file_name. +!! \param src_space_id The source dataset’s dataspace identifier with a selection applied, possibly an unlimited selection. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_virtual_f(dcpl_id, vspace_id, src_file_name, src_dset_name, src_space_id, hdferr) IMPLICIT NONE @@ -7780,7 +5158,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) CHARACTER(LEN=*), INTENT(IN) :: src_dset_name INTEGER(HID_T), INTENT(IN) :: src_space_id INTEGER, INTENT(OUT) :: hdferr -!***** CHARACTER(LEN=LEN_TRIM(src_file_name)+1,KIND=C_CHAR) :: c_src_file_name CHARACTER(LEN=LEN_TRIM(src_dset_name)+1,KIND=C_CHAR) :: c_src_dset_name @@ -7805,26 +5182,15 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pset_virtual_f -!****s* H5P/h5pget_virtual_count_f -! NAME -! h5pget_virtual_count_f -! -! PURPOSE -! Gets the number of mappings for the virtual dataset. -! -! INPUTS -! dcpl_id - The identifier of the virtual dataset creation property list. -! -! OUTPUTS -! count - The number of mappings. -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! Nov 2, 2015 -! -! HISTORY -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Gets the number of mappings for the virtual dataset. +!! +!! \param dcpl_id The identifier of the virtual dataset creation property list. +!! \param count The number of mappings. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_virtual_count_f(dcpl_id, count, hdferr) IMPLICIT NONE @@ -7832,7 +5198,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTEGER(HID_T), INTENT(IN) :: dcpl_id INTEGER(SIZE_T), INTENT(OUT) :: count INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER(C_INT) FUNCTION h5pget_virtual_count(dcpl_id, count) BIND(C,NAME='H5Pget_virtual_count') IMPORT :: HID_T, SIZE_T, C_INT @@ -7846,29 +5211,17 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_virtual_count_f -!****s* H5P/h5pget_virtual_vspace_f -! NAME -! h5pget_virtual_vspace_f -! -! PURPOSE -! Gets a dataspace identifier for the selection within the virtual dataset used in the mapping. -! -! INPUTS -! dcpl_id - The identifier of the virtual dataset creation property list. -! index - Mapping index. -! The value of index is 0 (zero) or greater and less than count (0 ≤ index < count), -! where count is the number of mappings returned by h5pget_virtual_count. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! Nov 2, 2015 -! -! HISTORY -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Gets a dataspace identifier for the selection within the virtual dataset used in the mapping. +!! +!! \param dcpl_id The identifier of the virtual dataset creation property list. +!! \param index Mapping index. The value of index is 0 (zero) or greater and less than count (0 ≤ index < count), +!! where count is the number of mappings returned by h5pget_virtual_count. +!! \param ds_id Valid dataspace identifier identifier if successful; otherwise returns H5I_INVALID_HID_F. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_virtual_vspace_f(dcpl_id, index, ds_id, hdferr) IMPLICIT NONE @@ -7877,7 +5230,6 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) INTEGER(HID_T) , INTENT(OUT) :: ds_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER(HID_T) FUNCTION h5pget_virtual_vspace(dcpl_id, index) BIND(C,NAME='H5Pget_virtual_vspace') IMPORT :: HID_T, SIZE_T @@ -7894,31 +5246,17 @@ SUBROUTINE h5pset_attr_phase_change_f(ocpl_id, max_compact, min_dense, hdferr) END SUBROUTINE h5pget_virtual_vspace_f -!****s* H5P/h5pget_virtual_srcspace_f -! NAME -! h5pget_virtual_srcspace_f -! -! PURPOSE -! Gets a dataspace identifier for the selection within the source dataset used in the mapping. -! -! INPUTS -! dcpl_id - The identifier of the virtual dataset creation property list. -! index - Mapping index. -! The value of index is 0 (zero) or greater and less than count (0 ≤ index < count), -! where count is the number of mappings returned by h5pget_virtual_count. -! -! -! OUTPUTS -! ds_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! Nov 2, 2015 -! -! HISTORY -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Gets a dataspace identifier for the selection within the source dataset used in the mapping. +!! +!! \param dcpl_id The Identifier of the virtual dataset creation property list. +!! \param index Mapping index.The value of index is 0 (zero) or greater and less than count (0 ≤ index < count), +!! where count is the number of mappings returned by h5pget_virtual_count. +!! \param ds_id Dataspace identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_virtual_srcspace_f(dcpl_id, index, ds_id, hdferr) IMPLICIT NONE @@ -7927,7 +5265,6 @@ SUBROUTINE h5pget_virtual_srcspace_f(dcpl_id, index, ds_id, hdferr) INTEGER(HID_T) , INTENT(OUT) :: ds_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER(HID_T) FUNCTION h5pget_virtual_srcspace(dcpl_id, index) BIND(C,NAME='H5Pget_virtual_srcspace') IMPORT :: HID_T, SIZE_T @@ -7944,33 +5281,19 @@ SUBROUTINE h5pget_virtual_srcspace_f(dcpl_id, index, ds_id, hdferr) END SUBROUTINE h5pget_virtual_srcspace_f -!****s* H5P/h5pget_virtual_filename_f -! NAME -! h5pget_virtual_filename_f -! -! PURPOSE -! Gets the filename of a source dataset used in the mapping. -! -! INPUTS -! dcpl_id - The identifier of the virtual dataset creation property list. -! index - Mapping index. -! The value of index is 0 (zero) or greater and less than count (0 ≤ index < count), -! where count is the number of mappings returned by h5pget_virtual_count. -! -! OUTPUTS -! name - A buffer containing the name of the file containing the source dataset. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! name_len - The size of name needed to hold the filename. (OUT) -! -! AUTHOR -! M. Scot Breitenfeld -! Nov 2, 2015 -! -! HISTORY -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Gets the filename of a source dataset used in the mapping. +!! +!! \param dcpl_id The identifier of the virtual dataset creation property list. +!! \param index Mapping index. The value of index is 0 (zero) or greater and less than count (0 ≤ index < count), +!! where count is the number of mappings returned by h5pget_virtual_count. +!! \param name A buffer containing the name of the file containing the source dataset. +!! \param hdferr \fortran_error +!! \param name_len The size of name needed to hold the filename. (OUT) +!! +!! SUBROUTINE h5pget_virtual_filename_f(dcpl_id, index, name, hdferr, name_len) IMPLICIT NONE @@ -7979,7 +5302,6 @@ SUBROUTINE h5pget_virtual_filename_f(dcpl_id, index, name, hdferr, name_len) CHARACTER(LEN=*), INTENT(OUT) :: name INTEGER, INTENT(OUT) :: hdferr INTEGER(SIZE_T), OPTIONAL :: name_len -!***** CHARACTER(LEN=1,KIND=C_CHAR), DIMENSION(1:LEN(name)+1), TARGET :: c_name TYPE(C_PTR) :: f_ptr @@ -8012,33 +5334,18 @@ SUBROUTINE h5pget_virtual_filename_f(dcpl_id, index, name, hdferr, name_len) END SUBROUTINE h5pget_virtual_filename_f -!****s* H5P/h5pget_virtual_dsetname_f -! NAME -! h5pget_virtual_dsetname_f -! -! PURPOSE -! Gets the name of a source dataset used in the mapping. -! -! INPUTS -! dcpl_id - The identifier of the virtual dataset creation property list. -! index - Mapping index. -! The value of index is 0 (zero) or greater and less than count (0 ≤ index < count), -! where count is the number of mappings returned by h5pget_virtual_count. -! -! OUTPUTS -! name - A buffer containing the name of the source dataset. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! name_len - The size of name needed to hold the source dataset name. (OUT) -! -! AUTHOR -! M. Scot Breitenfeld -! January 28, 2016 -! -! HISTORY -! -! SOURCE +!> +!! \ingroup FH5P +!! +!! \brief Gets the name of a source dataset used in the mapping. +!! +!! \param dcpl_id The identifier of the virtual dataset creation property list. +!! \param index Mapping index. The value of index is 0 (zero) or greater and less than count (0 ≤ index < count), +!! where count is the number of mappings returned by h5pget_virtual_count. +!! \param name A buffer containing the name of the source dataset. +!! \param hdferr \fortran_error +!! \param name_len The size of name needed to hold the source dataset name. +!! SUBROUTINE h5pget_virtual_dsetname_f(dcpl_id, index, name, hdferr, name_len) IMPLICIT NONE @@ -8047,7 +5354,6 @@ SUBROUTINE h5pget_virtual_dsetname_f(dcpl_id, index, name, hdferr, name_len) CHARACTER(LEN=*), INTENT(OUT) :: name INTEGER, INTENT(OUT) :: hdferr INTEGER(SIZE_T), OPTIONAL :: name_len -!***** CHARACTER(LEN=1,KIND=C_CHAR), DIMENSION(1:LEN(name)+1), TARGET :: c_name TYPE(C_PTR) :: f_ptr @@ -8079,34 +5385,21 @@ SUBROUTINE h5pget_virtual_dsetname_f(dcpl_id, index, name, hdferr, name_len) END SUBROUTINE h5pget_virtual_dsetname_f -!****s* H5P (F03)/h5pget_dset_no_attrs_hint_f_F03 -! -! NAME -! h5pget_dset_no_attrs_hint_f -! -! PURPOSE -! Gets the value of the "minimize dataset headers" value which creates -! smaller dataset object headers when its set and no attributes are present. -! -! INPUTS -! dcpl_id - Target dataset creation property list identifier. -! -! OUTPUTS -! minimize - Value of the setting. -! hdferr - error code: -! 0 on success and -1 on failure -! -! AUTHOR -! Dana Robinson -! January 2019 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Gets the value of the "minimize dataset headers" value which creates +!! smaller dataset object headers when its set and no attributes are present. +!! +!! \param dcpl_id Target dataset creation property list identifier. +!! \param minimize Value of the setting. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_dset_no_attrs_hint_f(dcpl_id, minimize, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: dcpl_id LOGICAL , INTENT(OUT) :: minimize INTEGER , INTENT(OUT) :: hdferr -!***** LOGICAL(C_BOOL) :: c_minimize INTERFACE @@ -8125,34 +5418,21 @@ END SUBROUTINE h5pget_virtual_dsetname_f END SUBROUTINE h5pget_dset_no_attrs_hint_f -!****s* H5P (F03)/h5pset_dset_no_attrs_hint_f_F03 -! -! NAME -! h5pset_dset_no_attrs_hint_f -! -! PURPOSE -! Sets the value of the "minimize dataset headers" value which creates -! smaller dataset object headers when its set and no attributes are present. -! -! INPUTS -! dcpl_id - Target dataset creation property list identifier. -! minimize - Value of the setting. -! -! OUTPUTS -! hdferr - error code: -! 0 on success and -1 on failure -! -! AUTHOR -! Dana Robinson -! January 2019 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the value of the "minimize dataset headers" value which creates +!! smaller dataset object headers when its set and no attributes are present. +!! +!! \param dcpl_id Target dataset creation property list identifier. +!! \param minimize Value of the setting. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_dset_no_attrs_hint_f(dcpl_id, minimize, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: dcpl_id LOGICAL , INTENT(IN) :: minimize INTEGER , INTENT(OUT) :: hdferr -!***** LOGICAL(C_BOOL) :: c_minimize INTERFACE @@ -8171,37 +5451,22 @@ END SUBROUTINE h5pget_virtual_dsetname_f END SUBROUTINE h5pset_dset_no_attrs_hint_f -!****s* H5P/H5Pset_vol_f -! -! NAME -! H5Pset_vol_f -! -! PURPOSE -! Set the file VOL connector (VOL_ID) for a file access -! property list (PLIST_ID) -! INPUTS -! plist_id - access property list identifier. -! new_vol_id - VOL connector id. -! -! OUTPUTS -! hdferr - error code: -! 0 on success and -1 on failure -! -! OPTIONAL -! new_vol_info - VOL connector info. -! -! AUTHOR -! M.S. Breitenfeld -! May 2019 -! -! Fortran Interface: +!> +!! \ingroup FH5P +!! +!! \brief Set the file VOL connector (VOL_ID) for a file access property list (PLIST_ID) +!! +!! \param plist_id Access property list identifier. +!! \param new_vol_id VOL connector id. +!! \param hdferr \fortran_error +!! \param new_vol_info VOL connector info. +!! SUBROUTINE h5pset_vol_f(plist_id, new_vol_id, hdferr, new_vol_info) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: plist_id INTEGER(HID_T) , INTENT(IN) :: new_vol_id INTEGER , INTENT(OUT) :: hdferr TYPE(C_PTR) , OPTIONAL :: new_vol_info -!***** TYPE(C_PTR) :: new_vol_info_default @@ -8222,33 +5487,20 @@ END SUBROUTINE h5pget_virtual_dsetname_f END SUBROUTINE h5pset_vol_f -!****s* H5P/H5Pget_vol_id_f -! -! NAME -! H5Pget_vol_id_f -! -! PURPOSE -! Get the file VOL connector (VOL_ID) for a file access -! property list (PLIST_ID) -! INPUTS -! plist_id - access property list identifier. -! -! OUTPUTS -! vol_id - VOL connector id. -! hdferr - error code: -! 0 on success and -1 on failure +!> +!! \ingroup FH5P +!! +!! \brief Get the file VOL connector (VOL_ID) for a file access property list (PLIST_ID) ! -! AUTHOR -! M.S. Breitenfeld -! May 2019 -! -! Fortran Interface: +!! \param plist_id Access property list identifier. +!! \param vol_id VOL connector id. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_vol_id_f(plist_id, vol_id, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: plist_id INTEGER(HID_T) , INTENT(OUT) :: vol_id INTEGER , INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5pget_vol_id(plist_id, vol_id) BIND(C, NAME='H5Pget_vol_id') @@ -8263,37 +5515,22 @@ END SUBROUTINE h5pget_virtual_dsetname_f END SUBROUTINE h5pget_vol_id_f -!****s* H5P (F03)/h5pget_file_locking_f_F03 -! -! NAME -! h5pget_file_locking_f -! -! PURPOSE -! Gets the file locking properties. File locking is mainly used to help -! enforce SWMR semantics. -! -! INPUTS -! fapl_id - Target file access property list identifier. -! -! OUTPUTS -! use_file_locking - Whether or not to use file locks. -! ignore_disabled_locks - Whether or not to ignore file locks when locking -! is disabled on a file system. -! hdferr - error code: -! 0 on success and -1 on failure -! -! AUTHOR -! Dana Robinson -! Summer 2020 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Gets the file locking properties. File locking is mainly used to help enforce SWMR semantics. +!! +!! \param fapl_id Target fileTarget file access property list identifier. +!! \param use_file_locking Whether or not to use file locks. +!! \param ignore_disabled_locks Whether or not to ignore file locks when locking is disabled on a file system. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pget_file_locking_f(fapl_id, use_file_locking, ignore_disabled_locks, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: fapl_id LOGICAL , INTENT(OUT) :: use_file_locking LOGICAL , INTENT(OUT) :: ignore_disabled_locks INTEGER , INTENT(OUT) :: hdferr -!***** LOGICAL(C_BOOL) :: c_use_flag LOGICAL(C_BOOL) :: c_ignore_flag @@ -8315,35 +5552,22 @@ END SUBROUTINE h5pget_virtual_dsetname_f END SUBROUTINE h5pget_file_locking_f -!****s* H5P (F03)/h5pset_file_locking_f_F03 -! -! NAME -! h5pset_file_locking_f -! -! PURPOSE -! Sets the file locking properties. File locking is mainly used to help -! enforce SWMR semantics. -! -! INPUTS -! fapl_id - Target file access property list identifier. -! use_file_locking - Whether or not to use file locks. -! ignore_disabled_locks - Whether or not to ignore file locks when locking -! is disabled on a file system. -! hdferr - error code: -! 0 on success and -1 on failure -! -! AUTHOR -! Dana Robinson -! Summer 2020 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5P +!! +!! \brief Sets the file locking properties. File locking is mainly used to help enforce SWMR semantics. +!! +!! \param fapl_id Target file access property list identifier. +!! \param use_file_locking Whether or not to use file locks. +!! \param ignore_disabled_locks Whether or not to ignore file locks when locking is disabled on a file system. +!! \param hdferr \fortran_error +!! SUBROUTINE h5pset_file_locking_f(fapl_id, use_file_locking, ignore_disabled_locks, hdferr) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: fapl_id LOGICAL , INTENT(IN) :: use_file_locking LOGICAL , INTENT(IN) :: ignore_disabled_locks INTEGER , INTENT(OUT) :: hdferr -!***** LOGICAL(C_BOOL) :: c_use_flag LOGICAL(C_BOOL) :: c_ignore_flag diff --git a/fortran/src/H5Rff.F90 b/fortran/src/H5Rff.F90 index a25cf10..d373158 100644 --- a/fortran/src/H5Rff.F90 +++ b/fortran/src/H5Rff.F90 @@ -1,4 +1,13 @@ -!****h* ROBODoc/H5R +!> @defgroup FH5R Fortran References (H5R) Interface +!! +!! @see H5R, C-API +!! +!! @see @ref H5R_UG, User Guide +!! + +!> @ingroup FH5R +!! +!! @brief This module contains Fortran interfaces for H5R functions. ! ! NAME ! MODULE H5R @@ -36,7 +45,6 @@ ! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. ! This is needed for Windows based operating systems. ! -!***** MODULE H5R USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_SIGNED_CHAR @@ -56,45 +64,44 @@ MODULE H5R ! END TYPE ! + PRIVATE h5rget_object_type_obj_f PRIVATE h5rget_region_region_f, h5rget_region_ptr_f PRIVATE h5rcreate_object_f, h5rcreate_region_f, h5rcreate_ptr_f PRIVATE h5rdereference_object_f, h5rdereference_region_f, h5rdereference_ptr_f PRIVATE h5rget_name_object_f, h5rget_name_region_f, h5rget_name_ptr_f +!> @brief hdset_reg_ref_t_f03 C compatible reference TYPE :: hdset_reg_ref_t_f03 - INTEGER(C_SIGNED_CHAR), DIMENSION(1:H5R_DSET_REG_REF_BUF_SIZE_F) :: ref + INTEGER(C_SIGNED_CHAR), DIMENSION(1:H5R_DSET_REG_REF_BUF_SIZE_F) :: ref END TYPE hdset_reg_ref_t_f03 - INTERFACE h5rget_region_f + INTERFACE h5rget_object_type_f + MODULE PROCEDURE h5rget_object_type_obj_f + END INTERFACE - MODULE PROCEDURE h5rget_region_region_f ! obsolete - MODULE PROCEDURE h5rget_region_ptr_f ! F2003 +#ifndef H5_DOXYGEN_FORTRAN + INTERFACE h5rget_region_f + MODULE PROCEDURE h5rget_region_ptr_f ! F2003 + MODULE PROCEDURE h5rget_region_region_f ! obsolete END INTERFACE - INTERFACE h5rcreate_f - + MODULE PROCEDURE h5rcreate_ptr_f ! F2003 MODULE PROCEDURE h5rcreate_object_f ! obsolete MODULE PROCEDURE h5rcreate_region_f ! obsolete - MODULE PROCEDURE h5rcreate_ptr_f ! F2003 - END INTERFACE INTERFACE h5rdereference_f - + MODULE PROCEDURE h5rdereference_ptr_f ! F2003 MODULE PROCEDURE h5rdereference_object_f ! obsolete MODULE PROCEDURE h5rdereference_region_f ! obsolete - MODULE PROCEDURE h5rdereference_ptr_f ! F2003 - END INTERFACE INTERFACE h5rget_name_f - + MODULE PROCEDURE h5rget_name_ptr_f ! F2003 MODULE PROCEDURE h5rget_name_object_f ! obsolete MODULE PROCEDURE h5rget_name_region_f ! obsolete - MODULE PROCEDURE h5rget_name_ptr_f ! F2003 - END INTERFACE INTERFACE @@ -151,54 +158,37 @@ MODULE H5R INTEGER(HID_T), INTENT(OUT) :: space_id END FUNCTION h5rget_region_ptr_c END INTERFACE - +#endif CONTAINS -!****s* H5R/h5rget_object_type_f -! -! NAME -! h5rget_object_type_f -! -! PURPOSE -! Retrieves the type of object that an object reference points to. -! -! INPUTS -! dset_id - identifier of the dataset containing -! reference to the objects -! ref - reference to open -! OUTPUTS -! obj_type - object_type, possible values: -! H5G_UNKNOWN_F -! H5G_GROUP_F -! H5G_DATASET_F -! H5G_TYPE_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rget_object_type_f -! subroutine. -! SOURCE - SUBROUTINE h5rget_object_type_f(dset_id, ref, obj_type, hdferr) +!> +!! \ingroup FH5R +!! +!! \brief Retrieves the type of object that an object reference points to. +!! +!! \note \fortran_obsolete +!! +!! \param dset_id Identifier of the dataset containing reference to the objects. +!! \param ref Reference to open. +!! \param obj_type Object_type, possible values: +!! \li H5G_UNKNOWN_F +!! \li H5G_GROUP_F +!! \li H5G_DATASET_F +!! \li H5G_TYPE_F +!! \param hdferr \fortran_error +!! +#ifdef H5_DOXYGEN_FORTRAN + SUBROUTINE h5rget_object_type_f(& +#else + SUBROUTINE h5rget_object_type_obj_f(& +#endif + dset_id, ref, obj_type, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hobj_ref_t_f), INTENT(IN) :: ref ! Object reference - INTEGER, INTENT(OUT) :: obj_type ! Object type - ! H5G_UNKNOWN_F - ! H5G_GROUP_F - ! H5G_DATASET_F - ! H5G_TYPE_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: dset_id + TYPE(hobj_ref_t_f), INTENT(IN) :: ref + INTEGER, INTENT(OUT) :: obj_type + INTEGER, INTENT(OUT) :: hdferr INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference INTERFACE @@ -214,44 +204,32 @@ CONTAINS ref_f = ref%ref hdferr = h5rget_object_type_obj_c(dset_id, ref_f, obj_type ) +#ifdef H5_DOXYGEN_FORTRAN END SUBROUTINE h5rget_object_type_f +#else + END SUBROUTINE h5rget_object_type_obj_f +#endif + +!> +!! \ingroup FH5R +!! +!! \brief Retrieves a dataspace with the specified region selected. +!! +!! \note \fortran_obsolete +!! +!! \param dset_id Identifier of the dataset containing reference to the regions. +!! \param ref Reference to open. +!! \param space_id Dataspace identifier. +!! \param hdferr \fortran_error +!! +SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr) - -!****s* H5R/h5rget_region_region_f -! -! NAME -! h5rget_region_region_f -! -! PURPOSE -! Retrieves a dataspace with the specified region selected -! -! INPUTS -! dset_id - identifier of the dataset containing -! reference to the regions -! ref - reference to open -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rget_region_f subroutine. -! -! SOURCE - SUBROUTINE h5rget_region_region_f(dset_id, ref, space_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref ! Dataset region reference - INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: dset_id + TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref + INTEGER(HID_T), INTENT(OUT) :: space_id + INTEGER, INTENT(OUT) :: hdferr + INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference INTERFACE @@ -268,80 +246,57 @@ CONTAINS hdferr = h5rget_region_region_c(dset_id, ref_f, space_id ) END SUBROUTINE h5rget_region_region_f - -!****s* H5R/h5rget_region_ptr_f -! -! NAME -! h5rget_region_ptr_f -! -! PURPOSE -! Retrieves a dataspace with the specified region -! selected using pointer -! -! INPUTS -! dset_id - identifier of the dataset containing -! reference to the regions -! ref - reference to open -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! August 4, 2012 -! -! NOTES -! This is a module procedure for the h5rget_region_f subroutine. -! -! SOURCE - SUBROUTINE h5rget_region_ptr_f(dset_id, ref, space_id, hdferr) +!> +!! \ingroup FH5R +!! +!! \brief Retrieves a dataspace with the specified region selected using pointer. +!! +!! \note \fortran_approved +!! +!! \param dset_id Identifier of the dataset containing reference to the regions. +!! \param ref Reference to open. +!! \param space_id Dataspace identifier. +!! \param hdferr \fortran_error +!! +#ifdef H5_DOXYGEN_FORTRAN + SUBROUTINE h5rget_region_f(& +#else + SUBROUTINE h5rget_region_ptr_f(& +#endif + dset_id, ref, space_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - TYPE(C_PTR), INTENT(IN) :: ref ! Dataset region reference - INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: dset_id + TYPE(C_PTR), INTENT(IN) :: ref + INTEGER(HID_T), INTENT(OUT) :: space_id + INTEGER, INTENT(OUT) :: hdferr - hdferr = h5rget_region_ptr_c(dset_id, ref, space_id ) + hdferr = h5rget_region_ptr_c(dset_id, ref, space_id) +#ifdef H5_DOXYGEN_FORTRAN + END SUBROUTINE h5rget_region_f +#else END SUBROUTINE h5rget_region_ptr_f - - -!****s* H5R (F03)/h5rcreate_object_f -! -! NAME -! h5rcreate_object_f -! -! PURPOSE -! Creates reference to the object -! -! Inputs: -! loc_id - location identifier -! name - name of the object at the specified location -! Outputs: -! ref - reference to the specified object -! hdferr - returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rcreate_f subroutine. -! -! Signature: +#endif + +!> +!! \ingroup FH5R +!! +!! \brief Creates reference to the object. +!! +!! \note \fortran_obsolete +!! +!! \param loc_id Location identifier. +!! \param name Name of the object at the specified location. +!! \param ref Reference to the specified object. +!! \param hdferr \fortran_error +!! SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the object at location specified - ! by loc_id identifier - TYPE(hobj_ref_t_f), INTENT(INOUT), TARGET :: ref ! Object reference - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(hobj_ref_t_f), INTENT(INOUT), TARGET :: ref + INTEGER, INTENT(OUT) :: hdferr INTEGER :: namelen ! Name length TYPE(C_PTR) :: f_ptr @@ -352,44 +307,26 @@ CONTAINS hdferr = h5rcreate_ptr_c(f_ptr, loc_id, name, namelen, INT(0), INT(-1,HID_T)) END SUBROUTINE h5rcreate_object_f - -!****s* H5R (F90)/h5rcreate_region_f -! -! NAME -! h5rcreate_region_f -! -! PURPOSE -! Creates reference to the dataset region -! -! INPUTS -! loc_id - location identifier -! name - name of the dataset at the specified location -! space_id - dataspace identifier that describes selected region -! OUTPUTS -! ref - reference to the dataset region -! hdferr - returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rcreate_f subroutine. -! -! SOURCE +!> +!! \ingroup FH5R +!! +!! \brief Creates reference to the dataset region +!! +!! \note \fortran_obsolete +!! +!! \param loc_id Location identifier. +!! \param name Name of the dataset at the specified location. +!! \param space_id Dataspace identifier that describes selected region. +!! \param ref Reference to the dataset region. +!! \param hdferr \fortran_error +!! SUBROUTINE h5rcreate_region_f(loc_id, name, space_id, ref, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified - ! by loc_id identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataset's dataspace identifier - TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref ! Dataset region reference - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(IN) :: space_id + TYPE(hdset_reg_ref_t_f), INTENT(OUT) :: ref + INTEGER, INTENT(OUT) :: hdferr INTEGER :: namelen ! Name length INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference @@ -413,46 +350,36 @@ CONTAINS END SUBROUTINE h5rcreate_region_f -!****s* H5R (F03)/h5rcreate_ptr_f -! -! NAME -! h5rcreate_ptr_f -! -! PURPOSE -! Creates a reference. -! -! Inputs: -! loc_id - location identifier -! name - name of the dataset at the specified location -! ref_type - type of reference: -! H5R_OBJECT -! H5T_STD_REF_DSETREG -! Outputs: -! ref - reference created by the function call. -! hdferr - returns 0 if successful and -1 if fails. -! OPTIONAL -! space_id - dataspace identifier that describes selected region -! -! AUTHOR -! M. Scot Breitenfeld -! June 20, 2008 -! -! NOTES -! This is a module procedure for the h5rcreate_f -! subroutine where the output is a pointer. -! -! Signature: - SUBROUTINE h5rcreate_ptr_f(loc_id, name, ref_type, ref, hdferr, space_id) +!> +!! \ingroup FH5R +!! +!! \brief Creates a reference. +!! +!! \note \fortran_approved +!! +!! \param loc_id Location identifier. +!! \param name Name of the dataset at the specified location. +!! \param ref_type Type of reference: +!! \li H5R_OBJECT_F +!! \li H5T_STD_REF_DSETREG_F +!! \param ref Reference created by the function call. +!! \param hdferr \fortran_error +!! \param space_id Dataspace identifier that describes selected region. +!! +#ifdef H5_DOXYGEN_FORTRAN + SUBROUTINE h5rcreate_f(& +#else + SUBROUTINE h5rcreate_ptr_f(& +#endif + loc_id, name, ref_type, ref, hdferr, space_id) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified - ! by loc_id identifier - INTEGER, INTENT(IN) :: ref_type ! type of reference - TYPE(C_PTR), INTENT(INOUT) :: ref ! Reference created by the function call - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), INTENT(IN), OPTIONAL :: space_id ! Dataset's dataspace identifier -!***** + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(INOUT) :: ref + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), INTENT(IN), OPTIONAL :: space_id INTEGER :: namelen ! Name length INTEGER(HID_T) :: space_id_c @@ -461,86 +388,56 @@ CONTAINS IF(PRESENT(space_id)) space_id_c = space_id hdferr = h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id_c) +#ifdef H5_DOXYGEN_FORTRAN + END SUBROUTINE h5rcreate_f +#else END SUBROUTINE h5rcreate_ptr_f -!****s* H5R (F03)/h5rdereference_object_f -! -! NAME -! h5rdereference_object_f -! -! PURPOSE -! Opens the HDF5 object referenced -! -! Inputs: -! dset_id - identifier of the dataset containing -! reference -! ref - reference to open -! Outputs: -! obj_id - object_identifier -! hdferr - returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rdereference_f subroutine. -! -! Signature: +#endif +!> +!! \ingroup FH5R +!! +!! \brief Opens the HDF5 object referenced. +!! +!! \note \fortran_obsolete +!! +!! \param obj_id Identifier of the dataset containing reference. +!! \param ref Reference to open. +!! \param ref_obj_id Object_identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5rdereference_object_f(obj_id, ref, ref_obj_id, hdferr) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier - TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Object identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: obj_id + TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id + INTEGER, INTENT(OUT) :: hdferr TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(ref) hdferr = h5rdereference_ptr_c(obj_id, 0, f_ptr, ref_obj_id) END SUBROUTINE h5rdereference_object_f -!****s* H5R (F03)/h5rdereference_region_f -! -! NAME -! h5rdereference_region_f -! -! PURPOSE -! Opens the dataset region -! -! Inputs: -! dset_id - identifier of the dataset containing -! reference to the regions -! ref - reference to open -! Outputs: -! obj_id - dataspace identifier -! hdferr - returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! NOTES -! This is a module procedure for the h5rdereference_f subroutine. -! -! Signature: + +!> +!! \ingroup FH5R +!! +!! \brief Opens the dataset region. +!! +!! \note \fortran_obsolete +!! +!! \param obj_id Object identifier. +!! \param ref Reference to open. +!! \param ref_obj_id Identifier of the object containing reference to the regions. +!! \param hdferr \fortran_error +!! SUBROUTINE h5rdereference_region_f(obj_id, ref, ref_obj_id, hdferr) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier - TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: obj_id + TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id + INTEGER, INTENT(OUT) :: hdferr TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(ref) @@ -548,72 +445,45 @@ CONTAINS END SUBROUTINE h5rdereference_region_f -!****s* H5R (F03)/h5rdereference_ptr_f -! -! NAME -! h5rdereference_ptr_f -! -! PURPOSE -! Opens the HDF5 object referenced. -! -! Inputs: -! obj_id - valid identifier for the file containing the -! referenced object or any object in that file. -! ref_type - the reference type of ref. -! ref - Reference to open. -! Outputs: -! ref_obj_id - identifier of referenced object -! hdferr - returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! June 20, 2008 -! -! NOTES -! This is a module procedure for the h5rdereference_f -! subroutine using pointers. -! -! Signature: +!> +!! \ingroup FH5R +!! +!! \brief Opens the HDF5 object referenced. +!! +!! \note \fortran_approved +!! +!! \param obj_id Valid identifier for the file containing the referenced object or any object in that file. +!! \param ref_type The reference type of ref. +!! \param ref Reference to open. +!! \param ref_obj_id Identifier of referenced object. +!! \param hdferr \fortran_error +!! SUBROUTINE h5rdereference_ptr_f(obj_id, ref_type, ref, ref_obj_id, hdferr) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Valid identifier for the file containing the - ! referenced object or any object in that file. - INTEGER, INTENT(IN) :: ref_type ! The reference type of ref. - TYPE(C_PTR), INTENT(IN) :: ref ! Object reference + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN) :: ref INTEGER(HID_T), INTENT(OUT) :: ref_obj_id - ! Identifier of referenced object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER, INTENT(OUT) :: hdferr + hdferr = h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) END SUBROUTINE h5rdereference_ptr_f -! -!****s* H5R (F03)/h5rget_name_object_f -! -! NAME -! h5rget_name_object_f -! -! PURPOSE -! Retrieves a name of a referenced object. -! -! Inputs: -! loc_id - Identifier for the file containing the reference or for any object in that file. -! ref - An object or dataset region reference. -! -! Outputs: -! name - A name associated with the referenced object or dataset region. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! size - The size of the name buffer, returning 0 (zero) if no name is associated -! with the identifier. -! -! AUTHOR -! M. Scot Breitenfeld -! March 28, 2008 -! -! Signature: + +!> +!! \ingroup FH5R +!! +!! \brief Retrieves a name of a referenced object. +!! +!! \note \fortran_obsolete +!! +!! \param loc_id Identifier for the file containing the reference or for any object in that file. +!! \param ref An object or dataset region reference. +!! \param name A name associated with the referenced object or dataset region. +!! \param hdferr \fortran_error +!! \param size The size of the name buffer, returning 0 (zero) if no name is associated with the identifier. +!! SUBROUTINE h5rget_name_object_f(loc_id, ref, name, hdferr, size) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE @@ -622,7 +492,6 @@ CONTAINS INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size CHARACTER(LEN=*), INTENT(INOUT) :: name INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER(SIZE_T) :: size_default INTEGER(SIZE_T) :: name_len @@ -637,30 +506,20 @@ CONTAINS IF(PRESENT(size)) size = size_default END SUBROUTINE h5rget_name_object_f -!****s* H5R (F03)/h5rget_name_region_f -! -! NAME -! h5rget_name_region_f -! -! PURPOSE -! Retrieves a name of a dataset region. -! -! Inputs: -! loc_id - Identifier for the file containing the reference or for any object in that file. -! ref - An object or dataset region reference. -! -! Outputs: -! name - A name associated with the referenced object or dataset region. -! hdferr - Returns 0 if successful and -1 if fails. -! -! Optional parameters: -! size - The size of the name buffer, returning 0 (zero) if no name is associated with the identifier -! -! AUTHOR -! M. Scot Breitenfeld -! March 28, 2008 -! -! Signature: + +!> +!! \ingroup FH5R +!! +!! \brief Retrieves a name of a dataset region. +!! +!! \note \fortran_obsolete +!! +!! \param loc_id Identifier for the file containing the reference or for any object in that file. +!! \param ref An object or dataset region reference. +!! \param name A name associated with the referenced object or dataset region. +!! \param hdferr \fortran_error +!! \param size The size of the name buffer, returning 0 (zero) if no name is associated with the identifier. +!! SUBROUTINE h5rget_name_region_f(loc_id, ref, name, hdferr, size) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE @@ -669,7 +528,6 @@ CONTAINS INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size CHARACTER(LEN=*), INTENT(INOUT) :: name INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER(SIZE_T) :: size_default INTEGER(SIZE_T) :: name_len TYPE(C_PTR) :: f_ptr @@ -684,33 +542,27 @@ CONTAINS END SUBROUTINE h5rget_name_region_f - !****s* H5R (F03)/h5rget_name_ptr_f - ! - ! NAME - ! h5rget_name_ptr_f - ! - ! PURPOSE - ! Retrieves a name of a referenced object. - ! - ! Inputs: - ! loc_id - Identifier for the file containing the reference or for any object in that file. - ! ref_type - Type of reference. - ! ref - An object or dataset region reference. - ! - ! Outputs: - ! name - A name associated with the referenced object or dataset ptr. - ! hdferr - Returns 0 if successful and -1 if fails. - ! - ! Optional parameters: - ! size - The size of the name buffer, returning 0 (zero) if no name is associated - ! with the identifier - ! - ! AUTHOR - ! M. Scot Breitenfeld - ! March 28, 2008 - ! - ! Signature: - SUBROUTINE h5rget_name_ptr_f(loc_id, ref_type, ref, name, hdferr, size) +!> +!! \ingroup FH5R +!! +!! \brief Retrieves a name of a referenced object. +!! +!! \note \fortran_approved +!! +!! \param loc_id Identifier for the file containing the reference or for any object in that file. +!! \param ref_type Type of reference. +!! \param ref An object or dataset region reference. +!! \param name A name associated with the referenced object or dataset ptr. +!! \param hdferr \fortran_error +!!\param size The size of the name buffer, returning 0 (zero) if no name is associated with the identifier. +!! + +#ifdef H5_DOXYGEN_FORTRAN + SUBROUTINE h5rget_name_f(& +#else + SUBROUTINE h5rget_name_ptr_f(& +#endif + loc_id, ref_type, ref, name, hdferr, size) USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id @@ -719,7 +571,6 @@ CONTAINS CHARACTER(LEN=*), INTENT(INOUT) :: name INTEGER, INTENT(OUT) :: hdferr INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size -!***** INTEGER(SIZE_T) :: size_default INTEGER(SIZE_T) :: name_len @@ -729,37 +580,29 @@ CONTAINS IF(PRESENT(size)) size = size_default +#ifdef H5_DOXYGEN_FORTRAN + END SUBROUTINE h5rget_name_f +#else END SUBROUTINE h5rget_name_ptr_f - - !****s* H5R (F03)/h5rget_obj_type_f - ! - ! NAME - ! h5rget_obj_type_f - ! - ! PURPOSE - ! Retrieves the type of object that an object reference points to. - ! - ! Inputs: - ! loc_id - Identifier for the dataset containing the reference or - ! for the group that dataset is in. - ! ref_type - Type of reference to query. - ! ref - Reference to query. - ! - ! Outputs: - ! obj_type - Type of referenced object. - ! H5G_UNKNOWN_F - ! H5G_GROUP_F - ! H5G_DATASET_F - ! H5G_TYPE_F - ! - ! hdferr - Returns 0 if successful and -1 if fails. - ! - ! AUTHOR - ! M. Scot Breitenfeld - ! Decemeber 17, 2008 - ! - ! Signature: +#endif + +!> +!! \ingroup FH5R +!! +!! \brief Retrieves the type of object that an object reference points to. +!! +!! loc_id - Identifier for the dataset containing the reference or for the group that dataset is in. +!! ref_type - Type of reference to query. +!! ref - Reference to query. +!! obj_type - Type of referenced object: +!! \li H5G_UNKNOWN_F +!! \li H H5G_GROUP_F +!! \li H H5G_DATASET_F +!! \li H H5G_TYPE_F +!! hdferr - \fortran_error +!! SUBROUTINE h5rget_obj_type_f(loc_id, ref_type, ref, obj_type, hdferr) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id @@ -767,7 +610,6 @@ CONTAINS TYPE(C_PTR), INTENT(IN) :: ref INTEGER, INTENT(OUT) :: obj_type INTEGER, INTENT(OUT) :: hdferr - !***** INTERFACE INTEGER FUNCTION h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) & diff --git a/fortran/src/H5Sff.F90 b/fortran/src/H5Sff.F90 index 76b0dea..19a5b1f 100644 --- a/fortran/src/H5Sff.F90 +++ b/fortran/src/H5Sff.F90 @@ -1,13 +1,13 @@ -!****h* ROBODoc/H5S -! -! NAME -! MODULE H5S -! -! FILE -! fortran/src/H5Sff.F90 -! -! PURPOSE -! This file contains Fortran interfaces for H5S functions. +!> @defgroup FH5S Fortran Dataspace (H5S) Interface +!! +!! @see H5S, C-API +!! +!! @see @ref H5S_UG, User Guide +!! + +!> @ingroup FH5S +!! +!! @brief This module contains Fortran interfaces for H5S functions. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -36,40 +36,23 @@ ! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. ! This is needed for Windows based operating systems. ! -!***** MODULE H5S USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_INT USE H5GLOBAL CONTAINS -! -!****s* H5S/h5screate_simple_f -! -! NAME -! h5screate_simple_f -! -! PURPOSE -! Creates a new simple data space and opens it for access . -! -! INPUTS -! rank - number of dimensions -! dims - an array of the size of each dimension -! OUTPUTS -! space_id - dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! maxdims - an array of the maximum size of each dimension -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Creates a new simple data space and opens it for access. +!! +!! \param rank Number of dimensions. +!! \param dims An array of the size of each dimension. +!! \param space_id Dataspace identifier. +!! \param hdferr \fortran_error +!! \param maxdims An array of the maximum size of each dimension. +!! SUBROUTINE h5screate_simple_f(rank, dims, space_id, hdferr, maxdims) IMPLICIT NONE @@ -78,7 +61,6 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: space_id INTEGER, INTENT(OUT) :: hdferr INTEGER(HSIZE_T), OPTIONAL, INTENT(IN) :: maxdims(rank) -!***** INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: f_maxdims INTERFACE @@ -107,34 +89,18 @@ CONTAINS END SUBROUTINE h5screate_simple_f -! -!****s* H5S/h5sclose_f -! -! NAME -! h5sclose_f -! -! PURPOSE -! Releases and terminates access to a dataspace. -! -! INPUTS -! space_id - identifier of dataspace to release -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Releases and terminates access to a dataspace. +!! +!! \param space_id Identifier of dataspace to release. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sclose_f(space_id, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5sclose_c(space_id) BIND(C,NAME='h5sclose_c') IMPORT :: HID_T @@ -147,44 +113,23 @@ CONTAINS END SUBROUTINE h5sclose_f -! -!****s* H5S/h5screate_f -! -! NAME -! h5screate_f -! -! PURPOSE -! Creates a new dataspace of a specified type. -! -! INPUTS -! classtype - The type of the dataspace to be created -! Possible values are: -! H5S_SCALAR_F -! H5S_SIMPLE_F -! H5S_NULL_F -! OUTPUTS -! space_id - Dataspace identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! NOTES -! - -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Creates a new dataspace of a specified type. +!! +!! \param classtype The type of the dataspace to be created. Possible values are: +!! \li H5S_SCALAR_F +!! \li H5S_SIMPLE_F +!! \li H5S_NULL_F +!! \param space_id Dataspace identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5screate_f(classtype, space_id, hdferr) IMPLICIT NONE INTEGER, INTENT(IN) :: classtype INTEGER(HID_T), INTENT(OUT) :: space_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5screate_c(classtype, space_id) BIND(C,NAME='h5screate_c') IMPORT :: HID_T @@ -198,40 +143,20 @@ CONTAINS END SUBROUTINE h5screate_f -! -!****s* H5S/h5scopy_f -! -! NAME -! h5scopy_f -! -! PURPOSE -! Creates an exact copy of a dataspace. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! new_space_id - identifier of dataspace's copy -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! NOTES -! - -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Creates an exact copy of a dataspace. +!! +!! \param space_id Dataspace identifier. +!! \param new_space_id Identifier of dataspace's copy. +!! \param hdferr \fortran_error +!! SUBROUTINE h5scopy_f(space_id, new_space_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id INTEGER(HID_T), INTENT(OUT) :: new_space_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5scopy_c(space_id, new_space_id) BIND(C,NAME='h5scopy_c') IMPORT :: HID_T @@ -245,37 +170,20 @@ CONTAINS END SUBROUTINE h5scopy_f -! -!****s* H5S/h5sget_select_hyper_nblocks_f -! -! NAME -! h5sget_select_hyper_nblocks_f -! -! PURPOSE -! Get number of hyperslab blocks. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! num_blocks - number of hyperslab blocks in the current -! hyperslab selection -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Get number of hyperslab blocks. +!! +!! \param space_id Dataspace identifier. +!! \param num_blocks Number of hyperslab blocks in the current hyperslab selection. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sget_select_hyper_nblocks_f(space_id, num_blocks, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5sget_select_hyper_nblocks_c (space_id, num_blocks) & BIND(C,NAME='h5sget_select_hyper_nblocks_c') @@ -290,32 +198,17 @@ CONTAINS END SUBROUTINE h5sget_select_hyper_nblocks_f -! -!****s* H5S/h5sget_select_hyper_blocklist_f -! -! NAME -! h5sget_select_hyper_blocklist_f -! -! PURPOSE -! Gets the list of hyperslab blocks currently selected. -! -! INPUTS -! space_id - dataspace identifier -! startblock - hyperslab block to start with -! num_blocks - number of blocks to get -! OUTPUTS -! buf - buffer to hold block list -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Gets the list of hyperslab blocks currently selected. +!! +!! \param space_id Dataspace identifier. +!! \param startblock Hyperslab block to start with. +!! \param num_blocks Number of blocks to get. +!! \param buf Buffer to hold block list. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sget_select_hyper_blocklist_f(space_id, startblock, & num_blocks, buf, hdferr) IMPLICIT NONE @@ -324,7 +217,6 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN) :: num_blocks INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5sget_select_hyper_blocklist_c(space_id, startblock, & num_blocks, buf ) BIND(C,NAME='h5sget_select_hyper_blocklist_c') @@ -341,42 +233,22 @@ CONTAINS END SUBROUTINE h5sget_select_hyper_blocklist_f -! -!****s* H5S/h5sget_select_bounds_f -! -! NAME -! h5sget_select_bounds_f -! -! PURPOSE -! Gets the bounding box containing the current selection. -! -! INPUTS -! space_id - dataspace identifier -! -! OUTPUTS -! start - starting coordinates of bounding box -! end - ending coordinates of bounding box -! i.e., the coordinates of the diagonally opposite corner -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Gets the bounding box containing the current selection. +!! +!! \param space_id Dataspace identifier. +!! \param start Starting coordinates of bounding box. +!! \param end Ending coordinates of bounding box, i.e., the coordinates of the diagonally opposite corner. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sget_select_bounds_f(space_id, start, END, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5sget_select_bounds_c(space_id, start, end) & BIND(C,NAME='h5sget_select_bounds_c') @@ -392,37 +264,20 @@ CONTAINS END SUBROUTINE h5sget_select_bounds_f -! -!****s* H5S/h5sget_select_elem_npoints_f -! -! NAME -! h5sget_select_elem_npoints_f -! -! PURPOSE -! Gets the number of element points in the current selection -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! num_points - number of element points in the current -! dataspace selection -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Gets the number of element points in the current selection +!! +!! \param space_id Dataspace identifier. +!! \param num_points Number of element points in the current dataspace selection. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sget_select_elem_npoints_f(space_id, num_points, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id INTEGER(HSSIZE_T), INTENT(OUT) :: num_points INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5sget_select_elem_npoints_c (space_id, num_points) BIND(C,NAME='h5sget_select_elem_npoints_c') IMPORT :: HID_T, HSSIZE_T @@ -435,32 +290,17 @@ CONTAINS END SUBROUTINE h5sget_select_elem_npoints_f -! -!****s* H5S/h5sget_select_elem_pointlist_f -! -! NAME -! h5sget_select_elem_pointlist_f -! -! PURPOSE -! Gets the list of element points currently selected. -! -! INPUTS -! space_id - dataspace identifier -! startpoint - element point to start with -! num_points - number of element points to get -! OUTPUTS -! buf - buffer with element points selected -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Gets the list of element points currently selected. +!! +!! \param space_id Dataspace identifier. +!! \param startpoint Element point to start with. +!! \param num_points Number of element points to get. +!! \param buf Buffer with element points selected. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sget_select_elem_pointlist_f(space_id, startpoint, & num_points, buf, hdferr) IMPLICIT NONE @@ -469,7 +309,6 @@ CONTAINS INTEGER(HSIZE_T), INTENT(IN) :: num_points INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5sget_select_elem_pointlist_c(space_id, startpoint, & num_points, buf ) BIND(C,NAME='h5sget_select_elem_pointlist_c') @@ -487,38 +326,22 @@ CONTAINS END SUBROUTINE h5sget_select_elem_pointlist_f -! -!****s* H5S/h5sselect_elements_f -! -! NAME -! h5sselect_elements_f -! -! PURPOSE -! Selects elements to be included in the selection for -! a dataspace -! -! INPUTS -! space_id - dataspace identifier -! operator - flag, valid values are: -! H5S_SELECT_SET_F -! H5S_SELECT_APPEND_F -! H5S_SELECT_PREPEND_F -! rank - number of dataspace dimensions -! num_elements - number of elements to be selected -! coord - 2D (rank x num_elements) array with the -! elements coordinates ( 1-based); in C the -! array is stored in 2D as (num_element x rank) -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Selects elements to be included in the selection for a dataspace +!! +!! \param space_id Dataspace identifier. +!! \param operator Flag, valid values are: +!! \li H5S_SELECT_SET_F +!! \li H5S_SELECT_APPEND_F +!! \li H5S_SELECT_PREPEND_F +!! \param rank Number of dataspace dimensions. +!! \param num_elements Number of elements to be selected. +!! \param coord 2D (rank x num_elements) array with the elements coordinates ( 1-based); in C the +!! array is stored in 2D as (num_element x rank). +!! \param hdferr \fortran_error +!! SUBROUTINE h5sselect_elements_f(space_id, OPERATOR, rank, & num_elements, coord, hdferr) IMPLICIT NONE @@ -528,7 +351,6 @@ CONTAINS INTEGER(SIZE_T), INTENT(IN) :: num_elements INTEGER(HSIZE_T), INTENT(IN) , DIMENSION(rank,num_elements) :: coord INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:,:) :: c_coord INTEGER :: error, i @@ -568,35 +390,18 @@ CONTAINS END SUBROUTINE h5sselect_elements_f -! -!****s* H5S/h5sselect_all_f -! -! NAME -! h5sselect_all_f -! -! PURPOSE -! Selects the entire dataspace. -! -! INPUTS -! space_id - Identifier for the dataspace in which -! selection being made -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Selects the entire dataspace. +!! +!! \param space_id Identifier for the dataspace in which selection being made. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sselect_all_f(space_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5sselect_all_c(space_id) BIND(C,NAME='h5sselect_all_c') IMPORT :: HID_T @@ -609,36 +414,18 @@ CONTAINS END SUBROUTINE h5sselect_all_f -! -!****s* H5S/h5sselect_none_f -! -! NAME -! h5sselect_none_f -! -! PURPOSE -! Resets the selection region to include no elements. -! -! INPUTS -! space_id - the identifier for the dataspace in which -! the selection is being reset. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Resets the selection region to include no elements. +!! +!! \param space_id The identifier for the dataspace in which the selection is being reset. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sselect_none_f(space_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5sselect_none_c(space_id) BIND(C,NAME='h5sselect_none_c') IMPORT :: HID_T @@ -651,40 +438,20 @@ CONTAINS END SUBROUTINE h5sselect_none_f -! -!****s* H5S/h5sselect_valid_f -! -! NAME -! h5sselect_valid_f -! -! PURPOSE -! Verifies that the selection is within the extent of -! the dataspace. -! -! INPUTS -! space_id - identifier for the dataspace for which -! selection is verified -! OUTPUTS -! status - TRUE if the selection is contained within -! the extent, FALSE otherwise. -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Verifies that the selection is within the extent of the dataspace. +!! +!! \param space_id Identifier for the dataspace for whichselection is verified. +!! \param status TRUE if the selection is contained within the extent, FALSE otherwise. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sselect_valid_f(space_id, status, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id LOGICAL, INTENT(OUT) :: status INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER :: flag ! "TRUE/FALSE/ERROR" flag from C routine INTERFACE @@ -702,37 +469,20 @@ CONTAINS END SUBROUTINE h5sselect_valid_f -! -!****s* H5S/h5sget_simple_extent_npoints_f -! -! NAME -! h5sget_simple_extent_npoints_f -! -! PURPOSE -! Determines the number of elements in a dataspace. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! npoints - number of elements in the dataspace -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Determines the number of elements in a dataspace. +!! +!! \param space_id Dataspace identifier. +!! \param npoints Number of elements in the dataspace. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sget_simple_extent_npoints_f(space_id, npoints, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id INTEGER(HSIZE_T), INTENT(OUT) :: npoints INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5sget_simple_extent_npoints_c( space_id, npoints) BIND(C,NAME='h5sget_simple_extent_npoints_c') IMPORT :: HID_T, HSIZE_T @@ -746,35 +496,20 @@ CONTAINS END SUBROUTINE h5sget_simple_extent_npoints_f -! -!****s* H5S/h5sget_select_npoints_f -! -! NAME -! h5sget_select_npoints_f -! -! PURPOSE -! Determines the number of elements in a dataspace selection. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! npoints - number of points in the dataspace selection -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Determines the number of elements in a dataspace selection. +!! +!! \param space_id Dataspace identifier. +!! \param npoints Number of points in the dataspace selection. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sget_select_npoints_f(space_id, npoints, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id INTEGER(HSSIZE_T), INTENT(OUT) :: npoints INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5sget_select_npoints_c(space_id, npoints) BIND(C,NAME='h5sget_select_npoints_c') IMPORT :: HID_T, HSSIZE_T @@ -788,36 +523,20 @@ CONTAINS END SUBROUTINE h5sget_select_npoints_f -! -!****s* H5S/h5sget_simple_extent_ndims_f -! -! NAME -! h5sget_simple_extent_ndims_f -! -! PURPOSE -! Determines the dimensionality of a dataspace -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! rank - number of dataspace dimensions -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Determines the dimensionality of a dataspace +!! +!! \param space_id Dataspace identifier. +!! \param rank Number of dataspace dimensions. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sget_simple_extent_ndims_f(space_id, rank, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id INTEGER, INTENT(OUT) :: rank INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5sget_simple_extent_ndims_c(space_id, rank) BIND(C,NAME='h5sget_simple_extent_ndims_c') IMPORT :: HID_T @@ -830,40 +549,22 @@ CONTAINS hdferr = h5sget_simple_extent_ndims_c(space_id, rank) END SUBROUTINE h5sget_simple_extent_ndims_f -! -!****s* H5S/h5sget_simple_extent_dims_f -! -! NAME -! h5sget_simple_extent_dims_f -! -! PURPOSE -! Retrieves dataspace dimension size and maximum size. -! -! INPUTS -! space_id - dataspace identifier -! -! OUTPUTS -! dims - array to store size of each dimension -! maxdims - array to store maximum size of each dimension -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Retrieves dataspace dimension size and maximum size. +!! +!! \param space_id Dataspace identifier. +!! \param dims Array to store size of each dimension. +!! \param maxdims Array to store maximum size of each dimension. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sget_simple_extent_dims_f(space_id, dims, maxdims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5sget_simple_extent_dims_c(space_id, dims, maxdims) BIND(C,NAME='h5sget_simple_extent_dims_c') IMPORT :: HID_T, HSIZE_T @@ -878,40 +579,24 @@ CONTAINS END SUBROUTINE h5sget_simple_extent_dims_f -! -!****s* H5S/h5sget_simple_extent_type_f -! -! NAME -! h5sget_simple_extent_type_f -! -! PURPOSE -! Determine the current class of a dataspace -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! classtype - class type, possible values are: -! H5S_NO_CLASS_F -! H5S_SCALAR_F -! H5S_SIMPLE_F -! H5S_NULL_F -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Determine the current class of a dataspace +!! +!! \param space_id Dataspace identifier. +!! \param classtype Class type, possible values are: +!! \li H5S_NO_CLASS_F +!! \li H5S_SCALAR_F +!! \li H5S_SIMPLE_F +!! \li H5S_NULL_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5sget_simple_extent_type_f(space_id, classtype, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id INTEGER, INTENT(OUT) :: classtype INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5sget_simple_extent_type_c(space_id, classtype) BIND(C,NAME='h5sget_simple_extent_type_c') IMPORT :: HID_T @@ -925,32 +610,17 @@ CONTAINS END SUBROUTINE h5sget_simple_extent_type_f ! -!****s* H5S/h5sset_extent_simple_f -! -! NAME -! h5sset_extent_simple_f -! -! PURPOSE -! Sets or resets the size of an existing dataspace. -! -! INPUTS -! space_id - dataspace identifier -! rank - dataspace number of dimensions -! current_size - array with the new sizes of dimensions -! maximum_size - array with the new maximum sizes of -! dimensions -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Sets or resets the size of an existing dataspace. +!! +!! \param space_id Dataspace identifier. +!! \param rank Dataspace number of dimensions. +!! \param current_size Array with the new sizes of dimensions. +!! \param maximum_size Array with the new maximum sizes of dimensions. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sset_extent_simple_f(space_id, rank, current_size, & maximum_size, hdferr) IMPLICIT NONE @@ -959,7 +629,6 @@ CONTAINS INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5sset_extent_simple_c(space_id, rank, & current_size, maximum_size) BIND(C,NAME='h5sset_extent_simple_c') @@ -975,37 +644,20 @@ CONTAINS maximum_size) END SUBROUTINE h5sset_extent_simple_f -! -!****s* H5S/h5sis_simple_f -! -! NAME -! h5sis_simple_f -! -! PURPOSE -! Determines whether a dataspace is a simple dataspace. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! status - flag to indicate if dataspace -! is simple or not (TRUE or FALSE) -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Determines whether a dataspace is a simple dataspace. +!! +!! \param space_id Dataspace identifier. +!! \param status Flag to indicate if dataspace is simple or not (TRUE or FALSE). +!! \param hdferr \fortran_error +!! SUBROUTINE h5sis_simple_f(space_id, status, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id LOGICAL, INTENT(OUT) :: status INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER :: flag ! "TRUE/FALSE/ERROR from C" INTERFACE @@ -1023,40 +675,20 @@ CONTAINS END SUBROUTINE h5sis_simple_f -! -!****s* H5S/h5soffset_simple_f -! -! NAME -! h5soffset_simple_f -! -! PURPOSE -! Sets the offset of a simple dataspace. -! -! INPUTS -! space_id - dataspace identifier -! offset - the offset at which to position the -! selection -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Sets the offset of a simple dataspace. +!! +!! \param space_id Dataspace identifier. +!! \param offset The offset at which to position the selection. +!! \param hdferr \fortran_error +!! SUBROUTINE h5soffset_simple_f(space_id, offset, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5soffset_simple_c(space_id, offset) BIND(C,NAME='h5soffset_simple_c') IMPORT :: HID_T, HSSIZE_T @@ -1070,44 +702,20 @@ CONTAINS END SUBROUTINE h5soffset_simple_f -! -!****s* H5S/h5sextent_copy_f -! -! NAME -! h5sextent_copy_f -! -! PURPOSE -! Copies the extent of a dataspace. -! -! INPUTS -! dest_space_id - the identifier for the dataspace to which -! the extent is copied -! source_space_id - the identifier for the dataspace from -! which the extent is copied -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! NONE -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! NOTES -! - -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Copies the extent of a dataspace. +!! +!! \param dest_space_id The identifier for the dataspace to which the extent is copied. +!! \param source_space_id The identifier for the dataspace from which the extent is copied. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sextent_copy_f(dest_space_id, source_space_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dest_space_id INTEGER(HID_T), INTENT(IN) :: source_space_id - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5sextent_copy_c(dest_space_id, source_space_id) BIND(C,NAME='h5sextent_copy_c') IMPORT :: HID_T @@ -1121,34 +729,18 @@ CONTAINS END SUBROUTINE h5sextent_copy_f -! -!****s* H5S/h5sset_extent_none_f -! -! NAME -! h5sset_extent_none_f -! -! PURPOSE -! Removes the extent from a dataspace. -! -! INPUTS -! space_id - dataspace identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Removes the extent from a dataspace. +!! +!! \param space_id Dataspace identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sset_extent_none_f(space_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5sset_extent_none_c(space_id) BIND(C,NAME='h5sset_extent_none_c') IMPORT :: HID_T @@ -1160,39 +752,22 @@ CONTAINS hdferr = h5sset_extent_none_c(space_id) END SUBROUTINE h5sset_extent_none_f -! -!****s* H5S/h5sselect_hyperslab_f -! -! NAME -! h5sselect_hyperslab_f -! -! PURPOSE -! Selects a hyperslab region to add to the current selected -! region -! -! INPUTS -! space_id - dataspace identifier -! operator - flag, valid values are: -! H5S_SELECT_SET_F -! H5S_SELECT_OR_F -! start - array with hyperslab offsets -! count - number of blocks included in the hyperslab -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! stride - array with hyperslab strides -! block - array with hyperslab block sizes -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 6, 2001 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Selects a hyperslab region to add to the current selected +!! region +!! +!! \param space_id Dataspace identifier. +!! \param operator Flag, valid values are: +!! \li H5S_SELECT_SET_F +!! \li H5S_SELECT_OR_F +!! \param start Array with hyperslab offsets. +!! \param count Number of blocks included in the hyperslab. +!! \param hdferr \fortran_error +!! \param stride Array with hyperslab strides. +!! \param block Array with hyperslab block sizes. +!! SUBROUTINE h5sselect_hyperslab_f(space_id, OPERATOR, start, count, & hdferr, stride, BLOCK) IMPLICIT NONE @@ -1203,7 +778,6 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: BLOCK -!***** INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride INTEGER :: rank @@ -1276,79 +850,62 @@ CONTAINS END SUBROUTINE h5sselect_hyperslab_f ! !$! -! !$!****s* H5S/h5scombine_hyperslab_f -! !$! -! !$! NAME -! !$! h5scombine_hyperslab_f -! !$! -! !$! PURPOSE -! !$! Combine a hyperslab selection with the current -! !$! selection for a dataspace -! !$! -! !$! INPUTS -! !$! space_id - dataspace of selection to use -! !$! operator - flag, valid values are: -! !$! H5S_SELECT_NOOP_F -! !$! H5S_SELECT_SET_F -! !$! H5S_SELECT_OR_F -! !$! H5S_SELECT_AND_F -! !$! H5S_SELECT_XOR_F -! !$! H5S_SELECT_NOTB_F -! !$! H5S_SELECT_NOTA_F -! !$! H5S_SELECT_APPEND_F -! !$! H5S_SELECT_PREPEND_F -! !$! start - array with hyperslab offsets -! !$! count - number of blocks included in the -! !$! hyperslab -! !$! OUTPUTS -! !$! hyper_id - identifier for the new hyperslab -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! OPTIONAL PARAMETERS -! !$! stride - array with hyperslab strides -! !$! block - array with hyperslab block sizes -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! October 7, 2002 -! !$! -! !$! HISTORY -! !$! -! !$! -! !$! NOTES -! !$! Commented out until 1.6 ? 10/08/2002 -! !$! -! !$! SOURCE +!> +!! !$! +!! !$! NAME +!! !$! h5scombine_hyperslab_f +!! !$! +!! !$! PURPOSE +!! !$! Combine a hyperslab selection with the current +!! !$! selection for a dataspace +!! !$! +!! !$! INPUTS +!! !$! space_id - dataspace of selection to use +!! !$! operator - flag, valid values are: +!! !$! H5S_SELECT_NOOP_F +!! !$! H5S_SELECT_SET_F +!! !$! H5S_SELECT_OR_F +!! !$! H5S_SELECT_AND_F +!! !$! H5S_SELECT_XOR_F +!! !$! H5S_SELECT_NOTB_F +!! !$! H5S_SELECT_NOTA_F +!! !$! H5S_SELECT_APPEND_F +!! !$! H5S_SELECT_PREPEND_F +!! !$! start - array with hyperslab offsets +!! !$! count - number of blocks included in the +!! !$! hyperslab +!! !$! OUTPUTS +!! !$! hyper_id - identifier for the new hyperslab +!! !$! hdferr: - error code +!! !$! Success: 0 +!! !$! Failure: -1 +!! !$! OPTIONAL PARAMETERS +!! !$! stride - array with hyperslab strides +!! !$! block - array with hyperslab block sizes +!! !$! +!! !$! AUTHOR +!! !$! Elena Pourmal +!! !$! October 7, 2002 +!! !$! +!! !$! HISTORY +!! !$! +!! !$! +!! !$! NOTES +!! !$! Commented out until 1.6 ? 10/08/2002 +!! !$! +!! !$! SOURCE ! SUBROUTINE h5scombine_hyperslab_f(space_id, operator, start, count, & ! hyper_id, hdferr, stride, block) ! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier -! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_NOOP_F - ! H5S_SELECT_SET_F - ! H5S_SELECT_OR_F - ! H5S_SELECT_AND_F - ! H5S_SELECT_XOR_F - ! H5S_SELECT_NOTB_F - ! H5S_SELECT_NOTA_F - ! H5S_SELECT_APPEND_F - ! H5S_SELECT_PREPEND_F + + ! H5S_SELECT_AND_F + ! H5S_SELECT_XOR_F + ! H5S_SELECT_NOTB_F + ! H5S_SELECT_NOTA_F + ! H5S_SELECT_APPEND_F + ! H5S_SELECT_PREPEND_F ! -! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start - ! Starting coordinates of the hyperslab -! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count - ! Number of blocks to select - ! from dataspace -! INTEGER(HID_T), INTENT(OUT) :: hyper_id ! New hyperslab identifier -! INTEGER, INTENT(OUT) :: hdferr ! Error code -! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: stride - ! Array of how many elements to move - ! in each direction -! INTEGER(HSIZE_T), DIMENSION(:), OPTIONAL, INTENT(IN) :: block - ! Sizes of element block -! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_block -! INTEGER(HSIZE_T), DIMENSION(:), ALLOCATABLE :: def_stride + ! INTEGER :: rank ! INTEGER :: error1, error2 @@ -1359,15 +916,7 @@ CONTAINS ! !DEC$IF DEFINED(HDF5F90_WINDOWS) ! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOMBINE_HYPERSLAB_C'::h5scombine_hyperslab_c ! !DEC$ENDIF -! INTEGER(HID_T), INTENT(IN) :: space_id -! INTEGER, INTENT(IN) :: operator -! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: start -! INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: count -! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: stride -! INTEGER(HSIZE_T), DIMENSION(*), OPTIONAL, INTENT(IN) :: block -! INTEGER(HID_T), INTENT(OUT) :: hyper_id -! END FUNCTION h5scombine_hyperslab_c -! END INTERFACE + ! if (present(stride).and. present(block)) then ! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & @@ -1423,78 +972,64 @@ CONTAINS ! END SUBROUTINE h5scombine_hyperslab_f ! !$! -! !$!****s* H5S/ -! !$! -! !$! NAME -! !$! h5scombine_select_f -! !$! -! !$! PURPOSE -! !$! Combine two hyperslab selections with an operation -! !$! and return a dataspace with resulting selection. -! !$! -! !$! INPUTS -! !$! space1_id - dataspace of selection to use -! !$! operator - flag, valid values are: -! !$! H5S_SELECT_NOOP_F -! !$! H5S_SELECT_SET_F -! !$! H5S_SELECT_OR_F -! !$! H5S_SELECT_AND_F -! !$! H5S_SELECT_XOR_F -! !$! H5S_SELECT_NOTB_F -! !$! H5S_SELECT_NOTA_F -! !$! H5S_SELECT_APPEND_F -! !$! H5S_SELECT_PREPEND_F -! !$! space2_id - dataspace of selection to use -! !$! OUTPUTS -! !$! ds_id - idataspace identifier with the new selection -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! OPTIONAL PARAMETERS - NONE -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! October 7, 2002 -! !$! -! !$! HISTORY -! !$! -! !$! -! !$! NOTES commented out until 1.6 release(?) 10/08/2002 -! !$! - -! ! SOURCE +!> +!! !$! +!! !$! NAME +!! !$! h5scombine_select_f +!! !$! +!! !$! PURPOSE +!! !$! Combine two hyperslab selections with an operation +!! !$! and return a dataspace with resulting selection. +!! !$! +!! !$! INPUTS +!! !$! space1_id - dataspace of selection to use +!! !$! operator - flag, valid values are: +!! !$! H5S_SELECT_NOOP_F +!! !$! H5S_SELECT_SET_F +!! !$! H5S_SELECT_OR_F +!! !$! H5S_SELECT_AND_F +!! !$! H5S_SELECT_XOR_F +!! !$! H5S_SELECT_NOTB_F +!! !$! H5S_SELECT_NOTA_F +!! !$! H5S_SELECT_APPEND_F +!! !$! H5S_SELECT_PREPEND_F +!! !$! space2_id - dataspace of selection to use +!! !$! OUTPUTS +!! !$! ds_id - idataspace identifier with the new selection +!! !$! hdferr: - error code +!! !$! Success: 0 +!! !$! Failure: -1 +!! !$! OPTIONAL PARAMETERS - NONE +!! !$! +!! !$! AUTHOR +!! !$! Elena Pourmal +!! !$! October 7, 2002 +!! !$! +!! !$! HISTORY +!! !$! +!! !$! +!! !$! NOTES commented out until 1.6 release(?) 10/08/2002 +!! !$! +! +!! ! SOURCE ! !$ SUBROUTINE h5scombine_select_f(space1_id, operator, space2_id, & ! ds_id, hdferr) ! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier -! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier -! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_NOOP_F - ! H5S_SELECT_SET_F - ! H5S_SELECT_OR_F - ! H5S_SELECT_AND_F - ! H5S_SELECT_XOR_F - ! H5S_SELECT_NOTB_F - ! H5S_SELECT_NOTA_F - ! H5S_SELECT_APPEND_F - ! H5S_SELECT_PREPEND_F + + ! H5S_SELECT_AND_F + ! H5S_SELECT_XOR_F + ! H5S_SELECT_NOTB_F + ! H5S_SELECT_NOTA_F + ! H5S_SELECT_APPEND_F + ! H5S_SELECT_PREPEND_F ! -! INTEGER(HID_T), INTENT(OUT) :: ds_id ! New dataspace identifier -! INTEGER, INTENT(OUT) :: hdferr ! Error code -! -! INTERFACE -! INTEGER FUNCTION h5scombine_select_c(space1_id, operator, & + ! space2_id, ds_id) ! USE H5GLOBAL ! !DEC$IF DEFINED(HDF5F90_WINDOWS) ! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOMBINE_SELECT_C'::h5scombine_select_c ! !DEC$ENDIF -! INTEGER(HID_T), INTENT(IN) :: space1_id -! INTEGER(HID_T), INTENT(IN) :: space2_id -! INTEGER, INTENT(IN) :: operator -! INTEGER(HID_T), INTENT(OUT) :: ds_id -! END FUNCTION h5scombine_select_c -! END INTERFACE + ! hdferr = h5scombine_select_c(space1_id, operator, space2_id, & ! ds_id) @@ -1503,113 +1038,90 @@ CONTAINS ! END SUBROUTINE h5scombine_select_f ! !$! -! !$!****s* H5S/ -! !$! -! !$! NAME -! !$! h5smodify_select_f -! !$! -! !$! PURPOSE -! !$! Refine a hyperslab selection with an operation -! !$! using second hyperslab -! !$! -! !$! INPUTS -! !$! space1_id - dataspace of selection to modify -! !$! operator - flag, valid values are: -! !$! H5S_SELECT_NOOP_F -! !$! H5S_SELECT_SET_F -! !$! H5S_SELECT_OR_F -! !$! H5S_SELECT_AND_F -! !$! H5S_SELECT_XOR_F -! !$! H5S_SELECT_NOTB_F -! !$! H5S_SELECT_NOTA_F -! !$! H5S_SELECT_APPEND_F -! !$! H5S_SELECT_PREPEND_F -! !$! space2_id - dataspace of selection to use -! !$! -! !$! OUTPUTS -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! OPTIONAL PARAMETERS - NONE -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! October 7, 2002 -! !$! -! !$! HISTORY -! !$! -! !$! -! !$! NOTESCommented out until 1.6 release(?) 10/08/2002 EIP -! !$! - -! ! SOURCE +!> +!! !$! +!! !$! NAME +!! !$! h5smodify_select_f +!! !$! +!! !$! PURPOSE +!! !$! Refine a hyperslab selection with an operation +!! !$! using second hyperslab +!! !$! +!! !$! INPUTS +!! !$! space1_id - dataspace of selection to modify +!! !$! operator - flag, valid values are: +!! !$! H5S_SELECT_NOOP_F +!! !$! H5S_SELECT_SET_F +!! !$! H5S_SELECT_OR_F +!! !$! H5S_SELECT_AND_F +!! !$! H5S_SELECT_XOR_F +!! !$! H5S_SELECT_NOTB_F +!! !$! H5S_SELECT_NOTA_F +!! !$! H5S_SELECT_APPEND_F +!! !$! H5S_SELECT_PREPEND_F +!! !$! space2_id - dataspace of selection to use +!! !$! +!! !$! OUTPUTS +!! !$! hdferr: - error code +!! !$! Success: 0 +!! !$! Failure: -1 +!! !$! OPTIONAL PARAMETERS - NONE +!! !$! +!! !$! AUTHOR +!! !$! Elena Pourmal +!! !$! October 7, 2002 +!! !$! +!! !$! HISTORY +!! !$! +!! !$! +!! !$! NOTESCommented out until 1.6 release(?) 10/08/2002 EIP +!! !$! +! +!! ! SOURCE ! SUBROUTINE h5smodify_select_f(space1_id, operator, space2_id, & ! hdferr) ! IMPLICIT NONE -! INTEGER(HID_T), INTENT(INOUT) :: space1_id ! Dataspace identifier to - ! modify -! INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier -! INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_NOOP_F - ! H5S_SELECT_SET_F - ! H5S_SELECT_OR_F - ! H5S_SELECT_AND_F - ! H5S_SELECT_XOR_F - ! H5S_SELECT_NOTB_F - ! H5S_SELECT_NOTA_F - ! H5S_SELECT_APPEND_F - ! H5S_SELECT_PREPEND_F + + ! H5S_SELECT_AND_F + ! H5S_SELECT_XOR_F + ! H5S_SELECT_NOTB_F + ! H5S_SELECT_NOTA_F + ! H5S_SELECT_APPEND_F + ! H5S_SELECT_PREPEND_F ! -! INTEGER, INTENT(OUT) :: hdferr ! Error code -! INTERFACE -! INTEGER FUNCTION h5smodify_select_c(space1_id, operator, & + ! space2_id) ! USE H5GLOBAL ! !DEC$IF DEFINED(HDF5F90_WINDOWS) ! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SMODIFY_SELECT_C'::h5smodify_select_c ! !DEC$ENDIF -! INTEGER(HID_T), INTENT(INOUT) :: space1_id -! INTEGER(HID_T), INTENT(IN) :: space2_id -! INTEGER, INTENT(IN) :: operator -! END FUNCTION h5smodify_select_c -! END INTERFACE + ! hdferr = h5smodify_select_c(space1_id, operator, space2_id) ! return ! END SUBROUTINE h5smodify_select_f -! -!****s* H5S/h5sget_select_type_f -! -! NAME -! h5sget_select_type_f -! -! PURPOSE -! Retrieve the type of selection -! -! INPUTS -! space_id - dataspace identifier with selection -! OUTPUTS -! type - selection type flag, valid values are: -! H5S_SEL_ERROR_F -! H5S_SEL_NONE_F -! H5S_SEL_POINTS_F -! H5S_SEL_HYPERSLABS_F -! H5S_SEL_ALL_F -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Retrieve the type of selection +!! +!! \param space_id Dataspace identifier with selection. +!! \param type Selection type flag, valid values are: +!! \li H5S_SEL_ERROR_F +!! \li H5S_SEL_NONE_F +!! \li H5S_SEL_POINTS_F +!! \li H5S_SEL_HYPERSLABS_F +!! \li H5S_SEL_ALL_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5sget_select_type_f(space_id, TYPE, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(INOUT) :: space_id INTEGER, INTENT(OUT) :: TYPE INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5sget_select_type_c(space_id, TYPE) BIND(C,NAME='h5sget_select_type_c') IMPORT :: HID_T @@ -1624,37 +1136,26 @@ CONTAINS END SUBROUTINE h5sget_select_type_f -! -!****s* H5S/H5Sdecode_f -! -! NAME -! H5Sdecode_f -! -! PURPOSE -! Decode a binary object description of data space and return a new object handle. -! -! INPUTS -! buf - Buffer for the data space object to be decoded. -! obj_id - Object ID -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! March 26, 2008 -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Decode a binary object description of data space and return a new object handle. +!! +!! \param buf Buffer for the data space object to be decoded. +!! \param obj_id Object ID. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sdecode_f(buf, obj_id, hdferr) IMPLICIT NONE CHARACTER(LEN=*), INTENT(IN) :: buf INTEGER(HID_T), INTENT(OUT) :: obj_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5sdecode_c(buf, obj_id) BIND(C,NAME='h5sdecode_c') IMPORT :: C_CHAR IMPORT :: HID_T CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: buf - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID + INTEGER(HID_T), INTENT(OUT) :: obj_id END FUNCTION h5sdecode_c END INTERFACE @@ -1662,35 +1163,24 @@ CONTAINS END SUBROUTINE h5sdecode_f -! -!****s* H5S/H5Sencode_f -! -! NAME -! H5Sencode_f -! -! PURPOSE -! Encode a data space object description into a binary buffer. -! -! INPUTS -! obj_id - Identifier of the object to be encoded. -! buf - Buffer for the object to be encoded into. -! nalloc - The size of the allocated buffer. -! OUTPUTS -! nalloc - The size of the buffer needed. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! March 26, 2008 -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Encode a data space object description into a binary buffer. +!! +!! \param obj_id Identifier of the object to be encoded. +!! \param buf Buffer for the object to be encoded into. +!! \param nalloc The size of the buffer needed. +!! \param hdferr \fortran_error +!! \param fapl_id File access property list identifier. +!! SUBROUTINE h5sencode_f(obj_id, buf, nalloc, hdferr, fapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id CHARACTER(LEN=*), INTENT(OUT) :: buf INTEGER(SIZE_T), INTENT(INOUT) :: nalloc INTEGER, INTENT(OUT) :: hdferr - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: fapl_id ! File access property list -!***** + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: fapl_id INTEGER(HID_T) :: fapl_id_default INTERFACE @@ -1712,32 +1202,22 @@ CONTAINS END SUBROUTINE h5sencode_f -!****s* H5S/h5sextent_equal_f -! -! NAME -! h5sextent_equal_f -! -! PURPOSE -! Determines whether two dataspace extents are equal. -! -! INPUTS -! space1_id - First dataspace identifier. -! space2_id - Second dataspace identifier. -! OUTPUTS -! Equal - .TRUE. if equal, .FALSE. if unequal. -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! April 2, 2008 -! -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Determines whether two dataspace extents are equal. +!! +!! \param space1_id First dataspace identifier. +!! \param space2_id Second dataspace identifier. +!! \param Equal .TRUE. if equal, .FALSE. if unequal. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sextent_equal_f(space1_id, space2_id, equal, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space1_id INTEGER(HID_T), INTENT(IN) :: space2_id LOGICAL, INTENT(OUT) :: Equal INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER(HID_T) :: c_equal INTERFACE @@ -1756,28 +1236,18 @@ CONTAINS END SUBROUTINE h5sextent_equal_f -! -!****s* H5S/h5sget_regular_hyperslab_f -! -! NAME -! h5sget_regular_hyperslab_f -! -! PURPOSE -! Retrieves a regular hyperslab selection. -! -! INPUTS -! space_id - The identifier of the dataspace. -! OUTPUTS -! start - Offset of the start of the regular hyperslab. -! stride - Stride of the regular hyperslab. -! count - Number of blocks in the regular hyperslab. -! block - Size of a block in the regular hyperslab. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! January, 28 2016 -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Retrieves a regular hyperslab selection. +!! +!! \param space_id The identifier of the dataspace. +!! \param start Offset of the start of the regular hyperslab. +!! \param stride Stride of the regular hyperslab. +!! \param count Number of blocks in the regular hyperslab. +!! \param block Size of a block in the regular hyperslab. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sget_regular_hyperslab_f(space_id, start, stride, count, block, hdferr) IMPLICIT NONE @@ -1787,7 +1257,6 @@ CONTAINS INTEGER(HSIZE_T), INTENT(OUT), DIMENSION(*), TARGET :: count INTEGER(HSIZE_T), INTENT(OUT), DIMENSION(*), TARGET :: block INTEGER, INTENT(OUT) :: hdferr -!***** TYPE(C_PTR) :: start_c, stride_c, count_c, block_c INTEGER :: n @@ -1824,30 +1293,20 @@ CONTAINS END SUBROUTINE h5sget_regular_hyperslab_f -!****s* H5S/h5sis_regular_hyperslab_f -! -! NAME -! h5sis_regular_hyperslab_f -! -! PURPOSE -! Retrieves a regular hyperslab selection. -! -! INPUTS -! space_id - The identifier of the dataspace. -! OUTPUTS -! IsRegular - TRUE or FALSE for hyperslab selection if successful. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! January, 28 2016 -! SOURCE +!> +!! \ingroup FH5S +!! +!! \brief Retrieves a regular hyperslab selection. +!! +!! \param space_id The identifier of the dataspace. +!! \param IsRegular TRUE or FALSE for hyperslab selection if successful. +!! \param hdferr \fortran_error +!! SUBROUTINE h5sis_regular_hyperslab_f(space_id, IsRegular, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: space_id LOGICAL :: IsRegular INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER(C_INT) :: status INTERFACE diff --git a/fortran/src/H5Tff.F90 b/fortran/src/H5Tff.F90 index 0a11976..d32b160 100644 --- a/fortran/src/H5Tff.F90 +++ b/fortran/src/H5Tff.F90 @@ -1,10 +1,13 @@ -!****h* ROBODoc/H5T -! -! NAME -! MODULE H5T -! -! PURPOSE -! This file contains Fortran interfaces for H5T functions. +!> @defgroup FH5T Fortran Datatype (H5T) Interface +!! +!! @see H5T, C-API +!! +!! @see @ref H5T_UG, User Guide +!! + +!> @ingroup FH5T +!! +!! @brief This module contains Fortran interfaces for H5T functions. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -33,7 +36,6 @@ ! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. ! This is needed for Windows based operating systems. ! -!***** MODULE H5T @@ -43,53 +45,34 @@ MODULE H5T PRIVATE h5tenum_insert_f03, h5tenum_insert_f90 -!****t* H5T/hvl_t ! Fortran2003 Derived Type: TYPE hvl_t - INTEGER(size_t) :: len ! Length of VL data (in base type units) - TYPE(C_PTR) :: p ! Pointer to VL data + INTEGER(size_t) :: len !< Length of VL data (in base type units) + TYPE(C_PTR) :: p !< Pointer to VL data END TYPE hvl_t -!***** +#ifndef H5_DOXYGEN_FORTRAN INTERFACE h5tenum_insert_f MODULE PROCEDURE h5tenum_insert_f03 MODULE PROCEDURE h5tenum_insert_f90 END INTERFACE +#endif + CONTAINS -! -!****s* H5T/h5topen_f -! -! NAME -! h5topen_f -! -! PURPOSE -! Opens named datatype. -! -! INPUTS -! loc_id - location identifier -! name - a datatype name -! OUTPUTS -! type_id - datatype identifier -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! tapl_id - datatype access property list identifier. -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! Added optional parameter 'tapl_id' for compatibility -! with H5Topen2. April 9, 2009. -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Opens named datatype. +!! +!! \param loc_id Location identifier. +!! \param name A datatype name. +!! \param type_id Datatype identifier. +!! \param hdferr \fortran_error +!! \param tapl_id Datatype access property list identifier. +!! SUBROUTINE h5topen_f(loc_id, name, type_id, hdferr, tapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id @@ -97,7 +80,6 @@ CONTAINS INTEGER(HID_T), INTENT(OUT) :: type_id INTEGER, INTENT(OUT) :: hdferr INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id -!***** INTEGER :: namelen ! Name length INTEGER(HID_T) :: tapl_id_default @@ -121,53 +103,29 @@ CONTAINS hdferr = h5topen_c(loc_id, name, namelen, type_id, tapl_id_default) END SUBROUTINE h5topen_f -! -!****s* H5T/h5tcommit_f -! -! NAME -! h5tcommit_f -! -! PURPOSE -! Commits a transient datatype to a file, creating a -! new named datatype. -! -! INPUTS -! loc_id - location identifier -! name - name of the datatype to be stored -! at the specified location -! type_id - identifier of a datatype to be stored -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! lcpl_id - Link creation property list -! tcpl_id - Datatype creation property list -! tapl_id - Datatype access property list -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! - Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! - Added optional parameters introduced in version 1.8 -! M. Scot Breitenfeld -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Commits a transient datatype to a file, creating a new named datatype. +!! +!! \param loc_id Location identifier. +!! \param name Name of the datatype to be stored at the specified location. +!! \param type_id Identifier of a datatype to be stored. +!! \param hdferr \fortran_error +!! \param lcpl_id Link creation property list. +!! \param tcpl_id Datatype creation property list. +!! \param tapl_id Datatype access property list. +!! SUBROUTINE h5tcommit_f(loc_id, name, type_id, hdferr, & lcpl_id, tcpl_id, tapl_id ) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + INTEGER(HID_T), INTENT(IN) :: loc_id CHARACTER(LEN=*), INTENT(IN) :: name - ! Datatype name within file or group - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! Datatype creation property list - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! Datatype access property list -!***** + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: hdferr + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id INTEGER :: namelen ! Name length @@ -205,36 +163,20 @@ CONTAINS lcpl_id_default, tcpl_id_default, tapl_id_default ) END SUBROUTINE h5tcommit_f -! -!****s* H5T/h5tcopy_f -! -! NAME -! h5tcopy_f -! -! PURPOSE -! Creates a copy of existing datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! new_type_id - identifier of datatype's copy -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Creates a copy of existing datatype. +!! +!! \param type_id Datatype identifier. +!! \param new_type_id Identifier of datatype's copy. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(HID_T), INTENT(OUT) :: new_type_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tcopy_c(type_id, new_type_id) BIND(C,NAME='h5tcopy_c') IMPORT :: HID_T @@ -245,39 +187,22 @@ CONTAINS hdferr = h5tcopy_c(type_id, new_type_id) END SUBROUTINE h5tcopy_f -! -!****s* H5T/h5tequal_f -! -! NAME -! h5tequal_f -! -! PURPOSE -! Determines whether two datatype identifiers refer -! to the same datatype. -! -! INPUTS -! type1_id - datatype identifier -! type2_id - datatype identifier -! OUTPUTS -! flag - TRUE/FALSE flag to indicate -! if two datatypes are equal -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Determines whether two datatype identifiers refer to the same datatype. +!! +!! \param type1_id Datatype identifier. +!! \param type2_id Datatype identifier. +!! \param flag TRUE/FALSE flag to indicate if two datatypes are equal. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tequal_f(type1_id, type2_id, flag, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type1_id INTEGER(HID_T), INTENT(IN) :: type2_id LOGICAL, INTENT(OUT) :: flag INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER :: c_flag INTERFACE INTEGER FUNCTION h5tequal_c(type1_id, type2_id, c_flag) BIND(C,NAME='h5tequal_c') @@ -293,35 +218,18 @@ CONTAINS hdferr = h5tequal_c(type1_id, type2_id, c_flag) IF(c_flag .GT. 0) flag = .TRUE. END SUBROUTINE h5tequal_f -! -!****s* H5T/h5tclose_f -! -! NAME -! h5tclose_f -! -! PURPOSE -! Releases a datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Releases a datatype. +!! +!! \param type_id Datatype identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tclose_f(type_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tclose_c(type_id) BIND(C,NAME='h5tclose_c') IMPORT :: HID_T @@ -332,49 +240,32 @@ CONTAINS hdferr = h5tclose_c(type_id) END SUBROUTINE h5tclose_f -! -!****s* H5T/h5tget_class_f -! -! NAME -! h5tget_class_f -! -! PURPOSE -! Returns the datatype class identifier. -! -! INPUTS -! type_id - Datatype identifier -! OUTPUTS -! class - Class, possible values are: -! H5T_NO_CLASS_F (-1) -! H5T_INTEGER_F (0) -! H5T_FLOAT_F (1) -! H5T_TIME_F (2) -! H5T_STRING_F (3) -! H5T_BITFIELD_F (4) -! H5T_OPAQUE_F (5) -! H5T_COMPOUND_F (6) -! H5T_REFERENCE_F (7) -! H5T_ENUM_F (8) -! H5T_VLEN_F (9) -! H5T_ARRAY_F (10) -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Returns the datatype class identifier. +!! +!! \param type_id Datatype identifier. +!! \param class Class, possible values are: +!! \li H5T_NO_CLASS_F +!! \li H5T_INTEGER_F +!! \li H5T_FLOAT_F +!! \li H5T_TIME_F +!! \li H5T_STRING_F +!! \li H5T_BITFIELD_F +!! \li H5T_OPAQUE_F +!! \li H5T_COMPOUND_F +!! \li H5T_REFERENCE_F +!! \li H5T_ENUM_F +!! \li H5T_VLEN_F +!! \li H5T_ARRAY_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_class_f(type_id, class, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(OUT) :: class INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_class_c(type_id, class) BIND(C,NAME='h5tget_class_c') IMPORT :: HID_T @@ -386,37 +277,20 @@ CONTAINS hdferr = h5tget_class_c(type_id, class) END SUBROUTINE h5tget_class_f -! -!****s* H5T/h5tget_size_f -! -! NAME -! h5tget_size_f -! -! PURPOSE -! Returns the size of a datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! size - datatype size -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Returns the size of a datatype. +!! +!! \param type_id Datatype identifier. +!! \param size Datatype size. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_size_f(type_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: size ! Datatype size - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5tget_size_c(type_id, size) BIND(C,NAME='h5tget_size_c') IMPORT :: HID_T, SIZE_T @@ -429,38 +303,20 @@ CONTAINS hdferr = h5tget_size_c(type_id, size) END SUBROUTINE h5tget_size_f -! -!****s* H5T/h5tset_size_f -! -! NAME -! h5tset_size_f -! -! PURPOSE -! Sets the total size for an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! size - size of the datatype -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Sets the total size for an atomic datatype. +!! +!! \param type_id Datatype identifier. +!! \param size Size of the datatype. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tset_size_f(type_id, size, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: size ! Datatype size - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5tset_size_c(type_id, size) BIND(C,NAME='h5tset_size_c') IMPORT :: HID_T, SIZE_T @@ -473,44 +329,24 @@ CONTAINS hdferr = h5tset_size_c(type_id, size) END SUBROUTINE h5tset_size_f -! -!****s* H5T/h5tget_order_f -! -! NAME -! h5tget_order_f -! -! PURPOSE -! Returns the byte order of an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! order - byte order for the datatype, possible -! values are: -! H5T_ORDER_LE_F -! H5T_ORDER_BE_F -! H5T_ORDER_VAX_F (not implemented yet) -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Returns the byte order of an atomic datatype. +!! +!! \param type_id Datatype identifier. +!! \param order Byte order for the datatype, possible values are: +!! \li H5T_ORDER_LE_F +!! \li H5T_ORDER_BE_F +!! \li H5T_ORDER_VAX_F (not implemented yet) +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_order_f(type_id, order, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(OUT) :: order - ! Datatype byte order, possible values are: - ! H5T_ORDER_LE_F - ! H5T_ORDER_BE_F ! H5T_ORDER_VAX_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5tget_order_c(type_id, order) BIND(C,NAME='h5tget_order_c') IMPORT :: HID_T @@ -522,43 +358,24 @@ CONTAINS hdferr = h5tget_order_c(type_id, order) END SUBROUTINE h5tget_order_f -! -!****s* H5T/h5tset_order_f -! -! NAME -! h5tset_order_f -! -! PURPOSE -! Sets the byte ordering of an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! order - datatype byte order Possible values are: -! H5T_ORDER_LE_F -! H5T_ORDER_BE_F -! H5T_ORDER_VAX_F (not implemented yet) -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Sets the byte ordering of an atomic datatype. +!! +!! \param type_id Datatype identifier. +!! \param order Datatype byte order Possible values are: +!! \li H5T_ORDER_LE_F +!! \li H5T_ORDER_BE_F +!! \li H5T_ORDER_VAX_F (not implemented yet) +!! \param hdferr \fortran_error +!! SUBROUTINE h5tset_order_f(type_id, order, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: order ! Datatype byte order, possible values - ! are: - ! H5T_ORDER_LE_F - ! H5T_ORDER_BE_F + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: order ! H5T_ORDER_VAX_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5tset_order_c(type_id, order) BIND(C,NAME='h5tset_order_c') IMPORT :: HID_T @@ -571,37 +388,20 @@ CONTAINS hdferr = h5tset_order_c(type_id, order) END SUBROUTINE h5tset_order_f -! -!****s* H5T/h5tget_precision_f -! -! NAME -! h5tget_precision_f -! -! PURPOSE -! Returns the precision of an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! precision - precision of the datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Returns the precision of an atomic datatype. +!! +!! \param type_id Datatype identifier. +!! \param precision Precision of the datatype. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_precision_f(type_id, PRECISION, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(SIZE_T), INTENT(OUT) :: precision INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_precision_c(type_id, PRECISION) BIND(C,NAME='h5tget_precision_c') IMPORT :: HID_T, SIZE_T @@ -614,37 +414,20 @@ CONTAINS hdferr = h5tget_precision_c(type_id, PRECISION) END SUBROUTINE h5tget_precision_f -! -!****s* H5T/h5tset_precision_f -! -! NAME -! h5tset_precision_f -! -! PURPOSE -! Sets the precision of an atomic datatype. -! -! INPUTS -! type_id - datatype identifier -! precision - datatype precision -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Sets the precision of an atomic datatype. +!! +!! \param type_id Datatype identifier. +!! \param precision Datatype precision. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tset_precision_f(type_id, PRECISION, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(SIZE_T), INTENT(IN) :: PRECISION INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tset_precision_c (type_id, PRECISION) BIND(C,NAME='h5tset_precision_c') IMPORT :: HID_T, SIZE_T @@ -657,36 +440,20 @@ CONTAINS hdferr = h5tset_precision_c(type_id, PRECISION) END SUBROUTINE h5tset_precision_f -! -!****s* H5T/h5tget_offset_f -! -! NAME -! h5tget_offset_f -! -! PURPOSE -! Retrieves the bit offset of the first significant bit. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! offset - offset value -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Retrieves the bit offset of the first significant bit. +!! +!! \param type_id Datatype identifier. +!! \param offset Offset value. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_offset_f(type_id, offset, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(SIZE_T), INTENT(OUT) :: offset INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_offset_c(type_id, offset) BIND(C,NAME='h5tget_offset_c') IMPORT :: HID_T, SIZE_T @@ -699,36 +466,20 @@ CONTAINS hdferr = h5tget_offset_c(type_id, offset) END SUBROUTINE h5tget_offset_f -! -!****s* H5T/h5tset_offset_f -! -! NAME -! h5tset_offset_f -! -! PURPOSE -! Sets the bit offset of the first significant bit. -! -! INPUTS -! type_id - datatype identifier -! offset - offset value -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Sets the bit offset of the first significant bit. +!! +!! \param type_id Datatype identifier. +!! \param offset Offset value. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tset_offset_f(type_id, offset, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(SIZE_T), INTENT(IN) :: offset INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tset_offset_c(type_id, offset) BIND(C,NAME='h5tset_offset_c') IMPORT :: HID_T, SIZE_T @@ -741,46 +492,27 @@ CONTAINS hdferr = h5tset_offset_c(type_id, offset) END SUBROUTINE h5tset_offset_f -! -!****s* H5T/h5tget_pad_f -! -! NAME -! h5tget_pad_f -! -! PURPOSE -! Retrieves the padding type of the least and -! most -significant bit padding. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! lsbpad - least-significant bit padding type -! msbpad - most-significant bit padding type -! Possible values of padding type are: -! H5T_PAD_ERROR_F -! H5T_PAD_ZERO_F -! H5T_PAD_ONE_F -! H5T_PAD_BACKGROUND_F -! H5T_PAD_NPAD_F -! hdferr - Returns 0 if successful and -1 if fails - -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Retrieves the padding type of the least and most-significant bit padding. +!! +!! \param type_id Datatype identifier. +!! \param lsbpad Least-significant bit padding type. +!! \param msbpad Most-significant bit padding type. Possible values are: +!! \li H5T_PAD_ERROR_F +!! \li H5T_PAD_ZERO_F +!! \li H5T_PAD_ONE_F +!! \li H5T_PAD_BACKGROUND_F +!! \li H5T_PAD_NPAD_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_pad_f(type_id, lsbpad, msbpad, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(OUT) :: lsbpad INTEGER, INTENT(OUT) :: msbpad INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_pad_c(type_id, lsbpad, msbpad) BIND(C,NAME='h5tget_pad_c') IMPORT :: HID_T @@ -794,44 +526,27 @@ CONTAINS hdferr = h5tget_pad_c(type_id, lsbpad, msbpad) END SUBROUTINE h5tget_pad_f -! -!****s* H5T/h5tset_pad_f -! -! NAME -! h5tset_pad_f -! -! PURPOSE -! Sets the least and most-significant bits padding types. -! -! INPUTS -! type_id - datatype identifier -! lsbpad - least-significant bit padding type -! msbpad - most-significant bit padding type -! Possible values of padding type are: -! H5T_PAD_ERROR_F = -1 -! H5T_PAD_ZERO_F = 0 -! H5T_PAD_ONE_F = 1 -! H5T_PAD_BACKGROUND_F = 2 -! H5T_PAD_NPAD_F = 3 -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Sets the least and most-significant bits padding types. +!! +!! \param type_id Datatype identifier. +!! \param lsbpad Least-significant bit padding type. +!! \param msbpad Most-significant bit padding type. Possible values are: +!! \li H5T_PAD_ERROR_F +!! \li H5T_PAD_ZERO_F +!! \li H5T_PAD_ONE_F +!! \li H5T_PAD_BACKGROUND_F +!! \li H5T_PAD_NPAD_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5tset_pad_f(type_id, lsbpad, msbpad, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(IN) :: lsbpad INTEGER, INTENT(IN) :: msbpad INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tset_pad_c(type_id, lsbpad, msbpad) BIND(C,NAME='h5tset_pad_c') IMPORT :: HID_T @@ -845,42 +560,26 @@ CONTAINS hdferr = h5tset_pad_c(type_id, lsbpad, msbpad) END SUBROUTINE h5tset_pad_f -! -!****s* H5T/h5tget_sign_f -! -! NAME -! h5tget_sign_f -! -! PURPOSE -! Retrieves the sign type for an integer type. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! sign - sign type -! Possible values are: -! - Unsigned integer type -! H5T_SGN_NONE_F = 0 -! - Two's complement signed integer type -! H5T_SGN_2_F = 1 -! - error value: H5T_SGN_ERROR_F=-1 -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Retrieves the sign type for an integer type. +!! +!! \param type_id Datatype identifier. +!! \param sign Sign type. Possible values are: +!! \li Unsigned integer type +!! H5T_SGN_NONE_F = 0 +!! \li Two's complement signed integer type +!! H5T_SGN_2_F = 1 +!! \li Error value +!! H5T_SGN_ERROR_F = -1 +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_sign_f(type_id, sign, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(OUT) :: sign INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_sign_c(type_id, sign) BIND(C,NAME='h5tget_sign_c') @@ -894,42 +593,26 @@ CONTAINS hdferr = h5tget_sign_c(type_id, sign) END SUBROUTINE h5tget_sign_f -! -!****s* H5T/h5tset_sign_f -! -! NAME -! h5tset_sign_f -! -! PURPOSE -! Sets the sign property for an integer type. -! -! INPUTS -! type_id - datatype identifier -! sign - sign type -! Possible values are: -! - Unsigned integer type -! H5T_SGN_NONE_F = 0 -! - Two's complement signed integer type -! H5T_SGN_2_F = 1 -! - error value: H5T_SGN_ERROR_F=-1 -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Sets the sign property for an integer type. +!! +!! \param type_id Datatype identifier. +!! \param sign Sign type. Possible values are: +!! \li Unsigned integer type +!! H5T_SGN_NONE_F = 0 +!! \li Two's complement signed integer type +!! H5T_SGN_2_F = 1 +!! \li Error value +!! H5T_SGN_ERROR_F = -1 +!! \param hdferr \fortran_error +!! SUBROUTINE h5tset_sign_f(type_id, sign, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(IN) :: sign INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tset_sign_c(type_id, sign) BIND(C,NAME='h5tset_sign_c') IMPORT :: HID_T @@ -942,34 +625,19 @@ CONTAINS hdferr = h5tset_sign_c(type_id, sign) END SUBROUTINE h5tset_sign_f -! -!****s* H5T/h5tget_fields_f -! -! NAME -! h5tget_fields_f -! -! PURPOSE -! Retrieves floating point datatype bit field information. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! spos - sign bit-position -! epos - exponent bit-position -! esize - size of exponent in bits -! mpos - mantissa position -! msize - size of mantissa in bits -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Retrieves floating point datatype bit field information. +!! +!! \param type_id Datatype identifier. +!! \param spos Sign bit-position. +!! \param epos Exponent bit-position. +!! \param esize Size of exponent in bits. +!! \param mpos Mantissa position. +!! \param msize Size of mantissa in bits. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id @@ -979,7 +647,6 @@ CONTAINS INTEGER(SIZE_T), INTENT(OUT) :: mpos INTEGER(SIZE_T), INTENT(OUT) :: msize INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) & @@ -998,34 +665,19 @@ CONTAINS hdferr = h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) END SUBROUTINE h5tget_fields_f -! -!****s* H5T/h5tset_fields_f -! -! NAME -! h5tset_fields_f -! -! PURPOSE -! Sets locations and sizes of floating point bit fields. -! -! INPUTS -! type_id - datatype identifier -! spos - sign bit-position -! epos - exponent bit-position -! esize - size of exponent in bits -! mpos - mantissa position -! msize - size of mantissa in bits -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Sets locations and sizes of floating point bit fields. +!! +!! \param type_id Datatype identifier. +!! \param spos Sign bit-position. +!! \param epos Exponent bit-position. +!! \param esize Size of exponent in bits. +!! \param mpos Mantissa position. +!! \param msize Size of mantissa in bits. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tset_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id @@ -1035,7 +687,6 @@ CONTAINS INTEGER(SIZE_T), INTENT(IN) :: mpos INTEGER(SIZE_T), INTENT(IN) :: msize INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) & @@ -1054,36 +705,20 @@ CONTAINS hdferr = h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) END SUBROUTINE h5tset_fields_f -! -!****s* H5T/h5tget_ebias_f -! -! NAME -! h5tget_ebias_f -! -! PURPOSE -! Retrieves the exponent bias of a floating-point type. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! ebias - datatype exponent bias -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Retrieves the exponent bias of a floating-point type. +!! +!! \param type_id Datatype identifier. +!! \param ebias Datatype exponent bias. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_ebias_f(type_id, ebias, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(SIZE_T), INTENT(OUT) :: ebias INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_ebias_c(type_id, ebias) BIND(C,NAME='h5tget_ebias_c') @@ -1097,36 +732,20 @@ CONTAINS hdferr = h5tget_ebias_c(type_id, ebias) END SUBROUTINE h5tget_ebias_f -! -!****s* H5T/h5tset_ebias_f -! -! NAME -! h5tset_ebias_f -! -! PURPOSE -! Sets the exponent bias of a floating-point type. -! -! INPUTS -! type_id - datatype identifier -! ebias - datatype exponent bias -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Sets the exponent bias of a floating-point type. +!! +!! \param type_id Datatype identifier. +!! \param ebias Datatype exponent bias. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tset_ebias_f(type_id, ebias, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(SIZE_T), INTENT(IN) :: ebias INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tset_ebias_c(type_id, ebias) BIND(C,NAME='h5tset_ebias_c') IMPORT :: HID_T, SIZE_T @@ -1139,40 +758,23 @@ CONTAINS hdferr = h5tset_ebias_c(type_id, ebias) END SUBROUTINE h5tset_ebias_f -! -!****s* H5T/h5tget_norm_f -! -! NAME -! h5tget_norm_f -! -! PURPOSE -! Retrieves mantissa normalization of a floating-point -! datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! norm - normalization types, valid values are: -! H5T_NORM_IMPLIED_F -! H5T_NORM_MSBSET_F -! H5T_NORM_NONE_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Retrieves mantissa normalization of a floating-point datatype. +!! +!! \param type_id Datatype identifier. +!! \param norm Normalization types, valid values are: +!! \li H5T_NORM_IMPLIED_F +!! \li H5T_NORM_MSBSET_F +!! \li H5T_NORM_NONE_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_norm_f(type_id, norm, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(OUT) :: norm INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_norm_c(type_id, norm) BIND(C,NAME='h5tget_norm_c') @@ -1186,40 +788,23 @@ CONTAINS hdferr = h5tget_norm_c(type_id, norm) END SUBROUTINE h5tget_norm_f -! -!****s* H5T/h5tset_norm_f -! -! NAME -! h5tset_norm_f -! -! PURPOSE -! Sets the mantissa normalization of a floating-point datatype. -! -! INPUTS -! type_id - datatype identifier -! norm - normalization types, valid values are: -! H5T_NORM_IMPLIED_F -! H5T_NORM_MSBSET_F -! H5T_NORM_NONE_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Sets the mantissa normalization of a floating-point datatype. +!! +!! \param type_id Datatype identifier. +!! \param norm Normalization types, valid values are: +!! \li H5T_NORM_IMPLIED_F +!! \li H5T_NORM_MSBSET_F +!! \li H5T_NORM_NONE_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5tset_norm_f(type_id, norm, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(IN) :: norm INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tset_norm_c(type_id, norm) BIND(C,NAME='h5tset_norm_c') IMPORT :: HID_T @@ -1232,41 +817,23 @@ CONTAINS hdferr = h5tset_norm_c(type_id, norm) END SUBROUTINE h5tset_norm_f -! -!****s* H5T/h5tget_inpad_f -! -! NAME -! h5tget_inpad_f -! -! PURPOSE -! Retrieves the internal padding type for unused bits -! in floating-point datatypes. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! padtype - padding type for unused bits -! Possible values of padding type are: -! H5T_PAD_ZERO_F -! H5T_PAD_ONE_F -! H5T_PAD_BACKGROUND_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Retrieves the internal padding type for unused bits in floating-point datatypes. +!! +!! \param type_id Datatype identifier. +!! \param padtype Padding type for unused bits. Possible values are: +!! \li H5T_PAD_ZERO_F +!! \li H5T_PAD_ONE_F +!! \li H5T_PAD_BACKGROUND_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_inpad_f(type_id, padtype, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(OUT) :: padtype INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_inpad_c(type_id, padtype) BIND(C,NAME='h5tget_inpad_c') IMPORT :: HID_T @@ -1279,40 +846,23 @@ CONTAINS hdferr = h5tget_inpad_c(type_id, padtype) END SUBROUTINE h5tget_inpad_f -! -!****s* H5T/h5tset_inpad_f -! -! NAME -! h5tset_inpad_f -! -! PURPOSE -! Fills unused internal floating point bits. -! -! INPUTS -! type_id - datatype identifier -! padtype - padding type for unused bits -! Possible values of padding type are: -! H5T_PAD_ZERO_F -! H5T_PAD_ONE_F -! H5T_PAD_BACKGROUND_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Fills unused internal floating point bits. +!! +!! \param type_id Datatype identifier. +!! \param padtype Padding type for unused bits. Possible values are: +!! \li H5T_PAD_ZERO_F +!! \li H5T_PAD_ONE_F +!! \li H5T_PAD_BACKGROUND_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5tset_inpad_f(type_id, padtype, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(IN) :: padtype INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tset_inpad_c(type_id, padtype) BIND(C,NAME='h5tset_inpad_c') IMPORT :: HID_T @@ -1325,39 +875,22 @@ CONTAINS hdferr = h5tset_inpad_c(type_id, padtype) END SUBROUTINE h5tset_inpad_f -! -!****s* H5T/h5tget_cset_f -! -! NAME -! h5tget_cset_f -! -! PURPOSE -! Retrieves the character set type of a string datatype. -! -! INPUTS -! type_id - Datatype identifier -! OUTPUTS -! cset - Character set type of a string datatype -! Possible values are: -! H5T_CSET_ASCII_F -! H5T_CSET_UTF8_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Retrieves the character set type of a string datatype. +!! +!! \param type_id Datatype identifier. +!! \param cset Character set type of a string datatype. Possible values are: +!! \li H5T_CSET_ASCII_F +!! \li H5T_CSET_UTF8_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_cset_f(type_id, cset, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(OUT) :: cset - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** + INTEGER, INTENT(OUT) :: hdferr INTERFACE INTEGER FUNCTION h5tget_cset_c(type_id, cset) BIND(C,NAME='h5tget_cset_c') IMPORT :: HID_T @@ -1370,39 +903,22 @@ CONTAINS hdferr = h5tget_cset_c(type_id, cset) END SUBROUTINE h5tget_cset_f -! -!****s* H5T/h5tset_cset_f -! -! NAME -! h5tset_cset_f -! -! PURPOSE -! Sets character set to be used. -! -! INPUTS -! type_id - datatype identifier -! cset - character set type of a string datatype -! Possible values are: -! H5T_CSET_ASCII_F -! H5T_CSET_UTF8_F -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Sets character set to be used. +!! +!! \param type_id Datatype identifier. +!! \param cset Character set type of a string datatype. Possible values are: +!! \li H5T_CSET_ASCII_F +!! \li H5T_CSET_UTF8_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5tset_cset_f(type_id, cset, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(IN) :: cset INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tset_cset_c(type_id, cset) BIND(C,NAME='h5tset_cset_c') IMPORT :: HID_T @@ -1414,41 +930,24 @@ CONTAINS hdferr = h5tset_cset_c(type_id, cset) END SUBROUTINE h5tset_cset_f -! -!****s* H5T/h5tget_strpad_f -! -! NAME -! h5tget_strpad_f -! -! PURPOSE -! Retrieves the storage mechanism for a string datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! strpad - storage method for a string datatype -! Possible values are: -! H5T_STR_NULLTERM_F, -! H5T_STR_NULLPAD_F, -! H5T_STR_SPACEPAD_F -! H5T_STR_ERROR_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Retrieves the storage mechanism for a string datatype. +!! +!! \param type_id Datatype identifier. +!! \param strpad Storage method for a string datatype. Possible values are: +!! \li H5T_STR_NULLTERM_F +!! \li H5T_STR_NULLPAD_F +!! \li H5T_STR_SPACEPAD_F +!! \li H5T_STR_ERROR_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_strpad_f(type_id, strpad, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(OUT) :: strpad INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_strpad_c(type_id, strpad) BIND(C,NAME='h5tget_strpad_c') IMPORT :: HID_T @@ -1461,41 +960,24 @@ CONTAINS hdferr = h5tget_strpad_c(type_id, strpad) END SUBROUTINE h5tget_strpad_f -! -!****s* H5T/h5tset_strpad_f -! -! NAME -! h5tset_strpad_f -! -! PURPOSE -! Defines the storage mechanism for character strings. -! -! INPUTS -! type_id - datatype identifier -! strpad - storage method for a string datatype -! Possible values are: -! H5T_STR_NULLTERM_F, -! H5T_STR_NULLPAD_F, -! H5T_STR_SPACEPAD_F, -! H5T_STR_ERROR_F. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Defines the storage mechanism for character strings. +!! +!! \param type_id Datatype identifier. +!! \param strpad Storage method for a string datatype. Possible values are: +!! \li H5T_STR_NULLTERM_F +!! \li H5T_STR_NULLPAD_F +!! \li H5T_STR_SPACEPAD_F +!! \li H5T_STR_ERROR_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5tset_strpad_f(type_id, strpad, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(IN) :: strpad INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tset_strpad_c(type_id, strpad) BIND(C,NAME='h5tset_strpad_c') IMPORT :: HID_T @@ -1508,37 +990,20 @@ CONTAINS hdferr = h5tset_strpad_c(type_id, strpad) END SUBROUTINE h5tset_strpad_f -! -!****s* H5T/h5tget_nmembers_f -! -! NAME -! h5tget_nmembers_f -! -! PURPOSE -! Retrieves the number of fields in a compound datatype. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! num_members - number of members -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Retrieves the number of fields in a compound datatype. +!! +!! \param type_id Datatype identifier. +!! \param num_members Number of members. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_nmembers_f(type_id, num_members, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(OUT) :: num_members INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_nmembers_c(type_id, num_members) BIND(C,NAME='h5tget_nmembers_c') IMPORT :: HID_T @@ -1551,32 +1016,17 @@ CONTAINS hdferr = h5tget_nmembers_c(type_id, num_members) END SUBROUTINE h5tget_nmembers_f -! -!****s* H5T/h5tget_member_name_f -! -! NAME -! h5tget_member_name_f -! -! PURPOSE -! Retrieves the name of a field of a compound datatype. -! -! INPUTS -! type_id - datatype identifier -! index - filed index (0-based) -! OUTPUTS -! member_name - buffer to hold member's name -! namelen - name length -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Retrieves the name of a field of a compound datatype. +!! +!! \param type_id Datatype identifier. +!! \param index Filed index (0-based). +!! \param member_name Buffer to hold member's name. +!! \param namelen Name length. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_member_name_f(type_id, index, member_name, namelen, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id @@ -1584,7 +1034,6 @@ CONTAINS CHARACTER(LEN=*), INTENT(OUT) :: member_name INTEGER, INTENT(OUT) :: namelen INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_member_name_c(type_id, index, member_name, namelen) BIND(C,NAME='h5tget_member_name_c') IMPORT :: C_CHAR @@ -1600,38 +1049,22 @@ CONTAINS hdferr = h5tget_member_name_c(type_id, index, member_name, namelen) END SUBROUTINE h5tget_member_name_f -! -!****s* H5T/h5tget_member_offset_f -! -! NAME -! h5tget_member_offset_f -! -! PURPOSE -! Retrieves the offset of a field of a compound datatype. -! -! INPUTS -! type_id - datatype identifier -! member_no - number of the field -! OUTPUTS -! offset - byte offset of the requested field -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Retrieves the offset of a field of a compound datatype. +!! +!! \param type_id Datatype identifier. +!! \param member_no Number of the field. +!! \param offset Byte offset of the requested field. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_member_offset_f(type_id, member_no, offset, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(IN) :: member_no INTEGER(SIZE_T), INTENT(OUT) :: offset INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_member_offset_c(type_id, member_no, offset ) BIND(C,NAME='h5tget_member_offset_c') IMPORT :: HID_T, SIZE_T @@ -1644,35 +1077,22 @@ CONTAINS hdferr = h5tget_member_offset_c(type_id, member_no, offset ) END SUBROUTINE h5tget_member_offset_f -! -!****s* H5T/h5tget_member_index_f -! -! NAME -! h5tget_member_index_f -! -! PURPOSE -! Retrieves the index of a compound or enumeration datatype member. -! -! INPUTS -! type_id - datatype identifier -! name - name of the field or member whose index to -! to be retrieved from the datatype. -! OUTPUTS -! index - 0-based index of the filed or member (0 to N-1) -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 26, 2002 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Retrieves the index of a compound or enumeration datatype member. +!! +!! \param type_id Datatype identifier. +!! \param name Name of the field or member whose index to be retrieved from the datatype. +!! \param index Based index of the filed or member (0 to N-1). +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_member_index_f(type_id, name, index, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id CHARACTER(LEN=*), INTENT(IN) :: name INTEGER, INTENT(OUT) :: index INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER :: namelen ! Name length INTERFACE @@ -1693,79 +1113,52 @@ CONTAINS ! !$! -! !$!****s* H5T/h5tget_member_dim_f -! !$! -! !$! NAME -! !$! h5tget_member_dim_f -! !$! -! !$! PURPOSE -! !$! This function is not supported in hdf5-1.4.* -! !$! -! !$! INPUTS -! !$! OUTPUTS -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! August 12, 1999 -! !$! -! !$! HISTORY -! !$! Explicit Fortran interfaces were added for -! !$! called C functions (it is needed for Windows -! !$! port). March 7, 2001 -! !$! -! !$! SOURCE +!> +!! !$! +!! !$! NAME +!! !$! h5tget_member_dim_f +!! !$! +!! !$! PURPOSE +!! !$! This function is not supported in hdf5-1.4.* +!! !$! +!! !$! INPUTS +!! !$! OUTPUTS +!! !$! hdferr: - error code +!! !$! Success: 0 +!! !$! Failure: -1 +!! !$! +!! !$! AUTHOR +!! !$! Elena Pourmal +!! !$! August 12, 1999 +!! !$! +!! !$! HISTORY +!! !$! Explicit Fortran interfaces were added for +!! !$! called C functions (it is needed for Windows +!! !$! port). March 7, 2001 +!! !$! +!! !$! SOURCE ! !$! SUBROUTINE h5tget_member_dims_f(type_id, field_idx,dims, field_dims, perm, hdferr) ! !$! ! !$! IMPLICIT NONE -! !$! INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier -! !$! INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of -! !$! !field_dims, perm) -! !$! INTEGER, INTENT(OUT) :: dims !number of dimensions of the field -! !$! -! !$! INTEGER(SIZE_T),DIMENSION(*), INTENT(OUT) :: field_dims !buffer to store the -! !$! !dimensions of the field -! !$! INTEGER, DIMENSION(*), INTENT(OUT) :: perm !buffer to store the -! !$! !permutation vector of the field -! !$! INTEGER, INTENT(OUT) :: hdferr ! Error code -! !$!*****! -! !$! INTEGER, EXTERNAL :: h5tget_member_dims_c -! !$! hdferr = h5tget_member_dims_c(type_id, field_idx, dims, field_dims, perm) + ! !$! ! !$! END SUBROUTINE h5tget_member_dims_f -!****s* H5T/h5tget_array_dims_f -! -! NAME -! h5tget_array_dims_f -! -! PURPOSE -! Returns sizes of array dimensions. -! -! INPUTS -! type_id - array datatype identifier -! OUTPUTS -! dims - buffer to store array datatype dimensions -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Returns sizes of array dimensions. +!! +!! \param type_id Array datatype identifier. +!! \param dims Buffer to store array datatype dimensions. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_array_dims_f(type_id, dims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_array_dims_c(type_id, dims) BIND(C,NAME='h5tget_array_dims_c') IMPORT :: HID_T, HSIZE_T @@ -1779,36 +1172,20 @@ CONTAINS END SUBROUTINE h5tget_array_dims_f -! -!****s* H5T/h5tget_array_ndims_f -! -! NAME -! h5tget_array_ndims_f -! -! PURPOSE -! Returns the rank of an array datatype. -! -! INPUTS -! type_id - array datatype identifier -! OUTPUTS -! ndims - number of array dimensions -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Returns the rank of an array datatype. +!! +!! \param type_id Array datatype identifier. +!! \param ndims Number of array dimensions. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_array_ndims_f(type_id, ndims, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(OUT) :: ndims INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_array_ndims_c(type_id, ndims) BIND(C,NAME='h5tget_array_ndims_c') IMPORT :: HID_T @@ -1822,36 +1199,20 @@ CONTAINS END SUBROUTINE h5tget_array_ndims_f -! -!****s* H5T/h5tget_super_f -! -! NAME -! h5tget_super_f -! -! PURPOSE -! Returns the base datatype from which a datatype is derived. -! -! INPUTS -! type_id - datatype identifier -! OUTPUTS -! base_type_id - identifier of the base type -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Returns the base datatype from which a datatype is derived. +!! +!! \param type_id Datatype identifier. +!! \param base_type_id Identifier of the base type. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_super_f(type_id, base_type_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(HID_T), INTENT(OUT) :: base_type_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_super_c(type_id, base_type_id) BIND(C,NAME='h5tget_super_c') IMPORT :: HID_T @@ -1865,39 +1226,22 @@ CONTAINS END SUBROUTINE h5tget_super_f -! -!****s* H5T/h5tget_member_type_f -! -! NAME -! h5tget_member_type_f -! -! PURPOSE -! Returns the datatype of the specified member. -! -! INPUTS -! type_id - compound datatype identifier -! field_idx - field index (0-based) -! -! OUTPUTS -! datatype - identifier of the member's datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Returns the datatype of the specified member. +!! +!! \param type_id Compound datatype identifier. +!! \param field_idx Field index (0-based). +!! \param datatype Identifier of the member's datatype. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_member_type_f(type_id, field_idx, datatype, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(IN) :: field_idx INTEGER(HID_T), INTENT(OUT) :: datatype INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_member_type_c(type_id, field_idx , datatype) & BIND(C,NAME='h5tget_member_type_c') @@ -1912,43 +1256,26 @@ CONTAINS hdferr = h5tget_member_type_c(type_id, field_idx , datatype) END SUBROUTINE h5tget_member_type_f -! -!****s* H5T/h5tcreate_f -! -! NAME -! h5tcreate_f -! -! PURPOSE -! Creates a new datatype. -! -! INPUTS -! class - Datatype class can be one of: -! H5T_COMPOUND_F -! H5T_ENUM_F -! H5T_OPAQUE_F -! H5T_STRING_F -! -! size - Size of the datatype. -! OUTPUTS -! type_id - Datatype identifier. -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Creates a new datatype. +!! +!! \param class Datatype class can be one of: +!! \li H5T_COMPOUND_F +!! \li H5T_ENUM_F +!! \li H5T_OPAQUE_F +!! \li H5T_STRING_F +!! \param size Size of the datatype. +!! \param type_id Datatype identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tcreate_f(class, size, type_id, hdferr) IMPLICIT NONE INTEGER , INTENT(IN) :: class INTEGER(SIZE_T), INTENT(IN) :: size INTEGER(HID_T) , INTENT(OUT) :: type_id INTEGER , INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tcreate_c(class, size, type_id) BIND(C,NAME='h5tcreate_c') IMPORT :: HID_T, SIZE_T @@ -1962,33 +1289,17 @@ CONTAINS hdferr = h5tcreate_c(class, size, type_id) END SUBROUTINE h5tcreate_f -! -!****s* H5T/h5tinsert_f -! -! NAME -! h5tinsert_f -! -! PURPOSE -! Adds a new member to a compound datatype. -! -! INPUTS -! type_id - compound datatype identifier -! name - name of the field to insert -! offset - start of the member in an instance of -! the compound datatype -! field_id - datatype identifier of the field to insert -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Adds a new member to a compound datatype. +!! +!! \param type_id Compound datatype identifier. +!! \param name Name of the field to insert. +!! \param offset Start of the member in an instance of the compound datatype. +!! \param field_id Datatype identifier of the field to insert. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tinsert_f(type_id, name, offset, field_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id @@ -1996,7 +1307,6 @@ CONTAINS INTEGER(SIZE_T), INTENT(IN) :: offset INTEGER(HID_T), INTENT(IN) :: field_id INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER :: namelen INTERFACE @@ -2016,34 +1326,18 @@ CONTAINS hdferr = h5tinsert_c(type_id, name, namelen, offset, field_id ) END SUBROUTINE h5tinsert_f -! -!****s* H5T/h5tpack_f -! -! NAME -! h5tpack_f -! -! PURPOSE -! Recursively removes padding from within a compound datatype. -! -! INPUTS -! type_id - compound datatype identifier -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Recursively removes padding from within a compound datatype. +!! +!! \param type_id Compound datatype identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tpack_f(type_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tpack_c(type_id) BIND(C,NAME='h5tpack_c') IMPORT :: HID_T @@ -2056,45 +1350,32 @@ CONTAINS END SUBROUTINE h5tpack_f ! !$! -! !$!****s* H5T/h5tinsert_array_f -! !$! -! !$! NAME -! !$! h5tinsert_array_f -! !$! -! !$! PURPOSE -! !$! This function is not available on hdf5-1.4.* -! !$! -! !$! INPUTS -! !$! OUTPUTS -! !$! hdferr: - error code -! !$! Success: 0 -! !$! Failure: -1 -! !$! -! !$! AUTHOR -! !$! Elena Pourmal -! !$! August 12, 1999 -! !$! -! !$! HISTORY -! !$! Explicit Fortran interfaces were added for -! !$! called C functions (it is needed for Windows -! !$! port). March 7, 2001 -! !$! SOURCE +!> +!! !$! +!! !$! NAME +!! !$! h5tinsert_array_f +!! !$! +!! !$! PURPOSE +!! !$! This function is not available on hdf5-1.4.* +!! !$! +!! !$! INPUTS +!! !$! OUTPUTS +!! !$! hdferr: - error code +!! !$! Success: 0 +!! !$! Failure: -1 +!! !$! +!! !$! AUTHOR +!! !$! Elena Pourmal +!! !$! August 12, 1999 +!! !$! +!! !$! HISTORY +!! !$! Explicit Fortran interfaces were added for +!! !$! called C functions (it is needed for Windows +!! !$! port). March 7, 2001 +!! !$! SOURCE ! SUBROUTINE h5tinsert_array_f(parent_id,name,offset, ndims, dims, member_id, hdferr, perm) ! IMPLICIT NONE -! INTEGER(HID_T), INTENT(IN) :: parent_id ! identifier of the parent compound datatype -! CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member -! INTEGER(SIZE_T), INTENT(IN) :: offset !Offset to start of new member -! !within compound datatype -! INTEGER, INTENT(IN) :: ndims !Dimensionality of new member. -! !Valid values are 0 (zero) through 4 (four) -! INTEGER(SIZE_T), DIMENSION(*), INTENT(IN) :: dims !Size of new member array -! INTEGER(HID_T), INTENT(IN) :: member_id ! identifier of the datatype of the new member -! INTEGER, INTENT(OUT) :: hdferr ! Error code -! !*****! -! INTEGER, DIMENSION(*), OPTIONAL, INTENT(IN) :: perm -! !Pointer to buffer to store -! !the permutation vector of the field -! INTEGER :: namelen, sizeofperm + ! INTEGER, EXTERNAL :: h5tinsert_array_c, h5tinsert_array_c2 ! namelen = LEN(name) ! if (present(perm)) then @@ -2105,33 +1386,17 @@ CONTAINS ! ! END SUBROUTINE h5tinsert_array_f -! -!****s* H5T/h5tarray_create_f -! -! NAME -! h5tarray_create_f -! -! PURPOSE -! Creates an array datatype object. -! -! INPUTS -! base_id - datatype identifier for the array -! base datatype -! rank - rank of the array -! dims - array dimension sizes -! OUTPUTS -! type_id - array datatype identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Creates an array datatype object. +!! +!! \param base_id Datatype identifier for the array base datatype. +!! \param rank Rank of the array. +!! \param dims Array dimension sizes. +!! \param type_id Array datatype identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tarray_create_f(base_id, rank, dims, type_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: base_id @@ -2139,7 +1404,6 @@ CONTAINS INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims INTEGER(HID_T), INTENT(OUT) :: type_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tarray_create_c(base_id, rank, dims, type_id) BIND(C,NAME='h5tarray_create_c') IMPORT :: HID_T, HSIZE_T @@ -2155,36 +1419,20 @@ CONTAINS END SUBROUTINE h5tarray_create_f -! -!****s* H5T/h5tenum_create_f -! -! NAME -! h5tenum_create_f -! -! PURPOSE -! Creates a new enumeration datatype. -! -! INPUTS -! parent_id - datatype identifier for base datatype -! OUTPUTS -! new_type_id - datatype identifier for the enumeration datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Creates a new enumeration datatype. +!! +!! \param parent_id Datatype identifier for base datatype. +!! \param new_type_id Datatype identifier for the enumeration datatype. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tenum_create_f(parent_id, new_type_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: parent_id INTEGER(HID_T), INTENT(OUT) :: new_type_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tenum_create_c(parent_id, new_type_id) BIND(C,NAME='h5tenum_create_c') @@ -2197,39 +1445,17 @@ CONTAINS hdferr = h5tenum_create_c(parent_id, new_type_id) END SUBROUTINE h5tenum_create_f -! -!****s* H5T/h5tenum_nameof_f -! -! NAME -! h5tenum_nameof_f -! -! PURPOSE -! Returns the symbol name corresponding to a specified -! member of an enumeration datatype. -! -! INPUTS -! type_id - datatype identifier -! value - value of the enumeration datatype -! namelen - name buffer size -! OUTPUTS -! name - buffer to hold symbol name -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! NOTE -! According to the standard: Because an INTENT(OUT) variable is considered undefined -! on entry to the procedure, any default initialization specified for its type will -! be applied. So we need to blank out the "name" to be portable and eliminate any -! characters the "name' may contain upon entry, depending on compiler implementation. -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Returns the symbol name corresponding to a specified member of an enumeration datatype. +!! +!! \param type_id Datatype identifier. +!! \param value Value of the enumeration datatype. +!! \param namelen Name buffer size. +!! \param name Buffer to hold symbol name. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tenum_nameof_f(type_id, value, namelen, name, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id @@ -2237,7 +1463,6 @@ CONTAINS INTEGER(SIZE_T), INTENT(IN) :: namelen INTEGER, INTENT(IN) :: value INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tenum_nameof_c(type_id, value, name, namelen) BIND(C,NAME='h5tenum_nameof_c') IMPORT :: C_CHAR @@ -2254,40 +1479,22 @@ CONTAINS hdferr = h5tenum_nameof_c(type_id, value, name, namelen) END SUBROUTINE h5tenum_nameof_f -! -!****s* H5T/h5tenum_valuof_f -! -! NAME -! h5tenum_valuof_f -! -! PURPOSE -! Returns the value corresponding to a specified -! member of an enumeration datatype. -! -! INPUTS -! type_id - datatype identifier -! name - symbol name -! OUTPUTS -! value - value of the enumeration datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Returns the value corresponding to a specified member of an enumeration datatype. +!! +!! \param type_id Datatype identifier. +!! \param name Symbol name. +!! \param value Value of the enumeration datatype. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tenum_valueof_f(type_id, name, value, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id CHARACTER(LEN=*), INTENT(IN) :: name INTEGER, INTENT(OUT) :: value INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER :: namelen INTERFACE @@ -2307,38 +1514,22 @@ CONTAINS hdferr = h5tenum_valueof_c(type_id, name, namelen, value) END SUBROUTINE h5tenum_valueof_f -! -!****s* H5T/h5tget_member_value_f -! -! NAME -! h5tget_member_value_f -! -! PURPOSE -! Returns the value of an enumeration datatype member. -! -! INPUTS -! type_id - datatype identifier -! member_no - number of the enumeration datatype member -! OUTPUTS -! value - value of the enumeration datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Returns the value of an enumeration datatype member. +!! +!! \param type_id Datatype identifier. +!! \param member_no Number of the enumeration datatype member. +!! \param value Value of the enumeration datatype. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_member_value_f(type_id, member_no, value, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(IN) :: member_no INTEGER, INTENT(OUT) :: value INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_member_value_c(type_id, member_no, value) & BIND(C,NAME='h5tget_member_value_c') @@ -2353,37 +1544,20 @@ CONTAINS hdferr = h5tget_member_value_c(type_id, member_no, value) END SUBROUTINE h5tget_member_value_f -! -!****s* H5T/h5tset_tag_f -! -! NAME -! h5tset_tag_f -! -! PURPOSE -! Tags an opaque datatype. -! -! INPUTS -! type_id - identifier for opaque datatype -! tag - unique ASCII string with which the opaque -! datatype is to be tagged. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Tags an opaque datatype. +!! +!! \param type_id Identifier for opaque datatype. +!! \param tag Unique ASCII string with which the opaque datatype is to be tagged. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tset_tag_f(type_id, tag, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id CHARACTER(LEN=*), INTENT(IN) :: tag INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER :: taglen INTERFACE @@ -2401,39 +1575,22 @@ CONTAINS hdferr = h5tset_tag_c(type_id, tag, taglen) END SUBROUTINE h5tset_tag_f -! -!****s* H5T/h5tget_tag_f -! -! NAME -! h5tget_tag_f -! -! PURPOSE -! Gets the tag associated with an opaque datatype. -! -! INPUTS -! type_id - identifier for opaque datatype -! OUTPUTS -! tag - unique ASCII string associated with opaque -! datatype -! taglen - Length of tag -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Gets the tag associated with an opaque datatype. +!! +!! \param type_id Identifier for opaque datatype. +!! \param tag Unique ASCII string associated with opaque datatype. +!! \param taglen Length of tag. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_tag_f(type_id, tag,taglen, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id CHARACTER(LEN=*), INTENT(OUT) :: tag INTEGER, INTENT(OUT) :: taglen INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER(SIZE_T):: tag_size ! Declared character length of tab INTERFACE INTEGER FUNCTION h5tget_tag_c(type_id, tag, tag_size, taglen) & @@ -2452,35 +1609,20 @@ CONTAINS hdferr = h5tget_tag_c(type_id, tag, tag_size, taglen ) END SUBROUTINE h5tget_tag_f -! -!****s* H5T/h5tvlen_create_f -! -! NAME -! h5tvlen_create_f -! -! PURPOSE -! Creates a new variable-length datatype. -! -! INPUTS -! type_id - identifier iof base datatype -! OUTPUTS -! vltype_id - identifier for VL datatype -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! Wednesday, October 23, 2002 -! -! NOTES -! Only basic Fortran base datatypes are supported -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Creates a new variable-length datatype. +!! +!! \param type_id Identifier iof base datatype. +!! \param vltype_id Identifier for VL datatype. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tvlen_create_f(type_id, vltype_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(HID_T), INTENT(OUT) :: vltype_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tvlen_create_c(type_id, vltype_id) BIND(C,NAME='h5tvlen_create_c') IMPORT :: HID_T @@ -2493,33 +1635,20 @@ CONTAINS hdferr = h5tvlen_create_c(type_id, vltype_id) END SUBROUTINE h5tvlen_create_f -! -!****s* H5T/h5tis_variable_str_f -! -! NAME -! h5tis_variable_str_f -! -! PURPOSE -! Determines whether a dattype is a variable string. -! -! INPUTS -! type_id - datartpe identifier -! OUTPUTS -! status - flag to indicate if datatype -! is a variable string ( TRUE or FALSE) -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Determines whether a dattype is a variable string. +!! +!! \param type_id Datartpe identifier. +!! \param status Flag to indicate if datatype is a variable string ( TRUE or FALSE). +!! \param hdferr \fortran_error +!! SUBROUTINE h5tis_variable_str_f(type_id, status, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id LOGICAL, INTENT(OUT) :: status INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER :: flag ! "TRUE/FALSE/ERROR from C" INTERFACE @@ -2538,47 +1667,34 @@ CONTAINS END SUBROUTINE h5tis_variable_str_f -! -!****s* H5T/h5tget_member_class_f -! -! NAME -! h5tget_member_class_f -! -! PURPOSE -! Returns datatype class of compound datatype member. -! -! INPUTS -! type_id - datartpe identifier -! member_no - index of compound datatype member -! OUTPUTS -! class - class type for compound dadtype member -! Valid classes: -! H5T_NO_CLASS_F (error) -! H5T_INTEGER_F -! H5T_FLOAT_F -! H5T_TIME_F -! H5T_STRING_F -! H5T_BITFIELD_F -! H5T_OPAQUE_F -! H5T_COMPOUND_F -! H5T_REFERENCE_F -! H5T_ENUM_F -! H5T_VLEN_F -! H5T_ARRAY_F -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! April 6, 2005 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Returns datatype class of compound datatype member. +!! +!! \param type_id Datartpe identifier. +!! \param member_no Index of compound datatype member. +!! \param class Class type for compound dadtype member. Valid classes: +!! \li H5T_NO_CLASS_F (error) +!! \li H5T_INTEGER_F +!! \li H5T_FLOAT_F +!! \li H5T_TIME_F +!! \li H5T_STRING_F +!! \li H5T_BITFIELD_F +!! \li H5T_OPAQUE_F +!! \li H5T_COMPOUND_F +!! \li H5T_REFERENCE_F +!! \li H5T_ENUM_F +!! \li H5T_VLEN_F +!! \li H5T_ARRAY_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_member_class_f(type_id, member_no, class, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id INTEGER, INTENT(IN) :: member_no INTEGER, INTENT(OUT) :: class INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_member_class_c(type_id, member_no, class) & BIND(C,NAME='h5tget_member_class_c') @@ -2594,35 +1710,17 @@ CONTAINS END SUBROUTINE h5tget_member_class_f -! -!****s* H5T/h5tcommit_anon_f -! -! NAME -! h5tcommit_anon_f -! -! PURPOSE -! Commits a transient datatype to a file, -! creating a new named datatype, -! but does not link it into the file structure. -! -! INPUTS -! loc_id - A file or group identifier specifying the file -! in which the new named datatype is to be created. -! dtype_id - A datatype identifier. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! OPTIONAL PARAMETERS -! tcpl_id - A datatype creation property list identifier. -! (H5P_DEFAULT_F for the default property list.) -! tapl_id - A datatype access property list identifier. -! should always be passed as the value H5P_DEFAULT_F. -! -! AUTHOR -! M. Scot Breitenfeld -! February 25, 2008 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Commits a transient datatype to a file, creating a new named datatype, but does not link it into the file structure. +!! +!! \param loc_id A file or group identifier specifying the file in which the new named datatype is to be created. +!! \param dtype_id A datatype identifier. +!! \param hdferr \fortran_error +!! \param tcpl_id A datatype creation property list identifier (H5P_DEFAULT_F for the default property list.) +!! \param tapl_id A datatype access property list identifier should always be passed as the value H5P_DEFAULT_F. +!! SUBROUTINE h5tcommit_anon_f(loc_id, dtype_id, hdferr, tcpl_id, tapl_id) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: loc_id @@ -2630,7 +1728,6 @@ CONTAINS INTEGER, INTENT(OUT) :: hdferr INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id -!***** INTEGER(HID_T) :: tcpl_id_default INTEGER(HID_T) :: tapl_id_default @@ -2657,33 +1754,20 @@ CONTAINS END SUBROUTINE h5tcommit_anon_f -! -!****s* H5T/h5tcommitted_f -! -! NAME -! h5tcommitted_f -! -! PURPOSE -! Determines whether a datatype is a named type or a transient type. -! -! INPUTS -! dtype_id - A datatype identifier. -! -! OUTPUTS -! committed - .TRUE., if the datatype has been committed -! .FALSE., if the datatype has not been committed. -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! February 25, 2008 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Determines whether a datatype is a named type or a transient type. +!! +!! \param dtype_id A datatype identifier. +!! \param committed .TRUE. if the datatype has been committed, and .FALSE. if the datatype has not been committed. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tcommitted_f(dtype_id, committed, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dtype_id LOGICAL, INTENT(OUT) :: committed INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tcommitted_c(dtype_id) BIND(C,NAME='h5tcommitted_c') IMPORT :: HID_T @@ -2706,38 +1790,27 @@ CONTAINS END SUBROUTINE h5tcommitted_f -! -!****s* H5T/H5Tdecode_f -! -! NAME -! H5Tdecode_f -! -! PURPOSE -! Decode a binary object description of data type and return a new object handle. -! INPUTS -! buf - Buffer for the data space object to be decoded. -! obj_id - Object ID -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! April 9, 2008 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Decode A binary object description of data type and return a new object handle. +!! +!! \param buf Buffer for the data space object to be decoded. +!! \param obj_id Object ID. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tdecode_f(buf, obj_id, hdferr) IMPLICIT NONE CHARACTER(LEN=*), INTENT(IN) :: buf INTEGER(HID_T), INTENT(OUT) :: obj_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tdecode_c(buf, obj_id) BIND(C,NAME='h5tdecode_c') IMPORT :: C_CHAR IMPORT :: HID_T IMPLICIT NONE CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: buf - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID + INTEGER(HID_T), INTENT(OUT) :: obj_id END FUNCTION h5tdecode_c END INTERFACE @@ -2745,34 +1818,22 @@ CONTAINS END SUBROUTINE h5tdecode_f -! -!****s* H5T/H5Tencode_f -! -! NAME -! H5Tencode_f -! -! PURPOSE -! Encode a data type object description into a binary buffer. -! -! INPUTS -! obj_id - Identifier of the object to be encoded. -! buf - Buffer for the object to be encoded into. -! nalloc - The size of the allocated buffer. -! OUTPUTS -! nalloc - The size of the buffer needed. -! hdferr - Returns 0 if successful and -1 if fails. -! -! AUTHOR -! M. Scot Breitenfeld -! April 9, 2008 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Encode a data type object description into a binary buffer. +!! +!! \param obj_id Identifier of the object to be encoded. +!! \param buf Buffer for the object to be encoded into. +!! \param nalloc If set to zero, returns the size of the buffer needed. Otherwise, it sets the size of \p buf allocated. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tencode_f(obj_id, buf, nalloc, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id CHARACTER(LEN=*), INTENT(OUT) :: buf INTEGER(SIZE_T), INTENT(INOUT) :: nalloc INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tencode_c(buf, obj_id, nalloc) BIND(C,NAME='h5tencode_c') @@ -2789,32 +1850,20 @@ CONTAINS END SUBROUTINE h5tencode_f -! -!****s* H5T/h5tget_create_plist_f -! -! NAME -! h5tget_create_plist_f -! -! PURPOSE -! Returns a copy of a datatype creation property list. -! -! INPUTS -! dtype_id - Datatype identifier -! OUTPUTS -! dtpl_id - Datatype property list identifier -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! April 9, 2008 -! -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Returns a copy of a datatype creation property list. +!! +!! \param dtype_id Datatype identifier. +!! \param dtpl_id Datatype property list identifier. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_create_plist_f(dtype_id, dtpl_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dtype_id INTEGER(HID_T), INTENT(OUT) :: dtpl_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_create_plist_c(dtype_id, dtpl_id) BIND(C,NAME='h5tget_create_plist_c') IMPORT :: HID_T @@ -2827,33 +1876,22 @@ CONTAINS hdferr = h5tget_create_plist_c(dtype_id, dtpl_id) END SUBROUTINE h5tget_create_plist_f -! -!****s* H5T/h5tcompiler_conv_f -! -! NAME -! h5tcompiler_conv_f -! -! PURPOSE -! Check whether the library’s default conversion is hard conversion.R -! -! INPUTS -! src_id - Identifier for the source datatype. -! dst_id - Identifier for the destination datatype. -! OUTPUTS -! flag - TRUE for compiler conversion, FALSE for library conversion -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! April 9, 2008 -! SOURCE - SUBROUTINE h5tcompiler_conv_f( src_id, dst_id, flag, hdferr) +!> +!! \ingroup FH5T +!! +!! \brief Check whether the library’s default conversion is hard conversion. +!! +!! \param src_id Identifier for the source datatype. +!! \param dst_id Identifier for the destination datatype. +!! \param flag .TRUE. for compiler conversion, .FALSE. for library conversion. +!! \param hdferr \fortran_error +!! + SUBROUTINE h5tcompiler_conv_f(src_id, dst_id, flag, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: src_id INTEGER(HID_T), INTENT(IN) :: dst_id LOGICAL, INTENT(OUT) :: flag INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER :: c_flag INTERFACE @@ -2873,39 +1911,26 @@ CONTAINS END SUBROUTINE h5tcompiler_conv_f -! -!****s* H5T/h5tget_native_type_f -! -! NAME -! h5tget_native_type_f -! -! PURPOSE -! Returns the native datatype of a specified datatype. -! -! INPUTS -! dtype_id - Datatype identifier for the dataset datatype. -! -! direction - Direction of search: -! H5T_DIR_DEFAULT, default direction is inscendent, -! H5T_DIR_ASCEND , in inscendent order, -! H5T_DIR_DESCEND, in descendent order. -! -! * NOTE: In C it is defined as a structure: H5T_direction_t -! -! OUTPUTS -! native_dtype_id - The native datatype identifier for the specified dataset datatype -! hdferr - Returns 0 if successful and -1 if fails -! AUTHOR -! M. Scot Breitenfeld -! June 18, 2008 -! SOURCE +!> +!! \ingroup FH5T +!! +!! \brief Returns the native datatype of a specified datatype. +!! +!! \param dtype_id Datatype identifier for the dataset datatype. +!! \param direction Direction of search: +!! H5T_DIR_DEFAULT, default direction is inscendent, +!! H5T_DIR_ASCEND , in inscendent order, +!! H5T_DIR_DESCEND, in descendent order. +!! * NOTE: In C it is defined as a structure: H5T_direction_t +!! \param native_dtype_id The native datatype identifier for the specified dataset datatype. +!! \param hdferr \fortran_error +!! SUBROUTINE h5tget_native_type_f(dtype_id, direction, native_dtype_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: dtype_id INTEGER, INTENT(IN) :: direction INTEGER(HID_T), INTENT(OUT) :: native_dtype_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5tget_native_type_c(dtype_id, direction, native_dtype_id) BIND(C,NAME='h5tget_native_type_c') IMPORT :: HID_T @@ -2919,31 +1944,19 @@ CONTAINS hdferr = h5tget_native_type_c(dtype_id, direction, native_dtype_id) END SUBROUTINE h5tget_native_type_f -!****s* H5T/H5Tconvert_f_F03 -! -! NAME -! H5Tconvert_f -! -! PURPOSE -! Converts data from between specified datatypes. -! -! Inputs: -! src_id - Identifier for the source datatype. -! dst_id - Identifier for the destination datatype. -! nelmts - Size of array buf. -! buf - Array containing pre-conversion values. -! background - Optional background buffer. -! plist_id - Dataset transfer property list identifier. -! -! Outputs: -! buf - Array containing post-conversion values. -! hdferr - error code: -! 0 on success and -1 on failure -! AUTHOR -! M. Scot Breitenfeld -! Decemember 8, 2008 -! -! Fortran2003 Interface: +!> +!! \ingroup FH5T +!! +!! \brief Converts data from between specified datatypes. +!! +!! \param src_id Identifier for the source datatype. +!! \param dst_id Identifier for the destination datatype. +!! \param nelmts Size of array buf. +!! \param buf Array containing pre-conversion values. +!! \param hdferr \fortran_error +!! \param background Background buffer. +!! \param plist_id Dataset transfer property list identifier. +!! SUBROUTINE h5tconvert_f(src_id, dst_id, nelmts, buf, hdferr, background, plist_id) IMPLICIT NONE INTEGER(HID_T) , INTENT(IN) :: src_id @@ -2953,7 +1966,6 @@ CONTAINS INTEGER , INTENT(OUT) :: hdferr TYPE(C_PTR) , INTENT(INOUT), OPTIONAL :: background INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: plist_id -!***** INTEGER(HID_T) :: plist_id_default TYPE(C_PTR) :: background_default @@ -2981,102 +1993,94 @@ CONTAINS hdferr = H5Tconvert_c(src_id, dst_id, nelmts, buf, background_default, plist_id_default) END SUBROUTINE h5tconvert_f -! -!****s* H5T/h5tenum_insert_f90 -! -! NAME -! h5tenum_insert_f -! -! PURPOSE -! Inserts a new enumeration datatype member. -! -! INPUTS -! type_id - Datatype identifier for the enumeration datatype. -! name - Datatype identifier. -! value - Value of the new member. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). March 7, 2001 -! SOURCE - SUBROUTINE h5tenum_insert_f90(type_id, name, value, hdferr) + +!> +!! \ingroup FH5T +!! +!! \brief Inserts a new enumeration datatype member. +!! +!! \note \fortran_approved +!! +!! \param type_id Datatype identifier for the enumeration datatype. +!! \param name Datatype identifier. +!! \param value Pointer to the value of the new member. +!! \param hdferr \fortran_error +!! +#ifdef H5_DOXYGEN_FORTRAN + SUBROUTINE h5tenum_insert_f(& +#else + SUBROUTINE h5tenum_insert_f03(& +#endif + type_id, name, value, hdferr) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T) , INTENT(IN) :: type_id CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: value + TYPE(C_PTR) , INTENT(IN) :: value INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER :: namelen + INTERFACE - INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) BIND(C,NAME='h5tenum_insert_c') - IMPORT :: C_CHAR + INTEGER FUNCTION h5tenum_insert_ptr_c(type_id, name, namelen, value) & + BIND(C, NAME='h5tenum_insert_ptr_c') + IMPORT :: C_CHAR, C_PTR IMPORT :: HID_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: value INTEGER :: namelen - END FUNCTION h5tenum_insert_c + TYPE(C_PTR), VALUE :: value + END FUNCTION h5tenum_insert_ptr_c END INTERFACE namelen = LEN(name) - hdferr = h5tenum_insert_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_insert_f90 - -! -!****s* H5T/h5tenum_insert_f03 -! -! NAME -! h5tenum_insert_f -! -! PURPOSE -! Inserts a new enumeration datatype member. -! -! INPUTS -! type_id - Datatype identifier for the enumeration datatype. -! name - Datatype identifier. -! value - Pointer to the value of the new member. -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! M. Scot Breitenfeld -! February 6, 2015 -! -! HISTORY -! F2003 implementation of function -! SOURCE - SUBROUTINE h5tenum_insert_f03(type_id, name, value, hdferr) + hdferr = h5tenum_insert_ptr_c(type_id, name, namelen, value) +#ifdef H5_DOXYGEN_FORTRAN + END SUBROUTINE h5tenum_insert_f +#else + END SUBROUTINE h5tenum_insert_f03 +#endif + +!> +!! \ingroup FH5T +!! +!! \brief Inserts a new enumeration datatype member. +!! +!! \note \fortran_obsolete +!! +!! \param type_id Datatype identifier for the enumeration datatype. +!! \param name Datatype identifier. +!! \param value Value of the new member. +!! \param hdferr \fortran_error +!! +#ifdef H5_DOXYGEN_FORTRAN + SUBROUTINE h5tenum_insert_f(type_id, name, value, hdferr) +#else + SUBROUTINE h5tenum_insert_f90(type_id, name, value, hdferr) +#endif IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: type_id CHARACTER(LEN=*), INTENT(IN) :: name - TYPE(C_PTR) , INTENT(IN) :: value + INTEGER, INTENT(IN) :: value INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER :: namelen - INTERFACE - INTEGER FUNCTION h5tenum_insert_ptr_c(type_id, name, namelen, value) & - BIND(C, NAME='h5tenum_insert_ptr_c') - IMPORT :: C_CHAR, C_PTR + INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) BIND(C,NAME='h5tenum_insert_c') + IMPORT :: C_CHAR IMPORT :: HID_T IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: type_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: value INTEGER :: namelen - TYPE(C_PTR), VALUE :: value - END FUNCTION h5tenum_insert_ptr_c + END FUNCTION h5tenum_insert_c END INTERFACE namelen = LEN(name) - hdferr = h5tenum_insert_ptr_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_insert_f03 + hdferr = h5tenum_insert_c(type_id, name, namelen, value) +#ifdef H5_DOXYGEN_FORTRAN + END SUBROUTINE h5tenum_insert_f +#else + END SUBROUTINE h5tenum_insert_f90 +#endif END MODULE H5T diff --git a/fortran/src/H5VLff.F90 b/fortran/src/H5VLff.F90 index 364f0ae..3ebd2f1 100644 --- a/fortran/src/H5VLff.F90 +++ b/fortran/src/H5VLff.F90 @@ -1,10 +1,13 @@ -!****h* ROBODoc/H5VL -! -! NAME -! MODULE H5VL -! -! PURPOSE -! This file contains Fortran interfaces for H5VL (VOL) functions. +!> @defgroup FH5VL Fortran Datatype (H5VL) Interface +!! +!! @see H5VL, C-API +!! +!! @see @ref H5VL_UG, User Guide +!! + +!> @ingroup FH5VL +!! +!! @brief This module contains Fortran interfaces for H5VL (VOL) functions. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -32,7 +35,6 @@ ! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. ! This is needed for Windows based operating systems. ! -!***** MODULE H5VL @@ -46,30 +48,22 @@ CONTAINS ! H5VLregister_connector -! -!****s* H5VL/H5VLregister_connector_by_name_f -! -! NAME -! H5VLregister_connector_by_name_f -! -! PURPOSE -! Registers a new VOL connector as a member of the virtual object -! layer class by name. -! -! INPUTS -! name - Connector name -! OUTPUTS -! vol_id - VOL id -! hdferr - Returns 0 if successful and -1 if fails -! SOURCE - +!> +!! \ingroup FH5V +!! +!! \brief Registers a new VOL connector as a member of the virtual object layer class by name. +!! +!! \param name Connector name. +!! \param vol_id VOL connector identifier if successful; otherwise returns H5I_INVALID_HID_F. +!! \param hdferr \fortran_error +!! \param vipl_id VOL initialization property list identifier. +!! SUBROUTINE H5VLregister_connector_by_name_f(name, vol_id, hdferr, vipl_id) IMPLICIT NONE CHARACTER(LEN=*), INTENT(IN) :: name INTEGER(HID_T), INTENT(OUT) :: vol_id INTEGER, INTENT(OUT) :: hdferr INTEGER(HID_T), OPTIONAL, INTENT(IN) :: vipl_id -!***** CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name INTEGER(HID_T) :: vipl_id_default @@ -93,14 +87,22 @@ CONTAINS IF(vol_id.LT.0) hdferr = H5I_INVALID_HID_F END SUBROUTINE H5VLregister_connector_by_name_f - +!> +!! \ingroup FH5V +!! +!! \brief Registers a new VOL connector by value. +!! +!! \param connector_value Connector value. +!! \param vol_id VOL connector identifier if successful; otherwise returns H5I_INVALID_HID_F. +!! \param hdferr \fortran_error +!! \param vipl_id VOL initialization property list identifier. +!! SUBROUTINE H5VLregister_connector_by_value_f(connector_value, vol_id, hdferr, vipl_id) IMPLICIT NONE INTEGER, INTENT(IN) :: connector_value INTEGER(HID_T), INTENT(OUT) :: vol_id INTEGER, INTENT(OUT) :: hdferr INTEGER(HID_T), OPTIONAL, INTENT(IN) :: vipl_id -!***** INTEGER(HID_T) :: vipl_id_default INTERFACE @@ -123,29 +125,20 @@ CONTAINS END SUBROUTINE H5VLregister_connector_by_value_f -! -!****s* H5VL/H5VLis_connector_registered_by_name_f -! -! NAME -! H5VLis_connector_registered_by_name_f -! -! PURPOSE -! Tests whether a VOL class has been registered or not -! according to a specified connector name. -! -! INPUTS -! name - Connector name -! OUTPUTS -! registered - state of VOL class registration -! hdferr - Returns 0 if successful and -1 if fails -! SOURCE - +!> +!! \ingroup FH5V +!! +!! \brief Determines whether a VOL class has been registered or not ccording to a specified connector name. +!! +!! \param name Connector name. +!! \param registered State of VOL class registration. +!! \param hdferr \fortran_error +!! SUBROUTINE H5VLis_connector_registered_by_name_f(name, registered, hdferr) IMPLICIT NONE CHARACTER(LEN=*), INTENT(IN) :: name LOGICAL, INTENT(OUT) :: registered INTEGER, INTENT(OUT) :: hdferr -!***** CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name INTEGER(C_INT) :: registered_c @@ -167,29 +160,20 @@ CONTAINS END SUBROUTINE H5VLis_connector_registered_by_name_f -! -!****s* H5VL/H5VLis_connector_registered_by_value_f -! -! NAME -! H5VLis_connector_registered_by_value_f -! -! PURPOSE -! Tests whether a VOL class has been registered or not -! according to a specified connector value (ID). -! -! INPUTS -! value - Connector value -! OUTPUTS -! registered - state of VOL class registration -! hdferr - Returns 0 if successful and -1 if fails -! SOURCE - +!> +!! \ingroup FH5V +!! +!! \brief Determines whether a VOL class has been registered or not according to a specified connector value (ID). +!! +!! \param value ConneConnector value. +!! \param registered State of VOL class registration. +!! \param hdferr Retu\fortran_error +!! SUBROUTINE H5VLis_connector_registered_by_value_f(value, registered, hdferr) IMPLICIT NONE INTEGER, INTENT(IN) :: value LOGICAL, INTENT(OUT) :: registered INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER(C_INT) :: registered_c INTERFACE @@ -208,28 +192,20 @@ CONTAINS END SUBROUTINE H5VLis_connector_registered_by_value_f -! -!****s* H5VL/H5VLget_connector_id_f -! -! NAME -! H5VLget_connector_id_f -! -! PURPOSE -! Retrieves the ID for a registered VOL connector. -! -! INPUTS -! obj_id - Object id -! OUTPUTS -! vol_id - Connector id -! hdferr - Returns 0 if successful and -1 if fails -! SOURCE - +!> +!! \ingroup FH5V +!! +!! \brief Retrieves the ID for a registered VOL connector. +!! +!! \param obj_id Object id. +!! \param vol_id Connector id. +!! \param hdferr \fortran_error +!! SUBROUTINE H5VLget_connector_id_f(obj_id, vol_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id INTEGER(HID_T), INTENT(OUT) :: vol_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER(HID_T) FUNCTION H5VLget_connector_id(obj_id) BIND(C,NAME='H5VLget_connector_id') @@ -247,28 +223,20 @@ CONTAINS END SUBROUTINE H5VLget_connector_id_f -! -!****s* H5VL/H5VLget_connector_id_by_name_f -! -! NAME -! H5VLget_connector_id_by_name_f -! -! PURPOSE -! Retrieves the ID for a registered VOL connector. -! -! INPUTS -! name - Connector name -! OUTPUTS -! vol_id - Connector id -! hdferr - Returns 0 if successful and -1 if fails -! SOURCE - +!> +!! \ingroup FH5V +!! +!! \brief Retrieves the ID for a registered VOL connector. +!! +!! \param name Connector name. +!! \param vol_id Connector id. +!! \param hdferr \fortran_error +!! SUBROUTINE H5VLget_connector_id_by_name_f(name, vol_id, hdferr) IMPLICIT NONE CHARACTER(LEN=*), INTENT(IN) :: name INTEGER(HID_T), INTENT(OUT) :: vol_id INTEGER, INTENT(OUT) :: hdferr -!***** CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name INTERFACE @@ -290,28 +258,20 @@ CONTAINS END SUBROUTINE H5VLget_connector_id_by_name_f -! -!****s* H5VL/H5VLget_connector_id_by_value_f -! -! NAME -! H5VLget_connector_id_by_value_f -! -! PURPOSE -! Retrieves the ID for a registered VOL connector. -! -! INPUTS -! value - Connector value -! OUTPUTS -! vol_id - Connector id -! hdferr - Returns 0 if successful and -1 if fails -! SOURCE - +!> +!! \ingroup FH5V +!! +!! \brief Retrieves the ID for a registered VOL connector. +!! +!! \param value CConnector value. +!! \param vol_id Connector id. +!! \param hdferr \fortran_error +!! SUBROUTINE H5VLget_connector_id_by_value_f(value, vol_id, hdferr) IMPLICIT NONE INTEGER, INTENT(IN) :: value INTEGER(HID_T), INTENT(OUT) :: vol_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER(HID_T) FUNCTION H5VLget_connector_id_by_value(value) BIND(C,NAME='H5VLget_connector_id_by_value') IMPORT :: C_INT @@ -329,14 +289,22 @@ CONTAINS ENDIF END SUBROUTINE H5VLget_connector_id_by_value_f - +!> +!! \ingroup FH5V +!! +!! \brief Retrieves a connector name for a VOL. +!! +!! \param obj_id Object identifier or file identifier. +!! \param name Connector name. +!! \param hdferr \fortran_error +!! \param name_len Maximum length of the name to retrieve. +!! SUBROUTINE H5VLget_connector_name_f(obj_id, name, hdferr, name_len) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: obj_id CHARACTER(LEN=*), INTENT(OUT) :: name INTEGER, INTENT(OUT) :: hdferr INTEGER(SIZE_T), OPTIONAL :: name_len -!***** CHARACTER(LEN=1,KIND=C_CHAR), DIMENSION(1:LEN(name)+1), TARGET :: c_name INTEGER(SIZE_T) :: l @@ -346,7 +314,6 @@ CONTAINS IMPLICIT NONE INTEGER(HID_T) , INTENT(IN), VALUE :: obj_id CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name - ! TYPE(C_PTR), value :: name INTEGER(SIZE_T), INTENT(IN), VALUE :: size END FUNCTION H5VLget_connector_name END INTERFACE @@ -367,28 +334,18 @@ CONTAINS END SUBROUTINE H5VLget_connector_name_f -! -! -!****s* H5VL/H5VLclose_f -! -! NAME -! H5VLclose_f -! -! PURPOSE -! Closes a VOL connector ID. -! -! INPUTS -! vol_id - A valid identifier of the connectory to unregister. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! SOURCE - +!> +!! \ingroup FH5V +!! +!! \brief Closes a VOL connector ID. +!! +!! \param vol_id A valid identifier of the connectory to unregister. +!! \param hdferr \fortran_error +!! SUBROUTINE H5VLclose_f(vol_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: vol_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION H5VLclose(vol_id) BIND(C, NAME='H5VLclose') @@ -401,27 +358,18 @@ CONTAINS END SUBROUTINE H5VLclose_f -! -!****s* H5VL/H5VLunregister_connector_f -! -! NAME -! H5VLunregister_connector_f -! -! PURPOSE -! Removes a VOL connector ID from the library. -! -! INPUTS -! plugin_id - A valid identifier of the connector to unregister. -! -! OUTPUTS -! hdferr - Returns 0 if successful and -1 if fails -! SOURCE - +!> +!! \ingroup FH5V +!! +!! \brief Removes a VOL connector ID from the library. +!! +!! \param plugin_id A valid identifier of the connector to unregister.. +!! \param hdferr Ret\fortran_error +!! SUBROUTINE H5VLunregister_connector_f(plugin_id, hdferr) IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: plugin_id INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION H5VLunregister_connector(plugin_id) BIND(C, NAME='H5VLunregister_connector') diff --git a/fortran/src/H5Zff.F90 b/fortran/src/H5Zff.F90 index 15f3c67..4fa81e9 100644 --- a/fortran/src/H5Zff.F90 +++ b/fortran/src/H5Zff.F90 @@ -1,10 +1,6 @@ -!****h* ROBODoc/H5Z -! -! NAME -! MODULE H5Z -! -! PURPOSE -! This file contains Fortran interfaces for H5Z functions. +!> @ingroup FH5Z +!! +!! @brief This module contains Fortran interfaces for H5Z functions. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -14,10 +10,10 @@ ! * ! This file is part of HDF5. The full HDF5 copyright notice, including * ! terms governing use, modification, and redistribution, is contained in * -! the COPYING file, which can be found at the root of the source code * -! distribution tree, or in https://www.hdfgroup.org/licenses. * -! If you do not have access to either file, you may request a copy from * -! help@hdfgroup.org. * +! the COPYING file, which can be found at the root of the source code * +! distribution tree, or in https://www.hdfgroup.org/licenses. * +! If you do not have access to either file, you may request a copy from * +! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! ! NOTES! @@ -32,7 +28,6 @@ ! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. ! This is needed for Windows based operating systems. ! -!***** MODULE H5Z @@ -40,38 +35,24 @@ MODULE H5Z CONTAINS -!****s* H5Z/h5zunregister_f -! -! NAME -! h5zunregister_f -! -! PURPOSE -! Unregisters specified filetr -! -! INPUTS -! filter - Filter; may have one of the following values: -! H5Z_FILTER_DEFLATE_F -! H5Z_FILTER_SZIP_F -! H5Z_FILTER_NBIT_F -! H5Z_FILTER_SCALEOFFSET_F -! H5Z_FILTER_SHUFFLE_F -! H5Z_FILTER_FLETCHER32_F -! -! OUTPUTS -! hdferr - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE +!> +!! \ingroup FH5Z +!! +!! \brief Unregisters specified filters. +!! +!! \param filter Filter; may have one of the following values: +!! \li H5Z_FILTER_DEFLATE_F +!! \li H5Z_FILTER_SZIP_F +!! \li H5Z_FILTER_NBIT_F +!! \li H5Z_FILTER_SCALEOFFSET_F +!! \li H5Z_FILTER_SHUFFLE_F +!! \li H5Z_FILTER_FLETCHER32_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5zunregister_f(filter, hdferr) IMPLICIT NONE INTEGER, INTENT(IN) :: filter INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5zunregister_c(filter) BIND(C,NAME='h5zunregister_c') INTEGER, INTENT(IN) :: filter @@ -80,39 +61,26 @@ CONTAINS hdferr = h5zunregister_c(filter) END SUBROUTINE h5zunregister_f -!****s* H5Z/h5zfilter_avail_f -! NAME -! h5zfilter_avail_f -! -! PURPOSE -! Queries if filter is available -! -! INPUTS -! filter - Filter; may be one of the following: -! H5Z_FILTER_DEFLATE_F -! H5Z_FILTER_SZIP_F -! H5Z_FILTER_NBIT_F -! H5Z_FILTER_SCALEOFFSET_F -! H5Z_FILTER_SHUFFLE_F -! H5Z_FILTER_FLETCHER32_F -! OUTPUTS -! status - Flag; .TRUE. if filter is available, -! .FALSE. otherwise -! hdferr: - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE +!> +!! \ingroup FH5Z +!! +!! \brief Queries if filter is available +!! +!! \param filter Filter; may be one of the following: +!! \li H5Z_FILTER_DEFLATE_F +!! \li H5Z_FILTER_SZIP_F +!! \li H5Z_FILTER_NBIT_F +!! \li H5Z_FILTER_SCALEOFFSET_F +!! \li H5Z_FILTER_SHUFFLE_F +!! \li H5Z_FILTER_FLETCHER32_F +!! \param status Flag; .TRUE. if filter is available, .FALSE. otherwise. +!! \param hdferr \fortran_error +!! SUBROUTINE h5zfilter_avail_f(filter, status, hdferr) IMPLICIT NONE INTEGER, INTENT(IN) :: filter LOGICAL, INTENT(OUT) :: status INTEGER, INTENT(OUT) :: hdferr -!***** INTEGER :: flag ! "TRUE/FALSE/ERROR from C" INTERFACE @@ -129,43 +97,28 @@ CONTAINS END SUBROUTINE h5zfilter_avail_f -!****s* H5Z/h5zget_filter_info_f -! -! NAME -! h5zget_filter_info_f -! -! PURPOSE -! Queries if filter has its encoder and/or decoder -! available -! -! INPUTS -! filter - Filter; may be one of the following: -! H5Z_FILTER_DEFLATE_F -! H5Z_FILTER_SZIP_F -! H5Z_FILTER_NBIT_F -! H5Z_FILTER_SCALEOFFSET_F -! H5Z_FILTER_SHUFFLE_F -! H5Z_FILTER_FLETCHER32_Ffilter -! OUTPUTS -! config_flags - Flag, indicates if filter has its encoder -! and/or decoder available, possibly containing the -! following values: -! H5Z_FILTER_ENCODE_ENABLED_F -! H5Z_FILTER_DECODE_ENABLED_F -! hdferr: - Error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Nat Furrer and James Laird -! June 16, 2004 -! SOURCE +!> +!! \ingroup FH5Z +!! +!! \brief Queries if filter has its encoder and/or decoder available. +!! +!! \param filter Filter; may be one of the following: +!! \li H5Z_FILTER_DEFLATE_F +!! \li H5Z_FILTER_SZIP_F +!! \li H5Z_FILTER_NBIT_F +!! \li H5Z_FILTER_SCALEOFFSET_F +!! \li H5Z_FILTER_SHUFFLE_F +!! \li H5Z_FILTER_FLETCHER32_Ffilter +!! \param config_flags Flag, indicates if filter has its encoder and/or decoder available, possible values: +!! \li H5Z_FILTER_ENCODE_ENABLED_F +!! \li H5Z_FILTER_DECODE_ENABLED_F +!! \param hdferr \fortran_error +!! SUBROUTINE h5zget_filter_info_f(filter, config_flags, hdferr) IMPLICIT NONE INTEGER, INTENT(IN) :: filter INTEGER, INTENT(OUT) :: config_flags INTEGER, INTENT(OUT) :: hdferr -!***** INTERFACE INTEGER FUNCTION h5zget_filter_info_c(filter, config_flags) BIND(C,NAME='h5zget_filter_info_c') diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 4c93de9..5968e73 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -1,10 +1,13 @@ -!****h* ROBODoc/H5LIB -! -! NAME -! MODULE H5LIB -! -! PURPOSE -! This module provides fortran specific helper functions for the HDF library +!> @defgroup FH5 Fortran Library (H5) Interface +!! +!! @see H5, C-API +!! +!! @see @ref H5_UG, User Guide +!! + +!> @ingroup FH5 +!! +!! @brief This module provides fortran specific helper functions for the HDF library. ! ! COPYRIGHT ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -32,7 +35,6 @@ ! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory. ! This is needed for Windows based operating systems. ! -!***** #include @@ -145,36 +147,18 @@ MODULE H5LIB PUBLIC :: h5garbage_collect_f, h5check_version_f CONTAINS -!****s* H5LIB/h5open_f -! -! NAME -! h5open_f -! -! PURPOSE -! Initializes HDF5 Fortran interface. -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! Removed call to h5open_c since this may cause a problem for an -! application that uses HDF5 library outside HDF5 Fortran APIs. -! October 13, 2011 -! Fortran90 Interface: +!> +!! \ingroup FH5 +!! +!! \brief Initializes HDF5 Fortran interface. +!! +!! \param error \fortran_error +!! SUBROUTINE h5open_f(error) USE H5F, ONLY : h5fget_obj_count_f, H5OPEN_NUM_OBJ IMPLICIT NONE INTEGER, INTENT(OUT) :: error INTEGER(SIZE_T) :: H5OPEN_NUM_OBJ_LOC = 0 -!***** INTERFACE INTEGER FUNCTION h5init_types_c(p_types, f_types, i_types) & @@ -646,35 +630,17 @@ CONTAINS END SUBROUTINE h5open_f -!****s* H5LIB/h5close_f -! -! NAME -! h5close_f -! -! PURPOSE -! Closes HDF5 Fortran interface. -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! August 12, 1999 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! Removed call to h5close_c since this may cause a problem for an -! application that uses HDF5 library outside HDF5 Fortran APIs. -! October 13, 2011 -! Fortran90 Interface: +!> +!! \ingroup FH5 +!! +!! \brief Closes HDF5 Fortran interface. +!! +!! \param error \fortran_error +!! SUBROUTINE h5close_f(error) USE H5F, ONLY : h5fget_obj_count_f, H5OPEN_NUM_OBJ IMPLICIT NONE INTEGER, INTENT(OUT) :: error -!***** INTERFACE INTEGER FUNCTION h5close_types_c(p_types, P_TYPES_LEN, & f_types, F_TYPES_LEN, & @@ -702,29 +668,19 @@ CONTAINS END SUBROUTINE h5close_f -!****s* H5LIB/h5get_libversion_f -! -! NAME -! h5get_libversion_f -! -! PURPOSE -! Returns the HDF5 LIbrary release number -! -! Outputs: -! majnum - major version of the library -! minnum - minor version of the library -! relnum - release version of the library -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 24, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5 +!! +!! \brief Returns the HDF5 LIbrary release number +!! +!! \param majnum Major version of the library. +!! \param minnum Minor version of the library. +!! \param relnum Release version of the library. +!! \param error \fortran_error +!! SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error) IMPLICIT NONE INTEGER, INTENT(OUT) :: majnum, minnum, relnum, error -!***** INTERFACE INTEGER FUNCTION h5get_libversion_c(majnum, minnum, relnum) & BIND(C,NAME='h5get_libversion_c') @@ -737,32 +693,20 @@ CONTAINS END SUBROUTINE h5get_libversion_f -!****s* H5LIB/h5check_version_f -! -! NAME -! h5check_version_f -! -! PURPOSE -! Verifies that library versions are consistent. -! -! Inputs: -! majnum - major version of the library -! minnum - minor version of the library -! relnum - release version of the library -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 24, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5 +!! +!! \brief Verifies that library versions are consistent. +!! +!! \param majnum Major version of the library. +!! \param minnum Minor version of the library. +!! \param relnum Release version of the library. +!! \param error \fortran_error +!! SUBROUTINE h5check_version_f(majnum, minnum, relnum, error) IMPLICIT NONE INTEGER, INTENT(IN) :: majnum, minnum, relnum INTEGER, INTENT(OUT) :: error -!***** INTERFACE INTEGER FUNCTION h5check_version_c(majnum, minnum, relnum) & BIND(C,NAME='h5check_version_c') @@ -774,58 +718,38 @@ CONTAINS error = h5check_version_c(majnum, minnum, relnum) END SUBROUTINE h5check_version_f -!****s* H5LIB/h5garbage_collect_f -! -! NAME -! h5garbage_collect_f -! -! PURPOSE -! Garbage collects on all free-lists of all types. -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 24, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5 +!! +!! \brief Garbage collects on all free-lists of all types. +!! +!! \param error \fortran_error +!! SUBROUTINE h5garbage_collect_f(error) IMPLICIT NONE INTEGER, INTENT(OUT) :: error -!***** INTERFACE - INTEGER FUNCTION h5garbage_collect_c() & - BIND(C,NAME='h5garbage_collect_c') + INTEGER FUNCTION h5garbage_collect_c() BIND(C,NAME='h5garbage_collect_c') + IMPLICIT NONE END FUNCTION h5garbage_collect_c END INTERFACE error = h5garbage_collect_c() END SUBROUTINE h5garbage_collect_f -!****s* H5LIB/h5dont_atexit_f -! -! NAME -! h5dont_atexit_f -! -! PURPOSE -! Instructs library not to install atexit cleanup routine. -! -! Outputs: -! error - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! September 24, 2002 -! -! Fortran90 Interface: +!> +!! \ingroup FH5 +!! +!! \brief Instructs library not to install atexit cleanup routine. +!! +!! \param error \fortran_error +!! SUBROUTINE h5dont_atexit_f(error) IMPLICIT NONE INTEGER, INTENT(OUT) :: error -!***** INTERFACE - INTEGER FUNCTION h5dont_atexit_c() & - BIND(C,NAME='h5dont_atexit_c') + INTEGER FUNCTION h5dont_atexit_c() BIND(C,NAME='h5dont_atexit_c') + IMPLICIT NONE END FUNCTION h5dont_atexit_c END INTERFACE @@ -833,34 +757,23 @@ CONTAINS END SUBROUTINE h5dont_atexit_f -!****f* H5LIB/h5kind_to_type -! -! NAME -! h5kind_to_type -! -! PURPOSE -! Converts the KIND to the correct HDF type -! -! Inputs: -! kind - Fortran KIND parameter -! flag - Whether KIND is of type INTEGER or REAL: -! H5_INTEGER_KIND - integer -! H5_REAL_KIND - real -! Outputs: -! h5_type - Returns the type -! -! AUTHOR -! M. Scot Breitenfeld -! August 25, 2008 -! -! Fortran90 Interface: +!> +!! \ingroup FH5 +!! +!! \brief Converts the KIND to the correct HDF type +!! +!! \param ikind Fortran KIND parameter. +!! \param flag Whether KIND is of type INTEGER or REAL: +!! \li H5_INTEGER_KIND - integer +!! \li H5_REAL_KIND - real +!! \result h5_type Returns the type. +!! INTEGER(HID_T) FUNCTION h5kind_to_type(ikind, flag) RESULT(h5_type) USE ISO_C_BINDING IMPLICIT NONE INTEGER, INTENT(IN) :: ikind INTEGER, INTENT(IN) :: flag INTEGER :: i -!***** !#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 ! ! (1) The array index assumes INTEGER*16 the last integer in the series, and @@ -896,34 +809,20 @@ CONTAINS END FUNCTION h5kind_to_type -!****f* H5LIB_PROVISIONAL/h5offsetof -! -! NAME -! h5offsetof -! -! PURPOSE -! Computes the offset in memory -! -! Inputs: -! start - starting pointer address -! end - ending pointer address -! -! Outputs: -! offset - offset of a member within the derived type -! -! AUTHOR -! M. Scot Breitenfeld -! August 25, 2008 -! -! ACKNOWLEDGEMENTS -! Joe Krahn -! -! Fortran2003 Interface: +!> +!! \ingroup FH5 +!! +!! \brief Computes the offset in memory +!! +!! \param start Starting pointer address. +!! \param end Ending pointer address. +!! +!! \result offset Offset of a member within the derived type. +!! FUNCTION h5offsetof(start,end) RESULT(offset) IMPLICIT NONE INTEGER(SIZE_T) :: offset TYPE(C_PTR), VALUE, INTENT(IN) :: start, end -!***** INTEGER(C_INTPTR_T) :: int_address_start, int_address_end int_address_start = TRANSFER(start, int_address_start) int_address_end = TRANSFER(end , int_address_end ) @@ -932,38 +831,26 @@ CONTAINS END FUNCTION h5offsetof -!****f* H5LIB_PROVISIONAL/h5gmtime -! -! NAME -! h5gmtime -! -! PURPOSE -! Convert time_t structure (C) to Fortran DATE AND TIME storage format. -! -! Inputs: -! stdtime_t - Object of type time_t that contains a time value -! -! Outputs: -! datetime - A date/time array using Fortran conventions: -! datetime(1) = year -! datetime(2) = month -! datetime(3) = day -! datetime(4) = 0 ! time is expressed as UTC (or GMT timezone) */ -! datetime(5) = hour -! datetime(6) = minute -! datetime(7) = second -! datetime(8) = millisecond -- not available, assigned - HUGE(0) -! -! AUTHOR -! M. Scot Breitenfeld -! January, 2019 -! -! Fortran Interface: - FUNCTION h5gmtime(stdtime_t) +!> +!! \ingroup FH5 +!! +!! \brief Convert time_t structure (C) to Fortran DATE AND TIME storage format. +!! +!! \param stdtime_t Object of type time_t that contains a time value. +!! \result datetime A date/time array using Fortran conventions: +!! \li datetime(1) = year +!! \li datetime(2) = month +!! \li datetime(3) = day +!! \li datetime(4) = 0 ! time is expressed as UTC (or GMT timezone) +!! \li datetime(5) = hour +!! \li datetime(6) = minute +!! \li datetime(7) = second +!! \li datetime(8) = millisecond -- not available, assigned - HUGE(0) +!! + FUNCTION h5gmtime(stdtime_t) RESULT(datetime) IMPLICIT NONE INTEGER(KIND=TIME_T), INTENT(IN) :: stdtime_t - INTEGER, DIMENSION(1:8) :: h5gmtime -!***** + INTEGER, DIMENSION(1:8) :: datetime TYPE(C_PTR) :: cptr INTEGER(C_INT), DIMENSION(:), POINTER :: c_time @@ -979,14 +866,14 @@ CONTAINS cptr = gmtime(stdtime_t) CALL C_F_POINTER(cptr, c_time, [9]) - h5gmtime(1) = INT(c_time(6)+1900) ! year starts at 1900 - h5gmtime(2) = INT(c_time(5)+1) ! month starts at 0 in C - h5gmtime(3) = INT(c_time(4)) ! day - h5gmtime(4) = 0 ! time is expressed as UTC (or GMT timezone) - h5gmtime(5) = INT(c_time(3)) ! hour - h5gmtime(6) = INT(c_time(2)) ! minute - h5gmtime(7) = INT(c_time(1)) ! second - h5gmtime(8) = -32767 ! millisecond is not available, assign it -HUGE(0) + datetime(1) = INT(c_time(6)+1900) ! year starts at 1900 + datetime(2) = INT(c_time(5)+1) ! month starts at 0 in C + datetime(3) = INT(c_time(4)) ! day + datetime(4) = 0 ! time is expressed as UTC (or GMT timezone) + datetime(5) = INT(c_time(3)) ! hour + datetime(6) = INT(c_time(2)) ! minute + datetime(7) = INT(c_time(1)) ! second + datetime(8) = -32767 ! millisecond is not available, assign it -HUGE(0) END FUNCTION h5gmtime diff --git a/hl/fortran/src/H5DSff.F90 b/hl/fortran/src/H5DSff.F90 index bbd9918..bb80eb7 100644 --- a/hl/fortran/src/H5DSff.F90 +++ b/hl/fortran/src/H5DSff.F90 @@ -1,3 +1,14 @@ +!> @defgroup FH5DS Fortran High-level H5DS Interface +!! +!! @see H5DS, C-API +!! +!! @see @ref H5DS_UG, User Guide +!! + +!> @ingroup FH5DS +!! +!! @brief This module contains Fortran interfaces for H5DS +! ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * @@ -10,45 +21,43 @@ ! If you do not have access to either file, you may request a copy from * ! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! _____ __ __ _____ ____ _____ _______ _ _ _______ +! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| +! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** +! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | **** +! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | **** +! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_| ! -! -! This file contains FORTRAN90 interfaces for H5DS functions +! If you add a new function here then you MUST add the function name to the +! Windows dll file 'hdf5_hl_fortrandll.def.in' in the hl/fortran/src directory. +! This is needed for Windows based operating systems. ! -MODULE h5ds +MODULE H5DS USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_FLOAT, C_DOUBLE, C_LOC, C_CHAR USE h5fortran_types USE hdf5 CONTAINS - -!------------------------------------------------------------------------- -! Function: H5DSset_scale_f -! -! Purpose: Convert dataset dsid to a dimension scale, with optional name, dimname. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 17, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - +!> +!! \ingroup FH5DS +!! +!! \brief Convert dataset \p dsid to a dimension scale, with optional name, \p dimname. +!! +!! \param dsid The dataset to be made a Dimemsion Scale. +!! \param errcode \fortran_error +!! \param dimname The dimension name. +!! SUBROUTINE H5DSset_scale_f( dsid, errcode, dimname) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale - CHARACTER(LEN=*), INTENT(in), OPTIONAL :: dimname ! The dimension name - INTEGER :: errcode ! Error code + INTEGER(hid_t), INTENT(in) :: dsid + CHARACTER(LEN=*), INTENT(in), OPTIONAL :: dimname + INTEGER :: errcode - INTEGER(SIZE_T) :: dimname_len ! length of dimname (if present) + INTEGER(SIZE_T) :: dimname_len ! length of dimname (if present) INTERFACE INTEGER FUNCTION H5DSset_scale_c(dsid, dimname, dimname_len) & @@ -56,8 +65,8 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dimname ! The dimension name + INTEGER(hid_t), INTENT(in) :: dsid + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dimname INTEGER(SIZE_T), INTENT(in) :: dimname_len END FUNCTION H5DSset_scale_c END INTERFACE @@ -71,31 +80,24 @@ CONTAINS END SUBROUTINE H5DSset_scale_f -!------------------------------------------------------------------------- -! Function: H5DSattach_scale_f -! -! Purpose: Attach dimension scale dsid to dimension idx of dataset did. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 17, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - +!> +!! \ingroup FH5DS +!! +!! \brief Attach dimension scale dsid to dimension \p idx of dataset \p did. +!! +!! \param did The dataset. +!! \param dsid The scale to be attached. +!! \param idx The dimension of \p did that \p dsid is associated with. +!! \param errcode \fortran_error +!! SUBROUTINE H5DSattach_scale_f( did, dsid, idx, errcode) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached - INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with. - INTEGER :: errcode ! error code + INTEGER(hid_t), INTENT(in) :: did + INTEGER(hid_t), INTENT(in) :: dsid + INTEGER , INTENT(in) :: idx + INTEGER :: errcode INTEGER :: c_idx INTERFACE @@ -103,9 +105,9 @@ CONTAINS BIND(C,NAME='h5dsattach_scale_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached - INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with. + INTEGER(hid_t), INTENT(in) :: did + INTEGER(hid_t), INTENT(in) :: dsid + INTEGER , INTENT(in) :: idx END FUNCTION H5DSattach_scale_c END INTERFACE @@ -115,31 +117,25 @@ CONTAINS END SUBROUTINE H5DSattach_scale_f -!------------------------------------------------------------------------- -! Function: H5DSdetach_scale_f -! -! Purpose: Detach dimension scale dsid from the dimension idx of Dataset did. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 17, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- +!> +!! \ingroup FH5DS +!! +!! \brief Detach dimension scale dsid from the dimension idx of dataset \p did. +!! +!! \param did The dataset. +!! \param dsid The scale to be detached. +!! \param idx The dimension of \p did to detach. +!! \param errcode \fortran_error +!! SUBROUTINE H5DSdetach_scale_f( did, dsid, idx, errcode) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached - INTEGER , INTENT(in) :: idx ! the dimension of did to detach - INTEGER :: errcode ! error code + INTEGER(hid_t), INTENT(in) :: did + INTEGER(hid_t), INTENT(in) :: dsid + INTEGER , INTENT(in) :: idx + INTEGER :: errcode INTEGER :: c_idx INTERFACE @@ -147,9 +143,9 @@ CONTAINS BIND(C,NAME='h5dsdetach_scale_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached - INTEGER , INTENT(in) :: idx ! the dimension of did to detach + INTEGER(hid_t), INTENT(in) :: did + INTEGER(hid_t), INTENT(in) :: dsid + INTEGER , INTENT(in) :: idx END FUNCTION H5DSdetach_scale_c END INTERFACE @@ -159,34 +155,26 @@ CONTAINS END SUBROUTINE H5DSdetach_scale_f - -!------------------------------------------------------------------------- -! Function: H5DSis_attached_f -! -! Purpose: Report if dimension scale dsid is currently attached to dimension idx of dataset did. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 17, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - +!> +!! \ingroup FH5DS +!! +!! \brief Report if dimension scale dsid is currently attached to dimension idx of dataset did. +!! +!! \param did The dataset. +!! \param dsid The scale to be attached. +!! \param idx The dimension of \p did that \p dsid is associated with. +!! \param is_attached If dimension scale \p dsid is currently attached to dimension \p idx of dataset \p did. +!! \param errcode \fortran_error +!! SUBROUTINE H5DSis_attached_f( did, dsid, idx, is_attached, errcode) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached - INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with - LOGICAL , INTENT(out) :: is_attached ! logical: dimension scale dsid is currently attached to - ! dimension idx of dataset did - INTEGER :: errcode ! error code + INTEGER(hid_t), INTENT(in) :: did + INTEGER(hid_t), INTENT(in) :: dsid + INTEGER , INTENT(in) :: idx + LOGICAL , INTENT(out) :: is_attached + INTEGER :: errcode INTEGER :: c_is_attached INTEGER :: c_idx @@ -195,10 +183,10 @@ CONTAINS BIND(C,NAME='h5dsis_attached_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached - INTEGER , INTENT(in) :: idx ! the dimension of did to detach - INTEGER , INTENT(out) :: c_is_attached ! dimension scale dsid is currently attached to + INTEGER(hid_t), INTENT(in) :: did + INTEGER(hid_t), INTENT(in) :: dsid + INTEGER , INTENT(in) :: idx + INTEGER , INTENT(out) :: c_is_attached END FUNCTION H5DSis_attached_c END INTERFACE @@ -218,32 +206,22 @@ CONTAINS ! ! H5DSiterate_scales: Implement in F2003 ! - -!------------------------------------------------------------------------- -! Function: H5DSis_scale_f -! -! Purpose: Determines whether dset is a Dimension Scale. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - +!> +!! \ingroup FH5DS +!! +!! \brief Determines whether \p did is a Dimension Scale. +!! +!! \param did The data set to query. +!! \param is_scale If is a Dimension Scale. +!! \param errcode \fortran_error +!! SUBROUTINE H5DSis_scale_f( did, is_scale, errcode) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! the data set to query - LOGICAL , INTENT(out) :: is_scale ! logical: - ! .TRUE. if did is a Dimension Scale - INTEGER :: errcode ! error code + INTEGER(hid_t), INTENT(in) :: did + LOGICAL , INTENT(out) :: is_scale + INTEGER , INTENT(out) :: errcode INTEGER :: c_is_scale INTERFACE @@ -267,30 +245,23 @@ CONTAINS END SUBROUTINE H5DSis_scale_f -!------------------------------------------------------------------------- -! Function: H5DSset_label_f -! -! Purpose: Set label for the dimension idx of did to the value label -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - +!> +!! \ingroup FH5DS +!! +!! \brief Set label for the dimension \p idx of \p did to the value \p label. +!! +!! \param did The data set. +!! \param idx The dimension. +!! \param label The label. +!! \param errcode \fortran_error +!! SUBROUTINE H5DSset_label_f( did, idx, label, errcode) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! The dataset - INTEGER , INTENT(in) :: idx ! The dimension - CHARACTER(LEN=*), INTENT(in) :: label ! The label + INTEGER(hid_t), INTENT(in) :: did + INTEGER , INTENT(in) :: idx + CHARACTER(LEN=*), INTENT(in) :: label INTEGER :: errcode ! Error code INTEGER(SIZE_T) :: label_len ! Length of label @@ -302,10 +273,10 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! The dataset - INTEGER , INTENT(in) :: idx ! The dimension - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: label ! The label - INTEGER(SIZE_T), INTENT(in) :: label_len ! Length of label + INTEGER(hid_t), INTENT(in) :: did + INTEGER , INTENT(in) :: idx + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: label + INTEGER(SIZE_T), INTENT(in) :: label_len END FUNCTION H5DSset_label_c END INTERFACE @@ -316,32 +287,26 @@ CONTAINS END SUBROUTINE H5DSset_label_f -!------------------------------------------------------------------------- -! Function: H5DSget_label_f -! -! Purpose: Read the label for dimension idx of did into buffer label. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - +!> +!! \ingroup FH5DS +!! +!! \brief Read the \p label for dimension \p idx of \p did into buffer \p label. +!! +!! \param did The dataset. +!! \param idx The dimension. +!! \param label The label. +!! \param size The length of the \p label buffer. +!! \param errcode \fortran_error +!! SUBROUTINE H5DSget_label_f( did, idx, label, size, errcode) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! The dataget - INTEGER , INTENT(in) :: idx ! The dimension - CHARACTER(LEN=*), INTENT(INOUT) :: label ! The label - INTEGER(size_t) , INTENT(INOUT) :: size ! The length of the label buffer - INTEGER :: errcode ! Error code + INTEGER(hid_t), INTENT(in) :: did + INTEGER , INTENT(in) :: idx + CHARACTER(LEN=*), INTENT(INOUT) :: label + INTEGER(size_t) , INTENT(INOUT) :: size + INTEGER :: errcode INTEGER :: c_idx INTERFACE @@ -350,10 +315,10 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! The dataget - INTEGER , INTENT(in) :: idx ! The dimension - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(INOUT) :: label ! The label - INTEGER(SIZE_T), INTENT(inout) :: size ! Length of label + INTEGER(hid_t), INTENT(in) :: did + INTEGER , INTENT(in) :: idx + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(INOUT) :: label + INTEGER(SIZE_T), INTENT(inout) :: size END FUNCTION H5DSget_label_c END INTERFACE @@ -363,32 +328,24 @@ CONTAINS END SUBROUTINE H5DSget_label_f - -!------------------------------------------------------------------------- -! Function: H5DSget_scale_name_f -! -! Purpose: Read the name of scale did into buffer name. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - +!> +!! \ingroup FH5DS +!! +!! \brief Read the name of scale \p did into buffer name. +!! +!! \param did Dimension scale identifier. +!! \param name Buffer to contain the returned name. +!! \param size Size in bytes, of the name buffer. +!! \param errcode \fortran_error +!! SUBROUTINE H5DSget_scale_name_f(did, name, size, errcode) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! The dataget - CHARACTER(LEN=*), INTENT(INOUT) :: name ! The name - INTEGER(size_t) , INTENT(INOUT) :: size ! The length of the name buffer - INTEGER :: errcode ! Error code + INTEGER(hid_t), INTENT(in) :: did + CHARACTER(LEN=*), INTENT(INOUT) :: name + INTEGER(size_t) , INTENT(INOUT) :: size + INTEGER :: errcode INTERFACE INTEGER FUNCTION H5DSget_scale_name_c(did, name, size) & @@ -396,9 +353,9 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! The dataget - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(INOUT) :: name ! The name - INTEGER(SIZE_T), INTENT(inout) :: size ! Length of name + INTEGER(hid_t), INTENT(in) :: did + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(INOUT) :: name + INTEGER(SIZE_T), INTENT(inout) :: size END FUNCTION H5DSget_scale_name_c END INTERFACE @@ -406,30 +363,23 @@ CONTAINS END SUBROUTINE H5DSget_scale_name_f -!------------------------------------------------------------------------- -! Function: H5DSget_num_scales_f -! -! Purpose: Determines how many Dimension Scales are attached to dimension idx of did -! -! Return: Success: 0, Failure: -1 -! -! Programmer: M. Scot Breitenfeld -! -! Date: April 18, 2011 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - +!> +!! \ingroup FH5DS +!! +!! \brief Determines how many Dimension Scales are attached to dimension idx of \p did. +!! +!! \param did The dataset to query. +!! \param idx The dimension of \p did to query. +!! \param num_scales Number of Dimension Scales associated with \p did. +!! \param errcode \fortran_error +!! SUBROUTINE H5DSget_num_scales_f( did, idx, num_scales, errcode) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER , INTENT(in) :: idx ! the dimension of did to query - INTEGER , INTENT(INOUT) :: num_scales ! the number of Dimension Scales associated with did - INTEGER :: errcode ! error code + INTEGER(hid_t), INTENT(in) :: did + INTEGER , INTENT(in) :: idx + INTEGER , INTENT(INOUT) :: num_scales + INTEGER :: errcode INTEGER :: c_idx INTERFACE @@ -437,9 +387,9 @@ CONTAINS BIND(C,NAME='h5dsget_num_scales_c') IMPORT :: HID_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: did ! the dataset - INTEGER , INTENT(in) :: idx ! the dimension of did to query - INTEGER , INTENT(INOUT) :: num_scales ! the number of Dimension Scales associated with did + INTEGER(hid_t), INTENT(in) :: did + INTEGER , INTENT(in) :: idx + INTEGER , INTENT(INOUT) :: num_scales END FUNCTION H5DSget_num_scales_c END INTERFACE diff --git a/hl/fortran/src/H5IMff.F90 b/hl/fortran/src/H5IMff.F90 index 9709032..a2573d6 100644 --- a/hl/fortran/src/H5IMff.F90 +++ b/hl/fortran/src/H5IMff.F90 @@ -1,3 +1,14 @@ +!> @defgroup FH5IM Fortran High-level H5IM Interface +!! +!! @see H5IM, C-API +!! +!! @see @ref H5IM_UG, User Guide +!! + +!> @ingroup FH5IM +!! +!! @brief This module contains Fortran interfaces for H5IM. +! ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * @@ -10,12 +21,6 @@ ! If you do not have access to either file, you may request a copy from * ! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! -! This file contains FORTRAN interfaces for H5IM functions -! -! NOTES -! ! _____ __ __ _____ ____ _____ _______ _ _ _______ ! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| ! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** @@ -28,29 +33,24 @@ ! This is needed for Windows based operating systems. ! -MODULE h5im +MODULE H5IM USE, INTRINSIC :: ISO_C_BINDING USE h5fortran_types USE hdf5 CONTAINS -!------------------------------------------------------------------------- -! Function: h5immake_image_8bit_f -! -! Purpose: Creates and writes an image an 8 bit image -! -! Return: Success: 0, Failure: -1 -! -! Programmer: Pedro Vicente -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - +!> +!! \ingroup FH5IM +!! +!! \brief Creates and writes an image an 8 bit image. +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param dset_name The name of the dataset to create. +!! \param width The width of the image. +!! \param height The height of the image. +!! \param buf Buffer with data to be written to the dataset. +!! \param errcode \fortran_error +!! SUBROUTINE h5immake_image_8bit_f(loc_id,& dset_name,& width,& @@ -60,13 +60,13 @@ CONTAINS IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: width ! width of image - INTEGER(hsize_t), INTENT(in) :: height ! height of image - INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(len=*), INTENT(in) :: dset_name + INTEGER(hsize_t), INTENT(in) :: width + INTEGER(hsize_t), INTENT(in) :: height + INTEGER, INTENT(in), DIMENSION(*) :: buf + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTERFACE INTEGER FUNCTION h5immake_image_8bit_c(loc_id,namelen,dset_name,width,height,buf) & @@ -74,12 +74,12 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: width ! width of image - INTEGER(hsize_t), INTENT(in) :: height ! height of image - INTEGER , INTENT(in), DIMENSION(*) :: buf ! buffer + INTEGER(hid_t), INTENT(in) :: loc_id + INTEGER(size_t) :: namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name + INTEGER(hsize_t), INTENT(in) :: width + INTEGER(hsize_t), INTENT(in) :: height + INTEGER , INTENT(in), DIMENSION(*) :: buf END FUNCTION h5immake_image_8bit_c END INTERFACE @@ -88,22 +88,16 @@ CONTAINS END SUBROUTINE h5immake_image_8bit_f -!------------------------------------------------------------------------- -! Function: h5imread_image_f -! -! Purpose: Reads image data from disk. -! -! Return: Success: 0, Failure: -1 -! -! Programmer: Pedro Vicente -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- +!> +!! \ingroup FH5IM +!! +!! \brief Reads image data from disk. +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param dset_name The name of the dataset to create. +!! \param buf Buffer with data to store the image. +!! \param errcode \fortran_error +!! SUBROUTINE h5imread_image_f(loc_id,& dset_name,& buf,& @@ -111,11 +105,11 @@ CONTAINS IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(len=*), INTENT(in) :: dset_name + INTEGER, INTENT(inout), DIMENSION(*) :: buf + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTERFACE INTEGER FUNCTION h5imread_image_c(loc_id,namelen,dset_name,buf) & @@ -123,10 +117,10 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer + INTEGER(hid_t), INTENT(in) :: loc_id + INTEGER(size_t) :: namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name + INTEGER, INTENT(inout), DIMENSION(*) :: buf END FUNCTION h5imread_image_c END INTERFACE @@ -135,42 +129,32 @@ CONTAINS END SUBROUTINE h5imread_image_f -!------------------------------------------------------------------------- -! Function: h5immake_image_24bit_f -! -! Purpose: Creates and writes an image a 24 bit image -! -! Return: Success: 0, Failure: -1 -! -! Programmer: Pedro Vicente -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5immake_image_24bit_f(loc_id,& - dset_name,& - width,& - height,& - il,& - buf,& - errcode ) +!> +!! \ingroup FH5IM +!! +!! \brief Creates and writes an image a 24 bit image. +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param dset_name The name of the dataset to create. +!! \param width The width of the image. +!! \param height The height of the image. +!! \param il String defining the interlace mode. +!! \param buf Buffer with data to be written to the dataset. +!! \param errcode \fortran_error +!! + SUBROUTINE h5immake_image_24bit_f(loc_id, dset_name, width, height, il, buf, errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: width ! width of image - INTEGER(hsize_t), INTENT(in) :: height ! height of image - CHARACTER(len=*), INTENT(in) :: il ! interlace - INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: ILEN ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(len=*), INTENT(in) :: dset_name + INTEGER(hsize_t), INTENT(in) :: width + INTEGER(hsize_t), INTENT(in) :: height + CHARACTER(len=*), INTENT(in) :: il + INTEGER, INTENT(in), DIMENSION(*) :: buf + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length INTERFACE INTEGER FUNCTION h5immake_image_24bit_c(loc_id,namelen,dset_name,ILEN,il,width,height,buf) & @@ -178,14 +162,14 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: width ! width of image - INTEGER(hsize_t), INTENT(in) :: height ! height of image - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: il ! interlace - INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: ILEN ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name + INTEGER(hsize_t), INTENT(in) :: width + INTEGER(hsize_t), INTENT(in) :: height + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: il + INTEGER, INTENT(in), DIMENSION(*) :: buf + INTEGER(size_t) :: namelen + INTEGER(size_t) :: ILEN END FUNCTION h5immake_image_24bit_c END INTERFACE @@ -196,24 +180,20 @@ CONTAINS END SUBROUTINE h5immake_image_24bit_f -!------------------------------------------------------------------------- -! Function: h5imget_image_info_f -! -! Purpose: Gets information about an image dataset (dimensions, interlace mode -! and number of associated palettes). -! -! Return: Success: 0, Failure: -1 -! -! Programmer: Pedro Vicente -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - +!> +!! \ingroup FH5IM +!! +!! \brief Gets information about an image dataset (dimensions, interlace mode and number of associated palettes). +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param dset_name The name of the dataset. +!! \param width The width of the image. +!! \param height The height of the image. +!! \param planes The number of color planes of the image. +!! \param interlace The interlace mode of the image. +!! \param npals The number of palettes associated to the image. +!! \param errcode \fortran_error +!! SUBROUTINE h5imget_image_info_f(loc_id,& dset_name,& width,& @@ -225,16 +205,16 @@ CONTAINS IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout) :: width ! width of image - INTEGER(hsize_t), INTENT(inout) :: height ! height of image - INTEGER(hsize_t), INTENT(inout) :: planes ! color planes - INTEGER(hsize_t), INTENT(inout) :: npals ! palettes - CHARACTER(len=*), INTENT(inout) :: interlace ! interlace - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: ILEN ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(len=*), INTENT(in) :: dset_name + INTEGER(hsize_t), INTENT(inout) :: width + INTEGER(hsize_t), INTENT(inout) :: height + INTEGER(hsize_t), INTENT(inout) :: planes + INTEGER(hsize_t), INTENT(inout) :: npals + CHARACTER(len=*), INTENT(inout) :: interlace + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length INTERFACE INTEGER FUNCTION h5imget_image_info_c(loc_id,namelen,dset_name,width,height,planes,npals,ILEN,interlace) & @@ -242,15 +222,15 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout) :: width ! width of image - INTEGER(hsize_t), INTENT(inout) :: height ! height of image - INTEGER(hsize_t), INTENT(inout) :: planes ! color planes - INTEGER(hsize_t), INTENT(inout) :: npals ! palettes - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: interlace ! interlace - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: ILEN ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name + INTEGER(hsize_t), INTENT(inout) :: width + INTEGER(hsize_t), INTENT(inout) :: height + INTEGER(hsize_t), INTENT(inout) :: planes + INTEGER(hsize_t), INTENT(inout) :: npals + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: interlace + INTEGER(size_t) :: namelen + INTEGER(size_t) :: ILEN END FUNCTION h5imget_image_info_c END INTERFACE @@ -260,32 +240,22 @@ CONTAINS END SUBROUTINE h5imget_image_info_f -!------------------------------------------------------------------------- -! Function: h5imis_image_f -! -! Purpose: Inquires if a dataset is an image -! -! Return: Success: 0, Failure: -1 -! -! Programmer: Pedro Vicente -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - INTEGER FUNCTION h5imis_image_f(loc_id,& - dset_name) +!> +!! \ingroup FH5IM +!! +!! \brief Inquires if a dataset is an image. +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param dset_name The name of the dataset. +!! + INTEGER FUNCTION h5imis_image_f(loc_id, dset_name) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(len=*), INTENT(in) :: dset_name + INTEGER :: errcode ! error code + INTEGER(size_t) :: namelen ! name length INTERFACE INTEGER FUNCTION h5imis_image_c(loc_id,namelen,dset_name) & @@ -293,9 +263,9 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: loc_id + INTEGER(size_t) :: namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name END FUNCTION h5imis_image_c END INTERFACE @@ -305,339 +275,285 @@ CONTAINS END FUNCTION h5imis_image_f - -!------------------------------------------------------------------------- -! Function: h5immake_palette_f -! -! Purpose: Creates and writes a palette -! -! Return: Success: 0, Failure: -1 -! -! Programmer: Pedro Vicente -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - +!> +!! \ingroup FH5IM +!! +!! \brief Creates and writes a palette +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param pal_name The name of the palette. +!! \param pal_dims An array of the size of the palette dimensions. +!! \param pal_data Buffer with data to be written to the dataset. +!! \param errcode \fortran_error +!! SUBROUTINE h5immake_palette_f(loc_id,& - dset_name,& + pal_name,& pal_dims,& - buf,& + pal_data,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in), DIMENSION(*) :: pal_dims ! dimensions - INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(len=*), INTENT(in) :: pal_name + INTEGER(hsize_t), INTENT(in), DIMENSION(*) :: pal_dims + INTEGER, INTENT(in), DIMENSION(*) :: pal_data + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5immake_palette_c(loc_id,namelen,dset_name,pal_dims,buf) & + INTEGER FUNCTION h5immake_palette_c(loc_id,namelen,pal_name,pal_dims,pal_data) & BIND(C,NAME='h5immake_palette_c') IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in), DIMENSION(*) :: pal_dims ! dimensions - INTEGER, INTENT(in), DIMENSION(*) :: buf ! buffer + INTEGER(hid_t), INTENT(in) :: loc_id + INTEGER(size_t) :: namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: pal_name + INTEGER(hsize_t), INTENT(in), DIMENSION(*) :: pal_dims + INTEGER, INTENT(in), DIMENSION(*) :: pal_data END FUNCTION h5immake_palette_c END INTERFACE - namelen = LEN(dset_name) - errcode = h5immake_palette_c(loc_id,namelen,dset_name,pal_dims,buf) + namelen = LEN(pal_name) + errcode = h5immake_palette_c(loc_id,namelen,pal_name,pal_dims,pal_data) END SUBROUTINE h5immake_palette_f -!------------------------------------------------------------------------- -! Function: h5imlink_palette_f -! -! Purpose: This function attaches a palette to an existing image dataset -! -! Return: Success: 0, Failure: -1 -! -! Programmer: Pedro Vicente -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - +!> +!! \ingroup FH5IM +!! +!! \brief This function attaches a palette to an existing image dataset. +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param image_name The name of the dataset to attach the palette to. +!! \param pal_name The name of the palette. +!! \param errcode \fortran_error +!! SUBROUTINE h5imlink_palette_f(loc_id,& - dset_name,& + image_name,& pal_name,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: pal_name ! palette name - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: ILEN ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(len=*), INTENT(in) :: image_name + CHARACTER(len=*), INTENT(in) :: pal_name + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length INTERFACE - INTEGER FUNCTION h5imlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) & + INTEGER FUNCTION h5imlink_palette_c(loc_id,namelen,image_name,ILEN,pal_name) & BIND(C,NAME='h5imlink_palette_c') IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: pal_name ! palette name - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: ILEN ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: image_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: pal_name + INTEGER(size_t) :: namelen + INTEGER(size_t) :: ILEN END FUNCTION h5imlink_palette_c END INTERFACE - namelen = LEN(dset_name) + namelen = LEN(image_name) ILEN = LEN(pal_name) - errcode = h5imlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) + errcode = h5imlink_palette_c(loc_id,namelen,image_name,ILEN,pal_name) END SUBROUTINE h5imlink_palette_f - -!------------------------------------------------------------------------- -! Function: h5imunlink_palette_f -! -! Purpose: This function dettaches a palette to an existing image dataset -! -! Return: Success: 0, Failure: -1 -! -! Programmer: Pedro Vicente -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- +!> +!! \ingroup FH5IM +!! +!! \brief This function dettaches a palette to an existing image dataset. +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param image_name The name of the image dataset. +!! \param pal_name The name of the palette. +!! \param errcode \fortran_error SUBROUTINE h5imunlink_palette_f(loc_id,& - dset_name,& + image_name,& pal_name,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(len=*), INTENT(in) :: pal_name ! palette name - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: ILEN ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(len=*), INTENT(in) :: image_name + CHARACTER(len=*), INTENT(in) :: pal_name + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: ILEN ! name length INTERFACE - INTEGER FUNCTION h5imunlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) & + INTEGER FUNCTION h5imunlink_palette_c(loc_id,namelen,image_name,ILEN,pal_name) & BIND(C,NAME='h5imunlink_palette_c') IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: pal_name ! palette name - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: ILEN ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: image_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: pal_name + INTEGER(size_t) :: namelen + INTEGER(size_t) :: ILEN END FUNCTION h5imunlink_palette_c END INTERFACE - namelen = LEN(dset_name) + namelen = LEN(image_name) ILEN = LEN(pal_name) - errcode = h5imunlink_palette_c(loc_id,namelen,dset_name,ILEN,pal_name) + errcode = h5imunlink_palette_c(loc_id,namelen,image_name,ILEN,pal_name) END SUBROUTINE h5imunlink_palette_f -!------------------------------------------------------------------------- -! Function: h5imget_npalettes_f -! -! Purpose: Gets the number of palettes associated to an image -! -! Return: Success: 0, Failure: -1 -! -! Programmer: Pedro Vicente -! -! Date: October 05, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - +!> +!! \ingroup FH5IM +!! +!! \brief Gets the number of palettes associated to an image. +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param image_name The name of the image dataset. +!! \param npals The number of palettes. +!! \param errcode \fortran_error +!! SUBROUTINE h5imget_npalettes_f(loc_id,& - dset_name,& + image_name,& npals,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout) :: npals ! palettes - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(len=*), INTENT(in) :: image_name + INTEGER(hsize_t), INTENT(inout) :: npals + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5imget_npalettes_c(loc_id,namelen,dset_name,npals) & + INTEGER FUNCTION h5imget_npalettes_c(loc_id,namelen,image_name,npals) & BIND(C,NAME='h5imget_npalettes_c') IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout) :: npals ! palettes - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: image_name + INTEGER(hsize_t), INTENT(inout) :: npals + INTEGER(size_t) :: namelen END FUNCTION h5imget_npalettes_c END INTERFACE - namelen = LEN(dset_name) - errcode = h5imget_npalettes_c(loc_id,namelen,dset_name,npals) + namelen = LEN(image_name) + errcode = h5imget_npalettes_c(loc_id,namelen,image_name,npals) END SUBROUTINE h5imget_npalettes_f - - -!------------------------------------------------------------------------- -! Function: h5imget_palette_info_f -! -! Purpose: Get palette information -! -! Return: Success: 0, Failure: -1 -! -! Programmer: Pedro Vicente -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - +!> +!! \ingroup FH5IM +!! +!! \brief Gets information about a palette dataset (dimensions). +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param image_name The name of the image dataset. +!! \param pal_number The zero based index that identifies the palette. +!! \param pal_dims The dimensions of the palette dataset. +!! \param errcode \fortran_error +!! SUBROUTINE h5imget_palette_info_f(loc_id,& - dset_name,& + image_name,& pal_number,& - dims,& + pal_dims,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: pal_number ! palette number - INTEGER(hsize_t), DIMENSION(*), INTENT(inout) :: dims ! dimensions - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(len=*), INTENT(in) :: image_name + INTEGER, INTENT(in) :: pal_number + INTEGER(hsize_t), DIMENSION(*), INTENT(inout) :: pal_dims + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTERFACE - INTEGER FUNCTION h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims) & + INTEGER FUNCTION h5imget_palette_info_c(loc_id,namelen,image_name,pal_number,pal_dims) & BIND(C,NAME='h5imget_palette_info_c') IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: pal_number ! palette number - INTEGER(hsize_t), DIMENSION(*), INTENT(inout) :: dims ! dimensions - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: image_name + INTEGER, INTENT(in) :: pal_number + INTEGER(hsize_t), DIMENSION(*), INTENT(inout) :: pal_dims + INTEGER(size_t) :: namelen END FUNCTION h5imget_palette_info_c END INTERFACE - namelen = LEN(dset_name) - errcode = h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims) + namelen = LEN(image_name) + errcode = h5imget_palette_info_c(loc_id,namelen,image_name,pal_number,pal_dims) END SUBROUTINE h5imget_palette_info_f -!------------------------------------------------------------------------- -! Function: h5imget_palette_f -! -! Purpose: Reads palette -! -! Return: Success: 0, Failure: -1 -! -! Programmer: Pedro Vicente -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - +!> +!! \ingroup FH5IM +!! +!! \brief Gets the palette dataset +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param image_name The name of the image dataset. +!! \param pal_number The zero based index that identifies the palette. +!! \param pal_data The palette dataset. +!! \param errcode \fortran_error +!! SUBROUTINE h5imget_palette_f(loc_id,& - dset_name,& + image_name,& pal_number,& - buf,& + pal_data,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: pal_number ! palette number - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(len=*), INTENT(in) :: image_name + INTEGER, INTENT(in) :: pal_number + INTEGER, INTENT(inout), DIMENSION(*) :: pal_data + INTEGER :: errcode + INTEGER(size_t) :: namelen ! length of name buffer INTERFACE - INTEGER FUNCTION h5imget_palette_c(loc_id,namelen,dset_name,pal_number,buf) & + INTEGER FUNCTION h5imget_palette_c(loc_id,namelen,image_name,pal_number,pal_data) & BIND(C,NAME='h5imget_palette_c') IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: pal_number ! palette number - INTEGER, INTENT(inout), DIMENSION(*) :: buf ! buffer + INTEGER(hid_t), INTENT(in) :: loc_id + INTEGER(size_t) :: namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: image_name + INTEGER, INTENT(in) :: pal_number + INTEGER, INTENT(inout), DIMENSION(*) :: pal_data END FUNCTION h5imget_palette_c END INTERFACE - namelen = LEN(dset_name) - errcode = h5imget_palette_c(loc_id,namelen,dset_name,pal_number,buf) + namelen = LEN(image_name) + errcode = h5imget_palette_c(loc_id,namelen,image_name,pal_number,pal_data) END SUBROUTINE h5imget_palette_f - -!------------------------------------------------------------------------- -! Function: h5imis_palette_f -! -! Purpose: Inquires if a dataset is a palette -! -! Return: true, false, fail -! -! Programmer: Pedro Vicente -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - INTEGER FUNCTION h5imis_palette_f(loc_id,& - dset_name) +!> +!! \ingroup FH5IM +!! +!! \brief Inquires if a dataset is a palette. Returns zero (false), a positive (true) or a negative (failure) value. +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param dset_name The name of the dataset. +!! + INTEGER FUNCTION h5imis_palette_f(loc_id, dset_name) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(len=*), INTENT(in) :: dset_name + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTERFACE INTEGER FUNCTION h5imis_palette_c(loc_id,namelen,dset_name) & @@ -645,9 +561,9 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: loc_id + INTEGER(size_t) :: namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name END FUNCTION h5imis_palette_c END INTERFACE diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 index a4ab247..d2e9daf 100644 --- a/hl/fortran/src/H5LTff.F90 +++ b/hl/fortran/src/H5LTff.F90 @@ -1,3 +1,14 @@ +!> @defgroup FH5LT Fortran High-level H5LT Interface +!! +!! @see H5LT, C-API +!! +!! @see @ref H5LT_UG, User Guide +!! + +!> @ingroup H5LT +!! +!! @brief This module contains Fortran interfaces for H5LT. +! ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * @@ -10,12 +21,6 @@ ! If you do not have access to either file, you may request a copy from * ! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! -! This file contains FORTRAN interfaces for H5LT functions -! -! NOTES -! ! _____ __ __ _____ ____ _____ _______ _ _ _______ ! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| ! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** @@ -30,11 +35,18 @@ #include +#ifdef H5_DOXYGEN_FORTRAN +MODULE H5LT +#else MODULE H5LT_CONST +#endif + USE, INTRINSIC :: ISO_C_BINDING USE h5fortran_types USE hdf5 +#ifndef H5_DOXYGEN_FORTRAN + INTERFACE h5ltmake_dataset_f MODULE PROCEDURE h5ltmake_dataset_f_ptr END INTERFACE @@ -86,8 +98,7 @@ MODULE H5LT_CONST CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute INTEGER(size_t), INTENT(in) :: size ! size of attribute array TYPE(C_PTR), VALUE :: buf ! data buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dtype ! flag indicating the datatype of the - ! the buffer: + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dtype ! flag indicating the datatype of the the buffer: ! R=Real, D=DOUBLE, I=Integer, C=Character INTEGER(size_t) :: SizeOf_buf ! Sizeof the buf datatype END FUNCTION h5ltset_attribute_c @@ -105,76 +116,88 @@ MODULE H5LT_CONST CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute TYPE(C_PTR), VALUE :: buf ! data buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dtype ! flag indicating the datatype of the - ! the buffer: + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dtype ! flag indicating the datatype of the the buffer: ! R=Real, D=DOUBLE, I=Integer INTEGER(size_t), INTENT(in) :: SizeOf_buf ! Sizeof the buf data type END FUNCTION h5ltget_attribute_c END INTERFACE +#endif + CONTAINS - !------------------------------------------------------------------------- - ! Make/Read dataset functions - !------------------------------------------------------------------------- !------------------------------------------------------------------------- - ! Function(s): h5ltmake_dataset_f_ptr - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: APR 29, 2015 - ! - ! Comments: - ! - ! Modifications: - ! + ! Make/Read dataset functions !------------------------------------------------------------------------- - SUBROUTINE h5ltmake_dataset_f_ptr(loc_id,& +#ifdef H5_DOXYGEN_FORTRAN + !> + !! \ingroup FH5LT + !! + !! \brief Creates and writes a dataset of a type \p type_id. + !! + !! \note \fortran_approved + !! + !! \param loc_id Location identifier. The identifier may be that of a file or group. + !! \param dset_name The name of the dataset to create. + !! \param rank Number of dimensions of dataspace. + !! \param dims An array of the size of each dimension. + !! \param type_id Identifier of the datatype to use when creating the dataset. + !! \param buf Buffer with data to be written to the dataset. + !! \param errcode \fortran_error + !! + SUBROUTINE h5ltmake_dataset_f(& +#else + SUBROUTINE h5ltmake_dataset_f_ptr( & +#endif + loc_id,& dset_name,& rank,& dims,& type_id,& buf,& - errcode ) + errcode) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - TYPE(C_PTR) :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + 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 + INTEGER(size_t) :: namelen ! name length namelen = LEN(dset_name) errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) +#ifdef H5_DOXYGEN_FORTRAN + END SUBROUTINE h5ltmake_dataset_f +#else END SUBROUTINE h5ltmake_dataset_f_ptr +#endif - !------------------------------------------------------------------------- - ! Function(s): h5ltmake_dataset_f_int(1-7) - ! - ! Purpose: Creates and writes a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: Pedro Vicente - ! - ! Date: September 1, 2004 - ! - ! Comments: - ! - ! Modifications: Changed to passing C_PTR. - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltmake_dataset_f_int1(loc_id,& +#ifdef H5_DOXYGEN_FORTRAN + !> + !! \ingroup FH5LT + !! + !! \brief Creates and writes a dataset of a type \p type_id. + !! + !! \note \fortran_obsolete + !! + !! \param loc_id Location identifier. The identifier may be that of a file or group. + !! \param dset_name The name of the dataset to create. + !! \param rank Number of dimensions of dataspace. + !! \param dims An array of the size of each dimension. Limited to seven dimensions. + !! \param type_id Identifier of the datatype to use when creating the dataset. + !! \param buf Buffer with data to be written to the dataset. + !! \param errcode \fortran_error + !! + SUBROUTINE h5ltmake_dataset_f(& +#else + SUBROUTINE h5ltmake_dataset_f_int1(& +#endif + loc_id,& dset_name,& rank,& dims,& @@ -183,20 +206,26 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + 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 +#ifdef H5_DOXYGEN_FORTRAN + TYPE(TYPE), INTENT(in), DIMENSION(*,*,...) :: buf +#else + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf +#endif + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) - +#ifdef H5_DOXYGEN_FORTRAN + END SUBROUTINE h5ltmake_dataset_f +#else END SUBROUTINE h5ltmake_dataset_f_int1 SUBROUTINE h5ltmake_dataset_f_int2(loc_id,& @@ -208,15 +237,15 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(len=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + 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 + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! data buffer + DIMENSION(dims(1),dims(2)), TARGET :: buf ! data buffer TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1)) @@ -235,15 +264,15 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + 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 + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! data buffer TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1)) @@ -257,15 +286,15 @@ CONTAINS type_id, buf, errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + 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 + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! data buffer TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1)) @@ -279,15 +308,15 @@ CONTAINS type_id, buf, errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + 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 + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! data buffer TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1,1)) @@ -301,15 +330,15 @@ CONTAINS type_id, buf, errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + 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 + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! data buffer + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! data buffer TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1,1,1,1,1,1)) @@ -323,13 +352,13 @@ CONTAINS type_id, buf, errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + 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 + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! data buffer TYPE(C_PTR) :: f_ptr @@ -340,62 +369,68 @@ CONTAINS errcode = h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,f_ptr) END SUBROUTINE h5ltmake_dataset_f_int7 +#endif - - !------------------------------------------------------------------------- - ! Function(s): h5ltread_dataset_f_ptr - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: Apr 29, 2015 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_ptr(loc_id,& +#ifdef H5_DOXYGEN_FORTRAN + !> + !! \ingroup FH5LT + !! + !! \brief Reads a dataset of a type \p type_id. + !! + !! \note \fortran_approved + !! + !! \param loc_id Location identifier. The identifier may be that of a file or group. + !! \param dset_name The name of the dataset to create. + !! \param type_id Identifier of the datatype to use when creating the dataset. + !! \param buf Buffer with data to be written to the dataset. + !! \param errcode \fortran_error + !! + SUBROUTINE h5ltread_dataset_f(& +#else + SUBROUTINE h5ltread_dataset_f_ptr(& +#endif + loc_id,& dset_name,& type_id,& buf,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - TYPE(C_PTR) :: buf ! data buffer - INTEGER :: errcode ! error code + 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 INTEGER(size_t) :: namelen namelen = LEN(dset_name) errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id, buf) - +#ifdef H5_DOXYGEN_FORTRAN + END SUBROUTINE h5ltread_dataset_f +#else END SUBROUTINE h5ltread_dataset_f_ptr +#endif - !------------------------------------------------------------------------- - ! Function(s): h5ltread_dataset_f_int(1-7) - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: Pedro Vicente - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - - SUBROUTINE h5ltread_dataset_f_int1(loc_id,& +#ifdef H5_DOXYGEN_FORTRAN + !> + !! \ingroup FH5LT + !! + !! \brief Reads a dataset of a type \p type_id. + !! + !! \note \fortran_obsolete + !! + !! \param loc_id Location identifier. The identifier may be that of a file or group. + !! \param dset_name The name of the dataset to create. + !! \param type_id Identifier of the datatype to use when creating the dataset. + !! \param buf Buffer with data to be written to the dataset. + !! \param dims An array of the size of each dimension. Limited to seven dimensions. + !! \param errcode \fortran_error + !! + SUBROUTINE h5ltread_dataset_f(& +#else + SUBROUTINE h5ltread_dataset_f_int1(& +#endif + loc_id,& dset_name,& type_id,& buf,& @@ -403,12 +438,16 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(inout), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hid_t), INTENT(in) :: type_id + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims +#ifdef H5_DOXYGEN_FORTRAN + TYPE(TYPE), INTENT(inout), DIMENSION(*,*,...) :: buf +#else + INTEGER, INTENT(inout), DIMENSION(*), TARGET :: buf +#endif + INTEGER :: errcode INTEGER(size_t) :: namelen TYPE(C_PTR) :: f_ptr @@ -417,25 +456,11 @@ CONTAINS namelen = LEN(dset_name) errcode = h5ltread_dataset_c(loc_id,namelen,dset_name,type_id,f_ptr) +#ifdef H5_DOXYGEN_FORTRAN + END SUBROUTINE h5ltread_dataset_f +#else END SUBROUTINE h5ltread_dataset_f_int1 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int2 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: Pedro Vicente - ! - ! Date: September 22, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_int2(loc_id,& dset_name,& type_id,& @@ -444,12 +469,12 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hid_t), INTENT(in) :: type_id + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -469,12 +494,12 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hid_t), INTENT(in) :: type_id + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -490,12 +515,12 @@ CONTAINS dims, errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hid_t), INTENT(in) :: type_id + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -511,12 +536,12 @@ CONTAINS dims, errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hid_t), INTENT(in) :: type_id + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -528,33 +553,16 @@ CONTAINS END SUBROUTINE h5ltread_dataset_f_int5 - !------------------------------------------------------------------------- - ! Function: h5ltread_dataset_f_int6 - ! - ! Purpose: Read a dataset of a type TYPE_ID - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: March 12, 2011 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - SUBROUTINE h5ltread_dataset_f_int6(loc_id, dset_name, type_id, buf, & dims, errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hid_t), INTENT(in) :: type_id + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -570,12 +578,12 @@ CONTAINS dims, errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hid_t), INTENT(in) :: type_id ! datatype identifier - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hid_t), INTENT(in) :: type_id + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -587,11 +595,10 @@ CONTAINS END SUBROUTINE h5ltread_dataset_f_int7 - !------------------------------------------------------------------------- ! Function: h5ltmake_dataset_int_f_1 ! - ! Purpose: Creates and writes a dataset of H5T_NATIVE_INT type + !! \brief Creates and writes a dataset of H5T_NATIVE_INT type ! ! Return: Success: 0, Failure: -1 ! @@ -613,13 +620,13 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + 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, INTENT(in), DIMENSION(*), TARGET :: buf + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1)) @@ -637,12 +644,12 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + 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 :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -662,12 +669,12 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + 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 :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -683,12 +690,12 @@ CONTAINS buf, errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + 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 :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -704,12 +711,12 @@ CONTAINS buf, errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + 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 :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -725,12 +732,12 @@ CONTAINS buf, errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + 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 :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -746,12 +753,12 @@ CONTAINS buf, errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: rank ! rank - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + 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 :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(in), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -766,7 +773,7 @@ CONTAINS !------------------------------------------------------------------------- ! Function(s): h5ltread_dataset_int_f_(1-7) ! - ! Purpose: Read a dataset + !! \brief Read a dataset ! ! Return: Success: 0, Failure: -1 ! @@ -787,11 +794,11 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & DIMENSION(dims(1)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -810,11 +817,11 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -833,11 +840,11 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -852,11 +859,11 @@ CONTAINS SUBROUTINE h5ltread_dataset_int_f_4(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -871,11 +878,11 @@ CONTAINS SUBROUTINE h5ltread_dataset_int_f_5(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -890,11 +897,11 @@ CONTAINS SUBROUTINE h5ltread_dataset_int_f_6(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -909,11 +916,11 @@ CONTAINS SUBROUTINE h5ltread_dataset_int_f_7(loc_id, dset_name, buf, dims, errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims ! size of the buffer buf - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTEGER, INTENT(inout), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf TYPE(C_PTR) :: f_ptr @@ -929,7 +936,7 @@ CONTAINS !------------------------------------------------------------------------- ! Function: h5ltmake_dataset_string_f ! - ! Purpose: Creates and writes a dataset + !! \brief Creates and writes a dataset ! ! Return: Success: 0, Failure: -1 ! @@ -949,10 +956,10 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: buf ! data buffer - INTEGER :: errcode ! error code + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + CHARACTER(LEN=*), INTENT(in) :: buf + INTEGER :: errcode INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: buflen ! buffer length @@ -962,11 +969,11 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: loc_id INTEGER(size_t) :: namelen ! length of name buffer INTEGER(size_t) :: buflen ! length of data buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: buf ! data buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: buf END FUNCTION h5ltmake_dataset_string_c END INTERFACE @@ -979,7 +986,7 @@ CONTAINS !------------------------------------------------------------------------- ! Function: h5ltread_dataset_string_f ! - ! Purpose: Read a dataset + !! \brief Read a dataset ! ! Return: Success: 0, Failure: -1 ! @@ -999,10 +1006,10 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(inout) :: buf ! data buffer - INTEGER :: errcode ! error code + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + CHARACTER(LEN=*), INTENT(inout) :: buf + INTEGER :: errcode INTEGER(size_t) :: namelen ! name length INTERFACE @@ -1011,10 +1018,10 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier + INTEGER(hid_t), INTENT(in) :: loc_id INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: buf ! data buffer + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: buf END FUNCTION h5ltread_dataset_string_c END INTERFACE @@ -1023,49 +1030,51 @@ CONTAINS END SUBROUTINE h5ltread_dataset_string_f - !------------------------------------------------------------------------- - ! Make/Read attribute functions - !------------------------------------------------------------------------- +#endif !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: May 4, 2015 - ! - ! Comments: - ! - ! Modifications: - ! + ! Make/Read attribute functions !------------------------------------------------------------------------- + !> + !! \ingroup FH5LT + !! + !! \brief 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. + !! + !! \note \fortran_approved + !! + !! \param loc_id Location identifier. The identifier may be that of a file or group. + !! \param dset_name The name of the dataset to create. + !! \param attr_name The name of the attribute to create. + !! \param buf The data buffer. + !! \param buf_type Valid data types are CHARACTER, INTEGER or REAL. + !! NOTE: only the first character matters and is case insensitive. + !! \param SizeOf_buf_type Size of \p buf's data type, in bytes. + !! \param size Size of attribute array. + !! \param errcode \fortran_error + !! SUBROUTINE h5ltset_attribute_f(loc_id,& dset_name,& attr_name,& buf,& - buf_type, SizeOf_buf_type, & + buf_type,& + SizeOf_buf_type, & size,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - TYPE(C_PTR) :: buf ! data buffer - CHARACTER(LEN=*), INTENT(in) :: buf_type ! valid data types are: - ! CHARACTER, INTEGER or REAL - ! NOTE: only the first character matters and is case insensitive - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - INTEGER(size_t), INTENT(in) :: SizeOf_buf_type ! size of buf's data type - INTEGER, INTENT(out) :: errcode ! error code - - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length + 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) :: size + INTEGER(size_t), INTENT(in) :: SizeOf_buf_type + INTEGER, INTENT(out) :: errcode + + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length CHARACTER(KIND=C_CHAR) :: buf_type_uppercase namelen = LEN(dset_name) @@ -1085,39 +1094,37 @@ CONTAINS END SUBROUTINE h5ltset_attribute_f - !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_int_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: Pedro Vicente - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - + !> + !! \ingroup FH5LT + !! + !! \brief Creates and writes an attribute. + !! + !! \note \fortran_obsolete + !! + !! \param loc_id Identifier of the object (dataset or group) to create the attribute within + !! \param obj_name The name of the object to attach the attribute. + !! \param attr_name The attribute name. + !! \param buf Buffer with data to be written to the attribute. + !! \param size The size of the 1D array (one in the case of a scalar attribute). + !! This value is used by H5Screate_simple() to create the dataspace. + !! \param errcode \fortran_error + !! SUBROUTINE h5ltset_attribute_int_f(loc_id,& - dset_name,& + obj_name,& attr_name,& buf,& size,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - INTEGER :: errcode ! error code - INTEGER, DIMENSION(*), TARGET :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: obj_name + CHARACTER(LEN=*), INTENT(in) :: attr_name + INTEGER(size_t), INTENT(in) :: size + INTEGER :: errcode + INTEGER, DIMENSION(*), TARGET :: buf + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr INTEGER(size_t) :: SizeOf_buf_type @@ -1129,46 +1136,44 @@ CONTAINS SizeOf_buf_type = SIZEOF(buf(1)) #endif - namelen = LEN(dset_name) + namelen = LEN(obj_name) attrlen = LEN(attr_name) - errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& + errcode = h5ltset_attribute_c(loc_id,namelen,obj_name,attrlen,attr_name,size,& f_ptr,'I'//C_NULL_CHAR,SizeOf_buf_type) END SUBROUTINE h5ltset_attribute_int_f - !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_float_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: Pedro Vicente - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - + !> + !! \ingroup FH5LT + !! + !! \brief Creates and writes an attribute. + !! + !! \note \fortran_obsolete + !! + !! \param loc_id Identifier of the object (dataset or group) to create the attribute within + !! \param obj_name The name of the object to attach the attribute. + !! \param attr_name The attribute name. + !! \param buf Buffer with data to be written to the attribute. + !! \param size The size of the 1D array (one in the case of a scalar attribute). + !! This value is used by H5Screate_simple() to create the dataspace. + !! \param errcode \fortran_error + !! SUBROUTINE h5ltset_attribute_float_f(loc_id,& - dset_name,& + obj_name,& attr_name,& buf,& size,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - INTEGER :: errcode ! error code - REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: obj_name + CHARACTER(LEN=*), INTENT(in) :: attr_name + INTEGER(size_t), INTENT(in) :: size + INTEGER :: errcode + REAL(KIND=C_FLOAT), INTENT(in), DIMENSION(*), TARGET :: buf + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr INTEGER(size_t) :: SizeOf_buf_type @@ -1179,46 +1184,44 @@ CONTAINS SizeOf_buf_type = SIZEOF(buf(1)) #endif - namelen = LEN(dset_name) + namelen = LEN(obj_name) attrlen = LEN(attr_name) - errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& + errcode = h5ltset_attribute_c(loc_id,namelen,obj_name,attrlen,attr_name,size,& f_ptr,'R'//C_NULL_CHAR, SizeOf_buf_type) END SUBROUTINE h5ltset_attribute_float_f - !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_double_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: Pedro Vicente - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - + !> + !! \ingroup FH5LT + !! + !! \brief Creates and writes an attribute. + !! + !! \note \fortran_obsolete + !! + !! \param loc_id Identifier of the object (dataset or group) to create the attribute within + !! \param obj_name The name of the object to attach the attribute. + !! \param attr_name The attribute name. + !! \param buf Buffer with data to be written to the attribute. + !! \param size The size of the 1D array (one in the case of a scalar attribute). + !! This value is used by H5Screate_simple() to create the dataspace. + !! \param errcode \fortran_error + !! SUBROUTINE h5ltset_attribute_double_f(loc_id,& - dset_name,& + obj_name,& attr_name,& buf,& size,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(size_t), INTENT(in) :: size ! size of attribute array - INTEGER :: errcode ! error code - REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: obj_name + CHARACTER(LEN=*), INTENT(in) :: attr_name + INTEGER(size_t), INTENT(in) :: size + INTEGER :: errcode + REAL(KIND=C_DOUBLE), INTENT(in), DIMENSION(*), TARGET :: buf + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr INTEGER(size_t) :: SizeOf_buf_type @@ -1230,46 +1233,41 @@ CONTAINS SizeOf_buf_type = SIZEOF(buf(1)) #endif - namelen = LEN(dset_name) + namelen = LEN(obj_name) attrlen = LEN(attr_name) - errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,size,& + errcode = h5ltset_attribute_c(loc_id,namelen,obj_name,attrlen,attr_name,size,& f_ptr,'R'//C_NULL_CHAR,SizeOf_buf_type) END SUBROUTINE h5ltset_attribute_double_f - - !------------------------------------------------------------------------- - ! Function: h5ltset_attribute_string_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: Pedro Vicente - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - + !> + !! \ingroup FH5LT + !! + !! \brief Creates and writes an attribute. + !! + !! \note \fortran_obsolete + !! + !! \param loc_id Identifier of the object (dataset or group) to create the attribute within + !! \param obj_name The name of the object to attach the attribute. + !! \param attr_name The attribute name. + !! \param buf Buffer with data to be written to the attribute. + !! \param errcode \fortran_error + !! SUBROUTINE h5ltset_attribute_string_f(loc_id,& - dset_name,& + obj_name,& attr_name,& buf,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code - CHARACTER(LEN=*), DIMENSION(*), INTENT(in), TARGET :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - INTEGER(size_t) :: buflen ! data buffer length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: obj_name + CHARACTER(LEN=*), INTENT(in) :: attr_name + INTEGER :: errcode + CHARACTER(LEN=*), DIMENSION(*), INTENT(in), TARGET :: buf + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + INTEGER(size_t) :: buflen ! data buffer length TYPE(C_PTR) :: f_ptr INTEGER(size_t) :: SizeOf_buf_type @@ -1281,52 +1279,48 @@ CONTAINS SizeOf_buf_type = SIZEOF(buf(1:1)(1:1)) #endif - namelen = LEN(dset_name) + namelen = LEN(obj_name) attrlen = LEN(attr_name) buflen = LEN(buf) - errcode = h5ltset_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,buflen,& + errcode = h5ltset_attribute_c(loc_id,namelen,obj_name,attrlen,attr_name,buflen,& f_ptr,'C'//C_NULL_CHAR, SizeOf_buf_type) END SUBROUTINE h5ltset_attribute_string_f - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: Apr 29, 2015 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - + !> + !! \ingroup FH5LT + !! + !! \brief Reads an attribute from disk. + !! + !! \note \fortran_approved + !! + !! \param loc_id Location identifier. The identifier may be that of a file or group. + !! \param obj_name The name of the object that the attribute is attached to. + !! \param attr_name The name of the attribute to create. + !! \param buf The data buffer. + !! \param buf_type Valid data types are CHARACTER, INTEGER or REAL. + !! NOTE: only the first character matters and is case insensitive. + !! \param SizeOf_buf_type Size of \p buf's data type, in bytes. + !! \param errcode \fortran_error + !! SUBROUTINE h5ltget_attribute_f(loc_id,& - dset_name,& + obj_name,& attr_name,& buf, buf_type, SizeOf_buf_type, & errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - TYPE(C_PTR) :: buf ! data buffer - CHARACTER(LEN=*), INTENT(in) :: buf_type ! valid data types are: - ! CHARACTER, INTEGER or REAL - ! NOTE: only the first character matters and is case insensitive - INTEGER(size_t), INTENT(in) :: SizeOf_buf_type ! size of buf's data type - INTEGER, INTENT(out) :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! attr length + 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 + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! attr length CHARACTER(KIND=C_CHAR) :: buf_type_uppercase - namelen = LEN(dset_name) + namelen = LEN(obj_name) attrlen = LEN(attr_name) buf_type_uppercase(1:1) = buf_type(1:1) @@ -1337,43 +1331,38 @@ CONTAINS ELSE IF(buf_type_uppercase(1:1).EQ.'c')THEN buf_type_uppercase(1:1) = 'C' ENDIF - errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name, & + errcode = h5ltget_attribute_c(loc_id,namelen,obj_name,attrlen,attr_name, & buf, buf_type_uppercase//C_NULL_CHAR, SizeOf_buf_type) - END SUBROUTINE h5ltget_attribute_f - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_int_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: Pedro Vicente - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - + !> + !! \ingroup FH5LT + !! + !! \brief Reads an attribute from disk. + !! + !! \note \fortran_obsolete + !! + !! \param loc_id Identifier of the object (dataset or group) to create the attribute within + !! \param obj_name The name of the object that the attribute is attached to. + !! \param attr_name The attribute name. + !! \param buf Buffer with data to be written to the attribute. + !! \param errcode \fortran_error + !! SUBROUTINE h5ltget_attribute_int_f(loc_id,& - dset_name,& + obj_name,& attr_name,& buf,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code - INTEGER, INTENT(inout), DIMENSION(*), TARGET :: buf! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: obj_name + CHARACTER(LEN=*), INTENT(in) :: attr_name + INTEGER :: errcode + INTEGER, INTENT(inout), DIMENSION(*), TARGET :: buf + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr INTEGER(size_t) :: SizeOf_buf @@ -1384,43 +1373,39 @@ CONTAINS #else SizeOf_buf = SIZEOF(buf(1)) #endif - namelen = LEN(dset_name) + namelen = LEN(obj_name) attrlen = LEN(attr_name) - errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'I'//C_NULL_CHAR, SizeOf_buf) + errcode = h5ltget_attribute_c(loc_id,namelen,obj_name,attrlen,attr_name,f_ptr,'I'//C_NULL_CHAR, SizeOf_buf) END SUBROUTINE h5ltget_attribute_int_f - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_float_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: Pedro Vicente - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - + !> + !! \ingroup FH5LT + !! + !! \brief Reads an attribute from disk. + !! + !! \note \fortran_obsolete + !! + !! \param loc_id Identifier of the object (dataset or group) to create the attribute within + !! \param obj_name The name of the object that the attribute is attached to. + !! \param attr_name The attribute name. + !! \param buf Buffer with data to be written to the attribute. + !! \param errcode \fortran_error + !! SUBROUTINE h5ltget_attribute_float_f(loc_id,& - dset_name,& + obj_name,& attr_name,& buf,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: obj_name + CHARACTER(LEN=*), INTENT(in) :: attr_name + INTEGER :: errcode REAL(KIND=C_FLOAT), INTENT(inout), DIMENSION(*), TARGET :: buf - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr INTEGER(size_t) :: SizeOf_buf @@ -1430,43 +1415,39 @@ CONTAINS #else SizeOf_buf = SIZEOF(buf(1)) #endif - namelen = LEN(dset_name) + namelen = LEN(obj_name) attrlen = LEN(attr_name) - errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'R'//C_NULL_CHAR, SizeOf_buf) + errcode = h5ltget_attribute_c(loc_id,namelen,obj_name,attrlen,attr_name,f_ptr,'R'//C_NULL_CHAR, SizeOf_buf) END SUBROUTINE h5ltget_attribute_float_f - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_c_double_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: Pedro Vicente - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - + !> + !! \ingroup FH5LT + !! + !! \brief Reads an attribute from disk. + !! + !! \note \fortran_obsolete + !! + !! \param loc_id Identifier of the object (dataset or group) to create the attribute within + !! \param obj_name The name of the object that the attribute is attached to. + !! \param attr_name The attribute name. + !! \param buf Buffer with data to be written to the attribute. + !! \param errcode \fortran_error + !! SUBROUTINE h5ltget_attribute_double_f(loc_id,& - dset_name,& + obj_name,& attr_name,& buf,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: obj_name + CHARACTER(LEN=*), INTENT(in) :: attr_name + INTEGER :: errcode REAL(KIND=C_DOUBLE),INTENT(inout),DIMENSION(*), TARGET :: buf - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length TYPE(C_PTR) :: f_ptr INTEGER(size_t) :: SizeOf_buf @@ -1477,66 +1458,62 @@ CONTAINS SizeOf_buf = SIZEOF(buf(1)) #endif - namelen = LEN(dset_name) + namelen = LEN(obj_name) attrlen = LEN(attr_name) - errcode = h5ltget_attribute_c(loc_id,namelen,dset_name,attrlen,attr_name,f_ptr,'R'//C_NULL_CHAR, SizeOf_buf) + errcode = h5ltget_attribute_c(loc_id,namelen,obj_name,attrlen,attr_name,f_ptr,'R'//C_NULL_CHAR, SizeOf_buf) END SUBROUTINE h5ltget_attribute_double_f - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_string_f - ! - ! Purpose: Reads an attribute named ATTR_NAME - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: Pedro Vicente - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - + !> + !! \ingroup FH5LT + !! + !! \brief Reads an attribute from disk. + !! + !! \note \fortran_obsolete + !! + !! \param loc_id Identifier of the object (dataset or group) to create the attribute within + !! \param obj_name The name of the object that the attribute is attached to. + !! \param attr_name The attribute name. + !! \param buf Buffer with data to be written to the attribute. + !! \param errcode \fortran_error + !! SUBROUTINE h5ltget_attribute_string_f(loc_id,& - dset_name,& + obj_name,& attr_name,& buf,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER :: errcode ! error code + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: obj_name + CHARACTER(LEN=*), INTENT(in) :: attr_name + INTEGER :: errcode CHARACTER(LEN=*), INTENT(inout) :: buf - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length - INTEGER(size_t) :: buf_size ! buf size + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length + INTEGER(size_t) :: buf_size ! buf size INTERFACE - INTEGER FUNCTION h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) & + INTEGER FUNCTION h5ltget_attribute_string_c(loc_id,namelen,obj_name,attrlen,attr_name,buf,buf_size) & BIND(C,NAME='h5ltget_attribute_string_c') IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: buf ! data buffer - INTEGER(size_t) :: buf_size ! data buffer size + INTEGER(hid_t), INTENT(in) :: loc_id + INTEGER(size_t) :: namelen + INTEGER(size_t) :: attrlen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: obj_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(inout) :: buf + INTEGER(size_t) :: buf_size END FUNCTION h5ltget_attribute_string_c END INTERFACE - namelen = LEN(dset_name) + namelen = LEN(obj_name) attrlen = LEN(attr_name) buf_size = LEN(buf) - errcode = h5ltget_attribute_string_c(loc_id,namelen,dset_name,attrlen,attr_name,buf,buf_size) + errcode = h5ltget_attribute_string_c(loc_id,namelen,obj_name,attrlen,attr_name,buf,buf_size) END SUBROUTINE h5ltget_attribute_string_f @@ -1544,34 +1521,27 @@ CONTAINS ! Query dataset functions !------------------------------------------------------------------------- - !------------------------------------------------------------------------- - ! Function: h5ltget_dataset_ndims_f - ! - ! Purpose: Gets the dimensionality of a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: Pedro Vicente - ! - ! Date: September 30, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - + !> + !! \ingroup FH5LT + !! + !! \brief Gets the dimensionality of a dataset. + !! + !! \param loc_id Identifier of the object to locate the dataset within. + !! \param dset_name The dataset name. + !! \param rank The dimensionality of the dataset. + !! \param errcode \fortran_error + !! SUBROUTINE h5ltget_dataset_ndims_f(loc_id,& dset_name,& rank,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(inout) :: rank ! rank - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER, INTENT(inout) :: rank + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTERFACE INTEGER FUNCTION h5ltget_dataset_ndims_c(loc_id,namelen,dset_name,rank) & @@ -1579,10 +1549,10 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(inout) :: rank ! rank + INTEGER(hid_t), INTENT(in) :: loc_id + INTEGER(size_t) :: namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name + INTEGER, INTENT(inout) :: rank END FUNCTION h5ltget_dataset_ndims_c END INTERFACE @@ -1591,33 +1561,24 @@ CONTAINS END SUBROUTINE h5ltget_dataset_ndims_f - - !------------------------------------------------------------------------- - ! Function: h5ltfind_dataset_f - ! - ! Purpose: Inquires if a dataset named dset_name exists attached - ! to the object loc_id. - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: Pedro Vicente - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - + !> + !! \ingroup FH5LT + !! + !! \brief Determines whether a dataset exists. + !! + !! \param loc_id Identifier of the group containing the dataset. + !! \param dset_name The dataset name. + !! + !! \result Returns zero (false), a positive (true) or a negative (failure) value. + !! INTEGER FUNCTION h5ltfind_dataset_f(loc_id,& dset_name) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTERFACE INTEGER FUNCTION h5ltfind_dataset_c(loc_id,namelen,dset_name) & @@ -1625,9 +1586,9 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: loc_id + INTEGER(size_t) :: namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name END FUNCTION h5ltfind_dataset_c END INTERFACE @@ -1637,23 +1598,18 @@ CONTAINS END FUNCTION h5ltfind_dataset_f - !------------------------------------------------------------------------- - ! Function: h5ltget_dataset_info_f - ! - ! Purpose: Gets information about a dataset - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: Pedro Vicente - ! - ! Date: September 30, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - + !> + !! \ingroup FH5LT + !! + !! \brief Retrieves information about a dataset. + !! + !! \param loc_id Identifier of the object to locate the dataset within. + !! \param dset_name The dataset name. + !! \param dims The dimensions of the dataset. + !! \param type_class The class identifier. See H5Tget_class_f() for a list of class types. + !! \param type_size The size of the datatype in bytes. + !! \param errcode \fortran_error + !! SUBROUTINE h5ltget_dataset_info_f(loc_id,& dset_name,& dims,& @@ -1662,13 +1618,13 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions - INTEGER, INTENT(inout) :: type_class ! type class - INTEGER(size_t), INTENT(inout) :: type_size ! type size - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + 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 + INTEGER(size_t) :: namelen ! name length INTERFACE INTEGER FUNCTION h5ltget_dataset_info_c(loc_id,namelen,dset_name,dims,type_class,type_size) & @@ -1676,12 +1632,12 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions - INTEGER, INTENT(inout) :: type_class ! type class - INTEGER(size_t), INTENT(inout) :: type_size ! type size + INTEGER(hid_t), INTENT(in) :: loc_id + INTEGER(size_t) :: namelen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name + INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims + INTEGER, INTENT(inout) :: type_class + INTEGER(size_t), INTENT(inout) :: type_size END FUNCTION h5ltget_dataset_info_c END INTERFACE @@ -1695,80 +1651,68 @@ CONTAINS ! Query attribute functions !------------------------------------------------------------------------- - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_ndims_f - ! - ! Purpose: Create and write an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: Pedro Vicente - ! - ! Date: October 05, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - + !> + !! \ingroup FH5LT + !! + !! \brief Gets the dimensionality of an attribute. + !! + !! \param loc_id Identifier of the object (dataset or group) to read the attribute from. + !! \param obj_name The name of the object that the attribute is attached to. + !! \param attr_name The attribute name. + !! \param rank The dimensionality of the attribute. + !! \param errcode \fortran_error + !! SUBROUTINE h5ltget_attribute_ndims_f(loc_id,& - dset_name,& + obj_name,& attr_name,& rank,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER, INTENT(inout) :: rank ! rank - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length + 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 + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length INTERFACE - INTEGER FUNCTION h5ltget_attribute_ndims_c(loc_id,namelen,dset_name,attrlen,attr_name,rank) & + INTEGER FUNCTION h5ltget_attribute_ndims_c(loc_id,namelen,obj_name,attrlen,attr_name,rank) & BIND(C,NAME='h5ltget_attribute_ndims_c') IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute - INTEGER, INTENT(inout) :: rank ! rank + INTEGER(hid_t), INTENT(in) :: loc_id + INTEGER(size_t) :: namelen + INTEGER(size_t) :: attrlen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: obj_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name + INTEGER, INTENT(inout) :: rank END FUNCTION h5ltget_attribute_ndims_c END INTERFACE - namelen = LEN(dset_name) + namelen = LEN(obj_name) attrlen = LEN(attr_name) - errcode = h5ltget_attribute_ndims_c(loc_id,namelen,dset_name,attrlen,attr_name,rank) + errcode = h5ltget_attribute_ndims_c(loc_id,namelen,obj_name,attrlen,attr_name,rank) END SUBROUTINE h5ltget_attribute_ndims_f - - !------------------------------------------------------------------------- - ! Function: h5ltget_attribute_info_f - ! - ! Purpose: Gets information about an attribute - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: Pedro Vicente - ! - ! Date: September 30, 2004 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - + !> + !! \ingroup FH5LT + !! + !! \brief Gets information about an attribute. + !! + !! \param loc_id Identifier of the object (dataset or group) to read the attribute from. + !! \param obj_name The name of the object that the attribute is attached to. + !! \param attr_name The attribute name. + !! \param dims The dimensions of the attribute. + !! \param type_class The class identifier. For a list of valid class types see: H5Tget_class_f(). + !! \param type_size The size of the datatype in bytes. + !! \param errcode \fortran_error + !! SUBROUTINE h5ltget_attribute_info_f(loc_id,& - dset_name,& + obj_name,& attr_name,& dims,& type_class,& @@ -1776,65 +1720,58 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions - INTEGER, INTENT(inout) :: type_class ! type class - INTEGER(size_t), INTENT(inout) :: type_size ! type size - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: attrlen ! name length + 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 + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: attrlen ! name length INTERFACE - INTEGER FUNCTION h5ltget_attribute_info_c(loc_id,namelen,dset_name,attrlen,attr_name,dims,type_class,type_size) & + INTEGER FUNCTION h5ltget_attribute_info_c(loc_id,namelen,obj_name,attrlen,attr_name,dims,type_class,type_size) & BIND(C,NAME='h5ltget_attribute_info_c') IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - INTEGER(size_t) :: namelen ! length of name buffer - INTEGER(size_t) :: attrlen ! length of attr name buffer - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name ! name of the attribute - INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims ! dimensions - INTEGER, INTENT(inout) :: type_class ! type class - INTEGER(size_t), INTENT(inout) :: type_size ! type size + INTEGER(hid_t), INTENT(in) :: loc_id + INTEGER(size_t) :: namelen + INTEGER(size_t) :: attrlen + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: obj_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: attr_name + INTEGER(hsize_t),DIMENSION(*),INTENT(inout):: dims + INTEGER, INTENT(inout) :: type_class + INTEGER(size_t), INTENT(inout) :: type_size END FUNCTION h5ltget_attribute_info_c END INTERFACE - namelen = LEN(dset_name) + namelen = LEN(obj_name) attrlen = LEN(attr_name) - errcode = h5ltget_attribute_info_c(loc_id,namelen,dset_name,attrlen,attr_name,dims,type_class,type_size) + errcode = h5ltget_attribute_info_c(loc_id,namelen,obj_name,attrlen,attr_name,dims,type_class,type_size) END SUBROUTINE h5ltget_attribute_info_f - !------------------------------------------------------------------------- - ! Function: h5ltpath_valid_f - ! - ! Purpose: Validates a path - ! - ! Return: Success: 0, Failure: -1 - ! - ! Programmer: M. Scot Breitenfeld - ! - ! Date: February 18, 2012 - ! - ! Comments: - ! - ! Modifications: - ! - !------------------------------------------------------------------------- - + !> + !! \ingroup FH5LT + !! + !! \brief Determines whether an HDF5 path is valid and, optionally, whether the path resolves to an HDF5 object. + !! + !! \param loc_id Identifier of an object in the file. + !! \param path The path to the object to check; links in path may be of any type. + !! \param check_object_valid Indicates whether to check if the final component of the path resolves to a valid object. + !! \param path_valid Object status. + !! \param errcode \fortran_error + !! SUBROUTINE h5ltpath_valid_f(loc_id, path, check_object_valid, path_valid, errcode) IMPLICIT NONE - INTEGER(hid_t) , INTENT(IN) :: loc_id ! An identifier of an object in the file. - CHARACTER(LEN=*), INTENT(IN) :: path ! Path to the object to check, relative to loc_id. - LOGICAL , INTENT(IN) :: check_object_valid ! Indicates whether to check if the final component - ! of the path resolves to a valid object - LOGICAL , INTENT(OUT) :: path_valid ! Object status - INTEGER , INTENT(OUT) :: errcode ! Error code: 0 on success and -1 on failure + 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 INTEGER(size_t) :: pathlen INTEGER :: check_object_valid_c @@ -1871,7 +1808,11 @@ CONTAINS END SUBROUTINE h5ltpath_valid_f +#ifdef H5_DOXYGEN_FORTRAN +END MODULE H5LT +#else END MODULE H5LT_CONST +#endif diff --git a/hl/fortran/src/H5TBff.F90 b/hl/fortran/src/H5TBff.F90 index 82f34a8..611d5ec 100644 --- a/hl/fortran/src/H5TBff.F90 +++ b/hl/fortran/src/H5TBff.F90 @@ -1,3 +1,14 @@ +!> @defgroup FH5TB Fortran High-level H5TB Interface +!! +!! @see H5TB, C-API +!! +!! @see @ref H5TB_UG, User Guide +!! + +!> @ingroup FH5TB +!! +!! @brief This module contains Fortran interfaces for H5TB. +! ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ! Copyright by The HDF Group. * ! Copyright by the Board of Trustees of the University of Illinois. * @@ -10,13 +21,6 @@ ! If you do not have access to either file, you may request a copy from * ! help@hdfgroup.org. * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! -! This file contains FORTRAN interfaces for H5TB functions -! -! -! NOTES -! ! _____ __ __ _____ ____ _____ _______ _ _ _______ ! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __| ! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | **** @@ -29,38 +33,64 @@ ! This is needed for Windows based operating systems. ! #include "H5config_f.inc" - -MODULE h5tb_CONST +#ifdef H5_DOXYGEN_FORTRAN + MODULE H5TB +#else + MODULE H5TB_CONST +#endif USE, INTRINSIC :: ISO_C_BINDING USE h5fortran_types USE hdf5 INTERFACE h5tbwrite_field_name_f +#ifdef H5_DOXYGEN_FORTRAN + MODULE PROCEDURE h5tbwrite_field_name_f +#else MODULE PROCEDURE h5tbwrite_field_name_f_int MODULE PROCEDURE h5tbwrite_field_name_f_string +#endif END INTERFACE INTERFACE h5tbread_field_name_f +#ifdef H5_DOXYGEN_FORTRAN + MODULE PROCEDURE h5tbread_field_name_f +#else MODULE PROCEDURE h5tbread_field_name_f_int MODULE PROCEDURE h5tbread_field_name_f_string +#endif END INTERFACE INTERFACE h5tbwrite_field_index_f +#ifdef H5_DOXYGEN_FORTRAN + MODULE PROCEDURE h5tbwrite_field_index_f +#else MODULE PROCEDURE h5tbwrite_field_index_f_int MODULE PROCEDURE h5tbwrite_field_index_f_string +#endif END INTERFACE INTERFACE h5tbread_field_index_f +#ifdef H5_DOXYGEN_FORTRAN + MODULE PROCEDURE h5tbread_field_index_f +#else MODULE PROCEDURE h5tbread_field_index_f_int MODULE PROCEDURE h5tbread_field_index_f_string +#endif END INTERFACE INTERFACE h5tbinsert_field_f +#ifdef H5_DOXYGEN_FORTRAN + MODULE PROCEDURE h5tbinsert_field_f +#else MODULE PROCEDURE h5tbinsert_field_f_int MODULE PROCEDURE h5tbinsert_field_f_string +#endif END INTERFACE + +#ifndef H5_DOXYGEN_FORTRAN + INTERFACE h5tbmake_table_f MODULE PROCEDURE h5tbmake_table_f90 MODULE PROCEDURE h5tbmake_table_ptr_f @@ -144,7 +174,6 @@ MODULE h5tb_CONST END FUNCTION h5tbread_field_index_c END INTERFACE - INTERFACE INTEGER FUNCTION h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& field_type,field_index,buf) & @@ -153,8 +182,8 @@ MODULE h5tb_CONST IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: field_name ! name of the field INTEGER(hid_t), INTENT(in) :: field_type ! field type INTEGER, INTENT(in) :: field_index ! field_index TYPE(C_PTR), VALUE :: buf ! data buffer @@ -163,26 +192,36 @@ MODULE h5tb_CONST END FUNCTION h5tbinsert_field_c END INTERFACE -CONTAINS +#endif -!------------------------------------------------------------------------- -! Function: h5tbmake_table_f90 -! -! Purpose: Make a table -! -! Return: Success: 0, Failure: -1 -! -! Programmer: Pedro Vicente -! -! Date: October 06, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- +CONTAINS - SUBROUTINE h5tbmake_table_f90(table_title,& +!> +!! \ingroup FH5TB +!! +!! \brief Creates (DOES NOT WRITE) a dataset named \p dset_name attached to the object specified by the identifier \p loc_id. +!! +!! \note \fortran_obsolete +!! +!! \param table_title The title of the table. +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param dset_name The name of the dataset to create. +!! \param nfields The number of fields. +!! \param nrecords The number of records. +!! \param type_size The size in bytes of the structure associated with the table. Obtained with sizeof or storage_size. +!! \param field_names An array containing the names of the fields. +!! \param field_offset An array containing the offsets of the fields. +!! \param field_types An array containing the type of the fields. +!! \param chunk_size The chunk size. +!! \param compress Flag that turns compression on or off. +!! \param errcode \fortran_error +!! +#ifdef H5_DOXYGEN_FORTRAN + SUBROUTINE h5tbmake_table_f(& +#else + SUBROUTINE h5tbmake_table_f90(& +#endif + table_title,& loc_id,& dset_name,& nfields,& @@ -196,20 +235,20 @@ CONTAINS errcode ) IMPLICIT NONE - CHARACTER(LEN=*), INTENT(in) :: table_title ! name of the dataset - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: nfields ! fields - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), DIMENSION(1:nfields), INTENT(in) :: field_names ! field names - INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: field_offset ! field offset - INTEGER(hid_t), DIMENSION(1:nfields), INTENT(in) :: field_types ! field types - INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size - INTEGER, INTENT(in) :: compress ! compress + CHARACTER(LEN=*), INTENT(in) :: table_title + INTEGER(hid_t) , INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hsize_t), INTENT(in) :: nfields + INTEGER(hsize_t), INTENT(in) :: nrecords + INTEGER(size_t) , INTENT(in) :: type_size + CHARACTER(LEN=*), DIMENSION(1:nfields), INTENT(in) :: field_names + INTEGER(size_t) , DIMENSION(1:nfields), INTENT(in) :: field_offset + INTEGER(hid_t), DIMENSION(1:nfields), INTENT(in) :: field_types + INTEGER(hsize_t), INTENT(in) :: chunk_size + INTEGER, INTENT(in) :: compress + INTEGER :: errcode INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code INTEGER(size_t), DIMENSION(1:nfields) :: char_len_field_names ! field name lengths INTEGER(size_t) :: max_char_size_field_names ! character len of field names INTEGER(hsize_t) :: i ! general purpose integer @@ -234,21 +273,21 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: table_title ! name of the dataset - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: nfields ! fields - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(KIND=C_CHAR), DIMENSION(nfields), INTENT(in) :: field_names ! field names - INTEGER(size_t), DIMENSION(nfields), INTENT(in) :: field_offset ! field offset - INTEGER(hid_t), DIMENSION(nfields), INTENT(in) :: field_types ! field types - INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size - INTEGER, INTENT(in) :: compress ! compress - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER(size_t), DIMENSION(nfields) :: char_len_field_names ! field name's lengths - INTEGER(size_t) :: max_char_size_field_names ! character len of field names + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: table_title + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name + INTEGER(hsize_t), INTENT(in) :: nfields + INTEGER(hsize_t), INTENT(in) :: nrecords + INTEGER(size_t), INTENT(in) :: type_size + CHARACTER(KIND=C_CHAR), DIMENSION(nfields), INTENT(in) :: field_names + INTEGER(size_t), DIMENSION(nfields), INTENT(in) :: field_offset + INTEGER(hid_t), DIMENSION(nfields), INTENT(in) :: field_types + INTEGER(hsize_t), INTENT(in) :: chunk_size + INTEGER, INTENT(in) :: compress + INTEGER(size_t) :: namelen + INTEGER(size_t) :: namelen1 + INTEGER(size_t), DIMENSION(nfields) :: char_len_field_names + INTEGER(size_t) :: max_char_size_field_names END FUNCTION h5tbmake_table_c END INTERFACE @@ -266,9 +305,40 @@ CONTAINS type_size, field_offset, field_types, chunk_size, compress, char_len_field_names, & max_char_size_field_names, field_names) - END SUBROUTINE h5tbmake_table_f90 - - SUBROUTINE h5tbmake_table_ptr_f(table_title,& +#ifdef H5_DOXYGEN_FORTRAN + END SUBROUTINE h5tbmake_table_f +#else + END SUBROUTINE h5tbmake_table_f90 +#endif + +!> +!! \ingroup FH5TB +!! +!! \brief Creates and writes a dataset named \p dset_name attached to the object specified by the identifier \p loc_id. +!! +!! \note \fortran_approved +!! +!! \param table_title The title of the table +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param dset_name The name of the dataset to create +!! \param nfields The number of fields +!! \param nrecords The number of records +!! \param type_size The size in bytes of the structure associated with the table; This value is obtained with sizeof(). +!! \param field_names An array containing the names of the fields +!! \param field_offset An array containing the offsets of the fields +!! \param field_types An array containing the type of the fields +!! \param chunk_size The chunk size +!! \param fill_data Fill values data +!! \param compress Flag that turns compression on or off +!! \param data Buffer with data to be written to the table +!! \param errcode \fortran_error +!! +#ifdef H5_DOXYGEN_FORTRAN + SUBROUTINE h5tbmake_table_f(& +#else + SUBROUTINE h5tbmake_table_ptr_f(& +#endif + table_title,& loc_id,& dset_name,& nfields,& @@ -285,22 +355,22 @@ CONTAINS USE ISO_C_BINDING IMPLICIT NONE - CHARACTER(LEN=*), INTENT(in) :: table_title ! name of the dataset - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: nfields ! fields - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), DIMENSION(1:nfields), INTENT(in) :: field_names ! field names - INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: field_offset ! field offset - INTEGER(hid_t), DIMENSION(1:nfields), INTENT(in) :: field_types ! field types - INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size - TYPE(C_PTR), INTENT(in) :: fill_data ! Fill values data - INTEGER, INTENT(in) :: compress ! compress - TYPE(C_PTR), INTENT(in) :: data ! Buffer with data to be written to the table + CHARACTER(LEN=*), INTENT(in) :: table_title + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hsize_t), INTENT(in) :: nfields + INTEGER(hsize_t), INTENT(in) :: nrecords + INTEGER(size_t), INTENT(in) :: type_size + CHARACTER(LEN=*), DIMENSION(1:nfields), INTENT(in) :: field_names + INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: field_offset + INTEGER(hid_t), DIMENSION(1:nfields), INTENT(in) :: field_types + INTEGER :: errcode + INTEGER(hsize_t), INTENT(in) :: chunk_size + TYPE(C_PTR), INTENT(in) :: fill_data + INTEGER, INTENT(in) :: compress + TYPE(C_PTR), INTENT(in) :: data INTEGER(size_t) :: namelen ! name length INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code INTEGER(size_t), DIMENSION(1:nfields) :: char_len_field_names ! field name lengths INTEGER(size_t) :: max_char_size_field_names ! character len of field names INTEGER(hsize_t) :: i ! general purpose integer @@ -327,22 +397,22 @@ CONTAINS IMPORT :: C_CHAR, C_PTR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: table_title ! name of the dataset - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: nfields ! fields - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(KIND=C_CHAR), DIMENSION(nfields), INTENT(in) :: field_names ! field names - INTEGER(size_t), DIMENSION(nfields), INTENT(in) :: field_offset ! field offset - INTEGER(hid_t), DIMENSION(nfields), INTENT(in) :: field_types ! field types - INTEGER(hsize_t), INTENT(in) :: chunk_size ! chunk size - TYPE(C_PTR), INTENT(in), VALUE :: fill_data ! Fill values data - INTEGER, INTENT(in) :: compress ! compress - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER(size_t), DIMENSION(nfields) :: char_len_field_names ! field name's lengths - INTEGER(size_t) :: max_char_size_field_names ! character len of field names + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: table_title + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name + INTEGER(hsize_t), INTENT(in) :: nfields + INTEGER(hsize_t), INTENT(in) :: nrecords + INTEGER(size_t), INTENT(in) :: type_size + CHARACTER(KIND=C_CHAR), DIMENSION(nfields), INTENT(in) :: field_names + INTEGER(size_t), DIMENSION(nfields), INTENT(in) :: field_offset + INTEGER(hid_t), DIMENSION(nfields), INTENT(in) :: field_types + INTEGER(hsize_t), INTENT(in) :: chunk_size + TYPE(C_PTR), INTENT(in), VALUE :: fill_data + INTEGER, INTENT(in) :: compress + INTEGER(size_t) :: namelen + INTEGER(size_t) :: namelen1 + INTEGER(size_t), DIMENSION(nfields) :: char_len_field_names + INTEGER(size_t) :: max_char_size_field_names TYPE(C_PTR), INTENT(in), VALUE :: data END FUNCTION h5tbmake_table_ptr_c END INTERFACE @@ -361,28 +431,44 @@ CONTAINS type_size, field_offset, field_types, chunk_size, fill_data, compress, char_len_field_names, & max_char_size_field_names, field_names, data) - END SUBROUTINE h5tbmake_table_ptr_f - - SUBROUTINE h5tbread_table_f(loc_id, table_name, nfields, dst_size, dst_offset, & +#ifdef H5_DOXYGEN_FORTRAN + END SUBROUTINE h5tbmake_table_f +#else + END SUBROUTINE h5tbmake_table_ptr_f +#endif +!> +!! \ingroup FH5TB +!! +!! \brief Reads a table. +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param dset_name The name of the dataset to read +!! \param nfields Number of fields, i.e., size of dst_offset and dst_sizes arrays. +!! \param dst_size The size of the structure type, as calculated by sizeof or storage_size +!! \param dst_offset An array containing the offsets of the fields. These offsets can be calculated with H5OFFSETOF. +!! \param dst_sizes An array containing the sizes of the fields. These sizes can be calculated with sizeof or storage_size. +!! \param dst_buf Pointer to buffer with data. +!! \param errcode \fortran_error +!! + SUBROUTINE h5tbread_table_f(loc_id, dset_name, nfields, dst_size, dst_offset, & dst_sizes, dst_buf, errcode) USE ISO_C_BINDING IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! An array containing the sizes of the fields - CHARACTER(LEN=*), INTENT(in) :: table_name ! The name of the dataset to read - INTEGER(hsize_t), INTENT(in) :: nfields ! number of fields - INTEGER(size_t), INTENT(in) :: dst_size ! The size of the structure type - INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: dst_offset ! An array containing the offsets of the fields - INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: dst_sizes ! An array containing the sizes of the fields - TYPE(C_PTR) :: dst_buf ! Buffer with data !! do not use INTENT, causes NAG - ! to segfault in C APIs - INTEGER :: errcode ! error code - - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hsize_t), INTENT(in) :: nfields + INTEGER(size_t), INTENT(in) :: dst_size + INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: dst_offset + INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: dst_sizes + TYPE(C_PTR) :: dst_buf !!! do not use INTENT, causes NAG to segfault in C APIs + INTEGER :: errcode + + INTEGER(size_t) :: namelen ! name length INTERFACE INTEGER FUNCTION h5tbread_table_c(loc_id,& - table_name,& + dset_name,& namelen,& nfields,& dst_size,& @@ -393,22 +479,22 @@ CONTAINS IMPORT :: C_PTR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=1), INTENT(in) :: table_name ! name of the dataset + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=1), INTENT(in) :: dset_name INTEGER(hsize_t), INTENT(in) :: nfields - INTEGER(size_t), INTENT(in) :: dst_size ! type size - INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: dst_offset ! An array containing the sizes of the fields - INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: dst_sizes ! An array containing the sizes of the fields - INTEGER(size_t) :: namelen ! name length + INTEGER(size_t), INTENT(in) :: dst_size + INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: dst_offset + INTEGER(size_t), DIMENSION(1:nfields), INTENT(in) :: dst_sizes + INTEGER(size_t) :: namelen TYPE(C_PTR), VALUE :: dst_buf END FUNCTION h5tbread_table_c END INTERFACE - namelen = LEN(table_name) + namelen = LEN(dset_name) errcode = h5tbread_table_c(loc_id,& - table_name,& + dset_name,& namelen, & nfields, & dst_size,& @@ -416,25 +502,28 @@ CONTAINS dst_sizes, & dst_buf) - END SUBROUTINE h5tbread_table_f -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_name_f_int -! -! Purpose: Writes one field -! -! Programmer: Pedro Vicente -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbwrite_field_name_f_int(loc_id,& +#ifdef H5_DOXYGEN_FORTRAN +!> +!! \ingroup FH5TB +!! +!! \brief Overwrites field. +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param dset_name The name of the dataset to overwrite +!! \param field_name The names of the fields to write +!! \param start The zero index record to start writing +!! \param nrecords The number of records to write +!! \param type_size The size of the structure type, as calculated by sizeof or storage_size. +!! \param buf Buffer with data. +!! \param errcode \fortran_error +!! + SUBROUTINE h5tbwrite_field_name_f(& +#else + SUBROUTINE h5tbwrite_field_name_f_int(& +#endif + loc_id,& dset_name,& field_name,& start,& @@ -444,16 +533,20 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + CHARACTER(LEN=*), INTENT(in) :: field_name + INTEGER(hsize_t), INTENT(in) :: start + INTEGER(hsize_t), INTENT(in) :: nrecords + INTEGER(size_t), INTENT(in) :: type_size +#ifdef H5_DOXYGEN_FORTRAN + TYPE(TYPE), INTENT(in), DIMENSION(*) :: buf +#else + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf +#endif + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1)) @@ -462,10 +555,11 @@ CONTAINS errcode = h5tbwrite_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& start,nrecords,type_size,f_ptr) - +#ifdef H5_DOXYGEN_FORTRAN + END SUBROUTINE h5tbwrite_field_name_f +#else END SUBROUTINE h5tbwrite_field_name_f_int - SUBROUTINE h5tbwrite_field_name_f_string(loc_id,& dset_name,& field_name,& @@ -498,24 +592,28 @@ CONTAINS start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbwrite_field_name_f_string - - -!------------------------------------------------------------------------- -! Function: h5tbread_field_name_f_int -! -! Purpose: Reads one field -! -! Programmer: Pedro Vicente -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbread_field_name_f_int(loc_id,& +#endif + +#ifdef H5_DOXYGEN_FORTRAN +!> +!! \ingroup FH5TB +!! +!! \brief Reads one or several fields. The fields are identified by name. +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param dset_name The name of the dataset to read. +!! \param field_name An array containing the names of the fields to read. +!! \param start The start record to read from. +!! \param nrecords The number of records to read. +!! \param type_size The size in bytes of the structure associated with the table. Obtained with sizeof or storage_size. +!! \param buf Buffer with data +!! \param errcode \fortran_error +!! + SUBROUTINE h5tbread_field_name_f(& +#else + SUBROUTINE h5tbread_field_name_f_int(& +#endif + loc_id,& dset_name,& field_name,& start,& @@ -526,19 +624,23 @@ CONTAINS IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(INOUT), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + CHARACTER(LEN=*), INTENT(in) :: field_name + INTEGER(hsize_t), INTENT(in) :: start + INTEGER(hsize_t), INTENT(in) :: nrecords + INTEGER(size_t), INTENT(in) :: type_size +#ifdef H5_DOXYGEN_FORTRAN + TYPE(TYPE), INTENT(INOUT), DIMENSION(*):: buf +#else + INTEGER, INTENT(INOUT), DIMENSION(*), TARGET :: buf +#endif + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length TYPE(C_PTR) :: f_ptr - f_ptr = C_LOC(buf(1)) ! name length + f_ptr = C_LOC(buf(1)) namelen = LEN(dset_name) namelen1 = LEN(field_name) @@ -546,6 +648,9 @@ CONTAINS errcode = h5tbread_field_name_c(loc_id,namelen,dset_name,namelen1,field_name,& start,nrecords,type_size,f_ptr) +#ifdef H5_DOXYGEN_FORTRAN + END SUBROUTINE h5tbread_field_name_f +#else END SUBROUTINE h5tbread_field_name_f_int SUBROUTINE h5tbread_field_name_f_string(loc_id,& @@ -558,16 +663,16 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(INOUT), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + CHARACTER(LEN=*), INTENT(in) :: field_name + INTEGER(hsize_t), INTENT(in) :: start + INTEGER(hsize_t), INTENT(in) :: nrecords + INTEGER(size_t), INTENT(in) :: type_size + CHARACTER(LEN=*), INTENT(INOUT), DIMENSION(*), TARGET :: buf + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1)(1:1)) @@ -579,24 +684,28 @@ CONTAINS start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbread_field_name_f_string - - -!------------------------------------------------------------------------- -! Function: h5tbwrite_field_index_f_int -! -! Purpose: Writes one field -! -! Programmer: Pedro Vicente -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbwrite_field_index_f_int(loc_id,& +#endif + +#ifdef H5_DOXYGEN_FORTRAN +!> +!! \ingroup FH5TB +!! +!! \brief Overwrites a field. +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param dset_name The name of the dataset to overwrite. +!! \param field_index The indexe of the fields to write. +!! \param start The zero based index record to start writing. +!! \param nrecords The number of records to write. +!! \param type_size The size of the structure type, as calculated by sizeof or storage_size. +!! \param buf Buffer with data. +!! \param errcode \fortran_error +!! + SUBROUTINE h5tbwrite_field_index_f(& +#else + SUBROUTINE h5tbwrite_field_index_f_int(& +#endif + loc_id,& dset_name,& field_index,& start,& @@ -606,15 +715,19 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER, INTENT(in) :: field_index + INTEGER(hsize_t), INTENT(in) :: start + INTEGER(hsize_t), INTENT(in) :: nrecords + INTEGER(size_t), INTENT(in) :: type_size +#ifdef H5_DOXYGEN_FORTRAN + INTEGER, INTENT(in), DIMENSION(*) :: buf +#else + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf +#endif + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1)) @@ -624,6 +737,9 @@ CONTAINS errcode = h5tbwrite_field_index_c(loc_id,namelen,dset_name,field_index,& start,nrecords,type_size,f_ptr) +#ifdef H5_DOXYGEN_FORTRAN + END SUBROUTINE h5tbwrite_field_index_f +#else END SUBROUTINE h5tbwrite_field_index_f_int SUBROUTINE h5tbwrite_field_index_f_string(loc_id,& @@ -636,15 +752,15 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER, INTENT(in) :: field_index + INTEGER(hsize_t), INTENT(in) :: start + INTEGER(hsize_t), INTENT(in) :: nrecords + INTEGER(size_t), INTENT(in) :: type_size + CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1)(1:1)) @@ -654,24 +770,28 @@ CONTAINS start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbwrite_field_index_f_string - - -!------------------------------------------------------------------------- -! Function: h5tbread_field_index_f_int -! -! Purpose: Reads one field -! -! Programmer: Pedro Vicente -! -! Date: October 12, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbread_field_index_f_int(loc_id,& +#endif + +#ifdef H5_DOXYGEN_FORTRAN +!> +!! \ingroup FH5TB +!! +!! \brief Reads field. The fields are identified by index. +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param dset_name The name of the dataset to read. +!! \param field_index The indexes of the fields to read. +!! \param start The start record to read from. +!! \param nrecords The number of records to read. +!! \param type_size The size in bytes of the structure associated with the table. Obtained with sizeof or storage_size. +!! \param buf Buffer with data. +!! \param errcode \fortran_error +!! + SUBROUTINE h5tbread_field_index_f(& +#else + SUBROUTINE h5tbread_field_index_f_int(& +#endif + loc_id,& dset_name,& field_index,& start,& @@ -681,15 +801,19 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - INTEGER, INTENT(INOUT), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER, INTENT(in) :: field_index + INTEGER(hsize_t), INTENT(in) :: start + INTEGER(hsize_t), INTENT(in) :: nrecords + INTEGER(size_t), INTENT(in) :: type_size +#ifdef H5_DOXYGEN_FORTRAN + TYPE(TYPE), INTENT(INOUT), DIMENSION(*) :: buf +#else + INTEGER, INTENT(INOUT), DIMENSION(*), TARGET :: buf +#endif + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1)) @@ -697,7 +821,9 @@ CONTAINS errcode = h5tbread_field_index_c(loc_id,namelen,dset_name,field_index,& start,nrecords,type_size,f_ptr) - +#ifdef H5_DOXYGEN_FORTRAN + END SUBROUTINE h5tbread_field_index_f +#else END SUBROUTINE h5tbread_field_index_f_int SUBROUTINE h5tbread_field_index_f_string(loc_id,& @@ -710,15 +836,15 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER, INTENT(in) :: field_index ! index - INTEGER(hsize_t), INTENT(in) :: start ! start record - INTEGER(hsize_t), INTENT(in) :: nrecords ! records - INTEGER(size_t), INTENT(in) :: type_size ! type size - CHARACTER(LEN=*), INTENT(INOUT), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER, INTENT(in) :: field_index + INTEGER(hsize_t), INTENT(in) :: start + INTEGER(hsize_t), INTENT(in) :: nrecords + INTEGER(size_t), INTENT(in) :: type_size + CHARACTER(LEN=*), INTENT(INOUT), DIMENSION(*), TARGET :: buf + INTEGER :: errcode + INTEGER(size_t) :: namelen TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1)(1:1)) @@ -728,39 +854,48 @@ CONTAINS start,nrecords,type_size,f_ptr) END SUBROUTINE h5tbread_field_index_f_string - -!------------------------------------------------------------------------- -! Function: h5tbinsert_field_f -! -! Purpose: Inserts one field -! -! Programmer: Pedro Vicente -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - - SUBROUTINE h5tbinsert_field_f_int(loc_id,& +#endif + +#ifdef H5_DOXYGEN_FORTRAN +!> +!! \ingroup FH5TB +!! +!! \brief Insert a new field into a table. +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param dset_name The name of the table. +!! \param field_name The name of the field to insert. +!! \param field_type The data type of the field. +!! \param position The zero based index position where to insert the field. +!! \param buf Buffer with data. +!! \param errcode \fortran_error +!! + SUBROUTINE h5tbinsert_field_f(& +#else + SUBROUTINE h5tbinsert_field_f_int(& +#endif + loc_id,& dset_name,& field_name,& field_type,& - field_index,& + position,& buf,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + CHARACTER(LEN=*), INTENT(in) :: field_name + INTEGER(hid_t), INTENT(in) :: field_type + INTEGER, INTENT(in) :: position +#ifdef H5_DOXYGEN_FORTRAN + TYPE(TYPE), INTENT(in), DIMENSION(*) :: buf +#else + INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf +#endif + INTEGER :: errcode + + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1)) @@ -769,27 +904,31 @@ CONTAINS namelen1 = LEN(field_name) errcode = h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,f_ptr) + field_type,position,f_ptr) +#ifdef H5_DOXYGEN_FORTRAN + END SUBROUTINE h5tbinsert_field_f +#else END SUBROUTINE h5tbinsert_field_f_int SUBROUTINE h5tbinsert_field_f_string(loc_id,& dset_name,& field_name,& field_type,& - field_index,& + position,& buf,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(hid_t), INTENT(in) :: field_type ! field type - INTEGER, INTENT(in) :: field_index ! field_index - CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + CHARACTER(LEN=*), INTENT(in) :: field_name + INTEGER(hid_t), INTENT(in) :: field_type + INTEGER, INTENT(in) :: position + CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf + INTEGER :: errcode + + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length TYPE(C_PTR) :: f_ptr f_ptr = C_LOC(buf(1)(1:1)) @@ -798,36 +937,33 @@ CONTAINS namelen1 = LEN(field_name) errcode = h5tbinsert_field_c(loc_id,namelen,dset_name,namelen1,field_name,& - field_type,field_index,f_ptr) + field_type,position,f_ptr) END SUBROUTINE h5tbinsert_field_f_string - -!------------------------------------------------------------------------- -! Function: h5tbdelete_field_f -! -! Purpose: Inserts one field -! -! Programmer: Pedro Vicente -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - +#endif + +!> +!! \ingroup FH5TB +!! +!! \brief Deletes a field from a table. +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param dset_name The name of the table. +!! \param field_name The name of the field to delete. +!! \param errcode \fortran_error +!! SUBROUTINE h5tbdelete_field_f(loc_id,& dset_name,& field_name,& errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - CHARACTER(LEN=*), INTENT(in) :: field_name ! name of the field - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length - INTEGER :: errcode ! error code + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + CHARACTER(LEN=*), INTENT(in) :: field_name + INTEGER :: errcode + + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t) :: namelen1 ! name length INTERFACE @@ -836,11 +972,11 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dset_name ! name of the dataset - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: field_name ! name of the field - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: namelen1 ! name length length + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dset_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: field_name + INTEGER(size_t) :: namelen + INTEGER(size_t) :: namelen1 END FUNCTION h5tbdelete_field_c END INTERFACE @@ -850,24 +986,17 @@ CONTAINS errcode = h5tbdelete_field_c(loc_id,namelen,dset_name,namelen1,field_name) END SUBROUTINE h5tbdelete_field_f - -!------------------------------------------------------------------------- -! Function: h5tbget_table_info_f -! -! Purpose: Gets the number of records and fields of a table -! -! Return: Success: 0, Failure: -1 -! -! Programmer: Pedro Vicente -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! -!------------------------------------------------------------------------- - +!> +!! \ingroup FH5TB +!! +!! \brief Gets the table dimensions. +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param dset_name The name of the dataset to read. +!! \param nfields The number of fields. +!! \param nrecords The number of records. +!! \param errcode \fortran_error +!! SUBROUTINE h5tbget_table_info_f(loc_id,& dset_name,& nfields,& @@ -875,12 +1004,12 @@ CONTAINS errcode ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout):: nfields ! nfields - INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords - INTEGER :: errcode ! error code - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hsize_t), INTENT(inout):: nfields + INTEGER(hsize_t), INTENT(inout):: nrecords + INTEGER :: errcode + INTEGER(size_t) :: namelen ! name length INTERFACE INTEGER FUNCTION h5tbget_table_info_c(loc_id,namelen,dset_name,nfields,nrecords) & @@ -888,11 +1017,11 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(inout):: nfields ! nfields - INTEGER(hsize_t), INTENT(inout):: nrecords ! nrecords - INTEGER(size_t) :: namelen ! name length + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name + INTEGER(hsize_t), INTENT(inout):: nfields + INTEGER(hsize_t), INTENT(inout):: nrecords + INTEGER(size_t) :: namelen END FUNCTION h5tbget_table_info_c END INTERFACE @@ -901,26 +1030,22 @@ CONTAINS END SUBROUTINE h5tbget_table_info_f - -!------------------------------------------------------------------------- -! Function: h5tbget_field_info_f -! -! Purpose: Get information about fields -! -! Return: Success: 0, Failure: -1 -! -! Programmer: Pedro Vicente -! -! Date: October 13, 2004 -! -! Comments: -! -! Modifications: -! Added optional parameter for returning the maximum character length -! in the field name array. March 3, 2011 -! -!------------------------------------------------------------------------- - +!> +!! \ingroup FH5TB +!! +!! \brief Gets information about a table. +!! +!! \param loc_id Location identifier. The identifier may be that of a file or group. +!! \param dset_name The name of the dataset to read. +!! \param nfields The number of fields. +!! \param field_names An array containing the names of the fields. +!! \param field_sizes An array containing the size of the fields. +!! \param field_offsets An array containing the offsets of the fields. +!! \param type_size The size of the HDF5 datatype associated with the table +!! (i.e., the size in bytes of the HDF5 compound datatype used to define a row, or record, in the table). +!! \param errcode \fortran_error +!! \param maxlen_out Maximum character length of the field names. +!! SUBROUTINE h5tbget_field_info_f(loc_id,& dset_name,& nfields,& @@ -931,18 +1056,18 @@ CONTAINS errcode, maxlen_out ) IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(LEN=*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in) :: nfields ! nfields - CHARACTER(LEN=*), DIMENSION(nfields), INTENT(inout) :: field_names ! field names - INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_sizes ! field sizes - INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_offsets ! field offsets - INTEGER(size_t), INTENT(inout):: type_size ! type size - INTEGER :: errcode ! error code - INTEGER(size_t), OPTIONAL :: maxlen_out ! maximum character len of the field names - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t), DIMENSION(nfields) :: namelen2 ! name lengths - INTEGER(hsize_t) :: i ! general purpose integer + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(LEN=*), INTENT(in) :: dset_name + INTEGER(hsize_t), INTENT(in) :: nfields + CHARACTER(LEN=*), DIMENSION(nfields), INTENT(inout) :: field_names + INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_sizes + INTEGER(size_t), DIMENSION(nfields), INTENT(inout) :: field_offsets + INTEGER(size_t), INTENT(inout):: type_size + INTEGER :: errcode + INTEGER(size_t), OPTIONAL :: maxlen_out + INTEGER(size_t) :: namelen ! name length + INTEGER(size_t), DIMENSION(nfields) :: namelen2 ! name lengths + INTEGER(hsize_t) :: i INTEGER(size_t) :: maxlen INTEGER(size_t) :: c_maxlen_out @@ -953,17 +1078,17 @@ CONTAINS IMPORT :: C_CHAR IMPORT :: HID_T, SIZE_T, HSIZE_T IMPLICIT NONE - INTEGER(hid_t), INTENT(in) :: loc_id ! file or group identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset - INTEGER(hsize_t), INTENT(in):: nfields ! nfields - CHARACTER(KIND=C_CHAR), DIMENSION(1:nfields), INTENT(inout) :: field_names ! field names - INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_sizes ! field sizes - INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_offsets ! field offsets - INTEGER(size_t), INTENT(inout):: type_size ! type size - INTEGER(size_t) :: namelen ! name length - INTEGER(size_t) :: maxlen ! maximum length of input field names - INTEGER(size_t), DIMENSION(1:nfields) :: namelen2 ! name lengths - INTEGER(size_t) :: c_maxlen_out ! maximum character length of a field array element + INTEGER(hid_t), INTENT(in) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name + INTEGER(hsize_t), INTENT(in):: nfields + CHARACTER(KIND=C_CHAR), DIMENSION(1:nfields), INTENT(inout) :: field_names + INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_sizes + INTEGER(size_t), DIMENSION(1:nfields), INTENT(inout) :: field_offsets + INTEGER(size_t), INTENT(inout):: type_size + INTEGER(size_t) :: namelen + INTEGER(size_t) :: maxlen + INTEGER(size_t), DIMENSION(1:nfields) :: namelen2 + INTEGER(size_t) :: c_maxlen_out END FUNCTION h5tbget_field_info_c END INTERFACE @@ -981,7 +1106,11 @@ CONTAINS END SUBROUTINE h5tbget_field_info_f +#ifdef H5_DOXYGEN_FORTRAN +END MODULE H5TB +#else END MODULE H5TB_CONST +#endif -- cgit v0.12