C
C     ****************************************
C     **                                    **
C     **        S    Ì    W    v        **
C     **                                    **
C     ****************************************
C
C
      SUBROUTINE      STAT
C
C
      IMPLICIT INTEGER (A-Z)
      INCLUDE 'seps.inc'
C
C
      REAL*8 TMP
      REAL*8 KK,KK2
C
C
C----------------------------------------------------------
C     AEgvbgpWv
C----------------------------------------------------------
      IF((SEIDN.EQ.0 .OR. SEIDN.EQ.8) .AND. KONEN.EQ.1 .AND.
     &   PSEID.GT.0 .AND. OLDFLG.NE.1 ) GO TO 1500
C----------------------------------------------------------
C     tï
C----------------------------------------------------------
      DO 1000 K=KE,KIJUN,-1
C
        DO 1010 S=1,3
          DO 1020 I=1,13
            DO 1030 X=115,0,-1
              IF(X.EQ.0) THEN
                D3X(K,X,S,I,0)=D3X(K,X,S,I,0)/2.0D0
                IF(NENBE65.EQ.1) THEN
                  D3X(K,X,S,I,34)=D3X(K,X,S,I,34)/2.0D0
                END IF
              ELSE
                D3X(K,X,S,I,0)=(D3X(K-1,X-1,S,I,0)
     &                                 +D3X(K,X,S,I,0))/2.0D0
                IF(NENBE65.EQ.1) THEN
                  D3X(K,X,S,I,34)=(D3X(K-1,X-1,S,I,34)
     &                                 +D3X(K,X,S,I,34))/2.0D0
                END IF
              END IF
 1030       CONTINUE
            IF(NENBEEX.EQ.0) THEN
              DO 1050 X=0,XA-2
                D3X(K,XA-1,S,I,0)=D3X(K,XA-1,S,I,0)+D3X(K,X,S,I,0)
                D3X(K,X,S,I,0)=0.0D0
C
                D3XS(K,XA-1,S,I,0)=D3XS(K,XA-1,S,I,0)+D3XS(K,X,S,I,0)
                D3XS(K,X,S,I,0)=0.0D0
                IF(NENBE65.EQ.1) THEN
                  D3X(K,XA-1,S,I,34)=D3X(K,XA-1,S,I,34)+D3X(K,X,S,I,34)
                  D3X(K,X,S,I,34)=0.0D0
C
                  D3XS(K,XA-1,S,I,34)=D3XS(K,XA-1,S,I,34)
     &                                +D3XS(K,X,S,I,34)
                  D3XS(K,X,S,I,34)=0.0D0
                END IF
 1050         CONTINUE
            END IF
            DO 1060 J=0,58
              IF(J.EQ.0 .OR. J.EQ.34 .OR.
     &           (NENBE65.EQ.0 .AND. J.GE.35)) GO TO 1060
C
              TMP=0.0D0
              DO 1080 X=0,115
                TMP=TMP+D3X(K,X,S,I,J)
 1080         CONTINUE
              IF(TMP.LT.1.0D-6) THEN
                DO 1090 X=0,115
                  D3X(K,X,S,I,J)=0.0D0
 1090           CONTINUE
              END IF
              IF(NENBEEX.EQ.0) THEN
                DO 1110 X=0,XA-2
                  D3X(K,XA-1,S,I,J)=D3X(K,XA-1,S,I,J)+D3X(K,X,S,I,J)
                  D3X(K,X,S,I,J)=0.0D0
C
                  D3XS(K,XA-1,S,I,J)=D3XS(K,XA-1,S,I,J)+D3XS(K,X,S,I,J)
                  D3XS(K,X,S,I,J)=0.0D0
C
 1110           CONTINUE
              END IF
 1060       CONTINUE
C----------------------------------------------------------
C           vlì¬(íÊyÑNàíÊ)
C----------------------------------------------------------
            DO 1120 J=0,58
              IF(NENBEEX.EQ.0) THEN
                DO 1130 X=XA-1,115
                  D3X(K,X,S,0,J)=D3X(K,X,S,0,J)+D3X(K,X,S,I,J)
                  D3X(K,X,0,I,J)=D3X(K,X,0,I,J)+D3X(K,X,S,I,J)
                  D3X(K,X,0,0,J)=D3X(K,X,0,0,J)+D3X(K,X,S,I,J)
C
                  D3XS(K,X,S,0,J)=D3XS(K,X,S,0,J)+D3XS(K,X,S,I,J)
                  D3XS(K,X,0,I,J)=D3XS(K,X,0,I,J)+D3XS(K,X,S,I,J)
                  D3XS(K,X,0,0,J)=D3XS(K,X,0,0,J)+D3XS(K,X,S,I,J)
 1130           CONTINUE
              ELSE IF(NENBEEX.EQ.1) THEN
                DO 1140 X=0,115
                  D3X(K,X,S,0,J)=D3X(K,X,S,0,J)+D3X(K,X,S,I,J)
                  D3X(K,X,0,I,J)=D3X(K,X,0,I,J)+D3X(K,X,S,I,J)
                  D3X(K,X,0,0,J)=D3X(K,X,0,0,J)+D3X(K,X,S,I,J)
C
                  D3XS(K,X,S,0,J)=D3XS(K,X,S,0,J)+D3XS(K,X,S,I,J)
                  D3XS(K,X,0,I,J)=D3XS(K,X,0,I,J)+D3XS(K,X,S,I,J)
                  D3XS(K,X,0,0,J)=D3XS(K,X,0,0,J)+D3XS(K,X,S,I,J)
 1140           CONTINUE
              END IF
 1120       CONTINUE
C----------------------------------------------------------
C           ÉS¦
C----------------------------------------------------------
            IF(S.NE.3) THEN
              KK=EE(1)
            ELSE
              KK=EE(2)
            END IF
            IF(I.EQ.2 .OR. I.EQ.4 .OR. I.EQ.6 .OR. I.EQ.8) THEN
              KK2=KK
              KK=0.0D0
            ELSE
              KK2=0.0D0
            END IF
C----------------------------------------------------------
C           oßIÉS
C----------------------------------------------------------
            DO 1150 X=0,115
              KFPRX(K,X,S,I,0)=(D3X(K,X,S,I,13)+D3X(K,X,S,I,14)
     &                         +D3X(K,X,S,I,15)+D3X(K,X,S,I,16)
     &                         +D3X(K,X,S,I,17)+D3X(K,X,S,I,18))*KK
 1150       CONTINUE
            IF(NENBEEX.EQ.0) THEN
              DO 1170 X=0,XA-2
                KFPRX(K,XA-1,S,I,0)=KFPRX(K,XA-1,S,I,0)+KFPRX(K,X,S,I,0)
                KFPRX(K,X,S,I,0)=0.0D0
 1170         CONTINUE
            END IF
C  ----------------------------------------------------------
C           (¤¿äá)
C  ----------------------------------------------------------
            DO 1180 X=0,115
              KFPRX(K,X,S,I,1)=D3X(K,X,S,I,13)*KK
 1180       CONTINUE
            IF(NENBEEX.EQ.0) THEN
              DO 1200 X=0,XA-2
                KFPRX(K,XA-1,S,I,1)=KFPRX(K,XA-1,S,I,1)+KFPRX(K,X,S,I,1)
                KFPRX(K,X,S,I,1)=0.0D0
 1200         CONTINUE
            END IF
C  ----------------------------------------------------------
C           (¤¿èz)
C  ----------------------------------------------------------
            DO 1210 X=0,115
              KFPRX(K,X,S,I,2)=KFPRX(K,X,S,I,0)-KFPRX(K,X,S,I,1)
 1210       CONTINUE
            IF(NENBEEX.EQ.0) THEN
              DO 1230 X=0,XA-2
                KFPRX(K,XA-1,S,I,2)=KFPRX(K,XA-1,S,I,2)+KFPRX(K,X,S,I,2)
                KFPRX(K,X,S,I,2)=0.0D0
 1230         CONTINUE
            END IF
C  ----------------------------------------------------------
C           ÝEÉÍÉSÈµ(S60oßæ100ð)
C  ----------------------------------------------------------
            IF(I.EQ.2 .OR. I.EQ.4 .OR. I.EQ.6 .OR. I.EQ.8) THEN
              DO 1240 X=0,115
                KFPRX(K,X,S,I,0)=0.0D0
                KFPRX(K,X,S,I,1)=0.0D0
                KFPRX(K,X,S,I,2)=0.0D0
 1240         CONTINUE
            END IF
C----------------------------------------------------------
C           65-69ÎÌoßIÉS
C----------------------------------------------------------
            IF(NENBE65.EQ.1) THEN
              DO 1250 X=0,115
                KFPRX(K,X,S,I,3)=(D3X(K,X,S,I,53)+D3X(K,X,S,I,54)
     &                           +D3X(K,X,S,I,55)+D3X(K,X,S,I,56)
     &                           +D3X(K,X,S,I,57)+D3X(K,X,S,I,58))*KK
                KFPRX(K,X,S,I,4)=D3X(K,X,S,I,53)*KK
                KFPRX(K,X,S,I,5)=KFPRX(K,X,S,I,3)-KFPRX(K,X,S,I,4)
 1250         CONTINUE
              IF(NENBEEX.EQ.0) THEN
                DO 1270 X=0,XA-2
                  KFPRX(K,XA-1,S,I,3)
     &                             =KFPRX(K,XA-1,S,I,3)+KFPRX(K,X,S,I,3)
                  KFPRX(K,XA-1,S,I,4)
     &                             =KFPRX(K,XA-1,S,I,4)+KFPRX(K,X,S,I,4)
                  KFPRX(K,XA-1,S,I,5)
     &                             =KFPRX(K,XA-1,S,I,5)+KFPRX(K,X,S,I,5)
                  KFPRX(K,X,S,I,3) =0.0D0
                  KFPRX(K,X,S,I,4) =0.0D0
                  KFPRX(K,X,S,I,5) =0.0D0
 1270           CONTINUE
              END IF
            END IF
C  ----------------------------------------------------------
C           (ÝVª)
C  ----------------------------------------------------------
            IF(NENBE65.EQ.1) THEN
              DO 1280 X=0,115
                KFPRX(K,X,S,I,6)=(D3X(K,X,S,I,53)+D3X(K,X,S,I,54)
     &                           +D3X(K,X,S,I,55)+D3X(K,X,S,I,56)
     &                           +D3X(K,X,S,I,57)+D3X(K,X,S,I,58))*KK2
                KFPRX(K,X,S,I,7)=D3X(K,X,S,I,53)*KK2
                KFPRX(K,X,S,I,8)=KFPRX(K,X,S,I,6)-KFPRX(K,X,S,I,7)
 1280         CONTINUE
              IF(NENBEEX.EQ.0) THEN
                DO 1300 X=0,XA-2
                  KFPRX(K,XA-1,S,I,6)
     &                             =KFPRX(K,XA-1,S,I,6)+KFPRX(K,X,S,I,6)
                  KFPRX(K,XA-1,S,I,7)
     &                             =KFPRX(K,XA-1,S,I,7)+KFPRX(K,X,S,I,7)
                  KFPRX(K,XA-1,S,I,8)
     &                             =KFPRX(K,XA-1,S,I,8)+KFPRX(K,X,S,I,8)
                  KFPRX(K,X,S,I,6) =0.0D0
                  KFPRX(K,X,S,I,7) =0.0D0
                  KFPRX(K,X,S,I,8) =0.0D0
 1300           CONTINUE
              END IF
            END IF
C----------------------------------------------------------
C           vlì¬(ÉS)
C----------------------------------------------------------
            DO 1310 J=0,8
              IF(NENBE65.EQ.0 .AND. J.GE.3) GO TO 1310
              IF(NENBEEX.EQ.0) THEN
                DO 1320 X=XA-1,115
                  KFPRX(K,X,S,0,J)=KFPRX(K,X,S,0,J)+KFPRX(K,X,S,I,J)
                  KFPRX(K,X,0,I,J)=KFPRX(K,X,0,I,J)+KFPRX(K,X,S,I,J)
                  KFPRX(K,X,0,0,J)=KFPRX(K,X,0,0,J)+KFPRX(K,X,S,I,J)
 1320           CONTINUE
              ELSE IF(NENBEEX.EQ.1)THEN
                DO 1330 X=0,115
                  KFPRX(K,X,S,0,J)=KFPRX(K,X,S,0,J)+KFPRX(K,X,S,I,J)
                  KFPRX(K,X,0,I,J)=KFPRX(K,X,0,I,J)+KFPRX(K,X,S,I,J)
                  KFPRX(K,X,0,0,J)=KFPRX(K,X,0,0,J)+KFPRX(K,X,S,I,J)
 1330           CONTINUE
              END IF
 1310       CONTINUE
C
 1020     CONTINUE
 1010   CONTINUE
 1000 CONTINUE
C
 1500 CONTINUE
C
C----------------------------------------------------------
C     WñVz
C----------------------------------------------------------
C
      DO 2000 S=1,3      
      DO 2010 K=KE,KIJUN+1,-1
        AAL(K,S)=A(K,S)+AIKU(K,S)
C
C       ¥ûÌPxêðÝ½
        IF((PSEID.EQ.1 .OR. PSEID.EQ.4) .AND.
     &     FLG_SANKYU.EQ.1 .AND. K.EQ.SANKYUYR) THEN
          A(K,S)   =(5.0D0*ADUM(K-1,S)   +7.0D0*A(K,S)   )/12.0D0
          AIKU(K,S)=(5.0D0*AIKUDUM(K-1,S)+7.0D0*AIKU(K,S))/12.0D0
          A60(K,S)=(5.0D0*A60DUM(K-1,S)+7.0D0*A60(K,S))/12.0D0
          A65(K,S)=(5.0D0*A65DUM(K-1,S)+7.0D0*A65(K,S))/12.0D0
          A70(K,S)=(5.0D0*A70DUM(K-1,S)+7.0D0*A70(K,S))/12.0D0
        ELSE IF(PSEID.EQ.1 .OR. PSEID.EQ.4) THEN
          A(K,S)   =(5.0D0*A(K-1,S)   +7.0D0*A(K,S)   )/12.0D0
          AIKU(K,S)=(5.0D0*AIKU(K-1,S)+7.0D0*AIKU(K,S))/12.0D0
          A60(K,S)=(5.0D0*A60(K-1,S)+7.0D0*A60(K,S))/12.0D0
          A65(K,S)=(5.0D0*A65(K-1,S)+7.0D0*A65(K,S))/12.0D0
          A70(K,S)=(5.0D0*A70(K-1,S)+7.0D0*A70(K,S))/12.0D0
        ELSE IF((PSEID.EQ.0 .AND. K.EQ.KOZAEXYR) .OR. 
     &          (FLG_SANKYU.EQ.1 .AND. K.EQ.SANKYUYR))       THEN
          A(K,S)   =(6.0D0*ADUM(K-1,S)   +6.0D0*A(K,S)   )/12.0D0
          AIKU(K,S)=(6.0D0*AIKUDUM(K-1,S)+6.0D0*AIKU(K,S))/12.0D0
          A60(K,S)=(6.0D0*A60DUM(K-1,S)+6.0D0*A60(K,S))/12.0D0
          A65(K,S)=(6.0D0*A65DUM(K-1,S)+6.0D0*A65(K,S))/12.0D0
          A70(K,S)=(6.0D0*A70DUM(K-1,S)+6.0D0*A70(K,S))/12.0D0
        ELSE IF(PSEID.EQ.0 .AND. 
     &          ((FLG_PART.GE.1 .AND. K.EQ.PARTYR1) .OR.
     &           (FLG_PART.GE.2 .AND. K.EQ.PARTYR2))) THEN
          A(K,S)   =(6.0D0*A(K-1,S)+6.0D0*ADUM(K,S))/12.0D0
          AIKU(K,S)=(6.0D0*AIKU(K-1,S)+6.0D0*AIKUDUM(K,S))/12.0D0
          A60(K,S)=(6.0D0*A60(K-1,S)+6.0D0*A60DUM(K,S))/12.0D0
          A65(K,S)=(6.0D0*A65(K-1,S)+6.0D0*A65DUM(K,S))/12.0D0
          A70(K,S)=(6.0D0*A70(K-1,S)+6.0D0*A70DUM(K,S))/12.0D0
C
          APART(K,S)=(6.0D0*APART(K-1,S)+6.0D0*APART(K,S))/12.0D0
          AIKUPART(K,S)=(6.0D0*AIKUPART(K-1,S)
     &                  +6.0D0*AIKUPART(K,S))/12.0D0
          A60PART(K,S)=(6.0D0*A60PART(K-1,S)+6.0D0*A60PART(K,S))/12.0D0
          A65PART(K,S)=(6.0D0*A65PART(K-1,S)+6.0D0*A65PART(K,S))/12.0D0
          A70PART(K,S)=(6.0D0*A70PART(K-1,S)+6.0D0*A70PART(K,S))/12.0D0
C
          APART(K-1,S)=0.0D0
          AIKUPART(K-1,S)=0.0D0
          A60PART(K-1,S)=0.0D0
          A65PART(K-1,S)=0.0D0
          A70PART(K-1,S)=0.0D0
        ELSE
          A(K,S)   =(6.0D0*A(K-1,S)   +6.0D0*A(K,S)   )/12.0D0
          AIKU(K,S)=(6.0D0*AIKU(K-1,S)+6.0D0*AIKU(K,S))/12.0D0
          A60(K,S)=(6.0D0*A60(K-1,S)+6.0D0*A60(K,S))/12.0D0
          A65(K,S)=(6.0D0*A65(K-1,S)+6.0D0*A65(K,S))/12.0D0
          A70(K,S)=(6.0D0*A70(K-1,S)+6.0D0*A70(K,S))/12.0D0
        END IF
C
C----------------------------------------------------------
C      íÛ¯Ò
C----------------------------------------------------------
        IF(K.EQ.KOZAEXYR) THEN
          AP(K,S)=(APDUM(K-1,S)+AP(K,S))/2.0D0
        ELSE IF(FLG_PART.GE.2 .AND. PSEID.EQ.0 .AND. S.LE.2 .AND.
     &          K.EQ.PARTYR2                                      ) THEN
          AP(K,S)=(APDUM(K-1,S)+AP(K,S))/2.0D0
        ELSE
          AP(K,S)=(AP(K-1,S)+AP(K,S))/2.0D0
        END IF
        AT(K,S)=(AT(K-1,S)+AT(K,S))/2.0D0
C  ----------------------------------------------------------
C      65ÎÈãÌíÛ¯Ò
C  ----------------------------------------------------------
        IF(K.EQ.KOZAEXYR) THEN
          AP65(K,S)=(AP65DUM(K-1,S)+AP65(K,S))/2.0D0
          AP70(K,S)=(AP70DUM(K-1,S)+AP70(K,S))/2.0D0
        ELSE IF(FLG_PART.GE.2 .AND. PSEID.EQ.0 .AND. S.LE.2 .AND.
     &          K.EQ.PARTYR2                                      ) THEN
          AP65(K,S)=(AP65DUM(K-1,S)+AP65(K,S))/2.0D0
          AP70(K,S)=(AP70DUM(K-1,S)+AP70(K,S))/2.0D0
        ELSE
          AP65(K,S)=(AP65(K-1,S)+AP65(K,S))/2.0D0
          AP70(K,S)=(AP70(K-1,S)+AP70(K,S))/2.0D0
        END IF
C
 2010 CONTINUE
 2000 CONTINUE
C
C
      DO 3000 S=0,3
        A(KIJUN,S) =0.0D0
        AP(KIJUN,S)=0.0D0
        AT(KIJUN,S)=0.0D0
        AIKU(KIJUN,S)=0.0D0
        A60(KIJUN,S) =0.0D0
        A65(KIJUN,S) =0.0D0
        A70(KIJUN,S) =0.0D0
        AP65(KIJUN,S)=0.0D0
        AP70(KIJUN,S)=0.0D0
 3000 CONTINUE
C
      DO 3010 K=KE,KIJUN+1,-1
        A(K,0)=A(K,1)+A(K,2)+A(K,3)
C
        AAL(K,0)=AAL(K,1)+AAL(K,2)+AAL(K,3)
C
        AIKU(K,0)=AIKU(K,1)+AIKU(K,2)+AIKU(K,3)
C
        AP(K,0)=AP(K,1)+AP(K,2)+AP(K,3)
C
        AT(K,0)=AT(K,1)+AT(K,2)+AT(K,3)
C
        AP65(K,0)=AP65(K,1)+AP65(K,2)+AP65(K,3)
        AP70(K,0)=AP70(K,1)+AP70(K,2)+AP70(K,3)
        A60(K,0) =A60(K,1) +A60(K,2)+A60(K,3)
        A65(K,0) =A65(K,1) +A65(K,2)+A65(K,3)
        A70(K,0) =A70(K,1) +A70(K,2)+A70(K,3)
C
        APART(K,0)   =APART(K,1)   +APART(K,2)   +APART(K,3)
        AIKUPART(K,0)=AIKUPART(K,1)+AIKUPART(K,2)+AIKUPART(K,3)
        A60PART(K,0) =A60PART(K,1) +A60PART(K,2) +A60PART(K,3)
        A65PART(K,0) =A65PART(K,1) +A65PART(K,2) +A65PART(K,3)
        A70PART(K,0) =A70PART(K,1) +A70PART(K,2) +A70PART(K,3)
C
 3010 CONTINUE
C
      DO 4000 K=KIJUN+1,KE
        DO 4010 S=1,3
          DO 4020 I=1,3
            VMINI(K,0,I) =VMINI(K,0,I) +VMINI(K,S,I)
            VMINI(K,S,0) =VMINI(K,S,0) +VMINI(K,S,I)
            VMINI(K,0,0) =VMINI(K,0,0) +VMINI(K,S,I)
 4020     CONTINUE
 4010   CONTINUE
 4000 CONTINUE
C
C
      RETURN
C
      END
C
