libHDF5 Module



Subroutines

public subroutine init_hdf5(rotorArray, nt, dt, density, velSound, switches, filename, file_id)

Create HDF5 file with extendable structure. Call before results2hdf5, then close_hdf5.

Arguments

Type IntentOptional Attributes Name
type(rotor_class), intent(in), dimension(:) :: rotorArray
integer, intent(in) :: nt
real(kind=dp), intent(in) :: dt
real(kind=dp), intent(in) :: density
real(kind=dp), intent(in) :: velSound
type(switches_class), intent(in) :: switches
character(len=*), intent(in) :: filename
integer(kind=HID_T), intent(out) :: file_id

public subroutine results2hdf5(rotor, file_id, iter)

Append one timestep of data to open HDF5 file.

Arguments

Type IntentOptional Attributes Name
type(rotor_class), intent(in) :: rotor
integer(kind=HID_T), intent(in) :: file_id
integer, intent(in) :: iter

public subroutine close_hdf5(file_id)

Flush and close HDF5 file. Call after results2hdf5.

Arguments

Type IntentOptional Attributes Name
integer(kind=HID_T), intent(in) :: file_id

public subroutine deinit_hdf5(file_id)

Deinitialize HDF5 library (h5close_f). file_id unused (kept for API).

Arguments

Type IntentOptional Attributes Name
integer(kind=HID_T), intent(in) :: file_id

public subroutine write_geom_params(grp_rotor_id, rotor)

Write geom.nml parameters to geom sub-group under the rotor

Arguments

Type IntentOptional Attributes Name
integer(kind=HID_T), intent(in) :: grp_rotor_id
type(rotor_class), intent(in) :: rotor

public subroutine write_params(file_id, nr, nt, dt, density, velSound, switches, rotorArray)

Arguments

Type IntentOptional Attributes Name
integer(kind=HID_T), intent(in) :: file_id
integer, intent(in) :: nr
integer, intent(in) :: nt
real(kind=dp), intent(in) :: dt
real(kind=dp), intent(in) :: density
real(kind=dp), intent(in) :: velSound
type(switches_class), intent(in) :: switches
type(rotor_class), intent(in), dimension(:) :: rotorArray

public subroutine write_scalar_int(grp_id, dsetname, val)

Arguments

Type IntentOptional Attributes Name
integer(kind=HID_T), intent(in) :: grp_id
character(len=*), intent(in) :: dsetname
integer, intent(in) :: val

public subroutine write_scalar_double(grp_id, dsetname, val)

Arguments

Type IntentOptional Attributes Name
integer(kind=HID_T), intent(in) :: grp_id
character(len=*), intent(in) :: dsetname
real(kind=dp), intent(in) :: val

public subroutine write_vector_3d(grp_id, dsetname, vec)

Arguments

Type IntentOptional Attributes Name
integer(kind=HID_T), intent(in) :: grp_id
character(len=*), intent(in) :: dsetname
real(kind=dp), intent(in), dimension(3) :: vec

public subroutine write_fixed_1d(grp_id, dsetname, data, n)

Write a fixed-size 1D dataset (not extendable) -- used for r_R

Arguments

Type IntentOptional Attributes Name
integer(kind=HID_T), intent(in) :: grp_id
character(len=*), intent(in) :: dsetname
real(kind=dp), intent(in), dimension(:) :: data
integer(kind=HSIZE_T), intent(in) :: n

public subroutine write_fixed_2d(grp_id, dsetname, data, nrows, ncols)

Write a fixed-size 2D dataset (1 x ncols) for snapshot files

Arguments

Type IntentOptional Attributes Name
integer(kind=HID_T), intent(in) :: grp_id
character(len=*), intent(in) :: dsetname
real(kind=dp), intent(in), dimension(:) :: data
integer(kind=HSIZE_T), intent(in) :: nrows
integer(kind=HSIZE_T), intent(in) :: ncols

public subroutine create_extendable_1d(grp_id, dsetname, chunk_size)

Create an extendable 1D dataset of shape (0,) with unlimited max dim

Arguments

Type IntentOptional Attributes Name
integer(kind=HID_T), intent(in) :: grp_id
character(len=*), intent(in) :: dsetname
integer(kind=HSIZE_T), intent(in) :: chunk_size

public subroutine create_extendable_2d(grp_id, dsetname, chunk_t, ns)

Create an extendable 2D dataset of shape (0, ns) -- time x span

Arguments

Type IntentOptional Attributes Name
integer(kind=HID_T), intent(in) :: grp_id
character(len=*), intent(in) :: dsetname
integer(kind=HSIZE_T), intent(in) :: chunk_t
integer(kind=HSIZE_T), intent(in) :: ns

public subroutine append_scalar_1d(grp_id, dsetname, val)

Append a single scalar to an extendable 1D dataset

Arguments

Type IntentOptional Attributes Name
integer(kind=HID_T), intent(in) :: grp_id
character(len=*), intent(in) :: dsetname
real(kind=dp), intent(in) :: val

public subroutine append_row_2d(grp_id, dsetname, row)

Append a 1D array as a new row in an extendable 2D dataset (nt x ns)

Arguments

Type IntentOptional Attributes Name
integer(kind=HID_T), intent(in) :: grp_id
character(len=*), intent(in) :: dsetname
real(kind=dp), intent(in), dimension(:) :: row