h5hut_obj_Read1D Subroutine

private impure subroutine h5hut_obj_Read1D(this, name, array, offset)

Reads Lagrangian/1D data fom a h5hut file. If no offset is provided, uses default h5hut file view. Otherwise, sets file view manually.

Type Bound

h5hut_obj

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

integer, intent(in), optional :: offset

Indicates number of elements to skip before reading


Source Code

    impure subroutine h5hut_obj_Read1D(this,name,array,offset)
      !> Reads Lagrangian/1D data fom a h5hut file.
      ! If no offset is provided, uses default h5hut file view.
      ! Otherwise, sets file view manually.
      implicit none
      class(h5hut_obj),  intent(inout) :: this                                 !! A H5hut object
      class(*),          intent(out)   :: array(:)                             !! 1-D data array
      character(len=*),  intent(in)    :: name                                 !! Variable name
      integer,           intent(in),    &
                              optional :: offset                               !! Indicates number of elements to skip before reading

      ! Read data
      if (present(offset)) then
        call this%hdf5%Read(this%step_name,trim(adjustl(name)), array,offset)
      else
        call this%hdf5%Read(this%step_name,trim(adjustl(name)), array)
      end if

      return
    end subroutine h5hut_obj_Read1D