h5hut_obj_GetNFields Subroutine

private impure subroutine h5hut_obj_GetNFields(this, nfields)

Gets number of fields in step.

Type Bound

h5hut_obj

Arguments

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

A H5hut object

integer, intent(out) :: nfields

Number of fields


Calls

proc~~h5hut_obj_getnfields~~CallsGraph proc~h5hut_obj_getnfields h5hut_obj%h5hut_obj_GetNFields proc~hdf5_obj_readgroupnames hdf5_obj%hdf5_obj_ReadGroupNames proc~h5hut_obj_getnfields->proc~hdf5_obj_readgroupnames h5gn_members_f h5gn_members_f proc~hdf5_obj_readgroupnames->h5gn_members_f h5iget_name_f h5iget_name_f proc~hdf5_obj_readgroupnames->h5iget_name_f h5oclose_f h5oclose_f proc~hdf5_obj_readgroupnames->h5oclose_f h5oget_info_f h5oget_info_f proc~hdf5_obj_readgroupnames->h5oget_info_f h5oopen_by_idx_f h5oopen_by_idx_f proc~hdf5_obj_readgroupnames->h5oopen_by_idx_f proc~hdf5_obj_fixgroupname hdf5_obj%hdf5_obj_FixGroupName proc~hdf5_obj_readgroupnames->proc~hdf5_obj_fixgroupname

Source Code

    impure subroutine h5hut_obj_GetNFields(this,nfields)
      !> Gets number of fields in step.
      implicit none
      class(h5hut_obj), intent(inout) :: this                                  !! A H5hut object
      integer,          intent(out)   :: nfields                               !! Number of fields
      ! Work variables
      character(len=str64), &
        allocatable        :: gnames(:)

      ! Get number of steps in file
      call this%hdf5%ReadGroupNames(trim(adjustl(this%step_name))//'Block/',gnames)
      if (.not.allocated(gnames)) then
        nfields = 0
      else
        nfields = size(gnames)
      end if

      return
    end subroutine h5hut_obj_GetNFields