ngadata_obj Derived Type

type, public :: ngadata_obj

A utility to read NGA data files


Inherits

type~~ngadata_obj~~InheritsGraph type~ngadata_obj ngadata_obj MPI_Datatype MPI_Datatype type~ngadata_obj->MPI_Datatype block_r8, block_r4, block_i4 MPI_File MPI_File type~ngadata_obj->MPI_File fid MPI_Info MPI_Info type~ngadata_obj->MPI_Info mpi_info type~block_obj block_obj type~ngadata_obj->type~block_obj block type~parallel_obj parallel_obj type~ngadata_obj->type~parallel_obj parallel type~block_obj->MPI_Datatype gc_slab_r, gc_slab_i type~block_obj->type~parallel_obj parallel type~axis_obj axis_obj type~block_obj->type~axis_obj axis, axis_partition type~parallel_obj->MPI_Datatype REAL_SP, REAL_DP, REAL_WP, COMPLEX_SP, COMPLEX_DP, COMPLEX_WP, INTEGER, INT8, LOGICAL 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
type(block_obj), public, pointer :: block => null()

Associated block structure

type(MPI_Datatype), public :: block_i4 = MPI_DATATYPE_NULL

MPI derived type for integer block

type(MPI_Datatype), public :: block_r4 = MPI_DATATYPE_NULL

MPI derived type for SP real block

type(MPI_Datatype), public :: block_r8 = MPI_DATATYPE_NULL

MPI derived type for DP real block

real(kind=leapDP), public :: dt

Time step in file

integer, public, allocatable :: etypes(:)

Element types

type(MPI_File), public :: fid

File identifier

character(len=str64), public :: filename

file to read/write

type(MPI_Info), public :: mpi_info

MPI info

character(len=str8), public, allocatable :: names(:)

Names of variables in file

integer, public :: nx(3)

Grid size

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

Associated parallel structure

real(kind=leapDP), public :: time

Time in file


Type-Bound Procedures

procedure, public :: Close => ngadata_obj_Close

  • private subroutine ngadata_obj_Close(this)

    Close file with MPI

    Arguments

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

    A NGAbin object

procedure, public :: Finalize => ngadata_obj_Final

  • private subroutine ngadata_obj_Final(this)

    Finalize structure

    Arguments

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

    A NGAbin object

procedure, public :: GetAttributes => ngadata_obj_GetAttributes

procedure, public :: Initialize => ngadata_obj_Init

  • private subroutine ngadata_obj_Init(this, filename, access_flag, block, parallel)

    Initialize structure

    Arguments

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

    A NGAbin object

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

    File to read/write

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

    File access mode

    type(block_obj), intent(in), target :: block

    A block object

    type(parallel_obj), intent(in), target :: parallel

    parallel structure from main program

procedure, public :: Open => ngadata_obj_Open

  • private subroutine ngadata_obj_Open(this, flag)

    Open a hdf5 file with ngadata

    Arguments

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

    A NGAbin object

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

    File access flag

procedure, public :: SetView3D => ngadata_obj_SetView3D

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

    Set the file view

    Arguments

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

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

procedure, public :: SetupMPITypes => ngadata_obj_SetupMPITypes

  • private subroutine ngadata_obj_SetupMPITypes(this)

    Create MPI types needed for IO

    Arguments

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

    A NGAbin object

procedure, public :: read => ngadata_obj_ReadScalar3D

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

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

    Arguments

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

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