* PACKAGE GTINTFC  !" GTOOL3 $B<B?t@:EYJQ49%$%s%?!<%U%'!<%9(B(ZFREAD)
*
*"  [HIS] 96/03/08(takepiro) $B<+F0G\@:EY%3%s%Q%$%k6X;_(B
*
**********************************************************************
*"      <<  GTOOL3$BI8=`%U%)!<%^%C%H%G!<%?FI$_9~$_(B >>
**********************************************************************
      SUBROUTINE ZFREAD
     O            ( HHEAD , GDATA , IEOD  ,
     I              IFILE , MODE               )
*
      CHARACTER  HHEAD ( * )*(*)         !" $B%X%C%@!<(B
#ifdef AUTO_DBL
      REAL*8     GDATA ( * )             !" $B%G!<%?(B
#else
      REAL*4     GDATA ( * )             !" $B%G!<%?(B
#endif
      INTEGER    IEOD                    !" $B%G!<%?B8:_%U%i%0(B
      INTEGER    IFILE                   !" $B%U%!%$%kHV9f(B
      INTEGER    MODE                    !" $B%b!<%I(B(1$B$J$iI=<((BON)
*
      CALL  ZFRDSL
     O         ( HHEAD , GDATA , IEOD  ,
     I           '###' , '###' , -1    ,
     I           IFILE , MODE           )
*
      RETURN
      END
**********************************************************************
*"      <<  GTOOL3$BI8=`%U%)!<%^%C%H%G!<%?FI$_9~$_(B: $B8BDj$D$-(B
**********************************************************************
      SUBROUTINE ZFRDSL
     O         ( HHEAD , GDATA , IEOD  ,
     I           HPSEL , HSEL  , ISEL  ,
     I           IFILE , MODE           )
*
      CHARACTER  HHEAD ( * )*(*)         !" $B%X%C%@!<(B
#ifdef AUTO_DBL
      REAL*8     GDATA ( * )             !" $B%G!<%?(B
#else
      REAL*4     GDATA ( * )             !" $B%G!<%?(B
#endif
      INTEGER    IEOD                    !" $B%G!<%?B8:_%U%i%0(B
      CHARACTER  HPSEL *(*)              !" $BA*Br$9$kMs(B
      CHARACTER  HSEL  *(*)              !" $BA*Br$9$k%G!<%?(B($BJ8;z(B)
*"   (INTEGER)   ISEL                    !  $BA*Br$9$k%G!<%?(B($B?t(B)
      INTEGER    ISEL                    !  $BA*Br$9$k%G!<%?(B($B?t(B)
      INTEGER    IFILE                   !" $B%U%!%$%kHV9f(B
      INTEGER    MODE                    !" $B%b!<%I(B(1$B$J$iI=<((BON)
*
* [PARAM]
#include        "zcdim.F"            !" $B3J;RE@?t(B, $BGH?t(B
#include        "zhdim.F"            !" $BJ8;zNsJ8;z?t(B
*
      INTEGER    IJKDIM
        PARAMETER  ( IJKDIM = (NX+2)*(NZ+2) )
      INTEGER    IJK                         !" $B%k!<%W%+%&%s%?!<(B
      INTEGER    IJKSIZ                      !" $BG[Ns$NBg$-$5(B
*
      CHARACTER  HDFMTI  *(NCC)          !" $B%G!<%?%U%)!<%^%C%H(B
*
      REAL*8     DDATA ( IJKDIM )
      REAL*4     SDATA ( IJKDIM )
      EQUIVALENCE (DDATA,SDATA)
*
      CALL GFRDSL
     O     ( HHEAD , DDATA , IEOD  ,
     I       HPSEL , HSEL  , ISEL  ,
     I       IFILE , MODE           )
*
      IF ( IEOD .EQ. 0 ) THEN
*
*" << CNVDBL : $B@:EYJQ49(B >>
*
         CALL GHCGET ( HHEAD, 'DFMT',  HDFMTI )
         CALL GUQTSZ ( HHEAD, IJKSIZ )
*
         IF ( HDFMTI .EQ. 'UR8' ) THEN
            DO 1110 IJK = 1, IJKSIZ
                  GDATA( IJK ) = DDATA( IJK )
 1110       CONTINUE
         ELSE
            DO 1120 IJK = 1, IJKSIZ
                  GDATA( IJK ) = SDATA( IJK )
*                            equiv DDATA
 1120       CONTINUE
         ENDIF
      ENDIF
*
      RETURN
      END
