io_writer_t Derived Type

type, public, abstract :: io_writer_t

Base I/O writer type for polymorphic usage


Inherited by

type~~io_writer_t~~InheritedByGraph type~io_writer_t io_writer_t type~writer_session_t writer_session_t type~writer_session_t->type~io_writer_t writer type~snapshot_manager_t snapshot_manager_t type~snapshot_manager_t->type~writer_session_t snapshot_writer type~io_manager_t io_manager_t type~io_manager_t->type~snapshot_manager_t snapshot_mgr type~base_case_t base_case_t type~base_case_t->type~io_manager_t io_mgr type~case_abl_t case_abl_t type~case_abl_t->type~base_case_t type~case_channel_t case_channel_t type~case_channel_t->type~base_case_t type~case_cylinder_t case_cylinder_t type~case_cylinder_t->type~base_case_t type~case_generic_t case_generic_t type~case_generic_t->type~base_case_t type~case_tgv_t case_tgv_t type~case_tgv_t->type~base_case_t

Type-Bound Procedures

procedure(writer_init), public, deferred :: init

  • subroutine writer_init(self, comm, name) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(io_writer_t), intent(inout) :: self
    integer, intent(in) :: comm
    character(len=*), intent(in) :: name

procedure(writer_open), public, deferred :: open

  • function writer_open(self, filename, mode, comm) result(file_handle) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(io_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: filename
    integer, intent(in) :: mode
    integer, intent(in) :: comm

    Return Value class(io_file_t), allocatable

procedure(writer_finalise), public, deferred :: finalise

  • subroutine writer_finalise(self) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(io_writer_t), intent(inout) :: self

procedure, public :: supports_device_field_write => base_supports_device_field_write

  • private function base_supports_device_field_write(self, field, backend)

    Default capability: fields are always staged through host memory.

    Arguments

    Type IntentOptional Attributes Name
    class(io_writer_t), intent(in) :: self
    class(field_t), intent(in) :: field
    class(base_backend_t), intent(in) :: backend

    Return Value logical

generic, public :: write_data => write_data_i8, write_data_integer, write_data_real, write_data_array_3d

  • private subroutine write_data_i8_adios2(self, variable_name, value, file_handle)

    Arguments

    Type IntentOptional Attributes Name
    class(io_adios2_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: variable_name
    integer(kind=i8), intent(in) :: value
    class(io_file_t), intent(inout) :: file_handle
  • private subroutine write_data_integer_adios2(self, variable_name, value, file_handle)

    Arguments

    Type IntentOptional Attributes Name
    class(io_adios2_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: variable_name
    integer, intent(in) :: value
    class(io_file_t), intent(inout) :: file_handle
  • private subroutine write_data_real_adios2(self, variable_name, value, file_handle, use_sp)

    Arguments

    Type IntentOptional Attributes Name
    class(io_adios2_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: variable_name
    real(kind=dp), intent(in) :: value
    class(io_file_t), intent(inout) :: file_handle
    logical, intent(in), optional :: use_sp
  • private subroutine write_data_array_3d_adios2(self, variable_name, array, file_handle, shape_dims, start_dims, count_dims, use_sp)

    The caller keeps array alive until the step ends, so the put is deferred.

    Arguments

    Type IntentOptional Attributes Name
    class(io_adios2_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: variable_name
    real(kind=dp), intent(in) :: array(:,:,:)
    class(io_file_t), intent(inout) :: file_handle
    integer(kind=i8), intent(in) :: shape_dims(3)
    integer(kind=i8), intent(in) :: start_dims(3)
    integer(kind=i8), intent(in) :: count_dims(3)
    logical, intent(in), optional :: use_sp

procedure(write_data_i8), public, deferred :: write_data_i8

  • subroutine write_data_i8(self, variable_name, value, file_handle) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(io_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: variable_name
    integer(kind=i8), intent(in) :: value
    class(io_file_t), intent(inout) :: file_handle

procedure(write_data_integer), public, deferred :: write_data_integer

  • subroutine write_data_integer(self, variable_name, value, file_handle) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(io_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: variable_name
    integer, intent(in) :: value
    class(io_file_t), intent(inout) :: file_handle

procedure(write_data_real), public, deferred :: write_data_real

  • subroutine write_data_real(self, variable_name, value, file_handle, use_sp) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(io_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: variable_name
    real(kind=dp), intent(in) :: value
    class(io_file_t), intent(inout) :: file_handle
    logical, intent(in), optional :: use_sp

procedure(write_data_array_3d), public, deferred :: write_data_array_3d

  • subroutine write_data_array_3d(self, variable_name, array, file_handle, shape_dims, start_dims, count_dims, use_sp) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(io_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: variable_name
    real(kind=dp), intent(in) :: array(:,:,:)
    class(io_file_t), intent(inout) :: file_handle
    integer(kind=i8), intent(in) :: shape_dims(3)
    integer(kind=i8), intent(in) :: start_dims(3)
    integer(kind=i8), intent(in) :: count_dims(3)
    logical, intent(in), optional :: use_sp

procedure(write_field_from_solver), public, deferred :: write_field_from_solver

  • subroutine write_field_from_solver(self, variable_name, field, file_handle, backend, shape_dims, start_dims, count_dims, use_sp) Prototype

    Write the first count_dims points of a solver field. Backends may write device-resident fields without staging through host memory; backend provides the layout-aware packing for that.

    Arguments

    Type IntentOptional Attributes Name
    class(io_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: variable_name
    class(field_t), intent(in) :: field
    class(io_file_t), intent(inout) :: file_handle
    class(base_backend_t), intent(inout) :: backend
    integer(kind=i8), intent(in) :: shape_dims(3)
    integer(kind=i8), intent(in) :: start_dims(3)
    integer(kind=i8), intent(in) :: count_dims(3)
    logical, intent(in), optional :: use_sp

generic, public :: write_attribute => write_attribute_string, write_attribute_array_1d_real

  • private subroutine write_attribute_string_adios2(self, attribute_name, value, file_handle)

    Arguments

    Type IntentOptional Attributes Name
    class(io_adios2_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: attribute_name
    character(len=*), intent(in) :: value
    class(io_file_t), intent(inout) :: file_handle
  • private subroutine write_attribute_array_1d_real_adios2(self, attribute_name, values, file_handle)

    Arguments

    Type IntentOptional Attributes Name
    class(io_adios2_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: attribute_name
    real(kind=dp), intent(in) :: values(:)
    class(io_file_t), intent(inout) :: file_handle

procedure(write_attribute_string), public, deferred :: write_attribute_string

  • subroutine write_attribute_string(self, attribute_name, value, file_handle) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(io_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: attribute_name
    character(len=*), intent(in) :: value
    class(io_file_t), intent(inout) :: file_handle

procedure(write_attribute_array_1d_real), public, deferred :: write_attribute_array_1d_real

  • subroutine write_attribute_array_1d_real(self, attribute_name, values, file_handle) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(io_writer_t), intent(inout) :: self
    character(len=*), intent(in) :: attribute_name
    real(kind=dp), intent(in) :: values(:)
    class(io_file_t), intent(inout) :: file_handle