! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!   Copyright by The HDF Group.                                               *
!   Copyright by the Board of Trustees of the University of Illinois.         *
!   All rights reserved.                                                      *
!                                                                             *
!   This file is part of HDF5.  The full HDF5 copyright notice, including     *
!   terms governing use, modification, and redistribution, is contained in    *
!   the COPYING file, which can be found at the root of the source code       *
!   distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.  *
!   If you do not have access to either file, you may request a copy from     *
!   help@hdfgroup.org.                                                        *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!In the following example we create one file with a group in it,
!and another file with a dataset. Mounting is used to
!access the dataset from the second file as a member of a group
!in the first file.
     PROGRAM MOUNTEXAMPLE
     USE HDF5 ! This module contains all necessary modules
     IMPLICIT NONE
     !
     ! Filenames are "mount1.h5" and "mount2.h5"
     !
     CHARACTER(LEN=9), PARAMETER :: filename1 = "mount1.h5"
     CHARACTER(LEN=9), PARAMETER :: filename2 = "mount2.h5"
     !
     !data space rank and dimensions
     !
     INTEGER, PARAMETER :: RANK = 2
     INTEGER, PARAMETER :: NX = 4
     INTEGER, PARAMETER :: NY = 5
     !
     ! File identifiers
     !
     INTEGER(HID_T) :: file1_id, file2_id
     !
     ! Group identifier
     !
     INTEGER(HID_T) :: gid
     !
     ! Dataset identifier