*"表題 第1次元をサイクリックに GTOOL3(GPXCYC)
*
*"履歴 90/08/17 沼口  敦
*
*
*********************************************************************
*"         << 第1次元をサイクリックに >>
*********************************************************************
      SUBROUTINE GPXCYC
     I         ( HHEAD , GDATA ,
     O           HHEADO, GDATAO   )
*
      CHARACTER  HHEAD  ( * )*(*)        !" ヘッダー(入力)
      REAL       GDATA  ( * )            !" データ(入力)
      CHARACTER  HHEADO ( * )*(*)        !" ヘッダー(出力)
      REAL       GDATAO ( * )            !" データ(出力)
#ifdef SYS_IBMS
      INCLUDE    (GZSIZE)                !" NCC, NDC
#else
#include         "gzsize.F"              !" NCC, NDC
#endif
      CHARACTER  HAXIS       *(NCC)      !" 軸名称
      LOGICAL    OCYCL                   !" サイクリックか？
*
      CALL GUQSIZ
     I         ( HHEAD ,
     O           IXSTR , IXEND , IXDIM ,
     O           IYSTR , IYEND , IYDIM ,
     O           IZSTR , IZEND , IZDIM  )
*
      CALL GUSZCK ( HHEADO, (IXDIM+1)*IYDIM*IZDIM )
      CALL GHCOPY ( HHEAD, HHEADO )
*
      CALL GHCGET ( HHEAD, 'AITM1', HAXIS  )
      CALL GUQAXD
     I         ( HAXIS ,
     O           IADIM , OCYCL  )
      IF ( OCYCL .AND. IXDIM .EQ. IADIM ) THEN
*
         II = 0
         IO = 0
         DO 1100 K = IZSTR, IZEND
            DO 1110 J = IYSTR, IYEND
*
               II0 = II + 1
               DO 1120 I = IXSTR, IXEND
                  II = II + 1
                  IO = IO + 1
                  GDATAO ( IO ) = GDATA ( II )
 1120          CONTINUE
*
               IO = IO + 1
               GDATAO ( IO ) = GDATA ( II0 )
*
 1110       CONTINUE
 1100    CONTINUE
*
         CALL GHPSET ( HHEADO, 'AEND1', IXEND+1 )
*
      ELSE
         DO 2100 I = 1, IXDIM*IYDIM*IZDIM
            GDATAO( I ) = GDATA( I )
 2100    CONTINUE
      ENDIF
*
      RETURN
      END
*********************************************************************
*"         << 第1次元をサイクリックに >>
*********************************************************************
      SUBROUTINE GMXCYC
     M         ( HHEAD , GDATA  )
*
      CHARACTER  HHEAD  ( * )*(*)        !" ヘッダー(入力)
      REAL       GDATA  ( * )            !" データ(入力)
*
      COMMON     /GMWORK/ GDATAW
      REAL       GDATAW ( 1 )            !" データ(ワーク)
#ifdef SYS_IBMS
      INCLUDE    (GZSIZE)                !" NCC, NDC
#else
#include         "gzsize.F"              !" NCC, NDC
#endif
      CHARACTER  HHEADW ( NDC )*(NCC)    !" ヘッダー(ワーク)
*
      CALL       GMCSIZ ( HHEADW )
      CALL       GPXCYC
     I         ( HHEAD , GDATA ,
     O           HHEADW, GDATAW   )
*
      CALL       GPFSET
     I         ( HHEADW, GDATAW,
     I           ' '   , ' '   ,
     O           HHEAD , GDATA   )
*
      RETURN
      END
