A utility to read/write files in HDF5
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=HID_T), | public | :: | fid |
File identifier |
|||
character(len=:), | public, | allocatable | :: | filename |
file to read/write |
||
integer(kind=HID_T), | public, | allocatable | :: | gid(:) |
Group identifier |
||
type(parallel_obj), | public, | pointer | :: | parallel | => | null() |
Associated parallel structure |
integer, | private | :: | group_count | = | 0 |
Number of groups |
|
type(hashtbl_obj), | private | :: | tbl |
Hash table |
Close hdf5 file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(in) | :: | this |
A HDF5 object |
Close an HDF5 group
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(in) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | groupname |
Group to close |
Create a group (analogous to directory) in an HDF5 file and update hash table
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(inout) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | groupname |
File to read/write |
Finalize the hdf5 object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(inout) | :: | this |
A HDF5 object |
Initialize the hdf5 object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(inout) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | filename |
File to read/write |
||
character(len=*), | intent(in) | :: | access_flag |
File access mode |
||
type(parallel_obj), | intent(in), | target | :: | parallel |
parallel structure from main program |
Open a hdf5 file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(inout) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | flag |
Access mode |
Open a group (analogous to directory) in an HDF5 file and updates hash table
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(inout) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | groupname |
File to read/write |
Read a 3D dataset located under basegroup and given by name
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(in) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | basegroup |
Parent group containing the dataset |
||
character(len=*), | intent(in) | :: | name |
Dataset name |
||
class(*), | intent(out) | :: | array(:,:,:) |
Data array |
||
integer, | intent(in) | :: | lo(3) |
Low bounds |
||
integer, | intent(in) | :: | hi(3) |
High bounds |
Read a 1D dataset located under basegroup and given by name
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(in) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | basegroup |
Parent group containing the dataset |
||
character(len=*), | intent(in) | :: | name |
Dataset name |
||
class(*), | intent(out) | :: | array(:,:,:) |
Data array |
Read a scalar attribute under a given group
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(in) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | groupname |
Groupname |
||
character(len=*), | intent(in) | :: | label |
Attribute label |
||
class(*), | intent(out) | :: | val |
Attribute value |
Read a 1-D array of attributes under a given group
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(in) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | groupname |
Groupname |
||
character(len=*), | intent(in) | :: | label |
Attribute label |
||
class(*), | intent(out) | :: | val(:) |
Attribute values |
Read coordinates from HDF5 file. Only the root MPI rank does the reading, and then broadcasts to other MPI ranks.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(in) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | groupname |
Groupname |
||
character(len=*), | intent(in) | :: | name |
Variable name |
||
class(*), | intent(out) | :: | Coord(:) |
1-D Coordinates |
Read the groups (i.e., directories) under a given base group in an HDF5 file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(inout) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | basegroup |
Base group to explore |
||
character(len=str64), | intent(out), | allocatable | :: | names(:) |
Names of groups under the base group |
Write Eulerian/3D data to a HDF5 file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(inout) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | groupname |
Groupname |
||
character(len=*), | intent(in) | :: | name |
Variable name |
||
class(*), | intent(in) | :: | array(:,:,:) |
3-D data array |
||
integer, | intent(in) | :: | lo(3) |
Low bounds |
||
integer, | intent(in) | :: | hi(3) |
High bounds |
Write an array/1D data to a HDF5 file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(inout) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | groupname |
Groupname |
||
character(len=*), | intent(in) | :: | name |
Variable name |
||
class(*), | intent(in) | :: | array(:) |
1-D data array |
Write a scalar attribute
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(inout) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | groupname |
Groupname |
||
character(len=*), | intent(in) | :: | label |
attribute label |
||
class(*), | intent(in) | :: | val |
Write an array of attributes
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(inout) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | groupname |
Groupname |
||
character(len=*), | intent(in) | :: | label |
attribute label |
||
class(*), | intent(in) | :: | val(:) |
Write coordinates to HDF5 file. Only the root MPI rank does the writing.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(inout) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | groupname |
Groupname |
||
character(len=*), | intent(in) | :: | name |
Variable name |
||
class(*), | intent(in) | :: | Coord(:) |
1-D Coordinates |
Function that will append and prepend '/' if missing
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | groupname |
Returns the index of a group
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(in) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | name |
Name of region |
Returns the HDF5 object id of the group
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(in) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | name |
Name of region |
Read a 1D dataset located under basegroup and given by name
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(in) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | basegroup |
Parent group containing the dataset |
||
character(len=*), | intent(in) | :: | name |
Dataset name |
||
class(*), | intent(out) | :: | array(:,:,:) |
Data array |
Read a 3D dataset located under basegroup and given by name
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(in) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | basegroup |
Parent group containing the dataset |
||
character(len=*), | intent(in) | :: | name |
Dataset name |
||
class(*), | intent(out) | :: | array(:,:,:) |
Data array |
||
integer, | intent(in) | :: | lo(3) |
Low bounds |
||
integer, | intent(in) | :: | hi(3) |
High bounds |
Read a scalar attribute under a given group
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(in) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | groupname |
Groupname |
||
character(len=*), | intent(in) | :: | label |
Attribute label |
||
class(*), | intent(out) | :: | val |
Attribute value |
Read a 1-D array of attributes under a given group
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(in) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | groupname |
Groupname |
||
character(len=*), | intent(in) | :: | label |
Attribute label |
||
class(*), | intent(out) | :: | val(:) |
Attribute values |
Write an array/1D data to a HDF5 file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(inout) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | groupname |
Groupname |
||
character(len=*), | intent(in) | :: | name |
Variable name |
||
class(*), | intent(in) | :: | array(:) |
1-D data array |
Write Eulerian/3D data to a HDF5 file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(inout) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | groupname |
Groupname |
||
character(len=*), | intent(in) | :: | name |
Variable name |
||
class(*), | intent(in) | :: | array(:,:,:) |
3-D data array |
||
integer, | intent(in) | :: | lo(3) |
Low bounds |
||
integer, | intent(in) | :: | hi(3) |
High bounds |
Write a scalar attribute
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(inout) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | groupname |
Groupname |
||
character(len=*), | intent(in) | :: | label |
attribute label |
||
class(*), | intent(in) | :: | val |
Write an array of attributes
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(hdf5_obj), | intent(inout) | :: | this |
A HDF5 object |
||
character(len=*), | intent(in) | :: | groupname |
Groupname |
||
character(len=*), | intent(in) | :: | label |
attribute label |
||
class(*), | intent(in) | :: | val(:) |