|
HDF5 utilities
my own Fortran high level interface for HDF5
|
A set of high level wrapper subroutines for HDF5. More...
Data Types | |
| interface | hdf_get_dims |
| interface | hdf_get_mpi_int |
| Get the appropriate mpi integer type. More... | |
| interface | hdf_read_attribute |
| Generic interface to read attribute. More... | |
| interface | hdf_read_dataset |
| Generic interface to read a dataset of doubles. More... | |
| interface | hdf_read_vector_from_dataset |
| Generic interface to read a vector from a dataset. More... | |
| interface | hdf_set_even_offset |
| interface | hdf_write_attribute |
| Generic interface to write attribute. More... | |
| interface | hdf_write_dataset |
| Generic interface to write a dataset Supported types. More... | |
| interface | hdf_write_vector_to_dataset |
| Generic interface to write a vector to dataset. More... | |
Functions/Subroutines | |
| subroutine, public | hdf_set_print_messages (val_print_messages) |
| Sets the value of hdf_print_messages. More... | |
| subroutine, public | hdf_set_default_filter (filter, gzip_level, szip_pixels_per_block, szip_options) |
| Sets the value of hdf_print_messages. More... | |
| subroutine, public | hdf_exists (loc_id, obj_name, exists) |
| Check if location exists. More... | |
| subroutine, public | hdf_open_file (file_id, filename, STATUS, ACTION) |
| Opens file and return identifier. More... | |
| subroutine, public | hdf_close_file (file_id) |
| Closes a hdf5 file. More... | |
| subroutine | hdf_preset_file_attribute (file_id) |
| Preset some file-level attributes. More... | |
| subroutine, private | hdf_preset_prop () |
| Preset some properties. | |
| subroutine, private | hdf_close_prop () |
| Preset some properties. | |
| subroutine, public | hdf_create_group (loc_id, group_name) |
| Create a new group. More... | |
| subroutine, public | hdf_open_group (loc_id, group_name, group_id) |
| Opens a group and returns the identifier. More... | |
| subroutine, public | hdf_close_group (group_id) |
| Close a group by identifier. More... | |
| subroutine | hdf_set_even_offset_from_dataset (file_id, loc_id, dset_name, offset, new_size) |
| Set even offset for read_dataset. More... | |
| subroutine, public | hdf_get_rank (loc_id, dset_name, rank) |
| Get the rank of a dataset. More... | |
| subroutine | hdf_get_dims_4 (loc_id, dset_name, dims) |
| get the dimensions of a dataset More... | |
| subroutine | hdf_get_dims_8 (loc_id, dset_name, dims) |
| get the dimensions of a dataset More... | |
| subroutine, public | hdf_set_dims (loc_id, dset_name, dims) |
| set the dimensions of a dataset | |
| subroutine, public | hdf_create_dataset (loc_id, dset_name, dset_dims, dset_type) |
| create a dataset 'dset_name' with shape 'dset_dims' of type 'dset_type' More... | |
Variables | |
| integer(hid_t) | file_plist_id |
| parallel file access property | |
| integer(hid_t) | dplist_independent |
| dataset access property | |
A set of high level wrapper subroutines for HDF5.
| subroutine, public hdf5_utils_mpi::hdf_set_print_messages | ( | logical, intent(in) | val_print_messages | ) |
Sets the value of hdf_print_messages.
By default, hdf_print_messages = .false. By setting it to .true., some messages are printed detailing what hdf_utils is doing.
| [in] | val_print_messages | new value for hdf_print_messages |
| subroutine, public hdf5_utils_mpi::hdf_set_default_filter | ( | character(len=*), intent(in) | filter, |
| integer, intent(in), optional | gzip_level, | ||
| integer, intent(in), optional | szip_pixels_per_block, | ||
| character(len=2), intent(in), optional | szip_options | ||
| ) |
Sets the value of hdf_print_messages.
| [in] | filter | new value for hdf_print_messages |
| subroutine, public hdf5_utils_mpi::hdf_exists | ( | integer(hid_t), intent(in) | loc_id, |
| character(len=*), intent(in) | obj_name, | ||
| logical, intent(out) | exists | ||
| ) |
Check if location exists.
Also checks is intemediate paths exists in a safe way.
| [in] | loc_id | local id |
| [in] | obj_name | relative path to object |
| [out] | exists | .TRUE. if everything exists, .FALSE. otherwise |
| subroutine, public hdf5_utils_mpi::hdf_open_file | ( | integer(hid_t), intent(out) | file_id, |
| character(len=*), intent(in) | filename, | ||
| character(len=*), intent(in), optional | STATUS, | ||
| character(len=*), intent(in), optional | ACTION | ||
| ) |
Opens file and return identifier.
| STATUS | ACTION | Description |
|---|---|---|
| NEW | na | calls h5fcreate with H5F_ACC_TRUNC_F |
| REPLACE | na | calls h5fcreate with H5F_ACC_EXCL_F |
| OLD | READ | calls h5fopen with H5F_ACC_RDONLY_F |
| OLD | WRITE | calls h5fopen with H5F_ACC_RDWR_F |
| OLD | READWRITE | calls h5fopen with H5F_ACC_RDWR_F |
| [out] | file_id | HDF5 id of the file |
| [in] | filename | the HDF5 filename |
| [in] | status | file status (OLD, NEW, REPLACE) |
| [in] | action | file action (READ, WRITE, READWRITE) |
| subroutine, public hdf5_utils_mpi::hdf_close_file | ( | integer(hid_t), intent(in) | file_id | ) |
Closes a hdf5 file.
| [in] | file_id | file id to be closed |
|
private |
Preset some file-level attributes.
| [in] | file_id | HDF5 id of the file |
| subroutine, public hdf5_utils_mpi::hdf_create_group | ( | integer(hid_t), intent(in) | loc_id, |
| character(len=*), intent(in) | group_name | ||
| ) |
Create a new group.
| [in] | loc_id | location id where to put the group |
| [in] | group_name | name of the group |
| subroutine, public hdf5_utils_mpi::hdf_open_group | ( | integer(hid_t), intent(in) | loc_id, |
| character(len=*), intent(in) | group_name, | ||
| integer(hid_t), intent(out) | group_id | ||
| ) |
Opens a group and returns the identifier.
| [in] | loc_id | location id where to put the group |
| [in] | group_name | name of the group |
| [out] | group_id | id for the group |
| subroutine, public hdf5_utils_mpi::hdf_close_group | ( | integer(hid_t), intent(in) | group_id | ) |
Close a group by identifier.
| [in] | group_id | id for the group |
|
private |
Set even offset for read_dataset.
| [in] | file_id | file id created with hdf_open_file |
| [in] | loc_id | location id created with hdf_open_group or file_id |
| [in] | dset_name | dataset name |
| [in,out] | offset | new offset to read the dataset appropriately |
| [in] | new_size | (optional) new size of data on this processor, used only for consistency check |
| subroutine, public hdf5_utils_mpi::hdf_get_rank | ( | integer(hid_t), intent(in) | loc_id, |
| character(len=*), intent(in) | dset_name, | ||
| integer, intent(out) | rank | ||
| ) |
Get the rank of a dataset.
| [in] | loc_id | location id |
| [in] | dset_name | dataset name |
| [out] | rank | rank of the dataset |
|
private |
get the dimensions of a dataset
| [in] | loc_id | location id |
| [in] | dset_name | name of dataset |
| [out] | dims | dimensions of the dataset |
|
private |
get the dimensions of a dataset
| [in] | loc_id | location id |
| [in] | dset_name | name of dataset |
| [out] | dims | dimensions of the dataset |
| subroutine, public hdf5_utils_mpi::hdf_create_dataset | ( | integer(hid_t), intent(in) | loc_id, |
| character(len=*), intent(in) | dset_name, | ||
| integer, dimension(:), intent(in) | dset_dims, | ||
| character(len=*), intent(in) | dset_type | ||
| ) |
create a dataset 'dset_name' with shape 'dset_dims' of type 'dset_type'
| [in] | loc_id | local id in file |
| [in] | dset_name | name of dataset |
| [in] | dset_dims | dimensions of the dataset |
| [in] | dset_type | type of dataset (integer or double) |
1.8.17