h5hut_obj Derived Type

type, public :: h5hut_obj

A utility to read/write files in HDF5 using H5hut


Inherits

type~~h5hut_obj~~InheritsGraph type~h5hut_obj h5hut_obj type~parallel_obj parallel_obj type~h5hut_obj->type~parallel_obj parallel MPI_Datatype MPI_Datatype type~parallel_obj->MPI_Datatype REAL_SP, REAL_DP, REAL_WP, COMPLEX_SP, COMPLEX_DP, COMPLEX_WP, INTEGER, INT8, LOGICAL MPI_Info MPI_Info type~parallel_obj->MPI_Info mpi_info type~communicators communicators type~parallel_obj->type~communicators comm type~patch patch type~parallel_obj->type~patch rank MPI_Comm MPI_Comm type~communicators->MPI_Comm w, g

Components

Type Visibility Attributes Name Initial
integer(kind=leapI8), public :: fid

File identifier

character(len=str64), public :: filename

file to read/write

type(parallel_obj), public, pointer :: parallel => null()

Associated parallel structure


Type-Bound Procedures

procedure, public :: Close => h5hut_Close

  • private subroutine h5hut_Close(this)

    Close hdf5 file with h5hut

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

procedure, public :: Finalize => h5hut_Final

  • private subroutine h5hut_Final(this)

    Finalize structure

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

procedure, public :: Flush => h5hut_Flush

  • private subroutine h5hut_Flush(this)

    Flush step data to disk

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

procedure, public :: GetNFields => h5hut_GetNFields

  • private subroutine h5hut_GetNFields(this, nfields)

    Get number of fields in step

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    integer, intent(out) :: nfields

    Number of fields

procedure, public :: GetNPoints => h5hut_GetNPoints

  • private subroutine h5hut_GetNPoints(this, npoints)

    Get number of data points in step

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    integer, intent(out) :: npoints

    Number of data points

procedure, public :: Initialize => h5hut_Init

  • private subroutine h5hut_Init(this, filename, access_flag, parallel)

    Initialize structure

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut 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

procedure, public :: JumpToStep => h5hut_JumpToStep

  • private subroutine h5hut_JumpToStep(this, step, iter, time, label_iter, label_time)

    Jump to a specific time step

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    integer, intent(in) :: step

    Time step

    integer, intent(out) :: iter

    Iteration number at this time step

    real(kind=WP), intent(out) :: time

    Time at this time step

    character(len=*), intent(in), optional :: label_iter

    Optional iteration label

    character(len=*), intent(in), optional :: label_time

    Optional time label

procedure, public :: LastTimeStep => h5hut_LastTimeStep

  • private subroutine h5hut_LastTimeStep(this, iter, time, label_iter, label_time)

    Get information about the last time step

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    integer, intent(out) :: iter

    last step

    real(kind=WP), intent(out) :: time

    Time of last step

    character(len=*), intent(in), optional :: label_iter

    Optional iteration label

    character(len=*), intent(in), optional :: label_time

    Optional time label

procedure, public :: NewTimeStep => h5hut_NewTimeStep

  • private subroutine h5hut_NewTimeStep(this, iter, time, label_iter, label_time)

    Create a new time step and update attributes

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    integer, intent(in) :: iter

    iteration counter

    real(kind=WP), intent(in) :: time

    iteration counter

    character(len=*), intent(in), optional :: label_iter

    Optional iteration label

    character(len=*), intent(in), optional :: label_time

    Optional time label

procedure, public :: Open => h5hut_Open

  • private subroutine h5hut_Open(this, flag)

    Open a hdf5 file with h5hut

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    character(len=*), intent(in) :: flag

generic, public :: Read => h5hut_Read1D, h5hut_ReadScalar3D

  • private subroutine h5hut_Read1D(this, name, array)

    Read Lagrangian/1D data fom a hdf5 file with h5hut

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    character(len=*), intent(in) :: name

    Variable name

    class(*), intent(out) :: array(:)

    1-D data array

  • private subroutine h5hut_ReadScalar3D(this, name, array, lo, hi)

    Read Eulerian/3D data from a hdf5 file with h5hut

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    character(len=*), intent(in) :: name

    Variable name

    class(*), intent(out) :: array(:,:,:)

    3-D data array

    integer, intent(in) :: lo(3)

    Low bounds

    integer, intent(in) :: hi(3)

    High bounds

generic, public :: ReadAttributes => h5hut_ReadAttributes0D, h5hut_ReadAttributes1D

  • private subroutine h5hut_ReadAttributes0D(this, label, val)

    Read scalar attributes

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    character(len=*), intent(in) :: label

    attribute label

    class(*), intent(out) :: val

    Optional time label

  • private subroutine h5hut_ReadAttributes1D(this, label, val)

    Read an array of attributes

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    character(len=*), intent(in) :: label

    attribute label

    class(*), intent(out) :: val(:)

    Optional time label

procedure, public :: StepCount => h5hut_StepCount

  • private function h5hut_StepCount(this) result(steps4)

    Return number of time steps

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    Return Value integer

    Number of steps

generic, public :: Write => h5hut_Write1D, h5hut_WriteScalar3D

  • private subroutine h5hut_Write1D(this, name, array)

    Write Lagrangian/1D data to a hdf5 file with h5hut

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    character(len=*), intent(in) :: name

    Variable name

    class(*), intent(in) :: array(:)

    1-D data array

  • private subroutine h5hut_WriteScalar3D(this, name, array, lo, hi)

    Write Eulerian/3D data to a hdf5 file with h5hut

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    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

generic, public :: WriteAttributes => h5hut_WriteAttributes0D, h5hut_WriteAttributes1D

  • private subroutine h5hut_WriteAttributes0D(this, label, val)

    Write scalar attributes

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    character(len=*), intent(in) :: label

    attribute label

    class(*), intent(in) :: val

    Optional time label

  • private subroutine h5hut_WriteAttributes1D(this, label, val)

    Write an array of attributes

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    character(len=*), intent(in) :: label

    attribute label

    class(*), intent(in) :: val(:)

    Optional time label

procedure, public :: WriteGrid => h5hut_WriteGrid

  • private subroutine h5hut_WriteGrid(this, name, xlo, dx)

    Write the grid attributes

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    character(len=*), intent(in) :: name

    Variable name

    real(kind=wp), intent(in) :: xlo(3)

    Coordinate of the low bound

    real(kind=wp), intent(in) :: dx(3)

    Grid spacing

procedure, private :: h5hut_Read1D

  • private subroutine h5hut_Read1D(this, name, array)

    Read Lagrangian/1D data fom a hdf5 file with h5hut

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    character(len=*), intent(in) :: name

    Variable name

    class(*), intent(out) :: array(:)

    1-D data array

procedure, private :: h5hut_ReadAttributes0D

  • private subroutine h5hut_ReadAttributes0D(this, label, val)

    Read scalar attributes

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    character(len=*), intent(in) :: label

    attribute label

    class(*), intent(out) :: val

    Optional time label

procedure, private :: h5hut_ReadAttributes1D

  • private subroutine h5hut_ReadAttributes1D(this, label, val)

    Read an array of attributes

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    character(len=*), intent(in) :: label

    attribute label

    class(*), intent(out) :: val(:)

    Optional time label

procedure, private :: h5hut_ReadScalar3D

  • private subroutine h5hut_ReadScalar3D(this, name, array, lo, hi)

    Read Eulerian/3D data from a hdf5 file with h5hut

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    character(len=*), intent(in) :: name

    Variable name

    class(*), intent(out) :: array(:,:,:)

    3-D data array

    integer, intent(in) :: lo(3)

    Low bounds

    integer, intent(in) :: hi(3)

    High bounds

procedure, private :: h5hut_Write1D

  • private subroutine h5hut_Write1D(this, name, array)

    Write Lagrangian/1D data to a hdf5 file with h5hut

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    character(len=*), intent(in) :: name

    Variable name

    class(*), intent(in) :: array(:)

    1-D data array

procedure, private :: h5hut_WriteAttributes0D

  • private subroutine h5hut_WriteAttributes0D(this, label, val)

    Write scalar attributes

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    character(len=*), intent(in) :: label

    attribute label

    class(*), intent(in) :: val

    Optional time label

procedure, private :: h5hut_WriteAttributes1D

  • private subroutine h5hut_WriteAttributes1D(this, label, val)

    Write an array of attributes

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    character(len=*), intent(in) :: label

    attribute label

    class(*), intent(in) :: val(:)

    Optional time label

procedure, private :: h5hut_WriteScalar3D

  • private subroutine h5hut_WriteScalar3D(this, name, array, lo, hi)

    Write Eulerian/3D data to a hdf5 file with h5hut

    Arguments

    Type IntentOptional Attributes Name
    class(h5hut_obj), intent(inout) :: this

    A H5hut object

    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