CreateGroup_HDF5 Subroutine

public subroutine CreateGroup_HDF5(fileId, groupName)

Arguments

TypeIntentOptionalAttributesName
integer(kind=HID_T), intent(in) :: fileId
character, intent(in) :: groupName

Calls

proc~~creategroup_hdf5~~CallsGraph proc~creategroup_hdf5 CreateGroup_HDF5 h5lexists_f h5lexists_f proc~creategroup_hdf5->h5lexists_f h5gcreate_f h5gcreate_f proc~creategroup_hdf5->h5gcreate_f h5gclose_f h5gclose_f proc~creategroup_hdf5->h5gclose_f

Called by

proc~~creategroup_hdf5~~CalledByGraph proc~creategroup_hdf5 CreateGroup_HDF5 proc~writehdf5_metadata WriteHDF5_Metadata proc~writehdf5_metadata->proc~creategroup_hdf5 proc~writehdf5_lagrange_t WriteHDF5_Lagrange_t proc~writehdf5_lagrange_t->proc~creategroup_hdf5 proc~writehdf5_vector3d_t WriteHDF5_Vector3D_t proc~writehdf5_vector3d_t->proc~creategroup_hdf5 proc~writehdf5_mpi_scalar3d_t WriteHDF5_MPI_Scalar3D_t proc~writehdf5_mpi_scalar3d_t->proc~creategroup_hdf5 proc~writehdf5_mpi_vector2d_t WriteHDF5_MPI_Vector2D_t proc~writehdf5_mpi_vector2d_t->proc~creategroup_hdf5 proc~write_dgmodel1d_t Write_DGModel1D_t proc~write_dgmodel1d_t->proc~creategroup_hdf5 proc~writehdf5_scalar2d_t WriteHDF5_Scalar2D_t proc~writehdf5_scalar2d_t->proc~creategroup_hdf5 proc~write_geometry1d Write_Geometry1D proc~write_geometry1d->proc~creategroup_hdf5 proc~writehdf5_vector2d_t WriteHDF5_Vector2D_t proc~writehdf5_vector2d_t->proc~creategroup_hdf5 proc~writehdf5_mpi_vector3d_t WriteHDF5_MPI_Vector3D_t proc~writehdf5_mpi_vector3d_t->proc~creategroup_hdf5 proc~writehdf5_scalar3d_t WriteHDF5_Scalar3D_t proc~writehdf5_scalar3d_t->proc~creategroup_hdf5 proc~writehdf5_mpi_scalar2d_t WriteHDF5_MPI_Scalar2D_t proc~writehdf5_mpi_scalar2d_t->proc~creategroup_hdf5 proc~writehdf5_scalar1d_t WriteHDF5_Scalar1D_t proc~writehdf5_scalar1d_t->proc~creategroup_hdf5 proc~write_dgmodel3d_t Write_DGModel3D_t proc~write_dgmodel3d_t->proc~creategroup_hdf5 proc~write_dgmodel2d_t Write_DGModel2D_t proc~write_dgmodel2d_t->proc~creategroup_hdf5

Contents

Source Code


Source Code

  subroutine CreateGroup_HDF5(fileId,groupName)
#undef __FUNC__
#define __FUNC__ "CreateGroup_HDF5"
    implicit none
    integer(HID_T),intent(in) :: fileId
    character(*),intent(in) :: groupName
    ! Local
    integer(HID_T) :: groupId
    logical :: groupExists
    integer :: error

    call h5lexists_f(fileId,trim(groupName),groupExists,error)
    if(error /= 0) then
      print*,__FILE__," : Link check failure for "//trim(groupName)
    else

      if(.not. groupExists) then
        ! Create groups
        call h5gcreate_f(fileId,trim(groupName),groupId,error)

        if(error /= 0) then
          print*,__FILE__," :Failed to create group "//trim(groupName)
        endif

        call h5gclose_f(groupId,error)

        if(error /= 0) then
          print*,__FILE__," :Failed to close group "//trim(groupName)
        endif

      endif

    endif

  endsubroutine CreateGroup_HDF5