From d7fbbda1a099e108c8fbf7a9a50020d8785a1f5b Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 14 Apr 2015 16:59:58 -0500 Subject: [svn-r26809] Changed Fortran file endings from ".f90" to ".F90" --- MANIFEST | 46 +- fortran/src/CMakeLists.txt | 62 +- fortran/src/H5Aff.F90 | 2961 ++++++++++++ fortran/src/H5Aff.f90 | 2961 ------------ fortran/src/H5Dff.F90 | 3383 +++++++++++++ fortran/src/H5Dff.f90 | 3383 ------------- fortran/src/H5Eff.F90 | 312 ++ fortran/src/H5Eff.f90 | 312 -- fortran/src/H5FDmpioff.F90 | 212 + fortran/src/H5FDmpioff.f90 | 212 - fortran/src/H5Fff.F90 | 894 ++++ fortran/src/H5Fff.f90 | 894 ---- fortran/src/H5Gff.F90 | 1331 ++++++ fortran/src/H5Gff.f90 | 1331 ------ fortran/src/H5Iff.F90 | 352 ++ fortran/src/H5Iff.f90 | 352 -- fortran/src/H5Lf.c | 30 +- fortran/src/H5Lff.F90 | 1461 ++++++ fortran/src/H5Lff.f90 | 1496 ------ fortran/src/H5Off.F90 | 1167 +++++ fortran/src/H5Off.f90 | 1167 ----- fortran/src/H5Pff.F90 | 7624 ++++++++++++++++++++++++++++++ fortran/src/H5Pff.f90 | 7624 ------------------------------ fortran/src/H5Rf.c | 32 +- fortran/src/H5Rff.F90 | 779 +++ fortran/src/H5Rff.f90 | 791 ---- fortran/src/H5Sff.F90 | 1875 ++++++++ fortran/src/H5Sff.f90 | 1875 -------- fortran/src/H5Tff.F90 | 3285 +++++++++++++ fortran/src/H5Tff.f90 | 3285 ------------- fortran/src/H5Zff.F90 | 198 + fortran/src/H5Zff.f90 | 198 - fortran/src/H5_DBLE_InterfaceExclude.F90 | 39 + fortran/src/H5_DBLE_InterfaceExclude.f90 | 39 - fortran/src/H5_DBLE_InterfaceInclude.F90 | 1859 ++++++++ fortran/src/H5_DBLE_InterfaceInclude.f90 | 1859 -------- fortran/src/H5_f.c | 18 +- fortran/src/H5_ff.F90 | 439 ++ fortran/src/H5_ff.f90 | 439 -- fortran/src/H5f90global.F90 | 972 ++++ fortran/src/H5f90global.f90 | 972 ---- fortran/src/H5f90proto.h | 65 +- fortran/src/H5match_types.c | 4 +- fortran/src/H5test_kind.F90 | 269 ++ fortran/src/H5test_kind.f90 | 269 -- fortran/src/H5test_kind_SIZEOF.F90 | 228 + fortran/src/H5test_kind_SIZEOF.f90 | 228 - fortran/src/H5test_kind_STORAGE_SIZE.F90 | 230 + fortran/src/H5test_kind_STORAGE_SIZE.f90 | 230 - fortran/src/HDF5.F90 | 47 + fortran/src/HDF5.f90 | 47 - fortran/src/HDF5mpio.F90 | 55 + fortran/src/HDF5mpio.f90 | 55 - fortran/src/Makefile.am | 92 +- fortran/src/Makefile.in | 157 +- 55 files changed, 30215 insertions(+), 30282 deletions(-) create mode 100644 fortran/src/H5Aff.F90 delete mode 100644 fortran/src/H5Aff.f90 create mode 100644 fortran/src/H5Dff.F90 delete mode 100644 fortran/src/H5Dff.f90 create mode 100644 fortran/src/H5Eff.F90 delete mode 100644 fortran/src/H5Eff.f90 create mode 100644 fortran/src/H5FDmpioff.F90 delete mode 100644 fortran/src/H5FDmpioff.f90 create mode 100644 fortran/src/H5Fff.F90 delete mode 100644 fortran/src/H5Fff.f90 create mode 100644 fortran/src/H5Gff.F90 delete mode 100644 fortran/src/H5Gff.f90 create mode 100644 fortran/src/H5Iff.F90 delete mode 100644 fortran/src/H5Iff.f90 create mode 100644 fortran/src/H5Lff.F90 delete mode 100644 fortran/src/H5Lff.f90 create mode 100644 fortran/src/H5Off.F90 delete mode 100644 fortran/src/H5Off.f90 create mode 100644 fortran/src/H5Pff.F90 delete mode 100644 fortran/src/H5Pff.f90 create mode 100644 fortran/src/H5Rff.F90 delete mode 100644 fortran/src/H5Rff.f90 create mode 100644 fortran/src/H5Sff.F90 delete mode 100644 fortran/src/H5Sff.f90 create mode 100644 fortran/src/H5Tff.F90 delete mode 100644 fortran/src/H5Tff.f90 create mode 100644 fortran/src/H5Zff.F90 delete mode 100644 fortran/src/H5Zff.f90 create mode 100644 fortran/src/H5_DBLE_InterfaceExclude.F90 delete mode 100644 fortran/src/H5_DBLE_InterfaceExclude.f90 create mode 100644 fortran/src/H5_DBLE_InterfaceInclude.F90 delete mode 100644 fortran/src/H5_DBLE_InterfaceInclude.f90 create mode 100644 fortran/src/H5_ff.F90 delete mode 100644 fortran/src/H5_ff.f90 create mode 100644 fortran/src/H5f90global.F90 delete mode 100644 fortran/src/H5f90global.f90 create mode 100644 fortran/src/H5test_kind.F90 delete mode 100644 fortran/src/H5test_kind.f90 create mode 100644 fortran/src/H5test_kind_SIZEOF.F90 delete mode 100644 fortran/src/H5test_kind_SIZEOF.f90 create mode 100644 fortran/src/H5test_kind_STORAGE_SIZE.F90 delete mode 100644 fortran/src/H5test_kind_STORAGE_SIZE.f90 create mode 100644 fortran/src/HDF5.F90 delete mode 100644 fortran/src/HDF5.f90 create mode 100644 fortran/src/HDF5mpio.F90 delete mode 100644 fortran/src/HDF5mpio.f90 diff --git a/MANIFEST b/MANIFEST index b80a253..5c3ab84 100644 --- a/MANIFEST +++ b/MANIFEST @@ -271,48 +271,48 @@ ./fortran/examples/rwdset_fortran2003.f90 ./fortran/src/H5_f.c -./fortran/src/H5_ff.f90 -./fortran/src/H5_DBLE_InterfaceInclude.f90 -./fortran/src/H5_DBLE_InterfaceExclude.f90 +./fortran/src/H5_ff.F90 +./fortran/src/H5_DBLE_InterfaceInclude.F90 +./fortran/src/H5_DBLE_InterfaceExclude.F90 ./fortran/src/H5Af.c -./fortran/src/H5Aff.f90 +./fortran/src/H5Aff.F90 ./fortran/src/H5Df.c -./fortran/src/H5Dff.f90 +./fortran/src/H5Dff.F90 ./fortran/src/H5Ef.c -./fortran/src/H5Eff.f90 +./fortran/src/H5Eff.F90 ./fortran/src/H5FDmpiof.c -./fortran/src/H5FDmpioff.f90 +./fortran/src/H5FDmpioff.F90 ./fortran/src/H5Ff.c -./fortran/src/H5Fff.f90 +./fortran/src/H5Fff.F90 ./fortran/src/H5Gf.c -./fortran/src/H5Gff.f90 +./fortran/src/H5Gff.F90 ./fortran/src/H5If.c -./fortran/src/H5Iff.f90 +./fortran/src/H5Iff.F90 ./fortran/src/H5Lf.c -./fortran/src/H5Lff.f90 +./fortran/src/H5Lff.F90 ./fortran/src/H5Of.c -./fortran/src/H5Off.f90 +./fortran/src/H5Off.F90 ./fortran/src/H5Pf.c -./fortran/src/H5Pff.f90 +./fortran/src/H5Pff.F90 ./fortran/src/H5Rf.c -./fortran/src/H5Rff.f90 +./fortran/src/H5Rff.F90 ./fortran/src/H5Sf.c -./fortran/src/H5Sff.f90 +./fortran/src/H5Sff.F90 ./fortran/src/H5Tf.c -./fortran/src/H5Tff.f90 +./fortran/src/H5Tff.F90 ./fortran/src/H5Zf.c -./fortran/src/H5Zff.f90 +./fortran/src/H5Zff.F90 ./fortran/src/H5f90.h -./fortran/src/H5f90global.f90 +./fortran/src/H5f90global.F90 ./fortran/src/H5f90i.h ./fortran/src/H5f90kit.c ./fortran/src/H5f90proto.h -./fortran/src/H5test_kind.f90 -./fortran/src/H5test_kind_SIZEOF.f90 -./fortran/src/H5test_kind_STORAGE_SIZE.f90 +./fortran/src/H5test_kind.F90 +./fortran/src/H5test_kind_SIZEOF.F90 +./fortran/src/H5test_kind_STORAGE_SIZE.F90 ./fortran/src/H5match_types.c -./fortran/src/HDF5.f90 -./fortran/src/HDF5mpio.f90 +./fortran/src/HDF5.F90 +./fortran/src/HDF5mpio.F90 ./fortran/src/Makefile.am ./fortran/src/Makefile.in ./fortran/src/README diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 67edd24..3ee04d8 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -21,24 +21,24 @@ endif (WIN32) #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities -# H5test_kind(_SIZEOF,_STORAGE_SIZE).f90 used to generate H5fortran_detect.f90 -# H5fortran_detect.f90 used to generate H5fort_type_defines.h -# H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.f90 +# H5test_kind(_SIZEOF,_STORAGE_SIZE).F90 used to generate H5fortran_detect.F90 +# H5fortran_detect.F90 used to generate H5fort_type_defines.h +# H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.F90 #----------------------------------------------------------------------------- if (FORTRAN_HAVE_STORAGE_SIZE) add_executable (H5test_FortranHavekind - ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_STORAGE_SIZE.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_STORAGE_SIZE.F90 ) set (H5_TEST_KIND_NAME "h5test_kind_storage_size_mod") else (FORTRAN_HAVE_STORAGE_SIZE) if (FORTRAN_HAVE_SIZEOF) add_executable (H5test_FortranHavekind - ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_SIZEOF.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_SIZEOF.F90 ) set (H5_TEST_KIND_NAME "h5test_kind_sizeof_mod") else (FORTRAN_HAVE_SIZEOF) add_executable (H5test_FortranHavekind - ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind.F90 ) endif (FORTRAN_HAVE_SIZEOF) endif (FORTRAN_HAVE_STORAGE_SIZE) @@ -61,15 +61,15 @@ set_target_properties (H5test_FortranHavekind PROPERTIES set (CMD $) add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90 + OUTPUT ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 COMMAND ${CMD} - ARGS > ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90 + ARGS > ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} DEPENDS H5test_FortranHavekind ) #----------------------------------------------------------------------------- add_executable (H5fortran_detect - ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90 + ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 ) if (WIN32 AND MSVC) if (BUILD_SHARED_LIBS) @@ -103,7 +103,7 @@ add_executable (H5match_types set (CMD $) add_custom_command ( OUTPUT ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h - ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90 + ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 COMMAND ${CMD} WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} DEPENDS H5match_types @@ -171,25 +171,25 @@ endif (FORTRAN_DEFAULT_REAL_NOT_DOUBLE) #----------------------------------------------------------------------------- set (f90_F_SRCS # generated files - ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90 + ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 # normal distribution - ${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5_ff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Aff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Eff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Fff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Gff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Iff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Lff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Off.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Pff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Rff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Sff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Tff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5Zff.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5_DBLE_Interface${F_DBLE}.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5_ff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Aff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Eff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Fff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Gff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Iff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Lff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Off.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Pff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Rff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Sff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Tff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5Zff.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5_DBLE_Interface${F_DBLE}.F90 ) #----------------------------------------------------------------------------- @@ -198,13 +198,13 @@ set (f90_F_SRCS if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) set (f90_F_SRCS ${f90_F_SRCS} - ${HDF5_F90_SRC_SOURCE_DIR}/HDF5mpio.f90 - ${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpioff.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/HDF5mpio.F90 + ${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpioff.F90 ) else (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) set (f90_F_SRCS ${f90_F_SRCS} - ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.f90 + ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.F90 ) endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran) @@ -252,7 +252,7 @@ install ( ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h - ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90 + ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} COMPONENT diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 new file mode 100644 index 0000000..f8f361f --- /dev/null +++ b/fortran/src/H5Aff.F90 @@ -0,0 +1,2961 @@ +!****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. +! +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! NOTES +! +! (A) C_LOC and character strings according to the Fortran 2003 standard: +! +! 15.1.2.5 C_LOC(X) +! +! Argument. X shall either +! +! (1) have interoperable type and type parameters and be +! (a) a variable that has the TARGET attribute and is interoperable, +! (b) an allocated allocatable variable that has the TARGET attribute +! and is not an array of zero size, or +! (c) an associated scalar pointer, or +! (2) be a nonpolymorphic scalar, have no length type parameters, and be +! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, +! (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: +! +! 15.2.1 Interoperability of intrinsic types +! +! ...if the type is character, interoperability also requires that the length type parameter +! be omitted or be specified by an initialization expression whose value is one. +! +! THEREFORE compilers that have not extended the standard require +! +! CHARACTER(LEN=1), TARGET :: chr +! or +! CHARACTER, TARGET :: chr +! +! (B) +! *** IMPORTANT *** +! If you add a new H5A 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. +! +!***** + +MODULE H5A + + USE H5GLOBAL +! +! On Windows there are no big (integer*8) integers, so overloading +! for bug #670 does not work. I have to use DEC compilation directives to make +! Windows DEC Visual Fortran and OSF compilers happy and do right things. +! 05/01/02 EP +! + INTERFACE h5awrite_f + MODULE PROCEDURE h5awrite_integer_scalar + MODULE PROCEDURE h5awrite_integer_1 + MODULE PROCEDURE h5awrite_integer_2 + MODULE PROCEDURE h5awrite_integer_3 + MODULE PROCEDURE h5awrite_integer_4 + MODULE PROCEDURE h5awrite_integer_5 + MODULE PROCEDURE h5awrite_integer_6 + MODULE PROCEDURE h5awrite_integer_7 + MODULE PROCEDURE h5awrite_char_scalar + MODULE PROCEDURE h5awrite_char_1 + MODULE PROCEDURE h5awrite_char_2 + MODULE PROCEDURE h5awrite_char_3 + MODULE PROCEDURE h5awrite_char_4 + MODULE PROCEDURE h5awrite_char_5 + MODULE PROCEDURE h5awrite_char_6 + MODULE PROCEDURE h5awrite_char_7 + MODULE PROCEDURE h5awrite_real_scalar + MODULE PROCEDURE h5awrite_real_1 + MODULE PROCEDURE h5awrite_real_2 + MODULE PROCEDURE h5awrite_real_3 + MODULE PROCEDURE h5awrite_real_4 + MODULE PROCEDURE h5awrite_real_5 + MODULE PROCEDURE h5awrite_real_6 + MODULE PROCEDURE h5awrite_real_7 + ! This is the preferred way to call h5awrite + ! by passing an address + MODULE PROCEDURE h5awrite_ptr + + END INTERFACE + + INTERFACE h5aread_f + + MODULE PROCEDURE h5aread_integer_scalar + MODULE PROCEDURE h5aread_integer_1 + MODULE PROCEDURE h5aread_integer_2 + MODULE PROCEDURE h5aread_integer_3 + MODULE PROCEDURE h5aread_integer_4 + MODULE PROCEDURE h5aread_integer_5 + MODULE PROCEDURE h5aread_integer_6 + MODULE PROCEDURE h5aread_integer_7 + MODULE PROCEDURE h5aread_char_scalar + MODULE PROCEDURE h5aread_char_1 + MODULE PROCEDURE h5aread_char_2 + MODULE PROCEDURE h5aread_char_3 + MODULE PROCEDURE h5aread_char_4 + MODULE PROCEDURE h5aread_char_5 + MODULE PROCEDURE h5aread_char_6 + MODULE PROCEDURE h5aread_char_7 + MODULE PROCEDURE h5aread_real_scalar + MODULE PROCEDURE h5aread_real_1 + MODULE PROCEDURE h5aread_real_2 + MODULE PROCEDURE h5aread_real_3 + MODULE PROCEDURE h5aread_real_4 + MODULE PROCEDURE h5aread_real_5 + MODULE PROCEDURE h5aread_real_6 + MODULE PROCEDURE h5aread_real_7 + + ! This is the preferred way to call h5aread + ! by passing an address + MODULE PROCEDURE h5aread_ptr + + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Awrite routine + + INTERFACE + INTEGER FUNCTION h5awrite_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5awrite_f_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5awrite_f_c + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Aread routine + + INTERFACE + INTEGER FUNCTION h5aread_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5aread_f_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5aread_f_c + END INTERFACE + +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 + SUBROUTINE h5acreate_f(loc_id, name, type_id, space_id, attr_id, & + hdferr, acpl_id, aapl_id ) + USE ISO_C_BINDING + 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) :: acpl_id_default + INTEGER(HID_T) :: aapl_id_default + CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name + INTERFACE + INTEGER(HID_T) FUNCTION H5Acreate2(loc_id, name, type_id, & + space_id, acpl_id_default, aapl_id_default) BIND(C,NAME='H5Acreate2') + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN), VALUE :: loc_id + CHARACTER(LEN=1), DIMENSION(*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(IN), VALUE :: type_id + INTEGER(HID_T), INTENT(IN), VALUE :: space_id + INTEGER(HID_T), INTENT(IN), VALUE :: acpl_id_default + INTEGER(HID_T), INTENT(IN), VALUE :: aapl_id_default + END FUNCTION H5Acreate2 + END INTERFACE + + acpl_id_default = H5P_DEFAULT_F + aapl_id_default = H5P_DEFAULT_F + IF (PRESENT(acpl_id)) acpl_id_default = acpl_id + IF (PRESENT(aapl_id)) aapl_id_default = aapl_id + + c_name = TRIM(name)//C_NULL_CHAR + attr_id = h5acreate2(loc_id, c_name, type_id, space_id, & + acpl_id_default, aapl_id_default) + + hdferr = 0 + IF(attr_id.LT.0) hdferr = -1 + + 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 atttribute 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 + SUBROUTINE H5Aopen_name_f(obj_id, name, attr_id, hdferr) + USE ISO_C_BINDING + 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 +!***** + CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name + + INTERFACE + INTEGER(HID_T) FUNCTION H5Aopen_name(obj_id, name) BIND(C,NAME='H5Aopen_name') + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN), VALUE :: obj_id + CHARACTER(LEN=1), DIMENSION(*), INTENT(IN) :: name + END FUNCTION H5Aopen_name + END INTERFACE + + c_name = TRIM(name)//C_NULL_CHAR + attr_id = H5Aopen_name(obj_id, c_name) + + hdferr = 0 + 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 + SUBROUTINE H5Aopen_idx_f(obj_id, index, attr_id, hdferr) + USE ISO_C_BINDING + 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 +!***** + + INTERFACE + INTEGER(HID_T) FUNCTION H5Aopen_idx(obj_id, index) BIND(C,NAME='H5Aopen_idx') + USE ISO_C_BINDING + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(C_INT), INTENT(IN) :: index + END FUNCTION H5Aopen_idx + END INTERFACE + + attr_id = H5Aopen_idx(obj_id, INT(index, C_INT)) + + hdferr = 0 + 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 + 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 +!***** + INTERFACE + INTEGER(HID_T) FUNCTION H5Aget_space(attr_id) BIND(C,NAME='H5Aget_space') + USE ISO_C_BINDING + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aget_space + END INTERFACE + + space_id = H5Aget_space(attr_id) + + hdferr = 0 + 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 + 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 +!***** + INTERFACE + INTEGER(HID_T) FUNCTION H5Aget_type(attr_id) BIND(C,NAME='H5Aget_type') + USE ISO_C_BINDING + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aget_type + END INTERFACE + + type_id = H5Aget_type(attr_id) + + hdferr = 0 + 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 + SUBROUTINE H5Aget_name_f(attr_id, size, buf, hdferr) + USE ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(LEN=*), INTENT(INOUT) :: buf + INTEGER, INTENT(OUT) :: hdferr + + CHARACTER(KIND=C_CHAR, LEN=LEN(buf)+1) :: c_buf + +!***** + INTERFACE + INTEGER FUNCTION H5Aget_name(attr_id, size, buf) BIND(C, NAME='H5Aget_name') + USE ISO_C_BINDING + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + INTEGER(SIZE_T), INTENT(IN), VALUE :: size + CHARACTER(KIND=C_CHAR, LEN=1), DIMENSION(*), INTENT(OUT) :: buf + END FUNCTION H5Aget_name + END INTERFACE + + ! add 1 for the null char + hdferr = H5Aget_name(attr_id, size+1, c_buf) + + CALL C2F_string(c_buf, 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 + 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 ! Identifer 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 + ! 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 +!***** + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: size_default + + INTERFACE + INTEGER FUNCTION h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & + n, name, size_default, lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_NAME_BY_IDX_C'::h5aget_name_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, name + 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 + + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER(SIZE_T) :: size_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + END FUNCTION h5aget_name_by_idx_c + END INTERFACE + + obj_namelen = LEN(obj_name) + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + size_default = LEN(name) + + hdferr = h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & + n, name, size_default, lapl_id_default) + + IF(PRESENT(size)) size = size_default + + + END SUBROUTINE h5aget_name_by_idx_f +!!$ SUBROUTINE H5Aget_name_by_idx_f(loc_id, obj_name, idx_type, order, & +!!$ n, name, hdferr, size, lapl_id) +!!$ USE ISO_C_BINDING +!!$ IMPLICIT NONE +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer 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 +!!$ ! 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 +!!$!***** +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ INTEGER(SIZE_T) :: obj_namelen +!!$ INTEGER(SIZE_T) :: size_default, c_size +!!$ CHARACTER(KIND=C_CHAR, LEN=LEN(name)+1) :: c_name +!!$ +!!$ INTERFACE +!!$ INTEGER FUNCTION H5Aget_name_by_idx(loc_id, obj_name, idx_type, order, & +!!$ n, name, size_default, lapl_id_default) BIND(C, NAME='H5Aget_name_by_idx') +!!$ USE ISO_C_BINDING +!!$ USE H5GLOBAL +!!$ INTEGER(HID_T), INTENT(IN) :: loc_id +!!$ CHARACTER(KIND=C_CHAR, LEN=1), DIMENSION(*), INTENT(IN) :: obj_name +!!$ INTEGER(C_INT), INTENT(IN) :: idx_type +!!$ INTEGER(C_INT), INTENT(IN) :: order +!!$ INTEGER(HSIZE_T), INTENT(IN) :: n +!!$ CHARACTER(KIND=C_CHAR,LEN=1), DIMENSION(*), INTENT(OUT) :: name +!!$ INTEGER(SIZE_T) :: size_default +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ END FUNCTION H5Aget_name_by_idx +!!$ END INTERFACE +!!$ +!!$ obj_namelen = LEN(obj_name) +!!$ lapl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id +!!$ +!!$ size_default = LEN(name) +!!$ +!!$ c_size = H5Aget_name_by_idx(loc_id, TRIM(obj_name)//C_NULL_CHAR, INT(idx_type,C_INT), INT(order,C_INT), & +!!$ n, c_name, size_default, lapl_id_default) +!!$ +!!$ IF(c_size.LT.0) THEN +!!$ hdferr = -1 +!!$ ELSE +!!$ CALL C2F_string(c_name, name) +!!$ IF(PRESENT(size)) size = c_size +!!$ ENDIF +!!$ +!!$ 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 + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5aget_num_attrs_c(obj_id, attr_num) BIND(C,name='h5aget_num_attrs_c') + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: attr_num + END FUNCTION h5aget_num_attrs_c + END INTERFACE + + 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 + 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(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION H5Adelete_c(obj_id, name, namelen) BIND(C,NAME='h5adelete_c') + USE ISO_C_BINDING + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) :: namelen + END FUNCTION H5Adelete_c + END INTERFACE + + namelen = LEN(name) + 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 + + SUBROUTINE H5Aclose_f(attr_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION H5Aclose(attr_id) BIND(C, NAME='H5Aclose') + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aclose + END INTERFACE + + 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 + 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 +!***** + + INTERFACE + INTEGER(HSIZE_T) FUNCTION H5Aget_storage_size(attr_id) BIND(C,NAME='H5Aget_storage_size') + USE ISO_C_BINDING + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aget_storage_size + END INTERFACE + + size = H5Aget_storage_size(attr_id) + + hdferr = 0 + IF(size.LT.0) hdferr = -1 + + 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 + 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 +!***** + INTERFACE + INTEGER(HID_T) FUNCTION H5Aget_create_plist(attr_id) BIND(C,NAME='H5Aget_create_plist') + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN), VALUE :: attr_id + END FUNCTION H5Aget_create_plist + END INTERFACE + + creation_prop_id = H5Aget_create_plist(attr_id) + + 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 + 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) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: old_attr_namelen + INTEGER(SIZE_T) :: new_attr_namelen + + INTERFACE + INTEGER FUNCTION H5Arename_by_name_c(loc_id, obj_name, obj_namelen, & + old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & + lapl_id_default) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_BY_NAME_C'::H5Arename_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, old_attr_name, new_attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(SIZE_T) :: obj_namelen + CHARACTER(LEN=*), INTENT(IN) :: old_attr_name + INTEGER(SIZE_T) :: old_attr_namelen + CHARACTER(LEN=*), INTENT(IN) :: new_attr_name + INTEGER(SIZE_T) :: new_attr_namelen + INTEGER(HID_T) :: lapl_id_default + + END FUNCTION H5Arename_by_name_c + END INTERFACE + + obj_namelen = LEN(obj_name) + old_attr_namelen = LEN(old_attr_name) + new_attr_namelen = LEN(new_attr_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default=lapl_id + + hdferr = H5Arename_by_name_c(loc_id, obj_name, obj_namelen, & + old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & + lapl_id_default) + + 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 - Identifer 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 + 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) :: aapl_id_default + + INTEGER(SIZE_T) :: attr_namelen + + INTERFACE + INTEGER FUNCTION H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_C'::H5Aopen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(HID_T) :: aapl_id_default + INTEGER(SIZE_T) :: attr_namelen + INTEGER(HID_T), INTENT(OUT) :: attr_id + END FUNCTION H5Aopen_c + END INTERFACE + + attr_namelen = LEN(attr_name) + + aapl_id_default = H5P_DEFAULT_F + IF(PRESENT(aapl_id)) aapl_id_default = aapl_id + + hdferr = H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) + + 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 + 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 ! Identifer 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(SIZE_T) :: obj_namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_IDX_C'::H5Adelete_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name + 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(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: obj_namelen + END FUNCTION H5Adelete_by_idx_c + END INTERFACE + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + obj_namelen = LEN(obj_name) + hdferr = H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) + + 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 - Identifer 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 + SUBROUTINE H5Adelete_by_name_f(loc_id, obj_name, attr_name, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer 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(SIZE_T) :: attr_namelen + INTEGER(SIZE_T) :: obj_namelen + + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_NAME_C'::H5Adelete_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: attr_namelen + INTEGER(SIZE_T) :: obj_namelen + END FUNCTION H5Adelete_by_name_c + END INTERFACE + + obj_namelen = LEN(obj_name) + attr_namelen = LEN(attr_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) + + 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 + 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(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index + + 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(SIZE_T) :: obj_namelen + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & + aapl_id_default, lapl_id_default, attr_id) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_IDX_C'::H5Aopen_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name + 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(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 + END FUNCTION H5Aopen_by_idx_c + END INTERFACE + + obj_namelen = LEN(obj_name) + + aapl_id_default = H5P_DEFAULT_F + IF(PRESENT(aapl_id)) aapl_id_default = aapl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & + aapl_id_default, lapl_id_default, attr_id) + + 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 + 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 :: corder_valid + + INTERFACE + INTEGER FUNCTION H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_C'::H5Aget_info_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: attr_id + + INTEGER, INTENT(OUT) :: corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HSIZE_T), INTENT(OUT) :: data_size + END FUNCTION H5Aget_info_c + END INTERFACE + + hdferr = H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size) + + f_corder_valid =.FALSE. + IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. + + + 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 + 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 + ! 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(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list +!***** + INTEGER :: corder_valid + INTEGER(SIZE_T) :: obj_namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & + corder_valid, corder, cset, data_size) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_IDX_C'::H5Aget_info_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name + 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(HID_T) :: lapl_id_default + INTEGER, INTENT(OUT) :: corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HSIZE_T), INTENT(OUT) :: data_size + + INTEGER(SIZE_T) :: obj_namelen + END FUNCTION H5Aget_info_by_idx_c + END INTERFACE + + obj_namelen = LEN(obj_name) + + lapl_id_default = H5P_DEFAULT_F + IF(present(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & + corder_valid, corder, cset, data_size) + + f_corder_valid =.FALSE. + IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. + + 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 + 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 :: corder_valid + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: attr_namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & + corder_valid, corder, cset, data_size) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_NAME_C'::H5Aget_info_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(SIZE_T), INTENT(IN) :: obj_namelen + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(SIZE_T), INTENT(IN) :: attr_namelen + INTEGER(HID_T) :: lapl_id_default + INTEGER, INTENT(OUT) :: corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HSIZE_T), INTENT(OUT) :: data_size + + END FUNCTION H5Aget_info_by_name_c + END INTERFACE + + obj_namelen = LEN(obj_name) + attr_namelen = LEN(attr_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & + corder_valid, corder, cset, data_size) + + f_corder_valid =.FALSE. + IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. + + 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 + 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 + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(OUT) :: attr + INTEGER, INTENT(OUT) :: hdferr + + 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 + + INTEGER(HID_T) :: acpl_id_default + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ACREATE_BY_NAME_C'::H5Acreate_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(SIZE_T), INTENT(IN) :: obj_namelen + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(SIZE_T), INTENT(IN) :: attr_namelen + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T) :: acpl_id_default + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(HID_T), INTENT(OUT) :: attr + + END FUNCTION H5Acreate_by_name_c + END INTERFACE + + obj_namelen = LEN(obj_name) + attr_namelen = LEN(attr_name) + + acpl_id_default = H5P_DEFAULT_F + aapl_id_default = H5P_DEFAULT_F + lapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(acpl_id)) acpl_id_default = acpl_id + IF(PRESENT(aapl_id)) aapl_id_default = aapl_id + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + 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 + 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) :: attr_exists_c + INTEGER(SIZE_T) :: attr_namelen + + INTERFACE + INTEGER FUNCTION H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_C'::H5Aexists_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: attr_name + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(SIZE_T) :: attr_namelen + INTEGER(HID_T) :: attr_exists_c + END FUNCTION H5Aexists_c + END INTERFACE + + attr_namelen = LEN(attr_name) + + hdferr = H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) + + attr_exists = .FALSE. + IF(attr_exists_c.GT.0) attr_exists = .TRUE. + + 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 + 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 :: attr_exists_c + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: attr_namelen + + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_BY_NAME_C'::H5Aexists_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(SIZE_T), INTENT(IN) :: obj_namelen + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(SIZE_T), INTENT(IN) :: attr_namelen + INTEGER(HID_T), INTENT(IN) :: lapl_id_default + INTEGER, INTENT(OUT) :: attr_exists_c + END FUNCTION H5Aexists_by_name_c + END INTERFACE + + attr_namelen = LEN(attr_name) + obj_namelen = LEN(obj_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) + + attr_exists = .FALSE. + 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 + 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) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: attr_namelen + + INTERFACE + INTEGER FUNCTION H5Aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + aapl_id_default, lapl_id_default, attr_id) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_NAME_C'::H5Aopen_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: obj_name, attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: obj_name + INTEGER(SIZE_T), INTENT(IN) :: obj_namelen + CHARACTER(LEN=*), INTENT(IN) :: attr_name + INTEGER(SIZE_T), INTENT(IN) :: attr_namelen + INTEGER(HID_T) :: aapl_id_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(HID_T), INTENT(OUT) :: attr_id + END FUNCTION H5Aopen_by_name_c + END INTERFACE + + attr_namelen = LEN(attr_name) + obj_namelen = LEN(obj_name) + + aapl_id_default = H5P_DEFAULT_F + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(aapl_id)) aapl_id_default = aapl_id + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = H5Aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & + aapl_id_default, lapl_id_default, attr_id) + + 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 + 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(SIZE_T) :: old_attr_namelen + INTEGER(SIZE_T) :: new_attr_namelen + + INTERFACE + INTEGER FUNCTION H5Arename_c(loc_id, & + old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) + USE ISO_C_BINDING + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_C'::H5Arename_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: old_attr_name, new_attr_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: old_attr_name + INTEGER(SIZE_T) :: old_attr_namelen + CHARACTER(LEN=*), INTENT(IN) :: new_attr_name + INTEGER(SIZE_T) :: new_attr_namelen + + END FUNCTION H5Arename_c + END INTERFACE + + old_attr_namelen = LEN(old_attr_name) + new_attr_namelen = LEN(new_attr_name) + + hdferr = H5Arename_c(loc_id, & + old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) + + END SUBROUTINE H5Arename_f + + +!****s* H5A (F03)/H5Awrite_f_F90 +! +! NAME +! H5Awrite_f_F90 +! +! PURPOSE +! Writes an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! 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 +! 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 +! +! dims parameter was added to make code portable; +! Aprile 4, 2001 +! +! Changed buf intent to INOUT to be consistant +! 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, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions. +! +! Fortran90 Interface: +!! 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 , INTENT(IN) :: buf +!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + + SUBROUTINE H5Awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(IN), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_scalar + + SUBROUTINE H5Awrite_integer_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(IN) , & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_integer_1 + + + SUBROUTINE H5Awrite_integer_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(IN) , & + DIMENSION(dims(1),dims(2)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_2 + + SUBROUTINE H5Awrite_integer_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_3 + + + SUBROUTINE H5Awrite_integer_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_4 + + + SUBROUTINE H5Awrite_integer_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_5 + + + SUBROUTINE H5Awrite_integer_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_integer_6 + + + SUBROUTINE H5Awrite_integer_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), & + TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_integer_7 + + + SUBROUTINE H5Awrite_real_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + REAL, INTENT(IN), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_scalar + + SUBROUTINE H5Awrite_real_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + REAL, INTENT(IN), & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_real_1 + + + SUBROUTINE H5Awrite_real_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_real_2 + + + SUBROUTINE H5Awrite_real_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_3 + + + SUBROUTINE H5Awrite_real_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_4 + + + SUBROUTINE H5Awrite_real_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_5 + + + SUBROUTINE H5Awrite_real_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_6 + + + SUBROUTINE H5Awrite_real_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Awrite_real_7 + + SUBROUTINE H5Awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + + CALL H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), dims, hdferr) + + END SUBROUTINE H5Awrite_char_scalar + + SUBROUTINE H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, buf_len, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_scalar_fix + + SUBROUTINE H5Awrite_char_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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), DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_1 + + SUBROUTINE H5Awrite_char_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)(1:1)) + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_2 + + SUBROUTINE H5Awrite_char_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_3 + + SUBROUTINE H5Awrite_char_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_4 + + SUBROUTINE H5Awrite_char_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_5 + + + SUBROUTINE H5Awrite_char_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) + + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_6 + + SUBROUTINE H5Awrite_char_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) + hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Awrite_char_7 + +!****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, DOUBLE PRECISION 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) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(IN), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = H5Awrite_f_c(attr_id, mem_type_id, buf) + + END SUBROUTINE H5Awrite_ptr + +!****s* H5A (F03)/H5Aread_f_F90 +! +! NAME +! H5Aread_f_F90 +! +! PURPOSE +! Reads an attribute. +! +! Inputs: +! attr_id - Attribute identifier +! memtype_id - Attribute datatype identifier (in memory) +! 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 +! +! 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 consistant +! 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, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions. +! Fortran90 Interface: +!! 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 , INTENT(INOUT) :: buf +!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims +!! INTEGER , INTENT(OUT) :: hdferr +!***** + SUBROUTINE H5Aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(INOUT), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_scalar + + SUBROUTINE H5Aread_integer_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(INOUT), DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_1 + + + SUBROUTINE H5Aread_integer_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(INOUT),DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_2 + + + SUBROUTINE H5Aread_integer_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_3 + + + SUBROUTINE H5Aread_integer_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_4 + + + SUBROUTINE H5Aread_integer_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_5 + + + SUBROUTINE H5Aread_integer_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_6 + + + SUBROUTINE H5Aread_integer_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_integer_7 + + + SUBROUTINE H5Aread_real_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + REAL, INTENT(INOUT), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_scalar + + SUBROUTINE H5Aread_real_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + REAL, INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_1 + + + SUBROUTINE H5Aread_real_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_2 + + + SUBROUTINE H5Aread_real_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_3 + + + SUBROUTINE H5Aread_real_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_4 + + + SUBROUTINE H5Aread_real_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_5 + + + SUBROUTINE H5Aread_real_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_6 + + + SUBROUTINE H5Aread_real_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + END SUBROUTINE H5Aread_real_7 + + SUBROUTINE H5Aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + + CALL H5Aread_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), hdferr) + + END SUBROUTINE H5Aread_char_scalar + + SUBROUTINE H5Aread_char_scalar_fix(attr_id, memtype_id, buf, buf_len, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER, INTENT(IN) :: buf_len + CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1:1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_scalar_fix + + SUBROUTINE H5Aread_char_1(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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), & + DIMENSION(dims(1)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_1 + + + SUBROUTINE H5Aread_char_2(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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), & + DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_2 + + + SUBROUTINE H5Aread_char_3(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_3 + + SUBROUTINE H5Aread_char_4(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1)(1:1)) + + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_4 + + SUBROUTINE H5Aread_char_5(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_5 + + + SUBROUTINE H5Aread_char_6(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_6 + + + SUBROUTINE H5Aread_char_7(attr_id, memtype_id, buf, dims, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) + hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) + + END SUBROUTINE H5Aread_char_7 + + +!****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 consistant +! 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, DOUBLE PRECISION 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) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(INOUT), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + + hdferr = H5Aread_f_c(attr_id, mem_type_id, buf) + + END SUBROUTINE H5Aread_ptr + +END MODULE H5A + + diff --git a/fortran/src/H5Aff.f90 b/fortran/src/H5Aff.f90 deleted file mode 100644 index f8f361f..0000000 --- a/fortran/src/H5Aff.f90 +++ /dev/null @@ -1,2961 +0,0 @@ -!****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. -! -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! NOTES -! -! (A) C_LOC and character strings according to the Fortran 2003 standard: -! -! 15.1.2.5 C_LOC(X) -! -! Argument. X shall either -! -! (1) have interoperable type and type parameters and be -! (a) a variable that has the TARGET attribute and is interoperable, -! (b) an allocated allocatable variable that has the TARGET attribute -! and is not an array of zero size, or -! (c) an associated scalar pointer, or -! (2) be a nonpolymorphic scalar, have no length type parameters, and be -! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, -! (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: -! -! 15.2.1 Interoperability of intrinsic types -! -! ...if the type is character, interoperability also requires that the length type parameter -! be omitted or be specified by an initialization expression whose value is one. -! -! THEREFORE compilers that have not extended the standard require -! -! CHARACTER(LEN=1), TARGET :: chr -! or -! CHARACTER, TARGET :: chr -! -! (B) -! *** IMPORTANT *** -! If you add a new H5A 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. -! -!***** - -MODULE H5A - - USE H5GLOBAL -! -! On Windows there are no big (integer*8) integers, so overloading -! for bug #670 does not work. I have to use DEC compilation directives to make -! Windows DEC Visual Fortran and OSF compilers happy and do right things. -! 05/01/02 EP -! - INTERFACE h5awrite_f - MODULE PROCEDURE h5awrite_integer_scalar - MODULE PROCEDURE h5awrite_integer_1 - MODULE PROCEDURE h5awrite_integer_2 - MODULE PROCEDURE h5awrite_integer_3 - MODULE PROCEDURE h5awrite_integer_4 - MODULE PROCEDURE h5awrite_integer_5 - MODULE PROCEDURE h5awrite_integer_6 - MODULE PROCEDURE h5awrite_integer_7 - MODULE PROCEDURE h5awrite_char_scalar - MODULE PROCEDURE h5awrite_char_1 - MODULE PROCEDURE h5awrite_char_2 - MODULE PROCEDURE h5awrite_char_3 - MODULE PROCEDURE h5awrite_char_4 - MODULE PROCEDURE h5awrite_char_5 - MODULE PROCEDURE h5awrite_char_6 - MODULE PROCEDURE h5awrite_char_7 - MODULE PROCEDURE h5awrite_real_scalar - MODULE PROCEDURE h5awrite_real_1 - MODULE PROCEDURE h5awrite_real_2 - MODULE PROCEDURE h5awrite_real_3 - MODULE PROCEDURE h5awrite_real_4 - MODULE PROCEDURE h5awrite_real_5 - MODULE PROCEDURE h5awrite_real_6 - MODULE PROCEDURE h5awrite_real_7 - ! This is the preferred way to call h5awrite - ! by passing an address - MODULE PROCEDURE h5awrite_ptr - - END INTERFACE - - INTERFACE h5aread_f - - MODULE PROCEDURE h5aread_integer_scalar - MODULE PROCEDURE h5aread_integer_1 - MODULE PROCEDURE h5aread_integer_2 - MODULE PROCEDURE h5aread_integer_3 - MODULE PROCEDURE h5aread_integer_4 - MODULE PROCEDURE h5aread_integer_5 - MODULE PROCEDURE h5aread_integer_6 - MODULE PROCEDURE h5aread_integer_7 - MODULE PROCEDURE h5aread_char_scalar - MODULE PROCEDURE h5aread_char_1 - MODULE PROCEDURE h5aread_char_2 - MODULE PROCEDURE h5aread_char_3 - MODULE PROCEDURE h5aread_char_4 - MODULE PROCEDURE h5aread_char_5 - MODULE PROCEDURE h5aread_char_6 - MODULE PROCEDURE h5aread_char_7 - MODULE PROCEDURE h5aread_real_scalar - MODULE PROCEDURE h5aread_real_1 - MODULE PROCEDURE h5aread_real_2 - MODULE PROCEDURE h5aread_real_3 - MODULE PROCEDURE h5aread_real_4 - MODULE PROCEDURE h5aread_real_5 - MODULE PROCEDURE h5aread_real_6 - MODULE PROCEDURE h5aread_real_7 - - ! This is the preferred way to call h5aread - ! by passing an address - MODULE PROCEDURE h5aread_ptr - - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Awrite routine - - INTERFACE - INTEGER FUNCTION h5awrite_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5awrite_f_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5awrite_f_c - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Aread routine - - INTERFACE - INTEGER FUNCTION h5aread_f_c(attr_id, mem_type_id, buf) BIND(C, NAME='h5aread_f_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5aread_f_c - END INTERFACE - -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 - SUBROUTINE h5acreate_f(loc_id, name, type_id, space_id, attr_id, & - hdferr, acpl_id, aapl_id ) - USE ISO_C_BINDING - 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) :: acpl_id_default - INTEGER(HID_T) :: aapl_id_default - CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name - INTERFACE - INTEGER(HID_T) FUNCTION H5Acreate2(loc_id, name, type_id, & - space_id, acpl_id_default, aapl_id_default) BIND(C,NAME='H5Acreate2') - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN), VALUE :: loc_id - CHARACTER(LEN=1), DIMENSION(*), INTENT(IN) :: name - INTEGER(HID_T), INTENT(IN), VALUE :: type_id - INTEGER(HID_T), INTENT(IN), VALUE :: space_id - INTEGER(HID_T), INTENT(IN), VALUE :: acpl_id_default - INTEGER(HID_T), INTENT(IN), VALUE :: aapl_id_default - END FUNCTION H5Acreate2 - END INTERFACE - - acpl_id_default = H5P_DEFAULT_F - aapl_id_default = H5P_DEFAULT_F - IF (PRESENT(acpl_id)) acpl_id_default = acpl_id - IF (PRESENT(aapl_id)) aapl_id_default = aapl_id - - c_name = TRIM(name)//C_NULL_CHAR - attr_id = h5acreate2(loc_id, c_name, type_id, space_id, & - acpl_id_default, aapl_id_default) - - hdferr = 0 - IF(attr_id.LT.0) hdferr = -1 - - 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 atttribute 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 - SUBROUTINE H5Aopen_name_f(obj_id, name, attr_id, hdferr) - USE ISO_C_BINDING - 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 -!***** - CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name - - INTERFACE - INTEGER(HID_T) FUNCTION H5Aopen_name(obj_id, name) BIND(C,NAME='H5Aopen_name') - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN), VALUE :: obj_id - CHARACTER(LEN=1), DIMENSION(*), INTENT(IN) :: name - END FUNCTION H5Aopen_name - END INTERFACE - - c_name = TRIM(name)//C_NULL_CHAR - attr_id = H5Aopen_name(obj_id, c_name) - - hdferr = 0 - 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 - SUBROUTINE H5Aopen_idx_f(obj_id, index, attr_id, hdferr) - USE ISO_C_BINDING - 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 -!***** - - INTERFACE - INTEGER(HID_T) FUNCTION H5Aopen_idx(obj_id, index) BIND(C,NAME='H5Aopen_idx') - USE ISO_C_BINDING - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER(C_INT), INTENT(IN) :: index - END FUNCTION H5Aopen_idx - END INTERFACE - - attr_id = H5Aopen_idx(obj_id, INT(index, C_INT)) - - hdferr = 0 - 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 - 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 -!***** - INTERFACE - INTEGER(HID_T) FUNCTION H5Aget_space(attr_id) BIND(C,NAME='H5Aget_space') - USE ISO_C_BINDING - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - END FUNCTION H5Aget_space - END INTERFACE - - space_id = H5Aget_space(attr_id) - - hdferr = 0 - 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 - 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 -!***** - INTERFACE - INTEGER(HID_T) FUNCTION H5Aget_type(attr_id) BIND(C,NAME='H5Aget_type') - USE ISO_C_BINDING - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - END FUNCTION H5Aget_type - END INTERFACE - - type_id = H5Aget_type(attr_id) - - hdferr = 0 - 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 - SUBROUTINE H5Aget_name_f(attr_id, size, buf, hdferr) - USE ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(LEN=*), INTENT(INOUT) :: buf - INTEGER, INTENT(OUT) :: hdferr - - CHARACTER(KIND=C_CHAR, LEN=LEN(buf)+1) :: c_buf - -!***** - INTERFACE - INTEGER FUNCTION H5Aget_name(attr_id, size, buf) BIND(C, NAME='H5Aget_name') - USE ISO_C_BINDING - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - INTEGER(SIZE_T), INTENT(IN), VALUE :: size - CHARACTER(KIND=C_CHAR, LEN=1), DIMENSION(*), INTENT(OUT) :: buf - END FUNCTION H5Aget_name - END INTERFACE - - ! add 1 for the null char - hdferr = H5Aget_name(attr_id, size+1, c_buf) - - CALL C2F_string(c_buf, 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 - 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 ! Identifer 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 - ! 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 -!***** - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: size_default - - INTERFACE - INTEGER FUNCTION h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & - n, name, size_default, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_NAME_BY_IDX_C'::h5aget_name_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, name - 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 - - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER(SIZE_T) :: size_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - END FUNCTION h5aget_name_by_idx_c - END INTERFACE - - obj_namelen = LEN(obj_name) - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - size_default = LEN(name) - - hdferr = h5aget_name_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, & - n, name, size_default, lapl_id_default) - - IF(PRESENT(size)) size = size_default - - - END SUBROUTINE h5aget_name_by_idx_f -!!$ SUBROUTINE H5Aget_name_by_idx_f(loc_id, obj_name, idx_type, order, & -!!$ n, name, hdferr, size, lapl_id) -!!$ USE ISO_C_BINDING -!!$ IMPLICIT NONE -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer 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 -!!$ ! 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 -!!$!***** -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ INTEGER(SIZE_T) :: obj_namelen -!!$ INTEGER(SIZE_T) :: size_default, c_size -!!$ CHARACTER(KIND=C_CHAR, LEN=LEN(name)+1) :: c_name -!!$ -!!$ INTERFACE -!!$ INTEGER FUNCTION H5Aget_name_by_idx(loc_id, obj_name, idx_type, order, & -!!$ n, name, size_default, lapl_id_default) BIND(C, NAME='H5Aget_name_by_idx') -!!$ USE ISO_C_BINDING -!!$ USE H5GLOBAL -!!$ INTEGER(HID_T), INTENT(IN) :: loc_id -!!$ CHARACTER(KIND=C_CHAR, LEN=1), DIMENSION(*), INTENT(IN) :: obj_name -!!$ INTEGER(C_INT), INTENT(IN) :: idx_type -!!$ INTEGER(C_INT), INTENT(IN) :: order -!!$ INTEGER(HSIZE_T), INTENT(IN) :: n -!!$ CHARACTER(KIND=C_CHAR,LEN=1), DIMENSION(*), INTENT(OUT) :: name -!!$ INTEGER(SIZE_T) :: size_default -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ END FUNCTION H5Aget_name_by_idx -!!$ END INTERFACE -!!$ -!!$ obj_namelen = LEN(obj_name) -!!$ lapl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id -!!$ -!!$ size_default = LEN(name) -!!$ -!!$ c_size = H5Aget_name_by_idx(loc_id, TRIM(obj_name)//C_NULL_CHAR, INT(idx_type,C_INT), INT(order,C_INT), & -!!$ n, c_name, size_default, lapl_id_default) -!!$ -!!$ IF(c_size.LT.0) THEN -!!$ hdferr = -1 -!!$ ELSE -!!$ CALL C2F_string(c_name, name) -!!$ IF(PRESENT(size)) size = c_size -!!$ ENDIF -!!$ -!!$ 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 - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5aget_num_attrs_c(obj_id, attr_num) BIND(C,name='h5aget_num_attrs_c') - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: attr_num - END FUNCTION h5aget_num_attrs_c - END INTERFACE - - 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 - 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(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION H5Adelete_c(obj_id, name, namelen) BIND(C,NAME='h5adelete_c') - USE ISO_C_BINDING - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) :: namelen - END FUNCTION H5Adelete_c - END INTERFACE - - namelen = LEN(name) - 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 - - SUBROUTINE H5Aclose_f(attr_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION H5Aclose(attr_id) BIND(C, NAME='H5Aclose') - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - END FUNCTION H5Aclose - END INTERFACE - - 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 - 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 -!***** - - INTERFACE - INTEGER(HSIZE_T) FUNCTION H5Aget_storage_size(attr_id) BIND(C,NAME='H5Aget_storage_size') - USE ISO_C_BINDING - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - END FUNCTION H5Aget_storage_size - END INTERFACE - - size = H5Aget_storage_size(attr_id) - - hdferr = 0 - IF(size.LT.0) hdferr = -1 - - 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 - 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 -!***** - INTERFACE - INTEGER(HID_T) FUNCTION H5Aget_create_plist(attr_id) BIND(C,NAME='H5Aget_create_plist') - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN), VALUE :: attr_id - END FUNCTION H5Aget_create_plist - END INTERFACE - - creation_prop_id = H5Aget_create_plist(attr_id) - - 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 - 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) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: old_attr_namelen - INTEGER(SIZE_T) :: new_attr_namelen - - INTERFACE - INTEGER FUNCTION H5Arename_by_name_c(loc_id, obj_name, obj_namelen, & - old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & - lapl_id_default) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_BY_NAME_C'::H5Arename_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, old_attr_name, new_attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(SIZE_T) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: old_attr_name - INTEGER(SIZE_T) :: old_attr_namelen - CHARACTER(LEN=*), INTENT(IN) :: new_attr_name - INTEGER(SIZE_T) :: new_attr_namelen - INTEGER(HID_T) :: lapl_id_default - - END FUNCTION H5Arename_by_name_c - END INTERFACE - - obj_namelen = LEN(obj_name) - old_attr_namelen = LEN(old_attr_name) - new_attr_namelen = LEN(new_attr_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default=lapl_id - - hdferr = H5Arename_by_name_c(loc_id, obj_name, obj_namelen, & - old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen, & - lapl_id_default) - - 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 - Identifer 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 - 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) :: aapl_id_default - - INTEGER(SIZE_T) :: attr_namelen - - INTERFACE - INTEGER FUNCTION H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_C'::H5Aopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(HID_T) :: aapl_id_default - INTEGER(SIZE_T) :: attr_namelen - INTEGER(HID_T), INTENT(OUT) :: attr_id - END FUNCTION H5Aopen_c - END INTERFACE - - attr_namelen = LEN(attr_name) - - aapl_id_default = H5P_DEFAULT_F - IF(PRESENT(aapl_id)) aapl_id_default = aapl_id - - hdferr = H5Aopen_c(obj_id, attr_name, attr_namelen, aapl_id_default, attr_id) - - 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 - 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 ! Identifer 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(SIZE_T) :: obj_namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_IDX_C'::H5Adelete_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name - 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(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: obj_namelen - END FUNCTION H5Adelete_by_idx_c - END INTERFACE - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - obj_namelen = LEN(obj_name) - hdferr = H5Adelete_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default) - - 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 - Identifer 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 - SUBROUTINE H5Adelete_by_name_f(loc_id, obj_name, attr_name, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! Identifer 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(SIZE_T) :: attr_namelen - INTEGER(SIZE_T) :: obj_namelen - - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ADELETE_BY_NAME_C'::H5Adelete_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: attr_namelen - INTEGER(SIZE_T) :: obj_namelen - END FUNCTION H5Adelete_by_name_c - END INTERFACE - - obj_namelen = LEN(obj_name) - attr_namelen = LEN(attr_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Adelete_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default) - - 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 - 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(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index - - 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(SIZE_T) :: obj_namelen - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & - aapl_id_default, lapl_id_default, attr_id) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_IDX_C'::H5Aopen_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name - 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(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 - END FUNCTION H5Aopen_by_idx_c - END INTERFACE - - obj_namelen = LEN(obj_name) - - aapl_id_default = H5P_DEFAULT_F - IF(PRESENT(aapl_id)) aapl_id_default = aapl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Aopen_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, & - aapl_id_default, lapl_id_default, attr_id) - - 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 - 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 :: corder_valid - - INTERFACE - INTEGER FUNCTION H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_C'::H5Aget_info_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: attr_id - - INTEGER, INTENT(OUT) :: corder_valid - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: cset - INTEGER(HSIZE_T), INTENT(OUT) :: data_size - END FUNCTION H5Aget_info_c - END INTERFACE - - hdferr = H5Aget_info_c(attr_id, corder_valid, corder, cset, data_size) - - f_corder_valid =.FALSE. - IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - - - 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 - 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 - ! 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(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list -!***** - INTEGER :: corder_valid - INTEGER(SIZE_T) :: obj_namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & - corder_valid, corder, cset, data_size) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_IDX_C'::H5Aget_info_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name - 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(HID_T) :: lapl_id_default - INTEGER, INTENT(OUT) :: corder_valid - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: cset - INTEGER(HSIZE_T), INTENT(OUT) :: data_size - - INTEGER(SIZE_T) :: obj_namelen - END FUNCTION H5Aget_info_by_idx_c - END INTERFACE - - obj_namelen = LEN(obj_name) - - lapl_id_default = H5P_DEFAULT_F - IF(present(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Aget_info_by_idx_c(loc_id, obj_name, obj_namelen, idx_type, order, n, lapl_id_default, & - corder_valid, corder, cset, data_size) - - f_corder_valid =.FALSE. - IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - - 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 - 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 :: corder_valid - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: attr_namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & - corder_valid, corder, cset, data_size) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AGET_INFO_BY_NAME_C'::H5Aget_info_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(SIZE_T), INTENT(IN) :: attr_namelen - INTEGER(HID_T) :: lapl_id_default - INTEGER, INTENT(OUT) :: corder_valid - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: cset - INTEGER(HSIZE_T), INTENT(OUT) :: data_size - - END FUNCTION H5Aget_info_by_name_c - END INTERFACE - - obj_namelen = LEN(obj_name) - attr_namelen = LEN(attr_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Aget_info_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, & - corder_valid, corder, cset, data_size) - - f_corder_valid =.FALSE. - IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - - 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 - 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 - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T), INTENT(OUT) :: attr - INTEGER, INTENT(OUT) :: hdferr - - 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 - - INTEGER(HID_T) :: acpl_id_default - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - type_id, space_id, acpl_id_default, aapl_id_default, lapl_id_default, attr) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ACREATE_BY_NAME_C'::H5Acreate_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(SIZE_T), INTENT(IN) :: attr_namelen - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T) :: acpl_id_default - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(HID_T), INTENT(OUT) :: attr - - END FUNCTION H5Acreate_by_name_c - END INTERFACE - - obj_namelen = LEN(obj_name) - attr_namelen = LEN(attr_name) - - acpl_id_default = H5P_DEFAULT_F - aapl_id_default = H5P_DEFAULT_F - lapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(acpl_id)) acpl_id_default = acpl_id - IF(PRESENT(aapl_id)) aapl_id_default = aapl_id - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Acreate_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - 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 - 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) :: attr_exists_c - INTEGER(SIZE_T) :: attr_namelen - - INTERFACE - INTEGER FUNCTION H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_C'::H5Aexists_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: attr_name - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(SIZE_T) :: attr_namelen - INTEGER(HID_T) :: attr_exists_c - END FUNCTION H5Aexists_c - END INTERFACE - - attr_namelen = LEN(attr_name) - - hdferr = H5Aexists_c(obj_id, attr_name, attr_namelen, attr_exists_c) - - attr_exists = .FALSE. - IF(attr_exists_c.GT.0) attr_exists = .TRUE. - - 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 - 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 :: attr_exists_c - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: attr_namelen - - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AEXISTS_BY_NAME_C'::H5Aexists_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(SIZE_T), INTENT(IN) :: attr_namelen - INTEGER(HID_T), INTENT(IN) :: lapl_id_default - INTEGER, INTENT(OUT) :: attr_exists_c - END FUNCTION H5Aexists_by_name_c - END INTERFACE - - attr_namelen = LEN(attr_name) - obj_namelen = LEN(obj_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Aexists_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, lapl_id_default, attr_exists_c) - - attr_exists = .FALSE. - 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 - 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) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: attr_namelen - - INTERFACE - INTEGER FUNCTION H5Aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - aapl_id_default, lapl_id_default, attr_id) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AOPEN_BY_NAME_C'::H5Aopen_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: obj_name - INTEGER(SIZE_T), INTENT(IN) :: obj_namelen - CHARACTER(LEN=*), INTENT(IN) :: attr_name - INTEGER(SIZE_T), INTENT(IN) :: attr_namelen - INTEGER(HID_T) :: aapl_id_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(HID_T), INTENT(OUT) :: attr_id - END FUNCTION H5Aopen_by_name_c - END INTERFACE - - attr_namelen = LEN(attr_name) - obj_namelen = LEN(obj_name) - - aapl_id_default = H5P_DEFAULT_F - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(aapl_id)) aapl_id_default = aapl_id - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = H5Aopen_by_name_c(loc_id, obj_name, obj_namelen, attr_name, attr_namelen, & - aapl_id_default, lapl_id_default, attr_id) - - 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 - 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(SIZE_T) :: old_attr_namelen - INTEGER(SIZE_T) :: new_attr_namelen - - INTERFACE - INTEGER FUNCTION H5Arename_c(loc_id, & - old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) - USE ISO_C_BINDING - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ARENAME_C'::H5Arename_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: old_attr_name, new_attr_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: old_attr_name - INTEGER(SIZE_T) :: old_attr_namelen - CHARACTER(LEN=*), INTENT(IN) :: new_attr_name - INTEGER(SIZE_T) :: new_attr_namelen - - END FUNCTION H5Arename_c - END INTERFACE - - old_attr_namelen = LEN(old_attr_name) - new_attr_namelen = LEN(new_attr_name) - - hdferr = H5Arename_c(loc_id, & - old_attr_name, old_attr_namelen, new_attr_name, new_attr_namelen) - - END SUBROUTINE H5Arename_f - - -!****s* H5A (F03)/H5Awrite_f_F90 -! -! NAME -! H5Awrite_f_F90 -! -! PURPOSE -! Writes an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! 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 -! 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 -! -! dims parameter was added to make code portable; -! Aprile 4, 2001 -! -! Changed buf intent to INOUT to be consistant -! 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, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions. -! -! Fortran90 Interface: -!! 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 , INTENT(IN) :: buf -!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - - SUBROUTINE H5Awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_scalar - - SUBROUTINE H5Awrite_integer_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(IN) , & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_integer_1 - - - SUBROUTINE H5Awrite_integer_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(IN) , & - DIMENSION(dims(1),dims(2)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_2 - - SUBROUTINE H5Awrite_integer_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_3 - - - SUBROUTINE H5Awrite_integer_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_4 - - - SUBROUTINE H5Awrite_integer_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_5 - - - SUBROUTINE H5Awrite_integer_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_integer_6 - - - SUBROUTINE H5Awrite_integer_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(IN), DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), & - TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_integer_7 - - - SUBROUTINE H5Awrite_real_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - REAL, INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_scalar - - SUBROUTINE H5Awrite_real_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - REAL, INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_real_1 - - - SUBROUTINE H5Awrite_real_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_real_2 - - - SUBROUTINE H5Awrite_real_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_3 - - - SUBROUTINE H5Awrite_real_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_4 - - - SUBROUTINE H5Awrite_real_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_5 - - - SUBROUTINE H5Awrite_real_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_6 - - - SUBROUTINE H5Awrite_real_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Awrite_real_7 - - SUBROUTINE H5Awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - - CALL H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), dims, hdferr) - - END SUBROUTINE H5Awrite_char_scalar - - SUBROUTINE H5Awrite_char_scalar_fix(attr_id, memtype_id, buf, buf_len, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(IN), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_scalar_fix - - SUBROUTINE H5Awrite_char_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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), DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_1 - - SUBROUTINE H5Awrite_char_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)(1:1)) - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_2 - - SUBROUTINE H5Awrite_char_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_3 - - SUBROUTINE H5Awrite_char_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_4 - - SUBROUTINE H5Awrite_char_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_5 - - - SUBROUTINE H5Awrite_char_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_6 - - SUBROUTINE H5Awrite_char_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - hdferr = H5Awrite_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Awrite_char_7 - -!****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, DOUBLE PRECISION 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) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(IN), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = H5Awrite_f_c(attr_id, mem_type_id, buf) - - END SUBROUTINE H5Awrite_ptr - -!****s* H5A (F03)/H5Aread_f_F90 -! -! NAME -! H5Aread_f_F90 -! -! PURPOSE -! Reads an attribute. -! -! Inputs: -! attr_id - Attribute identifier -! memtype_id - Attribute datatype identifier (in memory) -! 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 -! -! 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 consistant -! 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, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions. -! Fortran90 Interface: -!! 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 , INTENT(INOUT) :: buf -!! INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims -!! INTEGER , INTENT(OUT) :: hdferr -!***** - SUBROUTINE H5Aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_scalar - - SUBROUTINE H5Aread_integer_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(INOUT), DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_1 - - - SUBROUTINE H5Aread_integer_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(INOUT),DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_2 - - - SUBROUTINE H5Aread_integer_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_3 - - - SUBROUTINE H5Aread_integer_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_4 - - - SUBROUTINE H5Aread_integer_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_5 - - - SUBROUTINE H5Aread_integer_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_6 - - - SUBROUTINE H5Aread_integer_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_integer_7 - - - SUBROUTINE H5Aread_real_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - REAL, INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_scalar - - SUBROUTINE H5Aread_real_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - REAL, INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_1 - - - SUBROUTINE H5Aread_real_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_2 - - - SUBROUTINE H5Aread_real_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_3 - - - SUBROUTINE H5Aread_real_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_4 - - - SUBROUTINE H5Aread_real_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_5 - - - SUBROUTINE H5Aread_real_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_6 - - - SUBROUTINE H5Aread_real_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - END SUBROUTINE H5Aread_real_7 - - SUBROUTINE H5Aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - - CALL H5Aread_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), hdferr) - - END SUBROUTINE H5Aread_char_scalar - - SUBROUTINE H5Aread_char_scalar_fix(attr_id, memtype_id, buf, buf_len, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER, INTENT(IN) :: buf_len - CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1:1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_scalar_fix - - SUBROUTINE H5Aread_char_1(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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), & - DIMENSION(dims(1)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_1 - - - SUBROUTINE H5Aread_char_2(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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), & - DIMENSION(dims(1),dims(2)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_2 - - - SUBROUTINE H5Aread_char_3(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_3 - - SUBROUTINE H5Aread_char_4(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_4 - - SUBROUTINE H5Aread_char_5(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_5 - - - SUBROUTINE H5Aread_char_6(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_6 - - - SUBROUTINE H5Aread_char_7(attr_id, memtype_id, buf, dims, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - hdferr = H5Aread_f_c(attr_id, memtype_id, f_ptr) - - END SUBROUTINE H5Aread_char_7 - - -!****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 consistant -! 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, DOUBLE PRECISION 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) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(INOUT), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - - hdferr = H5Aread_f_c(attr_id, mem_type_id, buf) - - END SUBROUTINE H5Aread_ptr - -END MODULE H5A - - diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 new file mode 100644 index 0000000..8457bfd --- /dev/null +++ b/fortran/src/H5Dff.F90 @@ -0,0 +1,3383 @@ +!****h* ROBODoc/H5D +! +! NAME +! MODULE H5D +! +! FILE +! fortran/src/H5Dff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5D functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! NOTES +! (1) The maximum rank of an array allowed in Fortran is 7, therefore +! we only provide an interface for arrays up to and including rank 7. +! +! (2) Unfortunately we are using a generic interface and one of the factors +! used in determining the proper routine to select is that of the array +! rank being passed. Therefore, we can not create just one subroutine for +! each array type (integer, real, etc...) and use a +! rank 1 array of assumed size to handle multiple ranks, i.e. +! (i.e. integer, dimension(*) :: ... ) +! (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 +! the statement instead to each subroutine. +! +! +! (4) C_LOC and character strings according to the Fortran 2003 standard: +! +! 15.1.2.5 C_LOC(X) +! +! Argument. X shall either +! +! (A) have interoperable type and type parameters and be +! (a) a variable that has the TARGET attribute and is interoperable, +! (b) an allocated allocatable variable that has the TARGET attribute +! and is not an array of zero size, or +! (c) an associated scalar pointer, or +! (B) be a nonpolymorphic scalar, have no length type parameters, and be +! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, +! (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: +! +! 15.2.1 Interoperability of intrinsic types +! +! ...if the type is character, interoperability also requires that the length type parameter +! be omitted or be specified by an initialization expression whose value is one. +! +! THEREFORE compilers that have not extended the standard require the +! argument in C_LOC to be of the variant: +! +! CHARACTER(LEN=1), TARGET :: chr +! or +! CHARACTER, TARGET :: chr +! +! *** IMPORTANT *** +! If you add a new H5D 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. +! +!***** + +MODULE H5D + USE H5GLOBAL + + INTERFACE h5dextend_f + 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 + + INTERFACE h5dwrite_f + + MODULE PROCEDURE h5dwrite_reference_obj + MODULE PROCEDURE h5dwrite_reference_dsetreg + MODULE PROCEDURE h5dwrite_integer_scalar + MODULE PROCEDURE h5dwrite_integer_1 + MODULE PROCEDURE h5dwrite_integer_2 + MODULE PROCEDURE h5dwrite_integer_3 + MODULE PROCEDURE h5dwrite_integer_4 + MODULE PROCEDURE h5dwrite_integer_5 + MODULE PROCEDURE h5dwrite_integer_6 + MODULE PROCEDURE h5dwrite_integer_7 + MODULE PROCEDURE h5dwrite_char_scalar + MODULE PROCEDURE h5dwrite_char_1 + MODULE PROCEDURE h5dwrite_char_2 + MODULE PROCEDURE h5dwrite_char_3 + MODULE PROCEDURE h5dwrite_char_4 + MODULE PROCEDURE h5dwrite_char_5 + MODULE PROCEDURE h5dwrite_char_6 + MODULE PROCEDURE h5dwrite_char_7 + MODULE PROCEDURE h5dwrite_real_scalar + MODULE PROCEDURE h5dwrite_real_1 + MODULE PROCEDURE h5dwrite_real_2 + MODULE PROCEDURE h5dwrite_real_3 + MODULE PROCEDURE h5dwrite_real_4 + MODULE PROCEDURE h5dwrite_real_5 + MODULE PROCEDURE h5dwrite_real_6 + MODULE PROCEDURE h5dwrite_real_7 + + ! This is the preferred way to call h5dwrite + ! by passing an address + MODULE PROCEDURE h5dwrite_ptr + + END INTERFACE + + INTERFACE h5dread_f + + MODULE PROCEDURE h5dread_reference_obj + MODULE PROCEDURE h5dread_reference_dsetreg + MODULE PROCEDURE h5dread_integer_scalar + MODULE PROCEDURE h5dread_integer_1 + MODULE PROCEDURE h5dread_integer_2 + MODULE PROCEDURE h5dread_integer_3 + MODULE PROCEDURE h5dread_integer_4 + MODULE PROCEDURE h5dread_integer_5 + MODULE PROCEDURE h5dread_integer_6 + MODULE PROCEDURE h5dread_integer_7 + MODULE PROCEDURE h5dread_char_scalar + MODULE PROCEDURE h5dread_char_1 + MODULE PROCEDURE h5dread_char_2 + MODULE PROCEDURE h5dread_char_3 + MODULE PROCEDURE h5dread_char_4 + MODULE PROCEDURE h5dread_char_5 + MODULE PROCEDURE h5dread_char_6 + MODULE PROCEDURE h5dread_char_7 + MODULE PROCEDURE h5dread_real_scalar + MODULE PROCEDURE h5dread_real_1 + MODULE PROCEDURE h5dread_real_2 + MODULE PROCEDURE h5dread_real_3 + MODULE PROCEDURE h5dread_real_4 + MODULE PROCEDURE h5dread_real_5 + MODULE PROCEDURE h5dread_real_6 + MODULE PROCEDURE h5dread_real_7 + + ! This is the preferred way to call h5dread + ! by passing an address + MODULE PROCEDURE h5dread_ptr + + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Dwrite routine + + INTERFACE + INTEGER FUNCTION h5dwrite_f_c(dset_id, mem_type_id, & + mem_space_id_default , & + file_space_id_default, & + xfer_prp_default, buf ) BIND(C, NAME='h5dwrite_f_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5dwrite_f_c + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Dread routine + + INTERFACE + INTEGER FUNCTION h5dread_f_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf) BIND(C, NAME='h5dread_f_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + TYPE(C_PTR), VALUE :: buf + END FUNCTION h5dread_f_c + END INTERFACE + + INTERFACE h5dfill_f + MODULE PROCEDURE h5dfill_integer + MODULE PROCEDURE h5dfill_real + MODULE PROCEDURE h5dfill_char + END INTERFACE + +! Interface for the function used to pass the C pointer of the buffer +! to the C H5Dfill routine + + INTERFACE + INTEGER FUNCTION h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) BIND(C, NAME='h5dfill_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + 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 + TYPE(C_PTR), VALUE :: f_ptr_buf + INTEGER(HID_T) :: mem_type_id + END FUNCTION h5dfill_c + END INTERFACE + +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 + 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) :: lcpl_id_default + INTEGER(HID_T) :: dcpl_id_default + INTEGER(HID_T) :: dapl_id_default + + INTEGER :: namelen ! Name length + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5dcreate_c(loc_id, name, namelen, type_id, & + space_id, lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCREATE_C'::h5dcreate_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: dcpl_id_default + INTEGER(HID_T) :: dapl_id_default + + INTEGER(HID_T), INTENT(OUT) :: dset_id + END FUNCTION h5dcreate_c + END INTERFACE + + lcpl_id_default = H5P_DEFAULT_F + dcpl_id_default = H5P_DEFAULT_F + dapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + IF(PRESENT(dcpl_id)) dcpl_id_default = dcpl_id + IF(PRESENT(dapl_id)) dapl_id_default = dapl_id + + namelen = LEN(name) + hdferr = h5dcreate_c(loc_id, name, namelen, type_id, space_id, & + lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) + + 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 + 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 :: namelen ! Name length + + INTEGER(HID_T) :: dapl_id_default + + INTERFACE + INTEGER FUNCTION h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DOPEN_C'::h5dopen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: dapl_id_default + INTEGER(HID_T), INTENT(OUT) :: dset_id + END FUNCTION h5dopen_c + END INTERFACE + + dapl_id_default = H5P_DEFAULT_F + IF(PRESENT(dapl_id)) dapl_id_default = dapl_id + + namelen = LEN(name) + hdferr = h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) + + 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 + SUBROUTINE h5dclose_f(dset_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dclose_c(dset_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCLOSE_C'::h5dclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + END FUNCTION h5dclose_c + END INTERFACE + + hdferr = h5dclose_c(dset_id) + + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5dget_type_c (dataset_id, datatype_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_TYPE_C'::h5dget_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(OUT) :: datatype_id + END FUNCTION h5dget_type_c + END INTERFACE + + 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 compatability. -MSB- March 14, 2008 +! +! SOURCE + SUBROUTINE h5dset_extent_f(dataset_id, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size + ! Array containing + ! dimensions' sizes + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5dset_extent_c(dataset_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSET_EXTENT_C'::h5dset_extent_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size + END FUNCTION h5dset_extent_c + END INTERFACE + + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5dget_create_plist_c(dataset_id, plist_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_CREATE_PLIST_C'::h5dget_create_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(OUT) :: plist_id + END FUNCTION h5dget_create_plist_c + END INTERFACE + + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5dget_storage_size_c(dataset_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_STORAGE_SIZE_C'::h5dget_storage_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5dget_storage_size_c + END INTERFACE + + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DVLEN_GET_MAX_LEN_C'::h5dvlen_get_max_len_c + !DEC$ENDIF + 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 + END FUNCTION h5dvlen_get_max_len_c + END INTERFACE + + 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 + 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 + !***** + INTERFACE + INTEGER FUNCTION h5dget_space_status_c(dset_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_SPACE_STATUS_C'::h5dget_space_status_c + !DEC$ENDIF + INTEGER(HID_T) :: dset_id + INTEGER :: flag + END FUNCTION h5dget_space_status_c + END INTERFACE + + 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 + 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) :: dcpl_id_default + INTEGER(HID_T) :: dapl_id_default + + ! + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCREATE_ANON_C'::h5dcreate_anon_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T) :: dcpl_id_default + INTEGER(HID_T) :: dapl_id_default + INTEGER(HID_T), INTENT(OUT) :: dset_id + END FUNCTION h5dcreate_anon_c + END INTERFACE + + dcpl_id_default = H5P_DEFAULT_F + dapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(dcpl_id)) dcpl_id_default = dcpl_id + IF(PRESENT(dapl_id)) dapl_id_default = dapl_id + + hdferr = h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) + + END SUBROUTINE h5dcreate_anon_f + + 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 identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_vl_integer_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_INTEGER_C'::h5dwrite_vl_integer_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dwrite_vl_integer_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, len) + + END SUBROUTINE h5dwrite_vl_integer + + SUBROUTINE h5dread_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(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 identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: tmp + INTEGER :: error + + INTERFACE + INTEGER FUNCTION h5dread_vl_integer_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_INTEGER_C'::h5dread_vl_integer_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dread_vl_integer_c + END INTERFACE + + CALL h5dget_space_f(dset_id, tmp, error) + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = tmp + file_space_id_default = tmp + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, len) + + END SUBROUTINE h5dread_vl_integer + + SUBROUTINE h5dwrite_vl_real(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 + 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 identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_vl_real_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_REAL_C'::h5dwrite_vl_real_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dwrite_vl_real_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, len) + + END SUBROUTINE h5dwrite_vl_real + + SUBROUTINE h5dread_vl_real(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(INOUT), DIMENSION(*) :: len ! Array to store the length of each element + 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 identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: tmp + INTEGER :: error + + INTERFACE + INTEGER FUNCTION h5dread_vl_real_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_REAL_C'::h5dread_vl_real_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dread_vl_real_c + END INTERFACE + + CALL h5dget_space_f(dset_id, tmp, error) + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = tmp + file_space_id_default = tmp + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, len) + + END SUBROUTINE h5dread_vl_real + + SUBROUTINE h5dwrite_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(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 identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dwrite_vl_string_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + ! xfer_prp_default, tmp_buf, dims, str_len) + xfer_prp_default, buf, dims, str_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_STRING_C'::h5dwrite_vl_string_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims + INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len + CHARACTER(LEN=*), DIMENSION(dims(2)) :: buf + END FUNCTION + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, str_len) + + END SUBROUTINE h5dwrite_vl_string + + 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 + 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 identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTERFACE + INTEGER FUNCTION h5dread_vl_string_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims, str_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_STRING_C'::h5dread_vl_string_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims + INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len + CHARACTER(LEN=*), DIMENSION(dims(2)) :: buf + END FUNCTION h5dread_vl_string_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, & + buf, dims, str_len) + RETURN + END SUBROUTINE h5dread_vl_string + +! +!****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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5dget_space_c(dataset_id, dataspace_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_SPACE_C'::h5dget_space_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dataset_id + INTEGER(HID_T), INTENT(OUT) :: dataspace_id + END FUNCTION h5dget_space_c + END INTERFACE + + 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 +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) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_ACCESS_PLIST_C'::h5dget_access_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(OUT) :: plist_id + END FUNCTION h5dget_access_plist_c + END INTERFACE + + hdferr = h5dget_access_plist_c(dset_id, plist_id) + +END SUBROUTINE h5dget_access_plist_f + + + 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 + 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 bufffer 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 identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + + END SUBROUTINE h5dwrite_reference_obj + + SUBROUTINE h5dwrite_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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 bufffer 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 identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf + INTEGER :: i + INTEGER(HSIZE_T) :: j + TYPE(C_PTR) :: f_ptr + INTERFACE + INTEGER FUNCTION h5dwrite_ref_reg_c(dset_id, mem_type_id,& + mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_REG_C'::h5dwrite_ref_reg_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER, DIMENSION(*) :: ref_buf + INTEGER(HSIZE_T), DIMENSION(*) :: dims + END FUNCTION h5dwrite_ref_reg_c + END INTERFACE + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) + IF (hdferr .NE. 0 ) THEN + hdferr = -1 + RETURN + ELSE + DO j = 1, dims(1) + DO i = 1, REF_REG_BUF_LEN + ref_buf(REF_REG_BUF_LEN*(j-1) + i) = buf(j)%ref(i) + ENDDO + ENDDO + ENDIF + hdferr = h5dwrite_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + DEALLOCATE(ref_buf) + + END SUBROUTINE h5dwrite_reference_dsetreg + + + SUBROUTINE h5dwrite_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + INTEGER, INTENT(IN), TARGET :: buf ! Data buffer + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_scalar + + SUBROUTINE h5dwrite_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_1 + + SUBROUTINE h5dwrite_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + 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 identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_2 + + SUBROUTINE h5dwrite_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_3 + + SUBROUTINE h5dwrite_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_4 + + SUBROUTINE h5dwrite_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_5 + + SUBROUTINE h5dwrite_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_6 + + SUBROUTINE h5dwrite_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + INTEGER, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_integer_7 + + SUBROUTINE h5dwrite_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: 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 identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + CALL h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + END SUBROUTINE h5dwrite_char_scalar + + SUBROUTINE h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: 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 identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_scalar_fix + + SUBROUTINE h5dwrite_char_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_1 + + SUBROUTINE h5dwrite_char_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_2 + + SUBROUTINE h5dwrite_char_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_3 + + SUBROUTINE h5dwrite_char_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_4 + + SUBROUTINE h5dwrite_char_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_5 + + SUBROUTINE h5dwrite_char_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_6 + + SUBROUTINE h5dwrite_char_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + CHARACTER(LEN=*), INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_char_7 + + + SUBROUTINE h5dwrite_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + REAL, INTENT(IN), TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_scalar + + + SUBROUTINE h5dwrite_real_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_1 + + SUBROUTINE h5dwrite_real_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_2 + + SUBROUTINE h5dwrite_real_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_3 + + SUBROUTINE h5dwrite_real_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_4 + + SUBROUTINE h5dwrite_real_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_5 + + SUBROUTINE h5dwrite_real_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_6 + + SUBROUTINE h5dwrite_real_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + REAL, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dwrite_real_7 + +! +! NAME +! h5dread_f +! +! PURPOSE +! Reads raw data from the specified dataset into buf, +! converting from file datatype and dataspace to memory +! datatype and dataspace. +! +! Inputs: +! dset_id - dataset identifier +! mem_type_id - memory type identifier +! dims - 1-dim array of size 7; dims(k) has the size +! - of k-th dimension of the buf array +! Outputs: +! buf - buffer to read data in +! hdferr: - error code +! Success: 0 +! Failure: -1 +! Optional parameters: +! mem_space_id - memory dataspace identifier +! file_space_id - file dataspace identifier +! xfer_prp - trasfer 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 +! +! dims parameter was added to make code portable; +! n parameter was replaced with dims parameter in +! the h5dwrite_reference_obj and h5dwrite_reference_dsetreg +! functions. April 2, 2001 +! +! NOTES +! This function is overloaded to read INTEGER, +! REAL, DOUBLE PRECISION and CHARACTER buffers +! up to 7 dimensions, and one dimensional buffers +! of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) +! types. +! + SUBROUTINE h5dread_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: 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 identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_reference_obj + + SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: 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 identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf + INTEGER :: i + INTEGER(HSIZE_T) :: j + INTERFACE + INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,& + mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_REG_C'::h5dread_ref_reg_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + INTEGER, DIMENSION(*) :: ref_buf + END FUNCTION h5dread_ref_reg_c + END INTERFACE + + ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, ref_buf, dims) + + DO j = 1, dims(1) + DO i = 1, REF_REG_BUF_LEN + buf(j)%ref(i) = ref_buf(REF_REG_BUF_LEN*(j-1) + i) + ENDDO + ENDDO + DEALLOCATE(ref_buf) + + END SUBROUTINE h5dread_reference_dsetreg + + + SUBROUTINE h5dread_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + INTEGER, INTENT(INOUT) , TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + + END SUBROUTINE h5dread_integer_scalar + + SUBROUTINE h5dread_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_1 + + SUBROUTINE h5dread_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_2 + + SUBROUTINE h5dread_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_3 + + SUBROUTINE h5dread_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_4 + + SUBROUTINE h5dread_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_5 + + SUBROUTINE h5dread_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_6 + + SUBROUTINE h5dread_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + INTEGER, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_integer_7 + + SUBROUTINE h5dread_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: 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 identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + CALL h5dread_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), hdferr, & + mem_space_id_default, file_space_id_default, xfer_prp_default) + + END SUBROUTINE h5dread_char_scalar + + SUBROUTINE h5dread_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + 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 identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(buf(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id, & + file_space_id, xfer_prp, f_ptr) + + END SUBROUTINE h5dread_char_scalar_fix + + SUBROUTINE h5dread_char_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1)(1:1)) + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_1 + + SUBROUTINE h5dread_char_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_2 + + SUBROUTINE h5dread_char_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1)(1:1)) + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_3 + + SUBROUTINE h5dread_char_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_4 + + SUBROUTINE h5dread_char_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_5 + + SUBROUTINE h5dread_char_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_6 + + SUBROUTINE h5dread_char_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + CHARACTER(LEN=*), INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_char_7 + + SUBROUTINE h5dread_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + REAL, INTENT(INOUT) , TARGET :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_scalar + + SUBROUTINE h5dread_real_1(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_1 + + SUBROUTINE h5dread_real_2(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_2 + + SUBROUTINE h5dread_real_3(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_3 + + SUBROUTINE h5dread_real_4(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3), dims(4)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_4 + + SUBROUTINE h5dread_real_5(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_5 + + SUBROUTINE h5dread_real_6(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_6 + + SUBROUTINE h5dread_real_7(dset_id, mem_type_id, buf, dims, hdferr, & + mem_space_id, file_space_id, xfer_prp) + USE, INTRINSIC :: ISO_C_BINDING + 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(*) :: dims + REAL, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + TYPE(C_PTR) :: f_ptr + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF(PRESENT(file_space_id)) file_space_id_default = file_space_id + f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, f_ptr) + + END SUBROUTINE h5dread_real_7 + +!****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 + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(IN) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf) + + 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 + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier + INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier + TYPE(C_PTR), INTENT(INOUT) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp + IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id + IF (PRESENT(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf) + + 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 - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! 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 + IMPLICIT NONE + INTEGER, INTENT(IN), TARGET :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + INTEGER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_value = C_LOC(fill_value) + f_ptr_buf = C_LOC(buf(1)) + + fill_type_id = H5T_NATIVE_INTEGER + mem_type_id = H5T_NATIVE_INTEGER + + hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_integer + +! +! NAME +! h5dfill_real +! +! 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 - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! Outputs: +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! + SUBROUTINE h5dfill_real(fill_valuer, space_id, buf, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + REAL, INTENT(IN), TARGET :: fill_valuer ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + REAL, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_valuer ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_valuer = C_LOC(fill_valuer) + f_ptr_buf = C_LOC(buf(1)) + + fill_type_id = H5T_NATIVE_REAL + mem_type_id = H5T_NATIVE_REAL + + hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & + f_ptr_buf, mem_type_id) + + END SUBROUTINE h5dfill_real + +! +! 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 - data buffer iin memory ro apply selection to +! - of k-th dimension of the buf array +! 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 + 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 + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value + TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf + + f_ptr_fill_value = C_LOC(fill_value) + f_ptr_buf = C_LOC(buf(1)) + + hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & + 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) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR + 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') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR + 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 + + +END MODULE H5D + + diff --git a/fortran/src/H5Dff.f90 b/fortran/src/H5Dff.f90 deleted file mode 100644 index 8457bfd..0000000 --- a/fortran/src/H5Dff.f90 +++ /dev/null @@ -1,3383 +0,0 @@ -!****h* ROBODoc/H5D -! -! NAME -! MODULE H5D -! -! FILE -! fortran/src/H5Dff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5D functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! NOTES -! (1) The maximum rank of an array allowed in Fortran is 7, therefore -! we only provide an interface for arrays up to and including rank 7. -! -! (2) Unfortunately we are using a generic interface and one of the factors -! used in determining the proper routine to select is that of the array -! rank being passed. Therefore, we can not create just one subroutine for -! each array type (integer, real, etc...) and use a -! rank 1 array of assumed size to handle multiple ranks, i.e. -! (i.e. integer, dimension(*) :: ... ) -! (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 -! the statement instead to each subroutine. -! -! -! (4) C_LOC and character strings according to the Fortran 2003 standard: -! -! 15.1.2.5 C_LOC(X) -! -! Argument. X shall either -! -! (A) have interoperable type and type parameters and be -! (a) a variable that has the TARGET attribute and is interoperable, -! (b) an allocated allocatable variable that has the TARGET attribute -! and is not an array of zero size, or -! (c) an associated scalar pointer, or -! (B) be a nonpolymorphic scalar, have no length type parameters, and be -! (a) a nonallocatable, nonpointer variable that has the TARGET attribute, -! (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: -! -! 15.2.1 Interoperability of intrinsic types -! -! ...if the type is character, interoperability also requires that the length type parameter -! be omitted or be specified by an initialization expression whose value is one. -! -! THEREFORE compilers that have not extended the standard require the -! argument in C_LOC to be of the variant: -! -! CHARACTER(LEN=1), TARGET :: chr -! or -! CHARACTER, TARGET :: chr -! -! *** IMPORTANT *** -! If you add a new H5D 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. -! -!***** - -MODULE H5D - USE H5GLOBAL - - INTERFACE h5dextend_f - 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 - - INTERFACE h5dwrite_f - - MODULE PROCEDURE h5dwrite_reference_obj - MODULE PROCEDURE h5dwrite_reference_dsetreg - MODULE PROCEDURE h5dwrite_integer_scalar - MODULE PROCEDURE h5dwrite_integer_1 - MODULE PROCEDURE h5dwrite_integer_2 - MODULE PROCEDURE h5dwrite_integer_3 - MODULE PROCEDURE h5dwrite_integer_4 - MODULE PROCEDURE h5dwrite_integer_5 - MODULE PROCEDURE h5dwrite_integer_6 - MODULE PROCEDURE h5dwrite_integer_7 - MODULE PROCEDURE h5dwrite_char_scalar - MODULE PROCEDURE h5dwrite_char_1 - MODULE PROCEDURE h5dwrite_char_2 - MODULE PROCEDURE h5dwrite_char_3 - MODULE PROCEDURE h5dwrite_char_4 - MODULE PROCEDURE h5dwrite_char_5 - MODULE PROCEDURE h5dwrite_char_6 - MODULE PROCEDURE h5dwrite_char_7 - MODULE PROCEDURE h5dwrite_real_scalar - MODULE PROCEDURE h5dwrite_real_1 - MODULE PROCEDURE h5dwrite_real_2 - MODULE PROCEDURE h5dwrite_real_3 - MODULE PROCEDURE h5dwrite_real_4 - MODULE PROCEDURE h5dwrite_real_5 - MODULE PROCEDURE h5dwrite_real_6 - MODULE PROCEDURE h5dwrite_real_7 - - ! This is the preferred way to call h5dwrite - ! by passing an address - MODULE PROCEDURE h5dwrite_ptr - - END INTERFACE - - INTERFACE h5dread_f - - MODULE PROCEDURE h5dread_reference_obj - MODULE PROCEDURE h5dread_reference_dsetreg - MODULE PROCEDURE h5dread_integer_scalar - MODULE PROCEDURE h5dread_integer_1 - MODULE PROCEDURE h5dread_integer_2 - MODULE PROCEDURE h5dread_integer_3 - MODULE PROCEDURE h5dread_integer_4 - MODULE PROCEDURE h5dread_integer_5 - MODULE PROCEDURE h5dread_integer_6 - MODULE PROCEDURE h5dread_integer_7 - MODULE PROCEDURE h5dread_char_scalar - MODULE PROCEDURE h5dread_char_1 - MODULE PROCEDURE h5dread_char_2 - MODULE PROCEDURE h5dread_char_3 - MODULE PROCEDURE h5dread_char_4 - MODULE PROCEDURE h5dread_char_5 - MODULE PROCEDURE h5dread_char_6 - MODULE PROCEDURE h5dread_char_7 - MODULE PROCEDURE h5dread_real_scalar - MODULE PROCEDURE h5dread_real_1 - MODULE PROCEDURE h5dread_real_2 - MODULE PROCEDURE h5dread_real_3 - MODULE PROCEDURE h5dread_real_4 - MODULE PROCEDURE h5dread_real_5 - MODULE PROCEDURE h5dread_real_6 - MODULE PROCEDURE h5dread_real_7 - - ! This is the preferred way to call h5dread - ! by passing an address - MODULE PROCEDURE h5dread_ptr - - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Dwrite routine - - INTERFACE - INTEGER FUNCTION h5dwrite_f_c(dset_id, mem_type_id, & - mem_space_id_default , & - file_space_id_default, & - xfer_prp_default, buf ) BIND(C, NAME='h5dwrite_f_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5dwrite_f_c - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Dread routine - - INTERFACE - INTEGER FUNCTION h5dread_f_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf) BIND(C, NAME='h5dread_f_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - TYPE(C_PTR), VALUE :: buf - END FUNCTION h5dread_f_c - END INTERFACE - - INTERFACE h5dfill_f - MODULE PROCEDURE h5dfill_integer - MODULE PROCEDURE h5dfill_real - MODULE PROCEDURE h5dfill_char - END INTERFACE - -! Interface for the function used to pass the C pointer of the buffer -! to the C H5Dfill routine - - INTERFACE - INTEGER FUNCTION h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) BIND(C, NAME='h5dfill_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - 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 - TYPE(C_PTR), VALUE :: f_ptr_buf - INTEGER(HID_T) :: mem_type_id - END FUNCTION h5dfill_c - END INTERFACE - -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 - 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) :: lcpl_id_default - INTEGER(HID_T) :: dcpl_id_default - INTEGER(HID_T) :: dapl_id_default - - INTEGER :: namelen ! Name length - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5dcreate_c(loc_id, name, namelen, type_id, & - space_id, lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCREATE_C'::h5dcreate_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: dcpl_id_default - INTEGER(HID_T) :: dapl_id_default - - INTEGER(HID_T), INTENT(OUT) :: dset_id - END FUNCTION h5dcreate_c - END INTERFACE - - lcpl_id_default = H5P_DEFAULT_F - dcpl_id_default = H5P_DEFAULT_F - dapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - IF(PRESENT(dcpl_id)) dcpl_id_default = dcpl_id - IF(PRESENT(dapl_id)) dapl_id_default = dapl_id - - namelen = LEN(name) - hdferr = h5dcreate_c(loc_id, name, namelen, type_id, space_id, & - lcpl_id_default, dcpl_id_default, dapl_id_default, dset_id) - - 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 - 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 :: namelen ! Name length - - INTEGER(HID_T) :: dapl_id_default - - INTERFACE - INTEGER FUNCTION h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DOPEN_C'::h5dopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: dapl_id_default - INTEGER(HID_T), INTENT(OUT) :: dset_id - END FUNCTION h5dopen_c - END INTERFACE - - dapl_id_default = H5P_DEFAULT_F - IF(PRESENT(dapl_id)) dapl_id_default = dapl_id - - namelen = LEN(name) - hdferr = h5dopen_c(loc_id, name, namelen, dapl_id_default, dset_id) - - 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 - SUBROUTINE h5dclose_f(dset_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dclose_c(dset_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCLOSE_C'::h5dclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - END FUNCTION h5dclose_c - END INTERFACE - - hdferr = h5dclose_c(dset_id) - - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5dget_type_c (dataset_id, datatype_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_TYPE_C'::h5dget_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HID_T), INTENT(OUT) :: datatype_id - END FUNCTION h5dget_type_c - END INTERFACE - - 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 compatability. -MSB- March 14, 2008 -! -! SOURCE - SUBROUTINE h5dset_extent_f(dataset_id, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dataset_id ! Dataset identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size - ! Array containing - ! dimensions' sizes - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5dset_extent_c(dataset_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DSET_EXTENT_C'::h5dset_extent_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: size - END FUNCTION h5dset_extent_c - END INTERFACE - - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5dget_create_plist_c(dataset_id, plist_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_CREATE_PLIST_C'::h5dget_create_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HID_T), INTENT(OUT) :: plist_id - END FUNCTION h5dget_create_plist_c - END INTERFACE - - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5dget_storage_size_c(dataset_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_STORAGE_SIZE_C'::h5dget_storage_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5dget_storage_size_c - END INTERFACE - - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5dvlen_get_max_len_c(dataset_id, type_id, space_id, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DVLEN_GET_MAX_LEN_C'::h5dvlen_get_max_len_c - !DEC$ENDIF - 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 - END FUNCTION h5dvlen_get_max_len_c - END INTERFACE - - 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 - 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 - !***** - INTERFACE - INTEGER FUNCTION h5dget_space_status_c(dset_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_SPACE_STATUS_C'::h5dget_space_status_c - !DEC$ENDIF - INTEGER(HID_T) :: dset_id - INTEGER :: flag - END FUNCTION h5dget_space_status_c - END INTERFACE - - 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 - 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) :: dcpl_id_default - INTEGER(HID_T) :: dapl_id_default - - ! - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DCREATE_ANON_C'::h5dcreate_anon_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T) :: dcpl_id_default - INTEGER(HID_T) :: dapl_id_default - INTEGER(HID_T), INTENT(OUT) :: dset_id - END FUNCTION h5dcreate_anon_c - END INTERFACE - - dcpl_id_default = H5P_DEFAULT_F - dapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(dcpl_id)) dcpl_id_default = dcpl_id - IF(PRESENT(dapl_id)) dapl_id_default = dapl_id - - hdferr = h5dcreate_anon_c(loc_id, type_id, space_id, dcpl_id_default, dapl_id_default, dset_id) - - END SUBROUTINE h5dcreate_anon_f - - 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 identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_vl_integer_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_INTEGER_C'::h5dwrite_vl_integer_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwrite_vl_integer_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, len) - - END SUBROUTINE h5dwrite_vl_integer - - SUBROUTINE h5dread_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(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 identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: tmp - INTEGER :: error - - INTERFACE - INTEGER FUNCTION h5dread_vl_integer_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_INTEGER_C'::h5dread_vl_integer_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dread_vl_integer_c - END INTERFACE - - CALL h5dget_space_f(dset_id, tmp, error) - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = tmp - file_space_id_default = tmp - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_vl_integer_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, len) - - END SUBROUTINE h5dread_vl_integer - - SUBROUTINE h5dwrite_vl_real(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 - 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 identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_vl_real_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_REAL_C'::h5dwrite_vl_real_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: len - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwrite_vl_real_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, len) - - END SUBROUTINE h5dwrite_vl_real - - SUBROUTINE h5dread_vl_real(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(INOUT), DIMENSION(*) :: len ! Array to store the length of each element - 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 identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: tmp - INTEGER :: error - - INTERFACE - INTEGER FUNCTION h5dread_vl_real_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_REAL_C'::h5dread_vl_real_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER(SIZE_T), INTENT(INOUT), DIMENSION(*) :: len - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dread_vl_real_c - END INTERFACE - - CALL h5dget_space_f(dset_id, tmp, error) - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = tmp - file_space_id_default = tmp - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_vl_real_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, len) - - END SUBROUTINE h5dread_vl_real - - SUBROUTINE h5dwrite_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(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 identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dwrite_vl_string_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - ! xfer_prp_default, tmp_buf, dims, str_len) - xfer_prp_default, buf, dims, str_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_VL_STRING_C'::h5dwrite_vl_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims - INTEGER(SIZE_T), INTENT(IN), DIMENSION(*) :: str_len - CHARACTER(LEN=*), DIMENSION(dims(2)) :: buf - END FUNCTION - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, str_len) - - END SUBROUTINE h5dwrite_vl_string - - 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 - 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 identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTERFACE - INTEGER FUNCTION h5dread_vl_string_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims, str_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_VL_STRING_C'::h5dread_vl_string_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(2) :: dims - INTEGER(SIZE_T), INTENT(OUT), DIMENSION(*) :: str_len - CHARACTER(LEN=*), DIMENSION(dims(2)) :: buf - END FUNCTION h5dread_vl_string_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_vl_string_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, & - buf, dims, str_len) - RETURN - END SUBROUTINE h5dread_vl_string - -! -!****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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5dget_space_c(dataset_id, dataspace_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_SPACE_C'::h5dget_space_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dataset_id - INTEGER(HID_T), INTENT(OUT) :: dataspace_id - END FUNCTION h5dget_space_c - END INTERFACE - - 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 -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) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DGET_ACCESS_PLIST_C'::h5dget_access_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(OUT) :: plist_id - END FUNCTION h5dget_access_plist_c - END INTERFACE - - hdferr = h5dget_access_plist_c(dset_id, plist_id) - -END SUBROUTINE h5dget_access_plist_f - - - 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 - 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 bufffer 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 identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - - END SUBROUTINE h5dwrite_reference_obj - - SUBROUTINE h5dwrite_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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 bufffer 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 identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER :: i - INTEGER(HSIZE_T) :: j - TYPE(C_PTR) :: f_ptr - INTERFACE - INTEGER FUNCTION h5dwrite_ref_reg_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_REF_REG_C'::h5dwrite_ref_reg_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER, DIMENSION(*) :: ref_buf - INTEGER(HSIZE_T), DIMENSION(*) :: dims - END FUNCTION h5dwrite_ref_reg_c - END INTERFACE - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) - IF (hdferr .NE. 0 ) THEN - hdferr = -1 - RETURN - ELSE - DO j = 1, dims(1) - DO i = 1, REF_REG_BUF_LEN - ref_buf(REF_REG_BUF_LEN*(j-1) + i) = buf(j)%ref(i) - ENDDO - ENDDO - ENDIF - hdferr = h5dwrite_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - DEALLOCATE(ref_buf) - - END SUBROUTINE h5dwrite_reference_dsetreg - - - SUBROUTINE h5dwrite_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - INTEGER, INTENT(IN), TARGET :: buf ! Data buffer - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_scalar - - SUBROUTINE h5dwrite_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_1 - - SUBROUTINE h5dwrite_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - 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 identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_2 - - SUBROUTINE h5dwrite_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_3 - - SUBROUTINE h5dwrite_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_4 - - SUBROUTINE h5dwrite_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_5 - - SUBROUTINE h5dwrite_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_6 - - SUBROUTINE h5dwrite_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - INTEGER, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_integer_7 - - SUBROUTINE h5dwrite_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: 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 identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - CALL h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - END SUBROUTINE h5dwrite_char_scalar - - SUBROUTINE h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: 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 identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_scalar_fix - - SUBROUTINE h5dwrite_char_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_1 - - SUBROUTINE h5dwrite_char_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_2 - - SUBROUTINE h5dwrite_char_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_3 - - SUBROUTINE h5dwrite_char_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_4 - - SUBROUTINE h5dwrite_char_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_5 - - SUBROUTINE h5dwrite_char_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_6 - - SUBROUTINE h5dwrite_char_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - CHARACTER(LEN=*), INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_char_7 - - - SUBROUTINE h5dwrite_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - REAL, INTENT(IN), TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_scalar - - - SUBROUTINE h5dwrite_real_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_1 - - SUBROUTINE h5dwrite_real_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_2 - - SUBROUTINE h5dwrite_real_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_3 - - SUBROUTINE h5dwrite_real_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_4 - - SUBROUTINE h5dwrite_real_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_5 - - SUBROUTINE h5dwrite_real_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_6 - - SUBROUTINE h5dwrite_real_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - REAL, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dwrite_real_7 - -! -! NAME -! h5dread_f -! -! PURPOSE -! Reads raw data from the specified dataset into buf, -! converting from file datatype and dataspace to memory -! datatype and dataspace. -! -! Inputs: -! dset_id - dataset identifier -! mem_type_id - memory type identifier -! dims - 1-dim array of size 7; dims(k) has the size -! - of k-th dimension of the buf array -! Outputs: -! buf - buffer to read data in -! hdferr: - error code -! Success: 0 -! Failure: -1 -! Optional parameters: -! mem_space_id - memory dataspace identifier -! file_space_id - file dataspace identifier -! xfer_prp - trasfer 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 -! -! dims parameter was added to make code portable; -! n parameter was replaced with dims parameter in -! the h5dwrite_reference_obj and h5dwrite_reference_dsetreg -! functions. April 2, 2001 -! -! NOTES -! This function is overloaded to read INTEGER, -! REAL, DOUBLE PRECISION and CHARACTER buffers -! up to 7 dimensions, and one dimensional buffers -! of the TYPE(hobj_ref_t_f) and TYPE(hdset_reg_ref_t_f) -! types. -! - SUBROUTINE h5dread_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: 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 identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_reference_obj - - SUBROUTINE h5dread_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: 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 identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf - INTEGER :: i - INTEGER(HSIZE_T) :: j - INTERFACE - INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,& - mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_REF_REG_C'::h5dread_ref_reg_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - INTEGER, DIMENSION(*) :: ref_buf - END FUNCTION h5dread_ref_reg_c - END INTERFACE - - ALLOCATE(ref_buf(REF_REG_BUF_LEN*dims(1)), stat=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_ref_reg_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, ref_buf, dims) - - DO j = 1, dims(1) - DO i = 1, REF_REG_BUF_LEN - buf(j)%ref(i) = ref_buf(REF_REG_BUF_LEN*(j-1) + i) - ENDDO - ENDDO - DEALLOCATE(ref_buf) - - END SUBROUTINE h5dread_reference_dsetreg - - - SUBROUTINE h5dread_integer_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - INTEGER, INTENT(INOUT) , TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - - END SUBROUTINE h5dread_integer_scalar - - SUBROUTINE h5dread_integer_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_1 - - SUBROUTINE h5dread_integer_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_2 - - SUBROUTINE h5dread_integer_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_3 - - SUBROUTINE h5dread_integer_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_4 - - SUBROUTINE h5dread_integer_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_5 - - SUBROUTINE h5dread_integer_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_6 - - SUBROUTINE h5dread_integer_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - INTEGER, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_integer_7 - - SUBROUTINE h5dread_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: 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 identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - CALL h5dread_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), hdferr, & - mem_space_id_default, file_space_id_default, xfer_prp_default) - - END SUBROUTINE h5dread_char_scalar - - SUBROUTINE h5dread_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - 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 identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(buf(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id, & - file_space_id, xfer_prp, f_ptr) - - END SUBROUTINE h5dread_char_scalar_fix - - SUBROUTINE h5dread_char_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1)(1:1)) - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_1 - - SUBROUTINE h5dread_char_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_2 - - SUBROUTINE h5dread_char_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1)(1:1)) - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_3 - - SUBROUTINE h5dread_char_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_4 - - SUBROUTINE h5dread_char_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_5 - - SUBROUTINE h5dread_char_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_6 - - SUBROUTINE h5dread_char_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - CHARACTER(LEN=*), INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)), TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)(1:1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_char_7 - - SUBROUTINE h5dread_real_scalar(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - REAL, INTENT(INOUT) , TARGET :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_scalar - - SUBROUTINE h5dread_real_1(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_1 - - SUBROUTINE h5dread_real_2(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_2 - - SUBROUTINE h5dread_real_3(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_3 - - SUBROUTINE h5dread_real_4(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3), dims(4)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_4 - - SUBROUTINE h5dread_real_5(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_5 - - SUBROUTINE h5dread_real_6(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_6 - - SUBROUTINE h5dread_real_7(dset_id, mem_type_id, buf, dims, hdferr, & - mem_space_id, file_space_id, xfer_prp) - USE, INTRINSIC :: ISO_C_BINDING - 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(*) :: dims - REAL, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) , TARGET :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - TYPE(C_PTR) :: f_ptr - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF(PRESENT(file_space_id)) file_space_id_default = file_space_id - f_ptr = C_LOC(buf(1,1,1,1,1,1,1)) - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, f_ptr) - - END SUBROUTINE h5dread_real_7 - -!****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 - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(IN) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf) - - 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 - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier - INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier - TYPE(C_PTR), INTENT(INOUT) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - IF (PRESENT(xfer_prp)) xfer_prp_default = xfer_prp - IF (PRESENT(mem_space_id)) mem_space_id_default = mem_space_id - IF (PRESENT(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf) - - 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 - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! 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 - IMPLICIT NONE - INTEGER, INTENT(IN), TARGET :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - INTEGER, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value - TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf - - f_ptr_fill_value = C_LOC(fill_value) - f_ptr_buf = C_LOC(buf(1)) - - fill_type_id = H5T_NATIVE_INTEGER - mem_type_id = H5T_NATIVE_INTEGER - - hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) - - END SUBROUTINE h5dfill_integer - -! -! NAME -! h5dfill_real -! -! 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 - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! Outputs: -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! - SUBROUTINE h5dfill_real(fill_valuer, space_id, buf, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - REAL, INTENT(IN), TARGET :: fill_valuer ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - REAL, INTENT(IN), DIMENSION(*), TARGET :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - TYPE(C_PTR) :: f_ptr_fill_valuer ! C pointer to fill_value - TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf - - f_ptr_fill_valuer = C_LOC(fill_valuer) - f_ptr_buf = C_LOC(buf(1)) - - fill_type_id = H5T_NATIVE_REAL - mem_type_id = H5T_NATIVE_REAL - - hdferr = h5dfill_c(f_ptr_fill_valuer, fill_type_id, space_id, & - f_ptr_buf, mem_type_id) - - END SUBROUTINE h5dfill_real - -! -! 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 - data buffer iin memory ro apply selection to -! - of k-th dimension of the buf array -! 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 - 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 - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - TYPE(C_PTR) :: f_ptr_fill_value ! C pointer to fill_value - TYPE(C_PTR) :: f_ptr_buf ! C pointer to buf - - f_ptr_fill_value = C_LOC(fill_value) - f_ptr_buf = C_LOC(buf(1)) - - hdferr = h5dfill_c(f_ptr_fill_value, fill_type_id, space_id, & - 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) - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR - 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') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR - 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 - - -END MODULE H5D - - diff --git a/fortran/src/H5Eff.F90 b/fortran/src/H5Eff.F90 new file mode 100644 index 0000000..ca32b22 --- /dev/null +++ b/fortran/src/H5Eff.F90 @@ -0,0 +1,312 @@ +!****h* ROBODoc/H5E +! +! NAME +! MODULE H5E +! +! FILE +! fortran/src/H5Eff.f90 +! +! PURPOSE +! This Module contains Fortran interfaces for H5E functions. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! NOTES +! *** IMPORTANT *** +! If you add a new H5E function to the module 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. +! +!***** + +MODULE H5E + + USE H5GLOBAL + + !Turn on automatic printing of errors + INTEGER, PARAMETER :: PRINTON = 1 + + !Turn off automatic printing of errors + INTEGER, PARAMETER :: PRINTOFF = 0 + +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 + SUBROUTINE h5eclear_f(hdferr, estack_id) + IMPLICIT NONE + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: estack_id +!***** + INTEGER(HID_T) :: estack_id_default + + INTERFACE + INTEGER FUNCTION h5eclear_c(estack_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ECLEAR_C'::h5eclear_c + !DEC$ENDIF + INTEGER(HID_T) :: estack_id_default + END FUNCTION h5eclear_c + END INTERFACE + + estack_id_default = H5E_DEFAULT_F + IF(PRESENT(estack_id)) estack_id_default = estack_id + + 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 + SUBROUTINE h5eprint_f(hdferr, name) + CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name ! File name + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5eprint_c1(name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C1'::h5eprint_c1 + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER :: namelen + CHARACTER(LEN=*),INTENT(IN) :: name + END FUNCTION h5eprint_c1 + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5eprint_c2() + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C2'::h5eprint_c2 + !DEC$ENDIF + END FUNCTION h5eprint_c2 + END INTERFACE + namelen = LEN(NAME) + IF (PRESENT(name)) THEN + hdferr = h5eprint_c1(name, namelen) + ELSE + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5eget_major_c(error_no, name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EGET_MAJOR_C'::h5eget_major_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER :: error_no + CHARACTER(LEN=*) :: name + INTEGER(SIZE_T), INTENT(IN) :: namelen + END FUNCTION h5eget_major_c + END INTERFACE + + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5eget_minor_c(error_no, name) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EGET_MINOR_C'::h5eget_minor_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER :: error_no + CHARACTER(LEN=*) :: name + END FUNCTION h5eget_minor_c + END INTERFACE + + 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: + SUBROUTINE h5eset_auto_f(printflag, hdferr, estack_id, func, client_data) + USE, INTRINSIC :: ISO_C_BINDING + INTEGER , INTENT(IN) :: printflag + INTEGER , INTENT(OUT) :: hdferr + 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 + INTERFACE + INTEGER FUNCTION h5eset_auto2_c(printflag, estack_id, func, client_data) & + BIND(C, NAME='h5eset_auto2_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr + USE H5GLOBAL + INTEGER :: printflag + INTEGER(HID_T) :: estack_id +!!$ TYPE(C_FUNPTR) :: func +!!$ TYPE(C_PTR), VALUE :: client_data + TYPE(C_FUNPTR), VALUE :: func + TYPE(C_PTR), VALUE :: client_data + END FUNCTION h5eset_auto2_c + END INTERFACE + + estack_id_default = -1 + func_default = C_NULL_FUNPTR + client_data_default = C_NULL_PTR + + IF(PRESENT(estack_id)) estack_id_default = estack_id + IF(PRESENT(func)) func_default = func + IF(PRESENT(client_data)) client_data_default = client_data + + hdferr = h5eset_auto2_c(printflag, estack_id_default, func_default, client_data_default) + END SUBROUTINE h5eset_auto_f + +END MODULE H5E + diff --git a/fortran/src/H5Eff.f90 b/fortran/src/H5Eff.f90 deleted file mode 100644 index ca32b22..0000000 --- a/fortran/src/H5Eff.f90 +++ /dev/null @@ -1,312 +0,0 @@ -!****h* ROBODoc/H5E -! -! NAME -! MODULE H5E -! -! FILE -! fortran/src/H5Eff.f90 -! -! PURPOSE -! This Module contains Fortran interfaces for H5E functions. -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! NOTES -! *** IMPORTANT *** -! If you add a new H5E function to the module 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. -! -!***** - -MODULE H5E - - USE H5GLOBAL - - !Turn on automatic printing of errors - INTEGER, PARAMETER :: PRINTON = 1 - - !Turn off automatic printing of errors - INTEGER, PARAMETER :: PRINTOFF = 0 - -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 - SUBROUTINE h5eclear_f(hdferr, estack_id) - IMPLICIT NONE - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: estack_id -!***** - INTEGER(HID_T) :: estack_id_default - - INTERFACE - INTEGER FUNCTION h5eclear_c(estack_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ECLEAR_C'::h5eclear_c - !DEC$ENDIF - INTEGER(HID_T) :: estack_id_default - END FUNCTION h5eclear_c - END INTERFACE - - estack_id_default = H5E_DEFAULT_F - IF(PRESENT(estack_id)) estack_id_default = estack_id - - 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 - SUBROUTINE h5eprint_f(hdferr, name) - CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: name ! File name - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5eprint_c1(name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C1'::h5eprint_c1 - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER :: namelen - CHARACTER(LEN=*),INTENT(IN) :: name - END FUNCTION h5eprint_c1 - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5eprint_c2() - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EPRINT_C2'::h5eprint_c2 - !DEC$ENDIF - END FUNCTION h5eprint_c2 - END INTERFACE - namelen = LEN(NAME) - IF (PRESENT(name)) THEN - hdferr = h5eprint_c1(name, namelen) - ELSE - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5eget_major_c(error_no, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EGET_MAJOR_C'::h5eget_major_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER :: error_no - CHARACTER(LEN=*) :: name - INTEGER(SIZE_T), INTENT(IN) :: namelen - END FUNCTION h5eget_major_c - END INTERFACE - - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5eget_minor_c(error_no, name) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5EGET_MINOR_C'::h5eget_minor_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER :: error_no - CHARACTER(LEN=*) :: name - END FUNCTION h5eget_minor_c - END INTERFACE - - 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: - SUBROUTINE h5eset_auto_f(printflag, hdferr, estack_id, func, client_data) - USE, INTRINSIC :: ISO_C_BINDING - INTEGER , INTENT(IN) :: printflag - INTEGER , INTENT(OUT) :: hdferr - 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 - INTERFACE - INTEGER FUNCTION h5eset_auto2_c(printflag, estack_id, func, client_data) & - BIND(C, NAME='h5eset_auto2_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr - USE H5GLOBAL - INTEGER :: printflag - INTEGER(HID_T) :: estack_id -!!$ TYPE(C_FUNPTR) :: func -!!$ TYPE(C_PTR), VALUE :: client_data - TYPE(C_FUNPTR), VALUE :: func - TYPE(C_PTR), VALUE :: client_data - END FUNCTION h5eset_auto2_c - END INTERFACE - - estack_id_default = -1 - func_default = C_NULL_FUNPTR - client_data_default = C_NULL_PTR - - IF(PRESENT(estack_id)) estack_id_default = estack_id - IF(PRESENT(func)) func_default = func - IF(PRESENT(client_data)) client_data_default = client_data - - hdferr = h5eset_auto2_c(printflag, estack_id_default, func_default, client_data_default) - END SUBROUTINE h5eset_auto_f - -END MODULE H5E - diff --git a/fortran/src/H5FDmpioff.F90 b/fortran/src/H5FDmpioff.F90 new file mode 100644 index 0000000..50a77d9 --- /dev/null +++ b/fortran/src/H5FDmpioff.F90 @@ -0,0 +1,212 @@ +!****h* ROBODoc/H5FDMPIO +! +! NAME +! MODULE H5FDMPIO +! +! PURPOSE +! This file contains Fortran interfaces for H5P functions needed by +! parallel MPI programs. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! NOTES +! *** IMPORTANT *** +! 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. +! +!***** + +MODULE H5FDMPIO + USE H5GLOBAL +CONTAINS + +!****s* H5FDMPIO/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 + 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, EXTERNAL :: h5pset_fapl_mpio_c + hdferr = h5pset_fapl_mpio_c(prp_id, comm, info) + END SUBROUTINE h5pset_fapl_mpio_f + +!****s* H5FDMPIO/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 + 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, EXTERNAL :: h5pget_fapl_mpio_c + hdferr = h5pget_fapl_mpio_c(prp_id, comm, info) + END SUBROUTINE h5pget_fapl_mpio_f + +!****s* H5FDMPIO/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 + 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, EXTERNAL :: h5pset_dxpl_mpio_c + hdferr = h5pset_dxpl_mpio_c(prp_id, data_xfer_mode) + END SUBROUTINE h5pset_dxpl_mpio_f + +!****s* H5FDMPIO/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 + 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, EXTERNAL :: h5pget_dxpl_mpio_c + 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: + 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) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_MPIO_ACTUAL_IO_MODE_C'::h5pget_mpio_actual_io_mode_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dxpl_id + INTEGER , INTENT(OUT) :: actual_io_mode + END FUNCTION h5pget_mpio_actual_io_mode_c + END INTERFACE + + actual_io_mode = -1 + + hdferr = h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) + + END SUBROUTINE h5pget_mpio_actual_io_mode_f + +END MODULE H5FDMPIO diff --git a/fortran/src/H5FDmpioff.f90 b/fortran/src/H5FDmpioff.f90 deleted file mode 100644 index 50a77d9..0000000 --- a/fortran/src/H5FDmpioff.f90 +++ /dev/null @@ -1,212 +0,0 @@ -!****h* ROBODoc/H5FDMPIO -! -! NAME -! MODULE H5FDMPIO -! -! PURPOSE -! This file contains Fortran interfaces for H5P functions needed by -! parallel MPI programs. -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! NOTES -! *** IMPORTANT *** -! 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. -! -!***** - -MODULE H5FDMPIO - USE H5GLOBAL -CONTAINS - -!****s* H5FDMPIO/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 - 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, EXTERNAL :: h5pset_fapl_mpio_c - hdferr = h5pset_fapl_mpio_c(prp_id, comm, info) - END SUBROUTINE h5pset_fapl_mpio_f - -!****s* H5FDMPIO/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 - 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, EXTERNAL :: h5pget_fapl_mpio_c - hdferr = h5pget_fapl_mpio_c(prp_id, comm, info) - END SUBROUTINE h5pget_fapl_mpio_f - -!****s* H5FDMPIO/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 - 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, EXTERNAL :: h5pset_dxpl_mpio_c - hdferr = h5pset_dxpl_mpio_c(prp_id, data_xfer_mode) - END SUBROUTINE h5pset_dxpl_mpio_f - -!****s* H5FDMPIO/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 - 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, EXTERNAL :: h5pget_dxpl_mpio_c - 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: - 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) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_MPIO_ACTUAL_IO_MODE_C'::h5pget_mpio_actual_io_mode_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dxpl_id - INTEGER , INTENT(OUT) :: actual_io_mode - END FUNCTION h5pget_mpio_actual_io_mode_c - END INTERFACE - - actual_io_mode = -1 - - hdferr = h5pget_mpio_actual_io_mode_c(dxpl_id, actual_io_mode) - - END SUBROUTINE h5pget_mpio_actual_io_mode_f - -END MODULE H5FDMPIO diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90 new file mode 100644 index 0000000..53df8c5 --- /dev/null +++ b/fortran/src/H5Fff.F90 @@ -0,0 +1,894 @@ +!****h* ROBODoc/H5F +! +! NAME +! MODULE H5F +! +! FILE +! H5Fff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5F functions. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! NOTES +! *** IMPORTANT *** +! If you add a new H5F 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. +! +!***** + +MODULE H5F + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING + +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 + 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 + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: creation_prp + ! File creation propertly + ! 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 + + INTERFACE + INTEGER FUNCTION h5fcreate_c(name, namelen, access_flags, & + creation_prp_default, access_prp_default, file_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FCREATE_C':: h5fcreate_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: access_flags + INTEGER(HID_T), INTENT(OUT) :: file_id + INTEGER(HID_T), INTENT(IN) :: creation_prp_default + INTEGER(HID_T), INTENT(IN) :: access_prp_default + INTEGER :: namelen + END FUNCTION h5fcreate_c + END INTERFACE + + creation_prp_default = H5P_DEFAULT_F + access_prp_default = H5P_DEFAULT_F + + IF (PRESENT(creation_prp)) creation_prp_default = creation_prp + IF (PRESENT(access_prp)) access_prp_default = access_prp + namelen = LEN_TRIM(name) + hdferr = h5fcreate_c(name, namelen, access_flags, & + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5fflush_c(object_id, scope) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FFLUSH_C':: h5fflush_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER, INTENT(IN) :: scope + END FUNCTION h5fflush_c + END INTERFACE + + 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 + 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), OPTIONAL, INTENT(IN) :: access_prp + ! File access property list + ! identifier +!***** + INTEGER(HID_T) :: access_prp_default + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5fmount_c(loc_id, name, namelen, & + child_id, access_prp_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FMOUNT_C':: h5fmount_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T), INTENT(IN) :: child_id + INTEGER(HID_T), INTENT(IN) :: access_prp_default + INTEGER :: namelen + END FUNCTION h5fmount_c + END INTERFACE + + access_prp_default = H5P_DEFAULT_F + IF (PRESENT(access_prp)) access_prp_default = access_prp + namelen = LEN_TRIM(name) + hdferr = h5fmount_c(loc_id, name, namelen, child_id, access_prp_default) + + 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 + 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 :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5funmount_c(loc_id, name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FUNMOUNT_C':: h5funmount_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + END FUNCTION h5funmount_c + END INTERFACE + + namelen = LEN_TRIM(name) + 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 + 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 + 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 + + INTERFACE + INTEGER FUNCTION h5fopen_c(name, namelen, access_flags, & + access_prp_default, file_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FOPEN_C':: h5fopen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(IN) :: access_flags + INTEGER(HID_T), INTENT(IN) :: access_prp_default + INTEGER(HID_T), INTENT(OUT) :: file_id + END FUNCTION h5fopen_c + END INTERFACE + + access_prp_default = H5P_DEFAULT_F + IF (PRESENT(access_prp)) access_prp_default = access_prp + namelen = LEN_TRIM(name) + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5freopen_c(file_id, ret_file_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FREOPEN_C':: h5freopen_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HID_T), INTENT(OUT) :: ret_file_id + END FUNCTION h5freopen_c + END INTERFACE + + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5fget_create_plist_c(file_id, prop_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_CREATE_PLIST_C':: h5fget_create_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HID_T), INTENT(OUT) :: prop_id + END FUNCTION h5fget_create_plist_c + END INTERFACE + + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5fget_access_plist_c(file_id, access_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_CREATE_PLIST_C':: h5fget_access_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HID_T), INTENT(OUT) :: access_id + END FUNCTION h5fget_access_plist_c + END INTERFACE + + hdferr = h5fget_access_plist_c(file_id, access_id) + + END SUBROUTINE h5fget_access_plist_f + +!****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 +! +! HISTORY +! Explicit Fortran interfaces were added for +! called C functions (it is needed for Windows +! port). February 28, 2001 +! +! SOURCE + 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 +!***** + INTEGER :: namelen ! Length of the name character string + INTEGER :: flag ! "TRUE/FALSE" flag from C routine + ! to define status value. + + INTERFACE + INTEGER FUNCTION h5fis_hdf5_c(name, namelen, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FIS_HDF5_C':: h5fis_hdf5_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER :: flag + END FUNCTION h5fis_hdf5_c + END INTERFACE + + namelen = LEN_TRIM(name) + hdferr = h5fis_hdf5_c(name, namelen, flag) + status = .TRUE. + IF (flag .EQ. 0) status = .FALSE. + + 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 + SUBROUTINE h5fclose_f(file_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fclose_c(file_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FCLOSE_C':: h5fclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + END FUNCTION h5fclose_c + END INTERFACE + + hdferr = h5fclose_c(file_id) + + 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 + SUBROUTINE h5fget_obj_count_f(file_id, obj_type, obj_count, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER, INTENT(IN) :: obj_type ! Object type + INTEGER(SIZE_T), INTENT(OUT) :: obj_count + ! Number of open objects + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fget_obj_count_c(file_id, obj_type, obj_count) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_OBJ_COUNT_C':: h5fget_obj_count_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER, INTENT(IN) :: obj_type ! Object type + INTEGER(SIZE_T), INTENT(OUT) :: obj_count + ! Number of open objects + END FUNCTION h5fget_obj_count_c + END INTERFACE + + hdferr = h5fget_obj_count_c(file_id, obj_type, obj_count) + + 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 + 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), 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(SIZE_T) :: c_num_objs ! Number of open objects of the specified type + + INTERFACE + INTEGER FUNCTION h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_OBJ_IDS_C':: h5fget_obj_ids_c + !DEC$ENDIF + 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 + INTEGER(SIZE_T), INTENT(OUT) :: c_num_objs + END FUNCTION h5fget_obj_ids_c + END INTERFACE + + hdferr = h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) + 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 + SUBROUTINE h5fget_freespace_f(file_id, free_space, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier + INTEGER(HSSIZE_T), INTENT(OUT) :: free_space + ! amount of free space in file + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5fget_freespace_c(file_id, free_space) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_FREESPACE_C':: h5fget_freespace_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HSSIZE_T), INTENT(OUT) :: free_space + END FUNCTION h5fget_freespace_c + END INTERFACE + + 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 + SUBROUTINE h5fget_name_f(obj_id, buf, size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier + CHARACTER(LEN=*), INTENT(INOUT) :: 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) :: buflen + + INTERFACE + INTEGER FUNCTION h5fget_name_c(obj_id, size, buf, buflen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_NAME_C'::h5fget_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(SIZE_T), INTENT(OUT) :: size + INTEGER(SIZE_T) :: buflen + CHARACTER(LEN=*), INTENT(OUT) :: buf + END FUNCTION h5fget_name_c + END INTERFACE + buflen = LEN_TRIM(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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5fget_filesize_c(file_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_FILESIZE_C'::h5fget_filesize_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: file_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5fget_filesize_c + END INTERFACE + hdferr = h5fget_filesize_c(file_id, size) + END SUBROUTINE h5fget_filesize_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: + SUBROUTINE h5fget_file_image_f(file_id, buf_ptr, buf_len, hdferr, buf_size) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: file_id + TYPE(C_PTR) , INTENT(INOUT) :: buf_ptr + 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 + + INTERFACE + INTEGER FUNCTION h5fget_file_image_c(file_id, buf_ptr, buf_len, buf_size) BIND(C, NAME='h5fget_file_image_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR + USE H5GLOBAL + INTEGER(HID_T) , INTENT(IN) :: file_id + TYPE(C_PTR) , VALUE :: buf_ptr + INTEGER(SIZE_T), INTENT(IN) :: buf_len + INTEGER(SIZE_T), INTENT(IN) :: buf_size + END FUNCTION h5fget_file_image_c + END INTERFACE + + IF(PRESENT(buf_size))THEN + buf_ptr = C_NULL_PTR + ENDIF + + hdferr = h5fget_file_image_c(file_id, buf_ptr, buf_len, buf_size_default) + + IF(PRESENT(buf_size))THEN + buf_size = buf_size_default + ENDIF + + END SUBROUTINE h5fget_file_image_f + +END MODULE H5F diff --git a/fortran/src/H5Fff.f90 b/fortran/src/H5Fff.f90 deleted file mode 100644 index 53df8c5..0000000 --- a/fortran/src/H5Fff.f90 +++ /dev/null @@ -1,894 +0,0 @@ -!****h* ROBODoc/H5F -! -! NAME -! MODULE H5F -! -! FILE -! H5Fff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5F functions. -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! NOTES -! *** IMPORTANT *** -! If you add a new H5F 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. -! -!***** - -MODULE H5F - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING - -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 - 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 - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: creation_prp - ! File creation propertly - ! 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 - - INTERFACE - INTEGER FUNCTION h5fcreate_c(name, namelen, access_flags, & - creation_prp_default, access_prp_default, file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FCREATE_C':: h5fcreate_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: access_flags - INTEGER(HID_T), INTENT(OUT) :: file_id - INTEGER(HID_T), INTENT(IN) :: creation_prp_default - INTEGER(HID_T), INTENT(IN) :: access_prp_default - INTEGER :: namelen - END FUNCTION h5fcreate_c - END INTERFACE - - creation_prp_default = H5P_DEFAULT_F - access_prp_default = H5P_DEFAULT_F - - IF (PRESENT(creation_prp)) creation_prp_default = creation_prp - IF (PRESENT(access_prp)) access_prp_default = access_prp - namelen = LEN_TRIM(name) - hdferr = h5fcreate_c(name, namelen, access_flags, & - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5fflush_c(object_id, scope) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FFLUSH_C':: h5fflush_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER, INTENT(IN) :: scope - END FUNCTION h5fflush_c - END INTERFACE - - 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 - 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), OPTIONAL, INTENT(IN) :: access_prp - ! File access property list - ! identifier -!***** - INTEGER(HID_T) :: access_prp_default - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5fmount_c(loc_id, name, namelen, & - child_id, access_prp_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FMOUNT_C':: h5fmount_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T), INTENT(IN) :: child_id - INTEGER(HID_T), INTENT(IN) :: access_prp_default - INTEGER :: namelen - END FUNCTION h5fmount_c - END INTERFACE - - access_prp_default = H5P_DEFAULT_F - IF (PRESENT(access_prp)) access_prp_default = access_prp - namelen = LEN_TRIM(name) - hdferr = h5fmount_c(loc_id, name, namelen, child_id, access_prp_default) - - 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 - 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 :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5funmount_c(loc_id, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FUNMOUNT_C':: h5funmount_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - END FUNCTION h5funmount_c - END INTERFACE - - namelen = LEN_TRIM(name) - 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 - 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 - 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 - - INTERFACE - INTEGER FUNCTION h5fopen_c(name, namelen, access_flags, & - access_prp_default, file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FOPEN_C':: h5fopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(IN) :: access_flags - INTEGER(HID_T), INTENT(IN) :: access_prp_default - INTEGER(HID_T), INTENT(OUT) :: file_id - END FUNCTION h5fopen_c - END INTERFACE - - access_prp_default = H5P_DEFAULT_F - IF (PRESENT(access_prp)) access_prp_default = access_prp - namelen = LEN_TRIM(name) - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5freopen_c(file_id, ret_file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FREOPEN_C':: h5freopen_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HID_T), INTENT(OUT) :: ret_file_id - END FUNCTION h5freopen_c - END INTERFACE - - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5fget_create_plist_c(file_id, prop_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_CREATE_PLIST_C':: h5fget_create_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HID_T), INTENT(OUT) :: prop_id - END FUNCTION h5fget_create_plist_c - END INTERFACE - - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5fget_access_plist_c(file_id, access_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_CREATE_PLIST_C':: h5fget_access_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HID_T), INTENT(OUT) :: access_id - END FUNCTION h5fget_access_plist_c - END INTERFACE - - hdferr = h5fget_access_plist_c(file_id, access_id) - - END SUBROUTINE h5fget_access_plist_f - -!****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 -! -! HISTORY -! Explicit Fortran interfaces were added for -! called C functions (it is needed for Windows -! port). February 28, 2001 -! -! SOURCE - 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 -!***** - INTEGER :: namelen ! Length of the name character string - INTEGER :: flag ! "TRUE/FALSE" flag from C routine - ! to define status value. - - INTERFACE - INTEGER FUNCTION h5fis_hdf5_c(name, namelen, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FIS_HDF5_C':: h5fis_hdf5_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER :: flag - END FUNCTION h5fis_hdf5_c - END INTERFACE - - namelen = LEN_TRIM(name) - hdferr = h5fis_hdf5_c(name, namelen, flag) - status = .TRUE. - IF (flag .EQ. 0) status = .FALSE. - - 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 - SUBROUTINE h5fclose_f(file_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fclose_c(file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FCLOSE_C':: h5fclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - END FUNCTION h5fclose_c - END INTERFACE - - hdferr = h5fclose_c(file_id) - - 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 - SUBROUTINE h5fget_obj_count_f(file_id, obj_type, obj_count, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER, INTENT(IN) :: obj_type ! Object type - INTEGER(SIZE_T), INTENT(OUT) :: obj_count - ! Number of open objects - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fget_obj_count_c(file_id, obj_type, obj_count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_OBJ_COUNT_C':: h5fget_obj_count_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER, INTENT(IN) :: obj_type ! Object type - INTEGER(SIZE_T), INTENT(OUT) :: obj_count - ! Number of open objects - END FUNCTION h5fget_obj_count_c - END INTERFACE - - hdferr = h5fget_obj_count_c(file_id, obj_type, obj_count) - - 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 - 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), 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(SIZE_T) :: c_num_objs ! Number of open objects of the specified type - - INTERFACE - INTEGER FUNCTION h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_OBJ_IDS_C':: h5fget_obj_ids_c - !DEC$ENDIF - 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 - INTEGER(SIZE_T), INTENT(OUT) :: c_num_objs - END FUNCTION h5fget_obj_ids_c - END INTERFACE - - hdferr = h5fget_obj_ids_c(file_id, obj_type, max_objs, obj_ids, c_num_objs) - 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 - SUBROUTINE h5fget_freespace_f(file_id, free_space, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: file_id ! File identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: free_space - ! amount of free space in file - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5fget_freespace_c(file_id, free_space) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_FREESPACE_C':: h5fget_freespace_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HSSIZE_T), INTENT(OUT) :: free_space - END FUNCTION h5fget_freespace_c - END INTERFACE - - 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 - SUBROUTINE h5fget_name_f(obj_id, buf, size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier - CHARACTER(LEN=*), INTENT(INOUT) :: 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) :: buflen - - INTERFACE - INTEGER FUNCTION h5fget_name_c(obj_id, size, buf, buflen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_NAME_C'::h5fget_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER(SIZE_T), INTENT(OUT) :: size - INTEGER(SIZE_T) :: buflen - CHARACTER(LEN=*), INTENT(OUT) :: buf - END FUNCTION h5fget_name_c - END INTERFACE - buflen = LEN_TRIM(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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5fget_filesize_c(file_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5FGET_FILESIZE_C'::h5fget_filesize_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: file_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5fget_filesize_c - END INTERFACE - hdferr = h5fget_filesize_c(file_id, size) - END SUBROUTINE h5fget_filesize_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: - SUBROUTINE h5fget_file_image_f(file_id, buf_ptr, buf_len, hdferr, buf_size) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: file_id - TYPE(C_PTR) , INTENT(INOUT) :: buf_ptr - 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 - - INTERFACE - INTEGER FUNCTION h5fget_file_image_c(file_id, buf_ptr, buf_len, buf_size) BIND(C, NAME='h5fget_file_image_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR - USE H5GLOBAL - INTEGER(HID_T) , INTENT(IN) :: file_id - TYPE(C_PTR) , VALUE :: buf_ptr - INTEGER(SIZE_T), INTENT(IN) :: buf_len - INTEGER(SIZE_T), INTENT(IN) :: buf_size - END FUNCTION h5fget_file_image_c - END INTERFACE - - IF(PRESENT(buf_size))THEN - buf_ptr = C_NULL_PTR - ENDIF - - hdferr = h5fget_file_image_c(file_id, buf_ptr, buf_len, buf_size_default) - - IF(PRESENT(buf_size))THEN - buf_size = buf_size_default - ENDIF - - END SUBROUTINE h5fget_file_image_f - -END MODULE H5F diff --git a/fortran/src/H5Gff.F90 b/fortran/src/H5Gff.F90 new file mode 100644 index 0000000..d4d7496 --- /dev/null +++ b/fortran/src/H5Gff.F90 @@ -0,0 +1,1331 @@ +!****h* ROBODoc/H5G +! +! NAME +! MODULE H5G +! +! FILE +! fortran/src/H5Gff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5G functions. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! NOTES +! *** IMPORTANT *** +! If you add a new H5G 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. +! +!***** + +MODULE H5G + USE H5GLOBAL + +! PRIVATE :: h5gcreate1_f +! PRIVATE :: h5gcreate2_f + +! INTERFACE h5gcreate_f +! MODULE PROCEDURE h5gcreate1_f +! MODULE PROCEDURE h5gcreate2_f +! END INTERFACE + +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 paramaters in 1.8 +! MSB - February 27, 2008 +! +! SOURCE + 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(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) :: 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 + + INTERFACE + INTEGER FUNCTION h5gcreate_c(loc_id, name, namelen, & + size_hint_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(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(SIZE_T) :: size_hint_default + INTEGER(HID_T), INTENT(OUT) :: grp_id + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: gcpl_id_default + INTEGER(HID_T) :: gapl_id_default + END FUNCTION h5gcreate_c + END INTERFACE + + size_hint_default = OBJECT_NAMELEN_DEFAULT_F + IF (PRESENT(size_hint)) size_hint_default = size_hint + 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 + + namelen = LEN(name) + + hdferr = h5gcreate_c(loc_id, name, namelen, size_hint_default, grp_id, & + lcpl_id_default, gcpl_id_default, gapl_id_default) + + 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(LEN=*), 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(LEN=*), 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 + 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) :: gapl_id_default + INTEGER :: namelen ! Length of the name character string + + INTERFACE + INTEGER FUNCTION h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GOPEN_C'::h5gopen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: gapl_id_default + INTEGER(HID_T), INTENT(OUT) :: grp_id + END FUNCTION h5gopen_c + END INTERFACE + + gapl_id_default = H5P_DEFAULT_F + IF(PRESENT(gapl_id)) gapl_id_default = gapl_id + + namelen = LEN(name) + 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 + SUBROUTINE h5gclose_f(grp_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: grp_id ! Group identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5gclose_c(grp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCLOSE_C'::h5gclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: grp_id + END FUNCTION h5gclose_c + END INTERFACE + + 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 + 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 :: namelen ! Length of the name character string + INTEGER :: obj_namelen ! Length of the obj_name character string + + INTERFACE + INTEGER FUNCTION h5gget_obj_info_idx_c(loc_id, name, & + namelen, idx, & + obj_name, obj_namelen, obj_type) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_OBJ_INFO_IDX_C'::h5gget_obj_info_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: obj_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(IN) :: idx + CHARACTER(LEN=*), INTENT(OUT) :: obj_name + INTEGER :: obj_namelen + INTEGER, INTENT(OUT) :: obj_type + END FUNCTION h5gget_obj_info_idx_c + END INTERFACE + + namelen = LEN(name) + obj_namelen = LEN(obj_name) + hdferr = h5gget_obj_info_idx_c(loc_id, name, namelen, idx, & + 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 + 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) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GN_MEMBERS_C'::h5gn_members_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), 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 + 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) + + 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 +!***** + + INTEGER :: current_namelen ! Lenghth of the current_name string + INTEGER :: new_namelen ! Lenghth of the new_name string + + INTERFACE + INTEGER FUNCTION h5glink_c(loc_id, link_type, current_name, & + current_namelen, new_name, new_namelen) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GLINK_C'::h5glink_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: current_name + !DEC$ATTRIBUTES reference :: new_name + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: link_type + CHARACTER(LEN=*), INTENT(IN) :: current_name + INTEGER :: current_namelen + CHARACTER(LEN=*), INTENT(IN) :: new_name + INTEGER :: new_namelen + END FUNCTION h5glink_c + END INTERFACE + + current_namelen = LEN(current_name) + new_namelen = LEN(new_name) + hdferr = h5glink_c(loc_id, link_type, current_name, & + 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 +! releative 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 + 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 + 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(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 :: cur_namelen ! Lenghth of the current_name string + INTEGER :: new_namelen ! Lenghth of the new_name string + + INTERFACE + INTEGER FUNCTION h5glink2_c(cur_loc_id, cur_name, cur_namelen, & + link_type, new_loc_id, & + new_name, new_namelen) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GLINK2_C'::h5glink2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: cur_name + !DEC$ATTRIBUTES reference :: new_name + INTEGER(HID_T), INTENT(IN) :: cur_loc_id + INTEGER(HID_T), INTENT(IN) :: new_loc_id + INTEGER, INTENT(IN) :: link_type + CHARACTER(LEN=*), INTENT(IN) :: cur_name + CHARACTER(LEN=*), INTENT(IN) :: new_name + INTEGER :: cur_namelen + INTEGER :: new_namelen + END FUNCTION h5glink2_c + END INTERFACE + + cur_namelen = LEN(cur_name) + new_namelen = LEN(new_name) + hdferr = h5glink2_c(cur_loc_id, cur_name, cur_namelen, link_type, & + 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 + 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 :: namelen ! Lenghth of the name character string + + INTERFACE + INTEGER FUNCTION h5gunlink_c(loc_id, name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GUNLINK_C'::h5gunlink_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + END FUNCTION h5gunlink_c + END INTERFACE + + namelen = LEN(name) + 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 + 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 :: namelen ! Lenghth of the current_name string + INTEGER :: new_namelen ! Lenghth of the new_name string + + INTERFACE + INTEGER FUNCTION h5gmove_c(loc_id, name, namelen, new_name, new_namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GMOVE_C'::h5gmove_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: new_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + CHARACTER(LEN=*), INTENT(IN) :: new_name + INTEGER :: new_namelen + END FUNCTION h5gmove_c + END INTERFACE + + namelen = LEN(name) + 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 + 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 :: src_namelen ! Length of the current_name string + INTEGER :: dst_namelen ! Lenghth of the new_name string + + INTERFACE + INTEGER FUNCTION h5gmove2_c(src_loc_id, src_name, src_namelen, & + dst_loc_id, dst_name, dst_namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GMOVE2_C'::h5gmove2_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: src_name + !DEC$ATTRIBUTES reference :: dst_name + INTEGER(HID_T), INTENT(IN) :: src_loc_id + INTEGER(HID_T), INTENT(IN) :: dst_loc_id + CHARACTER(LEN=*), INTENT(IN) :: src_name + CHARACTER(LEN=*), INTENT(IN) :: dst_name + INTEGER :: src_namelen + INTEGER :: dst_namelen + END FUNCTION h5gmove2_c + END INTERFACE + + src_namelen = LEN(src_name) + 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 + 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 + 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 :: namelen ! Lenghth of the current_name string + + INTERFACE + INTEGER FUNCTION h5gget_linkval_c(loc_id, name, namelen, size, buffer) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_LINKVAL_C'::h5gget_linkval_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: buffer + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(LEN=*), INTENT(OUT) :: buffer + END FUNCTION h5gget_linkval_c + END INTERFACE + + namelen = LEN(name) + 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 + 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 :: namelen ! Lenghth of the current_name string + INTEGER :: commentlen ! Lenghth of the comment string + + INTERFACE + INTEGER FUNCTION h5gset_comment_c(loc_id, name, namelen, & + comment, commentlen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GSET_COMMENT_C'::h5gset_comment_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + !DEC$ATTRIBUTES reference :: comment + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + CHARACTER(LEN=*), INTENT(IN) :: comment + INTEGER :: commentlen + END FUNCTION h5gset_comment_c + END INTERFACE + + namelen = LEN(name) + 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 + 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 + CHARACTER(LEN=size), INTENT(OUT) :: buffer + ! Buffer to hold a comment + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Length of the current_name string + + INTERFACE + INTEGER FUNCTION h5gget_comment_c(loc_id, name, namelen, size, buffer) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_COMMENT_C'::h5gget_comment_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name, buffer + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(SIZE_T), INTENT(IN) :: size + CHARACTER(LEN=*), INTENT(OUT) :: buffer + END FUNCTION h5gget_comment_c + END INTERFACE + + namelen = LEN(name) + 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 + 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) :: gcpl_id_default + INTEGER(HID_T) :: gapl_id_default + + INTERFACE + INTEGER FUNCTION h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_ANON_C'::h5gcreate_anon_c + !DEC$ENDIF + 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 + END FUNCTION h5gcreate_anon_c + END INTERFACE + + gcpl_id_default = H5P_DEFAULT_F + gapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id + IF(PRESENT(gapl_id)) gapl_id_default = gapl_id + + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5gget_create_plist_c(grp_id, gcpl_id ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_CREATE_PLIST_C'::h5gget_create_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: grp_id + INTEGER(HID_T), INTENT(OUT) :: gcpl_id + END FUNCTION h5gget_create_plist_c + END INTERFACE + + hdferr = h5gget_create_plist_c(grp_id, gcpl_id ) + + 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' paramater +! M. Scot Breitenfeld +! July 16, 2008 +! +! SOURCE + 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 :: mounted_c + + INTERFACE + INTEGER FUNCTION h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_C'::h5gget_info_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: group_id + INTEGER, INTENT(OUT) :: storage_type + INTEGER, INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: max_corder + INTEGER :: mounted_c + END FUNCTION h5gget_info_c + END INTERFACE + + hdferr = h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) + + IF(PRESENT(mounted))THEN + IF(mounted_c.EQ.0) THEN + mounted = .FALSE. + ELSE + mounted = .TRUE. + ENDIF + 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' paramater +! M. Scot Breitenfeld +! July 16, 2008 +! +! SOURCE + 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 :: mounted_c + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: group_name_len ! length of group name + + INTERFACE + INTEGER FUNCTION h5gget_info_by_idx_c(loc_id, group_name, group_name_len, index_type, order, n, lapl_id_default, & + storage_type, nlinks, max_corder, mounted_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_BY_IDX_C'::h5gget_info_by_idx_c + !DEC$ENDIF + + !DEC$ATTRIBUTES reference :: group_name + 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(HID_T) :: lapl_id_default + INTEGER, INTENT(OUT) :: storage_type + INTEGER, INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: max_corder + + INTEGER(SIZE_T) :: group_name_len + INTEGER :: mounted_c + + END FUNCTION h5gget_info_by_idx_c + END INTERFACE + + group_name_len = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5gget_info_by_idx_c(loc_id, group_name, group_name_len, & + index_type, order, n, lapl_id_default, & + storage_type, nlinks, max_corder, mounted_c) + + IF(PRESENT(mounted))THEN + IF(mounted_c.EQ.0) THEN + mounted = .FALSE. + ELSE + mounted = .TRUE. + ENDIF + 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' paramater +! M. Scot Breitenfeld +! July 16, 2008 +! SOURCE + 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 :: mounted_c + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: group_name_len ! length of group name + + INTERFACE + INTEGER FUNCTION h5gget_info_by_name_c(loc_id, group_name, group_name_len, lapl_id_default, & + storage_type, nlinks, max_corder, mounted_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_BY_NAME_C'::h5gget_info_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: group_name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER(HID_T), INTENT(IN) :: lapl_id_default + INTEGER, INTENT(OUT) :: storage_type + INTEGER, INTENT(OUT) :: nlinks + INTEGER, INTENT(OUT) :: max_corder + + INTEGER(SIZE_T) :: group_name_len + INTEGER :: mounted_c + + END FUNCTION h5gget_info_by_name_c + END INTERFACE + + group_name_len = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5gget_info_by_name_c(loc_id, group_name, group_name_len, lapl_id_default, & + storage_type, nlinks, max_corder, mounted_c) + + IF(PRESENT(mounted))THEN + IF(mounted_c.EQ.0) THEN + mounted = .FALSE. + ELSE + mounted = .TRUE. + ENDIF + ENDIF + + END SUBROUTINE h5gget_info_by_name_f + +END MODULE H5G diff --git a/fortran/src/H5Gff.f90 b/fortran/src/H5Gff.f90 deleted file mode 100644 index d4d7496..0000000 --- a/fortran/src/H5Gff.f90 +++ /dev/null @@ -1,1331 +0,0 @@ -!****h* ROBODoc/H5G -! -! NAME -! MODULE H5G -! -! FILE -! fortran/src/H5Gff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5G functions. -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! NOTES -! *** IMPORTANT *** -! If you add a new H5G 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. -! -!***** - -MODULE H5G - USE H5GLOBAL - -! PRIVATE :: h5gcreate1_f -! PRIVATE :: h5gcreate2_f - -! INTERFACE h5gcreate_f -! MODULE PROCEDURE h5gcreate1_f -! MODULE PROCEDURE h5gcreate2_f -! END INTERFACE - -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 paramaters in 1.8 -! MSB - February 27, 2008 -! -! SOURCE - 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(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) :: 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 - - INTERFACE - INTEGER FUNCTION h5gcreate_c(loc_id, name, namelen, & - size_hint_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(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(SIZE_T) :: size_hint_default - INTEGER(HID_T), INTENT(OUT) :: grp_id - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: gcpl_id_default - INTEGER(HID_T) :: gapl_id_default - END FUNCTION h5gcreate_c - END INTERFACE - - size_hint_default = OBJECT_NAMELEN_DEFAULT_F - IF (PRESENT(size_hint)) size_hint_default = size_hint - 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 - - namelen = LEN(name) - - hdferr = h5gcreate_c(loc_id, name, namelen, size_hint_default, grp_id, & - lcpl_id_default, gcpl_id_default, gapl_id_default) - - 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(LEN=*), 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(LEN=*), 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 - 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) :: gapl_id_default - INTEGER :: namelen ! Length of the name character string - - INTERFACE - INTEGER FUNCTION h5gopen_c(loc_id, name, namelen, gapl_id_default, grp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GOPEN_C'::h5gopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: gapl_id_default - INTEGER(HID_T), INTENT(OUT) :: grp_id - END FUNCTION h5gopen_c - END INTERFACE - - gapl_id_default = H5P_DEFAULT_F - IF(PRESENT(gapl_id)) gapl_id_default = gapl_id - - namelen = LEN(name) - 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 - SUBROUTINE h5gclose_f(grp_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: grp_id ! Group identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5gclose_c(grp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCLOSE_C'::h5gclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: grp_id - END FUNCTION h5gclose_c - END INTERFACE - - 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 - 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 :: namelen ! Length of the name character string - INTEGER :: obj_namelen ! Length of the obj_name character string - - INTERFACE - INTEGER FUNCTION h5gget_obj_info_idx_c(loc_id, name, & - namelen, idx, & - obj_name, obj_namelen, obj_type) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_OBJ_INFO_IDX_C'::h5gget_obj_info_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: obj_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(IN) :: idx - CHARACTER(LEN=*), INTENT(OUT) :: obj_name - INTEGER :: obj_namelen - INTEGER, INTENT(OUT) :: obj_type - END FUNCTION h5gget_obj_info_idx_c - END INTERFACE - - namelen = LEN(name) - obj_namelen = LEN(obj_name) - hdferr = h5gget_obj_info_idx_c(loc_id, name, namelen, idx, & - 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 - 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) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GN_MEMBERS_C'::h5gn_members_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), 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 - 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) - - 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 -!***** - - INTEGER :: current_namelen ! Lenghth of the current_name string - INTEGER :: new_namelen ! Lenghth of the new_name string - - INTERFACE - INTEGER FUNCTION h5glink_c(loc_id, link_type, current_name, & - current_namelen, new_name, new_namelen) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GLINK_C'::h5glink_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: current_name - !DEC$ATTRIBUTES reference :: new_name - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: link_type - CHARACTER(LEN=*), INTENT(IN) :: current_name - INTEGER :: current_namelen - CHARACTER(LEN=*), INTENT(IN) :: new_name - INTEGER :: new_namelen - END FUNCTION h5glink_c - END INTERFACE - - current_namelen = LEN(current_name) - new_namelen = LEN(new_name) - hdferr = h5glink_c(loc_id, link_type, current_name, & - 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 -! releative 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 - 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 - 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(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 :: cur_namelen ! Lenghth of the current_name string - INTEGER :: new_namelen ! Lenghth of the new_name string - - INTERFACE - INTEGER FUNCTION h5glink2_c(cur_loc_id, cur_name, cur_namelen, & - link_type, new_loc_id, & - new_name, new_namelen) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GLINK2_C'::h5glink2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: cur_name - !DEC$ATTRIBUTES reference :: new_name - INTEGER(HID_T), INTENT(IN) :: cur_loc_id - INTEGER(HID_T), INTENT(IN) :: new_loc_id - INTEGER, INTENT(IN) :: link_type - CHARACTER(LEN=*), INTENT(IN) :: cur_name - CHARACTER(LEN=*), INTENT(IN) :: new_name - INTEGER :: cur_namelen - INTEGER :: new_namelen - END FUNCTION h5glink2_c - END INTERFACE - - cur_namelen = LEN(cur_name) - new_namelen = LEN(new_name) - hdferr = h5glink2_c(cur_loc_id, cur_name, cur_namelen, link_type, & - 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 - 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 :: namelen ! Lenghth of the name character string - - INTERFACE - INTEGER FUNCTION h5gunlink_c(loc_id, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GUNLINK_C'::h5gunlink_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - END FUNCTION h5gunlink_c - END INTERFACE - - namelen = LEN(name) - 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 - 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 :: namelen ! Lenghth of the current_name string - INTEGER :: new_namelen ! Lenghth of the new_name string - - INTERFACE - INTEGER FUNCTION h5gmove_c(loc_id, name, namelen, new_name, new_namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GMOVE_C'::h5gmove_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: new_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - CHARACTER(LEN=*), INTENT(IN) :: new_name - INTEGER :: new_namelen - END FUNCTION h5gmove_c - END INTERFACE - - namelen = LEN(name) - 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 - 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 :: src_namelen ! Length of the current_name string - INTEGER :: dst_namelen ! Lenghth of the new_name string - - INTERFACE - INTEGER FUNCTION h5gmove2_c(src_loc_id, src_name, src_namelen, & - dst_loc_id, dst_name, dst_namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GMOVE2_C'::h5gmove2_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: src_name - !DEC$ATTRIBUTES reference :: dst_name - INTEGER(HID_T), INTENT(IN) :: src_loc_id - INTEGER(HID_T), INTENT(IN) :: dst_loc_id - CHARACTER(LEN=*), INTENT(IN) :: src_name - CHARACTER(LEN=*), INTENT(IN) :: dst_name - INTEGER :: src_namelen - INTEGER :: dst_namelen - END FUNCTION h5gmove2_c - END INTERFACE - - src_namelen = LEN(src_name) - 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 - 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 - 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 :: namelen ! Lenghth of the current_name string - - INTERFACE - INTEGER FUNCTION h5gget_linkval_c(loc_id, name, namelen, size, buffer) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_LINKVAL_C'::h5gget_linkval_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: buffer - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(LEN=*), INTENT(OUT) :: buffer - END FUNCTION h5gget_linkval_c - END INTERFACE - - namelen = LEN(name) - 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 - 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 :: namelen ! Lenghth of the current_name string - INTEGER :: commentlen ! Lenghth of the comment string - - INTERFACE - INTEGER FUNCTION h5gset_comment_c(loc_id, name, namelen, & - comment, commentlen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GSET_COMMENT_C'::h5gset_comment_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - !DEC$ATTRIBUTES reference :: comment - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - CHARACTER(LEN=*), INTENT(IN) :: comment - INTEGER :: commentlen - END FUNCTION h5gset_comment_c - END INTERFACE - - namelen = LEN(name) - 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 - 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 - CHARACTER(LEN=size), INTENT(OUT) :: buffer - ! Buffer to hold a comment - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Length of the current_name string - - INTERFACE - INTEGER FUNCTION h5gget_comment_c(loc_id, name, namelen, size, buffer) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_COMMENT_C'::h5gget_comment_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name, buffer - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(SIZE_T), INTENT(IN) :: size - CHARACTER(LEN=*), INTENT(OUT) :: buffer - END FUNCTION h5gget_comment_c - END INTERFACE - - namelen = LEN(name) - 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 - 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) :: gcpl_id_default - INTEGER(HID_T) :: gapl_id_default - - INTERFACE - INTEGER FUNCTION h5gcreate_anon_c(loc_id, gcpl_id_default, gapl_id_default, grp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GCREATE_ANON_C'::h5gcreate_anon_c - !DEC$ENDIF - 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 - END FUNCTION h5gcreate_anon_c - END INTERFACE - - gcpl_id_default = H5P_DEFAULT_F - gapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(gcpl_id)) gcpl_id_default = gcpl_id - IF(PRESENT(gapl_id)) gapl_id_default = gapl_id - - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5gget_create_plist_c(grp_id, gcpl_id ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_CREATE_PLIST_C'::h5gget_create_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: grp_id - INTEGER(HID_T), INTENT(OUT) :: gcpl_id - END FUNCTION h5gget_create_plist_c - END INTERFACE - - hdferr = h5gget_create_plist_c(grp_id, gcpl_id ) - - 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' paramater -! M. Scot Breitenfeld -! July 16, 2008 -! -! SOURCE - 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 :: mounted_c - - INTERFACE - INTEGER FUNCTION h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_C'::h5gget_info_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: group_id - INTEGER, INTENT(OUT) :: storage_type - INTEGER, INTENT(OUT) :: nlinks - INTEGER, INTENT(OUT) :: max_corder - INTEGER :: mounted_c - END FUNCTION h5gget_info_c - END INTERFACE - - hdferr = h5gget_info_c(group_id, storage_type, nlinks, max_corder, mounted_c) - - IF(PRESENT(mounted))THEN - IF(mounted_c.EQ.0) THEN - mounted = .FALSE. - ELSE - mounted = .TRUE. - ENDIF - 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' paramater -! M. Scot Breitenfeld -! July 16, 2008 -! -! SOURCE - 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 :: mounted_c - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: group_name_len ! length of group name - - INTERFACE - INTEGER FUNCTION h5gget_info_by_idx_c(loc_id, group_name, group_name_len, index_type, order, n, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_BY_IDX_C'::h5gget_info_by_idx_c - !DEC$ENDIF - - !DEC$ATTRIBUTES reference :: group_name - 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(HID_T) :: lapl_id_default - INTEGER, INTENT(OUT) :: storage_type - INTEGER, INTENT(OUT) :: nlinks - INTEGER, INTENT(OUT) :: max_corder - - INTEGER(SIZE_T) :: group_name_len - INTEGER :: mounted_c - - END FUNCTION h5gget_info_by_idx_c - END INTERFACE - - group_name_len = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5gget_info_by_idx_c(loc_id, group_name, group_name_len, & - index_type, order, n, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) - - IF(PRESENT(mounted))THEN - IF(mounted_c.EQ.0) THEN - mounted = .FALSE. - ELSE - mounted = .TRUE. - ENDIF - 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' paramater -! M. Scot Breitenfeld -! July 16, 2008 -! SOURCE - 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 :: mounted_c - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: group_name_len ! length of group name - - INTERFACE - INTEGER FUNCTION h5gget_info_by_name_c(loc_id, group_name, group_name_len, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GGET_INFO_BY_NAME_C'::h5gget_info_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: group_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER(HID_T), INTENT(IN) :: lapl_id_default - INTEGER, INTENT(OUT) :: storage_type - INTEGER, INTENT(OUT) :: nlinks - INTEGER, INTENT(OUT) :: max_corder - - INTEGER(SIZE_T) :: group_name_len - INTEGER :: mounted_c - - END FUNCTION h5gget_info_by_name_c - END INTERFACE - - group_name_len = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5gget_info_by_name_c(loc_id, group_name, group_name_len, lapl_id_default, & - storage_type, nlinks, max_corder, mounted_c) - - IF(PRESENT(mounted))THEN - IF(mounted_c.EQ.0) THEN - mounted = .FALSE. - ELSE - mounted = .TRUE. - ENDIF - ENDIF - - END SUBROUTINE h5gget_info_by_name_f - -END MODULE H5G diff --git a/fortran/src/H5Iff.F90 b/fortran/src/H5Iff.F90 new file mode 100644 index 0000000..7c9a843 --- /dev/null +++ b/fortran/src/H5Iff.F90 @@ -0,0 +1,352 @@ +!****h* ROBODoc/H5I +! +! NAME +! MODULE H5I +! +! FILE +! fortran/src/H5Iff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5I functions. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! NOTES +! *** IMPORTANT *** +! If you add a new H5I 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. +! +!***** + +MODULE H5I + + USE H5GLOBAL + +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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5iget_type_c(obj_id, TYPE) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_TYPE_C':: h5iget_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: TYPE + END FUNCTION h5iget_type_c + END INTERFACE + 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 idetifier. +! +! 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5iget_name_c(obj_id, buf, buf_size, name_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_NAME_C'::h5iget_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(IN) :: buf_size + INTEGER(SIZE_T), INTENT(OUT) :: name_size + END FUNCTION h5iget_name_c + END INTERFACE + + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5iinc_ref_c(obj_id, ref_count) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IINC_REF_C':: h5iinc_ref_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: ref_count + END FUNCTION h5iinc_ref_c + END INTERFACE + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5idec_ref_c(obj_id, ref_count) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IDEC_REF_C':: h5idec_ref_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: ref_count + END FUNCTION h5idec_ref_c + END INTERFACE + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5iget_ref_c(obj_id, ref_count) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_REF_C':: h5iget_ref_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(OUT) :: ref_count + END FUNCTION h5iget_ref_c + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5iget_file_id_c(obj_id, file_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_FILE_ID_C':: h5iget_file_id_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER(HID_T), INTENT(OUT) :: file_id + END FUNCTION h5iget_file_id_c + 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 + 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 :: c_valid ! 0 = .false, 1 = .true. + + INTERFACE + INTEGER FUNCTION h5iis_valid_c(id, c_valid) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IIS_VALID_C':: h5iis_valid_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: id ! Identifier + INTEGER :: c_valid + END FUNCTION h5iis_valid_c + END INTERFACE + + hdferr = h5iis_valid_c(id, c_valid) + + valid = .FALSE. ! Default + IF(c_valid.EQ.1) valid = .TRUE. + + END SUBROUTINE h5iis_valid_f +END MODULE H5I + diff --git a/fortran/src/H5Iff.f90 b/fortran/src/H5Iff.f90 deleted file mode 100644 index 7c9a843..0000000 --- a/fortran/src/H5Iff.f90 +++ /dev/null @@ -1,352 +0,0 @@ -!****h* ROBODoc/H5I -! -! NAME -! MODULE H5I -! -! FILE -! fortran/src/H5Iff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5I functions. -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! NOTES -! *** IMPORTANT *** -! If you add a new H5I 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. -! -!***** - -MODULE H5I - - USE H5GLOBAL - -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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5iget_type_c(obj_id, TYPE) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_TYPE_C':: h5iget_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: TYPE - END FUNCTION h5iget_type_c - END INTERFACE - 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 idetifier. -! -! 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5iget_name_c(obj_id, buf, buf_size, name_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_NAME_C'::h5iget_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: buf - INTEGER(SIZE_T), INTENT(IN) :: buf_size - INTEGER(SIZE_T), INTENT(OUT) :: name_size - END FUNCTION h5iget_name_c - END INTERFACE - - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5iinc_ref_c(obj_id, ref_count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IINC_REF_C':: h5iinc_ref_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: ref_count - END FUNCTION h5iinc_ref_c - END INTERFACE - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5idec_ref_c(obj_id, ref_count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IDEC_REF_C':: h5idec_ref_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: ref_count - END FUNCTION h5idec_ref_c - END INTERFACE - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5iget_ref_c(obj_id, ref_count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_REF_C':: h5iget_ref_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(OUT) :: ref_count - END FUNCTION h5iget_ref_c - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5iget_file_id_c(obj_id, file_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IGET_FILE_ID_C':: h5iget_file_id_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER(HID_T), INTENT(OUT) :: file_id - END FUNCTION h5iget_file_id_c - 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 - 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 :: c_valid ! 0 = .false, 1 = .true. - - INTERFACE - INTEGER FUNCTION h5iis_valid_c(id, c_valid) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5IIS_VALID_C':: h5iis_valid_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: id ! Identifier - INTEGER :: c_valid - END FUNCTION h5iis_valid_c - END INTERFACE - - hdferr = h5iis_valid_c(id, c_valid) - - valid = .FALSE. ! Default - IF(c_valid.EQ.1) valid = .TRUE. - - END SUBROUTINE h5iis_valid_f -END MODULE H5I - diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c index 6523ab4..f4ad1d4 100644 --- a/fortran/src/H5Lf.c +++ b/fortran/src/H5Lf.c @@ -53,7 +53,7 @@ */ int_f -nh5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, +h5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id) /******/ @@ -110,7 +110,7 @@ done: */ int_f -nh5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen, +h5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id) /******/ @@ -170,7 +170,7 @@ done: */ int_f -nh5ldelete_c ( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id ) +h5ldelete_c ( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id ) /******/ { char *c_name = NULL; @@ -218,7 +218,7 @@ done: */ int_f -nh5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, +h5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_name_len, hid_t_f *lcpl_id, hid_t_f *lapl_id ) @@ -275,7 +275,7 @@ nh5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, * SOURCE */ int_f -nh5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, +h5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id ) @@ -344,7 +344,7 @@ nh5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, * SOURCE */ int_f -nh5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +h5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id) /******/ { @@ -397,7 +397,7 @@ done: * SOURCE */ int_f -nh5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists) +h5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists) /******/ { char *c_name = NULL; /* Buffer to hold C string */ @@ -456,7 +456,7 @@ done: * SOURCE */ int_f -nh5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, +h5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id) @@ -525,7 +525,7 @@ done: * SOURCE */ int_f -nh5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +h5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, int_f *link_type, int_f *corder_valid, int_f *corder, int_f *cset, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id) /******/ @@ -588,7 +588,7 @@ done: * SOURCE */ int_f -nh5lis_registered_c(int_f *link_cls_id) +h5lis_registered_c(int_f *link_cls_id) /******/ { int_f ret_value; /* Return value */ @@ -643,7 +643,7 @@ nh5lis_registered_c(int_f *link_cls_id) * SOURCE */ int_f -nh5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, +h5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id) /******/ { @@ -701,7 +701,7 @@ done: * SOURCE */ int_f -nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, size_t_f *size, _fcd name, hid_t_f *lapl_id) /******/ @@ -774,7 +774,7 @@ done: /* * SOURCE */ /* *\/ */ /* int_f */ -/* nh5lget_val_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, */ +/* h5lget_val_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, */ /* size_t_f *size, _fcd linkval_buff, */ /* hid_t_f *lapl_id) */ /* { */ @@ -842,7 +842,7 @@ done: /* int_f */ -/* nh5lregistered_c(int_f *version, int_f *class_id, */ +/* h5lregistered_c(int_f *version, int_f *class_id, */ /* _fcd comment, size_t_f *comment_len, */ /* _fcd create_func, size_t_f *create_func_len, */ /* _fcd move_func, size_t_f *move_func_len, */ @@ -938,7 +938,7 @@ done: * SOURCE */ int_f -nh5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size, +h5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size, void *linkval_buff, hid_t_f *lapl_id) /******/ { diff --git a/fortran/src/H5Lff.F90 b/fortran/src/H5Lff.F90 new file mode 100644 index 0000000..41f3d9d --- /dev/null +++ b/fortran/src/H5Lff.F90 @@ -0,0 +1,1461 @@ +!****h* ROBODoc/H5L +! +! NAME +! MODULE H5L +! +! PURPOSE +! This file contains Fortran interfaces for H5L functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! NOTES +! *** IMPORTANT *** +! If you add a new H5L 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. +! +!***** + +MODULE H5L + + USE H5GLOBAL + USE ISO_C_BINDING + + IMPLICIT NONE + +!****t* H5L (F03)/h5l_info_t +! +! Fortran2003 Derived Type: +! + TYPE, bind(c) :: union_t + INTEGER(haddr_t) :: address + INTEGER(size_t) :: val_size + END TYPE union_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; + 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 + 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) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: src_namelen + INTEGER(SIZE_T) :: dest_namelen + + INTERFACE + INTEGER FUNCTION h5lcopy_c(src_loc_id, src_name, src_namelen, dest_loc_id, dest_name, dest_namelen, & + lcpl_id_default, lapl_id_default) BIND(C,name='h5lcopy_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: src_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: src_name + INTEGER(HID_T), INTENT(IN) :: dest_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dest_name + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: src_namelen + INTEGER(SIZE_T) :: dest_namelen + END FUNCTION h5lcopy_c + END INTERFACE + + src_namelen = LEN(src_name) + dest_namelen = LEN(dest_name) + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lcopy_c(src_loc_id, src_name, src_namelen, dest_loc_id, dest_name, dest_namelen, & + lcpl_id_default, lapl_id_default) + + 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 + 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) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION h5ldelete_c(loc_id, name, namelen, lapl_id_default) BIND(C,name='h5ldelete_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + END FUNCTION h5ldelete_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5ldelete_c(loc_id, name, namelen, lapl_id_default) + + 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 + 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. +!***** + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: target_path_len + INTEGER(SIZE_T) :: link_name_len + + INTERFACE + INTEGER FUNCTION h5lcreate_soft_c(target_path, target_path_len, & + link_loc_id, & + link_name,link_name_len, & + lcpl_id_default, lapl_id_default ) BIND(C,NAME='h5lcreate_soft_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: target_path + INTEGER(SIZE_T) :: target_path_len + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name + INTEGER(SIZE_T) :: link_name_len + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lcreate_soft_c + END INTERFACE + + target_path_len = LEN(target_path) + link_name_len = LEN(link_name) + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lcreate_soft_c(target_path, target_path_len,& + link_loc_id, & + link_name, link_name_len, & + lcpl_id_default, lapl_id_default ) + + 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 + 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, 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) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: link_namelen + + INTERFACE + INTEGER FUNCTION h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) BIND(C,NAME='h5lcreate_hard_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: obj_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: link_namelen + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lcreate_hard_c + END INTERFACE + obj_namelen = LEN(obj_name) + link_namelen = LEN(link_name) + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) + + 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 + 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. +!***** + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTEGER(SIZE_T) :: file_namelen + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: link_namelen + + INTERFACE + INTEGER FUNCTION h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) BIND(C,NAME='h5lcreate_external_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: file_name + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: obj_name + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name + INTEGER(SIZE_T) :: file_namelen + INTEGER(SIZE_T) :: obj_namelen + INTEGER(SIZE_T) :: link_namelen + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lcreate_external_c + END INTERFACE + file_namelen = LEN(file_name) + obj_namelen = LEN(obj_name) + link_namelen = LEN(link_name) + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & + link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) + + 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 + 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 ! Identifer 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) :: lapl_id_default + INTEGER(SIZE_T) :: group_namelen + + INTERFACE + INTEGER FUNCTION h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) & + BIND(C,NAME='h5ldelete_by_idx_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name + INTEGER, INTENT(IN) :: index_field + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: group_namelen + END FUNCTION h5ldelete_by_idx_c + END INTERFACE + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + group_namelen = LEN(group_name) + hdferr = h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) + + 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 + 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), OPTIONAL, INTENT(IN) :: lapl_id + ! Link access property list identifier. +!***** + INTEGER :: link_exists_c + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + + INTERFACE + INTEGER FUNCTION h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) & + BIND(C,NAME='h5lexists_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: namelen + INTEGER, INTENT(OUT) :: link_exists_c + INTEGER(HID_T) :: lapl_id_default + + END FUNCTION h5lexists_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) + + link_exists = .FALSE. + IF(link_exists_c.GT.0) link_exists = .TRUE. + + 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 +! address - If the link is a hard link, address specifies the file address 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 + SUBROUTINE h5lget_info_f(link_loc_id, link_name, & + cset, corder, f_corder_valid, link_type, address, 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 + INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address 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(SIZE_T) :: link_namelen + INTEGER(HID_T) :: lapl_id_default + INTEGER :: corder_valid + + INTERFACE + INTEGER FUNCTION h5lget_info_c(link_loc_id, link_name, link_namelen, & + cset, corder, corder_valid, link_type, address, val_size, & + lapl_id_default) BIND(C,NAME='h5lget_info_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: link_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: link_name + INTEGER, INTENT(OUT) :: cset + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: link_type + INTEGER(HADDR_T), INTENT(OUT) :: address + INTEGER(SIZE_T), INTENT(OUT) :: val_size + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: link_namelen + INTEGER :: corder_valid + END FUNCTION h5lget_info_c + END INTERFACE + + link_namelen = LEN(link_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lget_info_c(link_loc_id, link_name, link_namelen, & + cset, corder, corder_valid, link_type, & + address, val_size, & + lapl_id_default) + + f_corder_valid =.FALSE. + IF(corder_valid .EQ. 1) f_corder_valid =.TRUE. + + 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 +! address - If the link is a hard link, address specifies the file address 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 + SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, & + link_type, f_corder_valid, corder, cset, address, 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 + INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address 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 :: corder_valid + INTEGER(SIZE_T) :: group_namelen + INTEGER(HID_T) :: lapl_id_default + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & + link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) & + BIND(C,NAME='h5lget_info_by_idx_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + 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, INTENT(OUT) :: link_type + INTEGER :: corder_valid + INTEGER, INTENT(OUT) :: corder + INTEGER, INTENT(OUT) :: cset + INTEGER(HADDR_T), INTENT(OUT) :: address + INTEGER(SIZE_T), INTENT(OUT) :: val_size + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lget_info_by_idx_c + END INTERFACE + + group_namelen = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & + link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) + + f_corder_valid =.FALSE. + IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. + + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5lis_registered_c(link_cls_id) BIND(C,NAME='h5lis_registered_c') + USE H5GLOBAL + INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier + END FUNCTION h5lis_registered_c + END INTERFACE + + hdferr = h5lis_registered_c(link_cls_id) + + IF(hdferr.GT.0)THEN + registered = .TRUE. + ELSE IF(hdferr.EQ.0)THEN + registered = .FALSE. + ENDIF + + 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 + 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(SIZE_T) :: src_namelen + INTEGER(SIZE_T) :: dest_namelen + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & + dest_name, dest_namelen, lcpl_id_default, lapl_id_default) BIND(C,NAME='h5lmove_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: src_loc_id + + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: src_name + INTEGER(SIZE_T) :: src_namelen + INTEGER(HID_T), INTENT(IN) :: dest_loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: dest_name + INTEGER(SIZE_T) :: dest_namelen + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: lapl_id_default + + END FUNCTION h5lmove_c + END INTERFACE + + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + src_namelen = LEN(src_name) + dest_namelen = LEN(dest_name) + + hdferr = H5Lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & + dest_name, dest_namelen, lcpl_id_default, lapl_id_default) + + 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 + 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(SIZE_T) :: group_namelen + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list + 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) :: size_default + + INTERFACE + INTEGER FUNCTION h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & + size_default, name, lapl_id_default) BIND(C,NAME='h5lget_name_by_idx_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char + USE H5GLOBAL + 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(SIZE_T) :: size_default + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name + INTEGER(HID_T) :: lapl_id_default + END FUNCTION h5lget_name_by_idx_c + END INTERFACE + + group_namelen = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + size_default = LEN(name) + + hdferr = h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & + size_default, name, lapl_id_default) + + IF(PRESENT(size)) size = size_default + + + END SUBROUTINE h5lget_name_by_idx_f + + +! 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_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) +!!$ +!!$ lapl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id +!!$ +!!$ hdferr = h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & +!!$ corder_valid, corder, cset, data_size, lapl_id_default) +!!$ +!!$ f_corder_valid =.FALSE. +!!$ IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. +!!$ +!!$ 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 +!!$ INTEGER(HID_T) :: lapl_id_default +!!$ +!!$! MS FORTRAN needs explicit interface for C functions called here. +!!$! +!!$ INTERFACE +!!$ INTEGER FUNCTION h5lget_val_c(link_loc_id, link_name, link_namelen, size, linkval_buff, & +!!$ lapl_id_default) +!!$ USE H5GLOBAL +!!$ !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 +!!$ +!!$ link_namelen = LEN(link_name) +!!$ +!!$ lapl_id_default = H5P_DEFAULT_F +!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id +!!$ +!!$ hdferr = h5lget_val_c(link_loc_id, link_name, link_namelen, size, linkval_buff, & +!!$ lapl_id_default) +!!$ +!!$ 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 +!!$ INTEGER :: del_func_len +!!$ INTEGER :: query_func_len +!!$ +!!$ INTERFACE +!!$ INTEGER FUNCTION H5Lregistered_c(version, class_id, comment, & +!!$ create_func, create_func_len, & +!!$ move_func, move_func_len, & +!!$ copy_func, copy_func_len, & +!!$ trav_func, trav_func_len, & +!!$ del_func, del_func_len, & +!!$ query_func,query_func_len) +!!$ USE H5GLOBAL +!!$ !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 +!!$ INTEGER :: del_func_len +!!$ INTEGER :: query_func_len +!!$ +!!$ END FUNCTION H5Lregistered_c +!!$ END INTERFACE +!!$ +!!$ comment_len = LEN(comment) +!!$ create_func_len = LEN(create_func) +!!$ move_func_len = LEN(move_func) +!!$ copy_func_len = LEN(copy_func) +!!$ trav_func_len = LEN(trav_func) +!!$ del_func_len = LEN(del_func) +!!$ query_func_len = LEN(query_func) +!!$ +!!$ hdferr = H5Lregistered_c(version, class_id, comment, & +!!$ create_func, create_func_len, & +!!$ move_func, move_func_len, & +!!$ copy_func, copy_func_len, & +!!$ trav_func, trav_func_len, & +!!$ del_func, del_func_len, & +!!$ query_func, query_func_len) +!!$ +!!$ 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 - Alpha-numeric 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: + SUBROUTINE h5literate_f(group_id, index_type, order, idx, op, op_data, return_value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: group_id + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR) , INTENT(IN) :: op + 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') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: group_id + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR), VALUE :: op + TYPE(C_PTR), VALUE :: op_data + END FUNCTION h5literate_c + END INTERFACE + + return_value = h5literate_c(group_id, index_type, order, idx, op, op_data) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + 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 - Alpha-numeric 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 +! Augest 18, 2008 +! +! Fortran2003 Interface: + 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 + IMPLICIT NONE + 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(INOUT) :: idx + TYPE(C_FUNPTR) , INTENT(IN) :: op + TYPE(C_PTR) , INTENT(IN) :: op_data + 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 + + INTERFACE + INTEGER FUNCTION h5literate_by_name_c(loc_id, name, namelen, index_type, order,& + idx, op, op_data, lapl_id_default) BIND(C, NAME='h5literate_by_name_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr + USE H5GLOBAL + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(INOUT) :: idx + TYPE(C_FUNPTR), VALUE :: op + TYPE(C_PTR), VALUE :: op_data + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + END FUNCTION + END INTERFACE + + namelen = LEN(group_name) + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + return_value = h5literate_by_name_c(loc_id, group_name, namelen, index_type, order, idx, op, op_data, lapl_id_default) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5literate_by_name_f + +END MODULE H5L diff --git a/fortran/src/H5Lff.f90 b/fortran/src/H5Lff.f90 deleted file mode 100644 index 24f7a02..0000000 --- a/fortran/src/H5Lff.f90 +++ /dev/null @@ -1,1496 +0,0 @@ -!****h* ROBODoc/H5L -! -! NAME -! MODULE H5L -! -! PURPOSE -! This file contains Fortran interfaces for H5L functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! NOTES -! *** IMPORTANT *** -! If you add a new H5L 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. -! -!***** - -MODULE H5L - - USE H5GLOBAL - USE ISO_C_BINDING - - IMPLICIT NONE - -!****t* H5L (F03)/h5l_info_t -! -! Fortran2003 Derived Type: -! - TYPE, bind(c) :: union_t - INTEGER(haddr_t) :: address - INTEGER(size_t) :: val_size - END TYPE union_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; - 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 - 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) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: src_namelen - INTEGER(SIZE_T) :: dest_namelen - - INTERFACE - INTEGER FUNCTION h5lcopy_c(src_loc_id, src_name, src_namelen, dest_loc_id, dest_name, dest_namelen, & - lcpl_id_default, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LCOPY_C'::h5lcopy_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: src_name, dest_name - 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(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: src_namelen - INTEGER(SIZE_T) :: dest_namelen - END FUNCTION h5lcopy_c - END INTERFACE - - src_namelen = LEN(src_name) - dest_namelen = LEN(dest_name) - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lcopy_c(src_loc_id, src_name, src_namelen, dest_loc_id, dest_name, dest_namelen, & - lcpl_id_default, lapl_id_default) - - 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 - 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) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION h5ldelete_c(loc_id, name, namelen, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LDELETE_C'::h5ldelete_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - END FUNCTION h5ldelete_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5ldelete_c(loc_id, name, namelen, lapl_id_default) - - 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 - 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. -!***** - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: target_path_len - INTEGER(SIZE_T) :: link_name_len - - INTERFACE - INTEGER FUNCTION h5lcreate_soft_c(target_path, target_path_len, & - link_loc_id, & - link_name,link_name_len, & - lcpl_id_default, lapl_id_default ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LCREATE_SOFT_C'::h5lcreate_soft_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: target_path, link_name - CHARACTER(LEN=*), INTENT(IN) :: target_path - INTEGER(SIZE_T) :: target_path_len - INTEGER(HID_T), INTENT(IN) :: link_loc_id - CHARACTER(LEN=*), INTENT(IN) :: link_name - INTEGER(SIZE_T) :: link_name_len - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lcreate_soft_c - END INTERFACE - - target_path_len = LEN(target_path) - link_name_len = LEN(link_name) - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lcreate_soft_c(target_path, target_path_len,& - link_loc_id, & - link_name, link_name_len, & - lcpl_id_default, lapl_id_default ) - - 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 - 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, 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) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: link_namelen - - INTERFACE - INTEGER FUNCTION h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LCREATE_HARD_C'::h5lcreate_hard_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: obj_name, link_name - 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(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: link_namelen - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lcreate_hard_c - END INTERFACE - obj_namelen = LEN(obj_name) - link_namelen = LEN(link_name) - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lcreate_hard_c(obj_loc_id, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) - - 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 - 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. -!***** - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTEGER(SIZE_T) :: file_namelen - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: link_namelen - - INTERFACE - INTEGER FUNCTION h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LCREATE_EXTERNAL_C'::h5lcreate_external_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: file_name, obj_name, link_name - 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(SIZE_T) :: file_namelen - INTEGER(SIZE_T) :: obj_namelen - INTEGER(SIZE_T) :: link_namelen - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lcreate_external_c - END INTERFACE - file_namelen = LEN(file_name) - obj_namelen = LEN(obj_name) - link_namelen = LEN(link_name) - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lcreate_external_c(file_name, file_namelen, obj_name, obj_namelen, & - link_loc_id, link_name, link_namelen, lcpl_id_default, lapl_id_default) - - 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 - 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 ! Identifer 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) :: lapl_id_default - INTEGER(SIZE_T) :: group_namelen - - INTERFACE - INTEGER FUNCTION h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LDELETE_BY_IDX_C'::h5ldelete_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: group_name - 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(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: group_namelen - END FUNCTION h5ldelete_by_idx_c - END INTERFACE - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - group_namelen = LEN(group_name) - hdferr = h5ldelete_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, lapl_id_default) - - 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 - 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), OPTIONAL, INTENT(IN) :: lapl_id - ! Link access property list identifier. -!***** - INTEGER :: link_exists_c - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - - INTERFACE - INTEGER FUNCTION h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LEXISTS_C'::h5lexists_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T), INTENT(IN) :: namelen - INTEGER, INTENT(OUT) :: link_exists_c - INTEGER(HID_T) :: lapl_id_default - - END FUNCTION h5lexists_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lexists_c(loc_id, name, namelen, lapl_id_default, link_exists_c) - - link_exists = .FALSE. - IF(link_exists_c.GT.0) link_exists = .TRUE. - - 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 -! address - If the link is a hard link, address specifies the file address 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 - SUBROUTINE h5lget_info_f(link_loc_id, link_name, & - cset, corder, f_corder_valid, link_type, address, 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 - INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address 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(SIZE_T) :: link_namelen - INTEGER(HID_T) :: lapl_id_default - INTEGER :: corder_valid - - INTERFACE - INTEGER FUNCTION h5lget_info_c(link_loc_id, link_name, link_namelen, & - cset, corder, corder_valid, link_type, address, val_size, & - lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_INFO_C'::h5lget_info_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: link_name - INTEGER(HID_T), INTENT(IN) :: link_loc_id - CHARACTER(LEN=*), INTENT(IN) :: link_name - INTEGER, INTENT(OUT) :: cset - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: link_type - INTEGER(HADDR_T), INTENT(OUT) :: address - INTEGER(SIZE_T), INTENT(OUT) :: val_size - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: link_namelen - INTEGER :: corder_valid - END FUNCTION h5lget_info_c - END INTERFACE - - link_namelen = LEN(link_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lget_info_c(link_loc_id, link_name, link_namelen, & - cset, corder, corder_valid, link_type, & - address, val_size, & - lapl_id_default) - - f_corder_valid =.FALSE. - IF(corder_valid .EQ. 1) f_corder_valid =.TRUE. - - 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 -! address - If the link is a hard link, address specifies the file address 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 - SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, & - link_type, f_corder_valid, corder, cset, address, 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 - INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address 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 :: corder_valid - INTEGER(SIZE_T) :: group_namelen - INTEGER(HID_T) :: lapl_id_default - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & - link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_INFO_BY_IDX_C'::h5lget_info_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: group_name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), 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, INTENT(OUT) :: link_type - INTEGER :: corder_valid - INTEGER, INTENT(OUT) :: corder - INTEGER, INTENT(OUT) :: cset - INTEGER(HADDR_T), INTENT(OUT) :: address - INTEGER(SIZE_T), INTENT(OUT) :: val_size - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lget_info_by_idx_c - END INTERFACE - - group_namelen = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & - link_type, corder_valid, corder, cset, address, val_size, lapl_id_default) - - f_corder_valid =.FALSE. - IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. - - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5lis_registered_c(link_cls_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LIS_REGISTERED_C'::h5lis_registered_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: link_cls_id ! User-defined link class identifier - END FUNCTION h5lis_registered_c - END INTERFACE - - hdferr = h5lis_registered_c(link_cls_id) - - IF(hdferr.GT.0)THEN - registered = .TRUE. - ELSE IF(hdferr.EQ.0)THEN - registered = .FALSE. - ENDIF - - 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 - 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(SIZE_T) :: src_namelen - INTEGER(SIZE_T) :: dest_namelen - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & - dest_name, dest_namelen, lcpl_id_default, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LMOVE_C'::h5lmove_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: src_name, dest_name - INTEGER(HID_T), INTENT(IN) :: src_loc_id - - CHARACTER(LEN=*), INTENT(IN) :: src_name - INTEGER(SIZE_T) :: src_namelen - INTEGER(HID_T), INTENT(IN) :: dest_loc_id - CHARACTER(LEN=*), INTENT(IN) :: dest_name - INTEGER(SIZE_T) :: dest_namelen - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: lapl_id_default - - END FUNCTION h5lmove_c - END INTERFACE - - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - src_namelen = LEN(src_name) - dest_namelen = LEN(dest_name) - - hdferr = H5Lmove_c(src_loc_id, src_name, src_namelen, dest_loc_id, & - dest_name, dest_namelen, lcpl_id_default, lapl_id_default) - - 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 - 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(SIZE_T) :: group_namelen - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lapl_id ! Link access property list - 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) :: size_default - - INTERFACE - INTEGER FUNCTION h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & - size_default, name, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5LGET_NAME_BY_IDX_C'::h5lget_name_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: group_name, name - INTEGER(HID_T), INTENT(IN) :: loc_id - - CHARACTER(LEN=*), 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(SIZE_T) :: size_default - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER(HID_T) :: lapl_id_default - END FUNCTION h5lget_name_by_idx_c - END INTERFACE - - group_namelen = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - size_default = LEN(name) - - hdferr = h5lget_name_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & - size_default, name, lapl_id_default) - - IF(PRESENT(size)) size = size_default - - - END SUBROUTINE h5lget_name_by_idx_f - - -! 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_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(LEN=*), 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) -!!$ -!!$ lapl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id -!!$ -!!$ hdferr = h5lget_info_by_idx_c(loc_id, group_name, group_namelen, index_field, order, n, & -!!$ corder_valid, corder, cset, data_size, lapl_id_default) -!!$ -!!$ f_corder_valid =.FALSE. -!!$ IF (corder_valid .EQ. 1) f_corder_valid =.TRUE. -!!$ -!!$ 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 -!!$ INTEGER(HID_T) :: lapl_id_default -!!$ -!!$! MS FORTRAN needs explicit interface for C functions called here. -!!$! -!!$ INTERFACE -!!$ INTEGER FUNCTION h5lget_val_c(link_loc_id, link_name, link_namelen, size, linkval_buff, & -!!$ lapl_id_default) -!!$ USE H5GLOBAL -!!$ !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(LEN=*), 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 -!!$ -!!$ link_namelen = LEN(link_name) -!!$ -!!$ lapl_id_default = H5P_DEFAULT_F -!!$ IF(PRESENT(lapl_id)) lapl_id_default = lapl_id -!!$ -!!$ hdferr = h5lget_val_c(link_loc_id, link_name, link_namelen, size, linkval_buff, & -!!$ lapl_id_default) -!!$ -!!$ 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 -!!$ INTEGER :: del_func_len -!!$ INTEGER :: query_func_len -!!$ -!!$ INTERFACE -!!$ INTEGER FUNCTION H5Lregistered_c(version, class_id, comment, & -!!$ create_func, create_func_len, & -!!$ move_func, move_func_len, & -!!$ copy_func, copy_func_len, & -!!$ trav_func, trav_func_len, & -!!$ del_func, del_func_len, & -!!$ query_func,query_func_len) -!!$ USE H5GLOBAL -!!$ !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(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 -!!$ INTEGER :: del_func_len -!!$ INTEGER :: query_func_len -!!$ -!!$ END FUNCTION H5Lregistered_c -!!$ END INTERFACE -!!$ -!!$ comment_len = LEN(comment) -!!$ create_func_len = LEN(create_func) -!!$ move_func_len = LEN(move_func) -!!$ copy_func_len = LEN(copy_func) -!!$ trav_func_len = LEN(trav_func) -!!$ del_func_len = LEN(del_func) -!!$ query_func_len = LEN(query_func) -!!$ -!!$ hdferr = H5Lregistered_c(version, class_id, comment, & -!!$ create_func, create_func_len, & -!!$ move_func, move_func_len, & -!!$ copy_func, copy_func_len, & -!!$ trav_func, trav_func_len, & -!!$ del_func, del_func_len, & -!!$ query_func, query_func_len) -!!$ -!!$ 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 - Alpha-numeric 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: - SUBROUTINE h5literate_f(group_id, index_type, order, idx, op, op_data, return_value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: group_id - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR) , INTENT(IN) :: op - 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') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: group_id - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR), VALUE :: op - TYPE(C_PTR), VALUE :: op_data - END FUNCTION h5literate_c - END INTERFACE - - return_value = h5literate_c(group_id, index_type, order, idx, op, op_data) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - 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 - Alpha-numeric 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 -! Augest 18, 2008 -! -! Fortran2003 Interface: - 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 - IMPLICIT NONE - 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(INOUT) :: idx - TYPE(C_FUNPTR) , INTENT(IN) :: op - TYPE(C_PTR) , INTENT(IN) :: op_data - 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 - - INTERFACE - INTEGER FUNCTION h5literate_by_name_c(loc_id, name, namelen, index_type, order,& - idx, op, op_data, lapl_id_default) BIND(C, NAME='h5literate_by_name_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr - USE H5GLOBAL - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(INOUT) :: idx - TYPE(C_FUNPTR), VALUE :: op - TYPE(C_PTR), VALUE :: op_data - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - END FUNCTION - END INTERFACE - - namelen = LEN(group_name) - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - return_value = h5literate_by_name_c(loc_id, group_name, namelen, index_type, order, idx, op, op_data, lapl_id_default) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5literate_by_name_f - -END MODULE H5L diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90 new file mode 100644 index 0000000..e4125bc --- /dev/null +++ b/fortran/src/H5Off.F90 @@ -0,0 +1,1167 @@ +!****h* ROBODoc/H5O +! +! NAME +! MODULE H5O +! +! FILE +! fortran/src/H5Off.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5O functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! NOTES +! *** IMPORTANT *** +! If you add a new H5O 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. +! +!***** + +MODULE H5O + + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING + + IMPLICIT NONE + +!****t* H5T (F03)/h5o_info_t +! +! Fortran2003 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 + END TYPE space_t + + 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 + END TYPE mesg_t + + 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 + TYPE(space_t) :: space + TYPE(mesg_t) :: mesg + END TYPE hdr_t + + ! 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 + END TYPE H5_ih_info_t + + 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 + ENDTYPE meta_size_t + + TYPE, BIND(C) :: h5o_info_t + INTEGER(C_LONG) :: fileno ! File number that object is located in + INTEGER(haddr_t) :: addr ! Object address 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 + + TYPE(hdr_t) :: hdr + + TYPE(meta_size_t) :: meta_size + END TYPE h5o_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: + 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 + INTEGER(HID_T) , INTENT(IN) :: new_loc_id + CHARACTER(LEN=*), INTENT(IN) :: new_link_name + 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 + + INTEGER(SIZE_T) :: new_link_namelen + + INTERFACE + INTEGER FUNCTION h5olink_c(object_id, new_loc_id, new_link_name, new_link_namelen, & + lcpl_id_default, lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OLINK_C'::h5olink_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: new_link_name + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER(HID_T), INTENT(IN) :: new_loc_id + CHARACTER(LEN=*), INTENT(IN) :: new_link_name + INTEGER(SIZE_T) :: new_link_namelen + INTEGER(HID_T) :: lapl_id_default + INTEGER(HID_T) :: lcpl_id_default + END FUNCTION h5olink_c + END INTERFACE + + new_link_namelen = LEN(new_link_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + + hdferr = h5olink_c(object_id, new_loc_id, new_link_name, new_link_namelen, & + lcpl_id_default, lapl_id_default) + + 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: + SUBROUTINE h5oopen_f(loc_id, name, obj_id, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + 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 + + INTERFACE + INTEGER FUNCTION h5oopen_c(loc_id, name, namelen, lapl_id_default, obj_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_C'::h5oopen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T) :: lapl_id_default + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T), INTENT(OUT) :: obj_id + END FUNCTION h5oopen_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + 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: + 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) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OCLOSE_C'::h5oclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: object_id + END FUNCTION h5oclose_c + END INTERFACE + + hdferr = h5oclose_c(object_id) + END SUBROUTINE h5oclose_f + +! +!****s* H5O/h5open_by_addr_f +! NAME +! h5oopen_by_addr_f +! +! PURPOSE +! Opens an object using its address within an HDF5 file. +! +! Inputs: +! loc_id - File or group identifier. +! addr - Object’s address 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: + SUBROUTINE h5oopen_by_addr_f(loc_id, addr, obj_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + INTEGER(HADDR_T), INTENT(IN) :: addr + INTEGER(HID_T) , INTENT(OUT) :: obj_id + INTEGER , INTENT(OUT) :: hdferr +!***** + INTERFACE + INTEGER FUNCTION h5oopen_by_addr_c(loc_id, addr, obj_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_BY_ADDR_C'::h5oopen_by_addr_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HADDR_T), INTENT(IN) :: addr + INTEGER(HID_T), INTENT(OUT) :: obj_id + END FUNCTION h5oopen_by_addr_c + END INTERFACE + + hdferr = h5oopen_by_addr_c(loc_id, addr, obj_id) + + END SUBROUTINE h5oopen_by_addr_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: + 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 + 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(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 + + INTERFACE + INTEGER FUNCTION h5ocopy_c(src_loc_id, src_name, src_name_len, & + dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OCOPY_C'::h5ocopy_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: src_name, dst_name + 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(HID_T) , INTENT(IN) :: ocpypl_id_default + INTEGER(HID_T) , INTENT(IN) :: lcpl_id_default + INTEGER(SIZE_T) :: src_name_len, dst_name_len + + END FUNCTION h5ocopy_c + END INTERFACE + + src_name_len = LEN(src_name) + dst_name_len = LEN(dst_name) + + ocpypl_id_default = H5P_DEFAULT_F + IF(PRESENT(ocpypl_id)) ocpypl_id_default = ocpypl_id + lcpl_id_default = H5P_DEFAULT_F + IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + + hdferr = h5ocopy_c(src_loc_id, src_name, src_name_len, & + dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) + + 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: + 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) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ODECR_REFCOUNT_C'::h5odecr_refcount_c + !DEC$ENDIF + INTEGER(HID_T) , INTENT(IN) :: object_id + END FUNCTION h5odecr_refcount_c + END INTERFACE + + hdferr = h5odecr_refcount_c(object_id) + + 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: + SUBROUTINE h5oexists_by_name_f(loc_id, name, link_exists, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + LOGICAL , INTENT(OUT) :: link_exists + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id +!***** + + INTEGER(size_t) :: namelen + INTEGER :: status + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5oexists_by_name_c(loc_id, name, namelen, lapl_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OEXISTS_BY_NAME_C'::h5oexists_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER(HID_T) , INTENT(IN) :: lapl_id + + END FUNCTION h5oexists_by_name_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + status = h5oexists_by_name_c(loc_id, name, namelen, lapl_id_default) + + link_exists = .FALSE. + IF(status.EQ.1)THEN + link_exists = .TRUE. + ENDIF + + hdferr = 0 + IF(status.LT.0)THEN + hdferr = -1 + ENDIF + + 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: + 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 + + INTERFACE + INTEGER FUNCTION h5oget_comment_c(obj_id, comment, commentsize_default, bufsize) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OGET_COMMENT_C'::h5oget_comment_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: comment + INTEGER(HID_T) , INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(OUT) :: comment + INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default + INTEGER(HSSIZE_T) , INTENT(OUT) :: bufsize + END FUNCTION h5oget_comment_c + END INTERFACE + + commentsize_default = LEN(comment) + + hdferr = h5oget_comment_c(obj_id, comment, commentsize_default, bufsize_default) + + IF(PRESENT(bufsize)) bufsize = bufsize_default + + 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: + SUBROUTINE h5oget_comment_by_name_f(loc_id, name, comment, hdferr, bufsize, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + CHARACTER(LEN=*), INTENT(OUT) :: comment + 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 + INTEGER(SIZE_T) :: bufsize_default + INTEGER(HID_T) :: lapl_id_default + INTERFACE + INTEGER FUNCTION h5oget_comment_by_name_c(loc_id, name, name_size, & + comment, commentsize_default, bufsize_default, lapl_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OGET_COMMENT_BY_NAME_C'::h5oget_comment_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: comment, name + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: name_size + CHARACTER(LEN=*), INTENT(OUT) :: comment + INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default + INTEGER(SIZE_T) , INTENT(OUT) :: bufsize_default + INTEGER(HID_T) , INTENT(IN) :: lapl_id + END FUNCTION h5oget_comment_by_name_c + END INTERFACE + + commentsize_default = LEN(comment) + name_size = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5oget_comment_by_name_c(loc_id, name, name_size, & + comment, commentsize_default, bufsize_default, lapl_id_default) + + IF(PRESENT(bufsize)) bufsize = bufsize_default + + 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: + 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) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OINCR_REFCOUNT_C'::h5oincr_refcount_c + !DEC$ENDIF + INTEGER(HID_T) , INTENT(IN) :: obj_id + END FUNCTION h5oincr_refcount_c + END INTERFACE + + hdferr = h5oincr_refcount_c(obj_id) + + 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: + SUBROUTINE h5oopen_by_idx_f(loc_id, group_name, index_type, order, n, obj_id, & + hdferr, lapl_id) + IMPLICIT NONE + 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(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 + + INTERFACE + INTEGER FUNCTION h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_BY_IDX_C'::h5oopen_by_idx_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: group_name + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: group_name + INTEGER(SIZE_T) , INTENT(IN) :: group_namelen + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) , INTENT(OUT) :: obj_id + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + + END FUNCTION h5oopen_by_idx_c + END INTERFACE + + group_namelen = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) + + 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: + 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 + INTEGER FUNCTION h5oset_comment_c(obj_id, comment, commentlen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OSET_COMMENT_C'::h5oset_comment_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: comment + INTEGER(HID_T) , INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(IN) :: comment + INTEGER(SIZE_T) , INTENT(IN) :: commentlen + + END FUNCTION h5oset_comment_c + END INTERFACE + + commentlen = LEN(comment) + + hdferr = h5oset_comment_c(obj_id, comment, commentlen) + + 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: + SUBROUTINE h5oset_comment_by_name_f(loc_id, name, comment, hdferr, lapl_id) + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + 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 + + INTERFACE + INTEGER FUNCTION h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OSET_COMMENT_BY_NAME_C'::h5oset_comment_by_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name, comment + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: comment + INTEGER(SIZE_T) , INTENT(IN) :: commentlen + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER(HID_T) , INTENT(IN) :: lapl_id + END FUNCTION h5oset_comment_by_name_c + END INTERFACE + + commentlen = LEN(comment) + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + hdferr = h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id_default) + + 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 +! AUTHOR +! M. Scot Breitenfeld +! November 19, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5ovisit_f(object_id, index_type, order, op, op_data, return_value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + + TYPE(C_FUNPTR):: op + TYPE(C_PTR) :: op_data + INTEGER, INTENT(OUT) :: return_value + INTEGER, INTENT(OUT) :: hdferr +!***** + + INTERFACE + INTEGER FUNCTION h5ovisit_c(object_id, index_type, order, op, op_data) & + BIND(C, NAME='h5ovisit_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: object_id + INTEGER, INTENT(IN) :: index_type + INTEGER, INTENT(IN) :: order + TYPE(C_FUNPTR), VALUE :: op + TYPE(C_PTR), VALUE :: op_data + END FUNCTION h5ovisit_c + END INTERFACE + + return_value = h5ovisit_c(object_id, index_type, order, op, op_data) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + 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. +! +! AUTHOR +! M. Scot Breitenfeld +! December 1, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5oget_info_by_name_f(loc_id, name, object_info, hdferr, lapl_id) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + TYPE(C_PTR) :: ptr + + INTERFACE + INTEGER FUNCTION h5oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, object_info) & + BIND(C, NAME='h5oget_info_by_name_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + TYPE(C_PTR),VALUE :: object_info + + END FUNCTION h5oget_info_by_name_c + END INTERFACE + + namelen = LEN(name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + ptr = C_LOC(object_info) + + hdferr = H5Oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, ptr) + + 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. +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5oget_info_f(object_id, object_info, hdferr) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: object_id + TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info + INTEGER , INTENT(OUT) :: hdferr +!***** + TYPE(C_PTR) :: ptr + + INTERFACE + INTEGER FUNCTION h5oget_info_c(object_id, object_info) & + BIND(C, NAME='h5oget_info_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + INTEGER(HID_T), INTENT(IN) :: object_id + TYPE(C_PTR), VALUE :: object_info + END FUNCTION h5oget_info_c + END INTERFACE + + ptr = C_LOC(object_info) + hdferr = H5Oget_info_c(object_id, ptr) + + 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.) +! +! AUTHOR +! M. Scot Breitenfeld +! May 11, 2012 +! +! Fortran2003 Interface: + SUBROUTINE h5oget_info_by_idx_f(loc_id, group_name, index_field, order, n, & + object_info, hdferr, lapl_id) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + 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 + TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + TYPE(C_PTR) :: ptr + + INTERFACE + INTEGER FUNCTION h5oget_info_by_idx_c(loc_id, group_name, namelen, & + index_field, order, n, lapl_id_default, object_info) BIND(C, NAME='h5oget_info_by_idx_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name + INTEGER(SIZE_T) , INTENT(IN) :: namelen + INTEGER , INTENT(IN) :: index_field + INTEGER , INTENT(IN) :: order + INTEGER(HSIZE_T), INTENT(IN) :: n + INTEGER(HID_T) , INTENT(IN) :: lapl_id_default + TYPE(C_PTR), VALUE :: object_info + + END FUNCTION h5oget_info_by_idx_c + END INTERFACE + + namelen = LEN(group_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + ptr = C_LOC(object_info) + hdferr = H5Oget_info_by_idx_c(loc_id, group_name, namelen, index_field, order, n, lapl_id_default, ptr) + + 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. +! +! AUTHOR +! M. Scot Breitenfeld +! November 19, 2008 +! +! Fortran2003 Interface: + SUBROUTINE h5ovisit_by_name_f(loc_id, object_name, index_type, order, op, op_data, & + return_value, hdferr, lapl_id) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: object_name + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + + TYPE(C_FUNPTR) :: op + TYPE(C_PTR) :: op_data + INTEGER , INTENT(OUT) :: return_value + INTEGER , INTENT(OUT) :: hdferr + INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id +!***** + + INTEGER(SIZE_T) :: namelen + INTEGER(HID_T) :: lapl_id_default + + INTERFACE + INTEGER FUNCTION h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & + op, op_data, lapl_id) BIND(C, NAME='h5ovisit_by_name_c') + USE, INTRINSIC :: ISO_C_BINDING + USE H5GLOBAL + INTEGER(HID_T) , INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: object_name + INTEGER(SIZE_T) :: namelen + INTEGER , INTENT(IN) :: index_type + INTEGER , INTENT(IN) :: order + TYPE(C_FUNPTR) , VALUE :: op + TYPE(C_PTR) , VALUE :: op_data + INTEGER(HID_T) , INTENT(IN) :: lapl_id + END FUNCTION h5ovisit_by_name_c + END INTERFACE + + namelen = LEN(object_name) + + lapl_id_default = H5P_DEFAULT_F + IF(PRESENT(lapl_id)) lapl_id_default = lapl_id + + return_value = h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & + op, op_data, lapl_id_default) + + IF(return_value.GE.0)THEN + hdferr = 0 + ELSE + hdferr = -1 + END IF + + END SUBROUTINE h5ovisit_by_name_f + +END MODULE H5O + diff --git a/fortran/src/H5Off.f90 b/fortran/src/H5Off.f90 deleted file mode 100644 index e4125bc..0000000 --- a/fortran/src/H5Off.f90 +++ /dev/null @@ -1,1167 +0,0 @@ -!****h* ROBODoc/H5O -! -! NAME -! MODULE H5O -! -! FILE -! fortran/src/H5Off.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5O functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! NOTES -! *** IMPORTANT *** -! If you add a new H5O 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. -! -!***** - -MODULE H5O - - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING - - IMPLICIT NONE - -!****t* H5T (F03)/h5o_info_t -! -! Fortran2003 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 - END TYPE space_t - - 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 - END TYPE mesg_t - - 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 - TYPE(space_t) :: space - TYPE(mesg_t) :: mesg - END TYPE hdr_t - - ! 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 - END TYPE H5_ih_info_t - - 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 - ENDTYPE meta_size_t - - TYPE, BIND(C) :: h5o_info_t - INTEGER(C_LONG) :: fileno ! File number that object is located in - INTEGER(haddr_t) :: addr ! Object address 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 - - TYPE(hdr_t) :: hdr - - TYPE(meta_size_t) :: meta_size - END TYPE h5o_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: - 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 - INTEGER(HID_T) , INTENT(IN) :: new_loc_id - CHARACTER(LEN=*), INTENT(IN) :: new_link_name - 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 - - INTEGER(SIZE_T) :: new_link_namelen - - INTERFACE - INTEGER FUNCTION h5olink_c(object_id, new_loc_id, new_link_name, new_link_namelen, & - lcpl_id_default, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OLINK_C'::h5olink_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: new_link_name - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER(HID_T), INTENT(IN) :: new_loc_id - CHARACTER(LEN=*), INTENT(IN) :: new_link_name - INTEGER(SIZE_T) :: new_link_namelen - INTEGER(HID_T) :: lapl_id_default - INTEGER(HID_T) :: lcpl_id_default - END FUNCTION h5olink_c - END INTERFACE - - new_link_namelen = LEN(new_link_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - - hdferr = h5olink_c(object_id, new_loc_id, new_link_name, new_link_namelen, & - lcpl_id_default, lapl_id_default) - - 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: - SUBROUTINE h5oopen_f(loc_id, name, obj_id, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - 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 - - INTERFACE - INTEGER FUNCTION h5oopen_c(loc_id, name, namelen, lapl_id_default, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_C'::h5oopen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T) :: lapl_id_default - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T), INTENT(OUT) :: obj_id - END FUNCTION h5oopen_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - 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: - 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) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OCLOSE_C'::h5oclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: object_id - END FUNCTION h5oclose_c - END INTERFACE - - hdferr = h5oclose_c(object_id) - END SUBROUTINE h5oclose_f - -! -!****s* H5O/h5open_by_addr_f -! NAME -! h5oopen_by_addr_f -! -! PURPOSE -! Opens an object using its address within an HDF5 file. -! -! Inputs: -! loc_id - File or group identifier. -! addr - Object’s address 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: - SUBROUTINE h5oopen_by_addr_f(loc_id, addr, obj_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - INTEGER(HADDR_T), INTENT(IN) :: addr - INTEGER(HID_T) , INTENT(OUT) :: obj_id - INTEGER , INTENT(OUT) :: hdferr -!***** - INTERFACE - INTEGER FUNCTION h5oopen_by_addr_c(loc_id, addr, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_BY_ADDR_C'::h5oopen_by_addr_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER(HADDR_T), INTENT(IN) :: addr - INTEGER(HID_T), INTENT(OUT) :: obj_id - END FUNCTION h5oopen_by_addr_c - END INTERFACE - - hdferr = h5oopen_by_addr_c(loc_id, addr, obj_id) - - END SUBROUTINE h5oopen_by_addr_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: - 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 - 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(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 - - INTERFACE - INTEGER FUNCTION h5ocopy_c(src_loc_id, src_name, src_name_len, & - dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OCOPY_C'::h5ocopy_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: src_name, dst_name - 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(HID_T) , INTENT(IN) :: ocpypl_id_default - INTEGER(HID_T) , INTENT(IN) :: lcpl_id_default - INTEGER(SIZE_T) :: src_name_len, dst_name_len - - END FUNCTION h5ocopy_c - END INTERFACE - - src_name_len = LEN(src_name) - dst_name_len = LEN(dst_name) - - ocpypl_id_default = H5P_DEFAULT_F - IF(PRESENT(ocpypl_id)) ocpypl_id_default = ocpypl_id - lcpl_id_default = H5P_DEFAULT_F - IF(PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - - hdferr = h5ocopy_c(src_loc_id, src_name, src_name_len, & - dst_loc_id, dst_name, dst_name_len, ocpypl_id_default, lcpl_id_default) - - 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: - 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) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ODECR_REFCOUNT_C'::h5odecr_refcount_c - !DEC$ENDIF - INTEGER(HID_T) , INTENT(IN) :: object_id - END FUNCTION h5odecr_refcount_c - END INTERFACE - - hdferr = h5odecr_refcount_c(object_id) - - 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: - SUBROUTINE h5oexists_by_name_f(loc_id, name, link_exists, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - LOGICAL , INTENT(OUT) :: link_exists - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN), OPTIONAL :: lapl_id -!***** - - INTEGER(size_t) :: namelen - INTEGER :: status - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5oexists_by_name_c(loc_id, name, namelen, lapl_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OEXISTS_BY_NAME_C'::h5oexists_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER(HID_T) , INTENT(IN) :: lapl_id - - END FUNCTION h5oexists_by_name_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - status = h5oexists_by_name_c(loc_id, name, namelen, lapl_id_default) - - link_exists = .FALSE. - IF(status.EQ.1)THEN - link_exists = .TRUE. - ENDIF - - hdferr = 0 - IF(status.LT.0)THEN - hdferr = -1 - ENDIF - - 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: - 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 - - INTERFACE - INTEGER FUNCTION h5oget_comment_c(obj_id, comment, commentsize_default, bufsize) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OGET_COMMENT_C'::h5oget_comment_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: comment - INTEGER(HID_T) , INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: comment - INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default - INTEGER(HSSIZE_T) , INTENT(OUT) :: bufsize - END FUNCTION h5oget_comment_c - END INTERFACE - - commentsize_default = LEN(comment) - - hdferr = h5oget_comment_c(obj_id, comment, commentsize_default, bufsize_default) - - IF(PRESENT(bufsize)) bufsize = bufsize_default - - 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: - SUBROUTINE h5oget_comment_by_name_f(loc_id, name, comment, hdferr, bufsize, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - CHARACTER(LEN=*), INTENT(OUT) :: comment - 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 - INTEGER(SIZE_T) :: bufsize_default - INTEGER(HID_T) :: lapl_id_default - INTERFACE - INTEGER FUNCTION h5oget_comment_by_name_c(loc_id, name, name_size, & - comment, commentsize_default, bufsize_default, lapl_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OGET_COMMENT_BY_NAME_C'::h5oget_comment_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: comment, name - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: name_size - CHARACTER(LEN=*), INTENT(OUT) :: comment - INTEGER(SIZE_T) , INTENT(IN) :: commentsize_default - INTEGER(SIZE_T) , INTENT(OUT) :: bufsize_default - INTEGER(HID_T) , INTENT(IN) :: lapl_id - END FUNCTION h5oget_comment_by_name_c - END INTERFACE - - commentsize_default = LEN(comment) - name_size = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5oget_comment_by_name_c(loc_id, name, name_size, & - comment, commentsize_default, bufsize_default, lapl_id_default) - - IF(PRESENT(bufsize)) bufsize = bufsize_default - - 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: - 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) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OINCR_REFCOUNT_C'::h5oincr_refcount_c - !DEC$ENDIF - INTEGER(HID_T) , INTENT(IN) :: obj_id - END FUNCTION h5oincr_refcount_c - END INTERFACE - - hdferr = h5oincr_refcount_c(obj_id) - - 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: - SUBROUTINE h5oopen_by_idx_f(loc_id, group_name, index_type, order, n, obj_id, & - hdferr, lapl_id) - IMPLICIT NONE - 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(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 - - INTERFACE - INTEGER FUNCTION h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OOPEN_BY_IDX_C'::h5oopen_by_idx_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: group_name - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: group_name - INTEGER(SIZE_T) , INTENT(IN) :: group_namelen - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) , INTENT(OUT) :: obj_id - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - - END FUNCTION h5oopen_by_idx_c - END INTERFACE - - group_namelen = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5oopen_by_idx_c(loc_id, group_name, group_namelen, index_type, order, n, obj_id, lapl_id_default) - - 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: - 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 - INTEGER FUNCTION h5oset_comment_c(obj_id, comment, commentlen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OSET_COMMENT_C'::h5oset_comment_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: comment - INTEGER(HID_T) , INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(IN) :: comment - INTEGER(SIZE_T) , INTENT(IN) :: commentlen - - END FUNCTION h5oset_comment_c - END INTERFACE - - commentlen = LEN(comment) - - hdferr = h5oset_comment_c(obj_id, comment, commentlen) - - 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: - SUBROUTINE h5oset_comment_by_name_f(loc_id, name, comment, hdferr, lapl_id) - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - 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 - - INTERFACE - INTEGER FUNCTION h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5OSET_COMMENT_BY_NAME_C'::h5oset_comment_by_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name, comment - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: comment - INTEGER(SIZE_T) , INTENT(IN) :: commentlen - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER(HID_T) , INTENT(IN) :: lapl_id - END FUNCTION h5oset_comment_by_name_c - END INTERFACE - - commentlen = LEN(comment) - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - hdferr = h5oset_comment_by_name_c(loc_id, name, namelen, comment, commentlen, lapl_id_default) - - 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 -! AUTHOR -! M. Scot Breitenfeld -! November 19, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5ovisit_f(object_id, index_type, order, op, op_data, return_value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - - TYPE(C_FUNPTR):: op - TYPE(C_PTR) :: op_data - INTEGER, INTENT(OUT) :: return_value - INTEGER, INTENT(OUT) :: hdferr -!***** - - INTERFACE - INTEGER FUNCTION h5ovisit_c(object_id, index_type, order, op, op_data) & - BIND(C, NAME='h5ovisit_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_funptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: object_id - INTEGER, INTENT(IN) :: index_type - INTEGER, INTENT(IN) :: order - TYPE(C_FUNPTR), VALUE :: op - TYPE(C_PTR), VALUE :: op_data - END FUNCTION h5ovisit_c - END INTERFACE - - return_value = h5ovisit_c(object_id, index_type, order, op, op_data) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - 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. -! -! AUTHOR -! M. Scot Breitenfeld -! December 1, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5oget_info_by_name_f(loc_id, name, object_info, hdferr, lapl_id) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - TYPE(C_PTR) :: ptr - - INTERFACE - INTEGER FUNCTION h5oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, object_info) & - BIND(C, NAME='h5oget_info_by_name_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - TYPE(C_PTR),VALUE :: object_info - - END FUNCTION h5oget_info_by_name_c - END INTERFACE - - namelen = LEN(name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - ptr = C_LOC(object_info) - - hdferr = H5Oget_info_by_name_c(loc_id, name, namelen, lapl_id_default, ptr) - - 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. -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5oget_info_f(object_id, object_info, hdferr) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: object_id - TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info - INTEGER , INTENT(OUT) :: hdferr -!***** - TYPE(C_PTR) :: ptr - - INTERFACE - INTEGER FUNCTION h5oget_info_c(object_id, object_info) & - BIND(C, NAME='h5oget_info_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - INTEGER(HID_T), INTENT(IN) :: object_id - TYPE(C_PTR), VALUE :: object_info - END FUNCTION h5oget_info_c - END INTERFACE - - ptr = C_LOC(object_info) - hdferr = H5Oget_info_c(object_id, ptr) - - 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.) -! -! AUTHOR -! M. Scot Breitenfeld -! May 11, 2012 -! -! Fortran2003 Interface: - SUBROUTINE h5oget_info_by_idx_f(loc_id, group_name, index_field, order, n, & - object_info, hdferr, lapl_id) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - 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 - TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - TYPE(C_PTR) :: ptr - - INTERFACE - INTEGER FUNCTION h5oget_info_by_idx_c(loc_id, group_name, namelen, & - index_field, order, n, lapl_id_default, object_info) BIND(C, NAME='h5oget_info_by_idx_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: group_name - INTEGER(SIZE_T) , INTENT(IN) :: namelen - INTEGER , INTENT(IN) :: index_field - INTEGER , INTENT(IN) :: order - INTEGER(HSIZE_T), INTENT(IN) :: n - INTEGER(HID_T) , INTENT(IN) :: lapl_id_default - TYPE(C_PTR), VALUE :: object_info - - END FUNCTION h5oget_info_by_idx_c - END INTERFACE - - namelen = LEN(group_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - ptr = C_LOC(object_info) - hdferr = H5Oget_info_by_idx_c(loc_id, group_name, namelen, index_field, order, n, lapl_id_default, ptr) - - 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. -! -! AUTHOR -! M. Scot Breitenfeld -! November 19, 2008 -! -! Fortran2003 Interface: - SUBROUTINE h5ovisit_by_name_f(loc_id, object_name, index_type, order, op, op_data, & - return_value, hdferr, lapl_id) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: object_name - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - - TYPE(C_FUNPTR) :: op - TYPE(C_PTR) :: op_data - INTEGER , INTENT(OUT) :: return_value - INTEGER , INTENT(OUT) :: hdferr - INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id -!***** - - INTEGER(SIZE_T) :: namelen - INTEGER(HID_T) :: lapl_id_default - - INTERFACE - INTEGER FUNCTION h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & - op, op_data, lapl_id) BIND(C, NAME='h5ovisit_by_name_c') - USE, INTRINSIC :: ISO_C_BINDING - USE H5GLOBAL - INTEGER(HID_T) , INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: object_name - INTEGER(SIZE_T) :: namelen - INTEGER , INTENT(IN) :: index_type - INTEGER , INTENT(IN) :: order - TYPE(C_FUNPTR) , VALUE :: op - TYPE(C_PTR) , VALUE :: op_data - INTEGER(HID_T) , INTENT(IN) :: lapl_id - END FUNCTION h5ovisit_by_name_c - END INTERFACE - - namelen = LEN(object_name) - - lapl_id_default = H5P_DEFAULT_F - IF(PRESENT(lapl_id)) lapl_id_default = lapl_id - - return_value = h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, & - op, op_data, lapl_id_default) - - IF(return_value.GE.0)THEN - hdferr = 0 - ELSE - hdferr = -1 - END IF - - END SUBROUTINE h5ovisit_by_name_f - -END MODULE H5O - diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 new file mode 100644 index 0000000..18da887 --- /dev/null +++ b/fortran/src/H5Pff.F90 @@ -0,0 +1,7624 @@ +!****h* ROBODoc/H5P (F90) +! +! NAME +! H5P_PROVISIONAL +! +! PURPOSE +! This file contains Fortran interfaces for H5P functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! NOTES +! *** IMPORTANT *** +! 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. +!***** + +MODULE H5P + + USE H5GLOBAL + + INTERFACE h5pset_fapl_multi_f + MODULE PROCEDURE h5pset_fapl_multi_l + MODULE PROCEDURE h5pset_fapl_multi_s + END INTERFACE + + INTERFACE h5pset_fill_value_f + MODULE PROCEDURE h5pset_fill_value_integer + MODULE PROCEDURE h5pset_fill_value_real + MODULE PROCEDURE h5pset_fill_value_char + ! Recommended procedure: + MODULE PROCEDURE h5pset_fill_value_ptr + + END INTERFACE + + INTERFACE h5pget_fill_value_f + MODULE PROCEDURE h5pget_fill_value_integer + MODULE PROCEDURE h5pget_fill_value_real + MODULE PROCEDURE h5pget_fill_value_char + ! Recommended procedure: + MODULE PROCEDURE h5pget_fill_value_ptr + + END INTERFACE + + INTERFACE h5pset_f + MODULE PROCEDURE h5pset_integer + MODULE PROCEDURE h5pset_real + MODULE PROCEDURE h5pset_char + ! Recommended procedure: + MODULE PROCEDURE h5pset_ptr + + END INTERFACE + + INTERFACE h5pget_f + MODULE PROCEDURE h5pget_integer + MODULE PROCEDURE h5pget_real + MODULE PROCEDURE h5pget_char + ! Recommended procedure: + MODULE PROCEDURE h5pget_ptr + END INTERFACE + + INTERFACE h5pregister_f + MODULE PROCEDURE h5pregister_integer + MODULE PROCEDURE h5pregister_real + MODULE PROCEDURE h5pregister_char + ! Recommended procedure: + MODULE PROCEDURE h5pregister_ptr + END INTERFACE + + INTERFACE h5pinsert_f + MODULE PROCEDURE h5pinsert_integer + MODULE PROCEDURE h5pinsert_real + MODULE PROCEDURE h5pinsert_char + ! Recommended procedure: + MODULE PROCEDURE h5pinsert_ptr + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pget_fill_value_c(prp_id, type_id, fillvalue) & + BIND(C, NAME='h5pget_fill_value_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + 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), VALUE :: fillvalue ! Fillvalue + END FUNCTION h5pget_fill_value_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pset_fill_value_c(prp_id, type_id, fillvalue) & + BIND(C, NAME='h5pset_fill_value_c') + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + 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), VALUE :: fillvalue ! Fillvalue + END FUNCTION h5pset_fill_value_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pset_c(prp_id, name, name_len, value) & + BIND(C, NAME='h5pset_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify + INTEGER :: name_len + TYPE(C_PTR), VALUE :: value ! Property value + END FUNCTION h5pset_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pget_c(prp_id, name, name_len, value) & + BIND(C, NAME='h5pget_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify + INTEGER :: name_len + TYPE(C_PTR), VALUE :: value ! Property value + END FUNCTION h5pget_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pregister_c(class, name, name_len, size, value) & + BIND(C, NAME='h5pregister_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + TYPE(C_PTR), INTENT(IN), VALUE :: value + END FUNCTION h5pregister_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5pinsert_c(plist, name, name_len, size, value) & + BIND(C, NAME='h5pinsert_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: plist + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + TYPE(C_PTR), INTENT(IN), VALUE :: value + END FUNCTION h5pinsert_c + END INTERFACE + +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: + 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 +!***** +! INTEGER, EXTERNAL :: h5pcreate_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pcreate_c(class, prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCREATE_C'::h5pcreate_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: class + INTEGER(HID_T), INTENT(OUT) :: prp_id + END FUNCTION h5pcreate_c + END INTERFACE + + 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: + 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 :: flag_c + +! INTEGER, EXTERNAL :: h5pset_preserve_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_preserve_c(prp_id, flag_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_PRESERVE_C'::h5pset_preserve_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER :: flag_c + END FUNCTION h5pset_preserve_c + END INTERFACE + flag_c = 0 + IF(flag) flag_c = 1 + 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: + 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 :: flag_c + +! INTEGER, EXTERNAL :: h5pget_preserve_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_preserve_c(prp_id, flag_c) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_PRESERVE_C'::h5pget_preserve_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER :: flag_c + END FUNCTION h5pget_preserve_c + END INTERFACE + + hdferr = h5pget_preserve_c(prp_id, flag_c) + flag = .FALSE. + 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: + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5pget_class_c(prp_id, classtype) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_C'::h5pget_class_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: classtype + END FUNCTION h5pget_class_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pcopy_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pcopy_c(prp_id, new_prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCOPY_C'::h5pcopy_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: new_prp_id + END FUNCTION h5pcopy_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pclose_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pclose_c(prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCLOSE_C'::h5pclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + END FUNCTION h5pclose_c + END INTERFACE + + 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 - datatset 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: + 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(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, EXTERNAL :: h5pset_chunk_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_chunk_c(prp_id, ndims, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHUNK_C'::h5pset_chunk_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: ndims + INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims + END FUNCTION h5pset_chunk_c + END INTERFACE + + 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: + 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(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, EXTERNAL :: h5pget_chunk_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_chunk_c(prp_id, ndims, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHUNK_C'::h5pget_chunk_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER :: ndims + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims + END FUNCTION h5pget_chunk_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pset_deflate_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_deflate_c(prp_id, level) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DEFLATE_C'::h5pset_deflate_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: level + END FUNCTION h5pset_deflate_c + END INTERFACE + hdferr = h5pset_deflate_c(prp_id, level) + + 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: + 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, 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, EXTERNAL :: h5pget_version_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_version_c(prp_id, boot, freelist, stab, shhdr) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_VERSION_C'::h5pget_version_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, DIMENSION(:), INTENT(OUT) :: boot + INTEGER, DIMENSION(:), INTENT(OUT) :: freelist + INTEGER, DIMENSION(:), INTENT(OUT) :: stab + INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr + END FUNCTION h5pget_version_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pset_userblock_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_userblock_c(prp_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_USERBLOCK_C'::h5pset_userblock_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_userblock_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pget_userblock_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_userblock_c(prp_id, block_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_USERBLOCK_C'::h5pget_userblock_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(OUT) :: block_size + END FUNCTION h5pget_userblock_c + END INTERFACE + 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: + 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, EXTERNAL :: h5pset_sizes_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SIZES_C'::h5pset_sizes_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr + INTEGER(SIZE_T), INTENT(IN) :: sizeof_size + END FUNCTION h5pset_sizes_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pget_sizes_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIZES_C'::h5pget_sizes_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr + INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size + END FUNCTION h5pget_sizes_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pset_sym_k_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_sym_k_c(prp_id, ik, lk) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SYM_K_C'::h5pset_sym_k_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: ik + INTEGER, INTENT(IN) :: lk + END FUNCTION h5pset_sym_k_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pget_sym_k_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_sym_k_c(prp_id, ik, lk) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SYM_K_C'::h5pget_sym_k_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: ik + INTEGER, INTENT(OUT) :: lk + END FUNCTION h5pget_sym_k_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pset_istore_k_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_istore_k_c(prp_id, ik) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ISTORE_K_C'::h5pset_istore_k_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: ik + END FUNCTION h5pset_istore_k_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pget_istore_k_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_istore_k_c(prp_id, ik) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ISTORE_K_C'::h5pget_istore_k_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: ik + END FUNCTION h5pget_istore_k_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pget_driver_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_driver_c(prp_id, driver) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DRIVER_C'::h5pget_driver_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: driver + END FUNCTION h5pget_driver_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pset_fapl_stdio_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_stdio_c(prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_STDIO_C'::h5pset_fapl_stdio_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + END FUNCTION h5pset_fapl_stdio_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pset_fapl_sec2_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_sec2_c(prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_SEC2_C'::h5pset_fapl_sec2_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + 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: + 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, EXTERNAL :: h5pset_alignment_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_alignment_c(prp_id, threshold, alignment) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ALIGNMENT_C'::h5pset_alignment_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: threshold + INTEGER(HSIZE_T), INTENT(IN) :: alignment + END FUNCTION h5pset_alignment_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pget_alignment_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_alignment_c(prp_id, threshold, alignment) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ALIGNMENT_C'::h5pget_alignment_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(OUT) :: threshold + INTEGER(HSIZE_T), INTENT(OUT) :: alignment + END FUNCTION h5pget_alignment_c + END INTERFACE + + 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: + 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 :: backing_store_flag + +! INTEGER, EXTERNAL :: h5pset_fapl_core_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_core_c(prp_id, increment, backing_store_flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_CORE_C'::h5pset_fapl_core_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(IN) :: increment + INTEGER :: backing_store_flag + END FUNCTION h5pset_fapl_core_c + END INTERFACE + backing_store_flag = 0 + IF(backing_store) backing_store_flag = 1 + 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: + 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 :: backing_store_flag + + INTERFACE + INTEGER FUNCTION h5pget_fapl_core_c(prp_id, increment, backing_store_flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_CORE_C'::h5pget_fapl_core_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(OUT) :: increment + INTEGER :: backing_store_flag + END FUNCTION h5pget_fapl_core_c + END INTERFACE + + hdferr = h5pget_fapl_core_c(prp_id, increment, backing_store_flag) + backing_store =.FALSE. + 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: + 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, EXTERNAL :: h5pset_fapl_family_f +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_family_c(prp_id, memb_size, memb_plist) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_FAMILY_C'::h5pset_fapl_family_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: memb_size + INTEGER(HID_T), INTENT(IN) :: memb_plist + END FUNCTION h5pset_fapl_family_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pget_fapl_family_f +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_fapl_family_c(prp_id, memb_size, memb_plist) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_FAMILY_C'::h5pget_fapl_family_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(OUT) :: memb_size + INTEGER(HID_T), INTENT(OUT) :: memb_plist + END FUNCTION h5pget_fapl_family_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pset_cache_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CACHE_C'::h5pset_cache_c + !DEC$ENDIF + 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 + END FUNCTION h5pset_cache_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pget_cache_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CACHE_C'::h5pget_cache_c + !DEC$ENDIF + 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 + END FUNCTION h5pget_cache_c + END INTERFACE + + 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: + 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 :: meta_len, raw_len + +! INTEGER, EXTERNAL :: h5pset_fapl_split_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_SPLIT_C'::h5pset_fapl_split_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: meta_ext + !DEC$ATTRIBUTES reference :: raw_ext + 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 :: meta_len, raw_len + END FUNCTION h5pset_fapl_split_c + END INTERFACE + + meta_len = LEN(meta_ext) + raw_len = LEN(raw_ext) + 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 stting 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: + 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, EXTERNAL :: h5pset_gc_references_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_gc_references_c(prp_id, gc_reference) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_GC_REFERENCES_C'::h5pset_gc_references_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: gc_reference + END FUNCTION h5pset_gc_references_c + END INTERFACE + + 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 stting 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: + 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, EXTERNAL :: h5pget_gc_references_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_gc_references_c(prp_id, gc_reference) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_GC_REFERENCES_C'::h5pget_gc_references_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: gc_reference + END FUNCTION h5pget_gc_references_c + END INTERFACE + + 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: + 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 + ! H5D_CHUNKED_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pset_layout_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_layout_c(prp_id, layout) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LAYOUT_C'::h5pset_layout_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: layout + END FUNCTION h5pset_layout_c + END INTERFACE + + 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: + 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) + ! H5D_CHUNKED_F(2) + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! INTEGER, EXTERNAL :: h5pget_layout_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_layout_c(prp_id, layout) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LAYOUT_C'::h5pget_layout_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: layout + END FUNCTION h5pget_layout_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pset_filter_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILTER_C'::h5pset_filter_c + !DEC$ENDIF + 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 + END FUNCTION h5pset_filter_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pget_nfilters_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_nfilters_c(prp_id, nfilters) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NFILTERS_C'::h5pget_nfilters_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: nfilters + END FUNCTION h5pget_nfilters_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pget_filter_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & + cd_values, namelen, name, filter_id ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILTER_C'::h5pget_filter_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + 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 + END FUNCTION h5pget_filter_c + END INTERFACE + + hdferr = h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & + 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: + 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 :: namelen + + INTERFACE + INTEGER FUNCTION h5pset_external_c(prp_id, name,namelen, offset, bytes) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EXTERNAL_C'::h5pset_external_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(OFF_T), INTENT(IN) :: offset + INTEGER(HSIZE_T), INTENT(IN) :: bytes + END FUNCTION h5pset_external_c + END INTERFACE + + namelen = LEN(name) + 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: + 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, EXTERNAL :: h5pget_external_count_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_external_count_c(prp_id, count) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EXTERNAL_COUNT_C'::h5pget_external_count_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: count + END FUNCTION h5pget_external_count_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pget_external_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EXTERNAL_C'::h5pget_external_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + 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 + END FUNCTION h5pget_external_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pset_btree_ratios_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_btree_ratios_c(prp_id, left, middle, right) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_BTREE_RATIOS_C'::h5pset_btree_ratios_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + REAL, INTENT(IN) :: left + REAL, INTENT(IN) :: middle + REAL, INTENT(IN) :: right + END FUNCTION h5pset_btree_ratios_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pget_btree_ratios_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_btree_ratios_c(prp_id, left, middle, right) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_BTREE_RATIOS_C'::h5pget_btree_ratios_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + REAL, INTENT(OUT) :: left + REAL, INTENT(OUT) :: middle + REAL, INTENT(OUT) :: right + END FUNCTION h5pget_btree_ratios_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5pget_fclose_degree_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_fclose_degree_c(fapl_id, degree) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FCLOSE_DEGREE_C'::h5pget_fclose_degree_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER, INTENT(OUT) :: degree + END FUNCTION h5pget_fclose_degree_c + END INTERFACE + + 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: + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5pset_fclose_degree_c(fapl_id, degree) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FCLOSE_DEGREE_C'::h5pset_fclose_degree_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER, INTENT(IN) :: degree + END FUNCTION h5pset_fclose_degree_c + END INTERFACE + + 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 eqaul +! +! 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: + 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 :: c_flag + + INTERFACE + INTEGER FUNCTION h5pequal_c(plist1_id, plist2_id, c_flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PEQUAL_C'::h5pequal_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist1_id + INTEGER(HID_T), INTENT(IN) :: plist2_id + INTEGER, INTENT(OUT) :: c_flag + END FUNCTION h5pequal_c + END INTERFACE + + flag = .FALSE. + hdferr = h5pequal_c(plist1_id, plist2_id, c_flag) + 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: + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5pset_buffer_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_BUFFER_C'::h5pset_buffer_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_buffer_c + END INTERFACE + + 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: + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5pget_buffer_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_BUFFER_C'::h5pget_buffer_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_buffer_c + END INTERFACE + + 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: + 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 + ! H5D_FILL_VALUE_USER_DEFINED_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5pfill_value_defined_c(plist_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PFILL_VALUE_DEFINED_C'::h5pfill_value_defined_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pfill_value_defined_c + END INTERFACE + + 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: + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5pset_alloc_time_c(plist_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ALLOC_TIME_C'::h5pset_alloc_time_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_alloc_time_c + END INTERFACE + + 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: + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5pget_alloc_time_c(plist_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ALLOC_TIME_C'::h5pget_alloc_time_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pget_alloc_time_c + END INTERFACE + + 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: + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5pset_fill_time_c(plist_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_TIME_C'::h5pset_fill_time_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_fill_time_c + END INTERFACE + + 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: + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5pget_fill_time_c(plist_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_TIME_C'::h5pget_fill_time_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pget_fill_time_c + END INTERFACE + + 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 - metatdata block size +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + 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 +!***** + INTERFACE + INTEGER FUNCTION h5pset_meta_block_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_META_BLOCK_SIZE_C'::h5pset_meta_block_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_meta_block_size_c + END INTERFACE + + 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 - metatdata block size +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! October 7, 2002 +! +! Fortran90 Interface: + 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 +!***** + INTERFACE + INTEGER FUNCTION h5pget_meta_block_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_META_BLOCK_SIZE_C'::h5pget_meta_block_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_meta_block_size_c + END INTERFACE + + 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: + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5pset_sieve_buf_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SIEVE_BUF_SIZE_C'::h5pset_sieve_buf_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_sieve_buf_size_c + END INTERFACE + + 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: + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5pget_sieve_buf_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIEVE_BUF_SIZE_C'::h5pget_sieve_buf_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_sieve_buf_size_c + END INTERFACE + + 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: + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5pset_small_data_block_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SMALL_DATA_BLOCK_SIZE_C'::h5pset_small_data_block_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_small_data_block_size_c + END INTERFACE + + 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: + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5pget_small_data_block_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SMALL_DATA_BLOCK_SIZE_C'::h5pget_small_data_block_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(HSIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_small_data_block_size_c + END INTERFACE + + 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: + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5pset_hyper_vector_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_HYPER_VECTOR_SIZE_C'::h5pset_hyper_vector_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(IN) :: size + END FUNCTION h5pset_hyper_vector_size_c + END INTERFACE + + 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: + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5pget_hyper_vector_size_c(plist_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_HYPER_VECTOR_SIZE_C'::h5pget_hyper_vector_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER(SIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_hyper_vector_size_c + END INTERFACE + + 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: + 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 :: name_len + + INTERFACE + INTEGER FUNCTION h5pexist_c(prp_id, name, name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PEXIST_C'::h5pexist_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5pexist_c + END INTERFACE + flag = .FALSE. + name_len = LEN(name) + hdferr = h5pexist_c(prp_id, name , name_len) + IF (hdferr > 0) THEN + flag = .TRUE. + hdferr = 0 + 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: + 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 :: name_len + + INTERFACE + INTEGER FUNCTION h5pget_size_c(prp_id, name, name_len, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIZE_C'::h5pget_size_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(OUT) :: size + END FUNCTION h5pget_size_c + END INTERFACE + name_len = LEN(name) + 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: + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5pget_nprops_c(prp_id, nprops) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NPROPS_C'::h5pget_nprops_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(SIZE_T), INTENT(OUT) :: nprops + END FUNCTION h5pget_nprops_c + END INTERFACE + 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: + 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 retireve 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 :: name_len + + INTERFACE + INTEGER FUNCTION h5pget_class_name_c(prp_id, name, name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_NAME_C'::h5pget_class_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(INOUT) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5pget_class_name_c + END INTERFACE + + name_len = LEN(name) + size = h5pget_class_name_c(prp_id, name, name_len) + + hdferr = 0 + IF(size.LT.0) hdferr = -1 + + END SUBROUTINE h5pget_class_name_f + +!****s* H5P/h5pget_class_parent_f +! NAME +! h5pget_class_parent_f +! +! PURPOSE +! Retrieves the parent class of a genric 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: + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5pget_class_parent_c(prp_id, parent_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_PARENT_C'::h5pget_class_parent_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(OUT) :: parent_id + END FUNCTION h5pget_class_parent_c + END INTERFACE + 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: + 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 +!***** + INTERFACE + INTEGER FUNCTION h5pisa_class_c(plist, pclass) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PISA_CLASS_C'::h5pisa_class_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist + INTEGER(HID_T), INTENT(IN) :: pclass + END FUNCTION h5pisa_class_c + END INTERFACE + flag = .FALSE. + hdferr = h5pisa_class_c(plist, pclass) + IF (hdferr .GT. 0) THEN + flag = .TRUE. + hdferr = 0 + 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: + 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 :: name_len + + INTERFACE + INTEGER FUNCTION h5pcopy_prop_c(dst_id, src_id, name, name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCOPY_PROP_C'::h5pcopy_prop_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: dst_id + INTEGER(HID_T), INTENT(IN) :: src_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5pcopy_prop_c + END INTERFACE + name_len = LEN(name) + 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: + 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 :: name_len + + INTERFACE + INTEGER FUNCTION h5premove_c(plid, name, name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREMOVE_C'::h5premove_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: plid + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5premove_c + END INTERFACE + name_len = LEN(name) + 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: + 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 :: name_len + + INTERFACE + INTEGER FUNCTION h5punregister_c(class, name, name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PUNREGISTER_C'::h5punregister_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + END FUNCTION h5punregister_c + END INTERFACE + name_len = LEN(name) + 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: + 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 +!***** + INTERFACE + INTEGER FUNCTION h5pclose_class_c(class) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCLOSE_CLASS_C'::h5pclose_class_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: class + END FUNCTION h5pclose_class_c + END INTERFACE + 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: + 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, EXTERNAL :: h5pset_shuffle_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_shuffle_c(prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHUFFLE_C'::h5pset_shuffle_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + END FUNCTION h5pset_shuffle_c + END INTERFACE + hdferr = h5pset_shuffle_c(prp_id) + + 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: + 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, EXTERNAL :: h5pset_edc_check_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_edc_check_c(prp_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EDC_CHECK_C'::h5pset_edc_check_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_edc_check_c + END INTERFACE + hdferr = h5pset_edc_check_c(prp_id, flag) + + 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: + 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, EXTERNAL :: h5pget_edc_check_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_edc_check_c(prp_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EDC_CHECK_C'::h5pget_edc_check_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pget_edc_check_c + END INTERFACE + hdferr = h5pget_edc_check_c(prp_id, flag) + + 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: + 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, EXTERNAL :: h5pset_fletcher32_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fletcher32_c(prp_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FLETCHER32_C'::h5pset_fletcher32_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + END FUNCTION h5pset_fletcher32_c + END INTERFACE + hdferr = h5pset_fletcher32_c(prp_id) + + 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: + 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, EXTERNAL :: h5pset_family_offset_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_family_offset_c(prp_id, offset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAMILY_OFFSET_C'::h5pset_family_offset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HSIZE_T), INTENT(IN) :: offset + END FUNCTION h5pset_family_offset_c + END INTERFACE + hdferr = h5pset_family_offset_c(prp_id, offset) + + 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: + 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 +!***** + INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm + INTEGER :: maxlen + INTEGER :: flag = 0 + INTEGER :: i + + INTERFACE + INTEGER FUNCTION h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & + maxlen, memb_addr, flag) + USE H5GLOBAL + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_C'::h5pset_fapl_multi_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: memb_name + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + 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 + INTEGER, DIMENSION(*) :: lenm + INTEGER :: maxlen + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_fapl_multi_c + END INTERFACE + + maxlen = LEN(memb_name(1)) + DO i=1, H5FD_MEM_NTYPES_F + lenm(i) = LEN_TRIM(memb_name(i)) + ENDDO + IF(relax) flag = 1 + 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: + SUBROUTINE h5pset_fapl_multi_s(prp_id, relax, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + LOGICAL, INTENT(IN) :: relax + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + INTEGER :: flag + +! INTEGER, EXTERNAL :: h5pset_fapl_multi_sc +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_multi_sc(prp_id,flag) + USE H5GLOBAL + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_SC'::h5pset_fapl_multi_sc + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, INTENT(IN) :: flag + END FUNCTION h5pset_fapl_multi_sc + END INTERFACE + flag = 0 + IF (relax) flag = 1 + 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: + 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, 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, 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) + USE H5GLOBAL + IMPLICIT NONE + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_MULTI_C'::h5pget_fapl_multi_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: memb_name + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + 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, DIMENSION(*) :: lenm + INTEGER :: maxlen + INTEGER :: c_maxlen_out + INTEGER, INTENT(OUT) :: flag + END FUNCTION h5pget_fapl_multi_c + END INTERFACE + + maxlen = LEN(memb_name(1)) + DO i=1, H5FD_MEM_NTYPES_F + lenm(i) = LEN_TRIM(memb_name(i)) + ENDDO + hdferr = h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag, c_maxlen_out) + + relax = .TRUE. + 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: + 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 + ! 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, EXTERNAL :: h5pset_szip_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_szip_c(prp_id, options_mask, pixels_per_block) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SZIP_C'::h5pset_szip_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, INTENT(IN) :: options_mask + INTEGER, INTENT(IN) :: pixels_per_block + END FUNCTION h5pset_szip_c + END INTERFACE + hdferr = h5pset_szip_c(prp_id, options_mask, pixels_per_block) + + 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: + 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 :: status + +! INTEGER, EXTERNAL :: h5pall_filters_avail_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pall_filters_avail_c(prp_id, status) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PALL_FILTERS_AVAIL_C'::h5pall_filters_avail_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier + INTEGER, INTENT(OUT) :: status + END FUNCTION h5pall_filters_avail_c + END INTERFACE + flag = .TRUE. + hdferr = h5pall_filters_avail_c(prp_id, status) + IF (status .EQ. 0 ) flag = .FALSE. + + 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: + 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, EXTERNAL :: h5pget_filter_by_id_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & + cd_values, namelen, name) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILTER_BY_ID_C'::h5pget_filter_by_id_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter_id + 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 + END FUNCTION h5pget_filter_by_id_c + END INTERFACE + + hdferr = h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & + 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: + 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, EXTERNAL :: h5pmodify_filter_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PMODIFY_FILTER_C'::h5pmodify_filter_c + !DEC$ENDIF + 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 + END FUNCTION h5pmodify_filter_c + END INTERFACE + + 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: + 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, EXTERNAL :: h5premove_filter_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5premove_filter_c(prp_id, filter) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREMOVE_FILTER_C'::h5premove_filter_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER, INTENT(IN) :: filter + END FUNCTION h5premove_filter_c + END INTERFACE + + 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: + 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 +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ATTR_PHASE_CHANGE_C'::h5pget_attr_phase_change_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(OUT) :: max_compact + INTEGER, INTENT(OUT) :: min_dense + + END FUNCTION h5pget_attr_phase_change_c + END INTERFACE + + 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: + 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 +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ATTR_CREATION_ORDER_C'::h5pset_attr_creation_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(IN) :: crt_order_flags + + END FUNCTION H5Pset_attr_creation_order_c + END INTERFACE + + 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: + 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 +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_shared_mesg_nindexes_c(plist_id, nindexes) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHARED_MESG_NINDEXES_C'::h5pset_shared_mesg_nindexes_c + !DEC$ENDIF + + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: nindexes + + END FUNCTION H5pset_shared_mesg_nindexes_c + END INTERFACE + + hdferr = h5pset_shared_mesg_nindexes_c(plist_id, nindexes) + + 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: + 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 +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHARED_MESG_INDEX_C'::h5pset_shared_mesg_index_c + !DEC$ENDIF + + INTEGER(HID_T), INTENT(IN) :: fcpl_id + INTEGER, INTENT(IN) :: index_num + INTEGER, INTENT(IN) :: mesg_type_flags + INTEGER, INTENT(IN) :: min_mesg_size + + END FUNCTION H5pset_shared_mesg_index_c + END INTERFACE + + hdferr = h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) + + 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: + 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 +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ATTR_CREATION_ORDER_C'::h5pget_attr_creation_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(OUT) :: crt_order_flags + + END FUNCTION H5pget_attr_creation_order_c + END INTERFACE + + hdferr = h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) + + END SUBROUTINE h5pget_attr_creation_order_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: + 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. + ! Currently, low must be one of two pre-defined values: + ! HDF_LIBVER_EARLIEST_F + ! HDF_LIBVER_LATEST_F + INTEGER, INTENT(IN) :: high ! The latest version of the library that will be used for writing objects. + ! Currently, low must set to the pre-defined value: + ! HDF_LIBVER_LATEST_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_libver_bounds_c(fapl_id, low, high) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LIBVER_BOUNDS_C'::h5pset_libver_bounds_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: fapl_id + INTEGER, INTENT(IN) :: low + INTEGER, INTENT(IN) :: high + + END FUNCTION H5pset_libver_bounds_c + END INTERFACE + + hdferr = h5pset_libver_bounds_c(fapl_id, low, high) + + 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: + 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 +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_link_creation_order_c(gcpl_id, crt_order_flags) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LINK_CREATION_ORDER_C'::h5pset_link_creation_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(IN) :: crt_order_flags + + END FUNCTION H5pset_link_creation_order_c + END INTERFACE + + hdferr = h5pset_link_creation_order_c(gcpl_id, crt_order_flags) + + 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: + 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 +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LINK_PHASE_CHANGE_C'::h5pget_link_phase_change_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(OUT) :: max_compact + INTEGER, INTENT(OUT) :: min_dense + + END FUNCTION h5pget_link_phase_change_c + END INTERFACE + + 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: + 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 :: status +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_obj_track_times_c(plist_id, status) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_OBJ_TRACK_TIMES_C'::h5pget_obj_track_times_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier + INTEGER, INTENT(OUT) :: status + END FUNCTION h5pget_obj_track_times_c + END INTERFACE + flag = .TRUE. + hdferr = h5pget_obj_track_times_c(plist_id, status) + IF(status.EQ.0) flag = .FALSE. + + 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: + 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 :: status +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_obj_track_times_c(plist_id, status) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_OBJ_TRACK_TIMES_C'::h5pset_obj_track_times_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier + INTEGER, INTENT(IN) :: status + END FUNCTION h5pset_obj_track_times_c + END INTERFACE + + status = 0 + IF(flag) status = 1 + + hdferr = h5pset_obj_track_times_c(plist_id, status) + + 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: + 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 +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CREATE_INTER_GROUP_C'::h5pset_create_inter_group_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: lcpl_id + INTEGER, INTENT(IN) :: crt_intermed_group + END FUNCTION h5pset_create_inter_group_c + END INTERFACE + + hdferr = h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) + + 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: + 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 +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_link_creation_order_c(gcpl_id, crt_order_flags) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LINK_CREATION_ORDER_C'::h5pget_link_creation_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(OUT) :: crt_order_flags + + END FUNCTION H5pget_link_creation_order_c + END INTERFACE + + hdferr = h5pget_link_creation_order_c(gcpl_id, crt_order_flags) + + 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: + 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 +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_char_encoding_c(plist_id, encoding) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHAR_ENCODING_C'::h5pset_char_encoding_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: encoding + + END FUNCTION H5pset_char_encoding_c + END INTERFACE + + hdferr = h5pset_char_encoding_c(plist_id, encoding) + + 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: + SUBROUTINE h5pget_char_encoding_f(plist_id, encoding, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier + + 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 +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_char_encoding_c(plist_id, encoding) + + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHAR_ENCODING_C'::h5pget_char_encoding_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(OUT) :: encoding + + END FUNCTION H5pget_char_encoding_c + END INTERFACE + + hdferr = h5pget_char_encoding_c(plist_id, encoding) + + 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: + 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 + ! H5O_COPY_EXPAND_REFERENCE_F + ! H5O_COPY_WITHOUT_ATTR_FLAG_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_copy_object_c(ocp_plist_id, copy_options) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_COPY_OBJECT_C'::h5pset_copy_object_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocp_plist_id + INTEGER, INTENT(IN) :: copy_options + END FUNCTION h5pset_copy_object_c + END INTERFACE + 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: + 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 + ! H5O_COPY_EXPAND_REFERENCE_F + ! H5O_COPY_WITHOUT_ATTR_FLAG_F + INTEGER, INTENT(OUT) :: hdferr ! Error code + ! 0 on success and -1 on failure +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_copy_object_c(ocp_plist_id, copy_options) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_COPY_OBJECT_C'::h5pget_copy_object_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocp_plist_id + INTEGER, INTENT(OUT) :: copy_options + END FUNCTION h5pget_copy_object_c + END INTERFACE + 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 lenght 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 arguement for the size? +! Fortran90 Interface: +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 :: expression_len + INTEGER(SIZE_T) :: size_default + + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_data_transform_c(plist_id, expression, expression_len, size_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DATA_TRANSFORM_C'::h5pget_data_transform_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: expression + INTEGER(HID_T), INTENT(IN) :: plist_id + CHARACTER(LEN=*), INTENT(OUT) :: expression + INTEGER(SIZE_T) :: size_default + INTEGER :: expression_len + END FUNCTION h5pget_data_transform_c + END INTERFACE + + size_default = 0 + expression_len = LEN(expression) + + hdferr = h5pget_data_transform_c(plist_id, expression, expression_len, size_default) + + IF(present(size)) size = size_default + + 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: + 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 :: expression_len + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_data_transform_c(plist_id, expression, expression_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DATA_TRANSFORM_C'::h5pset_data_transform_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: expression + INTEGER(HID_T), INTENT(IN) :: plist_id + CHARACTER(LEN=*), INTENT(IN) :: expression + INTEGER :: expression_len + END FUNCTION h5pset_data_transform_c + END INTERFACE + + expression_len = LEN(expression) + hdferr = h5pset_data_transform_c(plist_id, expression, expression_len) + + 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: + 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 +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_local_heap_size_hint_c(gcpl_id, size_hint) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LOCAL_HEAP_SIZE_HINT_C'::h5pget_local_heap_size_hint_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER(SIZE_T), INTENT(OUT) :: size_hint + END FUNCTION H5Pget_local_heap_size_hint_c + END INTERFACE + + hdferr = H5Pget_local_heap_size_hint_c(gcpl_id, size_hint) + + 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: + 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 +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EST_LINK_INFO_C'::h5pget_est_link_info_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(OUT) :: est_num_entries + INTEGER, INTENT(OUT) :: est_name_len + END FUNCTION h5pget_est_link_info_c + END INTERFACE + + hdferr = h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) + + 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: + 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 +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_local_heap_size_hint_c(gcpl_id, size_hint) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LOCAL_HEAP_SIZE_HINT_C'::h5pset_local_heap_size_hint_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER(SIZE_T), INTENT(IN) :: size_hint + END FUNCTION h5pset_local_heap_size_hint_c + END INTERFACE + + hdferr = H5Pset_local_heap_size_hint_c(gcpl_id, size_hint) + + 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: + 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 +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EST_LINK_INFO_C'::h5pset_est_link_info_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(IN) :: est_num_entries + INTEGER, INTENT(IN) :: est_name_len + END FUNCTION h5pset_est_link_info_c + END INTERFACE + + hdferr = H5Pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) + + 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: +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 +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LINK_PHASE_CHANGE_C'::h5pset_link_phase_change_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: gcpl_id + INTEGER, INTENT(IN) :: max_compact + INTEGER, INTENT(IN) :: min_dense + + END FUNCTION h5pset_link_phase_change_c + END INTERFACE + + 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: +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 +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_DIRECT_C'::h5pset_fapl_direct_c + !DEC$ENDIF + 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 + END FUNCTION h5pset_fapl_direct_c + END INTERFACE + + 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: + 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 +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_DIRECT_C'::h5pget_fapl_direct_c + !DEC$ENDIF + 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 + END FUNCTION h5pget_fapl_direct_c + 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: +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 +!***** +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ATTR_PHASE_CHANGE_C'::h5pset_attr_phase_change_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: ocpl_id + INTEGER, INTENT(IN) :: max_compact + INTEGER, INTENT(IN) :: min_dense + + END FUNCTION h5pset_attr_phase_change_c + END INTERFACE + + 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: + 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) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_NBIT_C'::h5pset_nbit_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + END FUNCTION H5Pset_nbit_c + END INTERFACE + + hdferr = H5Pset_nbit_c(plist_id) + + 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: + 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) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SCALEOFFSET_C'::h5pset_scaleoffset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: plist_id + INTEGER, INTENT(IN) :: scale_type + INTEGER, INTENT(IN) :: scale_factor + END FUNCTION h5pset_scaleoffset_c + END INTERFACE + + hdferr = H5Pset_scaleoffset_c(plist_id, scale_type, scale_factor) + + 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: + 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 +!***** + +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pset_nlinks_c(lapl_id, nlinks) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_NLINKS_C'::h5pset_nlinks_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: lapl_id + INTEGER(SIZE_T), INTENT(IN) :: nlinks + END FUNCTION h5pset_nlinks_c + END INTERFACE + + hdferr = h5pset_nlinks_c(lapl_id, nlinks) + + 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: + 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 +!***** +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5pget_nlinks_c(lapl_id, nlinks) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NLINKS_C'::h5pget_nlinks_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: lapl_id + INTEGER(SIZE_T), INTENT(OUT) :: nlinks + END FUNCTION h5pget_nlinks_c + END INTERFACE + + hdferr = h5pget_nlinks_c(lapl_id, nlinks) + + 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: + 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 +!***** + INTERFACE + INTEGER FUNCTION h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CREATE_INTER_GROUP_C'::h5pget_create_inter_group_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: lcpl_id + INTEGER, INTENT(IN) :: crt_intermed_group + END FUNCTION h5pget_create_inter_group_c + END INTERFACE + + hdferr = h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) + + 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: + 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 +!***** + + INTERFACE + INTEGER FUNCTION h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHUNK_CACHE_C'::h5pset_chunk_cache_c + !DEC$ENDIF + 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 + END FUNCTION h5pset_chunk_cache_c + END INTERFACE + + hdferr = h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) + + 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: + 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 +!***** + INTERFACE + INTEGER FUNCTION h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHUNK_CACHE_C'::h5pget_chunk_cache_c + !DEC$ENDIF + 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 + END FUNCTION h5pget_chunk_cache_c + END INTERFACE + + hdferr = h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) + + 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 +!***** + + + SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + 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) + USE, INTRINSIC :: ISO_C_BINDING + 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 + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pget_fill_value_integer + + + SUBROUTINE h5pset_fill_value_real(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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) + REAL, INTENT(IN), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pset_fill_value_real + + + SUBROUTINE h5pget_fill_value_real(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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) + REAL, INTENT(OUT), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pget_fill_value_real + + SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(IN), TARGET :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + TYPE(C_PTR) :: f_ptr ! C address + + f_ptr = C_LOC(fillvalue) + + hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) + + END SUBROUTINE h5pset_fill_value_char + + SUBROUTINE h5pget_fill_value_char(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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, INTENT(OUT) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(C_PTR) :: f_ptr ! C address + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(fillvalue) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + f_ptr = C_LOC(chr(1)(1:1)) + + hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) + + DO i = 1, chr_len + fillvalue(i:i) = chr(i) + 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) + USE, INTRINSIC :: ISO_C_BINDING + 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) , INTENT(OUT) :: fillvalue +!! INTEGER , INTENT(OUT) :: hdferr +!***** + + SUBROUTINE h5pget_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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(OUT) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + 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) + USE, INTRINSIC :: ISO_C_BINDING + 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 :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + END SUBROUTINE h5pset_integer + + SUBROUTINE h5pset_real(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + REAL, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + END SUBROUTINE h5pset_real + + SUBROUTINE h5pset_char(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(C_PTR) :: f_ptr + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + DO i = 1, chr_len + chr(i) = value(i:i) + ENDDO + + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + 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 +!***** + + SUBROUTINE h5pget_integer(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + END SUBROUTINE h5pget_integer + + SUBROUTINE h5pget_real(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify + REAL, INTENT(OUT), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + END SUBROUTINE h5pget_real + + SUBROUTINE h5pget_char(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + TYPE(C_PTR) :: f_ptr + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pget_c(prp_id, name, name_len, f_ptr) + + DO i = 1, chr_len + value(i:i) = chr(i) + ENDDO + + DEALLOCATE(chr) + + 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 +!***** + SUBROUTINE h5pset_ptr(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 :: 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 +!***** + SUBROUTINE h5pget_ptr(prp_id, name, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 :: 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) + USE, INTRINSIC :: ISO_C_BINDING + 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 :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, f_ptr) + + END SUBROUTINE h5pregister_integer + + SUBROUTINE h5pregister_real(class, name, size, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 + REAL, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(value) + + name_len = LEN(name) + hdferr = h5pregister_c(class, name, name_len, size, f_ptr) + + END SUBROUTINE h5pregister_real + + SUBROUTINE h5pregister_char(class, name, size, value, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(C_PTR) :: f_ptr + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + DO i = 1, chr_len + chr(i) = value(i:i) + ENDDO + + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + 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) + USE, INTRINSIC :: ISO_C_BINDING + 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 :: 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) + USE iso_c_binding + 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 :: name_len + TYPE(c_ptr) :: f_ptr + + f_ptr = c_loc(value) + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) + END SUBROUTINE h5pinsert_integer + + SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr) + USE iso_c_binding + 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 + REAL, INTENT(IN), TARGET :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER :: name_len + TYPE(c_ptr) :: f_ptr + + f_ptr = c_loc(value) + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) + + END SUBROUTINE h5pinsert_real + + SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) + USE iso_c_binding + 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 :: name_len + + INTEGER :: i + CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr + INTEGER :: chr_len + + TYPE(c_ptr) :: f_ptr + ! To resolve Issue #1 outlined in the preamble of this file we + ! need to pack the character string into an array. + + chr_len = LEN(value) + ALLOCATE(chr(1:chr_len), STAT=hdferr) + IF (hdferr .NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + + DO i = 1, chr_len + chr(i) = value(i:i) + ENDDO + + f_ptr = C_LOC(chr(1)(1:1)) + + name_len = LEN(name) + hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) + + DEALLOCATE(chr) + + 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) + USE iso_c_binding + 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 :: 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: + SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr, create, create_data, copy, copy_data, close, close_data) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: parent + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(HID_T) , INTENT(OUT) :: class + 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 + INTERFACE + INTEGER FUNCTION h5pcreate_class_c(parent, name, name_len, class, & + create, create_data, copy, copy_data, close, close_data) & + BIND(C, NAME='h5pcreate_class_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: parent + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(HID_T), INTENT(OUT) :: class + TYPE(C_PTR), VALUE :: create_data, copy_data, close_data + TYPE(C_FUNPTR), VALUE :: create, copy, close + END FUNCTION h5pcreate_class_c + END INTERFACE + name_len = LEN(name) + + create_default = c_null_funptr !fix:scot + create_data_default = c_null_ptr + copy_default = c_null_funptr !fix:scot + copy_data_default = c_null_ptr + close_default = c_null_funptr !fix:scot + close_data_default = c_null_ptr + + IF(PRESENT(create)) create_default = create + IF(PRESENT(create_data)) create_data_default = create_data + IF(PRESENT(copy)) copy_default = copy + IF(PRESENT(copy_data)) copy_data_default = copy_data + IF(PRESENT(close)) close_default = close + IF(PRESENT(close_data)) close_data_default = close_data + + hdferr = h5pcreate_class_c(parent, name , name_len, class, & + create_default, create_data_default, & + copy_default, copy_data_default, & + close_default, close_data_default) + + 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: + SUBROUTINE h5pset_file_image_f(fapl_id, buf_ptr, buf_len, hdferr) + USE iso_c_binding + 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') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: fapl_id + TYPE(C_PTR), VALUE :: buf_ptr + INTEGER(SIZE_T), INTENT(IN) :: buf_len + END FUNCTION h5pset_file_image_c + END INTERFACE + + 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: + SUBROUTINE h5pget_file_image_f(fapl_id, buf_ptr, buf_len_ptr, hdferr) + USE iso_c_binding + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: fapl_id + TYPE(C_PTR) , INTENT(OUT), DIMENSION(*) :: buf_ptr + 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') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: fapl_id + TYPE(C_PTR), DIMENSION(*), INTENT(OUT) :: buf_ptr + INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr + END FUNCTION h5pget_file_image_c + END INTERFACE + + hdferr = h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) + + END SUBROUTINE h5pget_file_image_f + +END MODULE H5P + + + diff --git a/fortran/src/H5Pff.f90 b/fortran/src/H5Pff.f90 deleted file mode 100644 index 18da887..0000000 --- a/fortran/src/H5Pff.f90 +++ /dev/null @@ -1,7624 +0,0 @@ -!****h* ROBODoc/H5P (F90) -! -! NAME -! H5P_PROVISIONAL -! -! PURPOSE -! This file contains Fortran interfaces for H5P functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! NOTES -! *** IMPORTANT *** -! 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. -!***** - -MODULE H5P - - USE H5GLOBAL - - INTERFACE h5pset_fapl_multi_f - MODULE PROCEDURE h5pset_fapl_multi_l - MODULE PROCEDURE h5pset_fapl_multi_s - END INTERFACE - - INTERFACE h5pset_fill_value_f - MODULE PROCEDURE h5pset_fill_value_integer - MODULE PROCEDURE h5pset_fill_value_real - MODULE PROCEDURE h5pset_fill_value_char - ! Recommended procedure: - MODULE PROCEDURE h5pset_fill_value_ptr - - END INTERFACE - - INTERFACE h5pget_fill_value_f - MODULE PROCEDURE h5pget_fill_value_integer - MODULE PROCEDURE h5pget_fill_value_real - MODULE PROCEDURE h5pget_fill_value_char - ! Recommended procedure: - MODULE PROCEDURE h5pget_fill_value_ptr - - END INTERFACE - - INTERFACE h5pset_f - MODULE PROCEDURE h5pset_integer - MODULE PROCEDURE h5pset_real - MODULE PROCEDURE h5pset_char - ! Recommended procedure: - MODULE PROCEDURE h5pset_ptr - - END INTERFACE - - INTERFACE h5pget_f - MODULE PROCEDURE h5pget_integer - MODULE PROCEDURE h5pget_real - MODULE PROCEDURE h5pget_char - ! Recommended procedure: - MODULE PROCEDURE h5pget_ptr - END INTERFACE - - INTERFACE h5pregister_f - MODULE PROCEDURE h5pregister_integer - MODULE PROCEDURE h5pregister_real - MODULE PROCEDURE h5pregister_char - ! Recommended procedure: - MODULE PROCEDURE h5pregister_ptr - END INTERFACE - - INTERFACE h5pinsert_f - MODULE PROCEDURE h5pinsert_integer - MODULE PROCEDURE h5pinsert_real - MODULE PROCEDURE h5pinsert_char - ! Recommended procedure: - MODULE PROCEDURE h5pinsert_ptr - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pget_fill_value_c(prp_id, type_id, fillvalue) & - BIND(C, NAME='h5pget_fill_value_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - 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), VALUE :: fillvalue ! Fillvalue - END FUNCTION h5pget_fill_value_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pset_fill_value_c(prp_id, type_id, fillvalue) & - BIND(C, NAME='h5pset_fill_value_c') - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - 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), VALUE :: fillvalue ! Fillvalue - END FUNCTION h5pset_fill_value_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pset_c(prp_id, name, name_len, value) & - BIND(C, NAME='h5pset_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify - INTEGER :: name_len - TYPE(C_PTR), VALUE :: value ! Property value - END FUNCTION h5pset_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pget_c(prp_id, name, name_len, value) & - BIND(C, NAME='h5pget_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name ! Name of property to modify - INTEGER :: name_len - TYPE(C_PTR), VALUE :: value ! Property value - END FUNCTION h5pget_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pregister_c(class, name, name_len, size, value) & - BIND(C, NAME='h5pregister_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - TYPE(C_PTR), INTENT(IN), VALUE :: value - END FUNCTION h5pregister_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5pinsert_c(plist, name, name_len, size, value) & - BIND(C, NAME='h5pinsert_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: plist - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - TYPE(C_PTR), INTENT(IN), VALUE :: value - END FUNCTION h5pinsert_c - END INTERFACE - -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: - 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 -!***** -! INTEGER, EXTERNAL :: h5pcreate_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pcreate_c(class, prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCREATE_C'::h5pcreate_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: class - INTEGER(HID_T), INTENT(OUT) :: prp_id - END FUNCTION h5pcreate_c - END INTERFACE - - 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: - 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 :: flag_c - -! INTEGER, EXTERNAL :: h5pset_preserve_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_preserve_c(prp_id, flag_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_PRESERVE_C'::h5pset_preserve_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER :: flag_c - END FUNCTION h5pset_preserve_c - END INTERFACE - flag_c = 0 - IF(flag) flag_c = 1 - 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: - 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 :: flag_c - -! INTEGER, EXTERNAL :: h5pget_preserve_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_preserve_c(prp_id, flag_c) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_PRESERVE_C'::h5pget_preserve_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER :: flag_c - END FUNCTION h5pget_preserve_c - END INTERFACE - - hdferr = h5pget_preserve_c(prp_id, flag_c) - flag = .FALSE. - 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: - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5pget_class_c(prp_id, classtype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_C'::h5pget_class_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(OUT) :: classtype - END FUNCTION h5pget_class_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pcopy_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pcopy_c(prp_id, new_prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCOPY_C'::h5pcopy_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(OUT) :: new_prp_id - END FUNCTION h5pcopy_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pclose_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pclose_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCLOSE_C'::h5pclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - END FUNCTION h5pclose_c - END INTERFACE - - 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 - datatset 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: - 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(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, EXTERNAL :: h5pset_chunk_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_chunk_c(prp_id, ndims, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHUNK_C'::h5pset_chunk_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: ndims - INTEGER(HSIZE_T), DIMENSION(ndims), INTENT(IN) :: dims - END FUNCTION h5pset_chunk_c - END INTERFACE - - 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: - 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(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, EXTERNAL :: h5pget_chunk_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_chunk_c(prp_id, ndims, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHUNK_C'::h5pget_chunk_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER :: ndims - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims - END FUNCTION h5pget_chunk_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pset_deflate_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_deflate_c(prp_id, level) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DEFLATE_C'::h5pset_deflate_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: level - END FUNCTION h5pset_deflate_c - END INTERFACE - hdferr = h5pset_deflate_c(prp_id, level) - - 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: - 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, 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, EXTERNAL :: h5pget_version_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_version_c(prp_id, boot, freelist, stab, shhdr) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_VERSION_C'::h5pget_version_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, DIMENSION(:), INTENT(OUT) :: boot - INTEGER, DIMENSION(:), INTENT(OUT) :: freelist - INTEGER, DIMENSION(:), INTENT(OUT) :: stab - INTEGER, DIMENSION(:), INTENT(OUT) :: shhdr - END FUNCTION h5pget_version_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pset_userblock_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_userblock_c(prp_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_USERBLOCK_C'::h5pset_userblock_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_userblock_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pget_userblock_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_userblock_c(prp_id, block_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_USERBLOCK_C'::h5pget_userblock_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(OUT) :: block_size - END FUNCTION h5pget_userblock_c - END INTERFACE - 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: - 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, EXTERNAL :: h5pset_sizes_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_sizes_c(prp_id, sizeof_addr, sizeof_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SIZES_C'::h5pset_sizes_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(IN) :: sizeof_addr - INTEGER(SIZE_T), INTENT(IN) :: sizeof_size - END FUNCTION h5pset_sizes_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pget_sizes_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_sizes_c(prp_id, sizeof_addr, sizeof_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIZES_C'::h5pget_sizes_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(OUT) :: sizeof_addr - INTEGER(SIZE_T), INTENT(OUT) :: sizeof_size - END FUNCTION h5pget_sizes_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pset_sym_k_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_sym_k_c(prp_id, ik, lk) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SYM_K_C'::h5pset_sym_k_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: ik - INTEGER, INTENT(IN) :: lk - END FUNCTION h5pset_sym_k_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pget_sym_k_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_sym_k_c(prp_id, ik, lk) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SYM_K_C'::h5pget_sym_k_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: ik - INTEGER, INTENT(OUT) :: lk - END FUNCTION h5pget_sym_k_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pset_istore_k_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_istore_k_c(prp_id, ik) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ISTORE_K_C'::h5pset_istore_k_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: ik - END FUNCTION h5pset_istore_k_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pget_istore_k_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_istore_k_c(prp_id, ik) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ISTORE_K_C'::h5pget_istore_k_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: ik - END FUNCTION h5pget_istore_k_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pget_driver_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_driver_c(prp_id, driver) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DRIVER_C'::h5pget_driver_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(OUT) :: driver - END FUNCTION h5pget_driver_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pset_fapl_stdio_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_stdio_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_STDIO_C'::h5pset_fapl_stdio_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - END FUNCTION h5pset_fapl_stdio_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pset_fapl_sec2_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_sec2_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_SEC2_C'::h5pset_fapl_sec2_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - 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: - 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, EXTERNAL :: h5pset_alignment_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_alignment_c(prp_id, threshold, alignment) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ALIGNMENT_C'::h5pset_alignment_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: threshold - INTEGER(HSIZE_T), INTENT(IN) :: alignment - END FUNCTION h5pset_alignment_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pget_alignment_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_alignment_c(prp_id, threshold, alignment) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ALIGNMENT_C'::h5pget_alignment_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(OUT) :: threshold - INTEGER(HSIZE_T), INTENT(OUT) :: alignment - END FUNCTION h5pget_alignment_c - END INTERFACE - - 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: - 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 :: backing_store_flag - -! INTEGER, EXTERNAL :: h5pset_fapl_core_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_core_c(prp_id, increment, backing_store_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_CORE_C'::h5pset_fapl_core_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(IN) :: increment - INTEGER :: backing_store_flag - END FUNCTION h5pset_fapl_core_c - END INTERFACE - backing_store_flag = 0 - IF(backing_store) backing_store_flag = 1 - 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: - 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 :: backing_store_flag - - INTERFACE - INTEGER FUNCTION h5pget_fapl_core_c(prp_id, increment, backing_store_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_CORE_C'::h5pget_fapl_core_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(OUT) :: increment - INTEGER :: backing_store_flag - END FUNCTION h5pget_fapl_core_c - END INTERFACE - - hdferr = h5pget_fapl_core_c(prp_id, increment, backing_store_flag) - backing_store =.FALSE. - 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: - 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, EXTERNAL :: h5pset_fapl_family_f -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_family_c(prp_id, memb_size, memb_plist) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_FAMILY_C'::h5pset_fapl_family_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: memb_size - INTEGER(HID_T), INTENT(IN) :: memb_plist - END FUNCTION h5pset_fapl_family_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pget_fapl_family_f -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_fapl_family_c(prp_id, memb_size, memb_plist) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_FAMILY_C'::h5pget_fapl_family_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(OUT) :: memb_size - INTEGER(HID_T), INTENT(OUT) :: memb_plist - END FUNCTION h5pget_fapl_family_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pset_cache_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CACHE_C'::h5pset_cache_c - !DEC$ENDIF - 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 - END FUNCTION h5pset_cache_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pget_cache_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_cache_c(prp_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CACHE_C'::h5pget_cache_c - !DEC$ENDIF - 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 - END FUNCTION h5pget_cache_c - END INTERFACE - - 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: - 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 :: meta_len, raw_len - -! INTEGER, EXTERNAL :: h5pset_fapl_split_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_split_c(prp_id,meta_len,meta_ext,meta_plist,raw_len,raw_ext,raw_plist) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_SPLIT_C'::h5pset_fapl_split_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: meta_ext - !DEC$ATTRIBUTES reference :: raw_ext - 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 :: meta_len, raw_len - END FUNCTION h5pset_fapl_split_c - END INTERFACE - - meta_len = LEN(meta_ext) - raw_len = LEN(raw_ext) - 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 stting 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: - 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, EXTERNAL :: h5pset_gc_references_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_gc_references_c(prp_id, gc_reference) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_GC_REFERENCES_C'::h5pset_gc_references_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: gc_reference - END FUNCTION h5pset_gc_references_c - END INTERFACE - - 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 stting 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: - 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, EXTERNAL :: h5pget_gc_references_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_gc_references_c(prp_id, gc_reference) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_GC_REFERENCES_C'::h5pget_gc_references_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: gc_reference - END FUNCTION h5pget_gc_references_c - END INTERFACE - - 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: - 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 - ! H5D_CHUNKED_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pset_layout_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_layout_c(prp_id, layout) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LAYOUT_C'::h5pset_layout_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: layout - END FUNCTION h5pset_layout_c - END INTERFACE - - 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: - 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) - ! H5D_CHUNKED_F(2) - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! INTEGER, EXTERNAL :: h5pget_layout_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_layout_c(prp_id, layout) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LAYOUT_C'::h5pget_layout_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: layout - END FUNCTION h5pget_layout_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pset_filter_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILTER_C'::h5pset_filter_c - !DEC$ENDIF - 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 - END FUNCTION h5pset_filter_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pget_nfilters_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_nfilters_c(prp_id, nfilters) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NFILTERS_C'::h5pget_nfilters_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: nfilters - END FUNCTION h5pget_nfilters_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pget_filter_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & - cd_values, namelen, name, filter_id ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILTER_C'::h5pget_filter_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - 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 - END FUNCTION h5pget_filter_c - END INTERFACE - - hdferr = h5pget_filter_c(prp_id, filter_number, flags, cd_nelmts, & - 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: - 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 :: namelen - - INTERFACE - INTEGER FUNCTION h5pset_external_c(prp_id, name,namelen, offset, bytes) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EXTERNAL_C'::h5pset_external_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(OFF_T), INTENT(IN) :: offset - INTEGER(HSIZE_T), INTENT(IN) :: bytes - END FUNCTION h5pset_external_c - END INTERFACE - - namelen = LEN(name) - 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: - 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, EXTERNAL :: h5pget_external_count_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_external_count_c(prp_id, count) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EXTERNAL_COUNT_C'::h5pget_external_count_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: count - END FUNCTION h5pget_external_count_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pget_external_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_external_c(prp_id, idx, name_size, name, offset, bytes) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EXTERNAL_C'::h5pget_external_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - 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 - END FUNCTION h5pget_external_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pset_btree_ratios_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_btree_ratios_c(prp_id, left, middle, right) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_BTREE_RATIOS_C'::h5pset_btree_ratios_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - REAL, INTENT(IN) :: left - REAL, INTENT(IN) :: middle - REAL, INTENT(IN) :: right - END FUNCTION h5pset_btree_ratios_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pget_btree_ratios_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_btree_ratios_c(prp_id, left, middle, right) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_BTREE_RATIOS_C'::h5pget_btree_ratios_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - REAL, INTENT(OUT) :: left - REAL, INTENT(OUT) :: middle - REAL, INTENT(OUT) :: right - END FUNCTION h5pget_btree_ratios_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5pget_fclose_degree_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_fclose_degree_c(fapl_id, degree) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FCLOSE_DEGREE_C'::h5pget_fclose_degree_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER, INTENT(OUT) :: degree - END FUNCTION h5pget_fclose_degree_c - END INTERFACE - - 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: - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5pset_fclose_degree_c(fapl_id, degree) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FCLOSE_DEGREE_C'::h5pset_fclose_degree_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER, INTENT(IN) :: degree - END FUNCTION h5pset_fclose_degree_c - END INTERFACE - - 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 eqaul -! -! 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: - 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 :: c_flag - - INTERFACE - INTEGER FUNCTION h5pequal_c(plist1_id, plist2_id, c_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PEQUAL_C'::h5pequal_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist1_id - INTEGER(HID_T), INTENT(IN) :: plist2_id - INTEGER, INTENT(OUT) :: c_flag - END FUNCTION h5pequal_c - END INTERFACE - - flag = .FALSE. - hdferr = h5pequal_c(plist1_id, plist2_id, c_flag) - 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: - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5pset_buffer_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_BUFFER_C'::h5pset_buffer_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_buffer_c - END INTERFACE - - 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: - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5pget_buffer_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_BUFFER_C'::h5pget_buffer_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_buffer_c - END INTERFACE - - 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: - 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 - ! H5D_FILL_VALUE_USER_DEFINED_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5pfill_value_defined_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PFILL_VALUE_DEFINED_C'::h5pfill_value_defined_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pfill_value_defined_c - END INTERFACE - - 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: - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5pset_alloc_time_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ALLOC_TIME_C'::h5pset_alloc_time_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_alloc_time_c - END INTERFACE - - 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: - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5pget_alloc_time_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ALLOC_TIME_C'::h5pget_alloc_time_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pget_alloc_time_c - END INTERFACE - - 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: - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5pset_fill_time_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_TIME_C'::h5pset_fill_time_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_fill_time_c - END INTERFACE - - 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: - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5pget_fill_time_c(plist_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_TIME_C'::h5pget_fill_time_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pget_fill_time_c - END INTERFACE - - 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 - metatdata block size -! OUTPUTS -! -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - 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 -!***** - INTERFACE - INTEGER FUNCTION h5pset_meta_block_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_META_BLOCK_SIZE_C'::h5pset_meta_block_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_meta_block_size_c - END INTERFACE - - 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 - metatdata block size -! hdferr - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! October 7, 2002 -! -! Fortran90 Interface: - 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 -!***** - INTERFACE - INTEGER FUNCTION h5pget_meta_block_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_META_BLOCK_SIZE_C'::h5pget_meta_block_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_meta_block_size_c - END INTERFACE - - 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: - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5pset_sieve_buf_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SIEVE_BUF_SIZE_C'::h5pset_sieve_buf_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(SIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_sieve_buf_size_c - END INTERFACE - - 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: - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5pget_sieve_buf_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIEVE_BUF_SIZE_C'::h5pget_sieve_buf_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(SIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_sieve_buf_size_c - END INTERFACE - - 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: - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5pset_small_data_block_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SMALL_DATA_BLOCK_SIZE_C'::h5pset_small_data_block_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_small_data_block_size_c - END INTERFACE - - 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: - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5pget_small_data_block_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SMALL_DATA_BLOCK_SIZE_C'::h5pget_small_data_block_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(HSIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_small_data_block_size_c - END INTERFACE - - 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: - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5pset_hyper_vector_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_HYPER_VECTOR_SIZE_C'::h5pset_hyper_vector_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(SIZE_T), INTENT(IN) :: size - END FUNCTION h5pset_hyper_vector_size_c - END INTERFACE - - 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: - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5pget_hyper_vector_size_c(plist_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_HYPER_VECTOR_SIZE_C'::h5pget_hyper_vector_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER(SIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_hyper_vector_size_c - END INTERFACE - - 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: - 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 :: name_len - - INTERFACE - INTEGER FUNCTION h5pexist_c(prp_id, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PEXIST_C'::h5pexist_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5pexist_c - END INTERFACE - flag = .FALSE. - name_len = LEN(name) - hdferr = h5pexist_c(prp_id, name , name_len) - IF (hdferr > 0) THEN - flag = .TRUE. - hdferr = 0 - 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: - 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 :: name_len - - INTERFACE - INTEGER FUNCTION h5pget_size_c(prp_id, name, name_len, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_SIZE_C'::h5pget_size_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(OUT) :: size - END FUNCTION h5pget_size_c - END INTERFACE - name_len = LEN(name) - 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: - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5pget_nprops_c(prp_id, nprops) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NPROPS_C'::h5pget_nprops_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(SIZE_T), INTENT(OUT) :: nprops - END FUNCTION h5pget_nprops_c - END INTERFACE - 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: - 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 retireve 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 :: name_len - - INTERFACE - INTEGER FUNCTION h5pget_class_name_c(prp_id, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_NAME_C'::h5pget_class_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(INOUT) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5pget_class_name_c - END INTERFACE - - name_len = LEN(name) - size = h5pget_class_name_c(prp_id, name, name_len) - - hdferr = 0 - IF(size.LT.0) hdferr = -1 - - END SUBROUTINE h5pget_class_name_f - -!****s* H5P/h5pget_class_parent_f -! NAME -! h5pget_class_parent_f -! -! PURPOSE -! Retrieves the parent class of a genric 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: - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5pget_class_parent_c(prp_id, parent_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_PARENT_C'::h5pget_class_parent_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(OUT) :: parent_id - END FUNCTION h5pget_class_parent_c - END INTERFACE - 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: - 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 -!***** - INTERFACE - INTEGER FUNCTION h5pisa_class_c(plist, pclass) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PISA_CLASS_C'::h5pisa_class_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist - INTEGER(HID_T), INTENT(IN) :: pclass - END FUNCTION h5pisa_class_c - END INTERFACE - flag = .FALSE. - hdferr = h5pisa_class_c(plist, pclass) - IF (hdferr .GT. 0) THEN - flag = .TRUE. - hdferr = 0 - 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: - 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 :: name_len - - INTERFACE - INTEGER FUNCTION h5pcopy_prop_c(dst_id, src_id, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCOPY_PROP_C'::h5pcopy_prop_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: dst_id - INTEGER(HID_T), INTENT(IN) :: src_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5pcopy_prop_c - END INTERFACE - name_len = LEN(name) - 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: - 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 :: name_len - - INTERFACE - INTEGER FUNCTION h5premove_c(plid, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREMOVE_C'::h5premove_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: plid - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5premove_c - END INTERFACE - name_len = LEN(name) - 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: - 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 :: name_len - - INTERFACE - INTEGER FUNCTION h5punregister_c(class, name, name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PUNREGISTER_C'::h5punregister_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - END FUNCTION h5punregister_c - END INTERFACE - name_len = LEN(name) - 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: - 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 -!***** - INTERFACE - INTEGER FUNCTION h5pclose_class_c(class) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PCLOSE_CLASS_C'::h5pclose_class_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: class - END FUNCTION h5pclose_class_c - END INTERFACE - 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: - 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, EXTERNAL :: h5pset_shuffle_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_shuffle_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHUFFLE_C'::h5pset_shuffle_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - END FUNCTION h5pset_shuffle_c - END INTERFACE - hdferr = h5pset_shuffle_c(prp_id) - - 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: - 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, EXTERNAL :: h5pset_edc_check_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_edc_check_c(prp_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EDC_CHECK_C'::h5pset_edc_check_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_edc_check_c - END INTERFACE - hdferr = h5pset_edc_check_c(prp_id, flag) - - 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: - 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, EXTERNAL :: h5pget_edc_check_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_edc_check_c(prp_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EDC_CHECK_C'::h5pget_edc_check_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pget_edc_check_c - END INTERFACE - hdferr = h5pget_edc_check_c(prp_id, flag) - - 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: - 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, EXTERNAL :: h5pset_fletcher32_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fletcher32_c(prp_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FLETCHER32_C'::h5pset_fletcher32_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - END FUNCTION h5pset_fletcher32_c - END INTERFACE - hdferr = h5pset_fletcher32_c(prp_id) - - 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: - 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, EXTERNAL :: h5pset_family_offset_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_family_offset_c(prp_id, offset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAMILY_OFFSET_C'::h5pset_family_offset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HSIZE_T), INTENT(IN) :: offset - END FUNCTION h5pset_family_offset_c - END INTERFACE - hdferr = h5pset_family_offset_c(prp_id, offset) - - 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: - 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 -!***** - INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm - INTEGER :: maxlen - INTEGER :: flag = 0 - INTEGER :: i - - INTERFACE - INTEGER FUNCTION h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, & - maxlen, memb_addr, flag) - USE H5GLOBAL - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_C'::h5pset_fapl_multi_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: memb_name - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - 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 - INTEGER, DIMENSION(*) :: lenm - INTEGER :: maxlen - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_fapl_multi_c - END INTERFACE - - maxlen = LEN(memb_name(1)) - DO i=1, H5FD_MEM_NTYPES_F - lenm(i) = LEN_TRIM(memb_name(i)) - ENDDO - IF(relax) flag = 1 - 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: - SUBROUTINE h5pset_fapl_multi_s(prp_id, relax, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - LOGICAL, INTENT(IN) :: relax - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - INTEGER :: flag - -! INTEGER, EXTERNAL :: h5pset_fapl_multi_sc -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_multi_sc(prp_id,flag) - USE H5GLOBAL - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_SC'::h5pset_fapl_multi_sc - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, INTENT(IN) :: flag - END FUNCTION h5pset_fapl_multi_sc - END INTERFACE - flag = 0 - IF (relax) flag = 1 - 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: - 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, 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, 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) - USE H5GLOBAL - IMPLICIT NONE - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_MULTI_C'::h5pget_fapl_multi_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: memb_name - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - 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, DIMENSION(*) :: lenm - INTEGER :: maxlen - INTEGER :: c_maxlen_out - INTEGER, INTENT(OUT) :: flag - END FUNCTION h5pget_fapl_multi_c - END INTERFACE - - maxlen = LEN(memb_name(1)) - DO i=1, H5FD_MEM_NTYPES_F - lenm(i) = LEN_TRIM(memb_name(i)) - ENDDO - hdferr = h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag, c_maxlen_out) - - relax = .TRUE. - 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: - 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 - ! 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, EXTERNAL :: h5pset_szip_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_szip_c(prp_id, options_mask, pixels_per_block) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SZIP_C'::h5pset_szip_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, INTENT(IN) :: options_mask - INTEGER, INTENT(IN) :: pixels_per_block - END FUNCTION h5pset_szip_c - END INTERFACE - hdferr = h5pset_szip_c(prp_id, options_mask, pixels_per_block) - - 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: - 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 :: status - -! INTEGER, EXTERNAL :: h5pall_filters_avail_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pall_filters_avail_c(prp_id, status) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PALL_FILTERS_AVAIL_C'::h5pall_filters_avail_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier - INTEGER, INTENT(OUT) :: status - END FUNCTION h5pall_filters_avail_c - END INTERFACE - flag = .TRUE. - hdferr = h5pall_filters_avail_c(prp_id, status) - IF (status .EQ. 0 ) flag = .FALSE. - - 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: - 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, EXTERNAL :: h5pget_filter_by_id_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & - cd_values, namelen, name) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILTER_BY_ID_C'::h5pget_filter_by_id_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter_id - 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 - END FUNCTION h5pget_filter_by_id_c - END INTERFACE - - hdferr = h5pget_filter_by_id_c(prp_id, filter_id, flags, cd_nelmts, & - 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: - 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, EXTERNAL :: h5pmodify_filter_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pmodify_filter_c(prp_id, filter, flags, cd_nelmts, cd_values) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PMODIFY_FILTER_C'::h5pmodify_filter_c - !DEC$ENDIF - 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 - END FUNCTION h5pmodify_filter_c - END INTERFACE - - 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: - 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, EXTERNAL :: h5premove_filter_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5premove_filter_c(prp_id, filter) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREMOVE_FILTER_C'::h5premove_filter_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER, INTENT(IN) :: filter - END FUNCTION h5premove_filter_c - END INTERFACE - - 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: - 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 -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_attr_phase_change_c(ocpl_id, max_compact, min_dense) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ATTR_PHASE_CHANGE_C'::h5pget_attr_phase_change_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocpl_id - INTEGER, INTENT(OUT) :: max_compact - INTEGER, INTENT(OUT) :: min_dense - - END FUNCTION h5pget_attr_phase_change_c - END INTERFACE - - 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: - 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 -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION H5Pset_attr_creation_order_c(ocpl_id, crt_order_flags) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ATTR_CREATION_ORDER_C'::h5pset_attr_creation_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocpl_id - INTEGER, INTENT(IN) :: crt_order_flags - - END FUNCTION H5Pset_attr_creation_order_c - END INTERFACE - - 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: - 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 -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_shared_mesg_nindexes_c(plist_id, nindexes) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHARED_MESG_NINDEXES_C'::h5pset_shared_mesg_nindexes_c - !DEC$ENDIF - - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: nindexes - - END FUNCTION H5pset_shared_mesg_nindexes_c - END INTERFACE - - hdferr = h5pset_shared_mesg_nindexes_c(plist_id, nindexes) - - 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: - 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 -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SHARED_MESG_INDEX_C'::h5pset_shared_mesg_index_c - !DEC$ENDIF - - INTEGER(HID_T), INTENT(IN) :: fcpl_id - INTEGER, INTENT(IN) :: index_num - INTEGER, INTENT(IN) :: mesg_type_flags - INTEGER, INTENT(IN) :: min_mesg_size - - END FUNCTION H5pset_shared_mesg_index_c - END INTERFACE - - hdferr = h5pset_shared_mesg_index_c(fcpl_id, index_num, mesg_type_flags, min_mesg_size) - - 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: - 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 -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_ATTR_CREATION_ORDER_C'::h5pget_attr_creation_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocpl_id - INTEGER, INTENT(OUT) :: crt_order_flags - - END FUNCTION H5pget_attr_creation_order_c - END INTERFACE - - hdferr = h5pget_attr_creation_order_c(ocpl_id, crt_order_flags) - - END SUBROUTINE h5pget_attr_creation_order_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: - 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. - ! Currently, low must be one of two pre-defined values: - ! HDF_LIBVER_EARLIEST_F - ! HDF_LIBVER_LATEST_F - INTEGER, INTENT(IN) :: high ! The latest version of the library that will be used for writing objects. - ! Currently, low must set to the pre-defined value: - ! HDF_LIBVER_LATEST_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_libver_bounds_c(fapl_id, low, high) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LIBVER_BOUNDS_C'::h5pset_libver_bounds_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER, INTENT(IN) :: low - INTEGER, INTENT(IN) :: high - - END FUNCTION H5pset_libver_bounds_c - END INTERFACE - - hdferr = h5pset_libver_bounds_c(fapl_id, low, high) - - 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: - 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 -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_link_creation_order_c(gcpl_id, crt_order_flags) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LINK_CREATION_ORDER_C'::h5pset_link_creation_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(IN) :: crt_order_flags - - END FUNCTION H5pset_link_creation_order_c - END INTERFACE - - hdferr = h5pset_link_creation_order_c(gcpl_id, crt_order_flags) - - 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: - 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 -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_link_phase_change_c(gcpl_id, max_compact, min_dense) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LINK_PHASE_CHANGE_C'::h5pget_link_phase_change_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(OUT) :: max_compact - INTEGER, INTENT(OUT) :: min_dense - - END FUNCTION h5pget_link_phase_change_c - END INTERFACE - - 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: - 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 :: status -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_obj_track_times_c(plist_id, status) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_OBJ_TRACK_TIMES_C'::h5pget_obj_track_times_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier - INTEGER, INTENT(OUT) :: status - END FUNCTION h5pget_obj_track_times_c - END INTERFACE - flag = .TRUE. - hdferr = h5pget_obj_track_times_c(plist_id, status) - IF(status.EQ.0) flag = .FALSE. - - 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: - 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 :: status -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_obj_track_times_c(plist_id, status) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_OBJ_TRACK_TIMES_C'::h5pset_obj_track_times_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id ! File creation property list identifier - INTEGER, INTENT(IN) :: status - END FUNCTION h5pset_obj_track_times_c - END INTERFACE - - status = 0 - IF(flag) status = 1 - - hdferr = h5pset_obj_track_times_c(plist_id, status) - - 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: - 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 -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CREATE_INTER_GROUP_C'::h5pset_create_inter_group_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: lcpl_id - INTEGER, INTENT(IN) :: crt_intermed_group - END FUNCTION h5pset_create_inter_group_c - END INTERFACE - - hdferr = h5pset_create_inter_group_c(lcpl_id, crt_intermed_group) - - 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: - 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 -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_link_creation_order_c(gcpl_id, crt_order_flags) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LINK_CREATION_ORDER_C'::h5pget_link_creation_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(OUT) :: crt_order_flags - - END FUNCTION H5pget_link_creation_order_c - END INTERFACE - - hdferr = h5pget_link_creation_order_c(gcpl_id, crt_order_flags) - - 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: - 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 -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_char_encoding_c(plist_id, encoding) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHAR_ENCODING_C'::h5pset_char_encoding_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: encoding - - END FUNCTION H5pset_char_encoding_c - END INTERFACE - - hdferr = h5pset_char_encoding_c(plist_id, encoding) - - 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: - SUBROUTINE h5pget_char_encoding_f(plist_id, encoding, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: plist_id ! Property list identifier - - 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 -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_char_encoding_c(plist_id, encoding) - - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHAR_ENCODING_C'::h5pget_char_encoding_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(OUT) :: encoding - - END FUNCTION H5pget_char_encoding_c - END INTERFACE - - hdferr = h5pget_char_encoding_c(plist_id, encoding) - - 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: - 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 - ! H5O_COPY_EXPAND_REFERENCE_F - ! H5O_COPY_WITHOUT_ATTR_FLAG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_copy_object_c(ocp_plist_id, copy_options) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_COPY_OBJECT_C'::h5pset_copy_object_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocp_plist_id - INTEGER, INTENT(IN) :: copy_options - END FUNCTION h5pset_copy_object_c - END INTERFACE - 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: - 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 - ! H5O_COPY_EXPAND_REFERENCE_F - ! H5O_COPY_WITHOUT_ATTR_FLAG_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_copy_object_c(ocp_plist_id, copy_options) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_COPY_OBJECT_C'::h5pget_copy_object_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocp_plist_id - INTEGER, INTENT(OUT) :: copy_options - END FUNCTION h5pget_copy_object_c - END INTERFACE - 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 lenght 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 arguement for the size? -! Fortran90 Interface: -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 :: expression_len - INTEGER(SIZE_T) :: size_default - - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_data_transform_c(plist_id, expression, expression_len, size_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DATA_TRANSFORM_C'::h5pget_data_transform_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: expression - INTEGER(HID_T), INTENT(IN) :: plist_id - CHARACTER(LEN=*), INTENT(OUT) :: expression - INTEGER(SIZE_T) :: size_default - INTEGER :: expression_len - END FUNCTION h5pget_data_transform_c - END INTERFACE - - size_default = 0 - expression_len = LEN(expression) - - hdferr = h5pget_data_transform_c(plist_id, expression, expression_len, size_default) - - IF(present(size)) size = size_default - - 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: - 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 :: expression_len - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_data_transform_c(plist_id, expression, expression_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DATA_TRANSFORM_C'::h5pset_data_transform_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: expression - INTEGER(HID_T), INTENT(IN) :: plist_id - CHARACTER(LEN=*), INTENT(IN) :: expression - INTEGER :: expression_len - END FUNCTION h5pset_data_transform_c - END INTERFACE - - expression_len = LEN(expression) - hdferr = h5pset_data_transform_c(plist_id, expression, expression_len) - - 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: - 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 -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_local_heap_size_hint_c(gcpl_id, size_hint) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_LOCAL_HEAP_SIZE_HINT_C'::h5pget_local_heap_size_hint_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER(SIZE_T), INTENT(OUT) :: size_hint - END FUNCTION H5Pget_local_heap_size_hint_c - END INTERFACE - - hdferr = H5Pget_local_heap_size_hint_c(gcpl_id, size_hint) - - 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: - 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 -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_EST_LINK_INFO_C'::h5pget_est_link_info_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(OUT) :: est_num_entries - INTEGER, INTENT(OUT) :: est_name_len - END FUNCTION h5pget_est_link_info_c - END INTERFACE - - hdferr = h5pget_est_link_info_c(gcpl_id, est_num_entries, est_name_len) - - 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: - 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 -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_local_heap_size_hint_c(gcpl_id, size_hint) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LOCAL_HEAP_SIZE_HINT_C'::h5pset_local_heap_size_hint_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER(SIZE_T), INTENT(IN) :: size_hint - END FUNCTION h5pset_local_heap_size_hint_c - END INTERFACE - - hdferr = H5Pset_local_heap_size_hint_c(gcpl_id, size_hint) - - 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: - 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 -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_EST_LINK_INFO_C'::h5pset_est_link_info_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(IN) :: est_num_entries - INTEGER, INTENT(IN) :: est_name_len - END FUNCTION h5pset_est_link_info_c - END INTERFACE - - hdferr = H5Pset_est_link_info_c(gcpl_id, est_num_entries, est_name_len) - - 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: -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 -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_link_phase_change_c(gcpl_id, max_compact, min_dense) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_LINK_PHASE_CHANGE_C'::h5pset_link_phase_change_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: gcpl_id - INTEGER, INTENT(IN) :: max_compact - INTEGER, INTENT(IN) :: min_dense - - END FUNCTION h5pset_link_phase_change_c - END INTERFACE - - 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: -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 -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_DIRECT_C'::h5pset_fapl_direct_c - !DEC$ENDIF - 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 - END FUNCTION h5pset_fapl_direct_c - END INTERFACE - - 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: - 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 -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_fapl_direct_c(fapl_id, alignment, block_size, cbuf_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_DIRECT_C'::h5pget_fapl_direct_c - !DEC$ENDIF - 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 - END FUNCTION h5pget_fapl_direct_c - 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: -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 -!***** -! -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_attr_phase_change_c(ocpl_id, max_compact, min_dense) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_ATTR_PHASE_CHANGE_C'::h5pset_attr_phase_change_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: ocpl_id - INTEGER, INTENT(IN) :: max_compact - INTEGER, INTENT(IN) :: min_dense - - END FUNCTION h5pset_attr_phase_change_c - END INTERFACE - - 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: - 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) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_NBIT_C'::h5pset_nbit_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - END FUNCTION H5Pset_nbit_c - END INTERFACE - - hdferr = H5Pset_nbit_c(plist_id) - - 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: - 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) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_SCALEOFFSET_C'::h5pset_scaleoffset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: plist_id - INTEGER, INTENT(IN) :: scale_type - INTEGER, INTENT(IN) :: scale_factor - END FUNCTION h5pset_scaleoffset_c - END INTERFACE - - hdferr = H5Pset_scaleoffset_c(plist_id, scale_type, scale_factor) - - 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: - 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 -!***** - -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pset_nlinks_c(lapl_id, nlinks) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_NLINKS_C'::h5pset_nlinks_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: lapl_id - INTEGER(SIZE_T), INTENT(IN) :: nlinks - END FUNCTION h5pset_nlinks_c - END INTERFACE - - hdferr = h5pset_nlinks_c(lapl_id, nlinks) - - 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: - 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 -!***** -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5pget_nlinks_c(lapl_id, nlinks) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_NLINKS_C'::h5pget_nlinks_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: lapl_id - INTEGER(SIZE_T), INTENT(OUT) :: nlinks - END FUNCTION h5pget_nlinks_c - END INTERFACE - - hdferr = h5pget_nlinks_c(lapl_id, nlinks) - - 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: - 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 -!***** - INTERFACE - INTEGER FUNCTION h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CREATE_INTER_GROUP_C'::h5pget_create_inter_group_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: lcpl_id - INTEGER, INTENT(IN) :: crt_intermed_group - END FUNCTION h5pget_create_inter_group_c - END INTERFACE - - hdferr = h5pget_create_inter_group_c(lcpl_id, crt_intermed_group) - - 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: - 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 -!***** - - INTERFACE - INTEGER FUNCTION h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_CHUNK_CACHE_C'::h5pset_chunk_cache_c - !DEC$ENDIF - 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 - END FUNCTION h5pset_chunk_cache_c - END INTERFACE - - hdferr = h5pset_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) - - 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: - 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 -!***** - INTERFACE - INTEGER FUNCTION h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CHUNK_CACHE_C'::h5pget_chunk_cache_c - !DEC$ENDIF - 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 - END FUNCTION h5pget_chunk_cache_c - END INTERFACE - - hdferr = h5pget_chunk_cache_c(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0) - - 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 -!***** - - - SUBROUTINE h5pset_fill_value_integer(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - 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) - USE, INTRINSIC :: ISO_C_BINDING - 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 - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pget_fill_value_integer - - - SUBROUTINE h5pset_fill_value_real(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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) - REAL, INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pset_fill_value_real - - - SUBROUTINE h5pget_fill_value_real(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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) - REAL, INTENT(OUT), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pget_fill_value_real - - SUBROUTINE h5pset_fill_value_char(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(IN), TARGET :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - TYPE(C_PTR) :: f_ptr ! C address - - f_ptr = C_LOC(fillvalue) - - hdferr = h5pset_fill_value_c(prp_id, type_id, f_ptr) - - END SUBROUTINE h5pset_fill_value_char - - SUBROUTINE h5pget_fill_value_char(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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, INTENT(OUT) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(C_PTR) :: f_ptr ! C address - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(fillvalue) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - f_ptr = C_LOC(chr(1)(1:1)) - - hdferr = h5pget_fill_value_c(prp_id, type_id, f_ptr) - - DO i = 1, chr_len - fillvalue(i:i) = chr(i) - 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) - USE, INTRINSIC :: ISO_C_BINDING - 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) , INTENT(OUT) :: fillvalue -!! INTEGER , INTENT(OUT) :: hdferr -!***** - - SUBROUTINE h5pget_fill_value_ptr(prp_id, type_id, fillvalue, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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(OUT) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - 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) - USE, INTRINSIC :: ISO_C_BINDING - 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 :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - END SUBROUTINE h5pset_integer - - SUBROUTINE h5pset_real(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - END SUBROUTINE h5pset_real - - SUBROUTINE h5pset_char(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(C_PTR) :: f_ptr - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - DO i = 1, chr_len - chr(i) = value(i:i) - ENDDO - - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - 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 -!***** - - SUBROUTINE h5pget_integer(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - END SUBROUTINE h5pget_integer - - SUBROUTINE h5pget_real(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Name of property to modify - REAL, INTENT(OUT), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - END SUBROUTINE h5pget_real - - SUBROUTINE h5pget_char(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - TYPE(C_PTR) :: f_ptr - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pget_c(prp_id, name, name_len, f_ptr) - - DO i = 1, chr_len - value(i:i) = chr(i) - ENDDO - - DEALLOCATE(chr) - - 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 -!***** - SUBROUTINE h5pset_ptr(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 :: 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 -!***** - SUBROUTINE h5pget_ptr(prp_id, name, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 :: 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) - USE, INTRINSIC :: ISO_C_BINDING - 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 :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, f_ptr) - - END SUBROUTINE h5pregister_integer - - SUBROUTINE h5pregister_real(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 - REAL, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(value) - - name_len = LEN(name) - hdferr = h5pregister_c(class, name, name_len, size, f_ptr) - - END SUBROUTINE h5pregister_real - - SUBROUTINE h5pregister_char(class, name, size, value, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(C_PTR) :: f_ptr - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - DO i = 1, chr_len - chr(i) = value(i:i) - ENDDO - - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - 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) - USE, INTRINSIC :: ISO_C_BINDING - 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 :: 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) - USE iso_c_binding - 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 :: name_len - TYPE(c_ptr) :: f_ptr - - f_ptr = c_loc(value) - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - END SUBROUTINE h5pinsert_integer - - SUBROUTINE h5pinsert_real(plist, name, size, value, hdferr) - USE iso_c_binding - 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 - REAL, INTENT(IN), TARGET :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: name_len - TYPE(c_ptr) :: f_ptr - - f_ptr = c_loc(value) - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - - END SUBROUTINE h5pinsert_real - - SUBROUTINE h5pinsert_char(plist, name, size, value, hdferr) - USE iso_c_binding - 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 :: name_len - - INTEGER :: i - CHARACTER(LEN=1), ALLOCATABLE, DIMENSION(:), TARGET :: chr - INTEGER :: chr_len - - TYPE(c_ptr) :: f_ptr - ! To resolve Issue #1 outlined in the preamble of this file we - ! need to pack the character string into an array. - - chr_len = LEN(value) - ALLOCATE(chr(1:chr_len), STAT=hdferr) - IF (hdferr .NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - - DO i = 1, chr_len - chr(i) = value(i:i) - ENDDO - - f_ptr = C_LOC(chr(1)(1:1)) - - name_len = LEN(name) - hdferr = h5pinsert_c(plist, name , name_len, size, f_ptr) - - DEALLOCATE(chr) - - 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) - USE iso_c_binding - 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 :: 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: - SUBROUTINE h5pcreate_class_f(parent, name, class, hdferr, create, create_data, copy, copy_data, close, close_data) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: parent - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(HID_T) , INTENT(OUT) :: class - 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 - INTERFACE - INTEGER FUNCTION h5pcreate_class_c(parent, name, name_len, class, & - create, create_data, copy, copy_data, close, close_data) & - BIND(C, NAME='h5pcreate_class_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr, c_funptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: parent - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(HID_T), INTENT(OUT) :: class - TYPE(C_PTR), VALUE :: create_data, copy_data, close_data - TYPE(C_FUNPTR), VALUE :: create, copy, close - END FUNCTION h5pcreate_class_c - END INTERFACE - name_len = LEN(name) - - create_default = c_null_funptr !fix:scot - create_data_default = c_null_ptr - copy_default = c_null_funptr !fix:scot - copy_data_default = c_null_ptr - close_default = c_null_funptr !fix:scot - close_data_default = c_null_ptr - - IF(PRESENT(create)) create_default = create - IF(PRESENT(create_data)) create_data_default = create_data - IF(PRESENT(copy)) copy_default = copy - IF(PRESENT(copy_data)) copy_data_default = copy_data - IF(PRESENT(close)) close_default = close - IF(PRESENT(close_data)) close_data_default = close_data - - hdferr = h5pcreate_class_c(parent, name , name_len, class, & - create_default, create_data_default, & - copy_default, copy_data_default, & - close_default, close_data_default) - - 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: - SUBROUTINE h5pset_file_image_f(fapl_id, buf_ptr, buf_len, hdferr) - USE iso_c_binding - 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') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: fapl_id - TYPE(C_PTR), VALUE :: buf_ptr - INTEGER(SIZE_T), INTENT(IN) :: buf_len - END FUNCTION h5pset_file_image_c - END INTERFACE - - 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: - SUBROUTINE h5pget_file_image_f(fapl_id, buf_ptr, buf_len_ptr, hdferr) - USE iso_c_binding - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: fapl_id - TYPE(C_PTR) , INTENT(OUT), DIMENSION(*) :: buf_ptr - 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') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: fapl_id - TYPE(C_PTR), DIMENSION(*), INTENT(OUT) :: buf_ptr - INTEGER(SIZE_T), INTENT(OUT) :: buf_len_ptr - END FUNCTION h5pget_file_image_c - END INTERFACE - - hdferr = h5pget_file_image_c(fapl_id, buf_ptr, buf_len_ptr) - - END SUBROUTINE h5pget_file_image_f - -END MODULE H5P - - - diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c index 068f24e..271bfee 100644 --- a/fortran/src/H5Rf.c +++ b/fortran/src/H5Rf.c @@ -43,7 +43,7 @@ * SOURCE */ int_f -nh5rcreate_object_c(haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen) +h5rcreate_object_c(haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen) /******/ { char *c_name = NULL; @@ -69,7 +69,7 @@ done: if(c_name) HDfree(c_name); return ret_value; -} /* nh5rcreate_object_c() */ +} /* h5rcreate_object_c() */ /****if* H5Rf/h5rcreate_region_c * NAME @@ -94,7 +94,7 @@ done: * SOURCE */ int_f -nh5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id) +h5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id) /******/ { char *c_name = NULL; @@ -120,7 +120,7 @@ done: if(c_name) HDfree(c_name); return ret_value; -} /* end nh5rcreate_region_c() */ +} /* end h5rcreate_region_c() */ /****if* H5Rf/h5rcreate_ptr_c * NAME @@ -185,7 +185,7 @@ h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *r * SOURCE */ int_f -nh5rdereference_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id) +h5rdereference_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id) /******/ { hdset_reg_ref_t ref_c; @@ -206,7 +206,7 @@ nh5rdereference_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id) done: return ret_value; -} /* end nh5rdereference_region_c() */ +} /* end h5rdereference_region_c() */ /****if* H5Rf/h5rdereference_object_c * NAME @@ -228,7 +228,7 @@ done: * SOURCE */ int_f -nh5rdereference_object_c(hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id) +h5rdereference_object_c(hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id) /******/ { hid_t c_obj_id; @@ -246,7 +246,7 @@ nh5rdereference_object_c(hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id) done: return ret_value; -} /* end nh5rdereference_object_c() */ +} /* end h5rdereference_object_c() */ /****if* H5Rf/h5rdereference_ptr_c * NAME @@ -306,7 +306,7 @@ h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_ * SOURCE */ int_f -nh5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id) +h5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id) /******/ { hid_t c_space_id; @@ -327,7 +327,7 @@ nh5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id) done: return ret_value; -} /* end nh5rget_region_region_c() */ +} /* end h5rget_region_region_c() */ /****if* H5Rf/h5rget_region_ptr_c * NAME @@ -366,7 +366,7 @@ h5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id) done: return ret_value; -} /* end nh5rget_region_ptr_c() */ +} /* end h5rget_region_ptr_c() */ /****if* H5Rf/h5rget_object_type_obj_c @@ -390,7 +390,7 @@ done: * SOURCE */ int_f -nh5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type) +h5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type) /******/ { H5O_type_t c_obj_type; @@ -408,7 +408,7 @@ nh5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type) done: return ret_value; -} /* end nh5rget_object_type_obj_c() */ +} /* end h5rget_object_type_obj_c() */ /****if* H5Rf/h5rget_name_object_c * NAME @@ -434,7 +434,7 @@ done: * SOURCE */ int_f -nh5rget_name_object_c(hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default) +h5rget_name_object_c(hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default) /******/ { hobj_ref_t ref_c = (hobj_ref_t)*ref; @@ -466,7 +466,7 @@ done: if(c_buf) HDfree(c_buf); return ret_value; -} /* end nh5rget_name_object_c() */ +} /* end h5rget_name_object_c() */ /****if* H5Rf/h5rget_name_region_c * NAME @@ -492,7 +492,7 @@ done: * SOURCE */ int_f -nh5rget_name_region_c(hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default) +h5rget_name_region_c(hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default) /******/ { hdset_reg_ref_t ref_c; diff --git a/fortran/src/H5Rff.F90 b/fortran/src/H5Rff.F90 new file mode 100644 index 0000000..69455c8 --- /dev/null +++ b/fortran/src/H5Rff.F90 @@ -0,0 +1,779 @@ +!****h* ROBODoc/H5R +! +! NAME +! MODULE H5R +! +! FILE +! fortran/src/H5Rff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5R functions. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! NOTES +! *** IMPORTANT *** +! If you add a new H5R 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. +! +!***** + +MODULE H5R + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING + + ! If you change the value of these parameters, do not forget to change corresponding + ! values in the H5f90.h file. + ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 + ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + ! + ! TYPE hobj_ref_t_f + ! INTEGER ref(REF_OBJ_BUF_LEN) + ! END TYPE + ! + ! TYPE hdset_reg_ref_t_f + ! INTEGER ref(REF_REG_BUF_LEN) + ! END TYPE + ! + + INTERFACE h5rget_object_type_f + + MODULE PROCEDURE h5rget_object_type_obj_f + + END INTERFACE + + TYPE :: hdset_reg_ref_t_f03 + 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 + + MODULE PROCEDURE h5rget_region_region_f ! obsolete + MODULE PROCEDURE h5rget_region_ptr_f ! F2003 + + END INTERFACE + + + INTERFACE h5rcreate_f + + 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_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_object_f ! obsolete + MODULE PROCEDURE h5rget_name_region_f ! obsolete + MODULE PROCEDURE h5rget_name_ptr_f ! F2003 + + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) & + BIND(C, NAME='h5rget_name_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN), VALUE :: ref + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER(SIZE_T) :: name_len + INTEGER(SIZE_T) :: size_default + END FUNCTION h5rget_name_ptr_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) & + BIND(C, NAME='h5rdereference_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: obj_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN), VALUE :: ref + INTEGER(HID_T), INTENT(OUT) :: ref_obj_id + END FUNCTION h5rdereference_ptr_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id) & + BIND(C, NAME='h5rcreate_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr + USE H5GLOBAL + TYPE(C_PTR), VALUE :: ref + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER, INTENT(IN) :: ref_type + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5rcreate_ptr_c + END INTERFACE + + INTERFACE + INTEGER FUNCTION h5rget_region_ptr_c(dset_id, ref, space_id) & + BIND(C, NAME='h5rget_region_ptr_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: dset_id + TYPE(C_PTR), VALUE :: ref + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5rget_region_ptr_c + END INTERFACE + + +CONTAINS + +!****s* H5R/h5rget_object_type_obj_f +! +! NAME +! h5rget_object_type_obj_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_obj_f(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(HADDR_T) :: ref_f ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rget_object_type_obj_c(dset_id, ref_f, obj_type) BIND(C, NAME='h5rget_object_type_obj_c') + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HADDR_T) :: ref_f + INTEGER, INTENT(OUT) :: obj_type + END FUNCTION h5rget_object_type_obj_c + END INTERFACE + + ref_f = ref%ref + hdferr = h5rget_object_type_obj_c(dset_id, ref_f, obj_type ) + + END SUBROUTINE h5rget_object_type_obj_f + + +!****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 :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rget_region_region_c(dset_id, ref_f, space_id) BIND(C, NAME='h5rget_region_region_c') + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER :: ref_f(REF_REG_BUF_LEN) + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5rget_region_region_c + END INTERFACE + + ref_f = ref%ref + 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) + 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 +!***** + + hdferr = h5rget_region_ptr_c(dset_id, ref, space_id ) + + 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: + SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 :: namelen ! Name length + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + + namelen = LEN(name) + + 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 + 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 :: namelen ! Name length + INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference + + INTERFACE + INTEGER FUNCTION h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id) BIND(C,NAME='h5rcreate_region_c') + USE H5GLOBAL + IMPORT :: C_CHAR + IMPLICIT NONE + INTEGER :: ref_f(REF_REG_BUF_LEN) + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5rcreate_region_c + END INTERFACE + + namelen = LEN(name) + ref_f = 0 + hdferr = h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id ) + ref%ref = ref_f + + 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) + USE, INTRINSIC :: ISO_C_BINDING + 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 :: namelen ! Name length + INTEGER(HID_T) :: space_id_c + + namelen = LEN(name) + space_id_c = -1 + IF(PRESENT(space_id)) space_id_c = space_id + hdferr = h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id_c) + + 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: + SUBROUTINE h5rdereference_object_f(obj_id, ref, ref_obj_id, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 +!***** + 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 teh 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: + SUBROUTINE h5rdereference_region_f(obj_id, ref, ref_obj_id, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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 +!***** + TYPE(C_PTR) :: f_ptr + + f_ptr = C_LOC(ref) + hdferr = h5rdereference_ptr_c(obj_id, 1, f_ptr, ref_obj_id) + + 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: + SUBROUTINE h5rdereference_ptr_f(obj_id, ref_type, ref, ref_obj_id, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + 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(OUT) :: ref_obj_id + ! Identifier of referenced object + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + 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: + SUBROUTINE h5rget_name_object_f(loc_id, ref, name, hdferr, size) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref + 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 + + f_ptr = C_LOC(ref) + + name_len=LEN(name) + + hdferr = h5rget_name_ptr_c(loc_id, 0, f_ptr, name, name_len, size_default) + + 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: + SUBROUTINE h5rget_name_region_f(loc_id, ref, name, hdferr, size) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref + 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 + + f_ptr = C_LOC(ref) + + name_len=LEN(name) + + hdferr = h5rget_name_ptr_c(loc_id, 1, f_ptr, name, name_len, size_default) + + IF(PRESENT(size)) size = size_default + + 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) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), INTENT(IN) :: ref + 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 + + name_len=LEN(name) + + hdferr = h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) + + IF(PRESENT(size)) size = size_default + + 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: + SUBROUTINE h5rget_obj_type_f(loc_id, ref_type, ref, obj_type, hdferr) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: ref_type + 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) & + BIND(C, NAME='h5rget_obj_type_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER, INTENT(IN) :: ref_type + TYPE(C_PTR), VALUE :: ref + INTEGER :: obj_type + END FUNCTION h5rget_obj_type_c + END INTERFACE + + hdferr = h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) + + END SUBROUTINE h5rget_obj_type_f + +END MODULE H5R diff --git a/fortran/src/H5Rff.f90 b/fortran/src/H5Rff.f90 deleted file mode 100644 index 1605707..0000000 --- a/fortran/src/H5Rff.f90 +++ /dev/null @@ -1,791 +0,0 @@ -!****h* ROBODoc/H5R -! -! NAME -! MODULE H5R -! -! FILE -! fortran/src/H5Rff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5R functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! NOTES -! *** IMPORTANT *** -! If you add a new H5R 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. -! -!***** - -MODULE H5R - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING - - ! If you change the value of these parameters, do not forget to change corresponding - ! values in the H5f90.h file. - ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - ! - ! TYPE hobj_ref_t_f - ! INTEGER ref(REF_OBJ_BUF_LEN) - ! END TYPE - ! - ! TYPE hdset_reg_ref_t_f - ! INTEGER ref(REF_REG_BUF_LEN) - ! END TYPE - ! - INTERFACE h5rget_object_type_f - - MODULE PROCEDURE h5rget_object_type_obj_f - - END INTERFACE - - TYPE :: hdset_reg_ref_t_f03 - 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 - - MODULE PROCEDURE h5rget_region_region_f ! obsolete - MODULE PROCEDURE h5rget_region_ptr_f ! F2003 - - END INTERFACE - - - INTERFACE h5rcreate_f - - 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_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_object_f ! obsolete - MODULE PROCEDURE h5rget_name_region_f ! obsolete - MODULE PROCEDURE h5rget_name_ptr_f ! F2003 - - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) & - BIND(C, NAME='h5rget_name_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN), VALUE :: ref - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER(SIZE_T) :: name_len - INTEGER(SIZE_T) :: size_default - END FUNCTION h5rget_name_ptr_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rdereference_ptr_c(obj_id, ref_type, ref, ref_obj_id) & - BIND(C, NAME='h5rdereference_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: obj_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN), VALUE :: ref - INTEGER(HID_T), INTENT(OUT) :: ref_obj_id - END FUNCTION h5rdereference_ptr_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id) & - BIND(C, NAME='h5rcreate_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char, c_ptr - USE H5GLOBAL - TYPE(C_PTR), VALUE :: ref - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER, INTENT(IN) :: ref_type - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5rcreate_ptr_c - END INTERFACE - - INTERFACE - INTEGER FUNCTION h5rget_region_ptr_c(dset_id, ref, space_id) & - BIND(C, NAME='h5rget_region_ptr_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: dset_id - TYPE(C_PTR), VALUE :: ref - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5rget_region_ptr_c - END INTERFACE - - -CONTAINS - -!****s* H5R/h5rget_object_type_obj_f -! -! NAME -! h5rget_object_type_obj_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_obj_f(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(HADDR_T) :: ref_f ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rget_object_type_obj_c(dset_id, ref_f, obj_type) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_OBJECT_TYPE_OBJ_C':: h5rget_object_type_obj_c - !DEC$ENDIF - ! INTEGER, PARAMETER :: REF_OBJ_BUF_LEN = 2 - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HADDR_T) :: ref_f - INTEGER, INTENT(OUT) :: obj_type - END FUNCTION h5rget_object_type_obj_c - END INTERFACE - - ref_f = ref%ref - hdferr = h5rget_object_type_obj_c(dset_id, ref_f, obj_type ) - - END SUBROUTINE h5rget_object_type_obj_f - - -!****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 :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rget_region_region_c(dset_id, ref_f, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RGET_REGION_REGION_C':: h5rget_region_region_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5rget_region_region_c - END INTERFACE - - ref_f = ref%ref - 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) - 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 -!***** - - hdferr = h5rget_region_ptr_c(dset_id, ref, space_id ) - - 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: - SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 :: namelen ! Name length - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - - namelen = LEN(name) - - 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 - 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 :: namelen ! Name length - INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference - - INTERFACE - INTEGER FUNCTION h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5RCREATE_REGION_C':: h5rcreate_region_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - ! INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - INTEGER :: ref_f(REF_REG_BUF_LEN) - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5rcreate_region_c - END INTERFACE - - namelen = LEN(name) - ref_f = 0 - hdferr = h5rcreate_region_c(ref_f, loc_id, name, namelen, space_id ) - ref%ref = ref_f - - 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) - USE, INTRINSIC :: ISO_C_BINDING - 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 :: namelen ! Name length - INTEGER(HID_T) :: space_id_c - - namelen = LEN(name) - space_id_c = -1 - IF(PRESENT(space_id)) space_id_c = space_id - hdferr = h5rcreate_ptr_c(ref, loc_id, name, namelen, ref_type, space_id_c) - - 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: - SUBROUTINE h5rdereference_object_f(obj_id, ref, ref_obj_id, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 -!***** - 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 teh 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: - SUBROUTINE h5rdereference_region_f(obj_id, ref, ref_obj_id, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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 -!***** - TYPE(C_PTR) :: f_ptr - - f_ptr = C_LOC(ref) - hdferr = h5rdereference_ptr_c(obj_id, 1, f_ptr, ref_obj_id) - - 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: - SUBROUTINE h5rdereference_ptr_f(obj_id, ref_type, ref, ref_obj_id, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - 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(OUT) :: ref_obj_id - ! Identifier of referenced object - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - 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: - SUBROUTINE h5rget_name_object_f(loc_id, ref, name, hdferr, size) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref - 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 - - f_ptr = C_LOC(ref) - - name_len=LEN(name) - - hdferr = h5rget_name_ptr_c(loc_id, 0, f_ptr, name, name_len, size_default) - - 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: - SUBROUTINE h5rget_name_region_f(loc_id, ref, name, hdferr, size) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref - 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 - - f_ptr = C_LOC(ref) - - name_len=LEN(name) - - hdferr = h5rget_name_ptr_c(loc_id, 1, f_ptr, name, name_len, size_default) - - IF(PRESENT(size)) size = size_default - - 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) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), INTENT(IN) :: ref - 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 - - name_len=LEN(name) - - hdferr = h5rget_name_ptr_c(loc_id, ref_type, ref, name, name_len, size_default) - - IF(PRESENT(size)) size = size_default - - 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: - SUBROUTINE h5rget_obj_type_f(loc_id, ref_type, ref, obj_type, hdferr) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: ref_type - 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) & - BIND(C, NAME='h5rget_obj_type_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER, INTENT(IN) :: ref_type - TYPE(C_PTR), VALUE :: ref - INTEGER :: obj_type - END FUNCTION h5rget_obj_type_c - END INTERFACE - - hdferr = h5rget_obj_type_c(loc_id, ref_type, ref, obj_type) - - END SUBROUTINE h5rget_obj_type_f - -END MODULE H5R diff --git a/fortran/src/H5Sff.F90 b/fortran/src/H5Sff.F90 new file mode 100644 index 0000000..c493d46 --- /dev/null +++ b/fortran/src/H5Sff.F90 @@ -0,0 +1,1875 @@ +!****h* ROBODoc/H5S +! +! NAME +! MODULE H5S +! +! FILE +! fortran/src/H5Sff.f90 +! +! PURPOSE +! This file contains Fortran interfaces for H5S functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! NOTES +! *** IMPORTANT *** +! If you add a new H5S 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. +! +!***** + +MODULE H5S + 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 + SUBROUTINE h5screate_simple_f(rank, dims, space_id, hdferr, maxdims) + + IMPLICIT NONE + INTEGER, INTENT(IN) :: rank ! Number of dataspace dimensions + INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) + ! Array with the dimension + ! sizes + INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HSIZE_T), OPTIONAL, INTENT(IN) :: maxdims(rank) + ! Array with the maximum + ! dimension sizes +!***** + INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: f_maxdims + + INTERFACE + INTEGER FUNCTION h5screate_simple_c(rank, dims, maxdims, space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCREATE_SIMPLE_C'::h5screate_simple_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) + INTEGER(HSIZE_T), DIMENSION(:),INTENT(IN) :: maxdims(rank) + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5screate_simple_c + END INTERFACE + + allocate (f_maxdims(rank), stat=hdferr) + if (hdferr .NE. 0) then + hdferr = -1 + return + endif + if (present(maxdims)) then + f_maxdims = maxdims + else + f_maxdims = dims + endif + hdferr = h5screate_simple_c(rank, dims, f_maxdims, space_id) + deallocate(f_maxdims) + + 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 + SUBROUTINE h5sclose_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sclose_c(space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCLOSE_C'::h5sclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sclose_c + END INTERFACE + + hdferr = h5sclose_c(space_id) + + 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 +! 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 + SUBROUTINE h5screate_f(classtype, space_id, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: classtype ! The type of the dataspace + ! to be created. + ! Possible values are: + ! H5S_SCALAR_F (0) + ! H5S_SIMPLE_F(1) + ! H5S_NULL_F(2) + INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5screate_c(classtype, space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCREATE_C'::h5screate_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: classtype + INTEGER(HID_T), INTENT(OUT) :: space_id + END FUNCTION h5screate_c + END INTERFACE + + hdferr = h5screate_c(classtype, space_id) + + 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 + SUBROUTINE h5scopy_f(space_id, new_space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HID_T), INTENT(OUT) :: new_space_id + ! Identifier of dataspace's copy + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5scopy_c(space_id, new_space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOPY_C'::h5scopy_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HID_T), INTENT(OUT):: new_space_id + END FUNCTION h5scopy_c + END INTERFACE + + hdferr = h5scopy_c(space_id, new_space_id) + + 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 + SUBROUTINE h5sget_select_hyper_nblocks_f(space_id, num_blocks, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks + !number of hyperslab blocks + !in the current dataspace + !selection + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_hyper_nblocks_c (space_id, num_blocks) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) +! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_HYPER_NBLOCKS_C'::h5sget_select_hyper_nblocks_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks + END FUNCTION h5sget_select_hyper_nblocks_c + END INTERFACE + + hdferr = h5sget_select_hyper_nblocks_c (space_id, num_blocks) + + 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 + SUBROUTINE h5sget_select_hyper_blocklist_f(space_id, startblock, & + num_blocks, buf, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), INTENT(IN) :: startblock + !Hyperslab block to start with. + INTEGER(HSIZE_T), INTENT(IN) :: num_blocks + !number of hyperslab blocks + !to get in the current dataspace + !selection + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + !List of hyperslab blocks selected + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5sget_select_hyper_blocklist_c(space_id, startblock, & + num_blocks, buf ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_HYPER_BLOCKLIST_C'::h5sget_select_hyper_blocklist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(IN) :: startblock + INTEGER(HSIZE_T), INTENT(IN) :: num_blocks + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + END FUNCTION h5sget_select_hyper_blocklist_c + END INTERFACE + + + hdferr = h5sget_select_hyper_blocklist_c(space_id, startblock, & + num_blocks, buf ) + + 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 +! 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 + SUBROUTINE h5sget_select_bounds_f(space_id, start, END, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start + ! Starting coordinates of the bounding box. + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END + !Ending coordinates of the bounding box, + !i.e., the coordinates of the diagonally + !opposite corner + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_bounds_c(space_id, start, END) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_BOUNDS_C'::h5sget_select_bounds_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END + END FUNCTION h5sget_select_bounds_c + END INTERFACE + + hdferr = h5sget_select_bounds_c(space_id, start, END) + + 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 + SUBROUTINE h5sget_select_elem_npoints_f(space_id, num_points, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSSIZE_T), INTENT(OUT) :: num_points + !number of element points + !in the current dataspace + !selection + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_elem_npoints_c (space_id, num_points) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) +! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_ELEM_NPOINTS_C'::h5sget_select_elem_npoints_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: num_points + END FUNCTION h5sget_select_elem_npoints_c + END INTERFACE + + hdferr = h5sget_select_elem_npoints_c (space_id, num_points) + + 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 elemnt 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 + SUBROUTINE h5sget_select_elem_pointlist_f(space_id, startpoint, & + num_points, buf, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), INTENT(IN) :: startpoint + !Element point to start with. + INTEGER(HSIZE_T), INTENT(IN) :: num_points + !Number of element points to get + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + !List of element points selected + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_elem_pointlist_c(space_id, startpoint, & + num_points, buf ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) +! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_ELEM_POINTLIST_C'::h5sget_select_elem_pointlist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(IN) :: startpoint + INTEGER(HSIZE_T), INTENT(IN) :: num_points + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf + END FUNCTION h5sget_select_elem_pointlist_c + END INTERFACE + + hdferr = h5sget_select_elem_pointlist_c(space_id, startpoint, & + num_points, buf ) + + 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 + SUBROUTINE h5sselect_elements_f(space_id, OPERATOR, rank, & + num_elements, coord, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: OPERATOR + INTEGER, INTENT(IN) :: rank + 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 + + INTERFACE + INTEGER FUNCTION h5sselect_elements_c(space_id, OPERATOR,& + num_elements,c_c_coord) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_ELEMENTS_C'::h5sselect_elements_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: OPERATOR + INTEGER(SIZE_T), INTENT(IN) :: num_elements + INTEGER(HSIZE_T),DIMENSION(*) :: c_c_coord + END FUNCTION h5sselect_elements_c + END INTERFACE + + ALLOCATE(c_coord(rank,num_elements), STAT = error) + IF (error.NE. 0) THEN + hdferr = -1 + RETURN + ENDIF + DO i = 1, rank + c_coord(i,:) = coord(rank-i+1, :) - 1 + ENDDO + hdferr = h5sselect_elements_c(space_id, OPERATOR, num_elements, c_coord) + +! ALLOCATE(c_coord(num_elements,rank), stat = error) +! IF (error.NE. 0) THEN +! hdferr = -1 +! RETURN +! ENDIF +! +! c_coord = TRANSPOSE(coord) +! hdferr = h5sselect_elements_c(space_id, OPERATOR, INT(rank,size_t), c_coord) + + + DEALLOCATE(c_coord) + + 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 + SUBROUTINE h5sselect_all_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sselect_all_c(space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_ALL_C'::h5sselect_all_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sselect_all_c + END INTERFACE + + hdferr = h5sselect_all_c(space_id) + + 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 + SUBROUTINE h5sselect_none_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sselect_none_c(space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_NONE_C'::h5sselect_none_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sselect_none_c + END INTERFACE + + hdferr = h5sselect_none_c(space_id) + + 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 +! 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 + SUBROUTINE h5sselect_valid_f(space_id, status, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + LOGICAL, INTENT(OUT) :: status ! TRUE if the selection is + ! contained within the extent, + ! FALSE otherwise. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: flag ! "TRUE/FALSE/ERROR" flag from C routine + + INTERFACE + INTEGER FUNCTION h5sselect_valid_c(space_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_VALID_C'::h5sselect_valid_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER :: flag + END FUNCTION h5sselect_valid_c + END INTERFACE + + hdferr = h5sselect_valid_c(space_id, flag) + status = .TRUE. + if (flag .EQ. 0) status = .FALSE. + + 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 + SUBROUTINE h5sget_simple_extent_npoints_f(space_id, npoints, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), INTENT(OUT) :: npoints ! Number of elements in + ! dataspace + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_npoints_c( space_id, npoints) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_NPOINTS_C'::h5sget_simple_extent_npoints_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), INTENT(OUT) :: npoints + END FUNCTION h5sget_simple_extent_npoints_c + END INTERFACE + + hdferr = h5sget_simple_extent_npoints_c( space_id, npoints) + + 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 + SUBROUTINE h5sget_select_npoints_f(space_id, npoints, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSSIZE_T), INTENT(OUT) :: npoints ! Number of elements in the + ! selection + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_npoints_c(space_id, npoints) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_NPOINTS_C'::h5sget_select_npoints_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), INTENT(OUT) :: npoints + END FUNCTION h5sget_select_npoints_c + END INTERFACE + + hdferr = h5sget_select_npoints_c(space_id, npoints) + + 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 + SUBROUTINE h5sget_simple_extent_ndims_f(space_id, rank, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: rank ! Number of dimensions + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_ndims_c(space_id, rank) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_NDIMS_C'::h5sget_simple_extent_ndims_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: rank + END FUNCTION h5sget_simple_extent_ndims_c + END INTERFACE + + 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 + SUBROUTINE h5sget_simple_extent_dims_f(space_id, dims, maxdims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims + ! Array to store dimension sizes + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims + ! Array to store max dimension + ! sizes + INTEGER, INTENT(OUT) :: hdferr ! Error code: -1 on failure, + ! number of dimensions on + ! on success +!***** + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_dims_c(space_id, dims, maxdims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_DIMS_C'::h5sget_simple_extent_dims_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims + INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims + END FUNCTION h5sget_simple_extent_dims_c + END INTERFACE + + hdferr = h5sget_simple_extent_dims_c(space_id, dims, maxdims) + + 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 (-1) +! H5S_SCALAR_F (0) +! H5S_SIMPLE_F (1) +! H5S_NULL_F (2) +! 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 + SUBROUTINE h5sget_simple_extent_type_f(space_id, classtype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: classtype ! Class type , possible values + ! are: + ! H5S_NO_CLASS_F (-1) + ! H5S_SCALAR_F (0) + ! H5S_SIMPLE_F (1) + ! H5S_NULL_F (2) + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_simple_extent_type_c(space_id, classtype) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_TYPE_C'::h5sget_simple_extent_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: classtype + END FUNCTION h5sget_simple_extent_type_c + END INTERFACE + + hdferr = h5sget_simple_extent_type_c(space_id, classtype) + + 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 + SUBROUTINE h5sset_extent_simple_f(space_id, rank, current_size, & + maximum_size, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(IN) :: rank ! Dataspace rank + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size + ! Array with the new sizes + ! of dimensions + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size + ! Array with the new maximum + ! sizes of dimensions + ! sizes + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sset_extent_simple_c(space_id, rank, & + current_size, maximum_size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSET_EXTENT_SIMPLE_C'::h5sset_extent_simple_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size + INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size + END FUNCTION h5sset_extent_simple_c + END INTERFACE + + hdferr = h5sset_extent_simple_c(space_id, rank, current_size, & + 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 +! 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 + SUBROUTINE h5sis_simple_f(space_id, status, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + LOGICAL, INTENT(OUT) :: status ! Flag, idicates if dataspace + ! is simple or not ( TRUE or + ! FALSE) + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" + + INTERFACE + INTEGER FUNCTION h5sis_simple_c(space_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SIS_SIMPLE_C'::h5sis_simple_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER :: flag + END FUNCTION h5sis_simple_c + END INTERFACE + + hdferr = h5sis_simple_c(space_id, flag) + status = .TRUE. + if (flag .EQ. 0) status = .FALSE. + + 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 + SUBROUTINE h5soffset_simple_f(space_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset + ! The offset at which to position + ! the selection + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5soffset_simple_c(space_id, offset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SOFFSET_SIMPLE_C'::h5soffset_simple_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset + END FUNCTION h5soffset_simple_c + END INTERFACE + + hdferr = h5soffset_simple_c(space_id, offset) + + 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 + SUBROUTINE h5sextent_copy_f(dest_space_id, source_space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dest_space_id ! Identifier of destination + ! dataspace + INTEGER(HID_T), INTENT(IN) :: source_space_id ! Identifier of source + ! dataspace + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sextent_copy_c(dest_space_id, source_space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SEXTENT_COPY_C'::h5sextent_copy_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dest_space_id + INTEGER(HID_T), INTENT(IN) :: source_space_id + END FUNCTION h5sextent_copy_c + END INTERFACE + + hdferr = h5sextent_copy_c(dest_space_id, source_space_id) + + 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 + SUBROUTINE h5sset_extent_none_f(space_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sset_extent_none_c(space_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSET_EXTENT_NONE_C'::h5sset_extent_none_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + END FUNCTION h5sset_extent_none_c + END INTERFACE + + 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 (0) +! H5S_SELECT_OR_F (1) +! 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 + SUBROUTINE h5sselect_hyperslab_f(space_id, operator, start, count, & + hdferr, stride, block) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier + INTEGER, INTENT(IN) :: operator ! Flag, valid values are: + ! H5S_SELECT_SET_F (0) + ! H5S_SELECT_OR_F (1) + ! + 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, 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 + + INTERFACE + INTEGER FUNCTION h5sselect_hyperslab_c(space_id, operator, & + start, count, stride, block) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_HYPERSLAB_C'::h5sselect_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(*), INTENT(IN) :: stride + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: block + END FUNCTION h5sselect_hyperslab_c + END INTERFACE + + if (present(stride).and. present(block)) then + hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & + stride, block) + return + endif + ! Case of optional parameters. + ! + ! Find the rank of the dataspace to allocate memery for + ! default stride and block arrays. + ! + CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) + if( hdferr .EQ. -1) return + ! + if (present(stride).and. .not.present(block)) then + allocate(def_block(rank), stat=error1) + if (error1.NE.0) then + hdferr = -1 + return + endif + def_block = 1 + hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & + stride, def_block) + deallocate(def_block) + return + endif + + if (.not.present(stride).and. present(block)) then + allocate(def_stride(rank), stat=error2) + if (error2.NE.0) then + hdferr = -1 + return + endif + def_stride = 1 + hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & + def_stride, block) + deallocate(def_stride) + return + endif + allocate(def_block(rank), stat=error1) + allocate(def_stride(rank), stat=error2) + if ((error1.NE.0) .OR. (error2.NE.0)) then + hdferr = -1 + return + endif + def_block = 1 + def_stride = 1 + hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & + def_stride, def_block) + deallocate(def_block) + deallocate(def_stride) + + 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 +! 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 + ! +! 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 + +! INTERFACE +! INTEGER FUNCTION h5scombine_hyperslab_c(space_id, operator, & +! start, count, stride, block, hyper_id) +! USE H5GLOBAL +! !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, & +! stride, block, hyper_id) +! return +! endif + ! Case of optional parameters. + ! + ! Find the rank of the dataspace to allocate memery for + ! default stride and block arrays. + ! +! CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) +! if( hdferr .EQ. -1) return + ! +! if (present(stride).and. .not.present(block)) then +! allocate(def_block(rank), stat=error1) +! if (error1.NE.0) then +! hdferr = -1 +! return +! endif +! def_block = 1 +! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & +! stride, def_block, hyper_id) +! deallocate(def_block) +! return +! endif + +! if (.not.present(stride).and. present(block)) then +! allocate(def_stride(rank), stat=error2) +! if (error2.NE.0) then +! hdferr = -1 +! return +! endif +! def_stride = 1 +! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & +! def_stride, block, hyper_id) +! deallocate(def_stride) +! return +! endif +! allocate(def_block(rank), stat=error1) +! allocate(def_stride(rank), stat=error2) +! if ((error1.NE.0) .OR. (error2.NE.0)) then +! hdferr = -1 +! return +! endif +! def_block = 1 +! def_stride = 1 +! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & +! def_stride, def_block, hyper_id) +! deallocate(def_block) +! deallocate(def_stride) + +! 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 +! !$ 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 + ! +! 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) +! return + +! END SUBROUTINE h5scombine_select_f + +! !$! +! !$!****s* H5S/ +! !$! +! !$! NAME +! !$! h5sselect_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 h5sselect_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 + ! +! INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTERFACE +! INTEGER FUNCTION h5sselect_select_c(space1_id, operator, & +! space2_id) +! USE H5GLOBAL +! !DEC$IF DEFINED(HDF5F90_WINDOWS) +! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_SELECT_C'::h5sselect_select_c +! !DEC$ENDIF +! INTEGER(HID_T), INTENT(INOUT) :: space1_id +! INTEGER(HID_T), INTENT(IN) :: space2_id +! INTEGER, INTENT(IN) :: operator +! END FUNCTION h5sselect_select_c +! END INTERFACE + +! hdferr = h5sselect_select_c(space1_id, operator, space2_id) +! return + +! END SUBROUTINE h5sselect_select_f + +! +!****s* H5S/h5sget_select_type_f +! +! NAME +! h5sget_select_type_f +! +! PURPOSE +! Retrieve the type of selection +! +! INPUTS +! space_id - dataspace iidentifier with selection +! OUTPUTS +! 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 + SUBROUTINE h5sget_select_type_f(space_id, type, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(INOUT) :: space_id ! Dataspace identifier to + INTEGER, INTENT(OUT) :: type ! Selection type + ! H5S_SEL_ERROR_F + ! H5S_SEL_NONE_F + ! H5S_SEL_POINTS_F + ! H5S_SEL_HYPERSLABS_F + ! H5S_SEL_ALL_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sget_select_type_c(space_id, type) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_TYPE_C'::h5sget_select_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space_id + INTEGER, INTENT(OUT) :: type + END FUNCTION h5sget_select_type_c + END INTERFACE + + hdferr = h5sget_select_type_c(space_id, type) + return + + 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 + SUBROUTINE h5sdecode_f(buf, obj_id, hdferr) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded. + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5sdecode_c(buf, obj_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SDECODE_C'::h5sdecode_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + CHARACTER(LEN=*), INTENT(IN) :: buf + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID + END FUNCTION h5sdecode_c + END INTERFACE + + hdferr = h5sdecode_c(buf, obj_id) + + 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 + SUBROUTINE h5sencode_f(obj_id, buf, nalloc, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded. + CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into. + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5sencode_c(buf, obj_id, nalloc) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SENCODE_C'::h5sencode_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc + END FUNCTION h5sencode_c + END INTERFACE + + hdferr = h5sencode_c(buf, obj_id, nalloc) + + 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 + SUBROUTINE h5sextent_equal_f(space1_id, space2_id, equal, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier. + INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier. + LOGICAL, INTENT(OUT) :: Equal ! .TRUE. if equal, .FALSE. if unequal. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER(HID_T) :: c_equal + + INTERFACE + INTEGER FUNCTION h5sextent_equal_c(space1_id, space2_id, c_equal) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SEXTENT_EQUAL_C'::h5sextent_equal_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: space1_id + INTEGER(HID_T), INTENT(IN) :: space2_id + INTEGER(HID_T) :: c_equal + END FUNCTION h5sextent_equal_c + END INTERFACE + + hdferr = h5sextent_equal_c(space1_id, space2_id, c_equal) + + + equal = .FALSE. + IF(c_equal.GT.0) equal = .TRUE. + + + END SUBROUTINE h5sextent_equal_f + +END MODULE H5S diff --git a/fortran/src/H5Sff.f90 b/fortran/src/H5Sff.f90 deleted file mode 100644 index c493d46..0000000 --- a/fortran/src/H5Sff.f90 +++ /dev/null @@ -1,1875 +0,0 @@ -!****h* ROBODoc/H5S -! -! NAME -! MODULE H5S -! -! FILE -! fortran/src/H5Sff.f90 -! -! PURPOSE -! This file contains Fortran interfaces for H5S functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! NOTES -! *** IMPORTANT *** -! If you add a new H5S 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. -! -!***** - -MODULE H5S - 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 - SUBROUTINE h5screate_simple_f(rank, dims, space_id, hdferr, maxdims) - - IMPLICIT NONE - INTEGER, INTENT(IN) :: rank ! Number of dataspace dimensions - INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) - ! Array with the dimension - ! sizes - INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HSIZE_T), OPTIONAL, INTENT(IN) :: maxdims(rank) - ! Array with the maximum - ! dimension sizes -!***** - INTEGER(HSIZE_T), ALLOCATABLE, DIMENSION(:) :: f_maxdims - - INTERFACE - INTEGER FUNCTION h5screate_simple_c(rank, dims, maxdims, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCREATE_SIMPLE_C'::h5screate_simple_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), INTENT(IN) :: dims(rank) - INTEGER(HSIZE_T), DIMENSION(:),INTENT(IN) :: maxdims(rank) - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5screate_simple_c - END INTERFACE - - allocate (f_maxdims(rank), stat=hdferr) - if (hdferr .NE. 0) then - hdferr = -1 - return - endif - if (present(maxdims)) then - f_maxdims = maxdims - else - f_maxdims = dims - endif - hdferr = h5screate_simple_c(rank, dims, f_maxdims, space_id) - deallocate(f_maxdims) - - 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 - SUBROUTINE h5sclose_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sclose_c(space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCLOSE_C'::h5sclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sclose_c - END INTERFACE - - hdferr = h5sclose_c(space_id) - - 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 -! 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 - SUBROUTINE h5screate_f(classtype, space_id, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: classtype ! The type of the dataspace - ! to be created. - ! Possible values are: - ! H5S_SCALAR_F (0) - ! H5S_SIMPLE_F(1) - ! H5S_NULL_F(2) - INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5screate_c(classtype, space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCREATE_C'::h5screate_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: classtype - INTEGER(HID_T), INTENT(OUT) :: space_id - END FUNCTION h5screate_c - END INTERFACE - - hdferr = h5screate_c(classtype, space_id) - - 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 - SUBROUTINE h5scopy_f(space_id, new_space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HID_T), INTENT(OUT) :: new_space_id - ! Identifier of dataspace's copy - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5scopy_c(space_id, new_space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SCOPY_C'::h5scopy_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HID_T), INTENT(OUT):: new_space_id - END FUNCTION h5scopy_c - END INTERFACE - - hdferr = h5scopy_c(space_id, new_space_id) - - 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 - SUBROUTINE h5sget_select_hyper_nblocks_f(space_id, num_blocks, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks - !number of hyperslab blocks - !in the current dataspace - !selection - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_hyper_nblocks_c (space_id, num_blocks) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) -! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_HYPER_NBLOCKS_C'::h5sget_select_hyper_nblocks_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: num_blocks - END FUNCTION h5sget_select_hyper_nblocks_c - END INTERFACE - - hdferr = h5sget_select_hyper_nblocks_c (space_id, num_blocks) - - 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 - SUBROUTINE h5sget_select_hyper_blocklist_f(space_id, startblock, & - num_blocks, buf, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), INTENT(IN) :: startblock - !Hyperslab block to start with. - INTEGER(HSIZE_T), INTENT(IN) :: num_blocks - !number of hyperslab blocks - !to get in the current dataspace - !selection - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - !List of hyperslab blocks selected - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5sget_select_hyper_blocklist_c(space_id, startblock, & - num_blocks, buf ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_HYPER_BLOCKLIST_C'::h5sget_select_hyper_blocklist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(IN) :: startblock - INTEGER(HSIZE_T), INTENT(IN) :: num_blocks - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - END FUNCTION h5sget_select_hyper_blocklist_c - END INTERFACE - - - hdferr = h5sget_select_hyper_blocklist_c(space_id, startblock, & - num_blocks, buf ) - - 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 -! 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 - SUBROUTINE h5sget_select_bounds_f(space_id, start, END, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start - ! Starting coordinates of the bounding box. - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END - !Ending coordinates of the bounding box, - !i.e., the coordinates of the diagonally - !opposite corner - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_bounds_c(space_id, start, END) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_BOUNDS_C'::h5sget_select_bounds_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: start - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: END - END FUNCTION h5sget_select_bounds_c - END INTERFACE - - hdferr = h5sget_select_bounds_c(space_id, start, END) - - 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 - SUBROUTINE h5sget_select_elem_npoints_f(space_id, num_points, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: num_points - !number of element points - !in the current dataspace - !selection - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_elem_npoints_c (space_id, num_points) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) -! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_ELEM_NPOINTS_C'::h5sget_select_elem_npoints_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: num_points - END FUNCTION h5sget_select_elem_npoints_c - END INTERFACE - - hdferr = h5sget_select_elem_npoints_c (space_id, num_points) - - 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 elemnt 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 - SUBROUTINE h5sget_select_elem_pointlist_f(space_id, startpoint, & - num_points, buf, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), INTENT(IN) :: startpoint - !Element point to start with. - INTEGER(HSIZE_T), INTENT(IN) :: num_points - !Number of element points to get - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - !List of element points selected - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_elem_pointlist_c(space_id, startpoint, & - num_points, buf ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) -! DEC$ ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_ELEM_POINTLIST_C'::h5sget_select_elem_pointlist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(IN) :: startpoint - INTEGER(HSIZE_T), INTENT(IN) :: num_points - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: buf - END FUNCTION h5sget_select_elem_pointlist_c - END INTERFACE - - hdferr = h5sget_select_elem_pointlist_c(space_id, startpoint, & - num_points, buf ) - - 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 - SUBROUTINE h5sselect_elements_f(space_id, OPERATOR, rank, & - num_elements, coord, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: OPERATOR - INTEGER, INTENT(IN) :: rank - 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 - - INTERFACE - INTEGER FUNCTION h5sselect_elements_c(space_id, OPERATOR,& - num_elements,c_c_coord) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_ELEMENTS_C'::h5sselect_elements_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: OPERATOR - INTEGER(SIZE_T), INTENT(IN) :: num_elements - INTEGER(HSIZE_T),DIMENSION(*) :: c_c_coord - END FUNCTION h5sselect_elements_c - END INTERFACE - - ALLOCATE(c_coord(rank,num_elements), STAT = error) - IF (error.NE. 0) THEN - hdferr = -1 - RETURN - ENDIF - DO i = 1, rank - c_coord(i,:) = coord(rank-i+1, :) - 1 - ENDDO - hdferr = h5sselect_elements_c(space_id, OPERATOR, num_elements, c_coord) - -! ALLOCATE(c_coord(num_elements,rank), stat = error) -! IF (error.NE. 0) THEN -! hdferr = -1 -! RETURN -! ENDIF -! -! c_coord = TRANSPOSE(coord) -! hdferr = h5sselect_elements_c(space_id, OPERATOR, INT(rank,size_t), c_coord) - - - DEALLOCATE(c_coord) - - 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 - SUBROUTINE h5sselect_all_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sselect_all_c(space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_ALL_C'::h5sselect_all_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sselect_all_c - END INTERFACE - - hdferr = h5sselect_all_c(space_id) - - 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 - SUBROUTINE h5sselect_none_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sselect_none_c(space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_NONE_C'::h5sselect_none_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sselect_none_c - END INTERFACE - - hdferr = h5sselect_none_c(space_id) - - 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 -! 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 - SUBROUTINE h5sselect_valid_f(space_id, status, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - LOGICAL, INTENT(OUT) :: status ! TRUE if the selection is - ! contained within the extent, - ! FALSE otherwise. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: flag ! "TRUE/FALSE/ERROR" flag from C routine - - INTERFACE - INTEGER FUNCTION h5sselect_valid_c(space_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_VALID_C'::h5sselect_valid_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER :: flag - END FUNCTION h5sselect_valid_c - END INTERFACE - - hdferr = h5sselect_valid_c(space_id, flag) - status = .TRUE. - if (flag .EQ. 0) status = .FALSE. - - 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 - SUBROUTINE h5sget_simple_extent_npoints_f(space_id, npoints, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), INTENT(OUT) :: npoints ! Number of elements in - ! dataspace - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_npoints_c( space_id, npoints) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_NPOINTS_C'::h5sget_simple_extent_npoints_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), INTENT(OUT) :: npoints - END FUNCTION h5sget_simple_extent_npoints_c - END INTERFACE - - hdferr = h5sget_simple_extent_npoints_c( space_id, npoints) - - 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 - SUBROUTINE h5sget_select_npoints_f(space_id, npoints, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), INTENT(OUT) :: npoints ! Number of elements in the - ! selection - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_npoints_c(space_id, npoints) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_NPOINTS_C'::h5sget_select_npoints_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), INTENT(OUT) :: npoints - END FUNCTION h5sget_select_npoints_c - END INTERFACE - - hdferr = h5sget_select_npoints_c(space_id, npoints) - - 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 - SUBROUTINE h5sget_simple_extent_ndims_f(space_id, rank, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: rank ! Number of dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_ndims_c(space_id, rank) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_NDIMS_C'::h5sget_simple_extent_ndims_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: rank - END FUNCTION h5sget_simple_extent_ndims_c - END INTERFACE - - 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 - SUBROUTINE h5sget_simple_extent_dims_f(space_id, dims, maxdims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims - ! Array to store dimension sizes - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims - ! Array to store max dimension - ! sizes - INTEGER, INTENT(OUT) :: hdferr ! Error code: -1 on failure, - ! number of dimensions on - ! on success -!***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_dims_c(space_id, dims, maxdims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_DIMS_C'::h5sget_simple_extent_dims_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: dims - INTEGER(HSIZE_T), DIMENSION(*), INTENT(OUT) :: maxdims - END FUNCTION h5sget_simple_extent_dims_c - END INTERFACE - - hdferr = h5sget_simple_extent_dims_c(space_id, dims, maxdims) - - 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 (-1) -! H5S_SCALAR_F (0) -! H5S_SIMPLE_F (1) -! H5S_NULL_F (2) -! 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 - SUBROUTINE h5sget_simple_extent_type_f(space_id, classtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: classtype ! Class type , possible values - ! are: - ! H5S_NO_CLASS_F (-1) - ! H5S_SCALAR_F (0) - ! H5S_SIMPLE_F (1) - ! H5S_NULL_F (2) - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_simple_extent_type_c(space_id, classtype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SIMPLE_EXTENT_TYPE_C'::h5sget_simple_extent_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: classtype - END FUNCTION h5sget_simple_extent_type_c - END INTERFACE - - hdferr = h5sget_simple_extent_type_c(space_id, classtype) - - 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 - SUBROUTINE h5sset_extent_simple_f(space_id, rank, current_size, & - maximum_size, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(IN) :: rank ! Dataspace rank - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size - ! Array with the new sizes - ! of dimensions - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size - ! Array with the new maximum - ! sizes of dimensions - ! sizes - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sset_extent_simple_c(space_id, rank, & - current_size, maximum_size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSET_EXTENT_SIMPLE_C'::h5sset_extent_simple_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: current_size - INTEGER(HSIZE_T), DIMENSION(rank), INTENT(IN) :: maximum_size - END FUNCTION h5sset_extent_simple_c - END INTERFACE - - hdferr = h5sset_extent_simple_c(space_id, rank, current_size, & - 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 -! 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 - SUBROUTINE h5sis_simple_f(space_id, status, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - LOGICAL, INTENT(OUT) :: status ! Flag, idicates if dataspace - ! is simple or not ( TRUE or - ! FALSE) - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: flag ! "TRUE/FALSE/ERROR from C" - - INTERFACE - INTEGER FUNCTION h5sis_simple_c(space_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SIS_SIMPLE_C'::h5sis_simple_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER :: flag - END FUNCTION h5sis_simple_c - END INTERFACE - - hdferr = h5sis_simple_c(space_id, flag) - status = .TRUE. - if (flag .EQ. 0) status = .FALSE. - - 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 - SUBROUTINE h5soffset_simple_f(space_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset - ! The offset at which to position - ! the selection - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5soffset_simple_c(space_id, offset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SOFFSET_SIMPLE_C'::h5soffset_simple_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER(HSSIZE_T), DIMENSION(*), INTENT(IN) :: offset - END FUNCTION h5soffset_simple_c - END INTERFACE - - hdferr = h5soffset_simple_c(space_id, offset) - - 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 - SUBROUTINE h5sextent_copy_f(dest_space_id, source_space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dest_space_id ! Identifier of destination - ! dataspace - INTEGER(HID_T), INTENT(IN) :: source_space_id ! Identifier of source - ! dataspace - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sextent_copy_c(dest_space_id, source_space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SEXTENT_COPY_C'::h5sextent_copy_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dest_space_id - INTEGER(HID_T), INTENT(IN) :: source_space_id - END FUNCTION h5sextent_copy_c - END INTERFACE - - hdferr = h5sextent_copy_c(dest_space_id, source_space_id) - - 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 - SUBROUTINE h5sset_extent_none_f(space_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sset_extent_none_c(space_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSET_EXTENT_NONE_C'::h5sset_extent_none_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - END FUNCTION h5sset_extent_none_c - END INTERFACE - - 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 (0) -! H5S_SELECT_OR_F (1) -! 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 - SUBROUTINE h5sselect_hyperslab_f(space_id, operator, start, count, & - hdferr, stride, block) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space_id ! Dataspace identifier - INTEGER, INTENT(IN) :: operator ! Flag, valid values are: - ! H5S_SELECT_SET_F (0) - ! H5S_SELECT_OR_F (1) - ! - 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, 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 - - INTERFACE - INTEGER FUNCTION h5sselect_hyperslab_c(space_id, operator, & - start, count, stride, block) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_HYPERSLAB_C'::h5sselect_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(*), INTENT(IN) :: stride - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: block - END FUNCTION h5sselect_hyperslab_c - END INTERFACE - - if (present(stride).and. present(block)) then - hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & - stride, block) - return - endif - ! Case of optional parameters. - ! - ! Find the rank of the dataspace to allocate memery for - ! default stride and block arrays. - ! - CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) - if( hdferr .EQ. -1) return - ! - if (present(stride).and. .not.present(block)) then - allocate(def_block(rank), stat=error1) - if (error1.NE.0) then - hdferr = -1 - return - endif - def_block = 1 - hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & - stride, def_block) - deallocate(def_block) - return - endif - - if (.not.present(stride).and. present(block)) then - allocate(def_stride(rank), stat=error2) - if (error2.NE.0) then - hdferr = -1 - return - endif - def_stride = 1 - hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & - def_stride, block) - deallocate(def_stride) - return - endif - allocate(def_block(rank), stat=error1) - allocate(def_stride(rank), stat=error2) - if ((error1.NE.0) .OR. (error2.NE.0)) then - hdferr = -1 - return - endif - def_block = 1 - def_stride = 1 - hdferr = h5sselect_hyperslab_c(space_id, operator, start, count, & - def_stride, def_block) - deallocate(def_block) - deallocate(def_stride) - - 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 -! 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 - ! -! 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 - -! INTERFACE -! INTEGER FUNCTION h5scombine_hyperslab_c(space_id, operator, & -! start, count, stride, block, hyper_id) -! USE H5GLOBAL -! !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, & -! stride, block, hyper_id) -! return -! endif - ! Case of optional parameters. - ! - ! Find the rank of the dataspace to allocate memery for - ! default stride and block arrays. - ! -! CALL h5sget_simple_extent_ndims_f(space_id, rank, hdferr) -! if( hdferr .EQ. -1) return - ! -! if (present(stride).and. .not.present(block)) then -! allocate(def_block(rank), stat=error1) -! if (error1.NE.0) then -! hdferr = -1 -! return -! endif -! def_block = 1 -! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & -! stride, def_block, hyper_id) -! deallocate(def_block) -! return -! endif - -! if (.not.present(stride).and. present(block)) then -! allocate(def_stride(rank), stat=error2) -! if (error2.NE.0) then -! hdferr = -1 -! return -! endif -! def_stride = 1 -! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & -! def_stride, block, hyper_id) -! deallocate(def_stride) -! return -! endif -! allocate(def_block(rank), stat=error1) -! allocate(def_stride(rank), stat=error2) -! if ((error1.NE.0) .OR. (error2.NE.0)) then -! hdferr = -1 -! return -! endif -! def_block = 1 -! def_stride = 1 -! hdferr = h5scombine_hyperslab_c(space_id, operator, start, count, & -! def_stride, def_block, hyper_id) -! deallocate(def_block) -! deallocate(def_stride) - -! 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 -! !$ 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 - ! -! 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) -! return - -! END SUBROUTINE h5scombine_select_f - -! !$! -! !$!****s* H5S/ -! !$! -! !$! NAME -! !$! h5sselect_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 h5sselect_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 - ! -! INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTERFACE -! INTEGER FUNCTION h5sselect_select_c(space1_id, operator, & -! space2_id) -! USE H5GLOBAL -! !DEC$IF DEFINED(HDF5F90_WINDOWS) -! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_SELECT_C'::h5sselect_select_c -! !DEC$ENDIF -! INTEGER(HID_T), INTENT(INOUT) :: space1_id -! INTEGER(HID_T), INTENT(IN) :: space2_id -! INTEGER, INTENT(IN) :: operator -! END FUNCTION h5sselect_select_c -! END INTERFACE - -! hdferr = h5sselect_select_c(space1_id, operator, space2_id) -! return - -! END SUBROUTINE h5sselect_select_f - -! -!****s* H5S/h5sget_select_type_f -! -! NAME -! h5sget_select_type_f -! -! PURPOSE -! Retrieve the type of selection -! -! INPUTS -! space_id - dataspace iidentifier with selection -! OUTPUTS -! 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 - SUBROUTINE h5sget_select_type_f(space_id, type, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(INOUT) :: space_id ! Dataspace identifier to - INTEGER, INTENT(OUT) :: type ! Selection type - ! H5S_SEL_ERROR_F - ! H5S_SEL_NONE_F - ! H5S_SEL_POINTS_F - ! H5S_SEL_HYPERSLABS_F - ! H5S_SEL_ALL_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sget_select_type_c(space_id, type) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SGET_SELECT_TYPE_C'::h5sget_select_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space_id - INTEGER, INTENT(OUT) :: type - END FUNCTION h5sget_select_type_c - END INTERFACE - - hdferr = h5sget_select_type_c(space_id, type) - return - - 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 - SUBROUTINE h5sdecode_f(buf, obj_id, hdferr) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded. - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5sdecode_c(buf, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SDECODE_C'::h5sdecode_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - CHARACTER(LEN=*), INTENT(IN) :: buf - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID - END FUNCTION h5sdecode_c - END INTERFACE - - hdferr = h5sdecode_c(buf, obj_id) - - 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 - SUBROUTINE h5sencode_f(obj_id, buf, nalloc, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded. - CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into. - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5sencode_c(buf, obj_id, nalloc) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SENCODE_C'::h5sencode_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: buf - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc - END FUNCTION h5sencode_c - END INTERFACE - - hdferr = h5sencode_c(buf, obj_id, nalloc) - - 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 - SUBROUTINE h5sextent_equal_f(space1_id, space2_id, equal, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: space1_id ! First dataspace identifier. - INTEGER(HID_T), INTENT(IN) :: space2_id ! Second dataspace identifier. - LOGICAL, INTENT(OUT) :: Equal ! .TRUE. if equal, .FALSE. if unequal. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER(HID_T) :: c_equal - - INTERFACE - INTEGER FUNCTION h5sextent_equal_c(space1_id, space2_id, c_equal) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SEXTENT_EQUAL_C'::h5sextent_equal_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: space1_id - INTEGER(HID_T), INTENT(IN) :: space2_id - INTEGER(HID_T) :: c_equal - END FUNCTION h5sextent_equal_c - END INTERFACE - - hdferr = h5sextent_equal_c(space1_id, space2_id, c_equal) - - - equal = .FALSE. - IF(c_equal.GT.0) equal = .TRUE. - - - END SUBROUTINE h5sextent_equal_f - -END MODULE H5S diff --git a/fortran/src/H5Tff.F90 b/fortran/src/H5Tff.F90 new file mode 100644 index 0000000..d43db38 --- /dev/null +++ b/fortran/src/H5Tff.F90 @@ -0,0 +1,3285 @@ +!****h* ROBODoc/H5T +! +! NAME +! MODULE H5T +! +! PURPOSE +! This file contains Fortran interfaces for H5T functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! NOTES +! *** IMPORTANT *** +! If you add a new H5T 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. +! +!***** + +MODULE H5T + + USE H5GLOBAL + USE, INTRINSIC :: ISO_C_BINDING + +!****t* H5T (F03)/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 + END TYPE hvl_t + +!***** + + INTERFACE h5tenum_insert_f + MODULE PROCEDURE h5tenum_insert_f03 + MODULE PROCEDURE h5tenum_insert_f90 + END INTERFACE + +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 compatability +! with H5Topen2. April 9, 2009. +! +! SOURCE + SUBROUTINE h5topen_f(loc_id, name, type_id, hdferr, tapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Datatype name within file or group + INTEGER(HID_T), INTENT(OUT) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! datatype access property list identifier +!***** + INTEGER :: namelen ! Name length + INTEGER(HID_T) :: tapl_id_default + + INTERFACE + INTEGER FUNCTION h5topen_c(loc_id, name, namelen, type_id, tapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TOPEN_C'::h5topen_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference ::name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(OUT) :: type_id + INTEGER(HID_T) :: tapl_id_default + END FUNCTION h5topen_c + END INTERFACE + + namelen = LEN(name) + + tapl_id_default = H5P_DEFAULT_F + IF(PRESENT(tapl_id)) tapl_id_default = tapl_id + + 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 + 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 + 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 :: namelen ! Name length + + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: tcpl_id_default + INTEGER(HID_T) :: tapl_id_default + + INTERFACE + INTEGER FUNCTION h5tcommit_c(loc_id, name, namelen, type_id, & + lcpl_id_default, tcpl_id_default, tapl_id_default ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMIT_C'::h5tcommit_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference ::name + INTEGER(HID_T), INTENT(IN) :: loc_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER :: namelen + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T) :: lcpl_id_default + INTEGER(HID_T) :: tcpl_id_default + INTEGER(HID_T) :: tapl_id_default + END FUNCTION h5tcommit_c + END INTERFACE + + lcpl_id_default = H5P_DEFAULT_F + tcpl_id_default = H5P_DEFAULT_F + tapl_id_default = H5P_DEFAULT_F + + IF (PRESENT(lcpl_id)) lcpl_id_default = lcpl_id + IF (PRESENT(tcpl_id)) tcpl_id_default = tcpl_id + IF (PRESENT(tapl_id)) tapl_id_default = tapl_id + + namelen = LEN(name) + + hdferr = h5tcommit_c(loc_id, name, namelen, type_id, & + 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 exisiting 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 + SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(OUT) :: new_type_id + ! Identifier of datatype's copy + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tcopy_c(type_id, new_type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOPY_C'::h5tcopy_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: new_type_id + END FUNCTION h5tcopy_c + END INTERFACE + + 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 + SUBROUTINE h5tequal_f(type1_id, type2_id, flag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type1_id ! Datatype identifier + INTEGER(HID_T), INTENT(IN) :: type2_id ! Datatype identifier + LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag to indicate if two + ! datatypes are equal + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: c_flag + INTERFACE + INTEGER FUNCTION h5tequal_c(type1_id, type2_id, c_flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TEQUAL_C'::h5tequal_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type1_id + INTEGER(HID_T), INTENT(IN) :: type2_id + INTEGER :: c_flag + END FUNCTION h5tequal_c + END INTERFACE + + flag = .FALSE. + 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 + SUBROUTINE h5tclose_f(type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tclose_c(type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCLOSE_C'::h5tclose_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + END FUNCTION h5tclose_c + END INTERFACE + + 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 + 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) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CLASS_C'::h5tget_class_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: class + END FUNCTION h5tget_class_c + END INTERFACE + + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5tget_size_c(type_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SIZE_C'::h5tget_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: size + END FUNCTION h5tget_size_c + END INTERFACE + + 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 + 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 +!***** + INTERFACE + INTEGER FUNCTION h5tset_size_c(type_id, size) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_SIZE_C'::h5tset_size_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: size + END FUNCTION h5tset_size_c + END INTERFACE + + 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 + SUBROUTINE h5tget_order_f(type_id, order, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + 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 +!***** + INTERFACE + INTEGER FUNCTION h5tget_order_c(type_id, order) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ORDER_C'::h5tget_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: order + END FUNCTION h5tget_order_c + END INTERFACE + + 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 + 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 + ! H5T_ORDER_VAX_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_order_c(type_id, order) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_ORDER_C'::h5tset_order_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: order + END FUNCTION h5tset_order_c + END INTERFACE + + 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 + SUBROUTINE h5tget_precision_f(type_id, precision, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(OUT) :: precision ! Datatype precision + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_precision_c (type_id, precision) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PRECISION_C'::h5tget_precision_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: precision + END FUNCTION h5tget_precision_c + END INTERFACE + + 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 + SUBROUTINE h5tset_precision_f(type_id, precision, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(IN) :: precision ! Datatype precision + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_precision_c (type_id, precision) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PRECISION_C'::h5tset_precision_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: precision + END FUNCTION h5tset_precision_c + END INTERFACE + + 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 + SUBROUTINE h5tget_offset_f(type_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(OUT) :: offset ! Datatype bit offset of the + ! first significant bit + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_offset_c(type_id, offset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_OFFSET_C'::h5tget_offset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: offset + END FUNCTION h5tget_offset_c + END INTERFACE + + 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 + SUBROUTINE h5tset_offset_f(type_id, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(IN) :: offset ! Datatype bit offset of the + ! first significant bit + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_offset_c(type_id, offset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_OFFSET_C'::h5tset_offset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: offset + END FUNCTION h5tset_offset_c + END INTERFACE + + 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 = -1 +! H5T_PAD_ZERO_F = 0 +! H5T_PAD_ONE_F = 1 +! H5T_PAD_BACKGROUND_F = 2 +! H5T_PAD_NPAD_F = 3 +! 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 h5tget_pad_f(type_id, lsbpad, msbpad, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: lsbpad ! padding type of the + ! least significant bit + INTEGER, INTENT(OUT) :: msbpad ! padding type of the + ! most significant bit + ! Possible values of padding type are: + ! H5T__PAD_ZERO_F = 0 + ! H5T__PAD_ONE_F = 1 + ! H5T__PAD_BACKGROUND_F = 2 + ! H5T_PAD_ERROR_F = -1 + ! H5T_PAD_NPAD_F = 3 + + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_pad_c(type_id, lsbpad, msbpad) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PAD_C'::h5tget_pad_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: lsbpad + INTEGER, INTENT(OUT) :: msbpad + END FUNCTION h5tget_pad_c + END INTERFACE + + 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 + SUBROUTINE h5tset_pad_f(type_id, lsbpad, msbpad, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: lsbpad ! padding type of the + ! least significant bit + INTEGER, INTENT(IN) :: msbpad ! padding type of the + ! most significant bit + ! Possible values of padding type are: + ! H5T_PAD_ZERO_F = 0 + ! H5T_PAD_ONE_F = 1 + ! H5T_PAD_BACKGROUND_F = 2 + ! H5T_PAD_ERROR_F = -1 + ! H5T_PAD_NPAD_F = 3 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_pad_c(type_id, lsbpad, msbpad) + USE H5GLOBAL + INTEGER(HID_T), INTENT(IN) :: type_id + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PAD_C'::h5tset_pad_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: lsbpad + INTEGER, INTENT(IN) :: msbpad + END FUNCTION h5tset_pad_c + END INTERFACE + + 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 + SUBROUTINE h5tget_sign_f(type_id, sign, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: sign ! sign type for an integer type + !possible values are: + !Unsigned integer type H5T_SGN_NONE_F = 0 + !Two's complement signed integer type + !H5T_SGN_2_F = 1 + !or error value: H5T_SGN_ERROR_F=-1 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_sign_c(type_id, sign) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SIGN_C'::h5tget_sign_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: sign + END FUNCTION h5tget_sign_c + END INTERFACE + + 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 proprety 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 + SUBROUTINE h5tset_sign_f(type_id, sign, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: sign !sign type for an integer type + !possible values are: + !Unsigned integer type H5T_SGN_NONE_F = 0 + !Two's complement signed integer type + !H5T_SGN_2_F = 1 + !or error value: H5T_SGN_ERROR_F=-1 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tset_sign_c(type_id, sign) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_SIGN_C'::h5tset_sign_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: sign + END FUNCTION h5tset_sign_c + END INTERFACE + + 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 + SUBROUTINE h5tget_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(OUT) :: spos ! sign bit-position + INTEGER(SIZE_T), INTENT(OUT) :: epos ! exponent bit-position + INTEGER(SIZE_T), INTENT(OUT) :: esize ! size of exponent in bits + INTEGER(SIZE_T), INTENT(OUT) :: mpos ! mantissa bit-position + INTEGER(SIZE_T), INTENT(OUT) :: msize ! size of mantissa in bits + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_FIELDS_C'::h5tget_fields_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: spos + INTEGER(SIZE_T), INTENT(OUT) :: epos + INTEGER(SIZE_T), INTENT(OUT) :: esize + INTEGER(SIZE_T), INTENT(OUT) :: mpos + INTEGER(SIZE_T), INTENT(OUT) :: msize + END FUNCTION h5tget_fields_c + END INTERFACE + + 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 + SUBROUTINE h5tset_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(IN) :: spos ! sign bit-position + INTEGER(SIZE_T), INTENT(IN) :: epos ! exponent bit-position + INTEGER(SIZE_T), INTENT(IN) :: esize ! size of exponent in bits + INTEGER(SIZE_T), INTENT(IN) :: mpos ! mantissa bit-position + INTEGER(SIZE_T), INTENT(IN) :: msize ! size of mantissa in bits + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_FIELDS_C'::h5tset_fields_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: spos + INTEGER(SIZE_T), INTENT(IN) :: epos + INTEGER(SIZE_T), INTENT(IN) :: esize + INTEGER(SIZE_T), INTENT(IN) :: mpos + INTEGER(SIZE_T), INTENT(IN) :: msize + END FUNCTION h5tset_fields_c + END INTERFACE + + 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 + SUBROUTINE h5tget_ebias_f(type_id, ebias, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(OUT) :: ebias ! Datatype exponent bias of a floating-point type + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_ebias_c(type_id, ebias) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_EBIAS_C'::h5tget_ebias_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(OUT) :: ebias + END FUNCTION h5tget_ebias_c + END INTERFACE + + 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 + SUBROUTINE h5tset_ebias_f(type_id, ebias, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(SIZE_T), INTENT(IN) :: ebias !Datatype exponent bias of a floating-point type + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tset_ebias_c(type_id, ebias) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_EBIAS_C'::h5tset_ebias_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(SIZE_T), INTENT(IN) :: ebias + END FUNCTION h5tset_ebias_c + END INTERFACE + + 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(0) +! H5T_NORM_MSBSET_F(1) +! H5T_NORM_NONE_F(2) +! 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 h5tget_norm_f(type_id, norm, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: norm !mantissa normalization of a floating-point datatype + !Valid normalization types are: + !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not + !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of + !mantissa is always 1, H5T_NORM_NONE_F(2) + !Mantissa is not normalize + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_norm_c(type_id, norm) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NORM_C'::h5tget_norm_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: norm + END FUNCTION h5tget_norm_c + END INTERFACE + + 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(0) +! H5T_NORM_MSBSET_F(1) +! H5T_NORM_NONE_F(2) +! 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 h5tset_norm_f(type_id, norm, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: norm !mantissa normalization of a floating-point datatype + !Valid normalization types are: + !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not + !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of + !mantissa is always 1, H5T_NORM_NONE_F(2) + !Mantissa is not normalize + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_norm_c(type_id, norm) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_NORM_C'::h5tset_norm_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: norm + END FUNCTION h5tset_norm_c + END INTERFACE + + 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 = 0 +! H5T_PAD_ONE_F = 1 +! H5T_PAD_BACKGROUND_F = 2 +! 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 h5tget_inpad_f(type_id, padtype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: padtype ! padding type for unused bits + ! in floating-point datatypes. + ! Possible values of padding type are: + ! H5T__PAD_ZERO_F = 0 + ! H5T__PAD_ONE_F = 1 + ! H5T__PAD_BACKGROUND_F = 2 + + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_inpad_c(type_id, padtype) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_INPAD_C'::h5tget_inpad_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: padtype + END FUNCTION h5tget_inpad_c + END INTERFACE + + 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 = 0 +! H5T_PAD_ONE_F = 1 +! H5T_PAD_BACKGROUND_F = 2 +! 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 h5tset_inpad_f(type_id, padtype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: padtype ! padding type for unused bits + ! in floating-point datatypes. + ! Possible values of padding type are: + ! H5T__PAD_ZERO_F = 0 + ! H5T__PAD_ONE_F = 1 + ! H5T__PAD_BACKGROUND_F = 2 + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_inpad_c(type_id, padtype) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_INPAD_C'::h5tset_inpad_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: padtype + END FUNCTION h5tset_inpad_c + END INTERFACE + + 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 = 0 +! 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 + SUBROUTINE h5tget_cset_f(type_id, cset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: cset ! character set type of a string datatype + ! Possible values are: + ! H5T_CSET_ASCII_F = 0 + ! H5T_CSET_UTF8_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_cset_c(type_id, cset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CSET_C'::h5tget_cset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: cset + END FUNCTION h5tget_cset_c + END INTERFACE + + 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 = 0 +! 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 + SUBROUTINE h5tset_cset_f(type_id, cset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: cset !character set type of a string datatype + ! Possible values of padding type are: + ! H5T_CSET_ASCII_F = 0 + ! H5T_CSET_UTF8_F + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_cset_c(type_id, cset) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_CSET_C'::h5tset_cset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: cset + END FUNCTION h5tset_cset_c + END INTERFACE + + 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 + SUBROUTINE h5tget_strpad_f(type_id, strpad, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: strpad + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_strpad_c(type_id, strpad) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_STRPAD_C'::h5tget_strpad_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: strpad + END FUNCTION h5tget_strpad_c + END INTERFACE + + 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 + SUBROUTINE h5tset_strpad_f(type_id, strpad, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: strpad ! string padding method for a string datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tset_strpad_c(type_id, strpad) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_STRPAD_C'::h5tset_strpad_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: strpad + END FUNCTION h5tset_strpad_c + END INTERFACE + + 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 + SUBROUTINE h5tget_nmembers_f(type_id, num_members, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: num_members !number of fields in a compound datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_nmembers_c(type_id, num_members) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NMEMBERS_C'::h5tget_nmembers_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: num_members + END FUNCTION h5tget_nmembers_c + END INTERFACE + + 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 + SUBROUTINE h5tget_member_name_f(type_id, index, member_name, namelen, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: index !Field index (0-based) of the field name to retrieve + CHARACTER(LEN=*), INTENT(OUT) :: member_name !name of a field of + !a compound datatype + INTEGER, INTENT(OUT) :: namelen ! Length of the name + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_member_name_c(type_id, index, member_name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_NAME_C'::h5tget_member_name_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: member_name + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: index + CHARACTER(LEN=*), INTENT(OUT) :: member_name + INTEGER, INTENT(OUT) :: namelen + END FUNCTION + END INTERFACE + + 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 + SUBROUTINE h5tget_member_offset_f(type_id, member_no, offset, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: member_no !Number of the field + !whose offset is requested + INTEGER(SIZE_T), INTENT(OUT) :: offset !byte offset of the beginning of the field + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_member_offset_c(type_id, member_no, offset ) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_OFFSET_C'::h5tget_member_offset_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER(SIZE_T), INTENT(OUT) :: offset + END FUNCTION h5tget_member_offset_c + END INTERFACE + + 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 + SUBROUTINE h5tget_member_index_f(type_id, name, index, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: name ! Field or member name + INTEGER, INTENT(OUT) :: index ! Field or member index + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen ! Name length + + INTERFACE + INTEGER FUNCTION h5tget_member_index_c(type_id, name, namelen, index) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_INDEX_C'::h5tget_member_index_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference ::name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: namelen + INTEGER, INTENT(OUT) :: index + END FUNCTION h5tget_member_index_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tget_member_index_c(type_id, name, namelen, index) + END SUBROUTINE h5tget_member_index_f + + +! !$! +! !$!****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 +! !$! 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 + SUBROUTINE h5tget_array_dims_f(type_id, dims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier + INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims !buffer to store array datatype + ! dimensions + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_array_dims_c(type_id, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ARRAY_DIMS_C'::h5tget_array_dims_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims + END FUNCTION h5tget_array_dims_c + END INTERFACE + + hdferr = h5tget_array_dims_c(type_id, dims) + + 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 + SUBROUTINE h5tget_array_ndims_f(type_id, ndims, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier + INTEGER, INTENT(OUT) :: ndims ! number of array dimensions + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_array_ndims_c(type_id, ndims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ARRAY_NDIMS_C'::h5tget_array_ndims_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(OUT) :: ndims + END FUNCTION h5tget_array_ndims_c + END INTERFACE + + hdferr = h5tget_array_ndims_c(type_id, ndims) + + 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 + SUBROUTINE h5tget_super_f(type_id, base_type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier + INTEGER(HID_T), INTENT(OUT) :: base_type_id ! identifier of the datatype + ! from which datatype (type_id) was derived + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_super_c(type_id, base_type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SUPER_C'::h5tget_super_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: base_type_id + END FUNCTION h5tget_super_c + END INTERFACE + + hdferr = h5tget_super_c(type_id, base_type_id) + + 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 - idnetifier 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 + SUBROUTINE h5tget_member_type_f(type_id, field_idx, datatype, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of the field type to retrieve + INTEGER(HID_T), INTENT(OUT) :: datatype !identifier of a copy of + !the datatype of the field + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_member_type_c(type_id, field_idx , datatype) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_TYPE_C'::h5tget_member_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: field_idx + INTEGER(HID_T), INTENT(OUT) :: datatype + END FUNCTION h5tget_member_type_c + END INTERFACE + + 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 + 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) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCREATE_C'::h5tcreate_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: class + INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(HID_T), INTENT(OUT) :: type_id + END FUNCTION h5tcreate_c + END INTERFACE + + 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 dattype 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 + SUBROUTINE h5tinsert_f(type_id, name, offset, field_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: name !Name of the field to insert + INTEGER(SIZE_T), INTENT(IN) :: offset !start of the member in an instance of + !the compound datatype + INTEGER(HID_T), INTENT(IN) :: field_id !datatype identifier of the new member + + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tinsert_c(type_id, name, namelen, offset, field_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TINSERT_C'::h5tinsert_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER(SIZE_T), INTENT(IN) :: offset + INTEGER(HID_T), INTENT(IN) :: field_id + INTEGER :: namelen + END FUNCTION h5tinsert_c + END INTERFACE + + namelen = LEN(name) + 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 + SUBROUTINE h5tpack_f(type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tpack_c(type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TPACK_C'::h5tpack_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + END FUNCTION h5tpack_c + END INTERFACE + + hdferr = h5tpack_c(type_id) + 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 +! 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 +! hdferr = h5tinsert_array_c(parent_id, name, namelen, offset, ndims,dims, member_id, perm) +! else +! hdferr = h5tinsert_array_c2(parent_id, name, namelen, offset, ndims,dims, member_id) +! end if +! +! 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 + SUBROUTINE h5tarray_create_f(base_id, rank, dims, type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: base_id ! identifier of array base datatype + INTEGER, INTENT(IN) :: rank ! Rank of the array + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims !Sizes of each array dimension + INTEGER(HID_T), INTENT(OUT) :: type_id ! identifier of the array datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tarray_create_c(base_id, rank, dims, type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TARRAY_CREATE_C'::h5tarray_create_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: base_id + INTEGER, INTENT(IN) :: rank + INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims + INTEGER(HID_T), INTENT(OUT) :: type_id + END FUNCTION h5tarray_create_c + END INTERFACE + + hdferr = h5tarray_create_c(base_id, rank, dims, type_id) + + 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 + SUBROUTINE h5tenum_create_f(parent_id, new_type_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: parent_id ! Datatype identifier for + ! the base datatype + INTEGER(HID_T), INTENT(OUT) :: new_type_id + !datatype identifier for the + ! new enumeration datatype + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tenum_create_c(parent_id, new_type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_CREATE_C'::h5tenum_create_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: parent_id + INTEGER(HID_T), INTENT(OUT) :: new_type_id + END FUNCTION h5tenum_create_c + END INTERFACE + + 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 + SUBROUTINE h5tenum_nameof_f(type_id, value, namelen, name, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(OUT) :: name !Name of the enumeration datatype. + INTEGER(SIZE_T), INTENT(IN) :: namelen !length of the name + INTEGER, INTENT(IN) :: value !value of the enumeration datatype. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tenum_nameof_c(type_id, value, name, namelen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_NAMEOF_C'::h5tenum_nameof_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(OUT) :: name + INTEGER(SIZE_T), INTENT(IN) :: namelen + INTEGER, INTENT(IN) :: value + END FUNCTION h5tenum_nameof_c + END INTERFACE + + name(1:LEN(name)) = ' ' + + 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 + SUBROUTINE h5tenum_valueof_f(type_id, name, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: name !Name of the enumeration datatype. + INTEGER, INTENT(OUT) :: value !value of the enumeration datatype. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen + + INTERFACE + INTEGER FUNCTION h5tenum_valueof_c(type_id, name, namelen, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_VALUEOF_C'::h5tenum_valueof_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: namelen + INTEGER, INTENT(OUT) :: value + END FUNCTION h5tenum_valueof_c + END INTERFACE + + namelen = LEN(name) + 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 + SUBROUTINE h5tget_member_value_f(type_id, member_no, value, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: member_no !Number of the enumeration datatype member + INTEGER, INTENT(OUT) :: value !value of the enumeration datatype. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tget_member_value_c(type_id, member_no, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_VALUE_C'::h5tget_member_value_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER, INTENT(OUT) :: value + END FUNCTION + END INTERFACE + + 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 + SUBROUTINE h5tset_tag_f(type_id, tag, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: tag !Unique ASCII string with which + !the opaque datatype is to be tagged + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: taglen + + INTERFACE + INTEGER FUNCTION h5tset_tag_c(type_id, tag, taglen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_TAG_C'::h5tset_tag_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: tag + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: tag + INTEGER :: taglen + END FUNCTION h5tset_tag_c + END INTERFACE + + taglen = LEN(tag) + 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 +! 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 h5tget_tag_f(type_id, tag,taglen, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(OUT) :: tag ! Unique ASCII string with which + ! the opaque datatype is to be tagged + INTEGER, INTENT(OUT) :: taglen ! Length of tag + INTEGER(SIZE_T) :: tag_size ! Declared character length of tab + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_tag_c(type_id, tag, tag_size, taglen) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_TAG_C'::h5tget_tag_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: tag + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(OUT) :: tag + INTEGER(SIZE_T), INTENT(IN) :: tag_size + INTEGER, INTENT(OUT) :: taglen + END FUNCTION h5tget_tag_c + END INTERFACE + + tag_size = LEN(tag) + + 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 + SUBROUTINE h5tvlen_create_f(type_id, vltype_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER(HID_T), INTENT(OUT) :: vltype_id ! VL datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tvlen_create_c(type_id, vltype_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TVLEN_CREATE_C'::h5tvlen_create_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER(HID_T), INTENT(OUT) :: vltype_id + END FUNCTION h5tvlen_create_c + END INTERFACE + + 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 +! hdferr - Returns 0 if successful and -1 if fails +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! SOURCE + SUBROUTINE h5tis_variable_str_f(type_id, status, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + LOGICAL, INTENT(OUT) :: status ! Flag, idicates if datatype + ! is a variable string or not ( TRUE or + ! FALSE) + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" + + INTERFACE + INTEGER FUNCTION h5tis_variable_str_c(type_id, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TIS_VARIABLE_STR_C'::h5tis_variable_str_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER :: flag + END FUNCTION h5tis_variable_str_c + END INTERFACE + + hdferr = h5tis_variable_str_c(type_id, flag) + status = .TRUE. + if (flag .EQ. 0) status = .FALSE. + + 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 + SUBROUTINE h5tget_member_class_f(type_id, member_no, class, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + INTEGER, INTENT(IN) :: member_no ! Member number + INTEGER, INTENT(OUT) :: class ! Member class + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tget_member_class_c(type_id, member_no, class) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_CLASS_C'::h5tget_member_class_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: type_id + INTEGER, INTENT(IN) :: member_no + INTEGER, INTENT(OUT) :: class + END FUNCTION h5tget_member_class_c + END INTERFACE + + hdferr = h5tget_member_class_c(type_id, member_no, class) + + 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 + SUBROUTINE h5tcommit_anon_f(loc_id, dtype_id, hdferr, tcpl_id, tapl_id) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: loc_id ! A file or group identifier specifying + ! the file in which the new named datatype + ! is to be created. + INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! A datatype creation property + ! list identifier. + ! (H5P_DEFAULT_F for the default property list.) + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! A datatype access property list identifier. + ! should always be passed as the value H5P_DEFAULT_F. +!***** + INTEGER(HID_T) :: tcpl_id_default + INTEGER(HID_T) :: tapl_id_default + + INTERFACE + INTEGER FUNCTION h5tcommit_anon_c(loc_id, dtype_id, & + tcpl_id_default, tapl_id_default) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMIT_ANON_C'::h5tcommit_anon_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: loc_id + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER(HID_T) :: tcpl_id_default + INTEGER(HID_T) :: tapl_id_default + END FUNCTION h5tcommit_anon_c + END INTERFACE + + tcpl_id_default = H5P_DEFAULT_F + tapl_id_default = H5P_DEFAULT_F + + IF(PRESENT(tcpl_id)) tcpl_id_default = tcpl_id + IF(PRESENT(tapl_id)) tapl_id_default = tapl_id + + hdferr = h5tcommit_anon_c(loc_id, dtype_id, & + tcpl_id_default, tapl_id_default ) + + 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 + SUBROUTINE h5tcommitted_f(dtype_id, committed, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dtype_id ! A datatype identifier + LOGICAL, INTENT(OUT) :: committed ! .TRUE., if the datatype has been committed + !.FALSE., if the datatype has not been committed. + INTEGER, INTENT(OUT) :: hdferr ! Error code: +! Success: 0 +! Failure: -1 +!***** + INTERFACE + INTEGER FUNCTION h5tcommitted_c(dtype_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMITTED_C'::h5tcommitted_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dtype_id + END FUNCTION h5tcommitted_c + END INTERFACE + + hdferr = h5tcommitted_c(dtype_id) + + IF(hdferr.GT.0)THEN + committed = .TRUE. + hdferr = 0 + ELSE IF(hdferr.EQ.0)THEN + committed = .FALSE. + hdferr = 0 + ELSE + hdferr = -1 + ENDIF + + + 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 + SUBROUTINE h5tdecode_f(buf, obj_id, hdferr) + IMPLICIT NONE + CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded. + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5tdecode_c(buf, obj_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TDECODE_C'::h5tdecode_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + CHARACTER(LEN=*), INTENT(IN) :: buf + INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID + END FUNCTION h5tdecode_c + END INTERFACE + + hdferr = h5tdecode_c(buf, obj_id) + + 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 + SUBROUTINE h5tencode_f(obj_id, buf, nalloc, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded. + CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into. + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer. + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5tencode_c(buf, obj_id, nalloc) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENCODE_C'::h5tencode_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: obj_id + CHARACTER(LEN=*), INTENT(OUT) :: buf + INTEGER(SIZE_T), INTENT(INOUT) :: nalloc + END FUNCTION h5tencode_c + END INTERFACE + + hdferr = h5tencode_c(buf, obj_id, nalloc) + + 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 + SUBROUTINE h5tget_create_plist_f(dtype_id, dtpl_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier + INTEGER(HID_T), INTENT(OUT) :: dtpl_id ! Datatype property list identifier. + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5tget_create_plist_c(dtype_id, dtpl_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CREATE_PLIST_C'::h5tget_create_plist_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER(HID_T), INTENT(OUT) :: dtpl_id + END FUNCTION h5tget_create_plist_c + END INTERFACE + + 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) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: src_id ! Identifier for the source datatype. + INTEGER(HID_T), INTENT(IN) :: dst_id ! Identifier for the destination datatype. + LOGICAL, INTENT(OUT) :: flag ! .TRUE. for compiler conversion, .FALSE. for library conversion + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTEGER :: c_flag + + INTERFACE + INTEGER FUNCTION h5tcompiler_conv_c(src_id, dst_id, c_flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMPILER_CONV_C'::h5tcompiler_conv_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: src_id + INTEGER(HID_T), INTENT(IN) :: dst_id + INTEGER :: c_flag + END FUNCTION h5tcompiler_conv_c + END INTERFACE + + hdferr = h5tcompiler_conv_c(src_id, dst_id, c_flag) + + flag = .FALSE. + IF(c_flag .GT. 0) flag = .TRUE. + + 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 = 0, /*default direction is inscendent */ +! H5T_DIR_ASCEND = 1, /*in inscendent order */ +! H5T_DIR_DESCEND = 2 /*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 + SUBROUTINE h5tget_native_type_f(dtype_id, direction, native_dtype_id, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier + INTEGER, INTENT(IN) :: direction ! Direction of search: + ! H5T_DIR_ASCEND_F = 1 in inscendent order + ! H5T_DIR_DESCEND_F = 2 in descendent order + INTEGER(HID_T), INTENT(OUT) :: native_dtype_id ! The native datatype identifier + INTEGER, INTENT(OUT) :: hdferr ! Error code: + ! 0 on success and -1 on failure +!***** + INTERFACE + INTEGER FUNCTION h5tget_native_type_c(dtype_id, direction, native_dtype_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NATIVE_TYPE_C'::h5tget_native_type_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dtype_id + INTEGER, INTENT(IN) :: direction + INTEGER(HID_T), INTENT(OUT) :: native_dtype_id + END FUNCTION h5tget_native_type_c + END INTERFACE + + hdferr = h5tget_native_type_c(dtype_id, direction, native_dtype_id) + END SUBROUTINE h5tget_native_type_f + +!****s* H5T (F03)/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: + SUBROUTINE h5tconvert_f(src_id, dst_id, nelmts, buf, hdferr, background, plist_id) + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: src_id + INTEGER(HID_T) , INTENT(IN) :: dst_id + INTEGER(SIZE_T), INTENT(IN) :: nelmts + TYPE(C_PTR) , INTENT(INOUT) :: buf + 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 + + INTERFACE + INTEGER FUNCTION h5tconvert_c(src_id, dst_id, nelmts, buf, background, plist_id) & + BIND(C, NAME='h5tconvert_c') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: src_id + INTEGER(HID_T) , INTENT(IN) :: dst_id + INTEGER(SIZE_T), INTENT(IN) :: nelmts + TYPE(C_PTR) , VALUE :: buf + TYPE(C_PTR) , VALUE :: background + INTEGER(HID_T) , INTENT(IN) :: plist_id + END FUNCTION h5tconvert_c + END INTERFACE + + plist_id_default = H5P_DEFAULT_F + IF(PRESENT(plist_id)) plist_id_default = plist_id + + background_default = C_NULL_PTR + IF(PRESENT(background)) background_default = background + + hdferr = H5Tconvert_c(src_id, dst_id, nelmts, buf, background_default, plist_id_default) + + END SUBROUTINE h5tconvert_f +! +!****s* (F03) 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) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier + CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member + INTEGER, INTENT(IN) :: value ! value of the new member + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: namelen + INTERFACE + INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: value + INTEGER :: namelen + END FUNCTION h5tenum_insert_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_insert_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_insert_f90 + +! +!****s* (F03) 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) + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: type_id + CHARACTER(LEN=*), INTENT(IN) :: name + TYPE(C_PTR) , 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') + USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char + USE H5GLOBAL + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) :: type_id + CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name + INTEGER :: namelen + TYPE(C_PTR), VALUE :: value + END FUNCTION h5tenum_insert_ptr_c + END INTERFACE + + namelen = LEN(name) + hdferr = h5tenum_insert_ptr_c(type_id, name, namelen, value) + END SUBROUTINE h5tenum_insert_f03 + +END MODULE H5T diff --git a/fortran/src/H5Tff.f90 b/fortran/src/H5Tff.f90 deleted file mode 100644 index d43db38..0000000 --- a/fortran/src/H5Tff.f90 +++ /dev/null @@ -1,3285 +0,0 @@ -!****h* ROBODoc/H5T -! -! NAME -! MODULE H5T -! -! PURPOSE -! This file contains Fortran interfaces for H5T functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! NOTES -! *** IMPORTANT *** -! If you add a new H5T 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. -! -!***** - -MODULE H5T - - USE H5GLOBAL - USE, INTRINSIC :: ISO_C_BINDING - -!****t* H5T (F03)/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 - END TYPE hvl_t - -!***** - - INTERFACE h5tenum_insert_f - MODULE PROCEDURE h5tenum_insert_f03 - MODULE PROCEDURE h5tenum_insert_f90 - END INTERFACE - -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 compatability -! with H5Topen2. April 9, 2009. -! -! SOURCE - SUBROUTINE h5topen_f(loc_id, name, type_id, hdferr, tapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! File or group identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Datatype name within file or group - INTEGER(HID_T), INTENT(OUT) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! datatype access property list identifier -!***** - INTEGER :: namelen ! Name length - INTEGER(HID_T) :: tapl_id_default - - INTERFACE - INTEGER FUNCTION h5topen_c(loc_id, name, namelen, type_id, tapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TOPEN_C'::h5topen_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference ::name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(OUT) :: type_id - INTEGER(HID_T) :: tapl_id_default - END FUNCTION h5topen_c - END INTERFACE - - namelen = LEN(name) - - tapl_id_default = H5P_DEFAULT_F - IF(PRESENT(tapl_id)) tapl_id_default = tapl_id - - 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 - 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 - 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 :: namelen ! Name length - - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: tcpl_id_default - INTEGER(HID_T) :: tapl_id_default - - INTERFACE - INTEGER FUNCTION h5tcommit_c(loc_id, name, namelen, type_id, & - lcpl_id_default, tcpl_id_default, tapl_id_default ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMIT_C'::h5tcommit_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference ::name - INTEGER(HID_T), INTENT(IN) :: loc_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T) :: lcpl_id_default - INTEGER(HID_T) :: tcpl_id_default - INTEGER(HID_T) :: tapl_id_default - END FUNCTION h5tcommit_c - END INTERFACE - - lcpl_id_default = H5P_DEFAULT_F - tcpl_id_default = H5P_DEFAULT_F - tapl_id_default = H5P_DEFAULT_F - - IF (PRESENT(lcpl_id)) lcpl_id_default = lcpl_id - IF (PRESENT(tcpl_id)) tcpl_id_default = tcpl_id - IF (PRESENT(tapl_id)) tapl_id_default = tapl_id - - namelen = LEN(name) - - hdferr = h5tcommit_c(loc_id, name, namelen, type_id, & - 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 exisiting 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 - SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(OUT) :: new_type_id - ! Identifier of datatype's copy - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tcopy_c(type_id, new_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOPY_C'::h5tcopy_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: new_type_id - END FUNCTION h5tcopy_c - END INTERFACE - - 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 - SUBROUTINE h5tequal_f(type1_id, type2_id, flag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type1_id ! Datatype identifier - INTEGER(HID_T), INTENT(IN) :: type2_id ! Datatype identifier - LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag to indicate if two - ! datatypes are equal - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: c_flag - INTERFACE - INTEGER FUNCTION h5tequal_c(type1_id, type2_id, c_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TEQUAL_C'::h5tequal_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type1_id - INTEGER(HID_T), INTENT(IN) :: type2_id - INTEGER :: c_flag - END FUNCTION h5tequal_c - END INTERFACE - - flag = .FALSE. - 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 - SUBROUTINE h5tclose_f(type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tclose_c(type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCLOSE_C'::h5tclose_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - END FUNCTION h5tclose_c - END INTERFACE - - 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 - 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) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CLASS_C'::h5tget_class_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: class - END FUNCTION h5tget_class_c - END INTERFACE - - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5tget_size_c(type_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SIZE_C'::h5tget_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: size - END FUNCTION h5tget_size_c - END INTERFACE - - 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 - 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 -!***** - INTERFACE - INTEGER FUNCTION h5tset_size_c(type_id, size) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_SIZE_C'::h5tset_size_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: size - END FUNCTION h5tset_size_c - END INTERFACE - - 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 - SUBROUTINE h5tget_order_f(type_id, order, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - 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 -!***** - INTERFACE - INTEGER FUNCTION h5tget_order_c(type_id, order) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ORDER_C'::h5tget_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: order - END FUNCTION h5tget_order_c - END INTERFACE - - 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 - 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 - ! H5T_ORDER_VAX_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_order_c(type_id, order) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_ORDER_C'::h5tset_order_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: order - END FUNCTION h5tset_order_c - END INTERFACE - - 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 - SUBROUTINE h5tget_precision_f(type_id, precision, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: precision ! Datatype precision - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_precision_c (type_id, precision) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PRECISION_C'::h5tget_precision_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: precision - END FUNCTION h5tget_precision_c - END INTERFACE - - 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 - SUBROUTINE h5tset_precision_f(type_id, precision, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: precision ! Datatype precision - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_precision_c (type_id, precision) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PRECISION_C'::h5tset_precision_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: precision - END FUNCTION h5tset_precision_c - END INTERFACE - - 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 - SUBROUTINE h5tget_offset_f(type_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: offset ! Datatype bit offset of the - ! first significant bit - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_offset_c(type_id, offset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_OFFSET_C'::h5tget_offset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: offset - END FUNCTION h5tget_offset_c - END INTERFACE - - 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 - SUBROUTINE h5tset_offset_f(type_id, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: offset ! Datatype bit offset of the - ! first significant bit - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_offset_c(type_id, offset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_OFFSET_C'::h5tset_offset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: offset - END FUNCTION h5tset_offset_c - END INTERFACE - - 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 = -1 -! H5T_PAD_ZERO_F = 0 -! H5T_PAD_ONE_F = 1 -! H5T_PAD_BACKGROUND_F = 2 -! H5T_PAD_NPAD_F = 3 -! 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 h5tget_pad_f(type_id, lsbpad, msbpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: lsbpad ! padding type of the - ! least significant bit - INTEGER, INTENT(OUT) :: msbpad ! padding type of the - ! most significant bit - ! Possible values of padding type are: - ! H5T__PAD_ZERO_F = 0 - ! H5T__PAD_ONE_F = 1 - ! H5T__PAD_BACKGROUND_F = 2 - ! H5T_PAD_ERROR_F = -1 - ! H5T_PAD_NPAD_F = 3 - - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_pad_c(type_id, lsbpad, msbpad) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PAD_C'::h5tget_pad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: lsbpad - INTEGER, INTENT(OUT) :: msbpad - END FUNCTION h5tget_pad_c - END INTERFACE - - 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 - SUBROUTINE h5tset_pad_f(type_id, lsbpad, msbpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: lsbpad ! padding type of the - ! least significant bit - INTEGER, INTENT(IN) :: msbpad ! padding type of the - ! most significant bit - ! Possible values of padding type are: - ! H5T_PAD_ZERO_F = 0 - ! H5T_PAD_ONE_F = 1 - ! H5T_PAD_BACKGROUND_F = 2 - ! H5T_PAD_ERROR_F = -1 - ! H5T_PAD_NPAD_F = 3 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_pad_c(type_id, lsbpad, msbpad) - USE H5GLOBAL - INTEGER(HID_T), INTENT(IN) :: type_id - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PAD_C'::h5tset_pad_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: lsbpad - INTEGER, INTENT(IN) :: msbpad - END FUNCTION h5tset_pad_c - END INTERFACE - - 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 - SUBROUTINE h5tget_sign_f(type_id, sign, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: sign ! sign type for an integer type - !possible values are: - !Unsigned integer type H5T_SGN_NONE_F = 0 - !Two's complement signed integer type - !H5T_SGN_2_F = 1 - !or error value: H5T_SGN_ERROR_F=-1 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_sign_c(type_id, sign) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SIGN_C'::h5tget_sign_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: sign - END FUNCTION h5tget_sign_c - END INTERFACE - - 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 proprety 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 - SUBROUTINE h5tset_sign_f(type_id, sign, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: sign !sign type for an integer type - !possible values are: - !Unsigned integer type H5T_SGN_NONE_F = 0 - !Two's complement signed integer type - !H5T_SGN_2_F = 1 - !or error value: H5T_SGN_ERROR_F=-1 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tset_sign_c(type_id, sign) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_SIGN_C'::h5tset_sign_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: sign - END FUNCTION h5tset_sign_c - END INTERFACE - - 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 - SUBROUTINE h5tget_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: spos ! sign bit-position - INTEGER(SIZE_T), INTENT(OUT) :: epos ! exponent bit-position - INTEGER(SIZE_T), INTENT(OUT) :: esize ! size of exponent in bits - INTEGER(SIZE_T), INTENT(OUT) :: mpos ! mantissa bit-position - INTEGER(SIZE_T), INTENT(OUT) :: msize ! size of mantissa in bits - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_fields_c(type_id, spos, epos, esize, mpos, msize) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_FIELDS_C'::h5tget_fields_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: spos - INTEGER(SIZE_T), INTENT(OUT) :: epos - INTEGER(SIZE_T), INTENT(OUT) :: esize - INTEGER(SIZE_T), INTENT(OUT) :: mpos - INTEGER(SIZE_T), INTENT(OUT) :: msize - END FUNCTION h5tget_fields_c - END INTERFACE - - 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 - SUBROUTINE h5tset_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: spos ! sign bit-position - INTEGER(SIZE_T), INTENT(IN) :: epos ! exponent bit-position - INTEGER(SIZE_T), INTENT(IN) :: esize ! size of exponent in bits - INTEGER(SIZE_T), INTENT(IN) :: mpos ! mantissa bit-position - INTEGER(SIZE_T), INTENT(IN) :: msize ! size of mantissa in bits - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tset_fields_c(type_id, spos, epos, esize, mpos, msize) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_FIELDS_C'::h5tset_fields_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: spos - INTEGER(SIZE_T), INTENT(IN) :: epos - INTEGER(SIZE_T), INTENT(IN) :: esize - INTEGER(SIZE_T), INTENT(IN) :: mpos - INTEGER(SIZE_T), INTENT(IN) :: msize - END FUNCTION h5tset_fields_c - END INTERFACE - - 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 - SUBROUTINE h5tget_ebias_f(type_id, ebias, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(OUT) :: ebias ! Datatype exponent bias of a floating-point type - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_ebias_c(type_id, ebias) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_EBIAS_C'::h5tget_ebias_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(OUT) :: ebias - END FUNCTION h5tget_ebias_c - END INTERFACE - - 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 - SUBROUTINE h5tset_ebias_f(type_id, ebias, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(SIZE_T), INTENT(IN) :: ebias !Datatype exponent bias of a floating-point type - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tset_ebias_c(type_id, ebias) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_EBIAS_C'::h5tset_ebias_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(SIZE_T), INTENT(IN) :: ebias - END FUNCTION h5tset_ebias_c - END INTERFACE - - 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(0) -! H5T_NORM_MSBSET_F(1) -! H5T_NORM_NONE_F(2) -! 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 h5tget_norm_f(type_id, norm, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: norm !mantissa normalization of a floating-point datatype - !Valid normalization types are: - !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not - !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of - !mantissa is always 1, H5T_NORM_NONE_F(2) - !Mantissa is not normalize - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_norm_c(type_id, norm) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NORM_C'::h5tget_norm_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: norm - END FUNCTION h5tget_norm_c - END INTERFACE - - 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(0) -! H5T_NORM_MSBSET_F(1) -! H5T_NORM_NONE_F(2) -! 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 h5tset_norm_f(type_id, norm, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: norm !mantissa normalization of a floating-point datatype - !Valid normalization types are: - !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not - !stored, always 1, H5T_NORM_MSBSET_F(1), MSB of - !mantissa is always 1, H5T_NORM_NONE_F(2) - !Mantissa is not normalize - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_norm_c(type_id, norm) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_NORM_C'::h5tset_norm_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: norm - END FUNCTION h5tset_norm_c - END INTERFACE - - 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 = 0 -! H5T_PAD_ONE_F = 1 -! H5T_PAD_BACKGROUND_F = 2 -! 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 h5tget_inpad_f(type_id, padtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: padtype ! padding type for unused bits - ! in floating-point datatypes. - ! Possible values of padding type are: - ! H5T__PAD_ZERO_F = 0 - ! H5T__PAD_ONE_F = 1 - ! H5T__PAD_BACKGROUND_F = 2 - - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_inpad_c(type_id, padtype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_INPAD_C'::h5tget_inpad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: padtype - END FUNCTION h5tget_inpad_c - END INTERFACE - - 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 = 0 -! H5T_PAD_ONE_F = 1 -! H5T_PAD_BACKGROUND_F = 2 -! 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 h5tset_inpad_f(type_id, padtype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: padtype ! padding type for unused bits - ! in floating-point datatypes. - ! Possible values of padding type are: - ! H5T__PAD_ZERO_F = 0 - ! H5T__PAD_ONE_F = 1 - ! H5T__PAD_BACKGROUND_F = 2 - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_inpad_c(type_id, padtype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_INPAD_C'::h5tset_inpad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: padtype - END FUNCTION h5tset_inpad_c - END INTERFACE - - 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 = 0 -! 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 - SUBROUTINE h5tget_cset_f(type_id, cset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: cset ! character set type of a string datatype - ! Possible values are: - ! H5T_CSET_ASCII_F = 0 - ! H5T_CSET_UTF8_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_cset_c(type_id, cset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CSET_C'::h5tget_cset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: cset - END FUNCTION h5tget_cset_c - END INTERFACE - - 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 = 0 -! 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 - SUBROUTINE h5tset_cset_f(type_id, cset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: cset !character set type of a string datatype - ! Possible values of padding type are: - ! H5T_CSET_ASCII_F = 0 - ! H5T_CSET_UTF8_F - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_cset_c(type_id, cset) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_CSET_C'::h5tset_cset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: cset - END FUNCTION h5tset_cset_c - END INTERFACE - - 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 - SUBROUTINE h5tget_strpad_f(type_id, strpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: strpad - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_strpad_c(type_id, strpad) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_STRPAD_C'::h5tget_strpad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: strpad - END FUNCTION h5tget_strpad_c - END INTERFACE - - 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 - SUBROUTINE h5tset_strpad_f(type_id, strpad, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: strpad ! string padding method for a string datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tset_strpad_c(type_id, strpad) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_STRPAD_C'::h5tset_strpad_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: strpad - END FUNCTION h5tset_strpad_c - END INTERFACE - - 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 - SUBROUTINE h5tget_nmembers_f(type_id, num_members, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: num_members !number of fields in a compound datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_nmembers_c(type_id, num_members) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NMEMBERS_C'::h5tget_nmembers_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: num_members - END FUNCTION h5tget_nmembers_c - END INTERFACE - - 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 - SUBROUTINE h5tget_member_name_f(type_id, index, member_name, namelen, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: index !Field index (0-based) of the field name to retrieve - CHARACTER(LEN=*), INTENT(OUT) :: member_name !name of a field of - !a compound datatype - INTEGER, INTENT(OUT) :: namelen ! Length of the name - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_member_name_c(type_id, index, member_name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_NAME_C'::h5tget_member_name_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: member_name - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: index - CHARACTER(LEN=*), INTENT(OUT) :: member_name - INTEGER, INTENT(OUT) :: namelen - END FUNCTION - END INTERFACE - - 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 - SUBROUTINE h5tget_member_offset_f(type_id, member_no, offset, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: member_no !Number of the field - !whose offset is requested - INTEGER(SIZE_T), INTENT(OUT) :: offset !byte offset of the beginning of the field - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_member_offset_c(type_id, member_no, offset ) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_OFFSET_C'::h5tget_member_offset_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER(SIZE_T), INTENT(OUT) :: offset - END FUNCTION h5tget_member_offset_c - END INTERFACE - - 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 - SUBROUTINE h5tget_member_index_f(type_id, name, index, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name ! Field or member name - INTEGER, INTENT(OUT) :: index ! Field or member index - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen ! Name length - - INTERFACE - INTEGER FUNCTION h5tget_member_index_c(type_id, name, namelen, index) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_INDEX_C'::h5tget_member_index_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference ::name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: namelen - INTEGER, INTENT(OUT) :: index - END FUNCTION h5tget_member_index_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tget_member_index_c(type_id, name, namelen, index) - END SUBROUTINE h5tget_member_index_f - - -! !$! -! !$!****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 -! !$! 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 - SUBROUTINE h5tget_array_dims_f(type_id, dims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier - INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims !buffer to store array datatype - ! dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_array_dims_c(type_id, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ARRAY_DIMS_C'::h5tget_array_dims_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) :: dims - END FUNCTION h5tget_array_dims_c - END INTERFACE - - hdferr = h5tget_array_dims_c(type_id, dims) - - 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 - SUBROUTINE h5tget_array_ndims_f(type_id, ndims, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier - INTEGER, INTENT(OUT) :: ndims ! number of array dimensions - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_array_ndims_c(type_id, ndims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ARRAY_NDIMS_C'::h5tget_array_ndims_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(OUT) :: ndims - END FUNCTION h5tget_array_ndims_c - END INTERFACE - - hdferr = h5tget_array_ndims_c(type_id, ndims) - - 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 - SUBROUTINE h5tget_super_f(type_id, base_type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier - INTEGER(HID_T), INTENT(OUT) :: base_type_id ! identifier of the datatype - ! from which datatype (type_id) was derived - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_super_c(type_id, base_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SUPER_C'::h5tget_super_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: base_type_id - END FUNCTION h5tget_super_c - END INTERFACE - - hdferr = h5tget_super_c(type_id, base_type_id) - - 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 - idnetifier 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 - SUBROUTINE h5tget_member_type_f(type_id, field_idx, datatype, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of the field type to retrieve - INTEGER(HID_T), INTENT(OUT) :: datatype !identifier of a copy of - !the datatype of the field - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_member_type_c(type_id, field_idx , datatype) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_TYPE_C'::h5tget_member_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: field_idx - INTEGER(HID_T), INTENT(OUT) :: datatype - END FUNCTION h5tget_member_type_c - END INTERFACE - - 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 - 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) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCREATE_C'::h5tcreate_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: class - INTEGER(SIZE_T), INTENT(IN) :: size - INTEGER(HID_T), INTENT(OUT) :: type_id - END FUNCTION h5tcreate_c - END INTERFACE - - 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 dattype 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 - SUBROUTINE h5tinsert_f(type_id, name, offset, field_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name !Name of the field to insert - INTEGER(SIZE_T), INTENT(IN) :: offset !start of the member in an instance of - !the compound datatype - INTEGER(HID_T), INTENT(IN) :: field_id !datatype identifier of the new member - - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tinsert_c(type_id, name, namelen, offset, field_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TINSERT_C'::h5tinsert_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER(SIZE_T), INTENT(IN) :: offset - INTEGER(HID_T), INTENT(IN) :: field_id - INTEGER :: namelen - END FUNCTION h5tinsert_c - END INTERFACE - - namelen = LEN(name) - 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 - SUBROUTINE h5tpack_f(type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tpack_c(type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TPACK_C'::h5tpack_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - END FUNCTION h5tpack_c - END INTERFACE - - hdferr = h5tpack_c(type_id) - 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 -! 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 -! hdferr = h5tinsert_array_c(parent_id, name, namelen, offset, ndims,dims, member_id, perm) -! else -! hdferr = h5tinsert_array_c2(parent_id, name, namelen, offset, ndims,dims, member_id) -! end if -! -! 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 - SUBROUTINE h5tarray_create_f(base_id, rank, dims, type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: base_id ! identifier of array base datatype - INTEGER, INTENT(IN) :: rank ! Rank of the array - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims !Sizes of each array dimension - INTEGER(HID_T), INTENT(OUT) :: type_id ! identifier of the array datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tarray_create_c(base_id, rank, dims, type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TARRAY_CREATE_C'::h5tarray_create_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: base_id - INTEGER, INTENT(IN) :: rank - INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims - INTEGER(HID_T), INTENT(OUT) :: type_id - END FUNCTION h5tarray_create_c - END INTERFACE - - hdferr = h5tarray_create_c(base_id, rank, dims, type_id) - - 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 - SUBROUTINE h5tenum_create_f(parent_id, new_type_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: parent_id ! Datatype identifier for - ! the base datatype - INTEGER(HID_T), INTENT(OUT) :: new_type_id - !datatype identifier for the - ! new enumeration datatype - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tenum_create_c(parent_id, new_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_CREATE_C'::h5tenum_create_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: parent_id - INTEGER(HID_T), INTENT(OUT) :: new_type_id - END FUNCTION h5tenum_create_c - END INTERFACE - - 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 - SUBROUTINE h5tenum_nameof_f(type_id, value, namelen, name, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(OUT) :: name !Name of the enumeration datatype. - INTEGER(SIZE_T), INTENT(IN) :: namelen !length of the name - INTEGER, INTENT(IN) :: value !value of the enumeration datatype. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tenum_nameof_c(type_id, value, name, namelen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_NAMEOF_C'::h5tenum_nameof_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(OUT) :: name - INTEGER(SIZE_T), INTENT(IN) :: namelen - INTEGER, INTENT(IN) :: value - END FUNCTION h5tenum_nameof_c - END INTERFACE - - name(1:LEN(name)) = ' ' - - 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 - SUBROUTINE h5tenum_valueof_f(type_id, name, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name !Name of the enumeration datatype. - INTEGER, INTENT(OUT) :: value !value of the enumeration datatype. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen - - INTERFACE - INTEGER FUNCTION h5tenum_valueof_c(type_id, name, namelen, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_VALUEOF_C'::h5tenum_valueof_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: namelen - INTEGER, INTENT(OUT) :: value - END FUNCTION h5tenum_valueof_c - END INTERFACE - - namelen = LEN(name) - 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 - SUBROUTINE h5tget_member_value_f(type_id, member_no, value, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: member_no !Number of the enumeration datatype member - INTEGER, INTENT(OUT) :: value !value of the enumeration datatype. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tget_member_value_c(type_id, member_no, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_VALUE_C'::h5tget_member_value_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER, INTENT(OUT) :: value - END FUNCTION - END INTERFACE - - 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 - SUBROUTINE h5tset_tag_f(type_id, tag, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: tag !Unique ASCII string with which - !the opaque datatype is to be tagged - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: taglen - - INTERFACE - INTEGER FUNCTION h5tset_tag_c(type_id, tag, taglen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_TAG_C'::h5tset_tag_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: tag - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: tag - INTEGER :: taglen - END FUNCTION h5tset_tag_c - END INTERFACE - - taglen = LEN(tag) - 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 -! 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 h5tget_tag_f(type_id, tag,taglen, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(OUT) :: tag ! Unique ASCII string with which - ! the opaque datatype is to be tagged - INTEGER, INTENT(OUT) :: taglen ! Length of tag - INTEGER(SIZE_T) :: tag_size ! Declared character length of tab - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_tag_c(type_id, tag, tag_size, taglen) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_TAG_C'::h5tget_tag_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: tag - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(OUT) :: tag - INTEGER(SIZE_T), INTENT(IN) :: tag_size - INTEGER, INTENT(OUT) :: taglen - END FUNCTION h5tget_tag_c - END INTERFACE - - tag_size = LEN(tag) - - 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 - SUBROUTINE h5tvlen_create_f(type_id, vltype_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER(HID_T), INTENT(OUT) :: vltype_id ! VL datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tvlen_create_c(type_id, vltype_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TVLEN_CREATE_C'::h5tvlen_create_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER(HID_T), INTENT(OUT) :: vltype_id - END FUNCTION h5tvlen_create_c - END INTERFACE - - 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 -! hdferr - Returns 0 if successful and -1 if fails -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE - SUBROUTINE h5tis_variable_str_f(type_id, status, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - LOGICAL, INTENT(OUT) :: status ! Flag, idicates if datatype - ! is a variable string or not ( TRUE or - ! FALSE) - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: flag ! "TRUE/FALSE/ERROR from C" - - INTERFACE - INTEGER FUNCTION h5tis_variable_str_c(type_id, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TIS_VARIABLE_STR_C'::h5tis_variable_str_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER :: flag - END FUNCTION h5tis_variable_str_c - END INTERFACE - - hdferr = h5tis_variable_str_c(type_id, flag) - status = .TRUE. - if (flag .EQ. 0) status = .FALSE. - - 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 - SUBROUTINE h5tget_member_class_f(type_id, member_no, class, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - INTEGER, INTENT(IN) :: member_no ! Member number - INTEGER, INTENT(OUT) :: class ! Member class - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tget_member_class_c(type_id, member_no, class) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_CLASS_C'::h5tget_member_class_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: type_id - INTEGER, INTENT(IN) :: member_no - INTEGER, INTENT(OUT) :: class - END FUNCTION h5tget_member_class_c - END INTERFACE - - hdferr = h5tget_member_class_c(type_id, member_no, class) - - 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 - SUBROUTINE h5tcommit_anon_f(loc_id, dtype_id, hdferr, tcpl_id, tapl_id) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: loc_id ! A file or group identifier specifying - ! the file in which the new named datatype - ! is to be created. - INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! A datatype creation property - ! list identifier. - ! (H5P_DEFAULT_F for the default property list.) - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! A datatype access property list identifier. - ! should always be passed as the value H5P_DEFAULT_F. -!***** - INTEGER(HID_T) :: tcpl_id_default - INTEGER(HID_T) :: tapl_id_default - - INTERFACE - INTEGER FUNCTION h5tcommit_anon_c(loc_id, dtype_id, & - tcpl_id_default, tapl_id_default) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMIT_ANON_C'::h5tcommit_anon_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: loc_id - INTEGER(HID_T), INTENT(IN) :: dtype_id - INTEGER(HID_T) :: tcpl_id_default - INTEGER(HID_T) :: tapl_id_default - END FUNCTION h5tcommit_anon_c - END INTERFACE - - tcpl_id_default = H5P_DEFAULT_F - tapl_id_default = H5P_DEFAULT_F - - IF(PRESENT(tcpl_id)) tcpl_id_default = tcpl_id - IF(PRESENT(tapl_id)) tapl_id_default = tapl_id - - hdferr = h5tcommit_anon_c(loc_id, dtype_id, & - tcpl_id_default, tapl_id_default ) - - 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 - SUBROUTINE h5tcommitted_f(dtype_id, committed, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id ! A datatype identifier - LOGICAL, INTENT(OUT) :: committed ! .TRUE., if the datatype has been committed - !.FALSE., if the datatype has not been committed. - INTEGER, INTENT(OUT) :: hdferr ! Error code: -! Success: 0 -! Failure: -1 -!***** - INTERFACE - INTEGER FUNCTION h5tcommitted_c(dtype_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMITTED_C'::h5tcommitted_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dtype_id - END FUNCTION h5tcommitted_c - END INTERFACE - - hdferr = h5tcommitted_c(dtype_id) - - IF(hdferr.GT.0)THEN - committed = .TRUE. - hdferr = 0 - ELSE IF(hdferr.EQ.0)THEN - committed = .FALSE. - hdferr = 0 - ELSE - hdferr = -1 - ENDIF - - - 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 - SUBROUTINE h5tdecode_f(buf, obj_id, hdferr) - IMPLICIT NONE - CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded. - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5tdecode_c(buf, obj_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TDECODE_C'::h5tdecode_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - CHARACTER(LEN=*), INTENT(IN) :: buf - INTEGER(HID_T), INTENT(OUT) :: obj_id ! Object ID - END FUNCTION h5tdecode_c - END INTERFACE - - hdferr = h5tdecode_c(buf, obj_id) - - 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 - SUBROUTINE h5tencode_f(obj_id, buf, nalloc, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded. - CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into. - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer. - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5tencode_c(buf, obj_id, nalloc) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENCODE_C'::h5tencode_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: obj_id - CHARACTER(LEN=*), INTENT(OUT) :: buf - INTEGER(SIZE_T), INTENT(INOUT) :: nalloc - END FUNCTION h5tencode_c - END INTERFACE - - hdferr = h5tencode_c(buf, obj_id, nalloc) - - 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 - SUBROUTINE h5tget_create_plist_f(dtype_id, dtpl_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier - INTEGER(HID_T), INTENT(OUT) :: dtpl_id ! Datatype property list identifier. - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5tget_create_plist_c(dtype_id, dtpl_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CREATE_PLIST_C'::h5tget_create_plist_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dtype_id - INTEGER(HID_T), INTENT(OUT) :: dtpl_id - END FUNCTION h5tget_create_plist_c - END INTERFACE - - 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) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: src_id ! Identifier for the source datatype. - INTEGER(HID_T), INTENT(IN) :: dst_id ! Identifier for the destination datatype. - LOGICAL, INTENT(OUT) :: flag ! .TRUE. for compiler conversion, .FALSE. for library conversion - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTEGER :: c_flag - - INTERFACE - INTEGER FUNCTION h5tcompiler_conv_c(src_id, dst_id, c_flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMPILER_CONV_C'::h5tcompiler_conv_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: src_id - INTEGER(HID_T), INTENT(IN) :: dst_id - INTEGER :: c_flag - END FUNCTION h5tcompiler_conv_c - END INTERFACE - - hdferr = h5tcompiler_conv_c(src_id, dst_id, c_flag) - - flag = .FALSE. - IF(c_flag .GT. 0) flag = .TRUE. - - 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 = 0, /*default direction is inscendent */ -! H5T_DIR_ASCEND = 1, /*in inscendent order */ -! H5T_DIR_DESCEND = 2 /*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 - SUBROUTINE h5tget_native_type_f(dtype_id, direction, native_dtype_id, hdferr) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: dtype_id ! Datatype identifier - INTEGER, INTENT(IN) :: direction ! Direction of search: - ! H5T_DIR_ASCEND_F = 1 in inscendent order - ! H5T_DIR_DESCEND_F = 2 in descendent order - INTEGER(HID_T), INTENT(OUT) :: native_dtype_id ! The native datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code: - ! 0 on success and -1 on failure -!***** - INTERFACE - INTEGER FUNCTION h5tget_native_type_c(dtype_id, direction, native_dtype_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NATIVE_TYPE_C'::h5tget_native_type_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dtype_id - INTEGER, INTENT(IN) :: direction - INTEGER(HID_T), INTENT(OUT) :: native_dtype_id - END FUNCTION h5tget_native_type_c - END INTERFACE - - hdferr = h5tget_native_type_c(dtype_id, direction, native_dtype_id) - END SUBROUTINE h5tget_native_type_f - -!****s* H5T (F03)/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: - SUBROUTINE h5tconvert_f(src_id, dst_id, nelmts, buf, hdferr, background, plist_id) - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: src_id - INTEGER(HID_T) , INTENT(IN) :: dst_id - INTEGER(SIZE_T), INTENT(IN) :: nelmts - TYPE(C_PTR) , INTENT(INOUT) :: buf - 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 - - INTERFACE - INTEGER FUNCTION h5tconvert_c(src_id, dst_id, nelmts, buf, background, plist_id) & - BIND(C, NAME='h5tconvert_c') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr - USE H5GLOBAL - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: src_id - INTEGER(HID_T) , INTENT(IN) :: dst_id - INTEGER(SIZE_T), INTENT(IN) :: nelmts - TYPE(C_PTR) , VALUE :: buf - TYPE(C_PTR) , VALUE :: background - INTEGER(HID_T) , INTENT(IN) :: plist_id - END FUNCTION h5tconvert_c - END INTERFACE - - plist_id_default = H5P_DEFAULT_F - IF(PRESENT(plist_id)) plist_id_default = plist_id - - background_default = C_NULL_PTR - IF(PRESENT(background)) background_default = background - - hdferr = H5Tconvert_c(src_id, dst_id, nelmts, buf, background_default, plist_id_default) - - END SUBROUTINE h5tconvert_f -! -!****s* (F03) 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) - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier - CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member - INTEGER, INTENT(IN) :: value ! value of the new member - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: namelen - INTERFACE - INTEGER FUNCTION h5tenum_insert_c(type_id, name, namelen, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_INSERT_C'::h5tenum_insert_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: value - INTEGER :: namelen - END FUNCTION h5tenum_insert_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_insert_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_insert_f90 - -! -!****s* (F03) 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) - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char - USE H5GLOBAL - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: type_id - CHARACTER(LEN=*), INTENT(IN) :: name - TYPE(C_PTR) , 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') - USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, c_char - USE H5GLOBAL - IMPLICIT NONE - INTEGER(HID_T) , INTENT(IN) :: type_id - CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name - INTEGER :: namelen - TYPE(C_PTR), VALUE :: value - END FUNCTION h5tenum_insert_ptr_c - END INTERFACE - - namelen = LEN(name) - hdferr = h5tenum_insert_ptr_c(type_id, name, namelen, value) - END SUBROUTINE h5tenum_insert_f03 - -END MODULE H5T diff --git a/fortran/src/H5Zff.F90 b/fortran/src/H5Zff.F90 new file mode 100644 index 0000000..7b67b5b --- /dev/null +++ b/fortran/src/H5Zff.F90 @@ -0,0 +1,198 @@ +!****h* ROBODoc/H5Z +! +! NAME +! MODULE H5Z +! +! PURPOSE +! This file contains Fortran interfaces for H5Z functions. It includes +! all the functions that are independent on whether the Fortran 2003 functions +! are enabled or disabled. +! +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! NOTES +! *** IMPORTANT *** +! If you add a new H5Z 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. +! +!***** + +MODULE H5Z + + USE H5GLOBAL + +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 + SUBROUTINE h5zunregister_f(filter, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTERFACE + INTEGER FUNCTION h5zunregister_c (filter) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZUNREGISTER_C':: h5zunregister_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: filter + END FUNCTION h5zunregister_c + END INTERFACE + 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 +! OUTPUTS +! status - status; .TRUE. if filter is available, +! .FALSE. otherwise +! hdferr: - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! Elena Pourmal +! March 12, 2003 +! +! SOURCE + SUBROUTINE h5zfilter_avail_f(filter, status, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: 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 + LOGICAL, INTENT(OUT) :: status ! Flag, idicates if filter + ! is availble not ( TRUE or + ! FALSE) + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: flag ! "TRUE/FALSE/ERROR from C" + + INTERFACE + INTEGER FUNCTION h5zfilter_avail_c(filter, flag) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZFILTER_AVAIL_C'::h5zfilter_avail_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: filter + INTEGER :: flag + END FUNCTION h5zfilter_avail_c + END INTERFACE + + hdferr = h5zfilter_avail_c(filter, flag) + status = .TRUE. + IF (flag .EQ. 0) status = .FALSE. + + 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 +! OUTPUTS +! config_flags - Bit vector 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 + SUBROUTINE h5zget_filter_info_f(filter, config_flags, hdferr) + IMPLICIT NONE + INTEGER, INTENT(IN) :: 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 + INTEGER, INTENT(OUT) :: config_flags! Flag, indicates if filter + ! has its encoder and/or decoder + ! available + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + + INTERFACE + INTEGER FUNCTION h5zget_filter_info_c(filter, config_flags) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZGET_FILTER_INFO_C'::h5zget_filter_info_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: filter + INTEGER, INTENT(OUT) :: config_flags + END FUNCTION h5zget_filter_info_c + END INTERFACE + + hdferr = h5zget_filter_info_c(filter, config_flags) + + END SUBROUTINE h5zget_filter_info_f + +END MODULE H5Z + + + + + diff --git a/fortran/src/H5Zff.f90 b/fortran/src/H5Zff.f90 deleted file mode 100644 index 7b67b5b..0000000 --- a/fortran/src/H5Zff.f90 +++ /dev/null @@ -1,198 +0,0 @@ -!****h* ROBODoc/H5Z -! -! NAME -! MODULE H5Z -! -! PURPOSE -! This file contains Fortran interfaces for H5Z functions. It includes -! all the functions that are independent on whether the Fortran 2003 functions -! are enabled or disabled. -! -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! NOTES -! *** IMPORTANT *** -! If you add a new H5Z 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. -! -!***** - -MODULE H5Z - - USE H5GLOBAL - -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 - SUBROUTINE h5zunregister_f(filter, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTERFACE - INTEGER FUNCTION h5zunregister_c (filter) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZUNREGISTER_C':: h5zunregister_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: filter - END FUNCTION h5zunregister_c - END INTERFACE - 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 -! OUTPUTS -! status - status; .TRUE. if filter is available, -! .FALSE. otherwise -! hdferr: - error code -! Success: 0 -! Failure: -1 -! -! AUTHOR -! Elena Pourmal -! March 12, 2003 -! -! SOURCE - SUBROUTINE h5zfilter_avail_f(filter, status, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: 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 - LOGICAL, INTENT(OUT) :: status ! Flag, idicates if filter - ! is availble not ( TRUE or - ! FALSE) - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: flag ! "TRUE/FALSE/ERROR from C" - - INTERFACE - INTEGER FUNCTION h5zfilter_avail_c(filter, flag) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZFILTER_AVAIL_C'::h5zfilter_avail_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: filter - INTEGER :: flag - END FUNCTION h5zfilter_avail_c - END INTERFACE - - hdferr = h5zfilter_avail_c(filter, flag) - status = .TRUE. - IF (flag .EQ. 0) status = .FALSE. - - 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 -! OUTPUTS -! config_flags - Bit vector 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 - SUBROUTINE h5zget_filter_info_f(filter, config_flags, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: 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 - INTEGER, INTENT(OUT) :: config_flags! Flag, indicates if filter - ! has its encoder and/or decoder - ! available - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - - INTERFACE - INTEGER FUNCTION h5zget_filter_info_c(filter, config_flags) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5ZGET_FILTER_INFO_C'::h5zget_filter_info_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: filter - INTEGER, INTENT(OUT) :: config_flags - END FUNCTION h5zget_filter_info_c - END INTERFACE - - hdferr = h5zget_filter_info_c(filter, config_flags) - - END SUBROUTINE h5zget_filter_info_f - -END MODULE H5Z - - - - - diff --git a/fortran/src/H5_DBLE_InterfaceExclude.F90 b/fortran/src/H5_DBLE_InterfaceExclude.F90 new file mode 100644 index 0000000..2a3e26f --- /dev/null +++ b/fortran/src/H5_DBLE_InterfaceExclude.F90 @@ -0,0 +1,39 @@ +!****h* fortran/src/H5_DBLE_InterfaceExclude.f90 +! +! NAME +! H5_DBLE_INTERFACE +! +! FUNCTION +! This module is used for when the default REAL is of type DOUBLE PRECISION. +! We do not include the double precision interfaces if the defaut REAL is +! DOUBLE PRECISION since this would lead to a non-unique conflict with the +! generic interfaces declared as REAL and those declared as DOUBLE PRECISION. +! +! NOTES +! Empty module. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +MODULE H5_DBLE_INTERFACE + + +END MODULE H5_DBLE_INTERFACE diff --git a/fortran/src/H5_DBLE_InterfaceExclude.f90 b/fortran/src/H5_DBLE_InterfaceExclude.f90 deleted file mode 100644 index 2a3e26f..0000000 --- a/fortran/src/H5_DBLE_InterfaceExclude.f90 +++ /dev/null @@ -1,39 +0,0 @@ -!****h* fortran/src/H5_DBLE_InterfaceExclude.f90 -! -! NAME -! H5_DBLE_INTERFACE -! -! FUNCTION -! This module is used for when the default REAL is of type DOUBLE PRECISION. -! We do not include the double precision interfaces if the defaut REAL is -! DOUBLE PRECISION since this would lead to a non-unique conflict with the -! generic interfaces declared as REAL and those declared as DOUBLE PRECISION. -! -! NOTES -! Empty module. -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -MODULE H5_DBLE_INTERFACE - - -END MODULE H5_DBLE_INTERFACE diff --git a/fortran/src/H5_DBLE_InterfaceInclude.F90 b/fortran/src/H5_DBLE_InterfaceInclude.F90 new file mode 100644 index 0000000..11e0a85 --- /dev/null +++ b/fortran/src/H5_DBLE_InterfaceInclude.F90 @@ -0,0 +1,1859 @@ +!****h* fortran/src/H5_DBLE_InterfaceInclude.f90 +! +! NAME +! H5_DBLE_INTERFACE +! +! FUNCTION +! This module is used for when the default REAL is not of the type DOUBLE PRECISION. +! We only do not include the double precision interfaces if the defaut REAL is +! DOUBLE PRECISION since this would lead to a non-unique conflict with the +! generic interfaces declared as REAL. Otherwise it is okay to include the interfaces. +! +! NOTES +! This module contains all the DOUBLE PRECISION interfaces and corresponding subroutines +! from the HDF function catagory H5A, H5D and H5P. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +MODULE H5_DBLE_INTERFACE + + USE H5GLOBAL + + ! + ! ----- H5A ---- + ! + INTERFACE h5awrite_f + MODULE PROCEDURE h5awrite_double_scalar + MODULE PROCEDURE h5awrite_double_1 + MODULE PROCEDURE h5awrite_double_2 + MODULE PROCEDURE h5awrite_double_3 + MODULE PROCEDURE h5awrite_double_4 + MODULE PROCEDURE h5awrite_double_5 + MODULE PROCEDURE h5awrite_double_6 + MODULE PROCEDURE h5awrite_double_7 + END INTERFACE + + INTERFACE h5aread_f + MODULE PROCEDURE h5aread_double_scalar + MODULE PROCEDURE h5aread_double_1 + MODULE PROCEDURE h5aread_double_2 + MODULE PROCEDURE h5aread_double_3 + MODULE PROCEDURE h5aread_double_4 + MODULE PROCEDURE h5aread_double_5 + MODULE PROCEDURE h5aread_double_6 + MODULE PROCEDURE h5aread_double_7 + END INTERFACE + ! + ! ----- H5D ---- + ! + INTERFACE h5dwrite_f + MODULE PROCEDURE h5dwrite_double_scalar + MODULE PROCEDURE h5dwrite_double_1 + MODULE PROCEDURE h5dwrite_double_2 + MODULE PROCEDURE h5dwrite_double_3 + MODULE PROCEDURE h5dwrite_double_4 + MODULE PROCEDURE h5dwrite_double_5 + MODULE PROCEDURE h5dwrite_double_6 + MODULE PROCEDURE h5dwrite_double_7 + END INTERFACE + + INTERFACE h5dread_f + MODULE PROCEDURE h5dread_double_scalar + MODULE PROCEDURE h5dread_double_1 + MODULE PROCEDURE h5dread_double_2 + MODULE PROCEDURE h5dread_double_3 + MODULE PROCEDURE h5dread_double_4 + MODULE PROCEDURE h5dread_double_5 + MODULE PROCEDURE h5dread_double_6 + MODULE PROCEDURE h5dread_double_7 + END INTERFACE + + INTERFACE h5dfill_f + MODULE PROCEDURE h5dfill_double + END INTERFACE + + ! + ! ----- H5P ---- + ! + INTERFACE h5pset_fill_value_f + MODULE PROCEDURE h5pset_fill_value_double + END INTERFACE + + INTERFACE h5pget_fill_value_f + MODULE PROCEDURE h5pget_fill_value_double + END INTERFACE + + INTERFACE h5pset_f + MODULE PROCEDURE h5pset_double + END INTERFACE + + INTERFACE h5pget_f + MODULE PROCEDURE h5pget_double + END INTERFACE + + INTERFACE h5pregister_f + MODULE PROCEDURE h5pregister_double + END INTERFACE + + INTERFACE h5pinsert_f + MODULE PROCEDURE h5pinsert_double + END INTERFACE + +CONTAINS + + ! + ! ----- H5A ---- + ! + SUBROUTINE h5awrite_double_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 + DOUBLE PRECISION, INTENT(IN) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_s_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_s_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_S_C'::h5awrite_double_s_c + !DEC$ENDIF + 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 + DOUBLE PRECISION, INTENT(IN)::buf + END FUNCTION h5awrite_double_s_c + END INTERFACE + + hdferr = h5awrite_double_s_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_scalar + + SUBROUTINE h5awrite_double_1(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 + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1)) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_1_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_1_C'::h5awrite_double_1_c + !DEC$ENDIF + 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 + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5awrite_double_1_c + END INTERFACE + + hdferr = h5awrite_double_1_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_1 + + + SUBROUTINE h5awrite_double_2(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 + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_2_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_2_C'::h5awrite_double_2_c + !DEC$ENDIF + 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 + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5awrite_double_2_c + END INTERFACE + + hdferr = h5awrite_double_2_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_2 + + + SUBROUTINE h5awrite_double_3(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 + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_3_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_3_C'::h5awrite_double_3_c + !DEC$ENDIF + 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 + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5awrite_double_3_c + END INTERFACE + + hdferr = h5awrite_double_3_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_3 + + + SUBROUTINE h5awrite_double_4(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 + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_4_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_4_C'::h5awrite_double_4_c + !DEC$ENDIF + 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 + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5awrite_double_4_c + END INTERFACE + + hdferr = h5awrite_double_4_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_4 + + + SUBROUTINE h5awrite_double_5(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 + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_5_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_5_C'::h5awrite_double_5_c + !DEC$ENDIF + 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 + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5awrite_double_5_c + END INTERFACE + + hdferr = h5awrite_double_5_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_5 + + + SUBROUTINE h5awrite_double_6(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 + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_6_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_6_C'::h5awrite_double_6_c + !DEC$ENDIF + 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 + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5awrite_double_6_c + END INTERFACE + + hdferr = h5awrite_double_6_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_6 + + + SUBROUTINE h5awrite_double_7(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 + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5awrite_double_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5awrite_double_7_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_7_C'::h5awrite_double_7_c + !DEC$ENDIF + 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 + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5awrite_double_7_c + END INTERFACE + + hdferr = h5awrite_double_7_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_7 + + + SUBROUTINE h5aread_double_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 + DOUBLE PRECISION, INTENT(INOUT) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_s_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_s_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_S_C'::h5aread_double_s_c + !DEC$ENDIF + 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 + DOUBLE PRECISION, INTENT(INOUT)::buf + END FUNCTION h5aread_double_s_c + END INTERFACE + + hdferr = h5aread_double_s_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_scalar + + SUBROUTINE h5aread_double_1(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 + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_1_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_1_C'::h5aread_double_1_c + !DEC$ENDIF + 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 + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5aread_double_1_c + END INTERFACE + + hdferr = h5aread_double_1_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_1 + + + SUBROUTINE h5aread_double_2(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 + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_2_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_2_C'::h5aread_double_2_c + !DEC$ENDIF + 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 + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5aread_double_2_c + END INTERFACE + + hdferr = h5aread_double_2_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_2 + + + SUBROUTINE h5aread_double_3(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 + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_3_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_3_C'::h5aread_double_3_c + !DEC$ENDIF + 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 + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5aread_double_3_c + END INTERFACE + + hdferr = h5aread_double_3_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_3 + + + SUBROUTINE h5aread_double_4(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 + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_4_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_4_C'::h5aread_double_4_c + !DEC$ENDIF + 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 + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5aread_double_4_c + END INTERFACE + + hdferr = h5aread_double_4_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_4 + + + SUBROUTINE h5aread_double_5(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 + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_5_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_5_C'::h5aread_double_5_c + !DEC$ENDIF + 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 + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5aread_double_5_c + END INTERFACE + + hdferr = h5aread_double_5_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_5 + + + SUBROUTINE h5aread_double_6(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 + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_6_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_6_C'::h5aread_double_6_c + !DEC$ENDIF + 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 + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5aread_double_6_c + END INTERFACE + + hdferr = h5aread_double_6_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_6 + + + SUBROUTINE h5aread_double_7(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 + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + + ! INTEGER, EXTERNAL :: h5aread_double_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5aread_double_7_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_7_C'::h5aread_double_7_c + !DEC$ENDIF + 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 + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5aread_double_7_c + END INTERFACE + + hdferr = h5aread_double_7_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_7 + + + ! + ! ----- H5D ---- + ! + SUBROUTINE h5dwrite_double_scalar(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_s_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_s_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_S_C'::h5dwrite_double_s_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN) :: buf + END FUNCTION h5dwrite_double_s_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_s_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_scalar + + SUBROUTINE h5dwrite_double_1(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_1_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_1_C'::h5dwrite_double_1_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5dwrite_double_1_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_1_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_1 + + SUBROUTINE h5dwrite_double_2(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_2_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_2_C'::h5dwrite_double_2_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dwrite_double_2_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_2_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_2 + + SUBROUTINE h5dwrite_double_3(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_3_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_3_C'::h5dwrite_double_3_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5dwrite_double_3_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_3_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_3 + + SUBROUTINE h5dwrite_double_4(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_4_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_4_C'::h5dwrite_double_4_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5dwrite_double_4_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_4_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_4 + + SUBROUTINE h5dwrite_double_5(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_5_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_5_C'::h5dwrite_double_5_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5dwrite_double_5_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_5_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_5 + + SUBROUTINE h5dwrite_double_6(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_6_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_6_C'::h5dwrite_double_6_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5dwrite_double_6_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_6_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_6 + + SUBROUTINE h5dwrite_double_7(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dwrite_double_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dwrite_double_7_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_7_C'::h5dwrite_double_7_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(IN), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5dwrite_double_7_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dwrite_double_7_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dwrite_double_7 + + SUBROUTINE h5dread_double_scalar(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT) :: buf ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_s_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_s_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_S_C'::h5dread_double_s_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(OUT) :: buf + END FUNCTION h5dread_double_s_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_s_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_scalar + + SUBROUTINE h5dread_double_1(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_1_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_1_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_1_C'::h5dread_double_1_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1)) :: buf + END FUNCTION h5dread_double_1_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_1_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_1 + + SUBROUTINE h5dread_double_2(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_2_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_2_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_2_C'::h5dread_double_2_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2)) :: buf + END FUNCTION h5dread_double_2_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_2_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_2 + + SUBROUTINE h5dread_double_3(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_3_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_3_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_3_C'::h5dread_double_3_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3)) :: buf + END FUNCTION h5dread_double_3_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_3_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_3 + + SUBROUTINE h5dread_double_4(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_4_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_4_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_4_C'::h5dread_double_4_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf + END FUNCTION h5dread_double_4_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_4_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_4 + + SUBROUTINE h5dread_double_5(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_5_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_5_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_5_C'::h5dread_double_5_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf + END FUNCTION h5dread_double_5_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_5_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_5 + + SUBROUTINE h5dread_double_6(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_6_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_6_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_6_C'::h5dread_double_6_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf + END FUNCTION h5dread_double_6_c + END INTERFACE + + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_6_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_6 + + SUBROUTINE h5dread_double_7(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + ! Data buffer + INTEGER, INTENT(OUT) :: hdferr ! Error code + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id + ! Memory dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id + ! File dataspace identfier + INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp + ! Transfer property list identifier + + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + + ! INTEGER, EXTERNAL :: h5dread_double_7_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dread_double_7_c(dset_id, mem_type_id, & + mem_space_id_default, & + file_space_id_default, & + xfer_prp_default, buf, dims) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_7_C'::h5dread_double_7_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: dset_id + INTEGER(HID_T), INTENT(IN) :: mem_type_id + INTEGER(HID_T) :: mem_space_id_default + INTEGER(HID_T) :: file_space_id_default + INTEGER(HID_T) :: xfer_prp_default + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims + DOUBLE PRECISION, INTENT(INOUT), & + DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf + END FUNCTION h5dread_double_7_c + END INTERFACE + + xfer_prp_default = H5P_DEFAULT_F + mem_space_id_default = H5S_ALL_F + file_space_id_default = H5S_ALL_F + + if (present(xfer_prp)) xfer_prp_default = xfer_prp + if (present(mem_space_id)) mem_space_id_default = mem_space_id + if (present(file_space_id)) file_space_id_default = file_space_id + + hdferr = h5dread_double_7_c(dset_id, mem_type_id, mem_space_id_default, & + file_space_id_default, xfer_prp_default, buf, dims) + + END SUBROUTINE h5dread_double_7 + + !---------------------------------------------------------------------- + ! Name: h5dfill_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 - data buffer iin memory ro apply selection to + ! - of k-th dimension of the buf array + ! Outputs: + ! hdferr: - error code + ! Success: 0 + ! Failure: -1 + ! + ! Programmer: Elena Pourmal + ! March 12, 2003 + ! + !---------------------------------------------------------------------- + + SUBROUTINE h5dfill_double(fill_value, space_id, buf, hdferr) + IMPLICIT NONE + DOUBLE PRECISION, INTENT(IN) :: fill_value ! Fill value + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + DOUBLE PRECISION, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + + ! INTEGER, EXTERNAL :: h5dfill_double_c + ! MS FORTRAN needs explicit interface for C functions called here. + ! + INTERFACE + INTEGER FUNCTION h5dfill_double_c(fill_value, fill_type_id, space_id, & + buf, mem_type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_DOUBLE_C'::h5dfill_double_c + !DEC$ENDIF + DOUBLE PRECISION, INTENT(IN) :: fill_value ! Fill value + INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier + INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier + DOUBLE PRECISION, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in + INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier + END FUNCTION h5dfill_double_c + END INTERFACE + fill_type_id = H5T_NATIVE_DOUBLE + mem_type_id = H5T_NATIVE_DOUBLE + + hdferr = h5dfill_double_c(fill_value, fill_type_id, space_id, & + buf, mem_type_id) + + + END SUBROUTINE h5dfill_double + + ! + ! -- H5P --- + ! + + SUBROUTINE h5pset_fill_value_double(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) + DOUBLE PRECISION, INTENT(IN) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTERFACE + INTEGER FUNCTION h5pset_fill_value_double_c(prp_id, type_id, fillvalue) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_VALUE_DOUBLE_C'::h5pset_fill_value_double_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + DOUBLE PRECISION, INTENT(IN) :: fillvalue + END FUNCTION h5pset_fill_value_double_c + END INTERFACE + + hdferr = h5pset_fill_value_double_c(prp_id, type_id, fillvalue) + END SUBROUTINE h5pset_fill_value_double + + SUBROUTINE h5pget_fill_value_double(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) + DOUBLE PRECISION, INTENT(IN) :: fillvalue ! Fillvalue + INTEGER, INTENT(OUT) :: hdferr ! Error code + + INTERFACE + INTEGER FUNCTION h5pget_fill_value_double_c(prp_id, type_id, fillvalue) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_VALUE_DOUBLE_C'::h5pget_fill_value_double_c + !DEC$ENDIF + INTEGER(HID_T), INTENT(IN) :: prp_id + INTEGER(HID_T), INTENT(IN) :: type_id + DOUBLE PRECISION :: fillvalue + END FUNCTION h5pget_fill_value_double_c + END INTERFACE + + hdferr = h5pget_fill_value_double_c(prp_id, type_id, fillvalue) + END SUBROUTINE h5pget_fill_value_double + +! +!****s* H5P (F90)/h5pset_double +! +! NAME +! h5pset_double +! +! PURPOSE +! Sets a property list value +! +! INPUTS +! prp_id - iproperty list identifier to modify +! name - name of property to modify +! value - value to set property to +! OUTPUTS +! hdferr: - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! SOURCE + SUBROUTINE h5pset_double(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 + DOUBLE PRECISION, INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pset_double_c(prp_id, name, name_len, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DOUBLE_C'::h5pset_double_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + DOUBLE PRECISION, INTENT(IN) :: value + END FUNCTION h5pset_double_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pset_double_c(prp_id, name , name_len, value) + END SUBROUTINE h5pset_double + +!****s* H5P (F90)/h5pget_double +! +! NAME +! h5pget_double +! +! PURPOSE +! Gets a property list value +! +! INPUTS +! prp_id - iproperty list identifier to modify +! name - name of property to modify +! OUTPUTS +! value - value of property +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 9, 2002 +! +! SOURCE + SUBROUTINE h5pget_double(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 + DOUBLE PRECISION, INTENT(OUT) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pget_double_c(prp_id, name, name_len, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DOUBLE_C'::h5pget_double_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: prp_id + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + DOUBLE PRECISION, INTENT(OUT) :: value + END FUNCTION h5pget_double_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pget_double_c(prp_id, name , name_len, value) + END SUBROUTINE h5pget_double + +! +!****s* H5P (F90)/h5pregister_double +! +! NAME +! h5pregister_double +! +! PURPOSE +! Registers a permanent property with a property list class. +! +! INPUTS +! class - property list class to register +! permanent property within +! name - name of property to register +! size - size of property in bytes +! value - default value for property in newly +! created property lists +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! +! SOURCE + SUBROUTINE h5pregister_double(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 + DOUBLE PRECISION, INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pregister_double_c(class, name, name_len, size, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREGISTER_DOUBLE_C'::h5pregister_double_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: class + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + DOUBLE PRECISION, INTENT(IN) :: value + END FUNCTION h5pregister_double_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pregister_double_c(class, name , name_len, size, value) + END SUBROUTINE h5pregister_double + +!****s* H5P (F90)/h5pinsert_double +! +! NAME +! +! h5pinsert_double +! +! PURPOSE +! Registers a temporary property with a property list class. +! +! INPUTS +! plist - property list identifier +! permanent property within +! name - name of property to insert +! size - size of property in bytes +! value - initial value for the property +! OUTPUTS +! hdferr - error code +! Success: 0 +! Failure: -1 +! AUTHOR +! Elena Pourmal +! October 10, 2002 +! SOURCE + SUBROUTINE h5pinsert_double(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 + DOUBLE PRECISION, INTENT(IN) :: value ! Property value + INTEGER, INTENT(OUT) :: hdferr ! Error code +!***** + INTEGER :: name_len + + INTERFACE + INTEGER FUNCTION h5pinsert_double_c(plist, name, name_len, size, value) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PINSERT_DOUBLE_C'::h5pinsert_double_c + !DEC$ENDIF + !DEC$ATTRIBUTES reference :: name + INTEGER(HID_T), INTENT(IN) :: plist + CHARACTER(LEN=*), INTENT(IN) :: name + INTEGER, INTENT(IN) :: name_len + INTEGER(SIZE_T), INTENT(IN) :: size + DOUBLE PRECISION, INTENT(IN) :: value + END FUNCTION h5pinsert_double_c + END INTERFACE + + name_len = LEN(name) + hdferr = h5pinsert_double_c(plist, name , name_len, size, value) + END SUBROUTINE h5pinsert_double + +END MODULE H5_DBLE_INTERFACE diff --git a/fortran/src/H5_DBLE_InterfaceInclude.f90 b/fortran/src/H5_DBLE_InterfaceInclude.f90 deleted file mode 100644 index 11e0a85..0000000 --- a/fortran/src/H5_DBLE_InterfaceInclude.f90 +++ /dev/null @@ -1,1859 +0,0 @@ -!****h* fortran/src/H5_DBLE_InterfaceInclude.f90 -! -! NAME -! H5_DBLE_INTERFACE -! -! FUNCTION -! This module is used for when the default REAL is not of the type DOUBLE PRECISION. -! We only do not include the double precision interfaces if the defaut REAL is -! DOUBLE PRECISION since this would lead to a non-unique conflict with the -! generic interfaces declared as REAL. Otherwise it is okay to include the interfaces. -! -! NOTES -! This module contains all the DOUBLE PRECISION interfaces and corresponding subroutines -! from the HDF function catagory H5A, H5D and H5P. -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -MODULE H5_DBLE_INTERFACE - - USE H5GLOBAL - - ! - ! ----- H5A ---- - ! - INTERFACE h5awrite_f - MODULE PROCEDURE h5awrite_double_scalar - MODULE PROCEDURE h5awrite_double_1 - MODULE PROCEDURE h5awrite_double_2 - MODULE PROCEDURE h5awrite_double_3 - MODULE PROCEDURE h5awrite_double_4 - MODULE PROCEDURE h5awrite_double_5 - MODULE PROCEDURE h5awrite_double_6 - MODULE PROCEDURE h5awrite_double_7 - END INTERFACE - - INTERFACE h5aread_f - MODULE PROCEDURE h5aread_double_scalar - MODULE PROCEDURE h5aread_double_1 - MODULE PROCEDURE h5aread_double_2 - MODULE PROCEDURE h5aread_double_3 - MODULE PROCEDURE h5aread_double_4 - MODULE PROCEDURE h5aread_double_5 - MODULE PROCEDURE h5aread_double_6 - MODULE PROCEDURE h5aread_double_7 - END INTERFACE - ! - ! ----- H5D ---- - ! - INTERFACE h5dwrite_f - MODULE PROCEDURE h5dwrite_double_scalar - MODULE PROCEDURE h5dwrite_double_1 - MODULE PROCEDURE h5dwrite_double_2 - MODULE PROCEDURE h5dwrite_double_3 - MODULE PROCEDURE h5dwrite_double_4 - MODULE PROCEDURE h5dwrite_double_5 - MODULE PROCEDURE h5dwrite_double_6 - MODULE PROCEDURE h5dwrite_double_7 - END INTERFACE - - INTERFACE h5dread_f - MODULE PROCEDURE h5dread_double_scalar - MODULE PROCEDURE h5dread_double_1 - MODULE PROCEDURE h5dread_double_2 - MODULE PROCEDURE h5dread_double_3 - MODULE PROCEDURE h5dread_double_4 - MODULE PROCEDURE h5dread_double_5 - MODULE PROCEDURE h5dread_double_6 - MODULE PROCEDURE h5dread_double_7 - END INTERFACE - - INTERFACE h5dfill_f - MODULE PROCEDURE h5dfill_double - END INTERFACE - - ! - ! ----- H5P ---- - ! - INTERFACE h5pset_fill_value_f - MODULE PROCEDURE h5pset_fill_value_double - END INTERFACE - - INTERFACE h5pget_fill_value_f - MODULE PROCEDURE h5pget_fill_value_double - END INTERFACE - - INTERFACE h5pset_f - MODULE PROCEDURE h5pset_double - END INTERFACE - - INTERFACE h5pget_f - MODULE PROCEDURE h5pget_double - END INTERFACE - - INTERFACE h5pregister_f - MODULE PROCEDURE h5pregister_double - END INTERFACE - - INTERFACE h5pinsert_f - MODULE PROCEDURE h5pinsert_double - END INTERFACE - -CONTAINS - - ! - ! ----- H5A ---- - ! - SUBROUTINE h5awrite_double_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 - DOUBLE PRECISION, INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_S_C'::h5awrite_double_s_c - !DEC$ENDIF - 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 - DOUBLE PRECISION, INTENT(IN)::buf - END FUNCTION h5awrite_double_s_c - END INTERFACE - - hdferr = h5awrite_double_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_scalar - - SUBROUTINE h5awrite_double_1(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 - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1)) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_1_C'::h5awrite_double_1_c - !DEC$ENDIF - 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 - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5awrite_double_1_c - END INTERFACE - - hdferr = h5awrite_double_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_1 - - - SUBROUTINE h5awrite_double_2(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 - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_2_C'::h5awrite_double_2_c - !DEC$ENDIF - 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 - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5awrite_double_2_c - END INTERFACE - - hdferr = h5awrite_double_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_2 - - - SUBROUTINE h5awrite_double_3(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 - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_3_C'::h5awrite_double_3_c - !DEC$ENDIF - 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 - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5awrite_double_3_c - END INTERFACE - - hdferr = h5awrite_double_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_3 - - - SUBROUTINE h5awrite_double_4(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 - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_4_C'::h5awrite_double_4_c - !DEC$ENDIF - 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 - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5awrite_double_4_c - END INTERFACE - - hdferr = h5awrite_double_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_4 - - - SUBROUTINE h5awrite_double_5(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 - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_5_C'::h5awrite_double_5_c - !DEC$ENDIF - 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 - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5awrite_double_5_c - END INTERFACE - - hdferr = h5awrite_double_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_5 - - - SUBROUTINE h5awrite_double_6(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 - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_6_C'::h5awrite_double_6_c - !DEC$ENDIF - 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 - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5awrite_double_6_c - END INTERFACE - - hdferr = h5awrite_double_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_6 - - - SUBROUTINE h5awrite_double_7(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 - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5awrite_double_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5awrite_double_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AWRITE_DOUBLE_7_C'::h5awrite_double_7_c - !DEC$ENDIF - 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 - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5awrite_double_7_c - END INTERFACE - - hdferr = h5awrite_double_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_7 - - - SUBROUTINE h5aread_double_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 - DOUBLE PRECISION, INTENT(INOUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_s_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_S_C'::h5aread_double_s_c - !DEC$ENDIF - 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 - DOUBLE PRECISION, INTENT(INOUT)::buf - END FUNCTION h5aread_double_s_c - END INTERFACE - - hdferr = h5aread_double_s_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_scalar - - SUBROUTINE h5aread_double_1(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 - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_1_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_1_C'::h5aread_double_1_c - !DEC$ENDIF - 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 - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5aread_double_1_c - END INTERFACE - - hdferr = h5aread_double_1_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_1 - - - SUBROUTINE h5aread_double_2(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 - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_2_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_2_C'::h5aread_double_2_c - !DEC$ENDIF - 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 - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5aread_double_2_c - END INTERFACE - - hdferr = h5aread_double_2_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_2 - - - SUBROUTINE h5aread_double_3(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 - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_3_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_3_C'::h5aread_double_3_c - !DEC$ENDIF - 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 - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5aread_double_3_c - END INTERFACE - - hdferr = h5aread_double_3_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_3 - - - SUBROUTINE h5aread_double_4(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 - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_4_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_4_C'::h5aread_double_4_c - !DEC$ENDIF - 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 - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5aread_double_4_c - END INTERFACE - - hdferr = h5aread_double_4_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_4 - - - SUBROUTINE h5aread_double_5(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 - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_5_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_5_C'::h5aread_double_5_c - !DEC$ENDIF - 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 - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5aread_double_5_c - END INTERFACE - - hdferr = h5aread_double_5_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_5 - - - SUBROUTINE h5aread_double_6(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 - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_6_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_6_C'::h5aread_double_6_c - !DEC$ENDIF - 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 - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5aread_double_6_c - END INTERFACE - - hdferr = h5aread_double_6_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_6 - - - SUBROUTINE h5aread_double_7(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 - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - - ! INTEGER, EXTERNAL :: h5aread_double_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5aread_double_7_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5AREAD_DOUBLE_7_C'::h5aread_double_7_c - !DEC$ENDIF - 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 - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5aread_double_7_c - END INTERFACE - - hdferr = h5aread_double_7_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_7 - - - ! - ! ----- H5D ---- - ! - SUBROUTINE h5dwrite_double_scalar(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_S_C'::h5dwrite_double_s_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN) :: buf - END FUNCTION h5dwrite_double_s_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_scalar - - SUBROUTINE h5dwrite_double_1(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_1_C'::h5dwrite_double_1_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dwrite_double_1_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_1 - - SUBROUTINE h5dwrite_double_2(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_2_C'::h5dwrite_double_2_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dwrite_double_2_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_2 - - SUBROUTINE h5dwrite_double_3(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_3_C'::h5dwrite_double_3_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dwrite_double_3_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_3 - - SUBROUTINE h5dwrite_double_4(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_4_C'::h5dwrite_double_4_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dwrite_double_4_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_4 - - SUBROUTINE h5dwrite_double_5(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_5_C'::h5dwrite_double_5_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dwrite_double_5_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_5 - - SUBROUTINE h5dwrite_double_6(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_6_C'::h5dwrite_double_6_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dwrite_double_6_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_6 - - SUBROUTINE h5dwrite_double_7(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dwrite_double_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dwrite_double_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DWRITE_DOUBLE_7_C'::h5dwrite_double_7_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(IN), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dwrite_double_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dwrite_double_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dwrite_double_7 - - SUBROUTINE h5dread_double_scalar(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT) :: buf ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_s_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_s_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_S_C'::h5dread_double_s_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(OUT) :: buf - END FUNCTION h5dread_double_s_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_s_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_scalar - - SUBROUTINE h5dread_double_1(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_1_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_1_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_1_C'::h5dread_double_1_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1)) :: buf - END FUNCTION h5dread_double_1_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_1_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_1 - - SUBROUTINE h5dread_double_2(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_2_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_2_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_2_C'::h5dread_double_2_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2)) :: buf - END FUNCTION h5dread_double_2_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_2_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_2 - - SUBROUTINE h5dread_double_3(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_3_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_3_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_3_C'::h5dread_double_3_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3)) :: buf - END FUNCTION h5dread_double_3_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_3_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_3 - - SUBROUTINE h5dread_double_4(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_4_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_4_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_4_C'::h5dread_double_4_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf - END FUNCTION h5dread_double_4_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_4_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_4 - - SUBROUTINE h5dread_double_5(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_5_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_5_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_5_C'::h5dread_double_5_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf - END FUNCTION h5dread_double_5_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_5_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_5 - - SUBROUTINE h5dread_double_6(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_6_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_6_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_6_C'::h5dread_double_6_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6)) :: buf - END FUNCTION h5dread_double_6_c - END INTERFACE - - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_6_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_6 - - SUBROUTINE h5dread_double_7(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(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - ! Data buffer - INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: mem_space_id - ! Memory dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id - ! File dataspace identfier - INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp - ! Transfer property list identifier - - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - - ! INTEGER, EXTERNAL :: h5dread_double_7_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dread_double_7_c(dset_id, mem_type_id, & - mem_space_id_default, & - file_space_id_default, & - xfer_prp_default, buf, dims) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DREAD_DOUBLE_7_C'::h5dread_double_7_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: dset_id - INTEGER(HID_T), INTENT(IN) :: mem_type_id - INTEGER(HID_T) :: mem_space_id_default - INTEGER(HID_T) :: file_space_id_default - INTEGER(HID_T) :: xfer_prp_default - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims - DOUBLE PRECISION, INTENT(INOUT), & - DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5),dims(6),dims(7)) :: buf - END FUNCTION h5dread_double_7_c - END INTERFACE - - xfer_prp_default = H5P_DEFAULT_F - mem_space_id_default = H5S_ALL_F - file_space_id_default = H5S_ALL_F - - if (present(xfer_prp)) xfer_prp_default = xfer_prp - if (present(mem_space_id)) mem_space_id_default = mem_space_id - if (present(file_space_id)) file_space_id_default = file_space_id - - hdferr = h5dread_double_7_c(dset_id, mem_type_id, mem_space_id_default, & - file_space_id_default, xfer_prp_default, buf, dims) - - END SUBROUTINE h5dread_double_7 - - !---------------------------------------------------------------------- - ! Name: h5dfill_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 - data buffer iin memory ro apply selection to - ! - of k-th dimension of the buf array - ! Outputs: - ! hdferr: - error code - ! Success: 0 - ! Failure: -1 - ! - ! Programmer: Elena Pourmal - ! March 12, 2003 - ! - !---------------------------------------------------------------------- - - SUBROUTINE h5dfill_double(fill_value, space_id, buf, hdferr) - IMPLICIT NONE - DOUBLE PRECISION, INTENT(IN) :: fill_value ! Fill value - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - DOUBLE PRECISION, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - - ! INTEGER, EXTERNAL :: h5dfill_double_c - ! MS FORTRAN needs explicit interface for C functions called here. - ! - INTERFACE - INTEGER FUNCTION h5dfill_double_c(fill_value, fill_type_id, space_id, & - buf, mem_type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DFILL_DOUBLE_C'::h5dfill_double_c - !DEC$ENDIF - DOUBLE PRECISION, INTENT(IN) :: fill_value ! Fill value - INTEGER(HID_T) :: fill_type_id ! Fill value datatype identifier - INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier - DOUBLE PRECISION, INTENT(IN), DIMENSION(*) :: buf ! Memory buffer to fill in - INTEGER(HID_T) :: mem_type_id ! Buffer dadtype identifier - END FUNCTION h5dfill_double_c - END INTERFACE - fill_type_id = H5T_NATIVE_DOUBLE - mem_type_id = H5T_NATIVE_DOUBLE - - hdferr = h5dfill_double_c(fill_value, fill_type_id, space_id, & - buf, mem_type_id) - - - END SUBROUTINE h5dfill_double - - ! - ! -- H5P --- - ! - - SUBROUTINE h5pset_fill_value_double(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) - DOUBLE PRECISION, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pset_fill_value_double_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FILL_VALUE_DOUBLE_C'::h5pset_fill_value_double_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - DOUBLE PRECISION, INTENT(IN) :: fillvalue - END FUNCTION h5pset_fill_value_double_c - END INTERFACE - - hdferr = h5pset_fill_value_double_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pset_fill_value_double - - SUBROUTINE h5pget_fill_value_double(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) - DOUBLE PRECISION, INTENT(IN) :: fillvalue ! Fillvalue - INTEGER, INTENT(OUT) :: hdferr ! Error code - - INTERFACE - INTEGER FUNCTION h5pget_fill_value_double_c(prp_id, type_id, fillvalue) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FILL_VALUE_DOUBLE_C'::h5pget_fill_value_double_c - !DEC$ENDIF - INTEGER(HID_T), INTENT(IN) :: prp_id - INTEGER(HID_T), INTENT(IN) :: type_id - DOUBLE PRECISION :: fillvalue - END FUNCTION h5pget_fill_value_double_c - END INTERFACE - - hdferr = h5pget_fill_value_double_c(prp_id, type_id, fillvalue) - END SUBROUTINE h5pget_fill_value_double - -! -!****s* H5P (F90)/h5pset_double -! -! NAME -! h5pset_double -! -! PURPOSE -! Sets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! value - value to set property to -! OUTPUTS -! hdferr: - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! SOURCE - SUBROUTINE h5pset_double(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 - DOUBLE PRECISION, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pset_double_c(prp_id, name, name_len, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_DOUBLE_C'::h5pset_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - DOUBLE PRECISION, INTENT(IN) :: value - END FUNCTION h5pset_double_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pset_double_c(prp_id, name , name_len, value) - END SUBROUTINE h5pset_double - -!****s* H5P (F90)/h5pget_double -! -! NAME -! h5pget_double -! -! PURPOSE -! Gets a property list value -! -! INPUTS -! prp_id - iproperty list identifier to modify -! name - name of property to modify -! OUTPUTS -! value - value of property -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 9, 2002 -! -! SOURCE - SUBROUTINE h5pget_double(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 - DOUBLE PRECISION, INTENT(OUT) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pget_double_c(prp_id, name, name_len, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_DOUBLE_C'::h5pget_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: prp_id - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - DOUBLE PRECISION, INTENT(OUT) :: value - END FUNCTION h5pget_double_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pget_double_c(prp_id, name , name_len, value) - END SUBROUTINE h5pget_double - -! -!****s* H5P (F90)/h5pregister_double -! -! NAME -! h5pregister_double -! -! PURPOSE -! Registers a permanent property with a property list class. -! -! INPUTS -! class - property list class to register -! permanent property within -! name - name of property to register -! size - size of property in bytes -! value - default value for property in newly -! created property lists -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! -! SOURCE - SUBROUTINE h5pregister_double(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 - DOUBLE PRECISION, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pregister_double_c(class, name, name_len, size, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PREGISTER_DOUBLE_C'::h5pregister_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: class - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - DOUBLE PRECISION, INTENT(IN) :: value - END FUNCTION h5pregister_double_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pregister_double_c(class, name , name_len, size, value) - END SUBROUTINE h5pregister_double - -!****s* H5P (F90)/h5pinsert_double -! -! NAME -! -! h5pinsert_double -! -! PURPOSE -! Registers a temporary property with a property list class. -! -! INPUTS -! plist - property list identifier -! permanent property within -! name - name of property to insert -! size - size of property in bytes -! value - initial value for the property -! OUTPUTS -! hdferr - error code -! Success: 0 -! Failure: -1 -! AUTHOR -! Elena Pourmal -! October 10, 2002 -! SOURCE - SUBROUTINE h5pinsert_double(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 - DOUBLE PRECISION, INTENT(IN) :: value ! Property value - INTEGER, INTENT(OUT) :: hdferr ! Error code -!***** - INTEGER :: name_len - - INTERFACE - INTEGER FUNCTION h5pinsert_double_c(plist, name, name_len, size, value) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5PINSERT_DOUBLE_C'::h5pinsert_double_c - !DEC$ENDIF - !DEC$ATTRIBUTES reference :: name - INTEGER(HID_T), INTENT(IN) :: plist - CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER, INTENT(IN) :: name_len - INTEGER(SIZE_T), INTENT(IN) :: size - DOUBLE PRECISION, INTENT(IN) :: value - END FUNCTION h5pinsert_double_c - END INTERFACE - - name_len = LEN(name) - hdferr = h5pinsert_double_c(plist, name , name_len, size, value) - END SUBROUTINE h5pinsert_double - -END MODULE H5_DBLE_INTERFACE diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index a149109..e4aadb6 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -32,15 +32,15 @@ * types - array with the predefined Native Fortran * type, its element and length must be the * same as the types array defined in the - * H5f90global.f90 + * H5f90global.F90 * floatingtypes - array with the predefined Floating Fortran * type, its element and length must be the * same as the floatingtypes array defined in the - * H5f90global.f90 + * H5f90global.F90 * integertypes - array with the predefined Integer Fortran * type, its element and length must be the * same as the integertypes array defined in the - * H5f90global.f90 + * H5f90global.F90 * RETURNS * 0 on success, -1 on failure * AUTHOR @@ -274,24 +274,24 @@ nh5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertype * types - array with the predefined Native Fortran * type, its element and length must be the * same as the types array defined in the - * H5f90global.f90 + * H5f90global.F90 * lentypes - length of the types array, which must be the * same as the length of types array defined - * in the H5f90global.f90 + * in the H5f90global.F90 * floatingtypes - array with the predefined Floating Fortran * type, its element and length must be the * same as the floatingtypes array defined in the - * H5f90global.f90 + * H5f90global.F90 * floatinglen - length of the floatingtypes array, which must be the * same as the length of floatingtypes array defined - * in the H5f90global.f90 + * in the H5f90global.F90 * integertypes - array with the predefined Integer Fortran * type, its element and length must be the * same as the integertypes array defined in the - * H5f90global.f90 + * H5f90global.F90 * integerlen - length of the floatingtypes array, which must be the * same as the length of floatingtypes array defined - * in the H5f90global.f90 + * in the H5f90global.F90 * RETURNS * 0 on success, -1 on failure * AUTHOR diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 new file mode 100644 index 0000000..3ca3979 --- /dev/null +++ b/fortran/src/H5_ff.F90 @@ -0,0 +1,439 @@ +!****h* ROBODoc/H5LIB +! +! NAME +! MODULE H5LIB +! +! PURPOSE +! This module provides fortran specific helper functions for the HDF library +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! NOTES +! *** IMPORTANT *** +! If you add a new 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. +! +!***** + +MODULE H5LIB + + USE H5GLOBAL + +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: + SUBROUTINE h5open_f(error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(OUT) :: error +!***** + INTEGER :: error_1, error_2, error_3 + + INTERFACE + INTEGER FUNCTION h5init_types_c(p_types, f_types, i_types) + USE H5GLOBAL + INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: p_types + INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: f_types + INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: i_types + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT_TYPES_C'::h5init_types_c + !DEC$ENDIF + END FUNCTION h5init_types_c + END INTERFACE + INTERFACE + INTEGER FUNCTION h5init_flags_c(i_H5D_flags, & + i_H5D_size_flags,& + i_H5E_flags, & + i_H5E_hid_flags, & + i_H5F_flags, & + i_H5FD_flags, & + i_H5FD_hid_flags, & + i_H5G_flags, & + i_H5I_flags, & + i_H5L_flags, & + i_H5O_flags, & + i_H5P_flags, & + i_H5P_flags_int, & + i_H5R_flags, & + i_H5S_flags, & + i_H5S_hsize_flags, & + i_H5T_flags, & + i_H5Z_flags, & + i_H5generic_flags) + USE H5GLOBAL + INTEGER i_H5D_flags(H5D_FLAGS_LEN) + INTEGER(SIZE_T) i_H5D_size_flags(H5D_SIZE_FLAGS_LEN) + INTEGER i_H5E_flags(H5E_FLAGS_LEN) + INTEGER(HID_T) i_H5E_hid_flags(H5E_HID_FLAGS_LEN) + INTEGER i_H5F_flags(H5F_FLAGS_LEN) + INTEGER i_H5G_flags(H5G_FLAGS_LEN) + INTEGER i_H5FD_flags(H5FD_FLAGS_LEN) + INTEGER(HID_T) i_H5FD_hid_flags(H5FD_HID_FLAGS_LEN) + INTEGER i_H5I_flags(H5I_FLAGS_LEN) + INTEGER i_H5L_flags(H5L_FLAGS_LEN) + INTEGER i_H5O_flags(H5O_FLAGS_LEN) + INTEGER(HID_T) i_H5P_flags(H5P_FLAGS_LEN) + INTEGER i_H5P_flags_int(H5P_FLAGS_INT_LEN) + INTEGER i_H5R_flags(H5R_FLAGS_LEN) + INTEGER i_H5S_flags(H5S_FLAGS_LEN) + INTEGER(HSIZE_T) i_H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) + INTEGER i_H5T_flags(H5T_FLAGS_LEN) + INTEGER i_H5Z_flags(H5Z_FLAGS_LEN) + INTEGER i_H5generic_flags(H5generic_FLAGS_LEN) + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT_FLAGS_C'::h5init_flags_c + !DEC$ENDIF + END FUNCTION h5init_flags_c + END INTERFACE + INTERFACE + INTEGER FUNCTION h5init1_flags_c( i_H5LIB_flags ) + USE H5GLOBAL + INTEGER i_H5LIB_flags(H5LIB_FLAGS_LEN) + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT1_FLAGS_C'::h5init1_flags_c + !DEC$ENDIF + END FUNCTION h5init1_flags_c + END INTERFACE + error_1 = h5init_types_c(predef_types, floating_types, integer_types) + error_2 = h5init_flags_c(H5D_flags, & + H5D_size_flags, & + H5E_flags, & + H5E_hid_flags, & + H5F_flags, & + H5FD_flags, & + H5FD_hid_flags, & + H5G_flags, & + H5I_flags, & + H5L_flags, & + H5O_flags, & + H5P_flags, & + H5P_flags_int, & + H5R_flags, & + H5S_flags, & + H5S_hsize_flags, & + H5T_flags, & + H5Z_flags, & + H5generic_flags) + error_3 = h5init1_flags_c(H5LIB_flags ) + error = error_1 + error_2 + error_3 + 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: + SUBROUTINE h5close_f(error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(OUT) :: error +!***** + INTEGER :: error_1 + INTERFACE + INTEGER FUNCTION h5close_types_c(p_types, P_TYPES_LEN, & + f_types, F_TYPES_LEN, & + i_types, I_TYPES_LEN ) + USE H5GLOBAL + INTEGER P_TYPES_LEN + INTEGER F_TYPES_LEN + INTEGER I_TYPES_LEN + INTEGER(HID_T), DIMENSION(P_TYPES_LEN) :: p_types + INTEGER(HID_T), DIMENSION(F_TYPES_LEN) :: f_types + INTEGER(HID_T), DIMENSION(I_TYPES_LEN) :: i_types + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CLOSE_TYPES_C'::h5close_types_c + !DEC$ENDIF + END FUNCTION h5close_types_c + END INTERFACE + error_1 = h5close_types_c(predef_types, PREDEF_TYPES_LEN, & + floating_types, FLOATING_TYPES_LEN, & + integer_types, INTEGER_TYPES_LEN ) + error = error_1 + + 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 +! minum - 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: + SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(OUT) :: majnum, minnum, relnum, error +!***** + INTERFACE + INTEGER FUNCTION h5get_libversion_c(majnum, minnum, relnum) + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GET_LIBVERSION_C'::h5get_libversion_c + !DEC$ENDIF + INTEGER, INTENT(OUT) :: majnum, minnum, relnum + END FUNCTION h5get_libversion_c + END INTERFACE + + error = h5get_libversion_c(majnum, minnum, relnum) + + 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 +! minum - 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: + SUBROUTINE h5check_version_f(majnum, minnum, relnum, error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(IN) :: majnum, minnum, relnum + INTEGER, INTENT(OUT) :: error +!***** + INTERFACE + INTEGER FUNCTION h5check_version_c(majnum, minnum, relnum) + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CHECK_VERSION_C'::h5check_version_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: majnum, minnum, relnum + END FUNCTION h5check_version_c + END INTERFACE + + 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: + SUBROUTINE h5garbage_collect_f(error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(OUT) :: error +!***** + INTERFACE + INTEGER FUNCTION h5garbage_collect_c() + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GARBAGE_COLLECT_C'::h5garbage_collect_c + !DEC$ENDIF + 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: + SUBROUTINE h5dont_atexit_f(error) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(OUT) :: error +!***** + INTERFACE + INTEGER FUNCTION h5dont_atexit_c() + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DONT_ATEXIT_C'::h5dont_atexit_c + !DEC$ENDIF + END FUNCTION h5dont_atexit_c + END INTERFACE + + error = h5dont_atexit_c() + + 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: + INTEGER(HID_T) FUNCTION h5kind_to_type(kind, flag) RESULT(h5_type) + USE H5GLOBAL + IMPLICIT NONE + INTEGER, INTENT(IN) :: kind + INTEGER, INTENT(IN) :: flag +!***** + IF(flag.EQ.H5_INTEGER_KIND)THEN + IF(kind.EQ.Fortran_INTEGER_1)THEN + h5_type = H5T_NATIVE_INTEGER_1 + ELSE IF(kind.EQ.Fortran_INTEGER_2)THEN + h5_type = H5T_NATIVE_INTEGER_2 + ELSE IF(kind.EQ.Fortran_INTEGER_4)THEN + h5_type = H5T_NATIVE_INTEGER_4 + ELSE IF(kind.EQ.Fortran_INTEGER_8)THEN + h5_type = H5T_NATIVE_INTEGER_8 + ENDIF + ELSE IF(flag.EQ.H5_REAL_KIND)THEN + IF(kind.EQ.Fortran_REAL_4)THEN + h5_type = H5T_NATIVE_REAL_4 + ELSE IF(kind.EQ.Fortran_REAL_8)THEN + h5_type = H5T_NATIVE_REAL_8 + ELSE IF(kind.EQ.Fortran_REAL_16)THEN + h5_type = H5T_NATIVE_REAL_16 + ENDIF + ENDIF + + 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 +! Augest 25, 2008 +! +! ACKNOWLEDGEMENTS +! Joe Krahn +! +! Fortran2003 Interface: + FUNCTION h5offsetof(start,end) RESULT(offset) + USE, INTRINSIC :: ISO_C_BINDING + USE H5GLOBAL + 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 ) + + offset = int_address_end - int_address_start + + END FUNCTION h5offsetof + +END MODULE H5LIB diff --git a/fortran/src/H5_ff.f90 b/fortran/src/H5_ff.f90 deleted file mode 100644 index 3ca3979..0000000 --- a/fortran/src/H5_ff.f90 +++ /dev/null @@ -1,439 +0,0 @@ -!****h* ROBODoc/H5LIB -! -! NAME -! MODULE H5LIB -! -! PURPOSE -! This module provides fortran specific helper functions for the HDF library -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! NOTES -! *** IMPORTANT *** -! If you add a new 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. -! -!***** - -MODULE H5LIB - - USE H5GLOBAL - -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: - SUBROUTINE h5open_f(error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(OUT) :: error -!***** - INTEGER :: error_1, error_2, error_3 - - INTERFACE - INTEGER FUNCTION h5init_types_c(p_types, f_types, i_types) - USE H5GLOBAL - INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: p_types - INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: f_types - INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: i_types - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT_TYPES_C'::h5init_types_c - !DEC$ENDIF - END FUNCTION h5init_types_c - END INTERFACE - INTERFACE - INTEGER FUNCTION h5init_flags_c(i_H5D_flags, & - i_H5D_size_flags,& - i_H5E_flags, & - i_H5E_hid_flags, & - i_H5F_flags, & - i_H5FD_flags, & - i_H5FD_hid_flags, & - i_H5G_flags, & - i_H5I_flags, & - i_H5L_flags, & - i_H5O_flags, & - i_H5P_flags, & - i_H5P_flags_int, & - i_H5R_flags, & - i_H5S_flags, & - i_H5S_hsize_flags, & - i_H5T_flags, & - i_H5Z_flags, & - i_H5generic_flags) - USE H5GLOBAL - INTEGER i_H5D_flags(H5D_FLAGS_LEN) - INTEGER(SIZE_T) i_H5D_size_flags(H5D_SIZE_FLAGS_LEN) - INTEGER i_H5E_flags(H5E_FLAGS_LEN) - INTEGER(HID_T) i_H5E_hid_flags(H5E_HID_FLAGS_LEN) - INTEGER i_H5F_flags(H5F_FLAGS_LEN) - INTEGER i_H5G_flags(H5G_FLAGS_LEN) - INTEGER i_H5FD_flags(H5FD_FLAGS_LEN) - INTEGER(HID_T) i_H5FD_hid_flags(H5FD_HID_FLAGS_LEN) - INTEGER i_H5I_flags(H5I_FLAGS_LEN) - INTEGER i_H5L_flags(H5L_FLAGS_LEN) - INTEGER i_H5O_flags(H5O_FLAGS_LEN) - INTEGER(HID_T) i_H5P_flags(H5P_FLAGS_LEN) - INTEGER i_H5P_flags_int(H5P_FLAGS_INT_LEN) - INTEGER i_H5R_flags(H5R_FLAGS_LEN) - INTEGER i_H5S_flags(H5S_FLAGS_LEN) - INTEGER(HSIZE_T) i_H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) - INTEGER i_H5T_flags(H5T_FLAGS_LEN) - INTEGER i_H5Z_flags(H5Z_FLAGS_LEN) - INTEGER i_H5generic_flags(H5generic_FLAGS_LEN) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT_FLAGS_C'::h5init_flags_c - !DEC$ENDIF - END FUNCTION h5init_flags_c - END INTERFACE - INTERFACE - INTEGER FUNCTION h5init1_flags_c( i_H5LIB_flags ) - USE H5GLOBAL - INTEGER i_H5LIB_flags(H5LIB_FLAGS_LEN) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5INIT1_FLAGS_C'::h5init1_flags_c - !DEC$ENDIF - END FUNCTION h5init1_flags_c - END INTERFACE - error_1 = h5init_types_c(predef_types, floating_types, integer_types) - error_2 = h5init_flags_c(H5D_flags, & - H5D_size_flags, & - H5E_flags, & - H5E_hid_flags, & - H5F_flags, & - H5FD_flags, & - H5FD_hid_flags, & - H5G_flags, & - H5I_flags, & - H5L_flags, & - H5O_flags, & - H5P_flags, & - H5P_flags_int, & - H5R_flags, & - H5S_flags, & - H5S_hsize_flags, & - H5T_flags, & - H5Z_flags, & - H5generic_flags) - error_3 = h5init1_flags_c(H5LIB_flags ) - error = error_1 + error_2 + error_3 - 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: - SUBROUTINE h5close_f(error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(OUT) :: error -!***** - INTEGER :: error_1 - INTERFACE - INTEGER FUNCTION h5close_types_c(p_types, P_TYPES_LEN, & - f_types, F_TYPES_LEN, & - i_types, I_TYPES_LEN ) - USE H5GLOBAL - INTEGER P_TYPES_LEN - INTEGER F_TYPES_LEN - INTEGER I_TYPES_LEN - INTEGER(HID_T), DIMENSION(P_TYPES_LEN) :: p_types - INTEGER(HID_T), DIMENSION(F_TYPES_LEN) :: f_types - INTEGER(HID_T), DIMENSION(I_TYPES_LEN) :: i_types - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CLOSE_TYPES_C'::h5close_types_c - !DEC$ENDIF - END FUNCTION h5close_types_c - END INTERFACE - error_1 = h5close_types_c(predef_types, PREDEF_TYPES_LEN, & - floating_types, FLOATING_TYPES_LEN, & - integer_types, INTEGER_TYPES_LEN ) - error = error_1 - - 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 -! minum - 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: - SUBROUTINE h5get_libversion_f(majnum, minnum, relnum, error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(OUT) :: majnum, minnum, relnum, error -!***** - INTERFACE - INTEGER FUNCTION h5get_libversion_c(majnum, minnum, relnum) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GET_LIBVERSION_C'::h5get_libversion_c - !DEC$ENDIF - INTEGER, INTENT(OUT) :: majnum, minnum, relnum - END FUNCTION h5get_libversion_c - END INTERFACE - - error = h5get_libversion_c(majnum, minnum, relnum) - - 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 -! minum - 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: - SUBROUTINE h5check_version_f(majnum, minnum, relnum, error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(IN) :: majnum, minnum, relnum - INTEGER, INTENT(OUT) :: error -!***** - INTERFACE - INTEGER FUNCTION h5check_version_c(majnum, minnum, relnum) - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5CHECK_VERSION_C'::h5check_version_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: majnum, minnum, relnum - END FUNCTION h5check_version_c - END INTERFACE - - 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: - SUBROUTINE h5garbage_collect_f(error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(OUT) :: error -!***** - INTERFACE - INTEGER FUNCTION h5garbage_collect_c() - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5GARBAGE_COLLECT_C'::h5garbage_collect_c - !DEC$ENDIF - 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: - SUBROUTINE h5dont_atexit_f(error) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(OUT) :: error -!***** - INTERFACE - INTEGER FUNCTION h5dont_atexit_c() - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5DONT_ATEXIT_C'::h5dont_atexit_c - !DEC$ENDIF - END FUNCTION h5dont_atexit_c - END INTERFACE - - error = h5dont_atexit_c() - - 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: - INTEGER(HID_T) FUNCTION h5kind_to_type(kind, flag) RESULT(h5_type) - USE H5GLOBAL - IMPLICIT NONE - INTEGER, INTENT(IN) :: kind - INTEGER, INTENT(IN) :: flag -!***** - IF(flag.EQ.H5_INTEGER_KIND)THEN - IF(kind.EQ.Fortran_INTEGER_1)THEN - h5_type = H5T_NATIVE_INTEGER_1 - ELSE IF(kind.EQ.Fortran_INTEGER_2)THEN - h5_type = H5T_NATIVE_INTEGER_2 - ELSE IF(kind.EQ.Fortran_INTEGER_4)THEN - h5_type = H5T_NATIVE_INTEGER_4 - ELSE IF(kind.EQ.Fortran_INTEGER_8)THEN - h5_type = H5T_NATIVE_INTEGER_8 - ENDIF - ELSE IF(flag.EQ.H5_REAL_KIND)THEN - IF(kind.EQ.Fortran_REAL_4)THEN - h5_type = H5T_NATIVE_REAL_4 - ELSE IF(kind.EQ.Fortran_REAL_8)THEN - h5_type = H5T_NATIVE_REAL_8 - ELSE IF(kind.EQ.Fortran_REAL_16)THEN - h5_type = H5T_NATIVE_REAL_16 - ENDIF - ENDIF - - 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 -! Augest 25, 2008 -! -! ACKNOWLEDGEMENTS -! Joe Krahn -! -! Fortran2003 Interface: - FUNCTION h5offsetof(start,end) RESULT(offset) - USE, INTRINSIC :: ISO_C_BINDING - USE H5GLOBAL - 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 ) - - offset = int_address_end - int_address_start - - END FUNCTION h5offsetof - -END MODULE H5LIB diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 new file mode 100644 index 0000000..6cb35c0 --- /dev/null +++ b/fortran/src/H5f90global.F90 @@ -0,0 +1,972 @@ +!****h* ROBODoc/H5GLOBAL +! +! NAME +! MODULE H5GLOBAL +! +! FILE +! src/fortran/H5f90global.f90 +! +! PURPOSE +! This module is used to pass C stubs for H5 Fortran APIs. The C stubs are +! packed into arrays in H5_f.c and these arrays are then passed to Fortran. +! This module then uses EQUIVALENCE to assign elements of the arrays to +! Fortran equivalent C stubs. +! +! NOTES +! The size of the C arrays in H5_f.c has to match the values of the variables +! declared as PARAMETER, hence if the size of an array in H5_f.c is changed +! then the PARAMETER of that corresponding array in Fortran must also be changed. +! +! USES +! H5FORTRAN_TYPES - This module is generated at run time. See +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! Elena Pourmal +! +!***** + +MODULE H5GLOBAL + USE H5FORTRAN_TYPES + + IMPLICIT NONE + + ! Definitions for reference datatypes. + ! If you change the value of these parameters, do not forget to change corresponding + ! values in the H5f90.h file. + INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 + + ! Parameters used in the function 'h5kind_to_type' located in H5_ff.f90. + ! The flag is used to tell the function whether the kind input variable + ! is for a REAL or INTEGER data type. + + INTEGER, PARAMETER :: H5_REAL_KIND = 1 + INTEGER, PARAMETER :: H5_INTEGER_KIND = 0 + + TYPE :: hobj_ref_t_f + INTEGER(HADDR_T) ref + END TYPE hobj_ref_t_f + + TYPE :: hdset_reg_ref_t_f + INTEGER, DIMENSION(1:REF_REG_BUF_LEN) :: ref + END TYPE hdset_reg_ref_t_f + + INTEGER, PARAMETER :: PREDEF_TYPES_LEN = 17 ! Do not forget to change this + ! value when new predefined + ! datatypes are added + + ! Do not forget to change the following line when new predefined + ! floating data types are added + INTEGER, PARAMETER :: FLOATING_TYPES_LEN = 4 + + ! Do not forget to change the following line when new predefined + ! integer data types are added + INTEGER, PARAMETER :: INTEGER_TYPES_LEN = 27 + + INTEGER(HID_T) :: H5T_NATIVE_INTEGER_1, & + H5T_NATIVE_INTEGER_2, & + H5T_NATIVE_INTEGER_4, & + H5T_NATIVE_INTEGER_8, & + H5T_NATIVE_REAL_4, & + H5T_NATIVE_REAL_8, & + H5T_NATIVE_REAL_16, & + H5T_NATIVE_INTEGER, & + H5T_NATIVE_REAL, & + H5T_NATIVE_DOUBLE, & + H5T_NATIVE_CHARACTER , & + H5T_STD_REF_OBJ, & + H5T_STD_REF_DSETREG, & + H5T_IEEE_F32BE, & + H5T_IEEE_F32LE, & + H5T_IEEE_F64BE, & + H5T_IEEE_F64LE, & + H5T_STD_I8BE, & + H5T_STD_I8LE, & + H5T_STD_I16BE, & + H5T_STD_I16LE, & + H5T_STD_I32BE, & + H5T_STD_I32LE, & + H5T_STD_I64BE, & + H5T_STD_I64LE, & + H5T_STD_U8BE, & + H5T_STD_U8LE, & + H5T_STD_U16BE, & + H5T_STD_U16LE, & + H5T_STD_U32BE + +! NOTE: Splitting the line since the Fortran 95 standard limits the number of +! continuation lines to 39; the F03/F08 standard limits the number +! to 255 lines. + + INTEGER(HID_T) :: H5T_STD_U32LE, & + H5T_STD_U64BE, & + H5T_STD_U64LE, & + H5T_STRING, & + H5T_STD_B8BE, & + H5T_STD_B8LE, & + H5T_STD_B16BE, & + H5T_STD_B16LE, & + H5T_STD_B32BE, & + H5T_STD_B32LE, & + H5T_STD_B64BE, & + H5T_STD_B64LE, & + H5T_NATIVE_B8, & + H5T_NATIVE_B16, & + H5T_NATIVE_B32, & + H5T_NATIVE_B64, & + H5T_FORTRAN_S1, & + H5T_C_S1 + + + INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: predef_types + EQUIVALENCE (predef_types(1), H5T_NATIVE_INTEGER) + EQUIVALENCE (predef_types(2), H5T_NATIVE_REAL) + EQUIVALENCE (predef_types(3), H5T_NATIVE_DOUBLE) + EQUIVALENCE (predef_types(4), H5T_NATIVE_CHARACTER) + EQUIVALENCE (predef_types(5), H5T_STD_REF_OBJ) + EQUIVALENCE (predef_types(6), H5T_STD_REF_DSETREG) + EQUIVALENCE (predef_types(7), H5T_NATIVE_INTEGER_1) + EQUIVALENCE (predef_types(8), H5T_NATIVE_INTEGER_2) + EQUIVALENCE (predef_types(9), H5T_NATIVE_INTEGER_4) + EQUIVALENCE (predef_types(10), H5T_NATIVE_INTEGER_8) + EQUIVALENCE (predef_types(11), H5T_NATIVE_REAL_4) + EQUIVALENCE (predef_types(12), H5T_NATIVE_REAL_8) + EQUIVALENCE (predef_types(13), H5T_NATIVE_REAL_16) + EQUIVALENCE (predef_types(14), H5T_NATIVE_B8 ) + EQUIVALENCE (predef_types(15), H5T_NATIVE_B16) + EQUIVALENCE (predef_types(16), H5T_NATIVE_B32) + EQUIVALENCE (predef_types(17), H5T_NATIVE_B64) + + INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: floating_types + EQUIVALENCE (floating_types(1), H5T_IEEE_F32BE ) + EQUIVALENCE (floating_types(2), H5T_IEEE_F32LE) + EQUIVALENCE (floating_types(3), H5T_IEEE_F64BE) + EQUIVALENCE (floating_types(4), H5T_IEEE_F64LE) + + INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: integer_types + EQUIVALENCE (integer_types(1), H5T_STD_I8BE ) + EQUIVALENCE (integer_types(2), H5T_STD_I8LE) + EQUIVALENCE (integer_types(3), H5T_STD_I16BE) + EQUIVALENCE (integer_types(4), H5T_STD_I16LE) + EQUIVALENCE (integer_types(5), H5T_STD_I32BE) + EQUIVALENCE (integer_types(6), H5T_STD_I32LE) + EQUIVALENCE (integer_types(7), H5T_STD_I64BE) + EQUIVALENCE (integer_types(8), H5T_STD_I64LE) + EQUIVALENCE (integer_types(9), H5T_STD_U8BE) + EQUIVALENCE (integer_types(10), H5T_STD_U8LE) + EQUIVALENCE (integer_types(11), H5T_STD_U16BE) + EQUIVALENCE (integer_types(12), H5T_STD_U16LE) + EQUIVALENCE (integer_types(13), H5T_STD_U32BE) + EQUIVALENCE (integer_types(14), H5T_STD_U32LE) + EQUIVALENCE (integer_types(15), H5T_STD_U64BE) + EQUIVALENCE (integer_types(16), H5T_STD_U64LE) + EQUIVALENCE (integer_types(17), H5T_STRING) + EQUIVALENCE (integer_types(18), H5T_STD_B8BE) + EQUIVALENCE (integer_types(19), H5T_STD_B8LE) + EQUIVALENCE (integer_types(20), H5T_STD_B16BE) + EQUIVALENCE (integer_types(21), H5T_STD_B16LE) + EQUIVALENCE (integer_types(22), H5T_STD_B32BE) + EQUIVALENCE (integer_types(23), H5T_STD_B32LE) + EQUIVALENCE (integer_types(24), H5T_STD_B64BE) + EQUIVALENCE (integer_types(25), H5T_STD_B64LE) + EQUIVALENCE (integer_types(26), H5T_FORTRAN_S1) + EQUIVALENCE (integer_types(27), H5T_C_S1) + + + ! COMMON /PREDEFINED_TYPES/ H5T_NATIVE_INTEGER, & + ! H5T_NATIVE_REAL, & + ! H5T_NATIVE_DOUBLE, & + ! H5T_NATIVE_CHARACTER, & + ! H5T_STD_REF_OBJ, & + ! H5T_STD_REF_DSETREG + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /PREDEFINED_TYPES/ + !DEC$endif + COMMON /PREDEFINED_TYPES/ predef_types + + ! COMMON /FLOATING_TYPES/ H5T_IEEE_F32BE, & + ! H5T_IEEE_F32LE, & + ! H5T_IEEE_F64BE, & + ! H5T_IEEE_F64LE + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /FLOATING_TYPES/ + !DEC$endif + COMMON /FLOATING_TYPES/ floating_types + ! + ! COMMON /INTEGER_TYPES/ H5T_STD_I8BE, & + ! H5T_STD_I8LE, & + ! H5T_STD_I16BE, & + ! H5T_STD_I16LE, & + ! H5T_STD_I32BE, & + ! H5T_STD_I32LE, & + ! H5T_STD_I64BE, & + ! H5T_STD_I64LE, & + ! H5T_STD_U8BE, & + ! H5T_STD_U8LE, & + ! H5T_STD_U16BE, & + ! H5T_STD_U16LE, & + ! H5T_STD_U32BE, & + ! H5T_STD_U32LE, & + ! H5T_STD_U64BE, & + ! H5T_STD_U64LE + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /INTEGER_TYPES/ + !DEC$endif + COMMON /INTEGER_TYPES/ integer_types + ! + ! Fortran flags + ! + ! + ! H5F flags (DO NOT FORGET TO UPDATE WHEN NEW FLAGS ARE ADDED !) + ! + ! H5F flags declaration + ! + INTEGER, PARAMETER :: H5F_FLAGS_LEN = 19 + INTEGER :: H5F_flags(H5F_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5F_FLAGS/ + !DEC$endif + COMMON /H5F_FLAGS/ H5F_flags + + INTEGER :: H5F_ACC_RDWR_F + INTEGER :: H5F_ACC_RDONLY_F + INTEGER :: H5F_ACC_TRUNC_F + INTEGER :: H5F_ACC_EXCL_F + INTEGER :: H5F_ACC_DEBUG_F + INTEGER :: H5F_SCOPE_LOCAL_F + INTEGER :: H5F_SCOPE_GLOBAL_F + INTEGER :: H5F_CLOSE_DEFAULT_F + INTEGER :: H5F_CLOSE_WEAK_F + INTEGER :: H5F_CLOSE_SEMI_F + INTEGER :: H5F_CLOSE_STRONG_F + INTEGER :: H5F_OBJ_FILE_F + INTEGER :: H5F_OBJ_DATASET_F + INTEGER :: H5F_OBJ_GROUP_F + INTEGER :: H5F_OBJ_DATATYPE_F + INTEGER :: H5F_OBJ_ALL_F + INTEGER :: H5F_LIBVER_EARLIEST_F + INTEGER :: H5F_LIBVER_LATEST_F + INTEGER :: H5F_UNLIMITED_F + + EQUIVALENCE(H5F_flags(1), H5F_ACC_RDWR_F) + EQUIVALENCE(H5F_flags(2), H5F_ACC_RDONLY_F) + EQUIVALENCE(H5F_flags(3), H5F_ACC_TRUNC_F) + EQUIVALENCE(H5F_flags(4), H5F_ACC_EXCL_F) + EQUIVALENCE(H5F_flags(5), H5F_ACC_DEBUG_F) + EQUIVALENCE(H5F_flags(6), H5F_SCOPE_LOCAL_F) + EQUIVALENCE(H5F_flags(7), H5F_SCOPE_GLOBAL_F) + EQUIVALENCE(H5F_flags(8), H5F_CLOSE_DEFAULT_F) + EQUIVALENCE(H5F_flags(9), H5F_CLOSE_WEAK_F) + EQUIVALENCE(H5F_flags(10), H5F_CLOSE_SEMI_F) + EQUIVALENCE(H5F_flags(11), H5F_CLOSE_STRONG_F) + EQUIVALENCE(H5F_flags(12), H5F_OBJ_FILE_F) + EQUIVALENCE(H5F_flags(13), H5F_OBJ_DATASET_F) + EQUIVALENCE(H5F_flags(14), H5F_OBJ_GROUP_F) + EQUIVALENCE(H5F_flags(15), H5F_OBJ_DATATYPE_F) + EQUIVALENCE(H5F_flags(16), H5F_OBJ_ALL_F) + EQUIVALENCE(H5F_flags(17), H5F_LIBVER_EARLIEST_F) + EQUIVALENCE(H5F_flags(18), H5F_LIBVER_LATEST_F) + EQUIVALENCE(H5F_flags(19), H5F_UNLIMITED_F) + ! + ! H5generic flags declaration + ! + INTEGER, PARAMETER :: H5generic_FLAGS_LEN = 9 + INTEGER :: H5generic_flags(H5generic_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5generic_FLAGS/ + !DEC$endif + COMMON /H5generic_FLAGS/ H5generic_flags + + INTEGER :: H5_INDEX_UNKNOWN_F + INTEGER :: H5_INDEX_NAME_F + INTEGER :: H5_INDEX_CRT_ORDER_F + INTEGER :: H5_INDEX_N_F + INTEGER :: H5_ITER_UNKNOWN_F + INTEGER :: H5_ITER_INC_F + INTEGER :: H5_ITER_DEC_F + INTEGER :: H5_ITER_NATIVE_F + INTEGER :: H5_ITER_N_F + + EQUIVALENCE(H5generic_flags(1), H5_INDEX_UNKNOWN_F) + EQUIVALENCE(H5generic_flags(2), H5_INDEX_NAME_F) + EQUIVALENCE(H5generic_flags(3), H5_INDEX_CRT_ORDER_F) + EQUIVALENCE(H5generic_flags(4), H5_INDEX_N_F) + EQUIVALENCE(H5generic_flags(5), H5_ITER_UNKNOWN_F) + EQUIVALENCE(H5generic_flags(6), H5_ITER_INC_F) + EQUIVALENCE(H5generic_flags(7), H5_ITER_DEC_F) + EQUIVALENCE(H5generic_flags(8), H5_ITER_NATIVE_F) + EQUIVALENCE(H5generic_flags(9), H5_ITER_N_F) + ! + ! H5G flags declaration + ! + INTEGER, PARAMETER :: H5G_FLAGS_LEN = 12 + INTEGER :: H5G_flags(H5G_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5G_FLAGS/ + !DEC$endif + COMMON /H5G_FLAGS/ H5G_flags + + INTEGER :: H5G_UNKNOWN_F + INTEGER :: H5G_GROUP_F + INTEGER :: H5G_DATASET_F + INTEGER :: H5G_TYPE_F + INTEGER :: H5G_LINK_F + INTEGER :: H5G_UDLINK_F + INTEGER :: H5G_SAME_LOC_F + INTEGER :: H5G_LINK_ERROR_F + INTEGER :: H5G_LINK_HARD_F + INTEGER :: H5G_LINK_SOFT_F + INTEGER :: H5G_STORAGE_TYPE_UNKNOWN_F + INTEGER :: H5G_STORAGE_TYPE_SYMBOL_TABLE_F + INTEGER :: H5G_STORAGE_TYPE_COMPACT_F + INTEGER :: H5G_STORAGE_TYPE_DENSE_F + + EQUIVALENCE(H5G_flags(1), H5G_UNKNOWN_F) ! Unknown object type + EQUIVALENCE(H5G_flags(2), H5G_GROUP_F) ! Object is a group + EQUIVALENCE(H5G_flags(3), H5G_DATASET_F) ! Object is a dataset + EQUIVALENCE(H5G_flags(4), H5G_TYPE_F) ! Object is a named data type + EQUIVALENCE(H5G_flags(5), H5G_SAME_LOC_F) + EQUIVALENCE(H5G_flags(6), H5G_LINK_ERROR_F) + EQUIVALENCE(H5G_flags(7), H5G_LINK_HARD_F) + EQUIVALENCE(H5G_flags(8), H5G_LINK_SOFT_F) + + EQUIVALENCE(H5G_flags(9), H5G_STORAGE_TYPE_UNKNOWN_F ) + EQUIVALENCE(H5G_flags(10), H5G_STORAGE_TYPE_SYMBOL_TABLE_F) + EQUIVALENCE(H5G_flags(11), H5G_STORAGE_TYPE_COMPACT_F) + EQUIVALENCE(H5G_flags(12), H5G_STORAGE_TYPE_DENSE_F) + ! + ! H5D flags declaration + ! + + INTEGER, PARAMETER :: H5D_FLAGS_LEN = 25 + INTEGER :: H5D_flags(H5D_FLAGS_LEN) + INTEGER, PARAMETER :: H5D_SIZE_FLAGS_LEN = 2 + INTEGER(SIZE_T) :: H5D_size_flags(H5D_SIZE_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5D_FLAGS/ + !DEC$ATTRIBUTES DLLEXPORT :: /H5D_SIZE_FLAGS/ + !DEC$endif + COMMON /H5D_FLAGS/ H5D_flags + COMMON /H5D_SIZE_FLAGS/ H5D_size_flags + + INTEGER :: H5D_COMPACT_F + INTEGER :: H5D_CONTIGUOUS_F + INTEGER :: H5D_CHUNKED_F + + INTEGER :: H5D_ALLOC_TIME_ERROR_F + INTEGER :: H5D_ALLOC_TIME_DEFAULT_F + INTEGER :: H5D_ALLOC_TIME_EARLY_F + INTEGER :: H5D_ALLOC_TIME_LATE_F + INTEGER :: H5D_ALLOC_TIME_INCR_F + + INTEGER :: H5D_SPACE_STS_ERROR_F + INTEGER :: H5D_SPACE_STS_NOT_ALLOCATED_F + INTEGER :: H5D_SPACE_STS_PART_ALLOCATED_F + INTEGER :: H5D_SPACE_STS_ALLOCATED_F + + INTEGER :: H5D_FILL_TIME_ERROR_F + INTEGER :: H5D_FILL_TIME_ALLOC_F + INTEGER :: H5D_FILL_TIME_NEVER_F + + INTEGER :: H5D_FILL_VALUE_ERROR_F + INTEGER :: H5D_FILL_VALUE_UNDEFINED_F + INTEGER :: H5D_FILL_VALUE_DEFAULT_F + INTEGER :: H5D_FILL_VALUE_USER_DEFINED_F + +! shortened "_DEFAULT" to "_DFLT" to satisfy the limit of 31 +! characters for variable names in Fortran. +! shortened "_CONTIGUOUS" to "_CONTIG" to satisfy the limit of 31 +! characters for variable names in Fortran. + + INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NSLOTS_DFLT_F + INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NBYTES_DFLT_F + INTEGER :: H5D_CHUNK_CACHE_W0_DFLT_F + INTEGER :: H5D_MPIO_NO_COLLECTIVE_F + INTEGER :: H5D_MPIO_CHUNK_INDEPENDENT_F + INTEGER :: H5D_MPIO_CHUNK_COLLECTIVE_F + INTEGER :: H5D_MPIO_CHUNK_MIXED_F + INTEGER :: H5D_MPIO_CONTIG_COLLECTIVE_F + + EQUIVALENCE(H5D_flags(1), H5D_COMPACT_F) + EQUIVALENCE(H5D_flags(2), H5D_CONTIGUOUS_F) + EQUIVALENCE(H5D_flags(3), H5D_CHUNKED_F) + + EQUIVALENCE(H5D_flags(4), H5D_ALLOC_TIME_ERROR_F) + EQUIVALENCE(H5D_flags(5), H5D_ALLOC_TIME_DEFAULT_F) + EQUIVALENCE(H5D_flags(6), H5D_ALLOC_TIME_EARLY_F) + EQUIVALENCE(H5D_flags(7), H5D_ALLOC_TIME_LATE_F) + EQUIVALENCE(H5D_flags(8), H5D_ALLOC_TIME_INCR_F) + + EQUIVALENCE(H5D_flags(9), H5D_SPACE_STS_ERROR_F) + EQUIVALENCE(H5D_flags(10), H5D_SPACE_STS_NOT_ALLOCATED_F) + EQUIVALENCE(H5D_flags(11), H5D_SPACE_STS_PART_ALLOCATED_F) + EQUIVALENCE(H5D_flags(12), H5D_SPACE_STS_ALLOCATED_F) + + EQUIVALENCE(H5D_flags(13), H5D_FILL_TIME_ERROR_F) + EQUIVALENCE(H5D_flags(14), H5D_FILL_TIME_ALLOC_F) + EQUIVALENCE(H5D_flags(15), H5D_FILL_TIME_NEVER_F) + + EQUIVALENCE(H5D_flags(16), H5D_FILL_VALUE_ERROR_F) + EQUIVALENCE(H5D_flags(17), H5D_FILL_VALUE_UNDEFINED_F) + EQUIVALENCE(H5D_flags(18), H5D_FILL_VALUE_DEFAULT_F) + EQUIVALENCE(H5D_flags(19), H5D_FILL_VALUE_USER_DEFINED_F) + + EQUIVALENCE(H5D_flags(20), H5D_CHUNK_CACHE_W0_DFLT_F) + EQUIVALENCE(H5D_flags(21), H5D_MPIO_NO_COLLECTIVE_F) + EQUIVALENCE(H5D_flags(22), H5D_MPIO_CHUNK_INDEPENDENT_F) + EQUIVALENCE(H5D_flags(23), H5D_MPIO_CHUNK_COLLECTIVE_F) + EQUIVALENCE(H5D_flags(24), H5D_MPIO_CHUNK_MIXED_F) + EQUIVALENCE(H5D_flags(25), H5D_MPIO_CONTIG_COLLECTIVE_F) + + EQUIVALENCE(H5D_size_flags(1), H5D_CHUNK_CACHE_NSLOTS_DFLT_F) + EQUIVALENCE(H5D_size_flags(2), H5D_CHUNK_CACHE_NBYTES_DFLT_F) + + ! + ! H5E flags declaration + ! + INTEGER, PARAMETER :: H5E_FLAGS_LEN = 4 + INTEGER :: H5E_flags(H5E_FLAGS_LEN) + INTEGER, PARAMETER :: H5E_HID_FLAGS_LEN = 1 + INTEGER(HID_T) :: H5E_hid_flags(H5E_HID_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5E_FLAGS/ + !DEC$ATTRIBUTES DLLEXPORT :: /H5E_HID_FLAGS/ + !DEC$endif + COMMON /H5E_FLAGS/ H5E_flags + COMMON /H5E_HID_FLAGS/ H5E_hid_flags + + INTEGER(HID_T) :: H5E_DEFAULT_F + INTEGER :: H5E_MAJOR_F + INTEGER :: H5E_MINOR_F + INTEGER :: H5E_WALK_UPWARD_F + INTEGER :: H5E_WALK_DOWNWARD_F + + EQUIVALENCE(H5E_hid_flags(1), H5E_DEFAULT_F) + EQUIVALENCE(H5E_flags(1) , H5E_MAJOR_F) + EQUIVALENCE(H5E_flags(2) , H5E_MINOR_F) + EQUIVALENCE(H5E_flags(3) , H5E_WALK_UPWARD_F) + EQUIVALENCE(H5E_flags(4) , H5E_WALK_DOWNWARD_F) + + ! + ! H5FD flags declaration + ! + INTEGER, PARAMETER :: H5FD_FLAGS_LEN = 11 + INTEGER :: H5FD_flags(H5FD_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_FLAGS/ + !DEC$endif + COMMON /H5FD_FLAGS/ H5FD_flags + + INTEGER :: H5FD_MPIO_INDEPENDENT_F + INTEGER :: H5FD_MPIO_COLLECTIVE_F + INTEGER :: H5FD_MEM_NOLIST_F + INTEGER :: H5FD_MEM_DEFAULT_F + INTEGER :: H5FD_MEM_SUPER_F + INTEGER :: H5FD_MEM_BTREE_F + INTEGER :: H5FD_MEM_DRAW_F + INTEGER :: H5FD_MEM_GHEAP_F + INTEGER :: H5FD_MEM_LHEAP_F + INTEGER :: H5FD_MEM_OHDR_F + INTEGER :: H5FD_MEM_NTYPES_F + + EQUIVALENCE(H5FD_flags(1), H5FD_MPIO_INDEPENDENT_F) + EQUIVALENCE(H5FD_flags(2), H5FD_MPIO_COLLECTIVE_F) + EQUIVALENCE(H5FD_flags(3), H5FD_MEM_NOLIST_F) + EQUIVALENCE(H5FD_flags(4), H5FD_MEM_DEFAULT_F) + EQUIVALENCE(H5FD_flags(5), H5FD_MEM_SUPER_F) + EQUIVALENCE(H5FD_flags(6), H5FD_MEM_BTREE_F) + EQUIVALENCE(H5FD_flags(7), H5FD_MEM_DRAW_F) + EQUIVALENCE(H5FD_flags(8), H5FD_MEM_GHEAP_F) + EQUIVALENCE(H5FD_flags(9), H5FD_MEM_LHEAP_F) + EQUIVALENCE(H5FD_flags(10), H5FD_MEM_OHDR_F) + EQUIVALENCE(H5FD_flags(11), H5FD_MEM_NTYPES_F) + ! + ! H5FD file drivers flags declaration + ! + INTEGER, PARAMETER :: H5FD_HID_FLAGS_LEN = 7 + INTEGER(HID_T) :: H5FD_hid_flags(H5FD_HID_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_HID_FLAGS/ + !DEC$endif + COMMON /H5FD_HID_FLAGS/ H5FD_hid_flags + + INTEGER(HID_T) :: H5FD_CORE_F + INTEGER(HID_T) :: H5FD_FAMILY_F + INTEGER(HID_T) :: H5FD_LOG_F + INTEGER(HID_T) :: H5FD_MPIO_F + INTEGER(HID_T) :: H5FD_MULTI_F + INTEGER(HID_T) :: H5FD_SEC2_F + INTEGER(HID_T) :: H5FD_STDIO_F + + EQUIVALENCE(H5FD_hid_flags(1), H5FD_CORE_F) + EQUIVALENCE(H5FD_hid_flags(2), H5FD_FAMILY_F) + EQUIVALENCE(H5FD_hid_flags(3), H5FD_LOG_F) + EQUIVALENCE(H5FD_hid_flags(4), H5FD_MPIO_F) + EQUIVALENCE(H5FD_hid_flags(5), H5FD_MULTI_F) + EQUIVALENCE(H5FD_hid_flags(6), H5FD_SEC2_F) + EQUIVALENCE(H5FD_hid_flags(7), H5FD_STDIO_F) + + ! + ! H5I flags declaration + ! + INTEGER, PARAMETER :: H5I_FLAGS_LEN = 7 + INTEGER :: H5I_flags(H5I_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5I_FLAGS/ + !DEC$endif + COMMON /H5I_FLAGS/ H5I_flags + + INTEGER :: H5I_FILE_F + INTEGER :: H5I_GROUP_F + INTEGER :: H5I_DATATYPE_F + INTEGER :: H5I_DATASPACE_F + INTEGER :: H5I_DATASET_F + INTEGER :: H5I_ATTR_F + INTEGER :: H5I_BADID_F + + EQUIVALENCE(H5I_flags(1), H5I_FILE_F) + EQUIVALENCE(H5I_flags(2), H5I_GROUP_F) + EQUIVALENCE(H5I_flags(3), H5I_DATATYPE_F) + EQUIVALENCE(H5I_flags(4), H5I_DATASPACE_F) + EQUIVALENCE(H5I_flags(5), H5I_DATASET_F) + EQUIVALENCE(H5I_flags(6), H5I_ATTR_F) + EQUIVALENCE(H5I_flags(7), H5I_BADID_F) + ! + ! H5L flags declaration + ! + INTEGER, PARAMETER :: H5L_FLAGS_LEN = 6 + INTEGER :: H5L_flags(H5L_FLAGS_LEN) + + INTEGER :: H5L_TYPE_ERROR_F + INTEGER :: H5L_TYPE_HARD_F + INTEGER :: H5L_TYPE_SOFT_F + INTEGER :: H5L_TYPE_EXTERNAL_F + INTEGER :: H5L_SAME_LOC_F + INTEGER :: H5L_LINK_CLASS_T_VERS_F + + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5L_FLAGS/ + !DEC$endif + COMMON /H5L_FLAGS/ H5L_flags + + EQUIVALENCE(H5L_flags(1), H5L_TYPE_ERROR_F) + EQUIVALENCE(H5L_flags(2), H5L_TYPE_HARD_F) + EQUIVALENCE(H5L_flags(3), H5L_TYPE_SOFT_F) + EQUIVALENCE(H5L_flags(4), H5L_TYPE_EXTERNAL_F) + EQUIVALENCE(H5L_flags(5), H5L_SAME_LOC_F) + EQUIVALENCE(H5L_flags(6), H5L_LINK_CLASS_T_VERS_F) + ! + ! H5O flags declaration + ! + INTEGER, PARAMETER :: H5O_FLAGS_LEN = 27 + INTEGER :: H5o_flags(H5O_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5O_FLAGS/ + !DEC$endif + COMMON /H5O_FLAGS/ H5O_flags + + INTEGER :: H5O_COPY_SHALLOW_HIERARCHY_F ! *** THESE VARIABLES DO + INTEGER :: H5O_COPY_EXPAND_SOFT_LINK_F ! NOT MATCH THE C VARIABLE + INTEGER :: H5O_COPY_EXPAND_EXT_LINK_F ! IN ORDER + INTEGER :: H5O_COPY_EXPAND_REFERENCE_F ! TO STAY UNDER THE + INTEGER :: H5O_COPY_WITHOUT_ATTR_FLAG_F + INTEGER :: H5O_COPY_PRESERVE_NULL_FLAG_F + INTEGER :: H5O_COPY_ALL_F + INTEGER :: H5O_SHMESG_NONE_FLAG_F + INTEGER :: H5O_SHMESG_SDSPACE_FLAG_F + INTEGER :: H5O_SHMESG_DTYPE_FLAG_F + INTEGER :: H5O_SHMESG_FILL_FLAG_F + INTEGER :: H5O_SHMESG_PLINE_FLAG_F + INTEGER :: H5O_SHMESG_ATTR_FLAG_F + INTEGER :: H5O_SHMESG_ALL_FLAG_F + INTEGER :: H5O_HDR_CHUNK0_SIZE_F + INTEGER :: H5O_HDR_ATTR_CRT_ORDER_TRACK_F ! 32 CHARACTER + INTEGER :: H5O_HDR_ATTR_CRT_ORDER_INDEX_F ! VARIABLE + INTEGER :: H5O_HDR_ATTR_STORE_PHASE_CHA_F ! LENGTH *** + INTEGER :: H5O_HDR_STORE_TIMES_F + INTEGER :: H5O_HDR_ALL_FLAGS_F + INTEGER :: H5O_SHMESG_MAX_NINDEXES_F + INTEGER :: H5O_SHMESG_MAX_LIST_SIZE_F + INTEGER :: H5O_TYPE_UNKNOWN_F + INTEGER :: H5O_TYPE_GROUP_F + INTEGER :: H5O_TYPE_DATASET_F + INTEGER :: H5O_TYPE_NAMED_DATATYPE_F + INTEGER :: H5O_TYPE_NTYPES_F + + EQUIVALENCE(h5o_flags(1) , H5O_COPY_SHALLOW_HIERARCHY_F) + EQUIVALENCE(h5o_flags(2) , H5O_COPY_EXPAND_SOFT_LINK_F) + EQUIVALENCE(h5o_flags(3) , H5O_COPY_EXPAND_EXT_LINK_F) + EQUIVALENCE(h5o_flags(4) , H5O_COPY_EXPAND_REFERENCE_F) + EQUIVALENCE(h5o_flags(5) , H5O_COPY_WITHOUT_ATTR_FLAG_F) + EQUIVALENCE(h5o_flags(6) , H5O_COPY_PRESERVE_NULL_FLAG_F) + EQUIVALENCE(h5o_flags(7) , H5O_COPY_ALL_F) + EQUIVALENCE(h5o_flags(8) , H5O_SHMESG_NONE_FLAG_F) + EQUIVALENCE(h5o_flags(9) , H5O_SHMESG_SDSPACE_FLAG_F) + EQUIVALENCE(h5o_flags(10) , H5O_SHMESG_DTYPE_FLAG_F) + EQUIVALENCE(h5o_flags(11) , H5O_SHMESG_FILL_FLAG_F) + EQUIVALENCE(h5o_flags(12) , H5O_SHMESG_PLINE_FLAG_F) + EQUIVALENCE(h5o_flags(13) , H5O_SHMESG_ATTR_FLAG_F) + EQUIVALENCE(h5o_flags(14) , H5O_SHMESG_ALL_FLAG_F) + EQUIVALENCE(h5o_flags(15) , H5O_HDR_CHUNK0_SIZE_F) + EQUIVALENCE(h5o_flags(16) , H5O_HDR_ATTR_CRT_ORDER_TRACK_F) + EQUIVALENCE(h5o_flags(17) , H5O_HDR_ATTR_CRT_ORDER_INDEX_F) + EQUIVALENCE(h5o_flags(18) , H5O_HDR_ATTR_STORE_PHASE_CHA_F) + EQUIVALENCE(h5o_flags(19) , H5O_HDR_STORE_TIMES_F) + EQUIVALENCE(h5o_flags(20) , H5O_HDR_ALL_FLAGS_F) + EQUIVALENCE(h5o_flags(21) , H5O_SHMESG_MAX_NINDEXES_F) + EQUIVALENCE(h5o_flags(22) , H5O_SHMESG_MAX_LIST_SIZE_F) + EQUIVALENCE(h5o_flags(23) , H5O_TYPE_UNKNOWN_F) + EQUIVALENCE(h5o_flags(24) , H5O_TYPE_GROUP_F) + EQUIVALENCE(h5o_flags(25) , H5O_TYPE_DATASET_F) + EQUIVALENCE(h5o_flags(26) , H5O_TYPE_NAMED_DATATYPE_F) + EQUIVALENCE(h5o_flags(27) , H5O_TYPE_NTYPES_F) + + ! + ! H5P flags declaration + ! + INTEGER, PARAMETER :: H5P_FLAGS_LEN = 18 + INTEGER(HID_T) H5P_flags(H5P_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS/ + !DEC$endif + COMMON /H5P_FLAGS/ H5P_flags + + INTEGER(HID_T) :: H5P_FILE_CREATE_F + INTEGER(HID_T) :: H5P_FILE_ACCESS_F + INTEGER(HID_T) :: H5P_DATASET_CREATE_F + INTEGER(HID_T) :: H5P_DATASET_XFER_F + INTEGER(HID_T) :: H5P_FILE_MOUNT_F + INTEGER(HID_T) :: H5P_DEFAULT_F + INTEGER(HID_T) :: H5P_ROOT_F + INTEGER(HID_T) :: H5P_OBJECT_CREATE_F + INTEGER(HID_T) :: H5P_DATASET_ACCESS_F + INTEGER(HID_T) :: H5P_GROUP_CREATE_F + INTEGER(HID_T) :: H5P_GROUP_ACCESS_F + INTEGER(HID_T) :: H5P_DATATYPE_CREATE_F + INTEGER(HID_T) :: H5P_DATATYPE_ACCESS_F + INTEGER(HID_T) :: H5P_STRING_CREATE_F + INTEGER(HID_T) :: H5P_ATTRIBUTE_CREATE_F + INTEGER(HID_T) :: H5P_OBJECT_COPY_F + INTEGER(HID_T) :: H5P_LINK_CREATE_F + INTEGER(HID_T) :: H5P_LINK_ACCESS_F + + EQUIVALENCE(H5P_flags(1), H5P_FILE_CREATE_F) + EQUIVALENCE(H5P_flags(2), H5P_FILE_ACCESS_F) + EQUIVALENCE(H5P_flags(3), H5P_DATASET_CREATE_F) + EQUIVALENCE(H5P_flags(4), H5P_DATASET_XFER_F) + EQUIVALENCE(H5P_flags(5), H5P_FILE_MOUNT_F) + EQUIVALENCE(H5P_flags(6), H5P_DEFAULT_F) + EQUIVALENCE(H5P_flags(7), H5P_ROOT_F) + EQUIVALENCE(H5P_flags(8), H5P_OBJECT_CREATE_F) + EQUIVALENCE(H5P_flags(9), H5P_DATASET_ACCESS_F) + EQUIVALENCE(H5P_flags(10), H5P_GROUP_CREATE_F) + EQUIVALENCE(H5P_flags(11), H5P_GROUP_ACCESS_F) + EQUIVALENCE(H5P_flags(12), H5P_DATATYPE_CREATE_F) + EQUIVALENCE(H5P_flags(13), H5P_DATATYPE_ACCESS_F) + EQUIVALENCE(H5P_flags(14), H5P_STRING_CREATE_F) + EQUIVALENCE(H5P_flags(15), H5P_ATTRIBUTE_CREATE_F) + EQUIVALENCE(H5P_flags(16), H5P_OBJECT_COPY_F) + EQUIVALENCE(H5P_flags(17), H5P_LINK_CREATE_F) + EQUIVALENCE(H5P_flags(18), H5P_LINK_ACCESS_F) + + ! + ! H5P integers flags declaration + ! + INTEGER, PARAMETER :: H5P_FLAGS_INT_LEN = 2 + INTEGER :: H5P_flags_int(H5P_FLAGS_INT_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS_INT/ + !DEC$endif + COMMON /H5P_FLAGS_INT/ H5P_flags_int + INTEGER :: H5P_CRT_ORDER_INDEXED_F + INTEGER :: H5P_CRT_ORDER_TRACKED_F + EQUIVALENCE(H5P_flags_int(1), H5P_CRT_ORDER_INDEXED_F) + EQUIVALENCE(H5P_flags_int(2), H5P_CRT_ORDER_TRACKED_F) + ! + ! H5R flags declaration + ! + INTEGER, PARAMETER :: H5R_FLAGS_LEN = 2 + INTEGER :: H5R_flags(H5R_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5R_FLAGS/ + !DEC$endif + COMMON /H5R_FLAGS/ H5R_flags + + INTEGER :: H5R_OBJECT_F + INTEGER :: H5R_DATASET_REGION_F + + EQUIVALENCE(H5R_flags(1), H5R_OBJECT_F) + EQUIVALENCE(H5R_flags(2), H5R_DATASET_REGION_F) + + ! + ! H5S flags declaration + ! + INTEGER, PARAMETER :: H5S_FLAGS_LEN = 19 + INTEGER :: H5S_flags(H5S_FLAGS_LEN) + INTEGER, PARAMETER :: H5S_HSIZE_FLAGS_LEN = 1 + INTEGER(HSIZE_T) H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5S_FLAGS/ + !DEC$ATTRIBUTES DLLEXPORT :: /H5S_HSIZE_FLAGS/ + !DEC$endif + COMMON /H5S_FLAGS/ H5S_flags + COMMON /H5S_HSIZE_FLAGS/ H5S_hsize_flags + + INTEGER(HSIZE_T) :: H5S_UNLIMITED_F + + INTEGER :: H5S_SCALAR_F + INTEGER :: H5S_SIMPLE_F + INTEGER :: H5S_NULL_F + + INTEGER :: H5S_ALL_F + + INTEGER :: H5S_SELECT_NOOP_F + INTEGER :: H5S_SELECT_SET_F + INTEGER :: H5S_SELECT_OR_F + INTEGER :: H5S_SELECT_AND_F + INTEGER :: H5S_SELECT_XOR_F + INTEGER :: H5S_SELECT_NOTB_F + INTEGER :: H5S_SELECT_NOTA_F + INTEGER :: H5S_SELECT_APPEND_F + INTEGER :: H5S_SELECT_PREPEND_F + INTEGER :: H5S_SELECT_INVALID_F + + INTEGER :: H5S_SEL_ERROR_F + INTEGER :: H5S_SEL_NONE_F + INTEGER :: H5S_SEL_POINTS_F + INTEGER :: H5S_SEL_HYPERSLABS_F + INTEGER :: H5S_SEL_ALL_F + + EQUIVALENCE(H5S_hsize_flags(1), H5S_UNLIMITED_F) + EQUIVALENCE(H5S_flags(1), H5S_SCALAR_F) + EQUIVALENCE(H5S_flags(2), H5S_SIMPLE_F) + EQUIVALENCE(H5S_flags(3), H5S_NULL_F) + EQUIVALENCE(H5S_flags(4), H5S_SELECT_SET_F) + EQUIVALENCE(H5S_flags(5), H5S_SELECT_OR_F) + EQUIVALENCE(H5S_flags(6), H5S_ALL_F) + + EQUIVALENCE(H5S_flags(7), H5S_SELECT_NOOP_F) + EQUIVALENCE(H5S_flags(8), H5S_SELECT_AND_F) + EQUIVALENCE(H5S_flags(9), H5S_SELECT_XOR_F) + EQUIVALENCE(H5S_flags(10), H5S_SELECT_NOTB_F) + EQUIVALENCE(H5S_flags(11), H5S_SELECT_NOTA_F) + EQUIVALENCE(H5S_flags(12), H5S_SELECT_APPEND_F) + EQUIVALENCE(H5S_flags(13), H5S_SELECT_PREPEND_F) + EQUIVALENCE(H5S_flags(14), H5S_SELECT_INVALID_F) + + + EQUIVALENCE(H5S_flags(15), H5S_SEL_ERROR_F) + EQUIVALENCE(H5S_flags(16), H5S_SEL_NONE_F) + EQUIVALENCE(H5S_flags(17), H5S_SEL_POINTS_F) + EQUIVALENCE(H5S_flags(18), H5S_SEL_HYPERSLABS_F) + EQUIVALENCE(H5S_flags(19), H5S_SEL_ALL_F) + + ! + ! H5T flags declaration + ! + INTEGER, PARAMETER :: H5T_FLAGS_LEN = 35 + INTEGER :: H5T_flags(H5T_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5T_FLAGS/ + !DEC$endif + COMMON /H5T_FLAGS/ H5T_flags + + INTEGER :: H5T_NO_CLASS_F + INTEGER :: H5T_INTEGER_F + INTEGER :: H5T_FLOAT_F + INTEGER :: H5T_TIME_F + INTEGER :: H5T_STRING_F + INTEGER :: H5T_BITFIELD_F + INTEGER :: H5T_OPAQUE_F + INTEGER :: H5T_COMPOUND_F + INTEGER :: H5T_REFERENCE_F + INTEGER :: H5T_ENUM_F + INTEGER :: H5T_VLEN_F + INTEGER :: H5T_ARRAY_F + INTEGER :: H5T_ORDER_LE_F + INTEGER :: H5T_ORDER_BE_F + INTEGER :: H5T_ORDER_VAX_F + INTEGER :: H5T_ORDER_NONE_F + INTEGER :: H5T_ORDER_MIXED_F + INTEGER :: H5T_PAD_ZERO_F + INTEGER :: H5T_PAD_ONE_F + INTEGER :: H5T_PAD_BACKGROUND_F + INTEGER :: H5T_PAD_ERROR_F + INTEGER :: H5T_SGN_NONE_F + INTEGER :: H5T_SGN_2_F + INTEGER :: H5T_SGN_ERROR_F + INTEGER :: H5T_NORM_IMPLIED_F + INTEGER :: H5T_NORM_MSBSET_F + INTEGER :: H5T_NORM_NONE_F + INTEGER :: H5T_CSET_ASCII_F + INTEGER :: H5T_CSET_UTF8_F + INTEGER :: H5T_STR_NULLTERM_F + INTEGER :: H5T_STR_NULLPAD_F + INTEGER :: H5T_STR_SPACEPAD_F + INTEGER :: H5T_STR_ERROR_F + INTEGER :: H5T_DIR_ASCEND_F + INTEGER :: H5T_DIR_DESCEND_F + + EQUIVALENCE(H5T_flags(1), H5T_NO_CLASS_F) + EQUIVALENCE(H5T_flags(2), H5T_INTEGER_F) + EQUIVALENCE(H5T_flags(3), H5T_FLOAT_F) + EQUIVALENCE(H5T_flags(4), H5T_TIME_F) + EQUIVALENCE(H5T_flags(5), H5T_STRING_F) + EQUIVALENCE(H5T_flags(6), H5T_BITFIELD_F) + EQUIVALENCE(H5T_flags(7), H5T_OPAQUE_F) + EQUIVALENCE(H5T_flags(8), H5T_COMPOUND_F) + EQUIVALENCE(H5T_flags(9), H5T_REFERENCE_F) + EQUIVALENCE(H5T_flags(10), H5T_ENUM_F) + EQUIVALENCE(H5T_flags(11), H5T_ORDER_LE_F) + EQUIVALENCE(H5T_flags(12), H5T_ORDER_BE_F) + EQUIVALENCE(H5T_flags(13), H5T_ORDER_MIXED_F) + EQUIVALENCE(H5T_flags(14), H5T_ORDER_VAX_F) + EQUIVALENCE(H5T_flags(15), H5T_ORDER_NONE_F) + EQUIVALENCE(H5T_flags(16), H5T_PAD_ZERO_F) + EQUIVALENCE(H5T_flags(17), H5T_PAD_ONE_F) + EQUIVALENCE(H5T_flags(18), H5T_PAD_BACKGROUND_F) + EQUIVALENCE(H5T_flags(19), H5T_PAD_ERROR_F) + EQUIVALENCE(H5T_flags(20), H5T_SGN_NONE_F) + EQUIVALENCE(H5T_flags(21), H5T_SGN_2_F) + EQUIVALENCE(H5T_flags(22), H5T_SGN_ERROR_F) + EQUIVALENCE(H5T_flags(23), H5T_NORM_IMPLIED_F) + EQUIVALENCE(H5T_flags(24), H5T_NORM_MSBSET_F) + EQUIVALENCE(H5T_flags(25), H5T_NORM_NONE_F) + EQUIVALENCE(H5T_flags(26), H5T_CSET_ASCII_F) + EQUIVALENCE(H5T_flags(27), H5T_CSET_UTF8_F) + EQUIVALENCE(H5T_flags(28), H5T_STR_NULLTERM_F) + EQUIVALENCE(H5T_flags(29), H5T_STR_NULLPAD_F) + EQUIVALENCE(H5T_flags(30), H5T_STR_SPACEPAD_F) + EQUIVALENCE(H5T_flags(31), H5T_STR_ERROR_F) + EQUIVALENCE(H5T_flags(32), H5T_VLEN_F) + EQUIVALENCE(H5T_flags(33), H5T_ARRAY_F) + EQUIVALENCE(H5T_flags(34), H5T_DIR_ASCEND_F) + EQUIVALENCE(H5T_flags(35), H5T_DIR_DESCEND_F) + ! + ! H5Z flags declaration + ! + INTEGER, PARAMETER :: H5Z_FLAGS_LEN = 20 + INTEGER :: H5Z_flags(H5Z_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5Z_FLAGS/ + !DEC$endif + COMMON /H5Z_FLAGS/ H5Z_flags + + INTEGER :: H5Z_FILTER_ERROR_F + INTEGER :: H5Z_FILTER_NONE_F + INTEGER :: H5Z_FILTER_ALL_F + INTEGER :: H5Z_FILTER_DEFLATE_F + INTEGER :: H5Z_FILTER_SHUFFLE_F + INTEGER :: H5Z_FILTER_FLETCHER32_F + INTEGER :: H5Z_FILTER_SZIP_F + INTEGER :: H5Z_ERROR_EDC_F + INTEGER :: H5Z_DISABLE_EDC_F + INTEGER :: H5Z_ENABLE_EDC_F + INTEGER :: H5Z_NO_EDC_F + INTEGER :: H5Z_FLAG_OPTIONAL_F + INTEGER :: H5Z_FILTER_ENCODE_ENABLED_F + INTEGER :: H5Z_FILTER_DECODE_ENABLED_F + INTEGER :: H5Z_FILTER_NBIT_F + INTEGER :: H5Z_FILTER_SCALEOFFSET_F + INTEGER :: H5Z_SO_FLOAT_DSCALE_F + INTEGER :: H5Z_SO_FLOAT_ESCALE_F + INTEGER :: H5Z_SO_INT_F + INTEGER :: H5Z_SO_INT_MINBITS_DEFAULT_F + + EQUIVALENCE(H5Z_flags(1), H5Z_FILTER_ERROR_F) + EQUIVALENCE(H5Z_flags(2), H5Z_FILTER_NONE_F) + EQUIVALENCE(H5Z_flags(3), H5Z_FILTER_DEFLATE_F) + EQUIVALENCE(H5Z_flags(4), H5Z_FILTER_SHUFFLE_F) + EQUIVALENCE(H5Z_flags(5), H5Z_FILTER_FLETCHER32_F) + EQUIVALENCE(H5Z_flags(6), H5Z_ERROR_EDC_F) + EQUIVALENCE(H5Z_flags(7), H5Z_DISABLE_EDC_F) + EQUIVALENCE(H5Z_flags(8), H5Z_ENABLE_EDC_F) + EQUIVALENCE(H5Z_flags(9), H5Z_NO_EDC_F) + EQUIVALENCE(H5Z_flags(10), H5Z_FILTER_SZIP_F) + EQUIVALENCE(H5Z_flags(11), H5Z_FLAG_OPTIONAL_F) + EQUIVALENCE(H5Z_flags(12), H5Z_FILTER_ENCODE_ENABLED_F) + EQUIVALENCE(H5Z_flags(13), H5Z_FILTER_DECODE_ENABLED_F) + EQUIVALENCE(H5Z_flags(14), H5Z_FILTER_ALL_F) + EQUIVALENCE(H5Z_flags(15), H5Z_FILTER_NBIT_F) + EQUIVALENCE(H5Z_flags(16), H5Z_FILTER_SCALEOFFSET_F) + EQUIVALENCE(H5Z_flags(17), H5Z_SO_FLOAT_DSCALE_F) + EQUIVALENCE(H5Z_flags(18), H5Z_SO_FLOAT_ESCALE_F) + EQUIVALENCE(H5Z_flags(19), H5Z_SO_INT_F) + EQUIVALENCE(H5Z_flags(20), H5Z_SO_INT_MINBITS_DEFAULT_F) + + ! + ! H5 Library flags declaration + ! + INTEGER, PARAMETER :: H5LIB_FLAGS_LEN = 2 + INTEGER :: H5LIB_flags(H5LIB_FLAGS_LEN) + !DEC$if defined(BUILD_HDF5_DLL) + !DEC$ATTRIBUTES DLLEXPORT :: /H5LIB_FLAGS/ + !DEC$endif + COMMON /H5LIB_FLAGS/ H5LIB_flags + INTEGER :: H5_SZIP_EC_OM_F + INTEGER :: H5_SZIP_NN_OM_F + ! + EQUIVALENCE(H5LIB_flags(1), H5_SZIP_EC_OM_F) + EQUIVALENCE(H5LIB_flags(2), H5_SZIP_NN_OM_F) + + + ! General H5 flags declarations + ! +!!$ INTEGER, PARAMETER :: H5_FLAGS_LEN = 2 +!!$ INTEGER H5_flags(H5_FLAGS_LEN) +!!$!DEC$if defined(BUILD_HDF5_DLL) +!!$!DEC$ATTRIBUTES DLLEXPORT :: /H5_FLAGS/ +!!$!DEC$endif +!!$ COMMON /H5_FLAGS/ H5_flags +!!$ +!!$ INTEGER :: _F +!!$ INTEGER :: H5F_SCOPE_LOCAL_F +!!$ +!!$ EQUIVALENCE(H5F_flags(1), H5F_SCOPE_GLOBAL_F) +!!$ EQUIVALENCE(H5F_flags(2), H5F_SCOPE_LOCAL_F) + +CONTAINS + + SUBROUTINE C2F_string(c_string, f_string) + + USE, INTRINSIC :: ISO_C_BINDING + IMPLICIT NONE + CHARACTER(KIND=C_CHAR, LEN=*), INTENT(IN) :: c_string + CHARACTER(LEN=*), INTENT(OUT) :: f_string + INTEGER(SIZE_T) :: c_len, f_len + + ! Find the length of the C string by located the null terminator + c_len = MAX(INDEX(c_string,C_NULL_CHAR, KIND=SIZE_T)-1,1) + ! Find the length of the Fortran string + f_len = LEN(f_string) + + ! CASE (1): C string is equal to or larger then Fortran character buffer, + ! so fill the entire Fortran buffer. + IF(c_len.GE.f_len)THEN ! + f_string(1:f_len) = c_string(1:f_len) + + ! CASE (2): C string is smaller then Fortran character buffer, + ! so copy C string and blank pad remaining characters. + ELSE + f_string(1:c_len) = c_string(1:c_len) + f_string(c_len+1:f_len) =' ' + ENDIF + END SUBROUTINE C2F_string + +END MODULE H5GLOBAL + diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90 deleted file mode 100644 index 6cb35c0..0000000 --- a/fortran/src/H5f90global.f90 +++ /dev/null @@ -1,972 +0,0 @@ -!****h* ROBODoc/H5GLOBAL -! -! NAME -! MODULE H5GLOBAL -! -! FILE -! src/fortran/H5f90global.f90 -! -! PURPOSE -! This module is used to pass C stubs for H5 Fortran APIs. The C stubs are -! packed into arrays in H5_f.c and these arrays are then passed to Fortran. -! This module then uses EQUIVALENCE to assign elements of the arrays to -! Fortran equivalent C stubs. -! -! NOTES -! The size of the C arrays in H5_f.c has to match the values of the variables -! declared as PARAMETER, hence if the size of an array in H5_f.c is changed -! then the PARAMETER of that corresponding array in Fortran must also be changed. -! -! USES -! H5FORTRAN_TYPES - This module is generated at run time. See -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! Elena Pourmal -! -!***** - -MODULE H5GLOBAL - USE H5FORTRAN_TYPES - - IMPLICIT NONE - - ! Definitions for reference datatypes. - ! If you change the value of these parameters, do not forget to change corresponding - ! values in the H5f90.h file. - INTEGER, PARAMETER :: REF_REG_BUF_LEN = 3 - - ! Parameters used in the function 'h5kind_to_type' located in H5_ff.f90. - ! The flag is used to tell the function whether the kind input variable - ! is for a REAL or INTEGER data type. - - INTEGER, PARAMETER :: H5_REAL_KIND = 1 - INTEGER, PARAMETER :: H5_INTEGER_KIND = 0 - - TYPE :: hobj_ref_t_f - INTEGER(HADDR_T) ref - END TYPE hobj_ref_t_f - - TYPE :: hdset_reg_ref_t_f - INTEGER, DIMENSION(1:REF_REG_BUF_LEN) :: ref - END TYPE hdset_reg_ref_t_f - - INTEGER, PARAMETER :: PREDEF_TYPES_LEN = 17 ! Do not forget to change this - ! value when new predefined - ! datatypes are added - - ! Do not forget to change the following line when new predefined - ! floating data types are added - INTEGER, PARAMETER :: FLOATING_TYPES_LEN = 4 - - ! Do not forget to change the following line when new predefined - ! integer data types are added - INTEGER, PARAMETER :: INTEGER_TYPES_LEN = 27 - - INTEGER(HID_T) :: H5T_NATIVE_INTEGER_1, & - H5T_NATIVE_INTEGER_2, & - H5T_NATIVE_INTEGER_4, & - H5T_NATIVE_INTEGER_8, & - H5T_NATIVE_REAL_4, & - H5T_NATIVE_REAL_8, & - H5T_NATIVE_REAL_16, & - H5T_NATIVE_INTEGER, & - H5T_NATIVE_REAL, & - H5T_NATIVE_DOUBLE, & - H5T_NATIVE_CHARACTER , & - H5T_STD_REF_OBJ, & - H5T_STD_REF_DSETREG, & - H5T_IEEE_F32BE, & - H5T_IEEE_F32LE, & - H5T_IEEE_F64BE, & - H5T_IEEE_F64LE, & - H5T_STD_I8BE, & - H5T_STD_I8LE, & - H5T_STD_I16BE, & - H5T_STD_I16LE, & - H5T_STD_I32BE, & - H5T_STD_I32LE, & - H5T_STD_I64BE, & - H5T_STD_I64LE, & - H5T_STD_U8BE, & - H5T_STD_U8LE, & - H5T_STD_U16BE, & - H5T_STD_U16LE, & - H5T_STD_U32BE - -! NOTE: Splitting the line since the Fortran 95 standard limits the number of -! continuation lines to 39; the F03/F08 standard limits the number -! to 255 lines. - - INTEGER(HID_T) :: H5T_STD_U32LE, & - H5T_STD_U64BE, & - H5T_STD_U64LE, & - H5T_STRING, & - H5T_STD_B8BE, & - H5T_STD_B8LE, & - H5T_STD_B16BE, & - H5T_STD_B16LE, & - H5T_STD_B32BE, & - H5T_STD_B32LE, & - H5T_STD_B64BE, & - H5T_STD_B64LE, & - H5T_NATIVE_B8, & - H5T_NATIVE_B16, & - H5T_NATIVE_B32, & - H5T_NATIVE_B64, & - H5T_FORTRAN_S1, & - H5T_C_S1 - - - INTEGER(HID_T), DIMENSION(PREDEF_TYPES_LEN) :: predef_types - EQUIVALENCE (predef_types(1), H5T_NATIVE_INTEGER) - EQUIVALENCE (predef_types(2), H5T_NATIVE_REAL) - EQUIVALENCE (predef_types(3), H5T_NATIVE_DOUBLE) - EQUIVALENCE (predef_types(4), H5T_NATIVE_CHARACTER) - EQUIVALENCE (predef_types(5), H5T_STD_REF_OBJ) - EQUIVALENCE (predef_types(6), H5T_STD_REF_DSETREG) - EQUIVALENCE (predef_types(7), H5T_NATIVE_INTEGER_1) - EQUIVALENCE (predef_types(8), H5T_NATIVE_INTEGER_2) - EQUIVALENCE (predef_types(9), H5T_NATIVE_INTEGER_4) - EQUIVALENCE (predef_types(10), H5T_NATIVE_INTEGER_8) - EQUIVALENCE (predef_types(11), H5T_NATIVE_REAL_4) - EQUIVALENCE (predef_types(12), H5T_NATIVE_REAL_8) - EQUIVALENCE (predef_types(13), H5T_NATIVE_REAL_16) - EQUIVALENCE (predef_types(14), H5T_NATIVE_B8 ) - EQUIVALENCE (predef_types(15), H5T_NATIVE_B16) - EQUIVALENCE (predef_types(16), H5T_NATIVE_B32) - EQUIVALENCE (predef_types(17), H5T_NATIVE_B64) - - INTEGER(HID_T), DIMENSION(FLOATING_TYPES_LEN) :: floating_types - EQUIVALENCE (floating_types(1), H5T_IEEE_F32BE ) - EQUIVALENCE (floating_types(2), H5T_IEEE_F32LE) - EQUIVALENCE (floating_types(3), H5T_IEEE_F64BE) - EQUIVALENCE (floating_types(4), H5T_IEEE_F64LE) - - INTEGER(HID_T), DIMENSION(INTEGER_TYPES_LEN) :: integer_types - EQUIVALENCE (integer_types(1), H5T_STD_I8BE ) - EQUIVALENCE (integer_types(2), H5T_STD_I8LE) - EQUIVALENCE (integer_types(3), H5T_STD_I16BE) - EQUIVALENCE (integer_types(4), H5T_STD_I16LE) - EQUIVALENCE (integer_types(5), H5T_STD_I32BE) - EQUIVALENCE (integer_types(6), H5T_STD_I32LE) - EQUIVALENCE (integer_types(7), H5T_STD_I64BE) - EQUIVALENCE (integer_types(8), H5T_STD_I64LE) - EQUIVALENCE (integer_types(9), H5T_STD_U8BE) - EQUIVALENCE (integer_types(10), H5T_STD_U8LE) - EQUIVALENCE (integer_types(11), H5T_STD_U16BE) - EQUIVALENCE (integer_types(12), H5T_STD_U16LE) - EQUIVALENCE (integer_types(13), H5T_STD_U32BE) - EQUIVALENCE (integer_types(14), H5T_STD_U32LE) - EQUIVALENCE (integer_types(15), H5T_STD_U64BE) - EQUIVALENCE (integer_types(16), H5T_STD_U64LE) - EQUIVALENCE (integer_types(17), H5T_STRING) - EQUIVALENCE (integer_types(18), H5T_STD_B8BE) - EQUIVALENCE (integer_types(19), H5T_STD_B8LE) - EQUIVALENCE (integer_types(20), H5T_STD_B16BE) - EQUIVALENCE (integer_types(21), H5T_STD_B16LE) - EQUIVALENCE (integer_types(22), H5T_STD_B32BE) - EQUIVALENCE (integer_types(23), H5T_STD_B32LE) - EQUIVALENCE (integer_types(24), H5T_STD_B64BE) - EQUIVALENCE (integer_types(25), H5T_STD_B64LE) - EQUIVALENCE (integer_types(26), H5T_FORTRAN_S1) - EQUIVALENCE (integer_types(27), H5T_C_S1) - - - ! COMMON /PREDEFINED_TYPES/ H5T_NATIVE_INTEGER, & - ! H5T_NATIVE_REAL, & - ! H5T_NATIVE_DOUBLE, & - ! H5T_NATIVE_CHARACTER, & - ! H5T_STD_REF_OBJ, & - ! H5T_STD_REF_DSETREG - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /PREDEFINED_TYPES/ - !DEC$endif - COMMON /PREDEFINED_TYPES/ predef_types - - ! COMMON /FLOATING_TYPES/ H5T_IEEE_F32BE, & - ! H5T_IEEE_F32LE, & - ! H5T_IEEE_F64BE, & - ! H5T_IEEE_F64LE - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /FLOATING_TYPES/ - !DEC$endif - COMMON /FLOATING_TYPES/ floating_types - ! - ! COMMON /INTEGER_TYPES/ H5T_STD_I8BE, & - ! H5T_STD_I8LE, & - ! H5T_STD_I16BE, & - ! H5T_STD_I16LE, & - ! H5T_STD_I32BE, & - ! H5T_STD_I32LE, & - ! H5T_STD_I64BE, & - ! H5T_STD_I64LE, & - ! H5T_STD_U8BE, & - ! H5T_STD_U8LE, & - ! H5T_STD_U16BE, & - ! H5T_STD_U16LE, & - ! H5T_STD_U32BE, & - ! H5T_STD_U32LE, & - ! H5T_STD_U64BE, & - ! H5T_STD_U64LE - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /INTEGER_TYPES/ - !DEC$endif - COMMON /INTEGER_TYPES/ integer_types - ! - ! Fortran flags - ! - ! - ! H5F flags (DO NOT FORGET TO UPDATE WHEN NEW FLAGS ARE ADDED !) - ! - ! H5F flags declaration - ! - INTEGER, PARAMETER :: H5F_FLAGS_LEN = 19 - INTEGER :: H5F_flags(H5F_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5F_FLAGS/ - !DEC$endif - COMMON /H5F_FLAGS/ H5F_flags - - INTEGER :: H5F_ACC_RDWR_F - INTEGER :: H5F_ACC_RDONLY_F - INTEGER :: H5F_ACC_TRUNC_F - INTEGER :: H5F_ACC_EXCL_F - INTEGER :: H5F_ACC_DEBUG_F - INTEGER :: H5F_SCOPE_LOCAL_F - INTEGER :: H5F_SCOPE_GLOBAL_F - INTEGER :: H5F_CLOSE_DEFAULT_F - INTEGER :: H5F_CLOSE_WEAK_F - INTEGER :: H5F_CLOSE_SEMI_F - INTEGER :: H5F_CLOSE_STRONG_F - INTEGER :: H5F_OBJ_FILE_F - INTEGER :: H5F_OBJ_DATASET_F - INTEGER :: H5F_OBJ_GROUP_F - INTEGER :: H5F_OBJ_DATATYPE_F - INTEGER :: H5F_OBJ_ALL_F - INTEGER :: H5F_LIBVER_EARLIEST_F - INTEGER :: H5F_LIBVER_LATEST_F - INTEGER :: H5F_UNLIMITED_F - - EQUIVALENCE(H5F_flags(1), H5F_ACC_RDWR_F) - EQUIVALENCE(H5F_flags(2), H5F_ACC_RDONLY_F) - EQUIVALENCE(H5F_flags(3), H5F_ACC_TRUNC_F) - EQUIVALENCE(H5F_flags(4), H5F_ACC_EXCL_F) - EQUIVALENCE(H5F_flags(5), H5F_ACC_DEBUG_F) - EQUIVALENCE(H5F_flags(6), H5F_SCOPE_LOCAL_F) - EQUIVALENCE(H5F_flags(7), H5F_SCOPE_GLOBAL_F) - EQUIVALENCE(H5F_flags(8), H5F_CLOSE_DEFAULT_F) - EQUIVALENCE(H5F_flags(9), H5F_CLOSE_WEAK_F) - EQUIVALENCE(H5F_flags(10), H5F_CLOSE_SEMI_F) - EQUIVALENCE(H5F_flags(11), H5F_CLOSE_STRONG_F) - EQUIVALENCE(H5F_flags(12), H5F_OBJ_FILE_F) - EQUIVALENCE(H5F_flags(13), H5F_OBJ_DATASET_F) - EQUIVALENCE(H5F_flags(14), H5F_OBJ_GROUP_F) - EQUIVALENCE(H5F_flags(15), H5F_OBJ_DATATYPE_F) - EQUIVALENCE(H5F_flags(16), H5F_OBJ_ALL_F) - EQUIVALENCE(H5F_flags(17), H5F_LIBVER_EARLIEST_F) - EQUIVALENCE(H5F_flags(18), H5F_LIBVER_LATEST_F) - EQUIVALENCE(H5F_flags(19), H5F_UNLIMITED_F) - ! - ! H5generic flags declaration - ! - INTEGER, PARAMETER :: H5generic_FLAGS_LEN = 9 - INTEGER :: H5generic_flags(H5generic_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5generic_FLAGS/ - !DEC$endif - COMMON /H5generic_FLAGS/ H5generic_flags - - INTEGER :: H5_INDEX_UNKNOWN_F - INTEGER :: H5_INDEX_NAME_F - INTEGER :: H5_INDEX_CRT_ORDER_F - INTEGER :: H5_INDEX_N_F - INTEGER :: H5_ITER_UNKNOWN_F - INTEGER :: H5_ITER_INC_F - INTEGER :: H5_ITER_DEC_F - INTEGER :: H5_ITER_NATIVE_F - INTEGER :: H5_ITER_N_F - - EQUIVALENCE(H5generic_flags(1), H5_INDEX_UNKNOWN_F) - EQUIVALENCE(H5generic_flags(2), H5_INDEX_NAME_F) - EQUIVALENCE(H5generic_flags(3), H5_INDEX_CRT_ORDER_F) - EQUIVALENCE(H5generic_flags(4), H5_INDEX_N_F) - EQUIVALENCE(H5generic_flags(5), H5_ITER_UNKNOWN_F) - EQUIVALENCE(H5generic_flags(6), H5_ITER_INC_F) - EQUIVALENCE(H5generic_flags(7), H5_ITER_DEC_F) - EQUIVALENCE(H5generic_flags(8), H5_ITER_NATIVE_F) - EQUIVALENCE(H5generic_flags(9), H5_ITER_N_F) - ! - ! H5G flags declaration - ! - INTEGER, PARAMETER :: H5G_FLAGS_LEN = 12 - INTEGER :: H5G_flags(H5G_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5G_FLAGS/ - !DEC$endif - COMMON /H5G_FLAGS/ H5G_flags - - INTEGER :: H5G_UNKNOWN_F - INTEGER :: H5G_GROUP_F - INTEGER :: H5G_DATASET_F - INTEGER :: H5G_TYPE_F - INTEGER :: H5G_LINK_F - INTEGER :: H5G_UDLINK_F - INTEGER :: H5G_SAME_LOC_F - INTEGER :: H5G_LINK_ERROR_F - INTEGER :: H5G_LINK_HARD_F - INTEGER :: H5G_LINK_SOFT_F - INTEGER :: H5G_STORAGE_TYPE_UNKNOWN_F - INTEGER :: H5G_STORAGE_TYPE_SYMBOL_TABLE_F - INTEGER :: H5G_STORAGE_TYPE_COMPACT_F - INTEGER :: H5G_STORAGE_TYPE_DENSE_F - - EQUIVALENCE(H5G_flags(1), H5G_UNKNOWN_F) ! Unknown object type - EQUIVALENCE(H5G_flags(2), H5G_GROUP_F) ! Object is a group - EQUIVALENCE(H5G_flags(3), H5G_DATASET_F) ! Object is a dataset - EQUIVALENCE(H5G_flags(4), H5G_TYPE_F) ! Object is a named data type - EQUIVALENCE(H5G_flags(5), H5G_SAME_LOC_F) - EQUIVALENCE(H5G_flags(6), H5G_LINK_ERROR_F) - EQUIVALENCE(H5G_flags(7), H5G_LINK_HARD_F) - EQUIVALENCE(H5G_flags(8), H5G_LINK_SOFT_F) - - EQUIVALENCE(H5G_flags(9), H5G_STORAGE_TYPE_UNKNOWN_F ) - EQUIVALENCE(H5G_flags(10), H5G_STORAGE_TYPE_SYMBOL_TABLE_F) - EQUIVALENCE(H5G_flags(11), H5G_STORAGE_TYPE_COMPACT_F) - EQUIVALENCE(H5G_flags(12), H5G_STORAGE_TYPE_DENSE_F) - ! - ! H5D flags declaration - ! - - INTEGER, PARAMETER :: H5D_FLAGS_LEN = 25 - INTEGER :: H5D_flags(H5D_FLAGS_LEN) - INTEGER, PARAMETER :: H5D_SIZE_FLAGS_LEN = 2 - INTEGER(SIZE_T) :: H5D_size_flags(H5D_SIZE_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5D_FLAGS/ - !DEC$ATTRIBUTES DLLEXPORT :: /H5D_SIZE_FLAGS/ - !DEC$endif - COMMON /H5D_FLAGS/ H5D_flags - COMMON /H5D_SIZE_FLAGS/ H5D_size_flags - - INTEGER :: H5D_COMPACT_F - INTEGER :: H5D_CONTIGUOUS_F - INTEGER :: H5D_CHUNKED_F - - INTEGER :: H5D_ALLOC_TIME_ERROR_F - INTEGER :: H5D_ALLOC_TIME_DEFAULT_F - INTEGER :: H5D_ALLOC_TIME_EARLY_F - INTEGER :: H5D_ALLOC_TIME_LATE_F - INTEGER :: H5D_ALLOC_TIME_INCR_F - - INTEGER :: H5D_SPACE_STS_ERROR_F - INTEGER :: H5D_SPACE_STS_NOT_ALLOCATED_F - INTEGER :: H5D_SPACE_STS_PART_ALLOCATED_F - INTEGER :: H5D_SPACE_STS_ALLOCATED_F - - INTEGER :: H5D_FILL_TIME_ERROR_F - INTEGER :: H5D_FILL_TIME_ALLOC_F - INTEGER :: H5D_FILL_TIME_NEVER_F - - INTEGER :: H5D_FILL_VALUE_ERROR_F - INTEGER :: H5D_FILL_VALUE_UNDEFINED_F - INTEGER :: H5D_FILL_VALUE_DEFAULT_F - INTEGER :: H5D_FILL_VALUE_USER_DEFINED_F - -! shortened "_DEFAULT" to "_DFLT" to satisfy the limit of 31 -! characters for variable names in Fortran. -! shortened "_CONTIGUOUS" to "_CONTIG" to satisfy the limit of 31 -! characters for variable names in Fortran. - - INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NSLOTS_DFLT_F - INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NBYTES_DFLT_F - INTEGER :: H5D_CHUNK_CACHE_W0_DFLT_F - INTEGER :: H5D_MPIO_NO_COLLECTIVE_F - INTEGER :: H5D_MPIO_CHUNK_INDEPENDENT_F - INTEGER :: H5D_MPIO_CHUNK_COLLECTIVE_F - INTEGER :: H5D_MPIO_CHUNK_MIXED_F - INTEGER :: H5D_MPIO_CONTIG_COLLECTIVE_F - - EQUIVALENCE(H5D_flags(1), H5D_COMPACT_F) - EQUIVALENCE(H5D_flags(2), H5D_CONTIGUOUS_F) - EQUIVALENCE(H5D_flags(3), H5D_CHUNKED_F) - - EQUIVALENCE(H5D_flags(4), H5D_ALLOC_TIME_ERROR_F) - EQUIVALENCE(H5D_flags(5), H5D_ALLOC_TIME_DEFAULT_F) - EQUIVALENCE(H5D_flags(6), H5D_ALLOC_TIME_EARLY_F) - EQUIVALENCE(H5D_flags(7), H5D_ALLOC_TIME_LATE_F) - EQUIVALENCE(H5D_flags(8), H5D_ALLOC_TIME_INCR_F) - - EQUIVALENCE(H5D_flags(9), H5D_SPACE_STS_ERROR_F) - EQUIVALENCE(H5D_flags(10), H5D_SPACE_STS_NOT_ALLOCATED_F) - EQUIVALENCE(H5D_flags(11), H5D_SPACE_STS_PART_ALLOCATED_F) - EQUIVALENCE(H5D_flags(12), H5D_SPACE_STS_ALLOCATED_F) - - EQUIVALENCE(H5D_flags(13), H5D_FILL_TIME_ERROR_F) - EQUIVALENCE(H5D_flags(14), H5D_FILL_TIME_ALLOC_F) - EQUIVALENCE(H5D_flags(15), H5D_FILL_TIME_NEVER_F) - - EQUIVALENCE(H5D_flags(16), H5D_FILL_VALUE_ERROR_F) - EQUIVALENCE(H5D_flags(17), H5D_FILL_VALUE_UNDEFINED_F) - EQUIVALENCE(H5D_flags(18), H5D_FILL_VALUE_DEFAULT_F) - EQUIVALENCE(H5D_flags(19), H5D_FILL_VALUE_USER_DEFINED_F) - - EQUIVALENCE(H5D_flags(20), H5D_CHUNK_CACHE_W0_DFLT_F) - EQUIVALENCE(H5D_flags(21), H5D_MPIO_NO_COLLECTIVE_F) - EQUIVALENCE(H5D_flags(22), H5D_MPIO_CHUNK_INDEPENDENT_F) - EQUIVALENCE(H5D_flags(23), H5D_MPIO_CHUNK_COLLECTIVE_F) - EQUIVALENCE(H5D_flags(24), H5D_MPIO_CHUNK_MIXED_F) - EQUIVALENCE(H5D_flags(25), H5D_MPIO_CONTIG_COLLECTIVE_F) - - EQUIVALENCE(H5D_size_flags(1), H5D_CHUNK_CACHE_NSLOTS_DFLT_F) - EQUIVALENCE(H5D_size_flags(2), H5D_CHUNK_CACHE_NBYTES_DFLT_F) - - ! - ! H5E flags declaration - ! - INTEGER, PARAMETER :: H5E_FLAGS_LEN = 4 - INTEGER :: H5E_flags(H5E_FLAGS_LEN) - INTEGER, PARAMETER :: H5E_HID_FLAGS_LEN = 1 - INTEGER(HID_T) :: H5E_hid_flags(H5E_HID_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5E_FLAGS/ - !DEC$ATTRIBUTES DLLEXPORT :: /H5E_HID_FLAGS/ - !DEC$endif - COMMON /H5E_FLAGS/ H5E_flags - COMMON /H5E_HID_FLAGS/ H5E_hid_flags - - INTEGER(HID_T) :: H5E_DEFAULT_F - INTEGER :: H5E_MAJOR_F - INTEGER :: H5E_MINOR_F - INTEGER :: H5E_WALK_UPWARD_F - INTEGER :: H5E_WALK_DOWNWARD_F - - EQUIVALENCE(H5E_hid_flags(1), H5E_DEFAULT_F) - EQUIVALENCE(H5E_flags(1) , H5E_MAJOR_F) - EQUIVALENCE(H5E_flags(2) , H5E_MINOR_F) - EQUIVALENCE(H5E_flags(3) , H5E_WALK_UPWARD_F) - EQUIVALENCE(H5E_flags(4) , H5E_WALK_DOWNWARD_F) - - ! - ! H5FD flags declaration - ! - INTEGER, PARAMETER :: H5FD_FLAGS_LEN = 11 - INTEGER :: H5FD_flags(H5FD_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_FLAGS/ - !DEC$endif - COMMON /H5FD_FLAGS/ H5FD_flags - - INTEGER :: H5FD_MPIO_INDEPENDENT_F - INTEGER :: H5FD_MPIO_COLLECTIVE_F - INTEGER :: H5FD_MEM_NOLIST_F - INTEGER :: H5FD_MEM_DEFAULT_F - INTEGER :: H5FD_MEM_SUPER_F - INTEGER :: H5FD_MEM_BTREE_F - INTEGER :: H5FD_MEM_DRAW_F - INTEGER :: H5FD_MEM_GHEAP_F - INTEGER :: H5FD_MEM_LHEAP_F - INTEGER :: H5FD_MEM_OHDR_F - INTEGER :: H5FD_MEM_NTYPES_F - - EQUIVALENCE(H5FD_flags(1), H5FD_MPIO_INDEPENDENT_F) - EQUIVALENCE(H5FD_flags(2), H5FD_MPIO_COLLECTIVE_F) - EQUIVALENCE(H5FD_flags(3), H5FD_MEM_NOLIST_F) - EQUIVALENCE(H5FD_flags(4), H5FD_MEM_DEFAULT_F) - EQUIVALENCE(H5FD_flags(5), H5FD_MEM_SUPER_F) - EQUIVALENCE(H5FD_flags(6), H5FD_MEM_BTREE_F) - EQUIVALENCE(H5FD_flags(7), H5FD_MEM_DRAW_F) - EQUIVALENCE(H5FD_flags(8), H5FD_MEM_GHEAP_F) - EQUIVALENCE(H5FD_flags(9), H5FD_MEM_LHEAP_F) - EQUIVALENCE(H5FD_flags(10), H5FD_MEM_OHDR_F) - EQUIVALENCE(H5FD_flags(11), H5FD_MEM_NTYPES_F) - ! - ! H5FD file drivers flags declaration - ! - INTEGER, PARAMETER :: H5FD_HID_FLAGS_LEN = 7 - INTEGER(HID_T) :: H5FD_hid_flags(H5FD_HID_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5FD_HID_FLAGS/ - !DEC$endif - COMMON /H5FD_HID_FLAGS/ H5FD_hid_flags - - INTEGER(HID_T) :: H5FD_CORE_F - INTEGER(HID_T) :: H5FD_FAMILY_F - INTEGER(HID_T) :: H5FD_LOG_F - INTEGER(HID_T) :: H5FD_MPIO_F - INTEGER(HID_T) :: H5FD_MULTI_F - INTEGER(HID_T) :: H5FD_SEC2_F - INTEGER(HID_T) :: H5FD_STDIO_F - - EQUIVALENCE(H5FD_hid_flags(1), H5FD_CORE_F) - EQUIVALENCE(H5FD_hid_flags(2), H5FD_FAMILY_F) - EQUIVALENCE(H5FD_hid_flags(3), H5FD_LOG_F) - EQUIVALENCE(H5FD_hid_flags(4), H5FD_MPIO_F) - EQUIVALENCE(H5FD_hid_flags(5), H5FD_MULTI_F) - EQUIVALENCE(H5FD_hid_flags(6), H5FD_SEC2_F) - EQUIVALENCE(H5FD_hid_flags(7), H5FD_STDIO_F) - - ! - ! H5I flags declaration - ! - INTEGER, PARAMETER :: H5I_FLAGS_LEN = 7 - INTEGER :: H5I_flags(H5I_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5I_FLAGS/ - !DEC$endif - COMMON /H5I_FLAGS/ H5I_flags - - INTEGER :: H5I_FILE_F - INTEGER :: H5I_GROUP_F - INTEGER :: H5I_DATATYPE_F - INTEGER :: H5I_DATASPACE_F - INTEGER :: H5I_DATASET_F - INTEGER :: H5I_ATTR_F - INTEGER :: H5I_BADID_F - - EQUIVALENCE(H5I_flags(1), H5I_FILE_F) - EQUIVALENCE(H5I_flags(2), H5I_GROUP_F) - EQUIVALENCE(H5I_flags(3), H5I_DATATYPE_F) - EQUIVALENCE(H5I_flags(4), H5I_DATASPACE_F) - EQUIVALENCE(H5I_flags(5), H5I_DATASET_F) - EQUIVALENCE(H5I_flags(6), H5I_ATTR_F) - EQUIVALENCE(H5I_flags(7), H5I_BADID_F) - ! - ! H5L flags declaration - ! - INTEGER, PARAMETER :: H5L_FLAGS_LEN = 6 - INTEGER :: H5L_flags(H5L_FLAGS_LEN) - - INTEGER :: H5L_TYPE_ERROR_F - INTEGER :: H5L_TYPE_HARD_F - INTEGER :: H5L_TYPE_SOFT_F - INTEGER :: H5L_TYPE_EXTERNAL_F - INTEGER :: H5L_SAME_LOC_F - INTEGER :: H5L_LINK_CLASS_T_VERS_F - - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5L_FLAGS/ - !DEC$endif - COMMON /H5L_FLAGS/ H5L_flags - - EQUIVALENCE(H5L_flags(1), H5L_TYPE_ERROR_F) - EQUIVALENCE(H5L_flags(2), H5L_TYPE_HARD_F) - EQUIVALENCE(H5L_flags(3), H5L_TYPE_SOFT_F) - EQUIVALENCE(H5L_flags(4), H5L_TYPE_EXTERNAL_F) - EQUIVALENCE(H5L_flags(5), H5L_SAME_LOC_F) - EQUIVALENCE(H5L_flags(6), H5L_LINK_CLASS_T_VERS_F) - ! - ! H5O flags declaration - ! - INTEGER, PARAMETER :: H5O_FLAGS_LEN = 27 - INTEGER :: H5o_flags(H5O_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5O_FLAGS/ - !DEC$endif - COMMON /H5O_FLAGS/ H5O_flags - - INTEGER :: H5O_COPY_SHALLOW_HIERARCHY_F ! *** THESE VARIABLES DO - INTEGER :: H5O_COPY_EXPAND_SOFT_LINK_F ! NOT MATCH THE C VARIABLE - INTEGER :: H5O_COPY_EXPAND_EXT_LINK_F ! IN ORDER - INTEGER :: H5O_COPY_EXPAND_REFERENCE_F ! TO STAY UNDER THE - INTEGER :: H5O_COPY_WITHOUT_ATTR_FLAG_F - INTEGER :: H5O_COPY_PRESERVE_NULL_FLAG_F - INTEGER :: H5O_COPY_ALL_F - INTEGER :: H5O_SHMESG_NONE_FLAG_F - INTEGER :: H5O_SHMESG_SDSPACE_FLAG_F - INTEGER :: H5O_SHMESG_DTYPE_FLAG_F - INTEGER :: H5O_SHMESG_FILL_FLAG_F - INTEGER :: H5O_SHMESG_PLINE_FLAG_F - INTEGER :: H5O_SHMESG_ATTR_FLAG_F - INTEGER :: H5O_SHMESG_ALL_FLAG_F - INTEGER :: H5O_HDR_CHUNK0_SIZE_F - INTEGER :: H5O_HDR_ATTR_CRT_ORDER_TRACK_F ! 32 CHARACTER - INTEGER :: H5O_HDR_ATTR_CRT_ORDER_INDEX_F ! VARIABLE - INTEGER :: H5O_HDR_ATTR_STORE_PHASE_CHA_F ! LENGTH *** - INTEGER :: H5O_HDR_STORE_TIMES_F - INTEGER :: H5O_HDR_ALL_FLAGS_F - INTEGER :: H5O_SHMESG_MAX_NINDEXES_F - INTEGER :: H5O_SHMESG_MAX_LIST_SIZE_F - INTEGER :: H5O_TYPE_UNKNOWN_F - INTEGER :: H5O_TYPE_GROUP_F - INTEGER :: H5O_TYPE_DATASET_F - INTEGER :: H5O_TYPE_NAMED_DATATYPE_F - INTEGER :: H5O_TYPE_NTYPES_F - - EQUIVALENCE(h5o_flags(1) , H5O_COPY_SHALLOW_HIERARCHY_F) - EQUIVALENCE(h5o_flags(2) , H5O_COPY_EXPAND_SOFT_LINK_F) - EQUIVALENCE(h5o_flags(3) , H5O_COPY_EXPAND_EXT_LINK_F) - EQUIVALENCE(h5o_flags(4) , H5O_COPY_EXPAND_REFERENCE_F) - EQUIVALENCE(h5o_flags(5) , H5O_COPY_WITHOUT_ATTR_FLAG_F) - EQUIVALENCE(h5o_flags(6) , H5O_COPY_PRESERVE_NULL_FLAG_F) - EQUIVALENCE(h5o_flags(7) , H5O_COPY_ALL_F) - EQUIVALENCE(h5o_flags(8) , H5O_SHMESG_NONE_FLAG_F) - EQUIVALENCE(h5o_flags(9) , H5O_SHMESG_SDSPACE_FLAG_F) - EQUIVALENCE(h5o_flags(10) , H5O_SHMESG_DTYPE_FLAG_F) - EQUIVALENCE(h5o_flags(11) , H5O_SHMESG_FILL_FLAG_F) - EQUIVALENCE(h5o_flags(12) , H5O_SHMESG_PLINE_FLAG_F) - EQUIVALENCE(h5o_flags(13) , H5O_SHMESG_ATTR_FLAG_F) - EQUIVALENCE(h5o_flags(14) , H5O_SHMESG_ALL_FLAG_F) - EQUIVALENCE(h5o_flags(15) , H5O_HDR_CHUNK0_SIZE_F) - EQUIVALENCE(h5o_flags(16) , H5O_HDR_ATTR_CRT_ORDER_TRACK_F) - EQUIVALENCE(h5o_flags(17) , H5O_HDR_ATTR_CRT_ORDER_INDEX_F) - EQUIVALENCE(h5o_flags(18) , H5O_HDR_ATTR_STORE_PHASE_CHA_F) - EQUIVALENCE(h5o_flags(19) , H5O_HDR_STORE_TIMES_F) - EQUIVALENCE(h5o_flags(20) , H5O_HDR_ALL_FLAGS_F) - EQUIVALENCE(h5o_flags(21) , H5O_SHMESG_MAX_NINDEXES_F) - EQUIVALENCE(h5o_flags(22) , H5O_SHMESG_MAX_LIST_SIZE_F) - EQUIVALENCE(h5o_flags(23) , H5O_TYPE_UNKNOWN_F) - EQUIVALENCE(h5o_flags(24) , H5O_TYPE_GROUP_F) - EQUIVALENCE(h5o_flags(25) , H5O_TYPE_DATASET_F) - EQUIVALENCE(h5o_flags(26) , H5O_TYPE_NAMED_DATATYPE_F) - EQUIVALENCE(h5o_flags(27) , H5O_TYPE_NTYPES_F) - - ! - ! H5P flags declaration - ! - INTEGER, PARAMETER :: H5P_FLAGS_LEN = 18 - INTEGER(HID_T) H5P_flags(H5P_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS/ - !DEC$endif - COMMON /H5P_FLAGS/ H5P_flags - - INTEGER(HID_T) :: H5P_FILE_CREATE_F - INTEGER(HID_T) :: H5P_FILE_ACCESS_F - INTEGER(HID_T) :: H5P_DATASET_CREATE_F - INTEGER(HID_T) :: H5P_DATASET_XFER_F - INTEGER(HID_T) :: H5P_FILE_MOUNT_F - INTEGER(HID_T) :: H5P_DEFAULT_F - INTEGER(HID_T) :: H5P_ROOT_F - INTEGER(HID_T) :: H5P_OBJECT_CREATE_F - INTEGER(HID_T) :: H5P_DATASET_ACCESS_F - INTEGER(HID_T) :: H5P_GROUP_CREATE_F - INTEGER(HID_T) :: H5P_GROUP_ACCESS_F - INTEGER(HID_T) :: H5P_DATATYPE_CREATE_F - INTEGER(HID_T) :: H5P_DATATYPE_ACCESS_F - INTEGER(HID_T) :: H5P_STRING_CREATE_F - INTEGER(HID_T) :: H5P_ATTRIBUTE_CREATE_F - INTEGER(HID_T) :: H5P_OBJECT_COPY_F - INTEGER(HID_T) :: H5P_LINK_CREATE_F - INTEGER(HID_T) :: H5P_LINK_ACCESS_F - - EQUIVALENCE(H5P_flags(1), H5P_FILE_CREATE_F) - EQUIVALENCE(H5P_flags(2), H5P_FILE_ACCESS_F) - EQUIVALENCE(H5P_flags(3), H5P_DATASET_CREATE_F) - EQUIVALENCE(H5P_flags(4), H5P_DATASET_XFER_F) - EQUIVALENCE(H5P_flags(5), H5P_FILE_MOUNT_F) - EQUIVALENCE(H5P_flags(6), H5P_DEFAULT_F) - EQUIVALENCE(H5P_flags(7), H5P_ROOT_F) - EQUIVALENCE(H5P_flags(8), H5P_OBJECT_CREATE_F) - EQUIVALENCE(H5P_flags(9), H5P_DATASET_ACCESS_F) - EQUIVALENCE(H5P_flags(10), H5P_GROUP_CREATE_F) - EQUIVALENCE(H5P_flags(11), H5P_GROUP_ACCESS_F) - EQUIVALENCE(H5P_flags(12), H5P_DATATYPE_CREATE_F) - EQUIVALENCE(H5P_flags(13), H5P_DATATYPE_ACCESS_F) - EQUIVALENCE(H5P_flags(14), H5P_STRING_CREATE_F) - EQUIVALENCE(H5P_flags(15), H5P_ATTRIBUTE_CREATE_F) - EQUIVALENCE(H5P_flags(16), H5P_OBJECT_COPY_F) - EQUIVALENCE(H5P_flags(17), H5P_LINK_CREATE_F) - EQUIVALENCE(H5P_flags(18), H5P_LINK_ACCESS_F) - - ! - ! H5P integers flags declaration - ! - INTEGER, PARAMETER :: H5P_FLAGS_INT_LEN = 2 - INTEGER :: H5P_flags_int(H5P_FLAGS_INT_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS_INT/ - !DEC$endif - COMMON /H5P_FLAGS_INT/ H5P_flags_int - INTEGER :: H5P_CRT_ORDER_INDEXED_F - INTEGER :: H5P_CRT_ORDER_TRACKED_F - EQUIVALENCE(H5P_flags_int(1), H5P_CRT_ORDER_INDEXED_F) - EQUIVALENCE(H5P_flags_int(2), H5P_CRT_ORDER_TRACKED_F) - ! - ! H5R flags declaration - ! - INTEGER, PARAMETER :: H5R_FLAGS_LEN = 2 - INTEGER :: H5R_flags(H5R_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5R_FLAGS/ - !DEC$endif - COMMON /H5R_FLAGS/ H5R_flags - - INTEGER :: H5R_OBJECT_F - INTEGER :: H5R_DATASET_REGION_F - - EQUIVALENCE(H5R_flags(1), H5R_OBJECT_F) - EQUIVALENCE(H5R_flags(2), H5R_DATASET_REGION_F) - - ! - ! H5S flags declaration - ! - INTEGER, PARAMETER :: H5S_FLAGS_LEN = 19 - INTEGER :: H5S_flags(H5S_FLAGS_LEN) - INTEGER, PARAMETER :: H5S_HSIZE_FLAGS_LEN = 1 - INTEGER(HSIZE_T) H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5S_FLAGS/ - !DEC$ATTRIBUTES DLLEXPORT :: /H5S_HSIZE_FLAGS/ - !DEC$endif - COMMON /H5S_FLAGS/ H5S_flags - COMMON /H5S_HSIZE_FLAGS/ H5S_hsize_flags - - INTEGER(HSIZE_T) :: H5S_UNLIMITED_F - - INTEGER :: H5S_SCALAR_F - INTEGER :: H5S_SIMPLE_F - INTEGER :: H5S_NULL_F - - INTEGER :: H5S_ALL_F - - INTEGER :: H5S_SELECT_NOOP_F - INTEGER :: H5S_SELECT_SET_F - INTEGER :: H5S_SELECT_OR_F - INTEGER :: H5S_SELECT_AND_F - INTEGER :: H5S_SELECT_XOR_F - INTEGER :: H5S_SELECT_NOTB_F - INTEGER :: H5S_SELECT_NOTA_F - INTEGER :: H5S_SELECT_APPEND_F - INTEGER :: H5S_SELECT_PREPEND_F - INTEGER :: H5S_SELECT_INVALID_F - - INTEGER :: H5S_SEL_ERROR_F - INTEGER :: H5S_SEL_NONE_F - INTEGER :: H5S_SEL_POINTS_F - INTEGER :: H5S_SEL_HYPERSLABS_F - INTEGER :: H5S_SEL_ALL_F - - EQUIVALENCE(H5S_hsize_flags(1), H5S_UNLIMITED_F) - EQUIVALENCE(H5S_flags(1), H5S_SCALAR_F) - EQUIVALENCE(H5S_flags(2), H5S_SIMPLE_F) - EQUIVALENCE(H5S_flags(3), H5S_NULL_F) - EQUIVALENCE(H5S_flags(4), H5S_SELECT_SET_F) - EQUIVALENCE(H5S_flags(5), H5S_SELECT_OR_F) - EQUIVALENCE(H5S_flags(6), H5S_ALL_F) - - EQUIVALENCE(H5S_flags(7), H5S_SELECT_NOOP_F) - EQUIVALENCE(H5S_flags(8), H5S_SELECT_AND_F) - EQUIVALENCE(H5S_flags(9), H5S_SELECT_XOR_F) - EQUIVALENCE(H5S_flags(10), H5S_SELECT_NOTB_F) - EQUIVALENCE(H5S_flags(11), H5S_SELECT_NOTA_F) - EQUIVALENCE(H5S_flags(12), H5S_SELECT_APPEND_F) - EQUIVALENCE(H5S_flags(13), H5S_SELECT_PREPEND_F) - EQUIVALENCE(H5S_flags(14), H5S_SELECT_INVALID_F) - - - EQUIVALENCE(H5S_flags(15), H5S_SEL_ERROR_F) - EQUIVALENCE(H5S_flags(16), H5S_SEL_NONE_F) - EQUIVALENCE(H5S_flags(17), H5S_SEL_POINTS_F) - EQUIVALENCE(H5S_flags(18), H5S_SEL_HYPERSLABS_F) - EQUIVALENCE(H5S_flags(19), H5S_SEL_ALL_F) - - ! - ! H5T flags declaration - ! - INTEGER, PARAMETER :: H5T_FLAGS_LEN = 35 - INTEGER :: H5T_flags(H5T_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5T_FLAGS/ - !DEC$endif - COMMON /H5T_FLAGS/ H5T_flags - - INTEGER :: H5T_NO_CLASS_F - INTEGER :: H5T_INTEGER_F - INTEGER :: H5T_FLOAT_F - INTEGER :: H5T_TIME_F - INTEGER :: H5T_STRING_F - INTEGER :: H5T_BITFIELD_F - INTEGER :: H5T_OPAQUE_F - INTEGER :: H5T_COMPOUND_F - INTEGER :: H5T_REFERENCE_F - INTEGER :: H5T_ENUM_F - INTEGER :: H5T_VLEN_F - INTEGER :: H5T_ARRAY_F - INTEGER :: H5T_ORDER_LE_F - INTEGER :: H5T_ORDER_BE_F - INTEGER :: H5T_ORDER_VAX_F - INTEGER :: H5T_ORDER_NONE_F - INTEGER :: H5T_ORDER_MIXED_F - INTEGER :: H5T_PAD_ZERO_F - INTEGER :: H5T_PAD_ONE_F - INTEGER :: H5T_PAD_BACKGROUND_F - INTEGER :: H5T_PAD_ERROR_F - INTEGER :: H5T_SGN_NONE_F - INTEGER :: H5T_SGN_2_F - INTEGER :: H5T_SGN_ERROR_F - INTEGER :: H5T_NORM_IMPLIED_F - INTEGER :: H5T_NORM_MSBSET_F - INTEGER :: H5T_NORM_NONE_F - INTEGER :: H5T_CSET_ASCII_F - INTEGER :: H5T_CSET_UTF8_F - INTEGER :: H5T_STR_NULLTERM_F - INTEGER :: H5T_STR_NULLPAD_F - INTEGER :: H5T_STR_SPACEPAD_F - INTEGER :: H5T_STR_ERROR_F - INTEGER :: H5T_DIR_ASCEND_F - INTEGER :: H5T_DIR_DESCEND_F - - EQUIVALENCE(H5T_flags(1), H5T_NO_CLASS_F) - EQUIVALENCE(H5T_flags(2), H5T_INTEGER_F) - EQUIVALENCE(H5T_flags(3), H5T_FLOAT_F) - EQUIVALENCE(H5T_flags(4), H5T_TIME_F) - EQUIVALENCE(H5T_flags(5), H5T_STRING_F) - EQUIVALENCE(H5T_flags(6), H5T_BITFIELD_F) - EQUIVALENCE(H5T_flags(7), H5T_OPAQUE_F) - EQUIVALENCE(H5T_flags(8), H5T_COMPOUND_F) - EQUIVALENCE(H5T_flags(9), H5T_REFERENCE_F) - EQUIVALENCE(H5T_flags(10), H5T_ENUM_F) - EQUIVALENCE(H5T_flags(11), H5T_ORDER_LE_F) - EQUIVALENCE(H5T_flags(12), H5T_ORDER_BE_F) - EQUIVALENCE(H5T_flags(13), H5T_ORDER_MIXED_F) - EQUIVALENCE(H5T_flags(14), H5T_ORDER_VAX_F) - EQUIVALENCE(H5T_flags(15), H5T_ORDER_NONE_F) - EQUIVALENCE(H5T_flags(16), H5T_PAD_ZERO_F) - EQUIVALENCE(H5T_flags(17), H5T_PAD_ONE_F) - EQUIVALENCE(H5T_flags(18), H5T_PAD_BACKGROUND_F) - EQUIVALENCE(H5T_flags(19), H5T_PAD_ERROR_F) - EQUIVALENCE(H5T_flags(20), H5T_SGN_NONE_F) - EQUIVALENCE(H5T_flags(21), H5T_SGN_2_F) - EQUIVALENCE(H5T_flags(22), H5T_SGN_ERROR_F) - EQUIVALENCE(H5T_flags(23), H5T_NORM_IMPLIED_F) - EQUIVALENCE(H5T_flags(24), H5T_NORM_MSBSET_F) - EQUIVALENCE(H5T_flags(25), H5T_NORM_NONE_F) - EQUIVALENCE(H5T_flags(26), H5T_CSET_ASCII_F) - EQUIVALENCE(H5T_flags(27), H5T_CSET_UTF8_F) - EQUIVALENCE(H5T_flags(28), H5T_STR_NULLTERM_F) - EQUIVALENCE(H5T_flags(29), H5T_STR_NULLPAD_F) - EQUIVALENCE(H5T_flags(30), H5T_STR_SPACEPAD_F) - EQUIVALENCE(H5T_flags(31), H5T_STR_ERROR_F) - EQUIVALENCE(H5T_flags(32), H5T_VLEN_F) - EQUIVALENCE(H5T_flags(33), H5T_ARRAY_F) - EQUIVALENCE(H5T_flags(34), H5T_DIR_ASCEND_F) - EQUIVALENCE(H5T_flags(35), H5T_DIR_DESCEND_F) - ! - ! H5Z flags declaration - ! - INTEGER, PARAMETER :: H5Z_FLAGS_LEN = 20 - INTEGER :: H5Z_flags(H5Z_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5Z_FLAGS/ - !DEC$endif - COMMON /H5Z_FLAGS/ H5Z_flags - - INTEGER :: H5Z_FILTER_ERROR_F - INTEGER :: H5Z_FILTER_NONE_F - INTEGER :: H5Z_FILTER_ALL_F - INTEGER :: H5Z_FILTER_DEFLATE_F - INTEGER :: H5Z_FILTER_SHUFFLE_F - INTEGER :: H5Z_FILTER_FLETCHER32_F - INTEGER :: H5Z_FILTER_SZIP_F - INTEGER :: H5Z_ERROR_EDC_F - INTEGER :: H5Z_DISABLE_EDC_F - INTEGER :: H5Z_ENABLE_EDC_F - INTEGER :: H5Z_NO_EDC_F - INTEGER :: H5Z_FLAG_OPTIONAL_F - INTEGER :: H5Z_FILTER_ENCODE_ENABLED_F - INTEGER :: H5Z_FILTER_DECODE_ENABLED_F - INTEGER :: H5Z_FILTER_NBIT_F - INTEGER :: H5Z_FILTER_SCALEOFFSET_F - INTEGER :: H5Z_SO_FLOAT_DSCALE_F - INTEGER :: H5Z_SO_FLOAT_ESCALE_F - INTEGER :: H5Z_SO_INT_F - INTEGER :: H5Z_SO_INT_MINBITS_DEFAULT_F - - EQUIVALENCE(H5Z_flags(1), H5Z_FILTER_ERROR_F) - EQUIVALENCE(H5Z_flags(2), H5Z_FILTER_NONE_F) - EQUIVALENCE(H5Z_flags(3), H5Z_FILTER_DEFLATE_F) - EQUIVALENCE(H5Z_flags(4), H5Z_FILTER_SHUFFLE_F) - EQUIVALENCE(H5Z_flags(5), H5Z_FILTER_FLETCHER32_F) - EQUIVALENCE(H5Z_flags(6), H5Z_ERROR_EDC_F) - EQUIVALENCE(H5Z_flags(7), H5Z_DISABLE_EDC_F) - EQUIVALENCE(H5Z_flags(8), H5Z_ENABLE_EDC_F) - EQUIVALENCE(H5Z_flags(9), H5Z_NO_EDC_F) - EQUIVALENCE(H5Z_flags(10), H5Z_FILTER_SZIP_F) - EQUIVALENCE(H5Z_flags(11), H5Z_FLAG_OPTIONAL_F) - EQUIVALENCE(H5Z_flags(12), H5Z_FILTER_ENCODE_ENABLED_F) - EQUIVALENCE(H5Z_flags(13), H5Z_FILTER_DECODE_ENABLED_F) - EQUIVALENCE(H5Z_flags(14), H5Z_FILTER_ALL_F) - EQUIVALENCE(H5Z_flags(15), H5Z_FILTER_NBIT_F) - EQUIVALENCE(H5Z_flags(16), H5Z_FILTER_SCALEOFFSET_F) - EQUIVALENCE(H5Z_flags(17), H5Z_SO_FLOAT_DSCALE_F) - EQUIVALENCE(H5Z_flags(18), H5Z_SO_FLOAT_ESCALE_F) - EQUIVALENCE(H5Z_flags(19), H5Z_SO_INT_F) - EQUIVALENCE(H5Z_flags(20), H5Z_SO_INT_MINBITS_DEFAULT_F) - - ! - ! H5 Library flags declaration - ! - INTEGER, PARAMETER :: H5LIB_FLAGS_LEN = 2 - INTEGER :: H5LIB_flags(H5LIB_FLAGS_LEN) - !DEC$if defined(BUILD_HDF5_DLL) - !DEC$ATTRIBUTES DLLEXPORT :: /H5LIB_FLAGS/ - !DEC$endif - COMMON /H5LIB_FLAGS/ H5LIB_flags - INTEGER :: H5_SZIP_EC_OM_F - INTEGER :: H5_SZIP_NN_OM_F - ! - EQUIVALENCE(H5LIB_flags(1), H5_SZIP_EC_OM_F) - EQUIVALENCE(H5LIB_flags(2), H5_SZIP_NN_OM_F) - - - ! General H5 flags declarations - ! -!!$ INTEGER, PARAMETER :: H5_FLAGS_LEN = 2 -!!$ INTEGER H5_flags(H5_FLAGS_LEN) -!!$!DEC$if defined(BUILD_HDF5_DLL) -!!$!DEC$ATTRIBUTES DLLEXPORT :: /H5_FLAGS/ -!!$!DEC$endif -!!$ COMMON /H5_FLAGS/ H5_flags -!!$ -!!$ INTEGER :: _F -!!$ INTEGER :: H5F_SCOPE_LOCAL_F -!!$ -!!$ EQUIVALENCE(H5F_flags(1), H5F_SCOPE_GLOBAL_F) -!!$ EQUIVALENCE(H5F_flags(2), H5F_SCOPE_LOCAL_F) - -CONTAINS - - SUBROUTINE C2F_string(c_string, f_string) - - USE, INTRINSIC :: ISO_C_BINDING - IMPLICIT NONE - CHARACTER(KIND=C_CHAR, LEN=*), INTENT(IN) :: c_string - CHARACTER(LEN=*), INTENT(OUT) :: f_string - INTEGER(SIZE_T) :: c_len, f_len - - ! Find the length of the C string by located the null terminator - c_len = MAX(INDEX(c_string,C_NULL_CHAR, KIND=SIZE_T)-1,1) - ! Find the length of the Fortran string - f_len = LEN(f_string) - - ! CASE (1): C string is equal to or larger then Fortran character buffer, - ! so fill the entire Fortran buffer. - IF(c_len.GE.f_len)THEN ! - f_string(1:f_len) = c_string(1:f_len) - - ! CASE (2): C string is smaller then Fortran character buffer, - ! so copy C string and blank pad remaining characters. - ELSE - f_string(1:c_len) = c_string(1:c_len) - f_string(c_len+1:f_len) =' ' - ENDIF - END SUBROUTINE C2F_string - -END MODULE H5GLOBAL - diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index fc9246e..115f8f1 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -1153,27 +1153,17 @@ H5_FCDLL int_f nh5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_ /* * Functions frome H5Rf.c */ -#define nh5rcreate_object_c H5_FC_FUNC_(h5rcreate_object_c, H5RCREATE_OBJECT_C) -#define nh5rcreate_region_c H5_FC_FUNC_(h5rcreate_region_c, H5RCREATE_REGION_C) -#define nh5rdereference_region_c H5_FC_FUNC_(h5rdereference_region_c, H5RDEREFERENCE_REGION_C) -#define nh5rdereference_object_c H5_FC_FUNC_(h5rdereference_object_c, H5RDEREFERENCE_OBJECT_C) -#define nh5rget_region_region_c H5_FC_FUNC_(h5rget_region_region_c, H5RGET_REGION_REGION_C) -#define nh5rget_object_type_obj_c H5_FC_FUNC_(h5rget_object_type_obj_c, H5RGET_OBJECT_TYPE_OBJ_C) -#define nh5rget_name_object_c H5_FC_FUNC_(h5rget_name_object_c, H5RGET_NAME_OBJECT_C) -#define nh5rget_name_region_c H5_FC_FUNC_(h5rget_name_region_c, H5RGET_NAME_REGION_C) - - -H5_FCDLL int_f nh5rcreate_object_c (haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen); -H5_FCDLL int_f nh5rcreate_region_c (int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id); +H5_FCDLL int_f h5rcreate_object_c (haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen); +H5_FCDLL int_f h5rcreate_region_c (int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id); H5_FCDLL int_f h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *ref_type, hid_t_f *space_id); -H5_FCDLL int_f nh5rdereference_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id); -H5_FCDLL int_f nh5rdereference_object_c (hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id); +H5_FCDLL int_f h5rdereference_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id); +H5_FCDLL int_f h5rdereference_object_c (hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id); H5_FCDLL int_f h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_obj_id); -H5_FCDLL int_f nh5rget_region_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *space_id); +H5_FCDLL int_f h5rget_region_region_c (hid_t_f *dset_id, int_f *ref, hid_t_f *space_id); H5_FCDLL int_f h5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id); -H5_FCDLL int_f nh5rget_object_type_obj_c (hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type); -H5_FCDLL int_f nh5rget_name_object_c (hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); -H5_FCDLL int_f nh5rget_name_region_c (hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); +H5_FCDLL int_f h5rget_object_type_obj_c (hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type); +H5_FCDLL int_f h5rget_name_object_c (hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); +H5_FCDLL int_f h5rget_name_region_c (hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); H5_FCDLL int_f h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t_f *name_len, size_t_f *size_default); H5_FCDLL int_f h5rget_obj_type_c (hid_t_f *loc_id, int_f *ref_type, void *ref, int_f *obj_type); /* @@ -1262,52 +1252,39 @@ H5_FCDLL int_f nh5zget_filter_info_c (int_f *filter, int_f *flag); /* * Functions from H5Lf.c */ -#define nh5lcopy_c H5_FC_FUNC_(h5lcopy_c, H5LCOPY_C) -#define nh5lcreate_external_c H5_FC_FUNC_(h5lcreate_external_c, H5LCREATE_EXTERNAL_C) -#define nh5lcreate_hard_c H5_FC_FUNC_(h5lcreate_hard_c, H5LCREATE_HARD_C) -#define nh5lcreate_soft_c H5_FC_FUNC_(h5lcreate_soft_c, H5LCREATE_SOFT_C) -#define nh5ldelete_c H5_FC_FUNC_(h5ldelete_c, H5LDELETE_C) -#define nh5ldelete_by_idx_c H5_FC_FUNC_(h5ldelete_by_idx_c, H5LDELETE_BY_IDX_C) -#define nh5lexists_c H5_FC_FUNC_(h5lexists_c, H5LEXISTS_C) -#define nh5lget_info_c H5_FC_FUNC_(h5lget_info_c, H5LGET_INFO_C) -#define nh5lget_info_by_idx_c H5_FC_FUNC_(h5lget_info_by_idx_c, H5LGET_INFO_BY_IDX_C) -#define nh5lis_registered_c H5_FC_FUNC_(h5lis_registered_c, H5LIS_REGISTERED_C) -#define nh5lmove_c H5_FC_FUNC_(h5lmove_c, H5LMOVE_C) -#define nh5lget_name_by_idx_c H5_FC_FUNC_(h5lget_name_by_idx_c, H5LGET_NAME_BY_IDX_C) -#define nh5lget_val_c H5_FC_FUNC_(h5lget_val_c, H5LGET_VAL_C) -H5_FCDLL int_f nh5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, +H5_FCDLL int_f h5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, +H5_FCDLL int_f h5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id ); -H5_FCDLL int_f nh5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, +H5_FCDLL int_f h5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_name_len, hid_t_f *lcpl_id, hid_t_f *lapl_id ); -H5_FCDLL int_f nh5ldelete_c( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id ); -H5_FCDLL int_f nh5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f h5ldelete_c( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id ); +H5_FCDLL int_f h5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists); -H5_FCDLL int_f nh5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, +H5_FCDLL int_f h5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists); +H5_FCDLL int_f h5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f h5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, int_f *link_type, int_f *corder_valid, int_f *corder, int_f *cset, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lis_registered_c(int_f *link_cls_id); -H5_FCDLL int_f nh5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, +H5_FCDLL int_f h5lis_registered_c(int_f *link_cls_id); +H5_FCDLL int_f h5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, +H5_FCDLL int_f h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field, int_f *order, hsize_t_f *n, size_t_f *size, _fcd name, hid_t_f *lapl_id); -H5_FCDLL int_f nh5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size, +H5_FCDLL int_f h5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size, void *linkval_buff, hid_t_f *lapl_id) ; H5_FCDLL int_f h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate_t op, void *op_data ); diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c index c4b7f73..14b76a4 100644 --- a/fortran/src/H5match_types.c +++ b/fortran/src/H5match_types.c @@ -9,7 +9,7 @@ * PURPOSE * C Program to match C types to Fortran types. * Creates the files H5f90i_gen.h for the C code and - * H5fortran_types.f90 for the Fortran code. + * H5fortran_types.F90 for the Fortran code. * * COPYRIGHT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -45,7 +45,7 @@ FILE * c_header; FILE * fort_header; #define CFILE "H5f90i_gen.h" -#define FFILE "H5fortran_types.f90" +#define FFILE "H5fortran_types.F90" /* Prototypes for the write routines */ void writeTypedef(const char* c_typedef, const char* c_type, unsigned int size); diff --git a/fortran/src/H5test_kind.F90 b/fortran/src/H5test_kind.F90 new file mode 100644 index 0000000..1a1a0ec --- /dev/null +++ b/fortran/src/H5test_kind.F90 @@ -0,0 +1,269 @@ +!****p* Program/H5test_kind +! +! NAME +! Executable: H5test_kind +! +! FILE +! fortran/src/H5test_kind.f90 +! +! PURPOSE +! This stand alone program is used at build time to generate the program +! H5fortran_detect.f90. It cycles through all the available KIND parameters for +! integers and reals. The appropriate program and subroutines are then generated +! depending on which of the KIND values are found. +! +! NOTES +! This program is depreciated in favor of H5test_kind_SIZEOF.f90 and is only +! used when the Fortran intrinsic function SIZEOF is not available. It generates +! code that does not make use of SIZEOF in H5fortran_detect.f90 which is less +! portable in comparison to using SIZEOF. +! +! The availability of SIZEOF is checked at configure time and the TRUE/FALSE +! condition is set in the configure variable "FORTRAN_HAVE_SIZEOF". +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! Elena Pourma +! +!***** + +PROGRAM test_kind + IMPLICIT NONE + INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) + INTEGER :: ji, jr, jd + last = -1 + ii = 0 + j = SELECTED_INT_KIND(18) + DO i = 1,100 + j = SELECTED_INT_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ii = ii + 1 + ikind_numbers(ii) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + + last = -1 + ir = 0 + DO i = 1,100 + j = SELECTED_REAL_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ir = ir + 1 + rkind_numbers(ir) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + +! Generate program information: + +WRITE(*,'(40(A,/))') & +'!****h* ROBODoc/H5fortran_detect.f90',& +'!',& +'! NAME',& +'! H5fortran_detect',& +'! ',& +'! PURPOSE',& +'! This stand alone program is used at build time to generate the header file',& +'! H5fort_type_defines.h. The source code itself was automatically generated by',& +'! the program H5test_kind.f90',& +'!',& +'! NOTES',& +'! This source code does not make use of the Fortran intrinsic function SIZEOF because',& +'! the availability of the intrinsic function was determined to be not available at',& +'! configure time',& +'!',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'! Copyright by The HDF Group. *',& +'! Copyright by the Board of Trustees of the University of Illinois. *',& +'! All rights reserved. *',& +'! *',& +'! This file is part of HDF5. The full HDF5 copyright notice, including *',& +'! terms governing use, modification, and redistribution, is contained in *',& +'! the files COPYING and Copyright.html. COPYING can be found at the root *',& +'! of the source code distribution tree; Copyright.html can be found at the *',& +'! root level of an installed copy of the electronic HDF5 document set and *',& +'! is linked from the top-level documents page. It can also be found at *',& +'! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *',& +'! access to either file, you may request a copy from help@hdfgroup.org. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5test_kind.f90',& +'!',& +'!*****' + +! Generate a program + + WRITE(*,*) "PROGRAM int_kind" + WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ + ji = 0 + WRITE(*, "("" CALL i"", i2.2,""()"")") ji + jr = 0 + WRITE(*, "("" CALL r"", i2.2,""()"")") jr + jd = 0 + WRITE(*, "("" CALL d"", i2.2,""()"")") jd + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" CALL i"", i2.2,""()"")") j + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" CALL r"", i2.2,""()"")") j + ENDDO + WRITE(*,*) "END PROGRAM int_kind" + j = 0 + ji = KIND(1) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" INTEGER :: a = 0" + WRITE(*,*)" INTEGER :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" + WRITE(*,*)" a_size = BIT_SIZE(a)" + WRITE(*,*)" IF (a_size .EQ. 8) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_1_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" endif" + WRITE(*,*)" IF (a_size .EQ. 16) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_2_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" endif" + WRITE(*,*)" IF (a_size .EQ. 32) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_4_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 64) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 128) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jr = KIND(1.0) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" REAL :: b(32)" + WRITE(*,*)" INTEGER :: a(1)" + WRITE(*,*)" INTEGER :: a_size" + WRITE(*,*)" INTEGER :: real_size" + WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" + WRITE(*,*)" a_size = BIT_SIZE(a(1)) ! Size in bits for integer" + WRITE(*,*)" real_size = (SIZE(TRANSFER(b,a))*a_size)/SIZE(b)" + WRITE(*,*)" IF (real_size .EQ. 32) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",jr + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_4_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (real_size .EQ. 64) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",jr + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (real_size .EQ. 128) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",jr + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jd = KIND(1.d0) + WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" DOUBLE PRECISION :: b=0" + WRITE(*,*)" INTEGER :: a(8)=0" + WRITE(*,*)" INTEGER :: a_size" + WRITE(*,*)" INTEGER :: b_size" + WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" + WRITE(*,*)" a_size = BIT_SIZE(a(1))" + WRITE(*,*)" b_size = SIZE(transfer(b,a))*a_size" + WRITE(*,*)" IF (b_size .EQ. 64) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",jd + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (b_size .EQ. 128) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",jd + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" INTEGER(",j,") :: a = 0" + WRITE(*,*)" INTEGER :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" + WRITE(*,*)" a_size = BIT_SIZE(a)" + WRITE(*,*)" IF (a_size .EQ. 8) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_1_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 16) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_2_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 32) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_4_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 64) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_8_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (a_size .EQ. 128) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_16_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" RETURN" + WRITE(*,*)" END SUBROUTINE" + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" REAL(KIND=",j,") :: b(32)" + WRITE(*,*)" INTEGER :: a(1)" + WRITE(*,*)" INTEGER :: a_size" + WRITE(*,*)" INTEGER :: real_size" + WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" + WRITE(*,*)" a_size = BIT_SIZE(a(1)) ! Size in bits for integer" + WRITE(*,*)" real_size = (SIZE(TRANSFER(b,a))*a_size)/SIZE(b)" + WRITE(*,*)" IF (real_size .EQ. 32) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_4_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" IF (real_size .EQ. 64) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,*)' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_8_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" endif" + WRITE(*,*)" IF (real_size .EQ. 128) THEN" + WRITE(*,*)" WRITE(jchr2,'(I2)')",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_16_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" ENDIF" + WRITE(*,*)" RETURN" + WRITE(*,*)" END SUBROUTINE" + ENDDO +END PROGRAM test_kind + + + diff --git a/fortran/src/H5test_kind.f90 b/fortran/src/H5test_kind.f90 deleted file mode 100644 index 1a1a0ec..0000000 --- a/fortran/src/H5test_kind.f90 +++ /dev/null @@ -1,269 +0,0 @@ -!****p* Program/H5test_kind -! -! NAME -! Executable: H5test_kind -! -! FILE -! fortran/src/H5test_kind.f90 -! -! PURPOSE -! This stand alone program is used at build time to generate the program -! H5fortran_detect.f90. It cycles through all the available KIND parameters for -! integers and reals. The appropriate program and subroutines are then generated -! depending on which of the KIND values are found. -! -! NOTES -! This program is depreciated in favor of H5test_kind_SIZEOF.f90 and is only -! used when the Fortran intrinsic function SIZEOF is not available. It generates -! code that does not make use of SIZEOF in H5fortran_detect.f90 which is less -! portable in comparison to using SIZEOF. -! -! The availability of SIZEOF is checked at configure time and the TRUE/FALSE -! condition is set in the configure variable "FORTRAN_HAVE_SIZEOF". -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! Elena Pourma -! -!***** - -PROGRAM test_kind - IMPLICIT NONE - INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) - INTEGER :: ji, jr, jd - last = -1 - ii = 0 - j = SELECTED_INT_KIND(18) - DO i = 1,100 - j = SELECTED_INT_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ii = ii + 1 - ikind_numbers(ii) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - - last = -1 - ir = 0 - DO i = 1,100 - j = SELECTED_REAL_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ir = ir + 1 - rkind_numbers(ir) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - -! Generate program information: - -WRITE(*,'(40(A,/))') & -'!****h* ROBODoc/H5fortran_detect.f90',& -'!',& -'! NAME',& -'! H5fortran_detect',& -'! ',& -'! PURPOSE',& -'! This stand alone program is used at build time to generate the header file',& -'! H5fort_type_defines.h. The source code itself was automatically generated by',& -'! the program H5test_kind.f90',& -'!',& -'! NOTES',& -'! This source code does not make use of the Fortran intrinsic function SIZEOF because',& -'! the availability of the intrinsic function was determined to be not available at',& -'! configure time',& -'!',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'! Copyright by The HDF Group. *',& -'! Copyright by the Board of Trustees of the University of Illinois. *',& -'! All rights reserved. *',& -'! *',& -'! This file is part of HDF5. The full HDF5 copyright notice, including *',& -'! terms governing use, modification, and redistribution, is contained in *',& -'! the files COPYING and Copyright.html. COPYING can be found at the root *',& -'! of the source code distribution tree; Copyright.html can be found at the *',& -'! root level of an installed copy of the electronic HDF5 document set and *',& -'! is linked from the top-level documents page. It can also be found at *',& -'! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *',& -'! access to either file, you may request a copy from help@hdfgroup.org. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5test_kind.f90',& -'!',& -'!*****' - -! Generate a program - - WRITE(*,*) "PROGRAM int_kind" - WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ - ji = 0 - WRITE(*, "("" CALL i"", i2.2,""()"")") ji - jr = 0 - WRITE(*, "("" CALL r"", i2.2,""()"")") jr - jd = 0 - WRITE(*, "("" CALL d"", i2.2,""()"")") jd - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" CALL i"", i2.2,""()"")") j - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" CALL r"", i2.2,""()"")") j - ENDDO - WRITE(*,*) "END PROGRAM int_kind" - j = 0 - ji = KIND(1) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER :: a = 0" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a)" - WRITE(*,*)" IF (a_size .EQ. 8) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_1_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" endif" - WRITE(*,*)" IF (a_size .EQ. 16) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_2_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" endif" - WRITE(*,*)" IF (a_size .EQ. 32) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_4_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jr = KIND(1.0) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL :: b(32)" - WRITE(*,*)" INTEGER :: a(1)" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" INTEGER :: real_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a(1)) ! Size in bits for integer" - WRITE(*,*)" real_size = (SIZE(TRANSFER(b,a))*a_size)/SIZE(b)" - WRITE(*,*)" IF (real_size .EQ. 32) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jr - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_4_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (real_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jr - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (real_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jr - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jd = KIND(1.d0) - WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" DOUBLE PRECISION :: b=0" - WRITE(*,*)" INTEGER :: a(8)=0" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" INTEGER :: b_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a(1))" - WRITE(*,*)" b_size = SIZE(transfer(b,a))*a_size" - WRITE(*,*)" IF (b_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jd - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (b_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",jd - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER(",j,") :: a = 0" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a)" - WRITE(*,*)" IF (a_size .EQ. 8) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_1_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 16) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_2_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 32) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_4_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (a_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" RETURN" - WRITE(*,*)" END SUBROUTINE" - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL(KIND=",j,") :: b(32)" - WRITE(*,*)" INTEGER :: a(1)" - WRITE(*,*)" INTEGER :: a_size" - WRITE(*,*)" INTEGER :: real_size" - WRITE(*,*)" CHARACTER(LEN=2) :: jchr2" - WRITE(*,*)" a_size = BIT_SIZE(a(1)) ! Size in bits for integer" - WRITE(*,*)" real_size = (SIZE(TRANSFER(b,a))*a_size)/SIZE(b)" - WRITE(*,*)" IF (real_size .EQ. 32) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_4_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" IF (real_size .EQ. 64) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,*)' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_8_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" endif" - WRITE(*,*)" IF (real_size .EQ. 128) THEN" - WRITE(*,*)" WRITE(jchr2,'(I2)')",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_16_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" ENDIF" - WRITE(*,*)" RETURN" - WRITE(*,*)" END SUBROUTINE" - ENDDO -END PROGRAM test_kind - - - diff --git a/fortran/src/H5test_kind_SIZEOF.F90 b/fortran/src/H5test_kind_SIZEOF.F90 new file mode 100644 index 0000000..468086a --- /dev/null +++ b/fortran/src/H5test_kind_SIZEOF.F90 @@ -0,0 +1,228 @@ +!****p* Program/H5test_kind_SIZEOF +! +! NAME +! Executable: H5test_kind +! +! FILE +! fortran/src/H5test_kind_SIZEOF.f90 +! +! PURPOSE +! This stand alone program is used at build time to generate the program +! H5fortran_detect.f90. It cycles through all the available KIND parameters for +! integers and reals. The appropriate program and subroutines are then generated +! depending on which of the KIND values are found. +! +! NOTES +! This program is used in place of H5test_kind.f90 when the Fortran intrinsic +! function SIZEOF is available. It generates code that makes use of SIZEOF in +! H5fortran_detect.f90 which is a portable solution but is not standard +! compliant. The program H5test_kind_C_SIZEOF uses F2008 standard intrinsic +! function instead, which is the preferred method. +! +! The availability of SIZEOF is checked at configure time and the TRUE/FALSE +! condition is set in the configure variable "FORTRAN_HAVE_SIZEOF". +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +PROGRAM test_kind + IMPLICIT NONE + INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) + INTEGER :: ji, jr, jd + last = -1 + ii = 0 + + ikind_numbers = 0 + rkind_numbers = 0 + + DO i = 1,100 + j = SELECTED_INT_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ii = ii + 1 + ikind_numbers(ii) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + + last = -1 + ir = 0 + DO i = 1,100 + j = SELECTED_REAL_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ir = ir + 1 + rkind_numbers(ir) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + +! Generate program information: + +WRITE(*,'(40(A,/))') & +'!****h* ROBODoc/H5fortran_detect.f90',& +'!',& +'! NAME',& +'! H5fortran_detect',& +'! ',& +'! PURPOSE',& +'! This stand alone program is used at build time to generate the header file',& +'! H5fort_type_defines.h. The source code itself was automatically generated by',& +'! the program H5test_kind_SIZEOF.f90',& +'!',& +'! NOTES',& +'! This source code makes use of the Fortran intrinsic function SIZEOF because',& +'! the availability of the intrinsic function was determined to be available at',& +'! configure time',& +'!',& +'! COPYRIGHT',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'! Copyright by The HDF Group. *',& +'! Copyright by the Board of Trustees of the University of Illinois. *',& +'! All rights reserved. *',& +'! *',& +'! This file is part of HDF5. The full HDF5 copyright notice, including *',& +'! terms governing use, modification, and redistribution, is contained in *',& +'! the files COPYING and Copyright.html. COPYING can be found at the root *',& +'! of the source code distribution tree; Copyright.html can be found at the *',& +'! root level of an installed copy of the electronic HDF5 document set and *',& +'! is linked from the top-level documents page. It can also be found at *',& +'! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *',& +'! access to either file, you may request a copy from help@hdfgroup.org. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5test_kind_SIZEOF.f90',& +'!',& +'!*****' + +! GENERATE A PROGRAM +! +! (a) Generate the module + + WRITE(*,*) "MODULE H5test_kind_SIZEOF_mod" + WRITE(*,*) "USE ISO_C_BINDING" + WRITE(*,*) "IMPLICIT NONE" + WRITE(*,*) "CONTAINS" + j = 0 + ji = KIND(1) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" INTEGER :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = SIZEOF(a)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jr = 0 + j = KIND(1.0) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" REAL :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = SIZEOF(a)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jd = 0 + j = KIND(1.d0) + WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" DOUBLE PRECISION :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = SIZEOF(a)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = SIZEOF(a)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = SIZEOF(a)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + ENDDO + WRITE(*,*) "END MODULE H5test_kind_SIZEOF_mod" + WRITE(*,*) "" + + ! (b) generate the main program + + WRITE(*,*) "PROGRAM H5test_kind_SIZEOF" + WRITE(*,*) "USE H5test_kind_SIZEOF_mod" + WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ + ji = 0 + WRITE(*, "("" CALL i"", i2.2,""()"")") ji + jr = 0 + WRITE(*, "("" CALL r"", i2.2,""()"")") jr + jd = 0 + WRITE(*, "("" CALL d"", i2.2,""()"")") jd + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" CALL i"", i2.2,""()"")") j + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" CALL r"", i2.2,""()"")") j + ENDDO + WRITE(*,*) "END PROGRAM H5test_kind_SIZEOF" + +END PROGRAM test_kind + + + diff --git a/fortran/src/H5test_kind_SIZEOF.f90 b/fortran/src/H5test_kind_SIZEOF.f90 deleted file mode 100644 index 468086a..0000000 --- a/fortran/src/H5test_kind_SIZEOF.f90 +++ /dev/null @@ -1,228 +0,0 @@ -!****p* Program/H5test_kind_SIZEOF -! -! NAME -! Executable: H5test_kind -! -! FILE -! fortran/src/H5test_kind_SIZEOF.f90 -! -! PURPOSE -! This stand alone program is used at build time to generate the program -! H5fortran_detect.f90. It cycles through all the available KIND parameters for -! integers and reals. The appropriate program and subroutines are then generated -! depending on which of the KIND values are found. -! -! NOTES -! This program is used in place of H5test_kind.f90 when the Fortran intrinsic -! function SIZEOF is available. It generates code that makes use of SIZEOF in -! H5fortran_detect.f90 which is a portable solution but is not standard -! compliant. The program H5test_kind_C_SIZEOF uses F2008 standard intrinsic -! function instead, which is the preferred method. -! -! The availability of SIZEOF is checked at configure time and the TRUE/FALSE -! condition is set in the configure variable "FORTRAN_HAVE_SIZEOF". -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -PROGRAM test_kind - IMPLICIT NONE - INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) - INTEGER :: ji, jr, jd - last = -1 - ii = 0 - - ikind_numbers = 0 - rkind_numbers = 0 - - DO i = 1,100 - j = SELECTED_INT_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ii = ii + 1 - ikind_numbers(ii) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - - last = -1 - ir = 0 - DO i = 1,100 - j = SELECTED_REAL_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ir = ir + 1 - rkind_numbers(ir) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - -! Generate program information: - -WRITE(*,'(40(A,/))') & -'!****h* ROBODoc/H5fortran_detect.f90',& -'!',& -'! NAME',& -'! H5fortran_detect',& -'! ',& -'! PURPOSE',& -'! This stand alone program is used at build time to generate the header file',& -'! H5fort_type_defines.h. The source code itself was automatically generated by',& -'! the program H5test_kind_SIZEOF.f90',& -'!',& -'! NOTES',& -'! This source code makes use of the Fortran intrinsic function SIZEOF because',& -'! the availability of the intrinsic function was determined to be available at',& -'! configure time',& -'!',& -'! COPYRIGHT',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'! Copyright by The HDF Group. *',& -'! Copyright by the Board of Trustees of the University of Illinois. *',& -'! All rights reserved. *',& -'! *',& -'! This file is part of HDF5. The full HDF5 copyright notice, including *',& -'! terms governing use, modification, and redistribution, is contained in *',& -'! the files COPYING and Copyright.html. COPYING can be found at the root *',& -'! of the source code distribution tree; Copyright.html can be found at the *',& -'! root level of an installed copy of the electronic HDF5 document set and *',& -'! is linked from the top-level documents page. It can also be found at *',& -'! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *',& -'! access to either file, you may request a copy from help@hdfgroup.org. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5test_kind_SIZEOF.f90',& -'!',& -'!*****' - -! GENERATE A PROGRAM -! -! (a) Generate the module - - WRITE(*,*) "MODULE H5test_kind_SIZEOF_mod" - WRITE(*,*) "USE ISO_C_BINDING" - WRITE(*,*) "IMPLICIT NONE" - WRITE(*,*) "CONTAINS" - j = 0 - ji = KIND(1) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jr = 0 - j = KIND(1.0) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jd = 0 - j = KIND(1.d0) - WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" DOUBLE PRECISION :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = SIZEOF(a)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - WRITE(*,*) "END MODULE H5test_kind_SIZEOF_mod" - WRITE(*,*) "" - - ! (b) generate the main program - - WRITE(*,*) "PROGRAM H5test_kind_SIZEOF" - WRITE(*,*) "USE H5test_kind_SIZEOF_mod" - WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ - ji = 0 - WRITE(*, "("" CALL i"", i2.2,""()"")") ji - jr = 0 - WRITE(*, "("" CALL r"", i2.2,""()"")") jr - jd = 0 - WRITE(*, "("" CALL d"", i2.2,""()"")") jd - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" CALL i"", i2.2,""()"")") j - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" CALL r"", i2.2,""()"")") j - ENDDO - WRITE(*,*) "END PROGRAM H5test_kind_SIZEOF" - -END PROGRAM test_kind - - - diff --git a/fortran/src/H5test_kind_STORAGE_SIZE.F90 b/fortran/src/H5test_kind_STORAGE_SIZE.F90 new file mode 100644 index 0000000..89c904c --- /dev/null +++ b/fortran/src/H5test_kind_STORAGE_SIZE.F90 @@ -0,0 +1,230 @@ +!****p* Program/H5test_kind_STORAGE_SIZE +! +! NAME +! Executable: H5test_kind +! +! FILE +! fortran/src/H5test_kind_STORAGE_SIZE.f90 +! +! PURPOSE +! This stand alone program is used at build time to generate the program +! H5fortran_detect.f90. It cycles through all the available KIND parameters for +! integers and reals. The appropriate program and subroutines are then generated +! depending on which of the KIND values are found. +! +! NOTES +! This program is used in place of H5test_kind.f90 or H5test_kind_SIZEOF.f90 when +! the Fortran 2008 intrinsic function STORAGE_SIZE is available. It generates code +! that makes use of STORAGE_SIZE in H5fortran_detect.f90, which will be standard +! compliant. This program is the preferred method. +! +! The availability of STORAGE_SIZE is checked at configure time and the TRUE/FALSE +! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE". +! +! The use of C_SIZOF(X) is not used since the argument X must be an interoperable +! data entity. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +! AUTHOR +! M. Scot Breitenfeld +! +!***** + +PROGRAM test_kind + IMPLICIT NONE + INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) + INTEGER :: ji, jr, jd + last = -1 + ii = 0 + + ikind_numbers = 0 + rkind_numbers = 0 + + DO i = 1,100 + j = SELECTED_INT_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ii = ii + 1 + ikind_numbers(ii) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + + last = -1 + ir = 0 + DO i = 1,100 + j = SELECTED_REAL_KIND(i) + IF(j .NE. last) THEN + IF(last .NE. -1) THEN + ir = ir + 1 + rkind_numbers(ir) = last + ENDIF + last = j + IF(j .EQ. -1) EXIT + ENDIF + ENDDO + +! Generate program information: + +WRITE(*,'(40(A,/))') & +'!****h* ROBODoc/H5fortran_detect.f90',& +'!',& +'! NAME',& +'! H5fortran_detect',& +'! ',& +'! PURPOSE',& +'! This stand alone program is used at build time to generate the header file',& +'! H5fort_type_defines.h. The source code itself was automatically generated by',& +'! the program H5test_kind_STORAGE_SIZE.f90',& +'!',& +'! NOTES',& +'! This source code makes use of the Fortran intrinsic function STORAGE_SIZE because',& +'! the availability of the intrinsic function was determined to be available at',& +'! configure time',& +'!',& +'! COPYRIGHT',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'! Copyright by The HDF Group. *',& +'! Copyright by the Board of Trustees of the University of Illinois. *',& +'! All rights reserved. *',& +'! *',& +'! This file is part of HDF5. The full HDF5 copyright notice, including *',& +'! terms governing use, modification, and redistribution, is contained in *',& +'! the files COPYING and Copyright.html. COPYING can be found at the root *',& +'! of the source code distribution tree; Copyright.html can be found at the *',& +'! root level of an installed copy of the electronic HDF5 document set and *',& +'! is linked from the top-level documents page. It can also be found at *',& +'! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *',& +'! access to either file, you may request a copy from help@hdfgroup.org. *',& +'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& +'!',& +'! AUTHOR',& +'! H5test_kind_C_SIZEOF.f90',& +'!',& +'!*****' + +! GENERATE A PROGRAM +! +! (a) Generate the module + + WRITE(*,*) "MODULE H5test_kind_STORAGE_SIZE_mod" + WRITE(*,*) "USE ISO_C_BINDING" + WRITE(*,*) "IMPLICIT NONE" + WRITE(*,*) "CONTAINS" + j = 0 + ji = KIND(1) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" INTEGER :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jr = 0 + j = KIND(1.0) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" REAL :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + jd = 0 + j = KIND(1.d0) + WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,*)" DOUBLE PRECISION :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j + WRITE(*,*)" IMPLICIT NONE" + WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" + WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" + WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" + WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" + WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" + WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j + WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & + "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" + WRITE(*,*)" RETURN" + WRITE(*,*)"END SUBROUTINE" + ENDDO + WRITE(*,*) "END MODULE H5test_kind_STORAGE_SIZE_mod" + WRITE(*,*) "" + + ! (b) generate the main program + + WRITE(*,*) "PROGRAM H5test_kind_STORAGE_SIZE" + WRITE(*,*) "USE H5test_kind_STORAGE_SIZE_mod" + WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ + ji = 0 + WRITE(*, "("" CALL i"", i2.2,""()"")") ji + jr = 0 + WRITE(*, "("" CALL r"", i2.2,""()"")") jr + jd = 0 + WRITE(*, "("" CALL d"", i2.2,""()"")") jd + DO i = 1, ii + j = ikind_numbers(i) + WRITE(*, "("" CALL i"", i2.2,""()"")") j + ENDDO + DO i = 1, ir + j = rkind_numbers(i) + WRITE(*, "("" CALL r"", i2.2,""()"")") j + ENDDO + WRITE(*,*) "END PROGRAM H5test_kind_STORAGE_SIZE" + +END PROGRAM test_kind + + + diff --git a/fortran/src/H5test_kind_STORAGE_SIZE.f90 b/fortran/src/H5test_kind_STORAGE_SIZE.f90 deleted file mode 100644 index 89c904c..0000000 --- a/fortran/src/H5test_kind_STORAGE_SIZE.f90 +++ /dev/null @@ -1,230 +0,0 @@ -!****p* Program/H5test_kind_STORAGE_SIZE -! -! NAME -! Executable: H5test_kind -! -! FILE -! fortran/src/H5test_kind_STORAGE_SIZE.f90 -! -! PURPOSE -! This stand alone program is used at build time to generate the program -! H5fortran_detect.f90. It cycles through all the available KIND parameters for -! integers and reals. The appropriate program and subroutines are then generated -! depending on which of the KIND values are found. -! -! NOTES -! This program is used in place of H5test_kind.f90 or H5test_kind_SIZEOF.f90 when -! the Fortran 2008 intrinsic function STORAGE_SIZE is available. It generates code -! that makes use of STORAGE_SIZE in H5fortran_detect.f90, which will be standard -! compliant. This program is the preferred method. -! -! The availability of STORAGE_SIZE is checked at configure time and the TRUE/FALSE -! condition is set in the configure variable "FORTRAN_HAVE_STORAGE_SIZE". -! -! The use of C_SIZOF(X) is not used since the argument X must be an interoperable -! data entity. -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -! AUTHOR -! M. Scot Breitenfeld -! -!***** - -PROGRAM test_kind - IMPLICIT NONE - INTEGER :: i, j, ii, ir, last, ikind_numbers(10), rkind_numbers(10) - INTEGER :: ji, jr, jd - last = -1 - ii = 0 - - ikind_numbers = 0 - rkind_numbers = 0 - - DO i = 1,100 - j = SELECTED_INT_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ii = ii + 1 - ikind_numbers(ii) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - - last = -1 - ir = 0 - DO i = 1,100 - j = SELECTED_REAL_KIND(i) - IF(j .NE. last) THEN - IF(last .NE. -1) THEN - ir = ir + 1 - rkind_numbers(ir) = last - ENDIF - last = j - IF(j .EQ. -1) EXIT - ENDIF - ENDDO - -! Generate program information: - -WRITE(*,'(40(A,/))') & -'!****h* ROBODoc/H5fortran_detect.f90',& -'!',& -'! NAME',& -'! H5fortran_detect',& -'! ',& -'! PURPOSE',& -'! This stand alone program is used at build time to generate the header file',& -'! H5fort_type_defines.h. The source code itself was automatically generated by',& -'! the program H5test_kind_STORAGE_SIZE.f90',& -'!',& -'! NOTES',& -'! This source code makes use of the Fortran intrinsic function STORAGE_SIZE because',& -'! the availability of the intrinsic function was determined to be available at',& -'! configure time',& -'!',& -'! COPYRIGHT',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'! Copyright by The HDF Group. *',& -'! Copyright by the Board of Trustees of the University of Illinois. *',& -'! All rights reserved. *',& -'! *',& -'! This file is part of HDF5. The full HDF5 copyright notice, including *',& -'! terms governing use, modification, and redistribution, is contained in *',& -'! the files COPYING and Copyright.html. COPYING can be found at the root *',& -'! of the source code distribution tree; Copyright.html can be found at the *',& -'! root level of an installed copy of the electronic HDF5 document set and *',& -'! is linked from the top-level documents page. It can also be found at *',& -'! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *',& -'! access to either file, you may request a copy from help@hdfgroup.org. *',& -'! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *',& -'!',& -'! AUTHOR',& -'! H5test_kind_C_SIZEOF.f90',& -'!',& -'!*****' - -! GENERATE A PROGRAM -! -! (a) Generate the module - - WRITE(*,*) "MODULE H5test_kind_STORAGE_SIZE_mod" - WRITE(*,*) "USE ISO_C_BINDING" - WRITE(*,*) "IMPLICIT NONE" - WRITE(*,*) "CONTAINS" - j = 0 - ji = KIND(1) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" INTEGER :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",ji - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jr = 0 - j = KIND(1.0) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" REAL :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - jd = 0 - j = KIND(1.d0) - WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,*)" DOUBLE PRECISION :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_DOUBLE_NATIVE_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ",j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_INTEGER_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j - WRITE(*,*)" IMPLICIT NONE" - WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a" - WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size" - WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2" - WRITE(*,*)" a_size = STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)" - WRITE(*,*)" WRITE(ichr2,'(I2)') a_size" - WRITE(*,'(A,I0)')" WRITE(jchr2,'(I2)') ", j - WRITE(*,'(A)')' WRITE(*,*) "#define H5_FORTRAN_HAS_REAL_"'// & - "//TRIM(ADJUSTL(ichr2))//"//'"_KIND "'//"//ADJUSTL(jchr2)" - WRITE(*,*)" RETURN" - WRITE(*,*)"END SUBROUTINE" - ENDDO - WRITE(*,*) "END MODULE H5test_kind_STORAGE_SIZE_mod" - WRITE(*,*) "" - - ! (b) generate the main program - - WRITE(*,*) "PROGRAM H5test_kind_STORAGE_SIZE" - WRITE(*,*) "USE H5test_kind_STORAGE_SIZE_mod" - WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """ - ji = 0 - WRITE(*, "("" CALL i"", i2.2,""()"")") ji - jr = 0 - WRITE(*, "("" CALL r"", i2.2,""()"")") jr - jd = 0 - WRITE(*, "("" CALL d"", i2.2,""()"")") jd - DO i = 1, ii - j = ikind_numbers(i) - WRITE(*, "("" CALL i"", i2.2,""()"")") j - ENDDO - DO i = 1, ir - j = rkind_numbers(i) - WRITE(*, "("" CALL r"", i2.2,""()"")") j - ENDDO - WRITE(*,*) "END PROGRAM H5test_kind_STORAGE_SIZE" - -END PROGRAM test_kind - - - diff --git a/fortran/src/HDF5.F90 b/fortran/src/HDF5.F90 new file mode 100644 index 0000000..6309d2f --- /dev/null +++ b/fortran/src/HDF5.F90 @@ -0,0 +1,47 @@ +!****h* ROBODoc/HDF5 +! +! NAME +! MODULE HDF5 +! +! FILE +! src/fortran/src/HDF5.f90 +! +! PURPOSE +! This is the main module used for linking to the Fortran HDF library. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +!***** + +MODULE HDF5 + USE H5GLOBAL + USE H5F + USE H5G + USE H5E + USE H5I + USE H5L + USE H5S + USE H5D + USE H5A + USE H5T + USE H5O + USE H5P + USE H5R + USE H5Z + USE H5_DBLE_INTERFACE + USE H5LIB +END MODULE HDF5 diff --git a/fortran/src/HDF5.f90 b/fortran/src/HDF5.f90 deleted file mode 100644 index 6309d2f..0000000 --- a/fortran/src/HDF5.f90 +++ /dev/null @@ -1,47 +0,0 @@ -!****h* ROBODoc/HDF5 -! -! NAME -! MODULE HDF5 -! -! FILE -! src/fortran/src/HDF5.f90 -! -! PURPOSE -! This is the main module used for linking to the Fortran HDF library. -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -!***** - -MODULE HDF5 - USE H5GLOBAL - USE H5F - USE H5G - USE H5E - USE H5I - USE H5L - USE H5S - USE H5D - USE H5A - USE H5T - USE H5O - USE H5P - USE H5R - USE H5Z - USE H5_DBLE_INTERFACE - USE H5LIB -END MODULE HDF5 diff --git a/fortran/src/HDF5mpio.F90 b/fortran/src/HDF5mpio.F90 new file mode 100644 index 0000000..b8fb645 --- /dev/null +++ b/fortran/src/HDF5mpio.F90 @@ -0,0 +1,55 @@ +!****h* ROBODoc/HDF5 (mpio) +! +! NAME +! HDF5 +! +! PURPOSE +! This is the main module used for linking to the Fortran parallel HDF library. +! This file replaces HDF5.f90 when compiling the parallel library. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! Copyright by The HDF Group. * +! Copyright by the Board of Trustees of the University of Illinois. * +! All rights reserved. * +! * +! This file is part of HDF5. The full HDF5 copyright notice, including * +! terms governing use, modification, and redistribution, is contained in * +! the files COPYING and Copyright.html. COPYING can be found at the root * +! of the source code distribution tree; Copyright.html can be found at the * +! root level of an installed copy of the electronic HDF5 document set and * +! is linked from the top-level documents page. It can also be found at * +! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * +! access to either file, you may request a copy from help@hdfgroup.org. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +!***** + +MODULE HDF5 + USE H5GLOBAL + USE H5F + USE H5F_PROVISIONAL + USE H5G + USE H5E + USE H5E_PROVISIONAL + USE H5I + USE H5L + USE H5L_PROVISIONAL + USE H5S + USE H5D + USE H5D_PROVISIONAL + USE H5A + USE H5A_PROVISIONAL + USE H5T + USE H5T_PROVISIONAL + USE H5O + USE H5O_PROVISIONAL + USE H5P + USE H5P_PROVISIONAL + USE H5FDMPIO + USE H5R + USE H5R_PROVISIONAL + USE H5Z + USE H5_DBLE_INTERFACE + USE H5LIB +END MODULE HDF5 diff --git a/fortran/src/HDF5mpio.f90 b/fortran/src/HDF5mpio.f90 deleted file mode 100644 index b8fb645..0000000 --- a/fortran/src/HDF5mpio.f90 +++ /dev/null @@ -1,55 +0,0 @@ -!****h* ROBODoc/HDF5 (mpio) -! -! NAME -! HDF5 -! -! PURPOSE -! This is the main module used for linking to the Fortran parallel HDF library. -! This file replaces HDF5.f90 when compiling the parallel library. -! -! COPYRIGHT -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! Copyright by The HDF Group. * -! Copyright by the Board of Trustees of the University of Illinois. * -! All rights reserved. * -! * -! This file is part of HDF5. The full HDF5 copyright notice, including * -! terms governing use, modification, and redistribution, is contained in * -! the files COPYING and Copyright.html. COPYING can be found at the root * -! of the source code distribution tree; Copyright.html can be found at the * -! root level of an installed copy of the electronic HDF5 document set and * -! is linked from the top-level documents page. It can also be found at * -! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * -! access to either file, you may request a copy from help@hdfgroup.org. * -! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -! -!***** - -MODULE HDF5 - USE H5GLOBAL - USE H5F - USE H5F_PROVISIONAL - USE H5G - USE H5E - USE H5E_PROVISIONAL - USE H5I - USE H5L - USE H5L_PROVISIONAL - USE H5S - USE H5D - USE H5D_PROVISIONAL - USE H5A - USE H5A_PROVISIONAL - USE H5T - USE H5T_PROVISIONAL - USE H5O - USE H5O_PROVISIONAL - USE H5P - USE H5P_PROVISIONAL - USE H5FDMPIO - USE H5R - USE H5R_PROVISIONAL - USE H5Z - USE H5_DBLE_INTERFACE - USE H5LIB -END MODULE HDF5 diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index 56a915f..7e008d7 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -42,11 +42,11 @@ else AM_LDFLAGS+=-static endif -# Include HDF5.f90 if parallel is disabled, HDF5mpiof* if parallel is enabled +# Include HDF5.F90 if parallel is disabled, HDF5mpiof* if parallel is enabled if BUILD_PARALLEL_CONDITIONAL - PARALLEL_COND_SRC = H5FDmpiof.c HDF5mpio.f90 H5FDmpioff.f90 + PARALLEL_COND_SRC = H5FDmpiof.c HDF5mpio.F90 H5FDmpioff.F90 else - PARALLEL_COND_SRC = HDF5.f90 + PARALLEL_COND_SRC = HDF5.F90 endif # Check if the compiler supports the Fortran 2003 standard @@ -69,11 +69,11 @@ else endif # Source files for the library. -libhdf5_fortran_la_SOURCES=H5f90global.f90 \ - H5fortran_types.f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ - H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 H5Off.f90 H5Pff.f90 H5Rff.f90 H5Sff.f90 \ - H5Tff.f90 H5Zff.f90 \ - H5_DBLE_Interface$(F_DBLE).f90 \ +libhdf5_fortran_la_SOURCES=H5f90global.F90 \ + H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \ + H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \ + H5Tff.F90 H5Zff.F90 \ + H5_DBLE_Interface$(F_DBLE).F90 \ H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \ H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c $(PARALLEL_COND_SRC) @@ -84,11 +84,11 @@ libhdf5_fortran_la_LIBADD=$(LIBHDF5) # Remove it only when distclean. DISTCLEANFILES=h5fc -# H5fortran_types.f90 and H5f90i.h are automatically generaed by +# H5fortran_types.F90 and H5f90i.h are automatically generaed by # H5match_types, and must be cleaned explicitly. H5fort_type_defines.h # is generated by H5fortran_detect -MOSTLYCLEANFILES=H5fortran_types.f90 H5f90i_gen.h H5fort_type_defines.h \ - H5fortran_detect.f90 +MOSTLYCLEANFILES=H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h \ + H5fortran_detect.F90 # Fortran module files can have different extensions and different names # (e.g., different capitalizations) on different platforms. Write rules @@ -134,24 +134,24 @@ endif # programs. # It's a bit tricky to make sure that Automake builds things in the right # order (especially when using 'gmake -j ...') -# H5test_kind is compiled and run to produce H5fortran_detect.f90. +# H5test_kind is compiled and run to produce H5fortran_detect.F90. # H5fortran_detect is compiled and run to produce H5fort_type_defines.h. # H5match_types.c then includes this file and can be compiled into # H5match_types. When H5match_types is run, it creates H5f90i_gen.h -# and H5fortran_types.f90, which are included in the Fortran library. +# and H5fortran_types.F90, which are included in the Fortran library. # These are the helper programs we need to build. noinst_PROGRAMS = H5match_types H5fortran_detect H5test_kind # Tell Automake to create H5f90i_gen.h before it builds the library # sources. When it creates H5f90i_gen.h, it will create -# H5fortran_types.f90 as a side effect. +# H5fortran_types.F90 as a side effect. BUILT_SOURCES = H5f90i_gen.h #Specify what Automake needs to create: first the H5fort_type_defines.h # header, then H5match_types which includes that header, then # it needs to run H5match_types. -H5fortran_types.f90 H5f90i_gen.h: H5match_types$(EXEEXT) +H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) $(RUNSERIAL) ./H5match_types$(EXEEXT) # H5fort_type_defines.h is created by running H5fortran_detect. @@ -163,24 +163,24 @@ H5match_types.$(OBJEXT): H5fort_type_defines.h # Automake knows how to build fortran programs if we tell it the source # files. -H5fortran_detect_SOURCES = H5fortran_detect.f90 +H5fortran_detect_SOURCES = H5fortran_detect.F90 -# H5test_kind.f90 generates H5Fortran_detect.f90 depending on if +# H5test_kind.F90 generates H5Fortran_detect.F90 depending on if # intrinsic function SIZEOF is available. -H5fortran_detect.f90: H5test_kind$(EXEEXT) - $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.f90 +H5fortran_detect.F90: H5test_kind$(EXEEXT) + $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.F90 -# H5test_kind.f90 is included in the distribution, and Automake knows +# H5test_kind.F90 is included in the distribution, and Automake knows # how to compile a fortran program given its sources. if FORTRAN_HAVE_STORAGE_SIZE - H5test_kind_SOURCES = H5test_kind_STORAGE_SIZE.f90 + H5test_kind_SOURCES = H5test_kind_STORAGE_SIZE.F90 else if FORTRAN_HAVE_SIZEOF - H5test_kind_SOURCES = H5test_kind_SIZEOF.f90 + H5test_kind_SOURCES = H5test_kind_SIZEOF.F90 else - H5test_kind_SOURCES = H5test_kind.f90 + H5test_kind_SOURCES = H5test_kind.F90 endif endif @@ -191,35 +191,35 @@ FORTRAN_API=yes # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* -H5f90global.lo: $(srcdir)/H5f90global.f90 H5fortran_types.lo -H5fortran_types.lo: H5fortran_types.f90 -H5fortran_detect.lo: H5fortran_detect.f90 -H5test_kind.lo: $(srcdir)/H5test_kind.f90 -H5test_kind_SIZEOF.lo: $(srcdir)/H5test_kind_SIZEOF.f90 -H5_ff.lo: $(srcdir)/H5_ff.f90 H5f90global.lo -H5Aff.lo: $(srcdir)/H5Aff.f90 H5f90global.lo -H5Dff.lo: $(srcdir)/H5Dff.f90 H5f90global.lo -H5Eff.lo: $(srcdir)/H5Eff.f90 H5f90global.lo -H5Fff.lo: $(srcdir)/H5Fff.f90 H5f90global.lo -H5Gff.lo: $(srcdir)/H5Gff.f90 H5f90global.lo -H5Iff.lo: $(srcdir)/H5Iff.f90 H5f90global.lo -H5Lff.lo: $(srcdir)/H5Lff.f90 H5f90global.lo -H5Off.lo: $(srcdir)/H5Off.f90 H5f90global.lo -H5Pff.lo: $(srcdir)/H5Pff.f90 H5f90global.lo -H5Rff.lo: $(srcdir)/H5Rff.f90 H5f90global.lo -H5Sff.lo: $(srcdir)/H5Sff.f90 H5f90global.lo -H5Tff.lo: $(srcdir)/H5Tff.f90 H5f90global.lo -H5Zff.lo: $(srcdir)/H5Zff.f90 H5f90global.lo -H5_DBLE_Interface$(F_DBLE).lo: $(srcdir)/H5_DBLE_Interface$(F_DBLE).f90 -HDF5.lo: $(srcdir)/HDF5.f90 H5f90global.lo H5_ff.lo H5Aff.lo \ +H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo +H5fortran_types.lo: H5fortran_types.F90 +H5fortran_detect.lo: H5fortran_detect.F90 +H5test_kind.lo: $(srcdir)/H5test_kind.F90 +H5test_kind_SIZEOF.lo: $(srcdir)/H5test_kind_SIZEOF.F90 +H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo +H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo +H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo +H5Eff.lo: $(srcdir)/H5Eff.F90 H5f90global.lo +H5Fff.lo: $(srcdir)/H5Fff.F90 H5f90global.lo +H5Gff.lo: $(srcdir)/H5Gff.F90 H5f90global.lo +H5Iff.lo: $(srcdir)/H5Iff.F90 H5f90global.lo +H5Lff.lo: $(srcdir)/H5Lff.F90 H5f90global.lo +H5Off.lo: $(srcdir)/H5Off.F90 H5f90global.lo +H5Pff.lo: $(srcdir)/H5Pff.F90 H5f90global.lo +H5Rff.lo: $(srcdir)/H5Rff.F90 H5f90global.lo +H5Sff.lo: $(srcdir)/H5Sff.F90 H5f90global.lo +H5Tff.lo: $(srcdir)/H5Tff.F90 H5f90global.lo +H5Zff.lo: $(srcdir)/H5Zff.F90 H5f90global.lo +H5_DBLE_Interface$(F_DBLE).lo: $(srcdir)/H5_DBLE_Interface$(F_DBLE).F90 +HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ H5Off.lo H5Pff.lo H5Rff.lo \ H5Sff.lo H5Tff.lo H5Zff.lo \ H5_DBLE_Interface$(F_DBLE).lo -H5FDmpioff.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo -HDF5mpio.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo H5_ff.lo \ +H5FDmpioff.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo +HDF5mpio.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo H5_ff.lo \ H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 70470a3..ffcaf62 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -150,13 +150,13 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libhdf5_fortran_la_DEPENDENCIES = $(LIBHDF5) -am__libhdf5_fortran_la_SOURCES_DIST = H5f90global.f90 \ - H5fortran_types.f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ - H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 H5Off.f90 H5Pff.f90 \ - H5Rff.f90 H5Sff.f90 H5Tff.f90 H5Zff.f90 \ - H5_DBLE_Interface$(F_DBLE).f90 H5f90kit.c H5_f.c H5Af.c H5Df.c \ +am__libhdf5_fortran_la_SOURCES_DIST = H5f90global.F90 \ + H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \ + H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 \ + H5Rff.F90 H5Sff.F90 H5Tff.F90 H5Zff.F90 \ + H5_DBLE_Interface$(F_DBLE).F90 H5f90kit.c H5_f.c H5Af.c H5Df.c \ H5Ef.c H5Ff.c H5Gf.c H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c \ - H5Tf.c H5Zf.c HDF5.f90 H5FDmpiof.c HDF5mpio.f90 H5FDmpioff.f90 + H5Tf.c H5Zf.c HDF5.F90 H5FDmpiof.c HDF5mpio.F90 H5FDmpioff.F90 @BUILD_PARALLEL_CONDITIONAL_FALSE@am__objects_1 = HDF5.lo @BUILD_PARALLEL_CONDITIONAL_TRUE@am__objects_1 = H5FDmpiof.lo \ @BUILD_PARALLEL_CONDITIONAL_TRUE@ HDF5mpio.lo H5FDmpioff.lo @@ -182,8 +182,8 @@ H5fortran_detect_LDADD = $(LDADD) H5match_types_SOURCES = H5match_types.c H5match_types_OBJECTS = H5match_types.$(OBJEXT) H5match_types_LDADD = $(LDADD) -am__H5test_kind_SOURCES_DIST = H5test_kind.f90 H5test_kind_SIZEOF.f90 \ - H5test_kind_STORAGE_SIZE.f90 +am__H5test_kind_SOURCES_DIST = H5test_kind.F90 H5test_kind_SIZEOF.F90 \ + H5test_kind_STORAGE_SIZE.F90 @FORTRAN_HAVE_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_H5test_kind_OBJECTS = H5test_kind.$(OBJEXT) @FORTRAN_HAVE_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_H5test_kind_OBJECTS = H5test_kind_SIZEOF.$(OBJEXT) @FORTRAN_HAVE_STORAGE_SIZE_TRUE@am_H5test_kind_OBJECTS = H5test_kind_STORAGE_SIZE.$(OBJEXT) @@ -205,6 +205,24 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/bin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f +PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) +LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(FC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_FCFLAGS) $(FCFLAGS) +AM_V_PPFC = $(am__v_PPFC_@AM_V@) +am__v_PPFC_ = $(am__v_PPFC_@AM_DEFAULT_V@) +am__v_PPFC_0 = @echo " PPFC " $@; +am__v_PPFC_1 = +FCLD = $(FC) +FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_FCLD = $(am__v_FCLD_@AM_V@) +am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) +am__v_FCLD_0 = @echo " FCLD " $@; +am__v_FCLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -223,21 +241,6 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS) -LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) -AM_V_FC = $(am__v_FC_@AM_V@) -am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) -am__v_FC_0 = @echo " FC " $@; -am__v_FC_1 = -FCLD = $(FC) -FCLINK = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_FCLD = $(am__v_FCLD_@AM_V@) -am__v_FCLD_ = $(am__v_FCLD_@AM_DEFAULT_V@) -am__v_FCLD_0 = @echo " FCLD " $@; -am__v_FCLD_1 = SOURCES = $(libhdf5_fortran_la_SOURCES) $(H5fortran_detect_SOURCES) \ H5match_types.c $(H5test_kind_SOURCES) DIST_SOURCES = $(am__libhdf5_fortran_la_SOURCES_DIST) \ @@ -725,10 +728,10 @@ lib_LTLIBRARIES = libhdf5_fortran.la # Add libtool numbers to the HDF5 Fortran library (from config/lt_vers.am) libhdf5_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) -@BUILD_PARALLEL_CONDITIONAL_FALSE@PARALLEL_COND_SRC = HDF5.f90 +@BUILD_PARALLEL_CONDITIONAL_FALSE@PARALLEL_COND_SRC = HDF5.F90 -# Include HDF5.f90 if parallel is disabled, HDF5mpiof* if parallel is enabled -@BUILD_PARALLEL_CONDITIONAL_TRUE@PARALLEL_COND_SRC = H5FDmpiof.c HDF5mpio.f90 H5FDmpioff.f90 +# Include HDF5.F90 if parallel is disabled, HDF5mpiof* if parallel is enabled +@BUILD_PARALLEL_CONDITIONAL_TRUE@PARALLEL_COND_SRC = H5FDmpiof.c HDF5mpio.F90 H5FDmpioff.F90 @FORTRAN_2003_CONDITIONAL_F_FALSE@F_STATUS = _F90 # Check if the compiler supports the Fortran 2003 standard @@ -744,11 +747,11 @@ libhdf5_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISI @FORTRAN_DEFAULT_REALisDBLE_F_TRUE@F_DBLE = Exclude # Source files for the library. -libhdf5_fortran_la_SOURCES = H5f90global.f90 \ - H5fortran_types.f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \ - H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 H5Off.f90 H5Pff.f90 H5Rff.f90 H5Sff.f90 \ - H5Tff.f90 H5Zff.f90 \ - H5_DBLE_Interface$(F_DBLE).f90 \ +libhdf5_fortran_la_SOURCES = H5f90global.F90 \ + H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \ + H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \ + H5Tff.F90 H5Zff.F90 \ + H5_DBLE_Interface$(F_DBLE).F90 \ H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \ H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c $(PARALLEL_COND_SRC) @@ -760,11 +763,11 @@ libhdf5_fortran_la_LIBADD = $(LIBHDF5) # Remove it only when distclean. DISTCLEANFILES = h5fc -# H5fortran_types.f90 and H5f90i.h are automatically generaed by +# H5fortran_types.F90 and H5f90i.h are automatically generaed by # H5match_types, and must be cleaned explicitly. H5fort_type_defines.h # is generated by H5fortran_detect -MOSTLYCLEANFILES = H5fortran_types.f90 H5f90i_gen.h H5fort_type_defines.h \ - H5fortran_detect.f90 +MOSTLYCLEANFILES = H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h \ + H5fortran_detect.F90 @BUILD_PARALLEL_CONDITIONAL_FALSE@H5FC_NAME = h5fc @@ -774,18 +777,18 @@ MOSTLYCLEANFILES = H5fortran_types.f90 H5f90i_gen.h H5fort_type_defines.h \ # Tell Automake to create H5f90i_gen.h before it builds the library # sources. When it creates H5f90i_gen.h, it will create -# H5fortran_types.f90 as a side effect. +# H5fortran_types.F90 as a side effect. BUILT_SOURCES = H5f90i_gen.h # Automake knows how to build fortran programs if we tell it the source # files. -H5fortran_detect_SOURCES = H5fortran_detect.f90 -@FORTRAN_HAVE_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@H5test_kind_SOURCES = H5test_kind.f90 -@FORTRAN_HAVE_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@H5test_kind_SOURCES = H5test_kind_SIZEOF.f90 +H5fortran_detect_SOURCES = H5fortran_detect.F90 +@FORTRAN_HAVE_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@H5test_kind_SOURCES = H5test_kind.F90 +@FORTRAN_HAVE_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@H5test_kind_SOURCES = H5test_kind_SIZEOF.F90 -# H5test_kind.f90 is included in the distribution, and Automake knows +# H5test_kind.F90 is included in the distribution, and Automake knows # how to compile a fortran program given its sources. -@FORTRAN_HAVE_STORAGE_SIZE_TRUE@H5test_kind_SOURCES = H5test_kind_STORAGE_SIZE.f90 +@FORTRAN_HAVE_STORAGE_SIZE_TRUE@H5test_kind_SOURCES = H5test_kind_STORAGE_SIZE.F90 # Mark this directory as part of the Fortran API FORTRAN_API = yes @@ -813,7 +816,7 @@ all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .c .f90 .lo .log .o .obj .sh .sh$(EXEEXT) .trs +.SUFFIXES: .F90 .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/commence.am $(top_srcdir)/config/lt_vers.am $(top_srcdir)/config/conclude.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -931,6 +934,15 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5f90kit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5match_types.Po@am__quote@ +.F90.o: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ $< + +.F90.obj: + $(AM_V_PPFC)$(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.F90.lo: + $(AM_V_PPFC)$(LTPPFCCOMPILE) -c -o $@ $< + .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @@ -952,15 +964,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< -.f90.o: - $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< - -.f90.obj: - $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` - -.f90.lo: - $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< - mostlyclean-libtool: -rm -f *.lo @@ -1391,7 +1394,7 @@ install-exec-local: #Specify what Automake needs to create: first the H5fort_type_defines.h # header, then H5match_types which includes that header, then # it needs to run H5match_types. -H5fortran_types.f90 H5f90i_gen.h: H5match_types$(EXEEXT) +H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT) $(RUNSERIAL) ./H5match_types$(EXEEXT) # H5fort_type_defines.h is created by running H5fortran_detect. @@ -1401,45 +1404,45 @@ H5fort_type_defines.h: H5fortran_detect$(EXEEXT) H5match_types.$(OBJEXT): H5fort_type_defines.h -# H5test_kind.f90 generates H5Fortran_detect.f90 depending on if +# H5test_kind.F90 generates H5Fortran_detect.F90 depending on if # intrinsic function SIZEOF is available. -H5fortran_detect.f90: H5test_kind$(EXEEXT) - $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.f90 +H5fortran_detect.F90: H5test_kind$(EXEEXT) + $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.F90 # Hardcode the dependencies of these files. There isn't a known way of # determining this automagically (like we do with the C files). So, when # doing a parallel make, some modules could be made way before the # modules they depend upon are actually made. *sigh* -H5f90global.lo: $(srcdir)/H5f90global.f90 H5fortran_types.lo -H5fortran_types.lo: H5fortran_types.f90 -H5fortran_detect.lo: H5fortran_detect.f90 -H5test_kind.lo: $(srcdir)/H5test_kind.f90 -H5test_kind_SIZEOF.lo: $(srcdir)/H5test_kind_SIZEOF.f90 -H5_ff.lo: $(srcdir)/H5_ff.f90 H5f90global.lo -H5Aff.lo: $(srcdir)/H5Aff.f90 H5f90global.lo -H5Dff.lo: $(srcdir)/H5Dff.f90 H5f90global.lo -H5Eff.lo: $(srcdir)/H5Eff.f90 H5f90global.lo -H5Fff.lo: $(srcdir)/H5Fff.f90 H5f90global.lo -H5Gff.lo: $(srcdir)/H5Gff.f90 H5f90global.lo -H5Iff.lo: $(srcdir)/H5Iff.f90 H5f90global.lo -H5Lff.lo: $(srcdir)/H5Lff.f90 H5f90global.lo -H5Off.lo: $(srcdir)/H5Off.f90 H5f90global.lo -H5Pff.lo: $(srcdir)/H5Pff.f90 H5f90global.lo -H5Rff.lo: $(srcdir)/H5Rff.f90 H5f90global.lo -H5Sff.lo: $(srcdir)/H5Sff.f90 H5f90global.lo -H5Tff.lo: $(srcdir)/H5Tff.f90 H5f90global.lo -H5Zff.lo: $(srcdir)/H5Zff.f90 H5f90global.lo -H5_DBLE_Interface$(F_DBLE).lo: $(srcdir)/H5_DBLE_Interface$(F_DBLE).f90 -HDF5.lo: $(srcdir)/HDF5.f90 H5f90global.lo H5_ff.lo H5Aff.lo \ +H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo +H5fortran_types.lo: H5fortran_types.F90 +H5fortran_detect.lo: H5fortran_detect.F90 +H5test_kind.lo: $(srcdir)/H5test_kind.F90 +H5test_kind_SIZEOF.lo: $(srcdir)/H5test_kind_SIZEOF.F90 +H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo +H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo +H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo +H5Eff.lo: $(srcdir)/H5Eff.F90 H5f90global.lo +H5Fff.lo: $(srcdir)/H5Fff.F90 H5f90global.lo +H5Gff.lo: $(srcdir)/H5Gff.F90 H5f90global.lo +H5Iff.lo: $(srcdir)/H5Iff.F90 H5f90global.lo +H5Lff.lo: $(srcdir)/H5Lff.F90 H5f90global.lo +H5Off.lo: $(srcdir)/H5Off.F90 H5f90global.lo +H5Pff.lo: $(srcdir)/H5Pff.F90 H5f90global.lo +H5Rff.lo: $(srcdir)/H5Rff.F90 H5f90global.lo +H5Sff.lo: $(srcdir)/H5Sff.F90 H5f90global.lo +H5Tff.lo: $(srcdir)/H5Tff.F90 H5f90global.lo +H5Zff.lo: $(srcdir)/H5Zff.F90 H5f90global.lo +H5_DBLE_Interface$(F_DBLE).lo: $(srcdir)/H5_DBLE_Interface$(F_DBLE).F90 +HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \ H5Off.lo H5Pff.lo H5Rff.lo \ H5Sff.lo H5Tff.lo H5Zff.lo \ H5_DBLE_Interface$(F_DBLE).lo -H5FDmpioff.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo -HDF5mpio.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo H5_ff.lo \ +H5FDmpioff.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo +HDF5mpio.lo: $(srcdir)/H5FDmpioff.F90 H5f90global.lo H5_ff.lo \ H5Aff.lo \ H5Dff.lo \ H5Eff.lo \ -- cgit v0.12