CFPRIME FNTENV                                                          FNTENV      1
C***********************************************************************RIGHTE      1
C*                                                                     *RIGHTE      2
C*               Output Analysis Program for ETMSP (OAP)               *RIGHTE      4
C*               =======================================               *RIGHTE      5
C*                                                                     *RIGHTE     11
C*        copyright @(1993) Electric Power Research Institute          *RIGHTE     12
C*                                                                     *RIGHTE     13
C* EPRI reserves all rights in the software and associated             *RIGHTE     14
C* documentation as delivered. The software and its associated         *RIGHTE     15
C* documention or any portion thereof may not be reproduced in any form*RIGHTE     16
C* whatsoever without the consent of EPRI, except as explicity provided*RIGHTE     17
C* for by license. Licensee shall submit a detailed description to EPRI*RIGHTE     18
C* of any changes or modifications to the software within two (2)      *RIGHTE     19
C* months after such changes or modifications are made. At EPRI's sole *RIGHTE     20
C* discretion, the software, as changed or modified, shall be given a  *RIGHTE     21
C* new designation sufficiently different from its then current        *RIGHTE     22
C* designation as to prevent mistake,confusion, or deception as between*RIGHTE     23
C* the current software as changed or modified.                        *RIGHTE     24
C*                                                                     *RIGHTE     25
C* A license under EPRI's rights in the software can be obtained       *RIGHTE     26
C* directly from EPRI.                                                 *RIGHTE     27
C*                                                                     *RIGHTE     28
C* This program and supporting materials may be independently available*RIGHTE     29
C* from Electric Power Software centre (EPSC) for an appropriate       *RIGHTE     30
C* distribution fee. The EPSC is a service of                          *RIGHTE     31
C*                                                                     *RIGHTE     32
C*                    Power Computing Company                          *RIGHTE     33
C*                    1930 Hi Line                                     *RIGHTE     34
C*                    Dallas, Tx 75207                                 *RIGHTE     35
C*                                                                     *RIGHTE     36
C* NEITHER EPRI, ANY MEMBER OF EPRI, NOR ANY PERSON OR  ORGANIZATION   *RIGHTE     37
C* ACTING ON BEHAVE OF THEM:                                           *RIGHTE     38
C*                                                                     *RIGHTE     39
C* 1. MAKE ANY WARRANTY OR REPRESENTATION WHATSOEVER, EXPRESS OR       *RIGHTE     40
C*    IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS OR *RIGHTE     41
C*    ANY PURPOSE WITH RESPECT TO THE SOFTWARE OR ITS ASSOCIATED       *RIGHTE     42
C*    DOCUMENTATION; OR                                                *RIGHTE     43
C*                                                                     *RIGHTE     44
C* 2. ASSUMES ANY LIABILITY WHATSOEVER WITH RESPECT TO ANY USE OF THE  *RIGHTE     45
C*    SOFTWARE OR ITS ASSOCIATED DOCUMENTATION OR ANY PORTION THEREOF  *RIGHTE     46
C*    OR WITH RESPECT TO ANY DAMAGES WHICH MAY RESULT FROM SUCH USE.   *RIGHTE     47
C*                                                                     *RIGHTE     48
C* THIS NOTICE MAY NOT BE REMOVED FROM THE SOFTWARE BY ANY USER        *RIGHTE     49
C* THEREOF.                                                            *RIGHTE     50
C*                                                                     *RIGHTE     51
C***********************************************************************RIGHTE     52
      SUBROUTINE FNTENV(XA,YA,NOGO)                                     FNTENV      3
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCFLFCCCCCFNTENV      4
CD                                                                      FNTENV      5
CD         THIS ROUTINE PERFORMS ENVELOPE ANALYSIS FOR                  FNTENV      6
CD         THE GIVEN CHANNELS                                           FNTENV      7
CD                                                                      FNTENV      8
CD         CALLING PARAMETERS :                                         FNTENV      9
CD                                                                      FNTENV     10
CD                        XA  -  THE INPUT X ARRAY                      FNTENV     11
CD                        YA  -  THE INPUT Y ARRAY                      FNTENV     12
CD                      NOGO  -  I/O ERROR FLAG                         FNTENV     13
CD                                                                      FNTENV     14
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCFNTENV     15
C                                                                       FNTENV     16
      INCLUDE 'PARAM.INS'                                               FNTENV     17
      INCLUDE 'SOAPC1.INS'                                              FNTENV     18
      INCLUDE 'XYARAY.INS'                                              FNTENV     19
      INCLUDE 'CHDISP.INS'                                              FNTENV     20
      CHARACTER*2 UID                                                   FNTENV     21
      CHARACTER*80 STRING,MSG                                           FNTENV     22
      DIMENSION XA(MXPT,MXPLOT),YA(MXPT,MXPLOT),XX(MXPT),Z(MXPT)        FNTENV     23
C                                                                       FNTENV     24
      NOGO=0                                                            FNTENV     25
      MM1=MAXPT(1)                                                      FNTENV     26
      MM=MAXPT(1)                                                       FNTENV     27
C                                                                       FNTENV     28
C                Establish starting and ending time for trend analysis  FNTENV     29
 70   WRITE(LOUT,2000) XA(1,1),XA(MM,1)                                 FNTENV     30
      MSG='Enter START time, END time (M)in,max'                        FNTENV     31
      CALL PMTRED(LOUT,LIN,JERR,ISLEN(MSG),MSG,'TR1',STRING)            FNTENV     32
      IF(RECORD) WRITE(IREC,'(A)') STRING                               FNTENV     33
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q')THEN                  FNTENV     34
         NOGO=-1                                                        FNTENV     35
         GOTO 9999                                                      FNTENV     36
      ELSEIF(STRING(1:1).EQ.'M' .OR.STRING(1:1).EQ.'m')THEN             FNTENV     37
        XAS=XA(1,1)                                                     FNTENV     38
        XAE=XA(MM,1)                                                    FNTENV     39
      ELSE                                                              FNTENV     40
        READ(STRING,*,IOSTAT=IOS)XAS,XAE                                FNTENV     41
        IF(IOS.NE.0) GOTO 70                                            FNTENV     42
      ENDIF                                                             FNTENV     43
C                                                                       FNTENV     44
      IF((XAS.GE.XAE).OR.(XAE.EQ.0.0)) THEN                             FNTENV     45
         WRITE(LOUT,'(//,1X,A,/)')'*ERROR.. (START > END) TRY AGAIN *'  FNTENV     46
         GOTO 70                                                        FNTENV     47
      ENDIF                                                             FNTENV     48
C                                                                       FNTENV     49
      DO 80 I=1,MM                                                      FNTENV     50
        IF(XA(I,1).GE.XAS)THEN                                          FNTENV     51
          IXAS=I                                                        FNTENV     52
          GOTO 85                                                       FNTENV     53
        ENDIF                                                           FNTENV     54
 80   CONTINUE                                                          FNTENV     55
C                                                                       FNTENV     56
      WRITE(LOUT,'(//,1X,A,/)')'*OUT OF RANGE. TRY AGAIN *'             FNTENV     57
      GOTO 70                                                           FNTENV     58
C                                                                       FNTENV     59
 85   DO 87 I=IXAS,MM                                                   FNTENV     60
        IF(XA(I,1).GE.XAE)THEN                                          FNTENV     61
          IXAE=I                                                        FNTENV     62
          GOTO 100                                                      FNTENV     63
        ENDIF                                                           FNTENV     64
 87   CONTINUE                                                          FNTENV     65
C                                                                       FNTENV     66
      WRITE(LOUT,'(//,1X,A,/)')'*OUT OF RANGE. TRY AGAIN *'             FNTENV     67
      GOTO 70                                                           FNTENV     68
C                                                                       FNTENV     69
 100  CONTINUE                                                          FNTENV     70
      MAXPT(1)=IXAE-IXAS+1                                              FNTENV     71
      TMCNST=0.5                                                        FNTENV     72
      CPRLIM=0.05                                                       FNTENV     73
      THRESH=0.2                                                        FNTENV     74
      WL=XA(IXAE,1)-XA(IXAS,1)                                          FNTENV     75
      CTOL=2.0*CPRLIM*CPRLIM+1.0                                        FNTENV     76
      PFACT=1.0/TMCNST                                                  FNTENV     77
      TSAVE=XA(IXAE,1)                                                  FNTENV     78
      TSMX=TSAVE                                                        FNTENV     79
      TSMN=TSAVE                                                        FNTENV     80
C                                                                       FNTENV     81
      DO 200 J=IXAS+1,IXAE                                              FNTENV     82
        IF(ABS(XA(J,1)-XA(J-1,1)).GT.0.000001)GOTO 200                  FNTENV     83
        XA(J,1)=XA(J,1)+.001                                            FNTENV     84
 200  CONTINUE                                                          FNTENV     85
C                                                    Define subwindows  FNTENV     86
      T1=0.166*WL+XA(IXAS,1)                                            FNTENV     87
      T2=0.5*WL+XA(IXAS,1)                                              FNTENV     88
      T3=0.833*WL+XA(IXAS,1)                                            FNTENV     89
      R1=0.333*WL+XA(IXAS,1)                                            FNTENV     90
      R2=0.666*WL+XA(IXAS,1)                                            FNTENV     91
C             Calculate average of the variable over three sub-windows  FNTENV     92
C                                 to get an estimate of the bias curve  FNTENV     93
C                                                       Accumulate sum  FNTENV     94
      DEM1=0.0                                                          FNTENV     95
      DEM2=0.0                                                          FNTENV     96
      DEM3=0.0                                                          FNTENV     97
      SUM1=0.0                                                          FNTENV     98
      SUM2=0.0                                                          FNTENV     99
      SUM3=0.0                                                          FNTENV    100
C                                                                       FNTENV    101
      DO 300 K=IXAS,IXAE                                                FNTENV    102
        IF(XA(K,1).LT.R1)SUM1=SUM1+YA(K,1)                              FNTENV    103
        IF(XA(K,1).LT.R1)DEM1=DEM1+1.0                                  FNTENV    104
        IF(XA(K,1).GE.R1.AND.XA(K,1).LE.R2)SUM2=SUM2+YA(K,1)            FNTENV    105
        IF(XA(K,1).GE.R1.AND.XA(K,1).LE.R2)DEM2=DEM2+1.0                FNTENV    106
        IF(XA(K,1).GT.R2)SUM3=SUM3+YA(K,1)                              FNTENV    107
        IF(XA(K,1).GT.R2)DEM3=DEM3+1.0                                  FNTENV    108
 300  CONTINUE                                                          FNTENV    109
C                                                     Evaluate average  FNTENV    110
      A1=SUM1/DEM1                                                      FNTENV    111
      A2=SUM2/DEM2                                                      FNTENV    112
      A3=SUM3/DEM3                                                      FNTENV    113
C                                 Fit parabolic bias trend to A1,A2,A3  FNTENV    114
      A=A1/((T1-T2)*(T1-T3))                                            FNTENV    115
      B=A2/((T2-T1)*(T2-T3))                                            FNTENV    116
      C=A3/((T3-T1)*(T3-T2))                                            FNTENV    117
      C0=A*T2*T3+B*T1*T3+C*T1*T2                                        FNTENV    118
      C1=-A*(T2+T3)-B*(T1+T3)-C*(T1+T2)                                 FNTENV    119
      C2=A+B+C                                                          FNTENV    120
C                                              Subtract bias from data  FNTENV    121
      DO 400 K=IXAS,IXAE                                                FNTENV    122
        TEMP=C0+C1*XA(K,1)+C2*XA(K,1)**2                                FNTENV    123
        XX(K)=YA(K,1)-TEMP                                              FNTENV    124
C                       Store largest and smallest values in FUP & FDN  FNTENV    125
        IF(K.EQ.IXAS)FUP=XX(K)                                          FNTENV    126
        IF(K.EQ.IXAS)FDN=XX(K)                                          FNTENV    127
        IF(XX(K).GT.FUP)FUP=XX(K)                                       FNTENV    128
        IF(XX(K).LT.FDN)FDN=XX(K)                                       FNTENV    129
  400 CONTINUE                                                          FNTENV    130
C                                Forward and backward peak hold filter  FNTENV    131
C                                                 KEY=1 max, KEY=2 min  FNTENV    132
      KEY=1                                                             FNTENV    133
  500 CONTINUE                                                          FNTENV    134
      MM=IXAS-1                                                         FNTENV    135
      Z(IXAS)=XX(IXAS)                                                  FNTENV    136
C                                                       Forward filter  FNTENV    137
      DO 600 K=IXAS,IXAE-1                                              FNTENV    138
        PP=1.0-PFACT*(XA(K+1,1)-XA(K,1))                                FNTENV    139
        PY=PP*Z(K)                                                      FNTENV    140
        IF(XX(K+1).GT.PY.AND.KEY.EQ.1)PY=XX(K+1)                        FNTENV    141
        IF(XX(K+1).LT.PY.AND.KEY.EQ.2)PY=XX(K+1)                        FNTENV    142
        Z(K+1)=PY                                                       FNTENV    143
  600 CONTINUE                                                          FNTENV    144
C                                                      Backward filter  FNTENV    145
      DO 700 K=IXAE-1,IXAS,-1                                           FNTENV    146
        PP=1.0-PFACT*(XA(K+1,1)-XA(K,1))                                FNTENV    147
        PX=PP*Z(K+1)                                                    FNTENV    148
        IF(Z(K).GT.PX.AND.KEY.EQ.1)PX=Z(K)                              FNTENV    149
        IF(Z(K).LT.PX.AND.KEY.EQ.2)PX=Z(K)                              FNTENV    150
        Z(K+1)=PX                                                       FNTENV    151
  700 CONTINUE                                                          FNTENV    152
C                       Calculate true peaks add bias back as go along  FNTENV    153
      F1=XX(IXAS)+C0+C1*XA(IXAS,1)+C2*XA(IXAS,1)**2                     FNTENV    154
      F2=XX(IXAS+1)+C0+C1*XA(IXAS+1,1)+C2*XA(IXAS+1,1)**2               FNTENV    155
      DO 800 K=IXAS+2,IXAE                                              FNTENV    156
        KEY2=0                                                          FNTENV    157
        F3=XX(K)+C0+C1*XA(K,1)+C2*XA(K,1)**2                            FNTENV    158
        IF(F2.GT.F1.AND.F2.GT.F3)KEY2=1                                 FNTENV    159
        IF(F2.LT.F1.AND.F2.LT.F3)KEY2=-1                                FNTENV    160
C                   Do not calculate TP:FP unless F1,F2,F3 are related  FNTENV    161
C                             correctly for min, max peak calculations  FNTENV    162
        IF(KEY.EQ.1.AND.KEY2.EQ.-1)KEY2=0                               FNTENV    163
        IF(KEY.EQ.2.AND.KEY2.EQ.1)KEY2=0                                FNTENV    164
        IF(KEY2.EQ.0)GOTO 750                                           FNTENV    165
C             Interpolate to find TIME(TP),MAGNITUDE(FP) of true peaks  FNTENV    166
        H1=XA(K-1,1)-XA(K-2,1)                                          FNTENV    167
        H2=XA(K,1)-XA(K-1,1)                                            FNTENV    168
        H3=H1+H2                                                        FNTENV    169
        TP=0.5*((H1*H2*F1)+(H3*H2*F1)-(H3*                              FNTENV    170
     *     H3*F2)+(H1*H1*F3))/((H2*F1)-(H3*                             FNTENV    171
     *     F2)+(H1*F3))                                                 FNTENV    172
        D1=((TP-H1)*(TP-H3))/(H3*H1)                                    FNTENV    173
        D2=(TP*(TP-H3))/(H1*H2)                                         FNTENV    174
        D3=(TP*(TP-H1))/(H3*H2)                                         FNTENV    175
        TP=TP+XA(K-2,1)                                                 FNTENV    176
        FP=F1*D1-F2*D2+F3*D3                                            FNTENV    177
C              Establish the size of the band around the filtered wave  FNTENV    178
C                                            for rejecting minor peaks  FNTENV    179
        EPS=THRESH*(FUP-FDN)/2.0                                        FNTENV    180
C                                       Add bias back to filtered wave  FNTENV    181
        ZPK=D1*Z(K-2)-D2*Z(K-1)+D3*Z(K)+C0+C1*TP+C2*TP*TP               FNTENV    182
C                          Test peak to see if it is a global max/min   FNTENV    183
        IF(ABS(FP-ZPK).LT.EPS)KEY2=2*KEY2                               FNTENV    184
        IF(KEY2.NE.-2)GOTO 740                                          FNTENV    185
        TSMN=TP                                                         FNTENV    186
        GOTO 745                                                        FNTENV    187
 740    IF(KEY2.NE.2)GOTO 750                                           FNTENV    188
        TSMX=TP                                                         FNTENV    189
 745    MM=MM+1                                                         FNTENV    190
        IF(KEY.EQ.1)THEN                                                FNTENV    191
          XA(MM,2)=TP                                                   FNTENV    192
          YA(MM,2)=FP                                                   FNTENV    193
          MAXPT(2)=MM-IXAS+1                                            FNTENV    194
        ELSE                                                            FNTENV    195
          XA(MM,3)=TP                                                   FNTENV    196
          YA(MM,3)=FP                                                   FNTENV    197
          MAXPT(3)=MM-IXAS+1                                            FNTENV    198
        ENDIF                                                           FNTENV    199
  750   F1=F2                                                           FNTENV    200
        F2=F3                                                           FNTENV    201
  800 CONTINUE                                                          FNTENV    202
C                                                                       FNTENV    203
      IF(KEY.EQ.2)GOTO 900                                              FNTENV    204
      KEY=2                                                             FNTENV    205
      GOTO 500                                                          FNTENV    206
C                      Fill arrays for interpolation of lower envelope  FNTENV    207
C        from upper envelope for calculation of trend and peak-to-peak  FNTENV    208
  900 MAXPT(4)=MAXPT(2)                                                 FNTENV    209
      MAXPT(5)=MAXPT(3)                                                 FNTENV    210
C                                          Check for algorithm failure  FNTENV    211
      IF(MAXPT(2).LT.2.OR.MAXPT(3).LT.2.OR.                             FNTENV    212
     +   MAXPT(4).LT.2.OR.MAXPT(5).LT.2)THEN                            FNTENV    213
        WRITE(LOUT,3000)                                                FNTENV    214
        IF(LIN.EQ.LPIN)THEN                                             FNTENV    215
          WRITE(LOUT,'(/,1X,A)')'Press <RETURN> to continue'            FNTENV    216
          READ(LIN,'(A)')CH                                             FNTENV    217
        ENDIF                                                           FNTENV    218
        KCH(1)=1                                                        FNTENV    219
        MAXPT(1)=MM1                                                    FNTENV    220
        NOGO=-1                                                         FNTENV    221
        GOTO 9999                                                       FNTENV    222
      ENDIF                                                             FNTENV    223
      MM=0                                                              FNTENV    224
      DO 1100 I=IXAS,IXAS+MAXPT(4)-1                                    FNTENV    225
        YA(I,4)=YA(I,2)                                                 FNTENV    226
        DO 1000 J=IXAS+1,IXAS+MAXPT(5)-1                                FNTENV    227
          IF(XA(I,2).EQ.XA(J,3))THEN                                    FNTENV    228
            YA(I,5)=YA(J,3)                                             FNTENV    229
            MM=MM+1                                                     FNTENV    230
            GOTO 1100                                                   FNTENV    231
          ELSE IF(XA(J,3).GT.XA(I,2))THEN                               FNTENV    232
            YA(I,5)=(XA(I,2)-XA(J-1,3))*(YA(J,3)-YA(J-1,3))/            FNTENV    233
     *        (XA(J,3)-XA(J-1,3))+YA(J-1,3)                             FNTENV    234
            MM=MM+1                                                     FNTENV    235
            GOTO 1100                                                   FNTENV    236
          ENDIF                                                         FNTENV    237
 1000   CONTINUE                                                        FNTENV    238
C                                                 MINS end before MAXS  FNTENV    239
        GOTO 1200                                                       FNTENV    240
 1100 CONTINUE                                                          FNTENV    241
 1200 MAXPT(4)=MM                                                       FNTENV    242
      MAXPT(5)=MM                                                       FNTENV    243
      DO 1400 J=1,3                                                     FNTENV    244
        DO 1300 I=IXAS,IXAS+MAXPT(J)-1                                  FNTENV    245
          XARAY(I-IXAS+1,J)=XA(I,J)                                     FNTENV    246
          YARAY(I-IXAS+1,J)=YA(I,J)                                     FNTENV    247
 1300   CONTINUE                                                        FNTENV    248
 1400 CONTINUE                                                          FNTENV    249
C                                         Store trend and peak-to-peak  FNTENV    250
      DO 1500 I=IXAS,IXAS+MAXPT(4)                                      FNTENV    251
        XARAY(I-IXAS+1,4)=XA(I,2)                                       FNTENV    252
        XARAY(I-IXAS+1,5)=XA(I,2)                                       FNTENV    253
        YARAY(I-IXAS+1,4)=(YA(I,4)+YA(I,5))/2.0                         FNTENV    254
        YARAY(I-IXAS+1,5)=YA(I,4)-YA(I,5)                               FNTENV    255
 1500 CONTINUE                                                          FNTENV    256
C                                                                       FNTENV    257
      DO 1700 J=1,5                                                     FNTENV    258
        DO 1600 II=1,MAXPT(J)                                           FNTENV    259
          T(II,J)=XARAY(II,J)                                           FNTENV    260
 1600   CONTINUE                                                        FNTENV    261
 1700 CONTINUE                                                          FNTENV    262
C                                                                       FNTENV    263
      KCH(1)=5                                                          FNTENV    264
      FTITLE='ENVELOPE ANALYSIS'                                        FNTENV    265
      KRECFD(1,1)=KCH(1)                                                FNTENV    266
      KRECFD(1,2)=KCH(1)                                                FNTENV    267
      KCH(3)=11                                                         FNTENV    268
      YTITLE(2)='UPPER ENVELOPE'                                        FNTENV    269
      KCH(4)=12                                                         FNTENV    270
      YTITLE(3)='LOWER ENVELOPE'                                        FNTENV    271
      KCH(5)=13                                                         FNTENV    272
      YTITLE(4)='TREND'                                                 FNTENV    273
      KCH(6)=14                                                         FNTENV    274
      YTITLE(5)='PEAK TO PEAK'                                          FNTENV    275
C                                                                       FNTENV    276
      DO 4000 II=2,5                                                    FNTENV    277
        LTITLE(II)=LTITLE(1)                                            FNTENV    278
        LTITL2(II)=LTITL2(1)                                            FNTENV    279
        CTITLE(II)=' '                                                  FNTENV    280
        CTITL2(II)=CTITL2(1)                                            FNTENV    281
        CASEID(II)=CASEID(1)                                            FNTENV    282
        FILCHN(II)=FILCHN(1)                                            FNTENV    283
        ICHTYP(II)=4                                                    FNTENV    284
        DISPCH(1,II)='          ENVELOPE ANALYSIS DATA'                 FNTENV    285
        WRITE(DISPCH(1,II)(1:6),'(I6)')KCH(II+1)                        FNTENV    286
        DISPCH(2,II)=' '                                                FNTENV    287
 4000 CONTINUE                                                          FNTENV    288
C                                                                       FNTENV    289
      WRITE(LOUT,'(/,10X,A,/)')'Use GPPLOT or DPPLOT'//                 FNTENV    290
     +  ' commands to plot contents of buffer.'                         FNTENV    291
      IF(LIN.EQ.LPIN)THEN                                               FNTENV    292
        WRITE(LOUT,'(/,1X,A)')'Press <RETURN> to continue'              FNTENV    293
        READ(LIN,'(A)')CH                                               FNTENV    294
      ENDIF                                                             FNTENV    295
      STRING(1:7)='ANALYSI'                                             FNTENV    296
      CALL GPPAGE                                                       FNTENV    297
      CALL GETCHN(STRING)                                               FNTENV    298
C                                                                       FNTENV    299
 9999 RETURN                                                            FNTENV    300
C                                                                       FNTENV    301
 2000 FORMAT(//,                                                        FNTENV    302
     1 10X,'......................................................',/,  FNTENV    303
     1 10X,'.                                                    .',/,  FNTENV    304
     1 10X,'.                  ENVELOPE ANALYSIS                 .',/,  FNTENV    305
     1 10X,'.                                                    .',/,  FNTENV    306
     1 10X,'.          DATA Starting time = ',F10.3,/,                  FNTENV    307
     1 10X,'.          DATA Ending time   = ',F10.3,/,                  FNTENV    308
     1 10X,'.                                                    .',/,  FNTENV    309
     1 10X,'.           Please specify time period.              .',/,  FNTENV    310
     1 10X,'.                                                    .',/,  FNTENV    311
     1 10X,'......................................................',//) FNTENV    312
 3000 FORMAT(//,                                                        FNTENV    313
     + 5X,'***  SPECIFIED WINDOW IS NOT SUITABLE FOR ENVELOPE ',        FNTENV    314
     +     'ANALYSIS ***',//)                                           FNTENV    315
C                                                                       FNTENV    316
      END                                                               FNTENV    317
