CFPRIME EDGEDA                                                          EDGEDA      1
C***********************************************************************RIGHTE      1
C*                                                                     *RIGHTE      2
C*        Extended Transient-Midterm Stability Program (ETMSP)         *RIGHTE      3
C*        ====================================================         *RIGHTE      4
C*                                                                     *RIGHTE      5
C*       Copyright (C) (1993) Electric Power Research Institute        *RIGHTE      6
C*                                                                     *RIGHTE      7
C* EPRI reserves all rights in the software and associated             *RIGHTE      8
C* documentation as delivered. The software and its associated         *RIGHTE      9
C* documention or any portion thereof may not be reproduced in any form*RIGHTE     10
C* whatsoever without the consent of EPRI, except as explicity provided*RIGHTE     11
C* for by license. Licensee shall submit a detailed description to EPRI*RIGHTE     12
C* of any changes or modifications to the software within two (2)      *RIGHTE     13
C* months after such changes or modifications are made. At EPRI's sole *RIGHTE     14
C* discretion, the software, as changed or modified, shall be given a  *RIGHTE     15
C* new designation sufficiently different from its then current        *RIGHTE     16
C* designation as to prevent mistake,confusion, or deception as between*RIGHTE     17
C* the current software as changed or modified.                        *RIGHTE     18
C*                                                                     *RIGHTE     19
C* A license under EPRI's rights in the software can be obtained       *RIGHTE     20
C* directly from EPRI.                                                 *RIGHTE     21
C*                                                                     *RIGHTE     22
C* This program and supporting materials may be independently available*RIGHTE     23
C* from Electric Power Software centre (EPSC) for an appropriate       *RIGHTE     24
C* distribution fee. The EPSC is a service of                          *RIGHTE     25
C*                                                                     *RIGHTE     26
C*                    Power Computing Company                          *RIGHTE     27
C*                    1930 Hi Line                                     *RIGHTE     28
C*                    Dallas, Tx 75207                                 *RIGHTE     29
C*                                                                     *RIGHTE     30
C* NEITHER EPRI, ANY MEMBER OF EPRI, NOR ANY PERSON OR  ORGANIZATION   *RIGHTE     31
C* ACTING ON BEHAVE OF THEM:                                           *RIGHTE     32
C*                                                                     *RIGHTE     33
C* 1. MAKE ANY WARRANTY OR REPRESENTATION WHATSOEVER, EXPRESS OR       *RIGHTE     34
C*    IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS OR *RIGHTE     35
C*    ANY PURPOSE WITH RESPECT TO THE SOFTWARE OR ITS ASSOCIATED       *RIGHTE     36
C*    DOCUMENTATION; OR                                                *RIGHTE     37
C*                                                                     *RIGHTE     38
C* 2. ASSUMES ANY LIABILITY WHATSOEVER WITH RESPECT TO ANY USE OF THE  *RIGHTE     39
C*    SOFTWARE OR ITS ASSOCIATED DOCUMENTATION OR ANY PORTION THEREOF  *RIGHTE     40
C*    OR WITH RESPECT TO ANY DAMAGES WHICH MAY RESULT FROM SUCH USE.   *RIGHTE     41
C*                                                                     *RIGHTE     42
C* THIS NOTICE MAY NOT BE REMOVED FROM THE SOFTWARE BY ANY USER        *RIGHTE     43
C* THEREOF.                                                            *RIGHTE     44
C*                                                                     *RIGHTE     45
C***********************************************************************RIGHTE     46
      SUBROUTINE EDGEDA(JG,NLF,ICKT,NPBNOI,IQUIT)                       EDGEDA      3
CD                                                                      EDGEDA      4
CD    TO DISPLAY DETAILED GENERATOR DATA FOR ON-LINE EDITING.           EDGEDA      5
CD                                                                      EDGEDA      6
      INCLUDE 'CNLSTA.INS'                                              EDGEDA      7
      INCLUDE 'PARX.INS'                                                EDGEDA      8
      INCLUDE 'CNB0.INS'                                                EDGEDA      9
      INCLUDE 'CNB1.INS'                                                EDGEDA     10
      INCLUDE 'CNB3.INS'                                                EDGEDA     11
      INCLUDE 'CNB4.INS'                                                EDGEDA     12
      INCLUDE 'CNB8.INS'                                                EDGEDA     13
      INCLUDE 'CNB19.INS'                                               EDGEDA     14
      INCLUDE 'CNPT.INS'                                                EDGEDA     15
      INCLUDE 'CNUNIT.INS'                                              EDGEDA     16
      INCLUDE 'CNLUN.INS'                                               EDGEDA     17
      INCLUDE 'CNIMPR.INS'                                              EDGEDA     18
      INCLUDE 'CNIPTR.INS'                                              EDGEDA     19
      INCLUDE 'CNMDAT.INS'                                              EDGEDA     20
      INCLUDE 'CNPARX.INS'                                              EDGEDA     21
      INCLUDE 'CNREN.INS'                                               EDGEDA     22
      INCLUDE 'CNUDM.INS'                                               EDGEDA     23
      INCLUDE 'CNMNEW.INS'                                              EDGEDA     24
      INCLUDE 'CNLFDA.INS'                                              EDGEDA     25
      INCLUDE 'CNNNEW.INS'                                              EDGEDA     26
      INCLUDE 'CNFLAG.INS'                                              EDGEDA     27
      INCLUDE 'CNSTP.INS'                                               EDGEDA     28
      INCLUDE 'CNULTC.INS'                                              EDGEDA     29
      INCLUDE 'UDCA.INS'                                                EDGEDA     30
      INCLUDE 'CNJPT.INS'                                               EDGEDA     31
      INCLUDE 'CNJDAT.INS'                                              EDGEDA     32
      INCLUDE 'CNTMDA.INS'                                              EDGEDA     33
      INCLUDE 'CNTGED.INS'                                              EDGEDA     34
C                                                                       EDGEDA     35
      CHARACTER*80 MSG,STRING                                           EDGEDA     36
      CHARACTER*2 ICKT                                                  EDGEDA     37
C                                                                       EDGEDA     38
C      DIMENSION VALUE(90)                                              EDGEDA     39
C                                                                       EDGEDA     40
      DATA IGEN,ISATX/0,0/                                              EDGEDA     41
      DATA NLF1,ITYPE1,NLF2,ITYPE2/0,0,0,0/                             EDGEDA     42
      DATA N,M,IFV,ILN/0,0,0,0/                                         EDGEDA     43
C                                                                       EDGEDA     44
      LDEB=.FALSE.                                                      EDGEDA     45
C                                                                       EDGEDA     46
      IF((JNT+1).GE.MXP)THEN                                            EDGEDA     47
         WRITE(LOUT,'(A)') ' TOO MANY DETAILED GENERATORS'              EDGEDA     48
         IF(PLAYBA)CALL PSTOP                                           EDGEDA     49
         RETURN                                                         EDGEDA     50
      ENDIF                                                             EDGEDA     51
C                                                                       EDGEDA     52
      IF(IQUIT.EQ.1) THEN                                               EDGEDA     53
        IGEN=IGENDA(1,JG)                                               EDGEDA     54
        ISATX=IGENDA(3,JG)                                              EDGEDA     55
        GOTO 5401                                                       EDGEDA     56
      ENDIF                                                             EDGEDA     57
C                                                                       EDGEDA     58
 5400 CONTINUE                                                          EDGEDA     59
      MSG=' ENTER  IGEN, ISATX'                                         EDGEDA     60
      CALL PMTRED(LOUT,LIN,IOERR,36,MSG,'XXX',STRING,KREAD,PLAYBA)      EDGEDA     61
      IF(IOERR.NE.0)THEN                                                EDGEDA     62
      IF(PLAYBA)CALL PSTOP                                              EDGEDA     63
      GOTO 5400                                                         EDGEDA     64
      ENDIF                                                             EDGEDA     65
      IF(RECORD) WRITE(IREC,'(A)') STRING                               EDGEDA     66
      READ(STRING,*,IOSTAT=IOS) IGEN,ISATX                              EDGEDA     67
      IF(IOS.NE.0)THEN                                                  EDGEDA     68
      IF(PLAYBA)CALL PSTOP                                              EDGEDA     69
      GOTO 3001                                                         EDGEDA     70
      ENDIF                                                             EDGEDA     71
C                                                                       EDGEDA     72
 5401 IF(IGEN.GE.0.AND.IGEN.LE.14) THEN                                 EDGEDA     73
         LI=24                                                          EDGEDA     74
      ELSE                                                              EDGEDA     75
         WRITE(LOUT,'(A,I3)') '  IGEN=',IGEN                            EDGEDA     76
         GOTO 3001                                                      EDGEDA     77
      ENDIF                                                             EDGEDA     78
      IF(ISATX.LT.0) ISATX=0                                            EDGEDA     79
      IF(ISATX.LE.3.OR.ISATX.EQ.10.OR.ISATX.EQ.20.                      EDGEDA     80
     &   OR.ISATX.EQ.30)THEN                                            EDGEDA     81
         LI=LI+12                                                       EDGEDA     82
      ELSE                                                              EDGEDA     83
         WRITE(LOUT,'(A,I3)') '  ISATX=',ISATX                          EDGEDA     84
         GOTO 3001                                                      EDGEDA     85
      ENDIF                                                             EDGEDA     86
      GOTO 5500                                                         EDGEDA     87
 3001 CONTINUE                                                          EDGEDA     88
 3051 MSG=' *** DATA ERROR:  DO YOU WANT TO REENTER THE DATA? (Y/N)'    EDGEDA     89
      CALL PMTRED(LOUT,LIN,IOERR,60,MSG,'XXX',STRING,KREAD,PLAYBA)      EDGEDA     90
      IF(IOERR.NE.0)THEN                                                EDGEDA     91
      IF(PLAYBA)CALL PSTOP                                              EDGEDA     92
      GOTO 3051                                                         EDGEDA     93
      ENDIF                                                             EDGEDA     94
      IF(RECORD) WRITE(IREC,'(A)') STRING                               EDGEDA     95
      IF(STRING.EQ.'Y'.OR.STRING.EQ.'y') GOTO 5400                      EDGEDA     96
      IF(STRING.NE.'N'.AND.STRING.NE.'n')THEN                           EDGEDA     97
      IF(PLAYBA)CALL PSTOP                                              EDGEDA     98
      GOTO 3051                                                         EDGEDA     99
      ENDIF                                                             EDGEDA    100
      IQUIT=1                                                           EDGEDA    101
      RETURN                                                            EDGEDA    102
C                                                                       EDGEDA    103
C                                                                       EDGEDA    104
 5500 CONTINUE                                                          EDGEDA    105
      IF(IQUIT.EQ.1) THEN                                               EDGEDA    106
        JTEMP=JGENDA(1,JG)                                              EDGEDA    107
      ELSE                                                              EDGEDA    108
        JTEMP=JTLN                                                      EDGEDA    109
        JNT=JNT+1                                                       EDGEDA    110
        IF(NTHGEN(NPBNOI+1).EQ.0)THEN                                   EDGEDA    111
         NTHGEN(NPBNOI+1)=JNT                                           EDGEDA    112
         NEXGEN(JNT)=0                                                  EDGEDA    113
         IF(NPBNOI.GT.LJNT) LJNT=NPBNOI                                 EDGEDA    114
        ELSE                                                            EDGEDA    115
         K=NTHGEN(NPBNOI+1)                                             EDGEDA    116
 5700    CONTINUE                                                       EDGEDA    117
         N=NEXGEN(K)                                                    EDGEDA    118
         IF(N.EQ.0)THEN                                                 EDGEDA    119
            NEXGEN(K)=JNT                                               EDGEDA    120
            NEXGEN(JNT)=0                                               EDGEDA    121
         ELSE                                                           EDGEDA    122
            K=N                                                         EDGEDA    123
            GOTO 5700                                                   EDGEDA    124
         ENDIF                                                          EDGEDA    125
        ENDIF                                                           EDGEDA    126
        NGEBUS(JNT)=NLF                                                 EDGEDA    127
        GENID(JNT)(3:4)=ICKT                                            EDGEDA    128
        IGENDA(1,JNT)=IGEN                                              EDGEDA    129
        IGENDA(3,JNT)=ISATX                                             EDGEDA    130
        JGENDA(1,JNT)=JTLN                                              EDGEDA    131
        JTLN=JTLN+LI                                                    EDGEDA    132
        JG=JNT                                                          EDGEDA    133
      ENDIF                                                             EDGEDA    134
      IPQFA(1,JG)=0                                                     EDGEDA    135
      IPQFA(2,JG)=0                                                     EDGEDA    136
      DO 5600  I=1,LI                                                   EDGEDA    137
 5600 TDDAT(JTEMP+I)=0.                                                 EDGEDA    138
      IQUIT=0                                                           EDGEDA    139
C                                                                       EDGEDA    140
      RETURN                                                            EDGEDA    141
C  --------------------------------------------------                   EDGEDA    142
      ENTRY EEXCDA(JG,IEXX,IQUIT)                                       EDGEDA    143
CD                                                                      EDGEDA    144
CD    TO DISPLAY THE EXCITER DATA FOR ON-LINE EDITING.                  EDGEDA    145
CD                                                                      EDGEDA    146
      IF(IQUIT.EQ.1) THEN                                               EDGEDA    147
        GOTO 151                                                        EDGEDA    148
      ENDIF                                                             EDGEDA    149
C                                                                       EDGEDA    150
 150  CONTINUE                                                          EDGEDA    151
      MSG=' ENTER EXCITER TYPE      Q> QUIT'                            EDGEDA    152
      CALL PMTRED(LOUT,LIN,IOERR,40,MSG,'XXX',STRING,KREAD,PLAYBA)      EDGEDA    153
      IF(IOERR.NE.0)THEN                                                EDGEDA    154
      IF(PLAYBA)CALL PSTOP                                              EDGEDA    155
      GOTO 150                                                          EDGEDA    156
      ENDIF                                                             EDGEDA    157
      IF(RECORD) WRITE(IREC,'(A)') STRING                               EDGEDA    158
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') RETURN               EDGEDA    159
      READ(STRING,*,IOSTAT=IOS) IEXX                                    EDGEDA    160
      IF(IOS.NE.0)THEN                                                  EDGEDA    161
      IF(PLAYBA)CALL PSTOP                                              EDGEDA    162
      GOTO 150                                                          EDGEDA    163
      ENDIF                                                             EDGEDA    164
 151  IF (IEXX.EQ.50) RETURN                                            EDGEDA    165
C              1    2    3    4    5    6    7    8    9   10           EDGEDA    166
      GOTO ( 400,550 ,750 ,900 ,950 ,1000,1050,1250,1300,1450, 300      EDGEDA    167
C                                                                       EDGEDA    168
C                       14   15                                         EDGEDA    169
     *     , 300, 300,1600,1650, 300, 300, 300, 300, 300, 300, 300      EDGEDA    170
C                                                                       EDGEDA    171
C                                                30   31   32           EDGEDA    172
     *     , 300, 300, 300, 300, 300, 300, 300,1850,2000,2200, 300      EDGEDA    173
C                                                                       EDGEDA    174
C             34                                                        EDGEDA    175
     *     ,2350) IEXX                                                  EDGEDA    176
 300  CONTINUE                                                          EDGEDA    177
 310  MSG=' *** DATA ERROR:  DO YOU WANT TO REENTER THE DATA? (Y/N)'    EDGEDA    178
      CALL PMTRED(LOUT,LIN,IOERR,60,MSG,'XXX',STRING,KREAD,PLAYBA)      EDGEDA    179
      IF(IOERR.NE.0)THEN                                                EDGEDA    180
      IF(PLAYBA)CALL PSTOP                                              EDGEDA    181
      GOTO 310                                                          EDGEDA    182
      ENDIF                                                             EDGEDA    183
      IF(RECORD) WRITE(IREC,'(A)') STRING                               EDGEDA    184
      IF(STRING.EQ.'Y'.OR.STRING.EQ.'y') GOTO 150                       EDGEDA    185
      IF(STRING.NE.'N'.AND.STRING.NE.'n')THEN                           EDGEDA    186
      IF(PLAYBA)CALL PSTOP                                              EDGEDA    187
      GOTO 310                                                          EDGEDA    188
      ENDIF                                                             EDGEDA    189
      IQUIT=1                                                           EDGEDA    190
      RETURN                                                            EDGEDA    191
C                                                                       EDGEDA    192
C                                                                       EDGEDA    193
C  TYPE 1 EXCITER                                                       EDGEDA    194
 400  LI=19                                                             EDGEDA    195
      GOTO 2600                                                         EDGEDA    196
C                                                                       EDGEDA    197
C  TYPE 2 EXCITER                                                       EDGEDA    198
 550  LI=19                                                             EDGEDA    199
      GOTO 2600                                                         EDGEDA    200
C                                                                       EDGEDA    201
C  TYPE 3 EXCITER                                                       EDGEDA    202
 750  LI=31                                                             EDGEDA    203
      GOTO 2600                                                         EDGEDA    204
C                                                                       EDGEDA    205
C  TYPE 4 EXCITER                                                       EDGEDA    206
 900  LI=27                                                             EDGEDA    207
      GOTO 2600                                                         EDGEDA    208
C                                                                       EDGEDA    209
C  TYPE 5 EXCITER                                                       EDGEDA    210
 950  LI=32                                                             EDGEDA    211
      GOTO 2600                                                         EDGEDA    212
C                                                                       EDGEDA    213
C  TYPE 6 EXCITER                                                       EDGEDA    214
 1000 LI=26                                                             EDGEDA    215
      GOTO 2600                                                         EDGEDA    216
C                                                                       EDGEDA    217
C  TYPE 7 EXCITER                                                       EDGEDA    218
 1050 LI=21                                                             EDGEDA    219
      GOTO 2600                                                         EDGEDA    220
C                                                                       EDGEDA    221
C  TYPE 8 EXCITER                                                       EDGEDA    222
 1250 LI=26                                                             EDGEDA    223
      GOTO 2600                                                         EDGEDA    224
C                                                                       EDGEDA    225
C  TYPE 9 EXCITER                                                       EDGEDA    226
 1300 LI=19                                                             EDGEDA    227
      GOTO 2600                                                         EDGEDA    228
C                                                                       EDGEDA    229
C  TYPE 10 EXCITER                                                      EDGEDA    230
 1450 LI=19                                                             EDGEDA    231
      GOTO 2600                                                         EDGEDA    232
C                                                                       EDGEDA    233
C  TYPE 14 EXCITER                                                      EDGEDA    234
C                                                                       EDGEDA    235
 1600 LI=32                                                             EDGEDA    236
      GOTO 2600                                                         EDGEDA    237
C                                                                       EDGEDA    238
C  TYPE 15 EXCITER                                                      EDGEDA    239
C                                                                       EDGEDA    240
 1650 LI=19                                                             EDGEDA    241
      GOTO 2600                                                         EDGEDA    242
C                                                                       EDGEDA    243
C  TYPE 30 EXCITER                                                      EDGEDA    244
 1850 LI=28                                                             EDGEDA    245
      GOTO 2600                                                         EDGEDA    246
C                                                                       EDGEDA    247
C  TYPE 31 EXCITER                                                      EDGEDA    248
 2000 LI=24                                                             EDGEDA    249
      GOTO 2600                                                         EDGEDA    250
C                                                                       EDGEDA    251
C  TYPE 32 EXCITER                                                      EDGEDA    252
 2200 LI=34                                                             EDGEDA    253
      GOTO 2600                                                         EDGEDA    254
C                                                                       EDGEDA    255
C  TYPE 34 EXCITER                                                      EDGEDA    256
 2350 LI=21                                                             EDGEDA    257
      GOTO 2600                                                         EDGEDA    258
C                                                                       EDGEDA    259
C  INPUT DATA                                                           EDGEDA    260
C                                                                       EDGEDA    261
 2600 IF(IQUIT.EQ.1) THEN                                               EDGEDA    262
        JTEMP=JGENDA(3,JG)                                              EDGEDA    263
      ELSE                                                              EDGEDA    264
        JTEMP=JTLN                                                      EDGEDA    265
        JGENDA(3,JG)=JTLN                                               EDGEDA    266
        IGENDA(4,JG)=IEXX                                               EDGEDA    267
        JTLN=JTLN+LI+1                                                  EDGEDA    268
      ENDIF                                                             EDGEDA    269
      DO 2650  I=1,LI                                                   EDGEDA    270
 2650 TDDAT(JTEMP+I+1)=0.                                               EDGEDA    271
      ITDDAT(JTEMP+1)=0                                                 EDGEDA    272
      IQUIT=0                                                           EDGEDA    273
C                                                                       EDGEDA    274
      RETURN                                                            EDGEDA    275
C  --------------------------------------------                         EDGEDA    276
      ENTRY ESTBDA(JG,ISTABX,IQUIT)                                     EDGEDA    277
CD                                                                      EDGEDA    278
CD    TO DISPLAY THE STABILIZER DATA FOR ON-LINE EDITING.               EDGEDA    279
CD                                                                      EDGEDA    280
      IF(IQUIT.EQ.1) THEN                                               EDGEDA    281
        GOTO 2801                                                       EDGEDA    282
      ENDIF                                                             EDGEDA    283
C                                                                       EDGEDA    284
 2800 CONTINUE                                                          EDGEDA    285
      MSG=' ENTER STABILIZER TYPE      Q> QUIT'                         EDGEDA    286
      CALL PMTRED(LOUT,LIN,IOERR,45,MSG,'XXX',STRING,KREAD,PLAYBA)      EDGEDA    287
      IF(IOERR.NE.0)THEN                                                EDGEDA    288
      IF(PLAYBA)CALL PSTOP                                              EDGEDA    289
      GOTO 2800                                                         EDGEDA    290
      ENDIF                                                             EDGEDA    291
      IF(RECORD) WRITE(IREC,'(A)') STRING                               EDGEDA    292
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') RETURN               EDGEDA    293
      READ(STRING,*,IOSTAT=IOS) ISTABX                                  EDGEDA    294
      IF(IOS.NE.0)THEN                                                  EDGEDA    295
      IF(PLAYBA)CALL PSTOP                                              EDGEDA    296
      GOTO 2800                                                         EDGEDA    297
      ENDIF                                                             EDGEDA    298
 2801 IF (ISTABX.EQ.50) RETURN                                          EDGEDA    299
      IF(ISTABX.EQ.7.OR.ISTABX.EQ.8) RETURN                             EDGEDA    300
C                                                                       EDGEDA    301
C                                                                       EDGEDA    302
C              1    2    3    4    5    6              9   10   11      EDGEDA    303
      GOTO ( 3150,3200,3200,3150,3200,3200,3000,3000,3250,3300,3350     EDGEDA    304
C                                                                       EDGEDA    305
C             12                                                        EDGEDA    306
     *     ,3400) ISTABX                                                EDGEDA    307
C                                                                       EDGEDA    308
 3000 CONTINUE                                                          EDGEDA    309
 3050 MSG=' *** DATA ERROR:  DO YOU WANT TO REENTER THE DATA? (Y/N)'    EDGEDA    310
      CALL PMTRED(LOUT,LIN,IOERR,60,MSG,'XXX',STRING,KREAD,PLAYBA)      EDGEDA    311
      IF(IOERR.NE.0)THEN                                                EDGEDA    312
      IF(PLAYBA)CALL PSTOP                                              EDGEDA    313
      GOTO 3050                                                         EDGEDA    314
      ENDIF                                                             EDGEDA    315
      IF(RECORD) WRITE(IREC,'(A)') STRING                               EDGEDA    316
      IF(STRING.EQ.'Y'.OR.STRING.EQ.'y') GOTO 2800                      EDGEDA    317
      IF(STRING.NE.'N'.AND.STRING.NE.'n')THEN                           EDGEDA    318
      IF(PLAYBA)CALL PSTOP                                              EDGEDA    319
      GOTO 3050                                                         EDGEDA    320
      ENDIF                                                             EDGEDA    321
      IQUIT=1                                                           EDGEDA    322
      RETURN                                                            EDGEDA    323
C                                                                       EDGEDA    324
C  TYPE 1,4 STABILIZER                                                  EDGEDA    325
C                                                                       EDGEDA    326
 3150 LI=12                                                             EDGEDA    327
      GOTO 3450                                                         EDGEDA    328
C                                                                       EDGEDA    329
C  TYPE 2,3,5,6 STABILIZER                                              EDGEDA    330
C                                                                       EDGEDA    331
 3200 LI=20                                                             EDGEDA    332
      GOTO 3450                                                         EDGEDA    333
C                                                                       EDGEDA    334
C  TYPE 9 STABILIZER                                                    EDGEDA    335
C                                                                       EDGEDA    336
 3250 LI=23                                                             EDGEDA    337
      GOTO 3450                                                         EDGEDA    338
C                                                                       EDGEDA    339
C  TYPE 10 STABILIZER                                                   EDGEDA    340
C                                                                       EDGEDA    341
 3300 LI=18                                                             EDGEDA    342
      GOTO 3450                                                         EDGEDA    343
C                                                                       EDGEDA    344
C  TYPE 11 STABILIZER                                                   EDGEDA    345
C                                                                       EDGEDA    346
 3350 LI=28                                                             EDGEDA    347
      GOTO 3450                                                         EDGEDA    348
C                                                                       EDGEDA    349
C  TYPE 12 STABILIZER                                                   EDGEDA    350
C                                                                       EDGEDA    351
 3400 LI=20                                                             EDGEDA    352
C                                                                       EDGEDA    353
C  INIT STABILIZER DATA                                                 EDGEDA    354
C                                                                       EDGEDA    355
 3450 IF(ISTABX.EQ.9) THEN                                              EDGEDA    356
       J=6                                                              EDGEDA    357
      ELSEIF(ISTABX.EQ.12) THEN                                         EDGEDA    358
       J=4                                                              EDGEDA    359
      ELSE                                                              EDGEDA    360
       J=2                                                              EDGEDA    361
      ENDIF                                                             EDGEDA    362
      IF(IQUIT.EQ.1) THEN                                               EDGEDA    363
       JTEMP=JGENDA(4,JG)                                               EDGEDA    364
      ELSE                                                              EDGEDA    365
       JTEMP=JTLN                                                       EDGEDA    366
       JGENDA(4,JG)=JTLN                                                EDGEDA    367
       IGENDA(5,JG)=ISTABX                                              EDGEDA    368
       JTLN=JTLN+LI+J+1                                                 EDGEDA    369
      ENDIF                                                             EDGEDA    370
      DO 3500 I=1,J                                                     EDGEDA    371
 3500 ITDDAT(JTEMP+I)=0                                                 EDGEDA    372
      DO 3510 I=1,LI                                                    EDGEDA    373
 3510 TDDAT(JTEMP+I+J)=0.                                               EDGEDA    374
      IQUIT=0                                                           EDGEDA    375
      RETURN                                                            EDGEDA    376
C                                                                       EDGEDA    377
C ------------------------------------------------                      EDGEDA    378
      ENTRY EGVNDA(JG,IGVN,IQUIT)                                       EDGEDA    379
CD                                                                      EDGEDA    380
CD    TO DISPLAY THE GOVERNOR DATA FOR ON-LINE EDITING.                 EDGEDA    381
CD                                                                      EDGEDA    382
      IF(IQUIT.EQ.1) THEN                                               EDGEDA    383
        GOTO 3901                                                       EDGEDA    384
      ENDIF                                                             EDGEDA    385
C                                                                       EDGEDA    386
 3900 CONTINUE                                                          EDGEDA    387
      MSG=' ENTER GOVERNOR TYPE      Q> QUIT'                           EDGEDA    388
      CALL PMTRED(LOUT,LIN,IOERR,45,MSG,'XXX',STRING,KREAD,PLAYBA)      EDGEDA    389
      IF(IOERR.NE.0)THEN                                                EDGEDA    390
      IF(PLAYBA)CALL PSTOP                                              EDGEDA    391
      GOTO 3900                                                         EDGEDA    392
      ENDIF                                                             EDGEDA    393
      IF(RECORD) WRITE(IREC,'(A)') STRING                               EDGEDA    394
      IF(STRING(1:1).EQ.'Q'.OR.STRING(1:1).EQ.'q') RETURN               EDGEDA    395
      READ(STRING,*,IOSTAT=IOS) IGVN                                    EDGEDA    396
      IF(IOS.NE.0)THEN                                                  EDGEDA    397
      IF(PLAYBA)CALL PSTOP                                              EDGEDA    398
      GOTO 3900                                                         EDGEDA    399
      ENDIF                                                             EDGEDA    400
 3901 IF (IGVN.EQ.50) RETURN                                            EDGEDA    401
C                                                                       EDGEDA    402
C                                                                       EDGEDA    403
C              1    2    3    4    5    6    7    8                     EDGEDA    404
      GOTO (4200,4200,4050,4500,4650,4700,4750,4800,4050,4050,4050      EDGEDA    405
C                                                                       EDGEDA    406
C                                                    20   21   22       EDGEDA    407
     *    ,4050,4050,4050,4050,4050,4050,4050,4050,4850,5000,5000) IGVN EDGEDA    408
C                                                                       EDGEDA    409
 4050 CONTINUE                                                          EDGEDA    410
 4100 MSG=' *** DATA ERROR:  DO YOU WANT TO REENTER THE DATA? (Y/N)'    EDGEDA    411
      CALL PMTRED(LOUT,LIN,IOERR,60,MSG,'XXX',STRING,KREAD,PLAYBA)      EDGEDA    412
      IF(IOERR.NE.0)THEN                                                EDGEDA    413
      IF(PLAYBA)CALL PSTOP                                              EDGEDA    414
      GOTO 4100                                                         EDGEDA    415
      ENDIF                                                             EDGEDA    416
      IF(RECORD) WRITE(IREC,'(A)') STRING                               EDGEDA    417
      IF(STRING.EQ.'Y'.OR.STRING.EQ.'y') GOTO 3900                      EDGEDA    418
      IF(STRING.NE.'N'.AND.STRING.NE.'n')THEN                           EDGEDA    419
      IF(PLAYBA)CALL PSTOP                                              EDGEDA    420
      GOTO 4100                                                         EDGEDA    421
      ENDIF                                                             EDGEDA    422
      IQUIT=1                                                           EDGEDA    423
      RETURN                                                            EDGEDA    424
C                                                                       EDGEDA    425
C  TYPE 1 OR 2 GOVERNOR                                                 EDGEDA    426
C                                                                       EDGEDA    427
 4200 LI=64                                                             EDGEDA    428
      GOTO 5100                                                         EDGEDA    429
C                                                                       EDGEDA    430
C  TYPE 4 GOVERNOR                                                      EDGEDA    431
C                                                                       EDGEDA    432
 4500 LI=16                                                             EDGEDA    433
      GOTO 5100                                                         EDGEDA    434
C                                                                       EDGEDA    435
C  TYPE 5 GOVERNOR                                                      EDGEDA    436
C                                                                       EDGEDA    437
 4650 LI=4                                                              EDGEDA    438
      GOTO 5100                                                         EDGEDA    439
C                                                                       EDGEDA    440
C  TYPE 6 GOVERNOR                                                      EDGEDA    441
C                                                                       EDGEDA    442
 4700 LI=7                                                              EDGEDA    443
      GOTO 5100                                                         EDGEDA    444
C                                                                       EDGEDA    445
C  TYPE 7 GOVERNOR                                                      EDGEDA    446
C                                                                       EDGEDA    447
 4750 LI=10                                                             EDGEDA    448
      GOTO 5100                                                         EDGEDA    449
C                                                                       EDGEDA    450
C  TYPE 8 GOVERNOR                                                      EDGEDA    451
C                                                                       EDGEDA    452
 4800 LI=9                                                              EDGEDA    453
      GOTO 5100                                                         EDGEDA    454
C                                                                       EDGEDA    455
C  TYPE 20 GOVERNOR                                                     EDGEDA    456
C                                                                       EDGEDA    457
 4850 LI=15                                                             EDGEDA    458
      GOTO 5100                                                         EDGEDA    459
C                                                                       EDGEDA    460
C  TYPE 21 , 22 GOVERNOR                                                EDGEDA    461
C                                                                       EDGEDA    462
 5000 LI=11                                                             EDGEDA    463
C                                                                       EDGEDA    464
C  INIT. DATA                                                           EDGEDA    465
C                                                                       EDGEDA    466
 5100 IF(IGVN.EQ.1.OR.IGVN.EQ.2) THEN                                   EDGEDA    467
       J=2                                                              EDGEDA    468
      ELSE                                                              EDGEDA    469
       J=0                                                              EDGEDA    470
      ENDIF                                                             EDGEDA    471
      IF(IQUIT.EQ.1) THEN                                               EDGEDA    472
       JTEMP=JGENDA(2,JG)                                               EDGEDA    473
      ELSE                                                              EDGEDA    474
       JTEMP=JTLN                                                       EDGEDA    475
       JGENDA(2,JG)=JTLN                                                EDGEDA    476
       IGENDA(2,JG)=IGVN                                                EDGEDA    477
       JTLN=JTLN+LI+J+1                                                 EDGEDA    478
      ENDIF                                                             EDGEDA    479
      DO 5200 I=1,LI                                                    EDGEDA    480
 5200 TDDAT(JTEMP+I)=0.                                                 EDGEDA    481
      DO 5210 I=1,J                                                     EDGEDA    482
 5210 ITDDAT(JTEMP+LI+I)=0                                              EDGEDA    483
      IQUIT=0                                                           EDGEDA    484
      RETURN                                                            EDGEDA    485
      END                                                               EDGEDA    486
C ---------------------------------------------------                   EDGEDA    487
      SUBROUTINE PKDATA(STRING,VALUE,ITEM,JERR)                         EDGEDA    488
CD                                                                      EDGEDA    489
CD    TO READ DATA FROM A 80 CHARARATER STRING.                         EDGEDA    490
CD                                                                      EDGEDA    491
C                                                                       EDGEDA    492
      DIMENSION VALUE(1:*)                                              EDGEDA    493
      CHARACTER*80 STRING                                               EDGEDA    494
C                                                                       EDGEDA    495
      JERR=0                                                            EDGEDA    496
C                                                                       EDGEDA    497
C  COUNT ITEM NUMBER                                                    EDGEDA    498
C                                                                       EDGEDA    499
      I1=0                                                              EDGEDA    500
      ISTART=ITEM+1                                                     EDGEDA    501
C                                                                       EDGEDA    502
 50   CONTINUE                                                          EDGEDA    503
      DO 60 I=I1+1,80                                                   EDGEDA    504
 60   IF(STRING(I:I).NE.' ') GOTO 70                                    EDGEDA    505
      GOTO 150                                                          EDGEDA    506
 70   I2=I1+INDEX(STRING(I1+1:),',')                                    EDGEDA    507
      IF(I2.EQ.I1) I2=81                                                EDGEDA    508
C                                                                       EDGEDA    509
      ITEM=ITEM+1                                                       EDGEDA    510
      IP=0                                                              EDGEDA    511
C                                                                       EDGEDA    512
      DO 100 I=I1+1,I2-1                                                EDGEDA    513
         IF(STRING(I:I).NE.' ')THEN                                     EDGEDA    514
            IF(IP.EQ.2) ITEM=ITEM+1                                     EDGEDA    515
            IP=1                                                        EDGEDA    516
         ELSEIF(STRING(I:I).EQ.' '.AND.IP.EQ.1)THEN                     EDGEDA    517
            IP=2                                                        EDGEDA    518
         ENDIF                                                          EDGEDA    519
 100  CONTINUE                                                          EDGEDA    520
C                                                                       EDGEDA    521
      I1=I2                                                             EDGEDA    522
      IF(I1.NE.81) GOTO 50                                              EDGEDA    523
C                                                                       EDGEDA    524
C  READ DATA VALUE                                                      EDGEDA    525
C                                                                       EDGEDA    526
 150  IF(ITEM.GE.ISTART)THEN                                            EDGEDA    527
         READ(STRING,*,IOSTAT=IOS) (VALUE(I),I=ISTART,ITEM)             EDGEDA    528
         IF(IOS.NE.0) GOTO 200                                          EDGEDA    529
      ENDIF                                                             EDGEDA    530
      RETURN                                                            EDGEDA    531
C                                                                       EDGEDA    532
 200  JERR=1                                                            EDGEDA    533
      RETURN                                                            EDGEDA    534
      END                                                               EDGEDA    535
